summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--AUTHORS1
-rwxr-xr-xemcc505
-rwxr-xr-x[-rw-r--r--]emlink.py0
-rwxr-xr-xemscripten.py35
-rwxr-xr-xscons-tools/emscripten.py5
-rw-r--r--src/deps_info.json7
-rw-r--r--src/embind/emval.js36
-rw-r--r--src/headlessCanvas.js1
-rw-r--r--src/jsifier.js58
-rw-r--r--src/library.js315
-rw-r--r--src/library_browser.js12
-rw-r--r--src/library_egl.js2
-rw-r--r--src/library_fs.js213
-rw-r--r--src/library_gl.js198
-rw-r--r--src/library_html5.js19
-rw-r--r--src/library_idbfs.js324
-rw-r--r--src/library_openal.js195
-rw-r--r--src/library_sdl.js31
-rw-r--r--src/parseTools.js4
-rw-r--r--src/preamble.js4
-rw-r--r--src/runtime.js4
-rw-r--r--src/settings.js14
-rw-r--r--src/struct_info.json4
-rw-r--r--system/include/X11/XKBlib.h1149
-rw-r--r--system/include/X11/Xfuncs.h69
-rw-r--r--system/include/X11/XlibConf.h38
-rw-r--r--system/include/X11/Xlibint.h1387
-rw-r--r--system/include/X11/Xmd.h185
-rw-r--r--system/include/X11/Xproto.h2157
-rw-r--r--system/include/X11/Xprotostr.h77
-rw-r--r--system/include/X11/cursorfont.h111
-rw-r--r--system/include/X11/extensions/XKB.h786
-rw-r--r--system/include/X11/extensions/XKBstr.h613
-rw-r--r--system/include/X11/extensions/XShm.h135
-rw-r--r--system/include/X11/extensions/Xext.h53
-rw-r--r--system/include/X11/extensions/extutil.h190
-rw-r--r--system/include/X11/extensions/shm.h44
-rw-r--r--system/include/emscripten/bind.h52
-rw-r--r--system/include/emscripten/emscripten.h8
-rw-r--r--system/include/emscripten/val.h55
-rw-r--r--system/include/emscripten/wire.h32
-rw-r--r--system/include/libc/unistd.h6
-rw-r--r--system/lib/gl.c1729
-rw-r--r--system/lib/gl.symbols1
-rw-r--r--system/lib/libc.symbols9
-rw-r--r--system/lib/libc/musl/src/locale/strcoll.c15
-rw-r--r--system/lib/libc/musl/src/string/memcmp.c8
-rw-r--r--system/lib/libc/musl/src/string/strcasecmp.c9
-rw-r--r--system/lib/libc/musl/src/string/strcmp.c7
-rw-r--r--system/lib/libc/musl/src/string/strncasecmp.c10
-rw-r--r--system/lib/libc/musl/src/string/strncmp.c9
-rw-r--r--system/lib/sdl.cpp13
-rw-r--r--system/lib/sdl.symbols1
-rw-r--r--tests/cases/bigdouble.ll17
-rw-r--r--tests/cases/bigdouble.txt1
-rw-r--r--tests/cases/fuzz6_ta2.ll3306
-rw-r--r--tests/cases/fuzz6_ta2.txt1
-rw-r--r--tests/cases/i96shiftnon32_ta2.ll44
-rw-r--r--tests/cases/i96shiftnon32_ta2.txt1
-rw-r--r--tests/cases/legalizer_b_ta2.ll179
-rw-r--r--tests/cases/legalizer_b_ta2.txt20
-rw-r--r--tests/codemods.cpp21
-rw-r--r--tests/core/test_exceptions_alias.c15
-rw-r--r--tests/core/test_exceptions_alias.out2
-rw-r--r--tests/core/test_exceptions_white_list_2.c27
-rw-r--r--tests/core/test_exceptions_white_list_2.out1
-rw-r--r--tests/core/test_memcpy3.c51
-rw-r--r--tests/core/test_memcpy3.out81
-rw-r--r--tests/core/test_memset.c51
-rw-r--r--tests/core/test_memset.out81
-rw-r--r--tests/core/test_sscanf.in1
-rw-r--r--tests/core/test_sscanf_6.in14
-rw-r--r--tests/core/test_sscanf_6.out1
-rw-r--r--tests/core/test_strcmp_uni.out6
-rw-r--r--tests/cubegeom_proc.c331
-rw-r--r--tests/embind/embind.test.js72
-rw-r--r--tests/embind/embind_test.cpp61
-rw-r--r--tests/fs/test_mount.c60
-rw-r--r--tests/fuzz/6.c1313
-rw-r--r--tests/fuzz/6.c.txt1
-rwxr-xr-xtests/fuzz/csmith_driver.py7
-rwxr-xr-xtests/fuzz/test.sh13
-rw-r--r--tests/hello_world_gles_deriv.c1
-rw-r--r--tests/netinet/in.cpp14
-rw-r--r--tests/netinet/in.out1
-rw-r--r--tests/openal_playback.cpp44
-rwxr-xr-xtests/runner.py24
-rw-r--r--tests/sdlglshader.c5
-rw-r--r--tests/sockets/test_sockets_echo_client.c25
-rw-r--r--tests/sockets/test_sockets_echo_server.c26
-rw-r--r--tests/test_browser.py56
-rw-r--r--tests/test_core.py171
-rw-r--r--tests/test_egl.c5
-rw-r--r--tests/test_minmax.c89
-rw-r--r--tests/test_other.py24
-rw-r--r--tools/file_packager.py9
-rw-r--r--tools/find_bigis.py2
-rw-r--r--tools/js-optimizer.js18
-rw-r--r--tools/parse_unaligned.py17
-rw-r--r--tools/shared.py2
-rw-r--r--tools/system_libs.py397
-rw-r--r--tools/test-js-optimizer-asm-last-output.js2
-rw-r--r--tools/test-js-optimizer-asm-pre-f32.js11
-rw-r--r--tools/test-js-optimizer-asm-pre-output-f32.js11
-rw-r--r--tools/test-js-optimizer-asm-pre-output.js19
-rw-r--r--tools/test-js-optimizer-asm-pre.js22
106 files changed, 16586 insertions, 1133 deletions
diff --git a/AUTHORS b/AUTHORS
index 2c292dde..fc947687 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -120,3 +120,4 @@ a license to everyone to use it as detailed in LICENSE.)
* Jari Vetoniemi <mailroxas@gmail.com>
* Sindre Sorhus <sindresorhus@gmail.com>
* James S Urquhart <jamesu@gmail.com>
+* Boris Gjenero <boris.gjenero@gmail.com>
diff --git a/emcc b/emcc
index 33fb9147..7686e818 100755
--- a/emcc
+++ b/emcc
@@ -47,16 +47,18 @@ emcc can be influenced by a few environment variables:
EMMAKEN_COMPILER - The compiler to be used, if you don't want the default clang.
'''
-import os, sys, shutil, tempfile, subprocess, shlex, time, re, logging
+import os, sys, shutil, tempfile, subprocess, shlex, time, re, logging, json
from subprocess import PIPE, STDOUT
-from tools import shared, jsrun
+from tools import shared, jsrun, system_libs
from tools.shared import Compression, execute, suffix, unsuffixed, unsuffixed_basename, WINDOWS
from tools.response_file import read_response_file
# endings = dot + a suffix, safe to test by filename.endswith(endings)
C_ENDINGS = ('.c', '.C')
CXX_ENDINGS = ('.cpp', '.cxx', '.cc', '.CPP', '.CXX', '.CC')
-SOURCE_ENDINGS = C_ENDINGS + CXX_ENDINGS + ('.m', '.mm')
+OBJC_ENDINGS = ('.m',)
+OBJCXX_ENDINGS = ('.mm',)
+SOURCE_ENDINGS = C_ENDINGS + CXX_ENDINGS + OBJC_ENDINGS + OBJCXX_ENDINGS
BITCODE_ENDINGS = ('.bc', '.o', '.obj')
DYNAMICLIB_ENDINGS = ('.dylib', '.so', '.dll')
STATICLIB_ENDINGS = ('.a',)
@@ -311,6 +313,13 @@ Options that are modified or new in %s include:
If a directory is passed here, its entire
contents will be embedded.
+ Note: Embedding files is much less
+ efficient than preloading them. You
+ should only use it for small amounts
+ of small files. Instead, use
+ --preload-file which emits efficient
+ binary data.
+
--preload-file <name> A file to preload before running the
compiled code asynchronously. Otherwise
similar to --embed-file, except that this
@@ -384,6 +393,9 @@ Options that are modified or new in %s include:
The main file resides in the base directory and
has the suffix ".js".
+ Note: this option is deprecated (modern JS debuggers
+ should work ok even on large files)
+
--bind Compiles the source code using the "embind"
bindings approach, which connects C/C++ and JS.
@@ -704,7 +716,7 @@ use_cxx = True
for i in range(1, len(sys.argv)):
arg = sys.argv[i]
if not arg.startswith('-'):
- if arg.endswith(('.c','.m')):
+ if arg.endswith(C_ENDINGS + OBJC_ENDINGS):
use_cxx = False
if '-M' in sys.argv or '-MM' in sys.argv:
@@ -1186,7 +1198,7 @@ try:
fastcomp = os.environ.get('EMCC_FAST_COMPILER') == '1'
if fastcomp:
- shared.Settings.ASM_JS = 1
+ shared.Settings.ASM_JS = 1 if opt_level > 0 else 2
assert shared.Settings.ALLOW_MEMORY_GROWTH == 0, 'memory growth not supported in fastcomp yet'
assert shared.Settings.UNALIGNED_MEMORY == 0, 'forced unaligned memory not supported in fastcomp'
assert shared.Settings.CHECK_HEAP_ALIGN == 0, 'check heap align not supported in fastcomp yet'
@@ -1194,20 +1206,22 @@ try:
assert shared.Settings.RESERVED_FUNCTION_POINTERS == 0, 'reserved function pointers not supported in fastcomp'
assert shared.Settings.ASM_HEAP_LOG == 0, 'asm heap log not supported in fastcomp'
assert shared.Settings.LABEL_DEBUG == 0, 'label debug not supported in fastcomp'
- assert shared.Settings.LEGACY_GL_EMULATION == 0, 'legacy gl emulation not supported in fastcomp'
assert shared.Settings.EXECUTION_TIMEOUT == -1, 'execution timeout not supported in fastcomp'
assert shared.Settings.NAMED_GLOBALS == 0, 'named globals not supported in fastcomp'
assert shared.Settings.PGO == 0, 'pgo not supported in fastcomp'
assert shared.Settings.TARGET_LE32 == 1, 'fastcomp requires le32'
assert shared.Settings.USE_TYPED_ARRAYS == 2, 'fastcomp assumes ta2'
+ assert not split_js_file, '--split-js is deprecated and not supported in fastcomp'
assert not bind, 'embind not supported in fastcomp yet'
if jcache:
logging.warning('jcache is not supported in fastcomp (you should not need it anyhow), disabling')
jcache = False
fastcomp_opts = ['-pnacl-abi-simplify-preopt', '-pnacl-abi-simplify-postopt']
- if not shared.Settings.DISABLE_EXCEPTION_CATCHING:
+ if shared.Settings.DISABLE_EXCEPTION_CATCHING != 1:
fastcomp_opts += ['-enable-emscripten-cxx-exceptions']
+ if len(shared.Settings.EXCEPTION_CATCHING_WHITELIST) > 0:
+ fastcomp_opts += ['-emscripten-cxx-exceptions-whitelist=' + ','.join(shared.Settings.EXCEPTION_CATCHING_WHITELIST)]
if shared.Settings.ASM_JS:
assert opt_level >= 1 or fastcomp, 'asm.js requires -O1 or above'
@@ -1223,7 +1237,8 @@ try:
assert not shared.Settings.PGO, 'cannot run PGO in ASM_JS mode'
if shared.Settings.SAFE_HEAP and not js_opts:
- logging.warning('asm.js+SAFE_HEAP requires js opts to be run to be fully effective (-O2 or above by default)')
+ js_opts = True
+ logging.warning('enabling js opts to allow SAFE_HEAP to work properly')
if shared.Settings.ALLOW_MEMORY_GROWTH:
logging.error('Cannot enable ALLOW_MEMORY_GROWTH with asm.js, build with -s ASM_JS=0 if you need a growable heap');
@@ -1398,374 +1413,12 @@ try:
logging.debug('will generate JavaScript')
- extra_files_to_link = []
-
if not LEAVE_INPUTS_RAW and \
- not shared.Settings.BUILD_AS_SHARED_LIB == 2 and \
+ not shared.Settings.BUILD_AS_SHARED_LIB and \
not shared.Settings.SIDE_MODULE: # shared libraries/side modules link no C libraries, need them in parent
-
- # Check if we need to include some libraries that we compile. (We implement libc ourselves in js, but
- # compile a malloc implementation and stdlibc++.)
-
- def read_symbols(path, exclude=None):
- symbols = map(lambda line: line.strip().split(' ')[1], open(path).readlines())
- if exclude:
- symbols = filter(lambda symbol: symbol not in exclude, symbols)
- return set(symbols)
-
- lib_opts = ['-O2']
-
- # XXX We also need to add libc symbols that use malloc, for example strdup. It's very rare to use just them and not
- # a normal malloc symbol (like free, after calling strdup), so we haven't hit this yet, but it is possible.
- libc_symbols = read_symbols(shared.path_from_root('system', 'lib', 'libc.symbols'))
- sdl_symbols = read_symbols(shared.path_from_root('system', 'lib', 'sdl.symbols'))
- libcextra_symbols = read_symbols(shared.path_from_root('system', 'lib', 'libcextra.symbols'))
- libcxx_symbols = read_symbols(shared.path_from_root('system', 'lib', 'libcxx', 'symbols'), exclude=libc_symbols)
- libcxxabi_symbols = read_symbols(shared.path_from_root('system', 'lib', 'libcxxabi', 'symbols'), exclude=libc_symbols)
-
- # XXX we should disable EMCC_DEBUG when building libs, just like in the relooper
-
- def build_libc(lib_filename, files):
- o_s = []
- prev_cxx = os.environ.get('EMMAKEN_CXX')
- if prev_cxx: os.environ['EMMAKEN_CXX'] = ''
- musl_internal_includes = shared.path_from_root('system', 'lib', 'libc', 'musl', 'src', 'internal')
- for src in files:
- o = in_temp(os.path.basename(src) + '.o')
- execute([shared.PYTHON, shared.EMCC, shared.path_from_root('system', 'lib', src), '-o', o, '-I', musl_internal_includes] + lib_opts, stdout=stdout, stderr=stderr)
- o_s.append(o)
- if prev_cxx: os.environ['EMMAKEN_CXX'] = prev_cxx
- shared.Building.link(o_s, in_temp(lib_filename))
- return in_temp(lib_filename)
-
- def build_libcxx(src_dirname, lib_filename, files):
- o_s = []
- for src in files:
- o = in_temp(src + '.o')
- srcfile = shared.path_from_root(src_dirname, src)
- execute([shared.PYTHON, shared.EMXX, srcfile, '-o', o, '-std=c++11'] + lib_opts, stdout=stdout, stderr=stderr)
- o_s.append(o)
- shared.Building.link(o_s, in_temp(lib_filename))
- return in_temp(lib_filename)
-
- # libc
- def create_libc():
- logging.debug(' building libc for cache')
- libc_files = [
- 'dlmalloc.c',
- os.path.join('libcxx', 'new.cpp'),
- ]
- musl_files = [
- ['internal', [
- 'floatscan.c',
- 'shgetc.c',
- ]],
- ['math', [
- 'scalbn.c',
- 'scalbnl.c',
- ]],
- ['stdio', [
- '__overflow.c',
- '__toread.c',
- '__towrite.c',
- '__uflow.c',
- ]],
- ['stdlib', [
- 'atof.c',
- 'strtod.c',
- ]]
- ]
- for directory, sources in musl_files:
- libc_files += [os.path.join('libc', 'musl', 'src', directory, source) for source in sources]
- return build_libc('libc.bc', libc_files)
-
- def apply_libc(need):
- # libc needs some sign correction. # If we are in mode 0, switch to 2. We will add our lines
- try:
- if shared.Settings.CORRECT_SIGNS == 0: raise Exception('we need to change to 2')
- except: # we fail if equal to 0 - so we need to switch to 2 - or if CORRECT_SIGNS is not even in Settings
- shared.Settings.CORRECT_SIGNS = 2
- if shared.Settings.CORRECT_SIGNS == 2:
- shared.Settings.CORRECT_SIGNS_LINES = [shared.path_from_root('src', 'dlmalloc.c') + ':' + str(i+4) for i in [4816, 4191, 4246, 4199, 4205, 4235, 4227]]
- # If we are in mode 1, we are correcting everything anyhow. If we are in mode 3, we will be corrected
- # so all is well anyhow too.
- return True
-
- # libcextra
- def create_libcextra():
- logging.debug('building libcextra for cache')
- musl_files = [
- ['ctype', [
- 'iswalnum.c',
- 'iswalpha.c',
- 'iswblank.c',
- 'iswcntrl.c',
- 'iswctype.c',
- 'iswdigit.c',
- 'iswgraph.c',
- 'iswlower.c',
- 'iswprint.c',
- 'iswpunct.c',
- 'iswspace.c',
- 'iswupper.c',
- 'iswxdigit.c',
- 'towctrans.c',
- 'wcswidth.c',
- 'wctrans.c',
- 'wcwidth.c',
- ]],
- ['internal', [
- 'intscan.c',
- ]],
- ['legacy', [
- 'err.c',
- ]],
- ['locale', [
- 'iconv.c',
- 'iswalnum_l.c',
- 'iswalpha_l.c',
- 'iswblank_l.c',
- 'iswcntrl_l.c',
- 'iswctype_l.c',
- 'iswdigit_l.c',
- 'iswgraph_l.c',
- 'iswlower_l.c',
- 'iswprint_l.c',
- 'iswpunct_l.c',
- 'iswspace_l.c',
- 'iswupper_l.c',
- 'iswxdigit_l.c',
- 'strcasecmp_l.c',
- 'strfmon.c',
- 'strncasecmp_l.c',
- 'strxfrm.c',
- 'towctrans_l.c',
- 'towlower_l.c',
- 'towupper_l.c',
- 'wcscoll.c',
- 'wcscoll_l.c',
- 'wcsxfrm.c',
- 'wcsxfrm_l.c',
- 'wctrans_l.c',
- 'wctype_l.c',
- ]],
- ['math', [
- '__cos.c',
- '__cosdf.c',
- '__sin.c',
- '__sindf.c',
- 'ilogb.c',
- 'ilogbf.c',
- 'ilogbl.c',
- 'ldexp.c',
- 'ldexpf.c',
- 'ldexpl.c',
- 'logb.c',
- 'logbf.c',
- 'logbl.c',
- 'lgamma.c',
- 'lgamma_r.c',
- 'lgammaf.c',
- 'lgammaf_r.c',
- 'lgammal.c',
- 'scalbnf.c',
- 'signgam.c',
- 'tgamma.c',
- 'tgammaf.c',
- 'tgammal.c'
- ]],
- ['misc', [
- 'getopt.c',
- 'getopt_long.c',
- ]],
- ['multibyte', [
- 'btowc.c',
- 'mblen.c',
- 'mbrlen.c',
- 'mbrtowc.c',
- 'mbsinit.c',
- 'mbsnrtowcs.c',
- 'mbsrtowcs.c',
- 'mbstowcs.c',
- 'mbtowc.c',
- 'wcrtomb.c',
- 'wcsnrtombs.c',
- 'wcsrtombs.c',
- 'wcstombs.c',
- 'wctob.c',
- 'wctomb.c',
- ]],
- ['regex', [
- 'fnmatch.c',
- 'regcomp.c',
- 'regerror.c',
- 'regexec.c',
- 'tre-mem.c',
- ]],
- ['stdio', [
- 'fwprintf.c',
- 'swprintf.c',
- 'vfwprintf.c',
- 'vswprintf.c',
- 'vwprintf.c',
- 'wprintf.c',
- 'fputwc.c',
- 'fputws.c',
- ]],
- ['stdlib', [
- 'ecvt.c',
- 'fcvt.c',
- 'gcvt.c',
- 'wcstod.c',
- 'wcstol.c',
- ]],
- ['string', [
- 'memccpy.c',
- 'memmem.c',
- 'mempcpy.c',
- 'memrchr.c',
- 'strcasestr.c',
- 'strchrnul.c',
- 'strlcat.c',
- 'strlcpy.c',
- 'strsep.c',
- 'strverscmp.c',
- 'wcpcpy.c',
- 'wcpncpy.c',
- 'wcscasecmp.c',
- 'wcscasecmp_l.c',
- 'wcscat.c',
- 'wcschr.c',
- 'wcscmp.c',
- 'wcscpy.c',
- 'wcscspn.c',
- 'wcsdup.c',
- 'wcslen.c',
- 'wcsncasecmp.c',
- 'wcsncasecmp_l.c',
- 'wcsncat.c',
- 'wcsncmp.c',
- 'wcsncpy.c',
- 'wcsnlen.c',
- 'wcspbrk.c',
- 'wcsrchr.c',
- 'wcsspn.c',
- 'wcsstr.c',
- 'wcstok.c',
- 'wcswcs.c',
- 'wmemchr.c',
- 'wmemcmp.c',
- 'wmemcpy.c',
- 'wmemmove.c',
- 'wmemset.c',
- ]]
- ]
- libcextra_files = []
- for directory, sources in musl_files:
- libcextra_files += [os.path.join('libc', 'musl', 'src', directory, source) for source in sources]
- return build_libc('libcextra.bc', libcextra_files)
-
- # libcxx
- def create_libcxx():
- logging.debug('building libcxx for cache')
- libcxx_files = [
- 'algorithm.cpp',
- 'condition_variable.cpp',
- 'future.cpp',
- 'iostream.cpp',
- 'memory.cpp',
- 'random.cpp',
- 'stdexcept.cpp',
- 'system_error.cpp',
- 'utility.cpp',
- 'bind.cpp',
- 'debug.cpp',
- 'hash.cpp',
- 'mutex.cpp',
- 'string.cpp',
- 'thread.cpp',
- 'valarray.cpp',
- 'chrono.cpp',
- 'exception.cpp',
- 'ios.cpp',
- 'locale.cpp',
- 'regex.cpp',
- 'strstream.cpp'
- ]
- return build_libcxx(os.path.join('system', 'lib', 'libcxx'), 'libcxx.bc', libcxx_files)
-
- def apply_libcxx(need):
- assert shared.Settings.QUANTUM_SIZE == 4, 'We do not support libc++ with QUANTUM_SIZE == 1'
- # libcxx might need corrections, so turn them all on. TODO: check which are actually needed
- shared.Settings.CORRECT_SIGNS = shared.Settings.CORRECT_OVERFLOWS = shared.Settings.CORRECT_ROUNDINGS = 1
- #logging.info('using libcxx turns on CORRECT_* options')
- return True
-
- # libcxxabi - just for dynamic_cast for now
- def create_libcxxabi():
- logging.debug('building libcxxabi for cache')
- libcxxabi_files = [
- 'typeinfo.cpp',
- 'private_typeinfo.cpp'
- ]
- return build_libcxx(os.path.join('system', 'lib', 'libcxxabi', 'src'), 'libcxxabi.bc', libcxxabi_files)
-
- def apply_libcxxabi(need):
- assert shared.Settings.QUANTUM_SIZE == 4, 'We do not support libc++abi with QUANTUM_SIZE == 1'
- #logging.info('using libcxxabi, this may need CORRECT_* options')
- #shared.Settings.CORRECT_SIGNS = shared.Settings.CORRECT_OVERFLOWS = shared.Settings.CORRECT_ROUNDINGS = 1
- return True
-
- # SDL. We include code that demands malloc/free if not already required, so we have proper malloc/free from JS SDL code.
- # Note that the Force instance here can be optimized out, but we still export malloc/free, so they will be kept alive.
- def create_sdl():
- return build_libcxx(os.path.join('system', 'lib'), 'sdl.bc', ['sdl.cpp'])
-
- def apply_sdl(need):
- return 'SDL_Init' in all_needed and ('malloc' not in all_needed or 'free' not in all_needed)
-
- # Settings this in the environment will avoid checking dependencies and make building big projects a little faster
- # 1 means include everything; otherwise it can be the name of a lib (libcxx, etc.)
- force = os.environ.get('EMCC_FORCE_STDLIBS')
- force_all = force == '1'
-
- # Scan symbols
- all_needed = set()
- symbolses = map(lambda temp_file: shared.Building.llvm_nm(temp_file), temp_files)
- for symbols in symbolses:
- all_needed.update(symbols.undefs)
- for symbols in symbolses:
- all_needed.difference_update(symbols.defs)
-
- # Go over libraries to figure out which we must include
- # If we have libcxx, we must force inclusion of libc, since libcxx uses new internally. Note: this is kind of hacky.
- has = need = None
- for name, create, apply_, library_symbols in [('libcxx', create_libcxx, apply_libcxx, libcxx_symbols),
- ('libcextra', create_libcextra, lambda x: True, libcextra_symbols),
- ('libcxxabi', create_libcxxabi, apply_libcxxabi, libcxxabi_symbols),
- ('sdl', create_sdl, apply_sdl, sdl_symbols),
- ('libc', create_libc, apply_libc, libc_symbols)]:
- force_this = force_all or force == name
- if not force_this:
- need = set()
- has = set()
- for symbols in symbolses:
- for library_symbol in library_symbols:
- if library_symbol in symbols.undefs:
- need.add(library_symbol)
- if library_symbol in symbols.defs:
- has.add(library_symbol)
- for haz in has: # remove symbols that are supplied by another of the inputs
- if haz in need:
- need.remove(haz)
- if shared.Settings.VERBOSE: logging.debug('considering %s: we need %s and have %s' % (name, str(need), str(has)))
- if force_this or len(need) > 0:
- force_all = True
- if apply_(need):
- # We need to build and link the library in
- logging.debug('including %s' % name)
- libfile = shared.Cache.get(name, create)
- extra_files_to_link.append(libfile)
+ extra_files_to_link = system_libs.calculate(temp_files, in_temp, stdout, stderr)
+ else:
+ extra_files_to_link = []
log_time('calculate system libraries')
@@ -1959,27 +1612,36 @@ try:
# It is useful to run several js optimizer passes together, to save on unneeded unparsing/reparsing
js_optimizer_queue = []
js_optimizer_extra_info = {}
+ js_optimizer_queue_history = []
def flush_js_optimizer_queue():
- global final, js_optimizer_queue, js_optimizer_extra_info
+ global final, js_optimizer_queue, js_optimizer_extra_info, js_optimizer_queue_history
if len(js_optimizer_extra_info) == 0:
js_optimizer_extra_info = None
if len(js_optimizer_queue) > 0 and not(not shared.Settings.ASM_JS and len(js_optimizer_queue) == 1 and js_optimizer_queue[0] == 'last'):
- if DEBUG != '2':
+
+ def add_opt_args(args):
if shared.Settings.ASM_JS:
- js_optimizer_queue = ['asm'] + js_optimizer_queue
+ args = ['asm'] + args
+ if shared.Settings.PRECISE_F32:
+ args = ['asmPreciseF32'] + args
+ return args
+
+ if DEBUG != '2':
+ js_optimizer_queue = add_opt_args(js_optimizer_queue)
logging.debug('applying js optimization passes: %s', js_optimizer_queue)
final = shared.Building.js_optimizer(final, js_optimizer_queue, jcache, debug_level >= 4, js_optimizer_extra_info)
js_transform_tempfiles.append(final)
if DEBUG: save_intermediate('js_opts')
else:
for name in js_optimizer_queue:
- passes = [name]
+ passes = add_opt_args([name])
if shared.Settings.ASM_JS:
passes = ['asm'] + passes
logging.debug('applying js optimization pass: %s', passes)
final = shared.Building.js_optimizer(final, passes, jcache, debug_level >= 4, js_optimizer_extra_info)
js_transform_tempfiles.append(final)
save_intermediate(name)
+ js_optimizer_queue_history += js_optimizer_queue
js_optimizer_queue = []
js_optimizer_extra_info = {}
@@ -1998,12 +1660,12 @@ try:
else:
return 'eliminate'
- js_optimizer_queue += [get_eliminate()]
+ if opt_level >= 2:
+ js_optimizer_queue += [get_eliminate()]
- if shared.Settings.AGGRESSIVE_VARIABLE_ELIMINATION:
- js_optimizer_queue += ['aggressiveVariableElimination']
+ if shared.Settings.AGGRESSIVE_VARIABLE_ELIMINATION:
+ js_optimizer_queue += ['aggressiveVariableElimination']
- if opt_level >= 2:
js_optimizer_queue += ['simplifyExpressions']
if closure and not shared.Settings.ASM_JS:
@@ -2022,13 +1684,13 @@ try:
js_optimizer_queue += ['outline']
js_optimizer_extra_info['sizeToOutline'] = shared.Settings.OUTLINING_LIMIT
- if (not closure or shared.Settings.ASM_JS) and shared.Settings.RELOOP and debug_level < 3:
+ if opt_level >= 2 and (not closure or shared.Settings.ASM_JS) and shared.Settings.RELOOP and debug_level < 3:
if shared.Settings.ASM_JS and opt_level >= 3 and shared.Settings.OUTLINING_LIMIT == 0:
js_optimizer_queue += ['registerizeHarder']
else:
js_optimizer_queue += ['registerize']
- if opt_level > 0:
+ if opt_level >= 2:
if debug_level < 2 and shared.Settings.ASM_JS: js_optimizer_queue += ['minifyNames']
if debug_level == 0: js_optimizer_queue += ['minifyWhitespace']
@@ -2065,15 +1727,78 @@ try:
html.write(shell.replace('{{{ SCRIPT }}}', '<script>' + open(shared.path_from_root('src', 'proxyClient.js')).read().replace('{{{ filename }}}', target_basename) + '</script>'))
shutil.move(final, js_target)
elif not Compression.on:
+ # Normal code generation path
if debug_level >= 4:
generate_source_map(target)
shutil.move(final, js_target)
- # TODO: use an async blob, which would allow code rewriting on the client:
- # var blob = new Blob([codeString]);
- # var script = document.createElement('script');
- # script.src = URL.createObjectURL(blob);
- # document.body.appendChild(script);
- script_tag = '''<script async type="text/javascript" src="%s"></script>''' % base_js_target
+ need_mods = shared.Settings.PRECISE_F32 == 2
+ if not need_mods:
+ # Non-modifiable code, just load the code directly
+ script_tag = '''<script async type="text/javascript" src="%s"></script>''' % base_js_target
+ else:
+ # Potentially-modifiable code, load as text, modify, then execute. This lets you
+ # patch the code on the client machine right before it is executed, perhaps based
+ # on information about the client.
+ checks = []
+ mods = []
+ if shared.Settings.PRECISE_F32 == 2:
+ checks.append('!Math.fround')
+ if 'minifyNames' not in js_optimizer_queue_history:
+ # simple dumb replace
+ mods.append('''
+console.log('optimizing out Math.fround calls');
+code = code.replace(/Math_fround\(/g, '(').replace("'use asm'", "'almost asm'")
+''')
+ else:
+ # minified, not quite so simple - TODO
+ mods.append('''
+try {
+ console.log('optimizing out Math.fround calls');
+ var m = /var ([^=]+)=global\.Math\.fround;/.exec(code);
+ var minified = m[1];
+ if (!minified) throw 'fail';
+ var startAsm = code.indexOf('// EMSCRIPTEN_START_FUNCS');
+ var endAsm = code.indexOf('// EMSCRIPTEN_END_FUNCS');
+ var asm = code.substring(startAsm, endAsm);
+ do {
+ var moar = false; // we need to re-do, as x(x( will not be fixed
+ asm = asm.replace(new RegExp('[^a-zA-Z0-9\\\\$\\\\_]' + minified + '\\\\(', 'g'), function(s) { moar = true; return s[0] + '(' });
+ } while (moar);
+ code = code.substring(0, startAsm) + asm + code.substring(endAsm);
+ code = code.replace("'use asm'", "'almost asm'");
+} catch(e) { console.log('failed to optimize out Math.fround calls ' + e) }
+''')
+
+ fixes = ''
+ for i in range(len(checks)):
+ fixes += 'if (' + checks[i] + ') { ' + mods[i] + ' }\n'
+
+ # if all the checks are negative, just emit a script tag normally, that's better.
+ # otherwise, do an xhr to get the code as text, modify, and load asynchronously
+ code = 'if (!(' + ' || '.join(checks) + ''')) {
+ var script = document.createElement('script');
+ script.src = "''' + base_js_target + '''";
+ document.body.appendChild(script);
+} else {
+ var codeXHR = new XMLHttpRequest();
+ codeXHR.open('GET', '%s', true);
+ codeXHR.onload = function() {
+ var code = codeXHR.responseText;
+ %s
+ var blob = new Blob([code], { type: 'text/javascript' });
+ codeXHR = null;
+ var src = URL.createObjectURL(blob);
+ var script = document.createElement('script');
+ script.src = URL.createObjectURL(blob);
+ script.onload = function() {
+ URL.revokeObjectURL(script.src);
+ };
+ document.body.appendChild(script);
+ };
+ codeXHR.send(null);
+}
+''' % (base_js_target, fixes)
+ script_tag = '''<script>%s</script>''' % code
html.write(shell.replace('{{{ SCRIPT }}}', script_tag))
else:
# Compress the main code
diff --git a/emlink.py b/emlink.py
index f767ce58..f767ce58 100644..100755
--- a/emlink.py
+++ b/emlink.py
diff --git a/emscripten.py b/emscripten.py
index 725f573f..c96c56a0 100755
--- a/emscripten.py
+++ b/emscripten.py
@@ -474,6 +474,9 @@ def emscript(infile, settings, outfile, libraries=[], compiler_engine=None,
basic_vars.append('F_BASE_%s' % sig)
asm_setup += ' var F_BASE_%s = %s;\n' % (sig, 'FUNCTION_TABLE_OFFSET' if settings.get('SIDE_MODULE') else '0') + '\n'
+ if '_rand' in exported_implemented_functions or '_srand' in exported_implemented_functions:
+ basic_vars += ['___rand_seed']
+
asm_runtime_funcs = ['stackAlloc', 'stackSave', 'stackRestore', 'setThrew'] + ['setTempRet%d' % i for i in range(10)]
# function tables
function_tables = ['dynCall_' + table for table in last_forwarded_json['Functions']['tables']]
@@ -518,6 +521,7 @@ def emscript(infile, settings, outfile, libraries=[], compiler_engine=None,
exports = '{ ' + ', '.join(exports) + ' }'
else:
exports = '_main'
+
# calculate globals
try:
del forwarded_json['Variables']['globals']['_llvm_global_ctors'] # not a true variable
@@ -733,14 +737,17 @@ def emscript_fast(infile, settings, outfile, libraries=[], compiler_engine=None,
# * Run compiler.js on the metadata to emit the shell js code, pre/post-ambles,
# JS library dependencies, etc.
- if DEBUG:
- logging.debug('emscript: llvm backend')
- t = time.time()
-
temp_js = temp_files.get('.4.js').name
backend_compiler = os.path.join(shared.LLVM_ROOT, 'llc')
- shared.jsrun.timeout_run(subprocess.Popen([backend_compiler, infile, '-march=js', '-filetype=asm', '-o', temp_js], stdout=subprocess.PIPE))
-
+ backend_args = [backend_compiler, infile, '-march=js', '-filetype=asm', '-o', temp_js]
+ if settings['PRECISE_F32']:
+ backend_args += ['-emscripten-precise-f32']
+ if settings['WARN_UNALIGNED']:
+ backend_args += ['-emscripten-warn-unaligned']
+ if DEBUG:
+ logging.debug('emscript: llvm backend: ' + ' '.join(backend_args))
+ t = time.time()
+ shared.jsrun.timeout_run(subprocess.Popen(backend_args, stdout=subprocess.PIPE))
if DEBUG:
logging.debug(' emscript: llvm backend took %s seconds' % (time.time() - t))
t = time.time()
@@ -858,15 +865,13 @@ def emscript_fast(infile, settings, outfile, libraries=[], compiler_engine=None,
pre = parts[0]
funcs_js.append(parts[1])
- # calculations on merged forwarded data TODO
-
# merge forwarded data
assert settings.get('ASM_JS'), 'fastcomp is asm.js only'
settings['EXPORTED_FUNCTIONS'] = forwarded_json['EXPORTED_FUNCTIONS']
all_exported_functions = set(settings['EXPORTED_FUNCTIONS']) # both asm.js and otherwise
for additional_export in settings['DEFAULT_LIBRARY_FUNCS_TO_INCLUDE']: # additional functions to export from asm, if they are implemented
all_exported_functions.add('_' + additional_export)
- exported_implemented_functions = set()
+ exported_implemented_functions = set(metadata['exports'])
export_bindings = settings['EXPORT_BINDINGS']
export_all = settings['EXPORT_ALL']
for key in metadata['implementedFunctions'] + forwarded_json['Functions']['implementedFunctions'].keys(): # XXX perf
@@ -904,12 +909,15 @@ def emscript_fast(infile, settings, outfile, libraries=[], compiler_engine=None,
else:
pre_tables = ''
+ def unfloat(s):
+ return 'd' if s == 'f' else s # lower float to double for ffis
+
def make_table(sig, raw):
i = Counter.i
Counter.i += 1
bad = 'b' + str(i)
params = ','.join(['p%d' % p for p in range(len(sig)-1)])
- coerced_params = ','.join([shared.JS.make_coercion('p%d', sig[p+1], settings) % p for p in range(len(sig)-1)])
+ coerced_params = ','.join([shared.JS.make_coercion('p%d', unfloat(sig[p+1]), settings) % p for p in range(len(sig)-1)])
coercions = ';'.join(['p%d = %s' % (p, shared.JS.make_coercion('p%d' % p, sig[p+1], settings)) for p in range(len(sig)-1)]) + ';'
def make_func(name, code):
return 'function %s(%s) { %s %s }' % (name, params, coercions, code)
@@ -933,6 +941,8 @@ def emscript_fast(infile, settings, outfile, libraries=[], compiler_engine=None,
if not call_ident.startswith('_') and not call_ident.startswith('Math_'): call_ident = '_' + call_ident
code = call_ident + '(' + coerced_params + ')'
if sig[0] != 'v':
+ # ffis cannot return float
+ if sig[0] == 'f': code = '+' + code
code = 'return ' + shared.JS.make_coercion(code, sig[0], settings)
code += ';'
Counter.pre.append(make_func(item + '__wrapper', code))
@@ -975,6 +985,9 @@ def emscript_fast(infile, settings, outfile, libraries=[], compiler_engine=None,
basic_vars.append('F_BASE_%s' % sig)
asm_setup += ' var F_BASE_%s = %s;\n' % (sig, 'FUNCTION_TABLE_OFFSET' if settings.get('SIDE_MODULE') else '0') + '\n'
+ if '_rand' in exported_implemented_functions or '_srand' in exported_implemented_functions:
+ basic_vars += ['___rand_seed']
+
asm_runtime_funcs = ['stackAlloc', 'stackSave', 'stackRestore', 'setThrew'] + ['setTempRet%d' % i for i in range(10)]
# function tables
function_tables = ['dynCall_' + table for table in last_forwarded_json['Functions']['tables']]
@@ -1204,7 +1217,7 @@ Runtime.stackRestore = function(top) { asm['stackRestore'](top) };
if DEBUG: logging.debug(' emscript: final python processing took %s seconds' % (time.time() - t))
-if os.environ.get('EMCC_FAST_COMPILER'):
+if os.environ.get('EMCC_FAST_COMPILER') == '1':
emscript = emscript_fast
def main(args, compiler_engine, cache, jcache, relooper, temp_files, DEBUG, DEBUG_CACHE):
diff --git a/scons-tools/emscripten.py b/scons-tools/emscripten.py
index b4912aaa..4c48083e 100755
--- a/scons-tools/emscripten.py
+++ b/scons-tools/emscripten.py
@@ -316,6 +316,11 @@ def generate(env):
def depend_on_embedder(target, source, env):
env.Depends(target, env['JS_EMBEDDER'])
+ files = []
+ for src in source:
+ for dirpath, dirnames, filenames in os.walk(str(src.srcnode())):
+ files.extend(map(lambda p: os.path.join(dirpath, p), filenames))
+ env.Depends(target, env.Value(sorted(files)))
return target, source
def embed_files_in_js(target, source, env, for_signature):
diff --git a/src/deps_info.json b/src/deps_info.json
new file mode 100644
index 00000000..b38ffd00
--- /dev/null
+++ b/src/deps_info.json
@@ -0,0 +1,7 @@
+{
+ "uuid_compare": ["memcmp"],
+ "SDL_Init": ["malloc", "free"],
+ "SDL_GL_GetProcAddress": ["emscripten_GetProcAddress"],
+ "eglGetProcAddress": ["emscripten_GetProcAddress"]
+}
+
diff --git a/src/embind/emval.js b/src/embind/emval.js
index 0d075188..039f1d61 100644
--- a/src/embind/emval.js
+++ b/src/embind/emval.js
@@ -3,7 +3,7 @@
/*global new_*/
/*global createNamedFunction*/
/*global readLatin1String, writeStringToMemory*/
-/*global requireRegisteredType, throwBindingError*/
+/*global requireRegisteredType, throwBindingError, runDestructors*/
/*jslint sub:true*/ /* The symbols 'fromWireType' and 'toWireType' must be accessed via array notation to be closure-safe since craftInvokerFunction crafts functions as strings that can't be closured. */
var Module = Module || {};
@@ -79,6 +79,12 @@ function __emval_decref(handle) {
}
}
+function __emval_run_destructors(handle) {
+ var destructors = _emval_handle_array[handle].value;
+ runDestructors(destructors);
+ __emval_decref(handle);
+}
+
function __emval_new_array() {
return __emval_register([]);
}
@@ -199,11 +205,12 @@ function __emval_set_property(handle, key, value) {
_emval_handle_array[handle].value[_emval_handle_array[key].value] = _emval_handle_array[value].value;
}
-function __emval_as(handle, returnType) {
+function __emval_as(handle, returnType, destructorsRef) {
requireHandle(handle);
returnType = requireRegisteredType(returnType, 'emval::as');
var destructors = [];
- // caller owns destructing
+ var rd = __emval_register(destructors);
+ HEAP32[destructorsRef >> 2] = rd;
return returnType['toWireType'](destructors, _emval_handle_array[handle].value);
}
@@ -242,14 +249,20 @@ function lookupTypes(argCount, argTypes, argWireTypes) {
return a;
}
+function allocateDestructors(destructorsRef) {
+ var destructors = [];
+ HEAP32[destructorsRef >> 2] = __emval_register(destructors);
+ return destructors;
+}
+
function __emval_get_method_caller(argCount, argTypes) {
var types = lookupTypes(argCount, argTypes);
var retType = types[0];
var signatureName = retType.name + "_$" + types.slice(1).map(function (t) { return t.name; }).join("_") + "$";
- var args1 = ["addFunction", "createNamedFunction", "requireHandle", "getStringOrSymbol", "_emval_handle_array", "retType"];
- var args2 = [Runtime.addFunction, createNamedFunction, requireHandle, getStringOrSymbol, _emval_handle_array, retType];
+ var args1 = ["addFunction", "createNamedFunction", "requireHandle", "getStringOrSymbol", "_emval_handle_array", "retType", "allocateDestructors"];
+ var args2 = [Runtime.addFunction, createNamedFunction, requireHandle, getStringOrSymbol, _emval_handle_array, retType, allocateDestructors];
var argsList = ""; // 'arg0, arg1, arg2, ... , argN'
var argsListWired = ""; // 'arg0Wired, ..., argNWired'
@@ -261,16 +274,17 @@ function __emval_get_method_caller(argCount, argTypes) {
}
var invokerFnBody =
- "return addFunction(createNamedFunction('" + signatureName + "', function (handle, name" + argsListWired + ") {\n" +
- "requireHandle(handle);\n" +
- "name = getStringOrSymbol(name);\n";
+ "return addFunction(createNamedFunction('" + signatureName + "', function (handle, name, destructorsRef" + argsListWired + ") {\n" +
+ " requireHandle(handle);\n" +
+ " name = getStringOrSymbol(name);\n";
for (var i = 0; i < argCount - 1; ++i) {
- invokerFnBody += "var arg" + i + " = argType" + i + ".fromWireType(arg" + i + "Wired);\n";
+ invokerFnBody += " var arg" + i + " = argType" + i + ".fromWireType(arg" + i + "Wired);\n";
}
invokerFnBody +=
- "var obj = _emval_handle_array[handle].value;\n" +
- "return retType.toWireType(null, obj[name](" + argsList + "));\n" +
+ " var obj = _emval_handle_array[handle].value;\n" +
+ " var rv = obj[name](" + argsList + ");\n" +
+ " return retType.toWireType(allocateDestructors(destructorsRef), rv);\n" +
"}));\n";
args1.push(invokerFnBody);
diff --git a/src/headlessCanvas.js b/src/headlessCanvas.js
index 6b0f9d47..4bd17a7b 100644
--- a/src/headlessCanvas.js
+++ b/src/headlessCanvas.js
@@ -446,6 +446,7 @@ function headlessCanvas() {
case /* GL_MAX_FRAGMENT_UNIFORM_VECTORS */ 0x8DFD: return 4096;
case /* GL_MAX_VARYING_VECTORS */ 0x8DFC: return 32;
case /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS */ 0x8B4D: return 32;
+ case /* GL_ARRAY_BUFFER_BINDING */ 0x8894: return 0;
default: console.log('getParameter ' + pname + '?'); return 0;
}
},
diff --git a/src/jsifier.js b/src/jsifier.js
index f4819584..6742f504 100644
--- a/src/jsifier.js
+++ b/src/jsifier.js
@@ -224,6 +224,7 @@ function JSify(data, functionsOnly) {
// globalVariable
function globalVariableHandler(item) {
+
function needsPostSet(value) {
if (typeof value !== 'string') return false;
// (' is ok, as it is something we can indexize later into a concrete int: ('{{ FI_ ...
@@ -274,7 +275,9 @@ function JSify(data, functionsOnly) {
constant = Runtime.alignMemory(calcAllocatedSize(item.type));
} else {
if (item.external) {
- if (Runtime.isNumberType(item.type) || isPointerType(item.type)) {
+ if (LibraryManager.library[item.ident.slice(1)]) {
+ constant = LibraryManager.library[item.ident.slice(1)];
+ } else if (Runtime.isNumberType(item.type) || isPointerType(item.type)) {
constant = zeros(Runtime.getNativeFieldSize(item.type));
} else {
constant = makeEmptyStruct(item.type);
@@ -282,22 +285,23 @@ function JSify(data, functionsOnly) {
} else {
constant = parseConst(item.value, item.type, item.ident);
}
- assert(typeof constant === 'object');//, [typeof constant, JSON.stringify(constant), item.external]);
// This is a flattened object. We need to find its idents, so they can be assigned to later
- var structTypes = null;
- constant.forEach(function(value, i) {
- if (needsPostSet(value)) { // ident, or expression containing an ident
- if (!structTypes) structTypes = generateStructTypes(item.type);
- itemsDict.GlobalVariablePostSet.push({
- intertype: 'GlobalVariablePostSet',
- JS: makeSetValue(makeGlobalUse(item.ident), i, value, structTypes[i], false, true) + ';' // ignore=true, since e.g. rtti and statics cause lots of safe_heap errors
- });
- constant[i] = '0';
- } else {
- if (typeof value === 'string') constant[i] = deParenCarefully(value);
- }
- });
+ if (typeof constant === 'object') {
+ var structTypes = null;
+ constant.forEach(function(value, i) {
+ if (needsPostSet(value)) { // ident, or expression containing an ident
+ if (!structTypes) structTypes = generateStructTypes(item.type);
+ itemsDict.GlobalVariablePostSet.push({
+ intertype: 'GlobalVariablePostSet',
+ JS: makeSetValue(makeGlobalUse(item.ident), i, value, structTypes[i], false, true) + ';' // ignore=true, since e.g. rtti and statics cause lots of safe_heap errors
+ });
+ constant[i] = '0';
+ } else {
+ if (typeof value === 'string') constant[i] = deParenCarefully(value);
+ }
+ });
+ }
if (item.external) {
// External variables in shared libraries should not be declared as
@@ -312,14 +316,18 @@ function JSify(data, functionsOnly) {
}
// ensure alignment
- var extra = Runtime.alignMemory(constant.length) - constant.length;
- if (item.ident.substr(0, 5) == '__ZTV') extra += Runtime.alignMemory(QUANTUM_SIZE);
- while (extra-- > 0) constant.push(0);
+ if (typeof constant === 'object') {
+ var extra = Runtime.alignMemory(constant.length) - constant.length;
+ if (item.ident.substr(0, 5) == '__ZTV') extra += Runtime.alignMemory(QUANTUM_SIZE);
+ while (extra-- > 0) constant.push(0);
+ }
}
// NOTE: This is the only place that could potentially create static
// allocations in a shared library.
- constant = makePointer(constant, null, allocator, item.type, index);
+ if (typeof constant !== 'string') {
+ constant = makePointer(constant, null, allocator, item.type, index);
+ }
var js = (index !== null ? '' : item.ident + '=') + constant;
if (js) js += ';';
@@ -491,12 +499,8 @@ function JSify(data, functionsOnly) {
if (!LINKABLE && !LibraryManager.library.hasOwnProperty(shortident) && !LibraryManager.library.hasOwnProperty(shortident + '__inline')) {
if (ERROR_ON_UNDEFINED_SYMBOLS) error('unresolved symbol: ' + shortident);
else if (VERBOSE || WARN_ON_UNDEFINED_SYMBOLS) warn('unresolved symbol: ' + shortident);
- if (ASM_JS) {
- // emit a stub that will fail during runtime. this allows asm validation to succeed.
- LibraryManager.library[shortident] = new Function("Module['printErr']('missing function: " + shortident + "'); abort(-1);");
- } else {
- cancel = true; // emit nothing, not even var X = undefined;
- }
+ // emit a stub that will fail at runtime
+ LibraryManager.library[shortident] = new Function("Module['printErr']('missing function: " + shortident + "'); abort(-1);");
}
item.JS = cancel ? ';' : addFromLibrary(shortident);
}
@@ -1223,7 +1227,7 @@ function JSify(data, functionsOnly) {
// in an assignment
var disabled = DISABLE_EXCEPTION_CATCHING == 2 && !(item.funcData.ident in EXCEPTION_CATCHING_WHITELIST);
var phiSets = calcPhiSets(item);
- var call_ = makeFunctionCall(item, item.params, item.funcData, item.type, ASM_JS && !disabled, !!item.assignTo || !item.standalone, true);
+ var call_ = makeFunctionCall(item, item.params, item.funcData, item.type, ASM_JS && !disabled, !!item.assignTo || !item.standalone, !disabled);
var ret;
@@ -1844,7 +1848,7 @@ function JSify(data, functionsOnly) {
// rest of the output that we started to print out earlier (see comment on the
// "Final shape that will be created").
if (PRECISE_I64_MATH && Types.preciseI64MathUsed) {
- if (!INCLUDE_FULL_LIBRARY && !SIDE_MODULE) {
+ if (!INCLUDE_FULL_LIBRARY && !SIDE_MODULE && !BUILD_AS_SHARED_LIB) {
// first row are utilities called from generated code, second are needed from fastLong
['i64Add', 'i64Subtract', 'bitshift64Shl', 'bitshift64Lshr', 'bitshift64Ashr',
'llvm_ctlz_i32', 'llvm_cttz_i32'].forEach(function(func) {
diff --git a/src/library.js b/src/library.js
index bca47944..db9b891c 100644
--- a/src/library.js
+++ b/src/library.js
@@ -52,32 +52,33 @@ LibraryManager.library = {
___setErrNo(ERRNO_CODES.ENOTDIR);
return 0;
}
- var err = _open(dirname, {{{ cDefine('O_RDONLY') }}}, allocate([0, 0, 0, 0], 'i32', ALLOC_STACK));
- // open returns 0 on failure, not -1
- return err === -1 ? 0 : err;
+ var fd = _open(dirname, {{{ cDefine('O_RDONLY') }}}, allocate([0, 0, 0, 0], 'i32', ALLOC_STACK));
+ return fd === -1 ? 0 : FS.getPtrForStream(FS.getStream(fd));
},
- closedir__deps: ['$FS', '__setErrNo', '$ERRNO_CODES', 'close'],
+ closedir__deps: ['$FS', '__setErrNo', '$ERRNO_CODES', 'close', 'fileno'],
closedir: function(dirp) {
// int closedir(DIR *dirp);
// http://pubs.opengroup.org/onlinepubs/007908799/xsh/closedir.html
- return _close(dirp);
+ var fd = _fileno(dirp);
+ return _close(fd);
},
telldir__deps: ['$FS', '__setErrNo', '$ERRNO_CODES'],
telldir: function(dirp) {
// long int telldir(DIR *dirp);
// http://pubs.opengroup.org/onlinepubs/007908799/xsh/telldir.html
- var stream = FS.getStream(dirp);
+ var stream = FS.getStreamFromPtr(dirp);
if (!stream || !FS.isDir(stream.node.mode)) {
___setErrNo(ERRNO_CODES.EBADF);
return -1;
}
return stream.position;
},
- seekdir__deps: ['$FS', '__setErrNo', '$ERRNO_CODES', 'lseek'],
+ seekdir__deps: ['$FS', '__setErrNo', '$ERRNO_CODES', 'lseek', 'fileno'],
seekdir: function(dirp, loc) {
// void seekdir(DIR *dirp, long int loc);
// http://pubs.opengroup.org/onlinepubs/007908799/xsh/seekdir.html
- _lseek(dirp, loc, {{{ cDefine('SEEK_SET') }}});
+ var fd = _fileno(dirp);
+ _lseek(fd, loc, {{{ cDefine('SEEK_SET') }}});
},
rewinddir__deps: ['seekdir'],
rewinddir: function(dirp) {
@@ -89,7 +90,7 @@ LibraryManager.library = {
readdir_r: function(dirp, entry, result) {
// int readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result);
// http://pubs.opengroup.org/onlinepubs/007908799/xsh/readdir_r.html
- var stream = FS.getStream(dirp);
+ var stream = FS.getStreamFromPtr(dirp);
if (!stream) {
return ___setErrNo(ERRNO_CODES.EBADF);
}
@@ -134,7 +135,7 @@ LibraryManager.library = {
readdir: function(dirp) {
// struct dirent *readdir(DIR *dirp);
// http://pubs.opengroup.org/onlinepubs/007908799/xsh/readdir_r.html
- var stream = FS.getStream(dirp);
+ var stream = FS.getStreamFromPtr(dirp);
if (!stream) {
___setErrNo(ERRNO_CODES.EBADF);
return 0;
@@ -1641,6 +1642,7 @@ LibraryManager.library = {
for (var i = 0; i < maxx; i++) {
next = get();
{{{ makeSetValue('argPtr++', 0, 'next', 'i8') }}};
+ if (next === 0) return i > 0 ? fields : fields-1; // we failed to read the full length of this field
}
formatIndex += nextC - formatIndex + 1;
continue;
@@ -2289,19 +2291,20 @@ LibraryManager.library = {
clearerr: function(stream) {
// void clearerr(FILE *stream);
// http://pubs.opengroup.org/onlinepubs/000095399/functions/clearerr.html
- stream = FS.getStream(stream);
+ stream = FS.getStreamFromPtr(stream);
if (!stream) {
return;
}
stream.eof = false;
stream.error = false;
},
- fclose__deps: ['close', 'fsync'],
+ fclose__deps: ['close', 'fsync', 'fileno'],
fclose: function(stream) {
// int fclose(FILE *stream);
// http://pubs.opengroup.org/onlinepubs/000095399/functions/fclose.html
- _fsync(stream);
- return _close(stream);
+ var fd = _fileno(stream);
+ _fsync(fd);
+ return _close(fd);
},
fdopen__deps: ['$FS', '__setErrNo', '$ERRNO_CODES'],
fdopen: function(fildes, mode) {
@@ -2322,21 +2325,21 @@ LibraryManager.library = {
} else {
stream.error = false;
stream.eof = false;
- return fildes;
+ return FS.getPtrForStream(stream);
}
},
feof__deps: ['$FS'],
feof: function(stream) {
// int feof(FILE *stream);
// http://pubs.opengroup.org/onlinepubs/000095399/functions/feof.html
- stream = FS.getStream(stream);
+ stream = FS.getStreamFromPtr(stream);
return Number(stream && stream.eof);
},
ferror__deps: ['$FS'],
ferror: function(stream) {
// int ferror(FILE *stream);
// http://pubs.opengroup.org/onlinepubs/000095399/functions/ferror.html
- stream = FS.getStream(stream);
+ stream = FS.getStreamFromPtr(stream);
return Number(stream && stream.error);
},
fflush__deps: ['$FS', '__setErrNo', '$ERRNO_CODES'],
@@ -2350,7 +2353,7 @@ LibraryManager.library = {
fgetc: function(stream) {
// int fgetc(FILE *stream);
// http://pubs.opengroup.org/onlinepubs/000095399/functions/fgetc.html
- var streamObj = FS.getStream(stream);
+ var streamObj = FS.getStreamFromPtr(stream);
if (!streamObj) return -1;
if (streamObj.eof || streamObj.error) return -1;
var ret = _fread(_fgetc.ret, 1, 1, stream);
@@ -2375,7 +2378,7 @@ LibraryManager.library = {
fgetpos: function(stream, pos) {
// int fgetpos(FILE *restrict stream, fpos_t *restrict pos);
// http://pubs.opengroup.org/onlinepubs/000095399/functions/fgetpos.html
- stream = FS.getStream(stream);
+ stream = FS.getStreamFromPtr(stream);
if (!stream) {
___setErrNo(ERRNO_CODES.EBADF);
return -1;
@@ -2393,7 +2396,7 @@ LibraryManager.library = {
fgets: function(s, n, stream) {
// char *fgets(char *restrict s, int n, FILE *restrict stream);
// http://pubs.opengroup.org/onlinepubs/000095399/functions/fgets.html
- var streamObj = FS.getStream(stream);
+ var streamObj = FS.getStreamFromPtr(stream);
if (!streamObj) return 0;
if (streamObj.error || streamObj.eof) return 0;
var byte_;
@@ -2417,8 +2420,7 @@ LibraryManager.library = {
fileno: function(stream) {
// int fileno(FILE *stream);
// http://pubs.opengroup.org/onlinepubs/000095399/functions/fileno.html
- // We use file descriptor numbers and FILE* streams interchangeably.
- return stream;
+ return FS.getStreamFromPtr(stream).fd;
},
ftrylockfile: function() {
// int ftrylockfile(FILE *file);
@@ -2460,19 +2462,20 @@ LibraryManager.library = {
___setErrNo(ERRNO_CODES.EINVAL);
return 0;
}
- var ret = _open(filename, flags, allocate([0x1FF, 0, 0, 0], 'i32', ALLOC_STACK)); // All creation permissions.
- return (ret == -1) ? 0 : ret;
+ var fd = _open(filename, flags, allocate([0x1FF, 0, 0, 0], 'i32', ALLOC_STACK)); // All creation permissions.
+ return fd === -1 ? 0 : FS.getPtrForStream(FS.getStream(fd));
},
- fputc__deps: ['$FS', 'write'],
+ fputc__deps: ['$FS', 'write', 'fileno'],
fputc__postset: '_fputc.ret = allocate([0], "i8", ALLOC_STATIC);',
fputc: function(c, stream) {
// int fputc(int c, FILE *stream);
// http://pubs.opengroup.org/onlinepubs/000095399/functions/fputc.html
var chr = unSign(c & 0xFF);
{{{ makeSetValue('_fputc.ret', '0', 'chr', 'i8') }}};
- var ret = _write(stream, _fputc.ret, 1);
+ var fd = _fileno(stream);
+ var ret = _write(fd, _fputc.ret, 1);
if (ret == -1) {
- var streamObj = FS.getStream(stream);
+ var streamObj = FS.getStreamFromPtr(stream);
if (streamObj) streamObj.error = true;
return -1;
} else {
@@ -2488,11 +2491,12 @@ LibraryManager.library = {
return _fputc(c, {{{ makeGetValue(makeGlobalUse('_stdout'), '0', 'void*') }}});
},
putchar_unlocked: 'putchar',
- fputs__deps: ['write', 'strlen'],
+ fputs__deps: ['write', 'strlen', 'fileno'],
fputs: function(s, stream) {
// int fputs(const char *restrict s, FILE *restrict stream);
// http://pubs.opengroup.org/onlinepubs/000095399/functions/fputs.html
- return _write(stream, s, _strlen(s));
+ var fd = _fileno(stream);
+ return _write(fd, s, _strlen(s));
},
puts__deps: ['fputs', 'fputc', 'stdout'],
puts: function(s) {
@@ -2517,7 +2521,7 @@ LibraryManager.library = {
return 0;
}
var bytesRead = 0;
- var streamObj = FS.getStream(stream);
+ var streamObj = FS.getStreamFromPtr(stream);
if (!streamObj) {
___setErrNo(ERRNO_CODES.EBADF);
return 0;
@@ -2527,7 +2531,7 @@ LibraryManager.library = {
bytesToRead--;
bytesRead++;
}
- var err = _read(stream, ptr, bytesToRead);
+ var err = _read(streamObj.fd, ptr, bytesToRead);
if (err == -1) {
if (streamObj) streamObj.error = true;
return 0;
@@ -2541,7 +2545,7 @@ LibraryManager.library = {
// FILE *freopen(const char *restrict filename, const char *restrict mode, FILE *restrict stream);
// http://pubs.opengroup.org/onlinepubs/000095399/functions/freopen.html
if (!filename) {
- var streamObj = FS.getStream(stream);
+ var streamObj = FS.getStreamFromPtr(stream);
if (!streamObj) {
___setErrNo(ERRNO_CODES.EBADF);
return 0;
@@ -2553,15 +2557,16 @@ LibraryManager.library = {
_fclose(stream);
return _fopen(filename, mode);
},
- fseek__deps: ['$FS', 'lseek'],
+ fseek__deps: ['$FS', 'lseek', 'fileno'],
fseek: function(stream, offset, whence) {
// int fseek(FILE *stream, long offset, int whence);
// http://pubs.opengroup.org/onlinepubs/000095399/functions/fseek.html
- var ret = _lseek(stream, offset, whence);
+ var fd = _fileno(stream);
+ var ret = _lseek(fd, offset, whence);
if (ret == -1) {
return -1;
}
- stream = FS.getStream(stream);
+ stream = FS.getStreamFromPtr(stream);
stream.eof = false;
return 0;
},
@@ -2570,7 +2575,7 @@ LibraryManager.library = {
fsetpos: function(stream, pos) {
// int fsetpos(FILE *stream, const fpos_t *pos);
// http://pubs.opengroup.org/onlinepubs/000095399/functions/fsetpos.html
- stream = FS.getStream(stream);
+ stream = FS.getStreamFromPtr(stream);
if (!stream) {
___setErrNo(ERRNO_CODES.EBADF);
return -1;
@@ -2589,7 +2594,7 @@ LibraryManager.library = {
ftell: function(stream) {
// long ftell(FILE *stream);
// http://pubs.opengroup.org/onlinepubs/000095399/functions/ftell.html
- stream = FS.getStream(stream);
+ stream = FS.getStreamFromPtr(stream);
if (!stream) {
___setErrNo(ERRNO_CODES.EBADF);
return -1;
@@ -2602,15 +2607,16 @@ LibraryManager.library = {
}
},
ftello: 'ftell',
- fwrite__deps: ['$FS', 'write'],
+ fwrite__deps: ['$FS', 'write', 'fileno'],
fwrite: function(ptr, size, nitems, stream) {
// size_t fwrite(const void *restrict ptr, size_t size, size_t nitems, FILE *restrict stream);
// http://pubs.opengroup.org/onlinepubs/000095399/functions/fwrite.html
var bytesToWrite = nitems * size;
if (bytesToWrite == 0) return 0;
- var bytesWritten = _write(stream, ptr, bytesToWrite);
+ var fd = _fileno(stream);
+ var bytesWritten = _write(fd, ptr, bytesToWrite);
if (bytesWritten == -1) {
- var streamObj = FS.getStream(stream);
+ var streamObj = FS.getStreamFromPtr(stream);
if (streamObj) streamObj.error = true;
return 0;
} else {
@@ -2673,7 +2679,7 @@ LibraryManager.library = {
// void rewind(FILE *stream);
// http://pubs.opengroup.org/onlinepubs/000095399/functions/rewind.html
_fseek(stream, 0, 0); // SEEK_SET.
- var streamObj = FS.getStream(stream);
+ var streamObj = FS.getStreamFromPtr(stream);
if (streamObj) streamObj.error = false;
},
setvbuf: function(stream, buf, type, size) {
@@ -2730,7 +2736,7 @@ LibraryManager.library = {
ungetc: function(c, stream) {
// int ungetc(int c, FILE *stream);
// http://pubs.opengroup.org/onlinepubs/000095399/functions/ungetc.html
- stream = FS.getStream(stream);
+ stream = FS.getStreamFromPtr(stream);
if (!stream) {
return -1;
}
@@ -2755,7 +2761,7 @@ LibraryManager.library = {
fscanf: function(stream, format, varargs) {
// int fscanf(FILE *restrict stream, const char *restrict format, ... );
// http://pubs.opengroup.org/onlinepubs/000095399/functions/scanf.html
- var streamObj = FS.getStream(stream);
+ var streamObj = FS.getStreamFromPtr(stream);
if (!streamObj) {
return -1;
}
@@ -2898,7 +2904,7 @@ LibraryManager.library = {
// ==========================================================================
mmap__deps: ['$FS'],
- mmap: function(start, num, prot, flags, stream, offset) {
+ mmap: function(start, num, prot, flags, fd, offset) {
/* FIXME: Since mmap is normally implemented at the kernel level,
* this implementation simply uses malloc underneath the call to
* mmap.
@@ -2909,13 +2915,13 @@ LibraryManager.library = {
if (!_mmap.mappings) _mmap.mappings = {};
- if (stream == -1) {
+ if (fd == -1) {
ptr = _malloc(num);
if (!ptr) return -1;
_memset(ptr, 0, num);
allocated = true;
} else {
- var info = FS.getStream(stream);
+ var info = FS.getStream(fd);
if (!info) return -1;
try {
var res = FS.mmap(info, HEAPU8, start, num, offset, prot, flags);
@@ -3229,22 +3235,34 @@ LibraryManager.library = {
strtoll: function(str, endptr, base) {
return __parseInt64(str, endptr, base, '-9223372036854775808', '9223372036854775807'); // LLONG_MIN, LLONG_MAX.
},
- strtoll_l: 'strtoll', // no locale support yet
+ strtoll_l__deps: ['strtoll'],
+ strtoll_l: function(str, endptr, base) {
+ return _strtoll(str, endptr, base); // no locale support yet
+ },
strtol__deps: ['_parseInt'],
strtol: function(str, endptr, base) {
return __parseInt(str, endptr, base, -2147483648, 2147483647, 32); // LONG_MIN, LONG_MAX.
},
- strtol_l: 'strtol', // no locale support yet
+ strtol_l__deps: ['strtol'],
+ strtol_l: function(str, endptr, base) {
+ return _strtol(str, endptr, base); // no locale support yet
+ },
strtoul__deps: ['_parseInt'],
strtoul: function(str, endptr, base) {
return __parseInt(str, endptr, base, 0, 4294967295, 32, true); // ULONG_MAX.
},
- strtoul_l: 'strtoul', // no locale support yet
+ strtoul_l__deps: ['strtoul'],
+ strtoul_l: function(str, endptr, base) {
+ return _strtoul(str, endptr, base); // no locale support yet
+ },
strtoull__deps: ['_parseInt64'],
strtoull: function(str, endptr, base) {
return __parseInt64(str, endptr, base, 0, '18446744073709551615', true); // ULONG_MAX.
},
- strtoull_l: 'strtoull', // no locale support yet
+ strtoull_l__deps: ['strtoull'],
+ strtoull_l: function(str, endptr, base) {
+ return _strtoull(str, endptr, base); // no locale support yet
+ },
atoi__deps: ['strtol'],
atoi: function(ptr) {
@@ -3435,13 +3453,25 @@ LibraryManager.library = {
return limit;
},
- // Use browser's Math.random(). We can't set a seed, though.
- srand: function(seed) {}, // XXX ignored
- rand: function() {
- return Math.floor(Math.random()*0x80000000);
+ __rand_seed: 'allocate([0x0273459b, 0, 0, 0], "i32", ALLOC_STATIC)',
+ srand__deps: ['__rand_seed'],
+ srand: function(seed) {
+ {{{ makeSetValue('___rand_seed', 0, 'seed', 'i32') }}}
},
- rand_r: function(seed) { // XXX ignores the seed
- return Math.floor(Math.random()*0x80000000);
+ rand_r__sig: 'ii',
+ rand_r__asm: true,
+ rand_r: function(seedp) {
+ seedp = seedp|0;
+ var val = 0;
+ val = ((Math_imul({{{ makeGetValueAsm('seedp', 0, 'i32') }}}, 31010991)|0) + 0x676e6177 ) & {{{ cDefine('RAND_MAX') }}}; // assumes RAND_MAX is in bit mask form (power of 2 minus 1)
+ {{{ makeSetValueAsm('seedp', 0, 'val', 'i32') }}};
+ return val|0;
+ },
+ rand__sig: 'i',
+ rand__asm: true,
+ rand__deps: ['rand_r', '__rand_seed'],
+ rand: function() {
+ return _rand_r(___rand_seed)|0;
},
drand48: function() {
@@ -3485,11 +3515,18 @@ LibraryManager.library = {
return ret;
},
+ emscripten_memcpy_big: function(dest, src, num) {
+ HEAPU8.set(HEAPU8.subarray(src, src+num), dest);
+ return dest;
+ },
+
memcpy__asm: true,
memcpy__sig: 'iiii',
+ memcpy__deps: ['emscripten_memcpy_big'],
memcpy: function(dest, src, num) {
dest = dest|0; src = src|0; num = num|0;
var ret = 0;
+ if ((num|0) >= 4096) return _emscripten_memcpy_big(dest|0, src|0, num|0)|0;
ret = dest|0;
if ((dest&3) == (src&3)) {
while (dest & 3) {
@@ -3729,76 +3766,6 @@ LibraryManager.library = {
return pdest;
},
- strcmp__deps: ['strncmp'],
- strcmp: function(px, py) {
- return _strncmp(px, py, TOTAL_MEMORY);
- },
- // We always assume ASCII locale.
- strcoll: 'strcmp',
- strcoll_l: 'strcmp',
-
- strcasecmp__asm: true,
- strcasecmp__sig: 'iii',
- strcasecmp__deps: ['strncasecmp'],
- strcasecmp: function(px, py) {
- px = px|0; py = py|0;
- return _strncasecmp(px, py, -1)|0;
- },
-
- strncmp: function(px, py, n) {
- var i = 0;
- while (i < n) {
- var x = {{{ makeGetValue('px', 'i', 'i8', 0, 1) }}};
- var y = {{{ makeGetValue('py', 'i', 'i8', 0, 1) }}};
- if (x == y && x == 0) return 0;
- if (x == 0) return -1;
- if (y == 0) return 1;
- if (x == y) {
- i ++;
- continue;
- } else {
- return x > y ? 1 : -1;
- }
- }
- return 0;
- },
-
- strncasecmp__asm: true,
- strncasecmp__sig: 'iiii',
- strncasecmp__deps: ['tolower'],
- strncasecmp: function(px, py, n) {
- px = px|0; py = py|0; n = n|0;
- var i = 0, x = 0, y = 0;
- while ((i>>>0) < (n>>>0)) {
- x = _tolower({{{ makeGetValueAsm('px', 'i', 'i8', 0, 1) }}})|0;
- y = _tolower({{{ makeGetValueAsm('py', 'i', 'i8', 0, 1) }}})|0;
- if (((x|0) == (y|0)) & ((x|0) == 0)) return 0;
- if ((x|0) == 0) return -1;
- if ((y|0) == 0) return 1;
- if ((x|0) == (y|0)) {
- i = (i + 1)|0;
- continue;
- } else {
- return ((x>>>0) > (y>>>0) ? 1 : -1)|0;
- }
- }
- return 0;
- },
-
- memcmp__asm: true,
- memcmp__sig: 'iiii',
- memcmp: function(p1, p2, num) {
- p1 = p1|0; p2 = p2|0; num = num|0;
- var i = 0, v1 = 0, v2 = 0;
- while ((i|0) < (num|0)) {
- v1 = {{{ makeGetValueAsm('p1', 'i', 'i8', true) }}};
- v2 = {{{ makeGetValueAsm('p2', 'i', 'i8', true) }}};
- if ((v1|0) != (v2|0)) return ((v1|0) > (v2|0) ? 1 : -1)|0;
- i = (i+1)|0;
- }
- return 0;
- },
-
memchr: function(ptr, chr, num) {
chr = unSign(chr);
for (var i = 0; i < num; i++) {
@@ -4000,7 +3967,10 @@ LibraryManager.library = {
}
},
_toupper: 'toupper',
- toupper_l: 'toupper',
+ toupper_l__deps: ['toupper'],
+ toupper_l: function(str, endptr, base) {
+ return _toupper(str, endptr, base); // no locale support yet
+ },
tolower__asm: true,
tolower__sig: 'ii',
@@ -4011,65 +3981,104 @@ LibraryManager.library = {
return (chr - {{{ charCode('A') }}} + {{{ charCode('a') }}})|0;
},
_tolower: 'tolower',
- tolower_l: 'tolower',
+ tolower_l__deps: ['tolower'],
+ tolower_l: function(chr) {
+ return _tolower(chr); // no locale support yet
+ },
// The following functions are defined as macros in glibc.
islower: function(chr) {
return chr >= {{{ charCode('a') }}} && chr <= {{{ charCode('z') }}};
},
- islower_l: 'islower',
+ islower_l__deps: ['islower'],
+ islower_l: function(chr) {
+ return _islower(chr); // no locale support yet
+ },
isupper: function(chr) {
return chr >= {{{ charCode('A') }}} && chr <= {{{ charCode('Z') }}};
},
- isupper_l: 'isupper',
+ isupper_l__deps: ['isupper'],
+ isupper_l: function(chr) {
+ return _isupper(chr); // no locale support yet
+ },
isalpha: function(chr) {
return (chr >= {{{ charCode('a') }}} && chr <= {{{ charCode('z') }}}) ||
(chr >= {{{ charCode('A') }}} && chr <= {{{ charCode('Z') }}});
},
- isalpha_l: 'isalpha',
+ isalpha_l__deps: ['isalpha'],
+ isalpha_l: function(chr) {
+ return _isalpha(chr); // no locale support yet
+ },
isdigit: function(chr) {
return chr >= {{{ charCode('0') }}} && chr <= {{{ charCode('9') }}};
},
- isdigit_l: 'isdigit',
+ isdigit_l__deps: ['isdigit'],
+ isdigit_l: function(chr) {
+ return _isdigit(chr); // no locale support yet
+ },
isxdigit: function(chr) {
return (chr >= {{{ charCode('0') }}} && chr <= {{{ charCode('9') }}}) ||
(chr >= {{{ charCode('a') }}} && chr <= {{{ charCode('f') }}}) ||
(chr >= {{{ charCode('A') }}} && chr <= {{{ charCode('F') }}});
},
- isxdigit_l: 'isxdigit',
+ isxdigit_l__deps: ['isxdigit'],
+ isxdigit_l: function(chr) {
+ return _isxdigit(chr); // no locale support yet
+ },
isalnum: function(chr) {
return (chr >= {{{ charCode('0') }}} && chr <= {{{ charCode('9') }}}) ||
(chr >= {{{ charCode('a') }}} && chr <= {{{ charCode('z') }}}) ||
(chr >= {{{ charCode('A') }}} && chr <= {{{ charCode('Z') }}});
},
- isalnum_l: 'isalnum',
+ isalnum_l__deps: ['isalnum'],
+ isalnum_l: function(chr) {
+ return _isalnum(chr); // no locale support yet
+ },
ispunct: function(chr) {
return (chr >= {{{ charCode('!') }}} && chr <= {{{ charCode('/') }}}) ||
(chr >= {{{ charCode(':') }}} && chr <= {{{ charCode('@') }}}) ||
(chr >= {{{ charCode('[') }}} && chr <= {{{ charCode('`') }}}) ||
(chr >= {{{ charCode('{') }}} && chr <= {{{ charCode('~') }}});
},
- ispunct_l: 'ispunct',
+ ispunct_l__deps: ['ispunct'],
+ ispunct_l: function(chr) {
+ return _ispunct(chr); // no locale support yet
+ },
isspace: function(chr) {
return (chr == 32) || (chr >= 9 && chr <= 13);
},
- isspace_l: 'isspace',
+ isspace_l__deps: ['isspace'],
+ isspace_l: function(chr) {
+ return _isspace(chr); // no locale support yet
+ },
isblank: function(chr) {
return chr == {{{ charCode(' ') }}} || chr == {{{ charCode('\t') }}};
},
- isblank_l: 'isblank',
+ isblank_l__deps: ['isblank'],
+ isblank_l: function(chr) {
+ return _isblank(chr); // no locale support yet
+ },
iscntrl: function(chr) {
return (0 <= chr && chr <= 0x1F) || chr === 0x7F;
},
- iscntrl_l: 'iscntrl',
+ iscntrl_l__deps: ['iscntrl'],
+ iscntrl_l: function(chr) {
+ return _iscntrl(chr); // no locale support yet
+ },
isprint: function(chr) {
return 0x1F < chr && chr < 0x7F;
},
- isprint_l: 'isprint',
+ isprint_l__deps: ['isprint'],
+ isprint_l: function(chr) {
+ return _isprint(chr); // no locale support yet
+ },
isgraph: function(chr) {
return 0x20 < chr && chr < 0x7F;
},
- isgraph_l: 'isgraph',
+ isgraph_l__deps: ['isgraph'],
+ isgraph_l: function(chr) {
+ return _isgraph(chr); // no locale support yet
+ },
// Lookup tables for glibc ctype implementation.
__ctype_b_loc: function() {
// http://refspecs.freestandards.org/LSB_3.0.0/LSB-Core-generic/LSB-Core-generic/baselib---ctype-b-loc.html
@@ -4609,6 +4618,8 @@ LibraryManager.library = {
_ZTIv: [0], // void
_ZTIPv: [0], // void*
+ _ZTISt9exception: [0], // typeinfo for std::exception
+
llvm_uadd_with_overflow_i8: function(x, y) {
x = x & 0xff;
y = y & 0xff;
@@ -5887,7 +5898,10 @@ LibraryManager.library = {
writeArrayToMemory(bytes, s);
return bytes.length-1;
},
- strftime_l: 'strftime', // no locale support yet
+ strftime_l__deps: ['strftime'],
+ strftime_l: function(s, maxsize, format, tm) {
+ return _strftime(s, maxsize, format, tm); // no locale support yet
+ },
strptime__deps: ['_isLeapYear', '_arraySum', '_addDays', '_MONTH_DAYS_REGULAR', '_MONTH_DAYS_LEAP'],
strptime: function(buf, format, tm) {
@@ -6129,7 +6143,10 @@ LibraryManager.library = {
return 0;
},
- strptime_l: 'strptime', // no locale support yet
+ strptime_l__deps: ['strptime'],
+ strptime_l: function(buf, format, tm) {
+ return _strptime(buf, format, tm); // no locale support yet
+ },
getdate: function(string) {
// struct tm *getdate(const char *string);
@@ -7342,20 +7359,10 @@ LibraryManager.library = {
// netinet/in.h
// ==========================================================================
- _in6addr_any:
+ in6addr_any:
'allocate([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], "i8", ALLOC_STATIC)',
- _in6addr_loopback:
+ in6addr_loopback:
'allocate([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1], "i8", ALLOC_STATIC)',
- _in6addr_linklocal_allnodes:
- 'allocate([255,2,0,0,0,0,0,0,0,0,0,0,0,0,0,1], "i8", ALLOC_STATIC)',
- _in6addr_linklocal_allrouters:
- 'allocate([255,2,0,0,0,0,0,0,0,0,0,0,0,0,0,2], "i8", ALLOC_STATIC)',
- _in6addr_interfacelocal_allnodes:
- 'allocate([255,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1], "i8", ALLOC_STATIC)',
- _in6addr_interfacelocal_allrouters:
- 'allocate([255,1,0,0,0,0,0,0,0,0,0,0,0,0,0,2], "i8", ALLOC_STATIC)',
- _in6addr_sitelocal_allrouters:
- 'allocate([255,5,0,0,0,0,0,0,0,0,0,0,0,0,0,2], "i8", ALLOC_STATIC)',
// ==========================================================================
// netdb.h
diff --git a/src/library_browser.js b/src/library_browser.js
index 458a8dd2..5d53b867 100644
--- a/src/library_browser.js
+++ b/src/library_browser.js
@@ -13,6 +13,7 @@ mergeInto(LibraryManager.library, {
$Browser: {
mainLoop: {
scheduler: null,
+ method: '',
shouldPause: false,
paused: false,
queue: [],
@@ -784,6 +785,11 @@ mergeInto(LibraryManager.library, {
GL.newRenderingFrameStarted();
#endif
+ if (Browser.mainLoop.method === 'timeout' && Module.ctx) {
+ Module.printErr('Looks like you are rendering without using requestAnimationFrame for the main loop. You should use 0 for the frame rate in emscripten_set_main_loop in order to use requestAnimationFrame, as that can greatly improve your frame rates!');
+ Browser.mainLoop.method = ''; // just warn once per call to set main loop
+ }
+
if (Module['preMainLoop']) {
Module['preMainLoop']();
}
@@ -814,11 +820,13 @@ mergeInto(LibraryManager.library, {
if (fps && fps > 0) {
Browser.mainLoop.scheduler = function Browser_mainLoop_scheduler() {
setTimeout(Browser.mainLoop.runner, 1000/fps); // doing this each time means that on exception, we stop
- }
+ };
+ Browser.mainLoop.method = 'timeout';
} else {
Browser.mainLoop.scheduler = function Browser_mainLoop_scheduler() {
Browser.requestAnimationFrame(Browser.mainLoop.runner);
- }
+ };
+ Browser.mainLoop.method = 'rAF';
}
Browser.mainLoop.scheduler();
diff --git a/src/library_egl.js b/src/library_egl.js
index 11cf8951..69dd266d 100644
--- a/src/library_egl.js
+++ b/src/library_egl.js
@@ -555,7 +555,7 @@ var LibraryEGL = {
eglGetProcAddress__deps: ['emscripten_GetProcAddress'],
eglGetProcAddress: function(name_) {
- return _emscripten_GetProcAddress(Pointer_stringify(name_));
+ return _emscripten_GetProcAddress(name_);
},
};
diff --git a/src/library_fs.js b/src/library_fs.js
index e6b060f6..e97ba588 100644
--- a/src/library_fs.js
+++ b/src/library_fs.js
@@ -16,7 +16,7 @@ mergeInto(LibraryManager.library, {
root: null,
mounts: [],
devices: [null],
- streams: [null],
+ streams: [],
nextInode: 1,
nameTable: null,
currentPath: '/',
@@ -40,7 +40,17 @@ mergeInto(LibraryManager.library, {
//
lookupPath: function(path, opts) {
path = PATH.resolve(FS.cwd(), path);
- opts = opts || { recurse_count: 0 };
+ opts = opts || {};
+
+ var defaults = {
+ follow_mount: true,
+ recurse_count: 0
+ };
+ for (var key in defaults) {
+ if (opts[key] === undefined) {
+ opts[key] = defaults[key];
+ }
+ }
if (opts.recurse_count > 8) { // max recursive lookup of 8
throw new FS.ErrnoError(ERRNO_CODES.ELOOP);
@@ -67,10 +77,11 @@ mergeInto(LibraryManager.library, {
// jump to the mount's root node if this is a mountpoint
if (FS.isMountpoint(current)) {
- current = current.mount.root;
+ if (!islast || (islast && opts.follow_mount)) {
+ current = current.mounted.root;
+ }
}
- // follow symlinks
// by default, lookupPath will not follow a symlink if it is the final path component.
// setting opts.follow = true will override this behavior.
if (!islast || opts.follow) {
@@ -163,28 +174,26 @@ mergeInto(LibraryManager.library, {
createNode: function(parent, name, mode, rdev) {
if (!FS.FSNode) {
FS.FSNode = function(parent, name, mode, rdev) {
+ if (!parent) {
+ parent = this; // root node sets parent to itself
+ }
+ this.parent = parent;
+ this.mount = parent.mount;
+ this.mounted = null;
this.id = FS.nextInode++;
this.name = name;
this.mode = mode;
this.node_ops = {};
this.stream_ops = {};
this.rdev = rdev;
- this.parent = null;
- this.mount = null;
- if (!parent) {
- parent = this; // root node sets parent to itself
- }
- this.parent = parent;
- this.mount = parent.mount;
- FS.hashAddNode(this);
};
+ FS.FSNode.prototype = {};
+
// compatibility
var readMode = {{{ cDefine('S_IRUGO') }}} | {{{ cDefine('S_IXUGO') }}};
var writeMode = {{{ cDefine('S_IWUGO') }}};
- FS.FSNode.prototype = {};
-
// NOTE we must use Object.defineProperties instead of individual calls to
// Object.defineProperty in order to make closure compiler happy
Object.defineProperties(FS.FSNode.prototype, {
@@ -204,7 +213,12 @@ mergeInto(LibraryManager.library, {
},
});
}
- return new FS.FSNode(parent, name, mode, rdev);
+
+ var node = new FS.FSNode(parent, name, mode, rdev);
+
+ FS.hashAddNode(node);
+
+ return node;
},
destroyNode: function(node) {
FS.hashRemoveNode(node);
@@ -213,7 +227,7 @@ mergeInto(LibraryManager.library, {
return node === node.parent;
},
isMountpoint: function(node) {
- return node.mounted;
+ return !!node.mounted;
},
isFile: function(mode) {
return (mode & {{{ cDefine('S_IFMT') }}}) === {{{ cDefine('S_IFREG') }}};
@@ -344,7 +358,7 @@ mergeInto(LibraryManager.library, {
//
MAX_OPEN_FDS: 4096,
nextfd: function(fd_start, fd_end) {
- fd_start = fd_start || 1;
+ fd_start = fd_start || 0;
fd_end = fd_end || FS.MAX_OPEN_FDS;
for (var fd = fd_start; fd <= fd_end; fd++) {
if (!FS.streams[fd]) {
@@ -400,6 +414,22 @@ mergeInto(LibraryManager.library, {
},
//
+ // file pointers
+ //
+ // instead of maintaining a separate mapping from FILE* to file descriptors,
+ // we employ a simple trick: the pointer to a stream is its fd plus 1. This
+ // means that all valid streams have a valid non-zero pointer while allowing
+ // the fs for stdin to be the standard value of zero.
+ //
+ //
+ getStreamFromPtr: function(ptr) {
+ return FS.streams[ptr - 1];
+ },
+ getPtrForStream: function(stream) {
+ return stream ? stream.fd + 1 : 0;
+ },
+
+ //
// devices
//
// each character device consists of a device id + stream operations.
@@ -441,61 +471,131 @@ mergeInto(LibraryManager.library, {
//
// core
//
+ getMounts: function(mount) {
+ var mounts = [];
+ var check = [mount];
+
+ while (check.length) {
+ var m = check.pop();
+
+ mounts.push(m);
+
+ check.push.apply(check, m.mounts);
+ }
+
+ return mounts;
+ },
syncfs: function(populate, callback) {
if (typeof(populate) === 'function') {
callback = populate;
populate = false;
}
+ var mounts = FS.getMounts(FS.root.mount);
var completed = 0;
- var total = FS.mounts.length;
+
function done(err) {
if (err) {
- return callback(err);
+ if (!done.errored) {
+ done.errored = true;
+ return callback(err);
+ }
+ return;
}
- if (++completed >= total) {
+ if (++completed >= mounts.length) {
callback(null);
}
};
// sync all mounts
- for (var i = 0; i < FS.mounts.length; i++) {
- var mount = FS.mounts[i];
+ mounts.forEach(function (mount) {
if (!mount.type.syncfs) {
- done(null);
- continue;
+ return done(null);
}
mount.type.syncfs(mount, populate, done);
- }
+ });
},
mount: function(type, opts, mountpoint) {
- var lookup;
- if (mountpoint) {
- lookup = FS.lookupPath(mountpoint, { follow: false });
+ var root = mountpoint === '/';
+ var pseudo = !mountpoint;
+ var node;
+
+ if (root && FS.root) {
+ throw new FS.ErrnoError(ERRNO_CODES.EBUSY);
+ } else if (!root && !pseudo) {
+ var lookup = FS.lookupPath(mountpoint, { follow_mount: false });
+
mountpoint = lookup.path; // use the absolute path
+ node = lookup.node;
+
+ if (FS.isMountpoint(node)) {
+ throw new FS.ErrnoError(ERRNO_CODES.EBUSY);
+ }
+
+ if (!FS.isDir(node.mode)) {
+ throw new FS.ErrnoError(ERRNO_CODES.ENOTDIR);
+ }
}
+
var mount = {
type: type,
opts: opts,
mountpoint: mountpoint,
- root: null
+ mounts: []
};
+
// create a root node for the fs
- var root = type.mount(mount);
- root.mount = mount;
- mount.root = root;
- // assign the mount info to the mountpoint's node
- if (lookup) {
- lookup.node.mount = mount;
- lookup.node.mounted = true;
- // compatibility update FS.root if we mount to /
- if (mountpoint === '/') {
- FS.root = mount.root;
+ var mountRoot = type.mount(mount);
+ mountRoot.mount = mount;
+ mount.root = mountRoot;
+
+ if (root) {
+ FS.root = mountRoot;
+ } else if (node) {
+ // set as a mountpoint
+ node.mounted = mount;
+
+ // add the new mount to the current mount's children
+ if (node.mount) {
+ node.mount.mounts.push(mount);
}
}
- // add to our cached list of mounts
- FS.mounts.push(mount);
- return root;
+
+ return mountRoot;
+ },
+ unmount: function (mountpoint) {
+ var lookup = FS.lookupPath(mountpoint, { follow_mount: false });
+
+ if (!FS.isMountpoint(lookup.node)) {
+ throw new FS.ErrnoError(ERRNO_CODES.EINVAL);
+ }
+
+ // destroy the nodes for this mount, and all its child mounts
+ var node = lookup.node;
+ var mount = node.mounted;
+ var mounts = FS.getMounts(mount);
+
+ Object.keys(FS.nameTable).forEach(function (hash) {
+ var current = FS.nameTable[hash];
+
+ while (current) {
+ var next = current.name_next;
+
+ if (mounts.indexOf(current.mount) !== -1) {
+ FS.destroyNode(current);
+ }
+
+ current = next;
+ }
+ });
+
+ // no longer a mountpoint
+ node.mounted = null;
+
+ // remove this mount from the child mounts
+ var idx = node.mount.mounts.indexOf(mount);
+ assert(idx !== -1);
+ node.mount.mounts.splice(idx, 1);
},
lookup: function(parent, name) {
return parent.node_ops.lookup(parent, name);
@@ -677,7 +777,7 @@ mergeInto(LibraryManager.library, {
FS.destroyNode(node);
},
readlink: function(path) {
- var lookup = FS.lookupPath(path, { follow: false });
+ var lookup = FS.lookupPath(path);
var link = lookup.node;
if (!link.node_ops.readlink) {
throw new FS.ErrnoError(ERRNO_CODES.EINVAL);
@@ -975,6 +1075,9 @@ mergeInto(LibraryManager.library, {
opts = opts || {};
opts.flags = opts.flags || 'r';
opts.encoding = opts.encoding || 'binary';
+ if (opts.encoding !== 'utf8' && opts.encoding !== 'binary') {
+ throw new Error('Invalid encoding type "' + opts.encoding + '"');
+ }
var ret;
var stream = FS.open(path, opts.flags);
var stat = FS.stat(path);
@@ -989,8 +1092,6 @@ mergeInto(LibraryManager.library, {
}
} else if (opts.encoding === 'binary') {
ret = buf;
- } else {
- throw new Error('Invalid encoding type "' + opts.encoding + '"');
}
FS.close(stream);
return ret;
@@ -999,15 +1100,16 @@ mergeInto(LibraryManager.library, {
opts = opts || {};
opts.flags = opts.flags || 'w';
opts.encoding = opts.encoding || 'utf8';
+ if (opts.encoding !== 'utf8' && opts.encoding !== 'binary') {
+ throw new Error('Invalid encoding type "' + opts.encoding + '"');
+ }
var stream = FS.open(path, opts.flags, opts.mode);
if (opts.encoding === 'utf8') {
var utf8 = new Runtime.UTF8Processor();
var buf = new Uint8Array(utf8.processJSString(data));
- FS.write(stream, buf, 0, buf.length, 0);
+ FS.write(stream, buf, 0, buf.length, 0, opts.canOwn);
} else if (opts.encoding === 'binary') {
- FS.write(stream, data, 0, data.length, 0);
- } else {
- throw new Error('Invalid encoding type "' + opts.encoding + '"');
+ FS.write(stream, data, 0, data.length, 0, opts.canOwn);
}
FS.close(stream);
},
@@ -1080,16 +1182,16 @@ mergeInto(LibraryManager.library, {
// open default streams for the stdin, stdout and stderr devices
var stdin = FS.open('/dev/stdin', 'r');
- {{{ makeSetValue(makeGlobalUse('_stdin'), 0, 'stdin.fd', 'void*') }}};
- assert(stdin.fd === 1, 'invalid handle for stdin (' + stdin.fd + ')');
+ {{{ makeSetValue(makeGlobalUse('_stdin'), 0, 'FS.getPtrForStream(stdin)', 'void*') }}};
+ assert(stdin.fd === 0, 'invalid handle for stdin (' + stdin.fd + ')');
var stdout = FS.open('/dev/stdout', 'w');
- {{{ makeSetValue(makeGlobalUse('_stdout'), 0, 'stdout.fd', 'void*') }}};
- assert(stdout.fd === 2, 'invalid handle for stdout (' + stdout.fd + ')');
+ {{{ makeSetValue(makeGlobalUse('_stdout'), 0, 'FS.getPtrForStream(stdout)', 'void*') }}};
+ assert(stdout.fd === 1, 'invalid handle for stdout (' + stdout.fd + ')');
var stderr = FS.open('/dev/stderr', 'w');
- {{{ makeSetValue(makeGlobalUse('_stderr'), 0, 'stderr.fd', 'void*') }}};
- assert(stderr.fd === 3, 'invalid handle for stderr (' + stderr.fd + ')');
+ {{{ makeSetValue(makeGlobalUse('_stderr'), 0, 'FS.getPtrForStream(stderr)', 'void*') }}};
+ assert(stderr.fd === 2, 'invalid handle for stderr (' + stderr.fd + ')');
},
ensureErrnoError: function() {
if (FS.ErrnoError) return;
@@ -1119,7 +1221,6 @@ mergeInto(LibraryManager.library, {
FS.nameTable = new Array(4096);
- FS.root = FS.createNode(null, '/', {{{ cDefine('S_IFDIR') }}} | 0777, 0);
FS.mount(MEMFS, {}, '/');
FS.createDefaultDirectories();
diff --git a/src/library_gl.js b/src/library_gl.js
index 0a30292a..e3442a8a 100644
--- a/src/library_gl.js
+++ b/src/library_gl.js
@@ -210,6 +210,7 @@ var LibraryGL = {
}
},
+#if LEGACY_GL_EMULATION
// Find a token in a shader source string
findToken: function(source, token) {
function isIdentChar(ch) {
@@ -238,6 +239,7 @@ var LibraryGL = {
} while (true);
return false;
},
+#endif
getSource: function(shader, count, string, length) {
var source = '';
@@ -255,6 +257,7 @@ var LibraryGL = {
}
source += frag;
}
+#if LEGACY_GL_EMULATION
// Let's see if we need to enable the standard derivatives extension
type = GLctx.getShaderParameter(GL.shaders[shader], 0x8B4F /* GL_SHADER_TYPE */);
if (type == 0x8B30 /* GL_FRAGMENT_SHADER */) {
@@ -270,6 +273,7 @@ var LibraryGL = {
#endif
}
}
+#endif
return source;
},
@@ -879,12 +883,12 @@ var LibraryGL = {
glGetTexParameterfv__sig: 'viii',
glGetTexParameterfv: function(target, pname, params) {
- {{{ makeSetValue('params', '0', 'Module.getTexParameter(target, pname)', 'float') }}};
+ {{{ makeSetValue('params', '0', 'GLctx.getTexParameter(target, pname)', 'float') }}};
},
glGetTexParameteriv__sig: 'viii',
glGetTexParameteriv: function(target, pname, params) {
- {{{ makeSetValue('params', '0', 'Module.getTexParameter(target, pname)', 'i32') }}};
+ {{{ makeSetValue('params', '0', 'GLctx.getTexParameter(target, pname)', 'i32') }}};
},
glTexParameterfv__sig: 'viii',
@@ -1544,9 +1548,7 @@ var LibraryGL = {
#endif
var log = GLctx.getShaderInfoLog(GL.shaders[shader]);
// Work around a bug in Chromium which causes getShaderInfoLog to return null
- if (!log) {
- log = "";
- }
+ if (!log) log = '(unknown error)';
log = log.substr(0, maxLength - 1);
writeStringToMemory(log, infoLog);
if (length) {
@@ -1560,7 +1562,10 @@ var LibraryGL = {
GL.validateGLObjectID(GL.shaders, shader, 'glGetShaderiv', 'shader');
#endif
if (pname == 0x8B84) { // GL_INFO_LOG_LENGTH
- {{{ makeSetValue('p', '0', 'GLctx.getShaderInfoLog(GL.shaders[shader]).length + 1', 'i32') }}};
+ var log = GLctx.getShaderInfoLog(GL.shaders[shader]);
+ // Work around a bug in Chromium which causes getShaderInfoLog to return null
+ if (!log) log = '(unknown error)';
+ {{{ makeSetValue('p', '0', 'log.length + 1', 'i32') }}};
} else {
{{{ makeSetValue('p', '0', 'GLctx.getShaderParameter(GL.shaders[shader], pname)', 'i32') }}};
}
@@ -1849,7 +1854,7 @@ var LibraryGL = {
};
var glEnable = _glEnable;
- _glEnable = function _glEnable(cap) {
+ _glEnable = _emscripten_glEnable = function _glEnable(cap) {
// Clean up the renderer on any change to the rendering state. The optimization of
// skipping renderer setup is aimed at the case of multiple glDraw* right after each other
if (GLImmediate.lastRenderer) GLImmediate.lastRenderer.cleanup();
@@ -1874,7 +1879,7 @@ var LibraryGL = {
};
var glDisable = _glDisable;
- _glDisable = function _glDisable(cap) {
+ _glDisable = _emscripten_glDisable = function _glDisable(cap) {
if (GLImmediate.lastRenderer) GLImmediate.lastRenderer.cleanup();
if (cap == 0x0B60 /* GL_FOG */) {
if (GLEmulation.fogEnabled != false) {
@@ -1895,7 +1900,7 @@ var LibraryGL = {
}
glDisable(cap);
};
- _glIsEnabled = function _glIsEnabled(cap) {
+ _glIsEnabled = _emscripten_glIsEnabled = function _glIsEnabled(cap) {
if (cap == 0x0B60 /* GL_FOG */) {
return GLEmulation.fogEnabled ? 1 : 0;
} else if (!(cap in validCapabilities)) {
@@ -1905,7 +1910,7 @@ var LibraryGL = {
};
var glGetBooleanv = _glGetBooleanv;
- _glGetBooleanv = function _glGetBooleanv(pname, p) {
+ _glGetBooleanv = _emscripten_glGetBooleanv = function _glGetBooleanv(pname, p) {
var attrib = GLEmulation.getAttributeFromCapability(pname);
if (attrib !== null) {
var result = GLImmediate.enabledClientAttributes[attrib];
@@ -1916,7 +1921,7 @@ var LibraryGL = {
};
var glGetIntegerv = _glGetIntegerv;
- _glGetIntegerv = function _glGetIntegerv(pname, params) {
+ _glGetIntegerv = _emscripten_glGetIntegerv = function _glGetIntegerv(pname, params) {
switch (pname) {
case 0x84E2: pname = GLctx.MAX_TEXTURE_IMAGE_UNITS /* fake it */; break; // GL_MAX_TEXTURE_UNITS
case 0x8B4A: { // GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB
@@ -1985,7 +1990,7 @@ var LibraryGL = {
};
var glGetString = _glGetString;
- _glGetString = function _glGetString(name_) {
+ _glGetString = _emscripten_glGetString = function _glGetString(name_) {
if (GL.stringCache[name_]) return GL.stringCache[name_];
switch(name_) {
case 0x1F03 /* GL_EXTENSIONS */: // Add various extensions that we can support
@@ -2009,7 +2014,7 @@ var LibraryGL = {
GL.shaderOriginalSources = {};
#endif
var glCreateShader = _glCreateShader;
- _glCreateShader = function _glCreateShader(shaderType) {
+ _glCreateShader = _emscripten_glCreateShader = function _glCreateShader(shaderType) {
var id = glCreateShader(shaderType);
GL.shaderInfos[id] = {
type: shaderType,
@@ -2026,7 +2031,7 @@ var LibraryGL = {
}
var glShaderSource = _glShaderSource;
- _glShaderSource = function _glShaderSource(shader, count, string, length) {
+ _glShaderSource = _emscripten_glShaderSource = function _glShaderSource(shader, count, string, length) {
var source = GL.getSource(shader, count, string, length);
#if GL_DEBUG
console.log("glShaderSource: Input: \n" + source);
@@ -2140,7 +2145,7 @@ var LibraryGL = {
};
var glCompileShader = _glCompileShader;
- _glCompileShader = function _glCompileShader(shader) {
+ _glCompileShader = _emscripten_glCompileShader = function _glCompileShader(shader) {
GLctx.compileShader(GL.shaders[shader]);
#if GL_DEBUG
if (!GLctx.getShaderParameter(GL.shaders[shader], GLctx.COMPILE_STATUS)) {
@@ -2155,14 +2160,14 @@ var LibraryGL = {
GL.programShaders = {};
var glAttachShader = _glAttachShader;
- _glAttachShader = function _glAttachShader(program, shader) {
+ _glAttachShader = _emscripten_glAttachShader = function _glAttachShader(program, shader) {
if (!GL.programShaders[program]) GL.programShaders[program] = [];
GL.programShaders[program].push(shader);
glAttachShader(program, shader);
};
var glDetachShader = _glDetachShader;
- _glDetachShader = function _glDetachShader(program, shader) {
+ _glDetachShader = _emscripten_glDetachShader = function _glDetachShader(program, shader) {
var programShader = GL.programShaders[program];
if (!programShader) {
Module.printErr('WARNING: _glDetachShader received invalid program: ' + program);
@@ -2174,7 +2179,7 @@ var LibraryGL = {
};
var glUseProgram = _glUseProgram;
- _glUseProgram = function _glUseProgram(program) {
+ _glUseProgram = _emscripten_glUseProgram = function _glUseProgram(program) {
#if GL_DEBUG
if (GL.debug) {
Module.printErr('[using program with shaders]');
@@ -2195,7 +2200,7 @@ var LibraryGL = {
}
var glDeleteProgram = _glDeleteProgram;
- _glDeleteProgram = function _glDeleteProgram(program) {
+ _glDeleteProgram = _emscripten_glDeleteProgram = function _glDeleteProgram(program) {
glDeleteProgram(program);
if (program == GL.currProgram) {
GLImmediate.currentRenderer = null; // This changes the FFP emulation shader program, need to recompute that.
@@ -2206,12 +2211,12 @@ var LibraryGL = {
// If attribute 0 was not bound, bind it to 0 for WebGL performance reasons. Track if 0 is free for that.
var zeroUsedPrograms = {};
var glBindAttribLocation = _glBindAttribLocation;
- _glBindAttribLocation = function _glBindAttribLocation(program, index, name) {
+ _glBindAttribLocation = _emscripten_glBindAttribLocation = function _glBindAttribLocation(program, index, name) {
if (index == 0) zeroUsedPrograms[program] = true;
glBindAttribLocation(program, index, name);
};
var glLinkProgram = _glLinkProgram;
- _glLinkProgram = function _glLinkProgram(program) {
+ _glLinkProgram = _emscripten_glLinkProgram = function _glLinkProgram(program) {
if (!(program in zeroUsedPrograms)) {
GLctx.bindAttribLocation(GL.programs[program], 0, 'a_position');
}
@@ -2219,7 +2224,7 @@ var LibraryGL = {
};
var glBindBuffer = _glBindBuffer;
- _glBindBuffer = function _glBindBuffer(target, buffer) {
+ _glBindBuffer = _emscripten_glBindBuffer = function _glBindBuffer(target, buffer) {
glBindBuffer(target, buffer);
if (target == GLctx.ARRAY_BUFFER) {
if (GLEmulation.currentVao) {
@@ -2234,7 +2239,7 @@ var LibraryGL = {
};
var glGetFloatv = _glGetFloatv;
- _glGetFloatv = function _glGetFloatv(pname, params) {
+ _glGetFloatv = _emscripten_glGetFloatv = function _glGetFloatv(pname, params) {
if (pname == 0x0BA6) { // GL_MODELVIEW_MATRIX
HEAPF32.set(GLImmediate.matrix[0/*m*/], params >> 2);
} else if (pname == 0x0BA7) { // GL_PROJECTION_MATRIX
@@ -2257,7 +2262,7 @@ var LibraryGL = {
};
var glHint = _glHint;
- _glHint = function _glHint(target, mode) {
+ _glHint = _emscripten_glHint = function _glHint(target, mode) {
if (target == 0x84EF) { // GL_TEXTURE_COMPRESSION_HINT
return;
}
@@ -2265,21 +2270,21 @@ var LibraryGL = {
};
var glEnableVertexAttribArray = _glEnableVertexAttribArray;
- _glEnableVertexAttribArray = function _glEnableVertexAttribArray(index) {
+ _glEnableVertexAttribArray = _emscripten_glEnableVertexAttribArray = function _glEnableVertexAttribArray(index) {
glEnableVertexAttribArray(index);
GLEmulation.enabledVertexAttribArrays[index] = 1;
if (GLEmulation.currentVao) GLEmulation.currentVao.enabledVertexAttribArrays[index] = 1;
};
var glDisableVertexAttribArray = _glDisableVertexAttribArray;
- _glDisableVertexAttribArray = function _glDisableVertexAttribArray(index) {
+ _glDisableVertexAttribArray = _emscripten_glDisableVertexAttribArray = function _glDisableVertexAttribArray(index) {
glDisableVertexAttribArray(index);
delete GLEmulation.enabledVertexAttribArrays[index];
if (GLEmulation.currentVao) delete GLEmulation.currentVao.enabledVertexAttribArrays[index];
};
var glVertexAttribPointer = _glVertexAttribPointer;
- _glVertexAttribPointer = function _glVertexAttribPointer(index, size, type, normalized, stride, pointer) {
+ _glVertexAttribPointer = _emscripten_glVertexAttribPointer = function _glVertexAttribPointer(index, size, type, normalized, stride, pointer) {
glVertexAttribPointer(index, size, type, normalized, stride, pointer);
if (GLEmulation.currentVao) { // TODO: avoid object creation here? likely not hot though
GLEmulation.currentVao.vertexAttribPointers[index] = [index, size, type, normalized, stride, pointer];
@@ -2311,6 +2316,7 @@ var LibraryGL = {
glGetShaderPrecisionFormat__sig: 'v',
glGetShaderPrecisionFormat: function() { throw 'glGetShaderPrecisionFormat: TODO' },
+ glDeleteObject__deps: ['glDeleteProgram', 'glDeleteShader'],
glDeleteObject__sig: 'vi',
glDeleteObject: function(id) {
if (GL.programs[id]) {
@@ -2321,8 +2327,10 @@ var LibraryGL = {
Module.printErr('WARNING: deleteObject received invalid id: ' + id);
}
},
+ glDeleteObjectARB: 'glDeleteObject',
glGetObjectParameteriv__sig: 'viii',
+ glGetObjectParameteriv__deps: ['glGetProgramiv', 'glGetShaderiv'],
glGetObjectParameteriv: function(id, type, result) {
if (GL.programs[id]) {
if (type == 0x8B84) { // GL_OBJECT_INFO_LOG_LENGTH_ARB
@@ -2343,7 +2351,9 @@ var LibraryGL = {
Module.printErr('WARNING: getObjectParameteriv received invalid id: ' + id);
}
},
+ glGetObjectParameterivARB: 'glGetObjectParameteriv',
+ glGetInfoLog__deps: ['glGetProgramInfoLog', 'glGetShaderInfoLog'],
glGetInfoLog__sig: 'viiii',
glGetInfoLog: function(id, maxLength, length, infoLog) {
if (GL.programs[id]) {
@@ -2354,6 +2364,7 @@ var LibraryGL = {
Module.printErr('WARNING: getObjectParameteriv received invalid id: ' + id);
}
},
+ glGetInfoLogARB: 'glGetInfoLog',
glBindProgram__sig: 'vii',
glBindProgram: function(type, id) {
@@ -2361,6 +2372,7 @@ var LibraryGL = {
assert(id == 0);
#endif
},
+ glBindProgramARB: 'glBindProgram',
glGetPointerv: function(name, p) {
var attribute;
@@ -4108,7 +4120,7 @@ var LibraryGL = {
// Replace some functions with immediate-mode aware versions. If there are no client
// attributes enabled, and we use webgl-friendly modes (no GL_QUADS), then no need
// for emulation
- _glDrawArrays = function _glDrawArrays(mode, first, count) {
+ _glDrawArrays = _emscripten_glDrawArrays = function _glDrawArrays(mode, first, count) {
if (GLImmediate.totalEnabledClientAttributes == 0 && mode <= 6) {
GLctx.drawArrays(mode, first, count);
return;
@@ -4124,7 +4136,7 @@ var LibraryGL = {
GLImmediate.mode = -1;
};
- _glDrawElements = function _glDrawElements(mode, count, type, indices, start, end) { // start, end are given if we come from glDrawRangeElements
+ _glDrawElements = _emscripten_glDrawElements = function _glDrawElements(mode, count, type, indices, start, end) { // start, end are given if we come from glDrawRangeElements
if (GLImmediate.totalEnabledClientAttributes == 0 && mode <= 6 && GL.currElementArrayBuffer) {
GLctx.drawElements(mode, count, type, indices);
return;
@@ -4164,36 +4176,36 @@ var LibraryGL = {
}
var glActiveTexture = _glActiveTexture;
- _glActiveTexture = function _glActiveTexture(texture) {
+ _glActiveTexture = _emscripten_glActiveTexture = function _glActiveTexture(texture) {
GLImmediate.TexEnvJIT.hook_activeTexture(texture);
glActiveTexture(texture);
};
var glEnable = _glEnable;
- _glEnable = function _glEnable(cap) {
+ _glEnable = _emscripten_glEnable = function _glEnable(cap) {
GLImmediate.TexEnvJIT.hook_enable(cap);
glEnable(cap);
};
var glDisable = _glDisable;
- _glDisable = function _glDisable(cap) {
+ _glDisable = _emscripten_glDisable = function _glDisable(cap) {
GLImmediate.TexEnvJIT.hook_disable(cap);
glDisable(cap);
};
var glTexEnvf = (typeof(_glTexEnvf) != 'undefined') ? _glTexEnvf : function(){};
- _glTexEnvf = function _glTexEnvf(target, pname, param) {
+ _glTexEnvf = _emscripten_glTexEnvf = function _glTexEnvf(target, pname, param) {
GLImmediate.TexEnvJIT.hook_texEnvf(target, pname, param);
// Don't call old func, since we are the implementor.
//glTexEnvf(target, pname, param);
};
var glTexEnvi = (typeof(_glTexEnvi) != 'undefined') ? _glTexEnvi : function(){};
- _glTexEnvi = function _glTexEnvi(target, pname, param) {
+ _glTexEnvi = _emscripten_glTexEnvi = function _glTexEnvi(target, pname, param) {
GLImmediate.TexEnvJIT.hook_texEnvi(target, pname, param);
// Don't call old func, since we are the implementor.
//glTexEnvi(target, pname, param);
};
var glTexEnvfv = (typeof(_glTexEnvfv) != 'undefined') ? _glTexEnvfv : function(){};
- _glTexEnvfv = function _glTexEnvfv(target, pname, param) {
+ _glTexEnvfv = _emscripten_glTexEnvfv = function _glTexEnvfv(target, pname, param) {
GLImmediate.TexEnvJIT.hook_texEnvfv(target, pname, param);
// Don't call old func, since we are the implementor.
//glTexEnvfv(target, pname, param);
@@ -4208,7 +4220,7 @@ var LibraryGL = {
};
var glGetIntegerv = _glGetIntegerv;
- _glGetIntegerv = function _glGetIntegerv(pname, params) {
+ _glGetIntegerv = _emscripten_glGetIntegerv = function _glGetIntegerv(pname, params) {
switch (pname) {
case 0x8B8D: { // GL_CURRENT_PROGRAM
// Just query directly so we're working with WebGL objects.
@@ -4707,6 +4719,7 @@ var LibraryGL = {
// Additional non-GLES rendering calls
+ glDrawRangeElements__deps: ['glDrawElements'],
glDrawRangeElements__sig: 'viiiiii',
glDrawRangeElements: function(mode, start, end, count, type, indices) {
_glDrawElements(mode, count, type, indices, start, end);
@@ -4820,6 +4833,7 @@ var LibraryGL = {
if (GLEmulation.currentVao && GLEmulation.currentVao.id == id) GLEmulation.currentVao = null;
}
},
+ glBindVertexArray__deps: ['glBindBuffer', 'glEnableVertexAttribArray', 'glVertexAttribPointer', 'glEnableClientState'],
glBindVertexArray__sig: 'vi',
glBindVertexArray: function(vao) {
// undo vao-related things, wipe the slate clean, both for vao of 0 or an actual vao
@@ -5027,39 +5041,11 @@ var LibraryGL = {
#else // LEGACY_GL_EMULATION
- // Warn if code tries to use various emulation stuff, when emulation is disabled
- // (do not warn if INCLUDE_FULL_LIBRARY is one, because then likely the gl code will
- // not be called anyhow, leave only the runtime aborts)
- glVertexPointer__deps: [function() {
-#if INCLUDE_FULL_LIBRARY == 0
- warn('Legacy GL function (glVertexPointer) called. You need to compile with -s LEGACY_GL_EMULATION=1 to enable legacy GL emulation.');
-#endif
- }],
- glVertexPointer: function(){ throw 'Legacy GL function (glVertexPointer) called. You need to compile with -s LEGACY_GL_EMULATION=1 to enable legacy GL emulation.'; },
- glGenVertexArrays__deps: [function() {
-#if INCLUDE_FULL_LIBRARY == 0
- warn('Legacy GL function (glGenVertexArrays) called. You need to compile with -s LEGACY_GL_EMULATION=1 to enable legacy GL emulation.');
-#endif
- }],
- glGenVertexArrays: function(){ throw 'Legacy GL function (glGenVertexArrays) called. You need to compile with -s LEGACY_GL_EMULATION=1 to enable legacy GL emulation.'; },
- glMatrixMode__deps: [function() {
-#if INCLUDE_FULL_LIBRARY == 0
- warn('Legacy GL function (glMatrixMode) called. You need to compile with -s LEGACY_GL_EMULATION=1 to enable legacy GL emulation.');
-#endif
- }],
- glMatrixMode: function(){ throw 'Legacy GL function (glMatrixMode) called. You need to compile with -s LEGACY_GL_EMULATION=1 to enable legacy GL emulation.'; },
- glBegin__deps: [function() {
-#if INCLUDE_FULL_LIBRARY == 0
- warn('Legacy GL function (glBegin) called. You need to compile with -s LEGACY_GL_EMULATION=1 to enable legacy GL emulation.');
-#endif
- }],
- glBegin: function(){ throw 'Legacy GL function (glBegin) called. You need to compile with -s LEGACY_GL_EMULATION=1 to enable legacy GL emulation.'; },
- glLoadIdentity__deps: [function() {
-#if INCLUDE_FULL_LIBRARY == 0
- warn('Legacy GL function (glLoadIdentity) called. You need to compile with -s LEGACY_GL_EMULATION=1 to enable legacy GL emulation.');
-#endif
- }],
- glLoadIdentity: function(){ throw 'Legacy GL function (glLoadIdentity) called. You need to compile with -s LEGACY_GL_EMULATION=1 to enable legacy GL emulation.'; },
+ glVertexPointer: function(){ throw 'Legacy GL function (glVertexPointer) called. If you want legacy GL emulation, you need to compile with -s LEGACY_GL_EMULATION=1 to enable legacy GL emulation.'; },
+ glGenVertexArrays: function(){ throw 'Legacy GL function (glGenVertexArrays) called. If you want legacy GL emulation, you need to compile with -s LEGACY_GL_EMULATION=1 to enable legacy GL emulation.'; },
+ glMatrixMode: function(){ throw 'Legacy GL function (glMatrixMode) called. If you want legacy GL emulation, you need to compile with -s LEGACY_GL_EMULATION=1 to enable legacy GL emulation.'; },
+ glBegin: function(){ throw 'Legacy GL function (glBegin) called. If you want legacy GL emulation, you need to compile with -s LEGACY_GL_EMULATION=1 to enable legacy GL emulation.'; },
+ glLoadIdentity: function(){ throw 'Legacy GL function (glLoadIdentity) called. If you want legacy GL emulation, you need to compile with -s LEGACY_GL_EMULATION=1 to enable legacy GL emulation.'; },
#endif // LEGACY_GL_EMULATION
@@ -5370,53 +5356,37 @@ if (LEGACY_GL_EMULATION) {
DEFAULT_LIBRARY_FUNCS_TO_INCLUDE.push('$GLEmulation');
}
-// GL proc address retrieval
-LibraryGL.emscripten_GetProcAddress__deps = [function() {
- // ProcAddress is used, so include everything in GL. This runs before we go to the $ProcAddressTable object,
- // and we fill its deps just in time, and create the lookup table
- var table = {};
- LibraryManager.library.emscripten_procAddressTable__deps = keys(LibraryGL).map(function(x) {
- if (x.substr(-6) == '__deps' || x.substr(-9) == '__postset' || x.substr(-5) == '__sig' || x.substr(-5) == '__asm' || x.substr(0, 2) != 'gl') return null;
- var original = x;
- if (('_' + x) in Functions.implementedFunctions) {
- // a user-implemented function aliases this one, but we still want it to be accessible by name, so rename it
- var y = x + '__procTable';
- LibraryManager.library[y] = LibraryManager.library[x];
- LibraryManager.library[y + '__deps'] = LibraryManager.library[x + '__deps'];
- LibraryManager.library[y + '__postset'] = LibraryManager.library[x + '__postset'];
- LibraryManager.library[y + '__sig'] = LibraryManager.library[x + '__sig'];//|| Functions.implementedFunctions['_' + x];
- LibraryManager.library[y + '__asm'] = LibraryManager.library[x + '__asm'];
- x = y;
- assert(!(y in Functions.implementedFunctions) && !Functions.unimplementedFunctions['_' + y]);
- }
- var longX = '_' + x;
- var sig = LibraryManager.library[x + '__sig'] || functionStubSigs[longX];
- if (sig) {
- table[original] = Functions.getIndex(longX, sig);
- if (!(longX in Functions.implementedFunctions)) Functions.unimplementedFunctions[longX] = sig;
- }
- return x;
- }).filter(function(x) { return x !== null });
- // convert table into function with switch, to not confuse closure compiler
- var tableImpl = 'switch(name) {\n';
- for (var x in table) tableImpl += 'case "' + x + '": return ' + table[x] + '; break;\n';
- tableImpl += '}\nreturn 0;';
- LibraryManager.library.emscripten_procAddressTable = new Function('name', tableImpl);
-}, 'emscripten_procAddressTable'];
-LibraryGL.emscripten_GetProcAddress = function _LibraryGL_emscripten_GetProcAddress(name) {
- name = name.replace('EXT', '').replace('ARB', '');
- switch(name) { // misc renamings
- case 'glCreateProgramObject': name = 'glCreateProgram'; break;
- case 'glUseProgramObject': name = 'glUseProgram'; break;
- case 'glCreateShaderObject': name = 'glCreateShader'; break;
- case 'glAttachObject': name = 'glAttachShader'; break;
- case 'glDetachObject': name = 'glDetachShader'; break;
- }
- var ret = _emscripten_procAddressTable(name);
- if (!ret) Module.printErr('WARNING: getProcAddress failed for ' + name);
- return ret;
+function copyLibEntry(a, b) {
+ LibraryGL[a] = LibraryGL[b];
+ LibraryGL[a + '__postset'] = LibraryGL[b + '__postset'];
+ LibraryGL[a + '__sig'] = LibraryGL[b + '__sig'];
+ LibraryGL[a + '__asm'] = LibraryGL[b + '__asm'];
+ LibraryGL[a + '__deps'] = LibraryGL[b + '__deps'].slice(0);
}
+// GL proc address retrieval - allow access through glX and emscripten_glX, to allow name collisions with user-implemented things having the same name (see gl.c)
+keys(LibraryGL).forEach(function(x) {
+ if (x.substr(-6) == '__deps' || x.substr(-9) == '__postset' || x.substr(-5) == '__sig' || x.substr(-5) == '__asm' || x.substr(0, 2) != 'gl') return;
+ while (typeof LibraryGL[x] === 'string') {
+ // resolve aliases right here, simpler for fastcomp
+ copyLibEntry(x, LibraryGL[x]);
+ }
+ var y = 'emscripten_' + x;
+ LibraryGL[x + '__deps'] = LibraryGL[x + '__deps'].map(function(dep) {
+ // prefix dependencies as well
+ if (typeof dep === 'string' && dep[0] == 'g' && dep[1] == 'l' && LibraryGL[dep]) {
+ var orig = dep;
+ dep = 'emscripten_' + dep;
+ var fixed = LibraryGL[x].toString().replace(new RegExp('_' + orig + '\\(', 'g'), '_' + dep + '(');
+ fixed = fixed.substr(0, 9) + '_' + y + fixed.substr(9);
+ LibraryGL[x] = eval('(function() { return ' + fixed + ' })()');
+ }
+ return dep;
+ });
+ // copy it
+ copyLibEntry(y, x);
+});
+
// Final merge
mergeInto(LibraryManager.library, LibraryGL);
diff --git a/src/library_html5.js b/src/library_html5.js
index 703f9a74..a38c2390 100644
--- a/src/library_html5.js
+++ b/src/library_html5.js
@@ -709,7 +709,9 @@ var LibraryJSEvents = {
var eventHandler = {
target: JSEvents.findEventTarget(target),
- allowsDeferredCalls: true,
+ allowsDeferredCalls: false, // XXX Currently disabled, see bug https://bugzilla.mozilla.org/show_bug.cgi?id=966493
+ // Once the above bug is resolved, enable the following condition if possible:
+ // allowsDeferredCalls: eventTypeString == 'touchstart',
eventTypeString: eventTypeString,
callbackfunc: callbackfunc,
handlerFunc: handlerFunc,
@@ -980,18 +982,23 @@ var LibraryJSEvents = {
if (allowedOrientations & 2) orientations.push("portrait-secondary");
if (allowedOrientations & 4) orientations.push("landscape-primary");
if (allowedOrientations & 8) orientations.push("landscape-secondary");
+ var succeeded;
if (window.screen.lockOrientation) {
- window.screen.lockOrientation(orientations);
+ succeeded = window.screen.lockOrientation(orientations);
} else if (window.screen.mozLockOrientation) {
- window.screen.mozLockOrientation(orientations);
+ succeeded = window.screen.mozLockOrientation(orientations);
} else if (window.screen.webkitLockOrientation) {
- window.screen.webkitLockOrientation(orientations);
+ succeeded = window.screen.webkitLockOrientation(orientations);
} else if (window.screen.msLockOrientation) {
- window.screen.msLockOrientation(orientations);
+ succeeded = window.screen.msLockOrientation(orientations);
} else {
return {{{ cDefine('EMSCRIPTEN_RESULT_NOT_SUPPORTED') }}};
}
- return {{{ cDefine('EMSCRIPTEN_RESULT_SUCCESS') }}};
+ if (succeeded) {
+ return {{{ cDefine('EMSCRIPTEN_RESULT_SUCCESS') }}};
+ } else {
+ return {{{ cDefine('EMSCRIPTEN_RESULT_FAILED') }}};
+ }
},
emscripten_unlock_orientation: function() {
diff --git a/src/library_idbfs.js b/src/library_idbfs.js
index 7f50f17e..91015e77 100644
--- a/src/library_idbfs.js
+++ b/src/library_idbfs.js
@@ -5,14 +5,12 @@ mergeInto(LibraryManager.library, {
indexedDB: function() {
return window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB;
},
- DB_VERSION: 20,
+ DB_VERSION: 21,
DB_STORE_NAME: 'FILE_DATA',
- // reuse all of the core MEMFS functionality
mount: function(mount) {
+ // reuse all of the core MEMFS functionality
return MEMFS.mount.apply(null, arguments);
},
- // the only custom function IDBFS implements is to handle
- // synchronizing the wrapped MEMFS with a backing IDB instance
syncfs: function(mount, populate, callback) {
IDBFS.getLocalSet(mount, function(err, local) {
if (err) return callback(err);
@@ -27,103 +25,46 @@ mergeInto(LibraryManager.library, {
});
});
},
- reconcile: function(src, dst, callback) {
- var total = 0;
-
- var create = {};
- for (var key in src.files) {
- if (!src.files.hasOwnProperty(key)) continue;
- var e = src.files[key];
- var e2 = dst.files[key];
- if (!e2 || e.timestamp > e2.timestamp) {
- create[key] = e;
- total++;
- }
- }
-
- var remove = {};
- for (var key in dst.files) {
- if (!dst.files.hasOwnProperty(key)) continue;
- var e = dst.files[key];
- var e2 = src.files[key];
- if (!e2) {
- remove[key] = e;
- total++;
- }
+ getDB: function(name, callback) {
+ // check the cache first
+ var db = IDBFS.dbs[name];
+ if (db) {
+ return callback(null, db);
}
- if (!total) {
- // early out
- return callback(null);
+ var req;
+ try {
+ req = IDBFS.indexedDB().open(name, IDBFS.DB_VERSION);
+ } catch (e) {
+ return callback(e);
}
+ req.onupgradeneeded = function(e) {
+ var db = e.target.result;
+ var transaction = e.target.transaction;
- var completed = 0;
- function done(err) {
- if (err) return callback(err);
- if (++completed >= total) {
- return callback(null);
- }
- };
-
- // create a single transaction to handle and IDB reads / writes we'll need to do
- var db = src.type === 'remote' ? src.db : dst.db;
- var transaction = db.transaction([IDBFS.DB_STORE_NAME], 'readwrite');
- transaction.onerror = function transaction_onerror() { callback(this.error); };
- var store = transaction.objectStore(IDBFS.DB_STORE_NAME);
-
- for (var path in create) {
- if (!create.hasOwnProperty(path)) continue;
- var entry = create[path];
+ var fileStore;
- if (dst.type === 'local') {
- // save file to local
- try {
- if (FS.isDir(entry.mode)) {
- FS.mkdir(path, entry.mode);
- } else if (FS.isFile(entry.mode)) {
- var stream = FS.open(path, 'w+', 0666);
- FS.write(stream, entry.contents, 0, entry.contents.length, 0, true /* canOwn */);
- FS.close(stream);
- }
- done(null);
- } catch (e) {
- return done(e);
- }
+ if (db.objectStoreNames.contains(IDBFS.DB_STORE_NAME)) {
+ fileStore = transaction.objectStore(IDBFS.DB_STORE_NAME);
} else {
- // save file to IDB
- var req = store.put(entry, path);
- req.onsuccess = function req_onsuccess() { done(null); };
- req.onerror = function req_onerror() { done(this.error); };
+ fileStore = db.createObjectStore(IDBFS.DB_STORE_NAME);
}
- }
- for (var path in remove) {
- if (!remove.hasOwnProperty(path)) continue;
- var entry = remove[path];
+ fileStore.createIndex('timestamp', 'timestamp', { unique: false });
+ };
+ req.onsuccess = function() {
+ db = req.result;
- if (dst.type === 'local') {
- // delete file from local
- try {
- if (FS.isDir(entry.mode)) {
- // TODO recursive delete?
- FS.rmdir(path);
- } else if (FS.isFile(entry.mode)) {
- FS.unlink(path);
- }
- done(null);
- } catch (e) {
- return done(e);
- }
- } else {
- // delete file from IDB
- var req = store.delete(path);
- req.onsuccess = function req_onsuccess() { done(null); };
- req.onerror = function req_onerror() { done(this.error); };
- }
- }
+ // add to the cache
+ IDBFS.dbs[name] = db;
+ callback(null, db);
+ };
+ req.onerror = function() {
+ callback(this.error);
+ };
},
getLocalSet: function(mount, callback) {
- var files = {};
+ var entries = {};
function isRealDir(p) {
return p !== '.' && p !== '..';
@@ -134,83 +75,192 @@ mergeInto(LibraryManager.library, {
}
};
- var check = FS.readdir(mount.mountpoint)
- .filter(isRealDir)
- .map(toAbsolute(mount.mountpoint));
+ var check = FS.readdir(mount.mountpoint).filter(isRealDir).map(toAbsolute(mount.mountpoint));
while (check.length) {
var path = check.pop();
- var stat, node;
+ var stat;
try {
- var lookup = FS.lookupPath(path);
- node = lookup.node;
stat = FS.stat(path);
} catch (e) {
return callback(e);
}
if (FS.isDir(stat.mode)) {
- check.push.apply(check, FS.readdir(path)
- .filter(isRealDir)
- .map(toAbsolute(path)));
-
- files[path] = { mode: stat.mode, timestamp: stat.mtime };
- } else if (FS.isFile(stat.mode)) {
- files[path] = { contents: node.contents, mode: stat.mode, timestamp: stat.mtime };
- } else {
- return callback(new Error('node type not supported'));
+ check.push.apply(check, FS.readdir(path).filter(isRealDir).map(toAbsolute(path)));
}
- }
- return callback(null, { type: 'local', files: files });
- },
- getDB: function(name, callback) {
- // look it up in the cache
- var db = IDBFS.dbs[name];
- if (db) {
- return callback(null, db);
- }
- var req;
- try {
- req = IDBFS.indexedDB().open(name, IDBFS.DB_VERSION);
- } catch (e) {
- return onerror(e);
+ entries[path] = { timestamp: stat.mtime };
}
- req.onupgradeneeded = function req_onupgradeneeded() {
- db = req.result;
- db.createObjectStore(IDBFS.DB_STORE_NAME);
- };
- req.onsuccess = function req_onsuccess() {
- db = req.result;
- // add to the cache
- IDBFS.dbs[name] = db;
- callback(null, db);
- };
- req.onerror = function req_onerror() {
- callback(this.error);
- };
+
+ return callback(null, { type: 'local', entries: entries });
},
getRemoteSet: function(mount, callback) {
- var files = {};
+ var entries = {};
IDBFS.getDB(mount.mountpoint, function(err, db) {
if (err) return callback(err);
var transaction = db.transaction([IDBFS.DB_STORE_NAME], 'readonly');
- transaction.onerror = function transaction_onerror() { callback(this.error); };
+ transaction.onerror = function() { callback(this.error); };
var store = transaction.objectStore(IDBFS.DB_STORE_NAME);
- store.openCursor().onsuccess = function store_openCursor_onsuccess(event) {
+ var index = store.index('timestamp');
+
+ index.openKeyCursor().onsuccess = function(event) {
var cursor = event.target.result;
+
if (!cursor) {
- return callback(null, { type: 'remote', db: db, files: files });
+ return callback(null, { type: 'remote', db: db, entries: entries });
}
- files[cursor.key] = cursor.value;
+ entries[cursor.primaryKey] = { timestamp: cursor.key };
+
cursor.continue();
};
});
+ },
+ loadLocalEntry: function(path, callback) {
+ var stat, node;
+
+ try {
+ var lookup = FS.lookupPath(path);
+ node = lookup.node;
+ stat = FS.stat(path);
+ } catch (e) {
+ return callback(e);
+ }
+
+ if (FS.isDir(stat.mode)) {
+ return callback(null, { timestamp: stat.mtime, mode: stat.mode });
+ } else if (FS.isFile(stat.mode)) {
+ return callback(null, { timestamp: stat.mtime, mode: stat.mode, contents: node.contents });
+ } else {
+ return callback(new Error('node type not supported'));
+ }
+ },
+ storeLocalEntry: function(path, entry, callback) {
+ try {
+ if (FS.isDir(entry.mode)) {
+ FS.mkdir(path, entry.mode);
+ } else if (FS.isFile(entry.mode)) {
+ FS.writeFile(path, entry.contents, { encoding: 'binary', canOwn: true });
+ } else {
+ return callback(new Error('node type not supported'));
+ }
+
+ FS.utime(path, entry.timestamp, entry.timestamp);
+ } catch (e) {
+ return callback(e);
+ }
+
+ callback(null);
+ },
+ removeLocalEntry: function(path, callback) {
+ try {
+ var lookup = FS.lookupPath(path);
+ var stat = FS.stat(path);
+
+ if (FS.isDir(stat.mode)) {
+ FS.rmdir(path);
+ } else if (FS.isFile(stat.mode)) {
+ FS.unlink(path);
+ }
+ } catch (e) {
+ return callback(e);
+ }
+
+ callback(null);
+ },
+ loadRemoteEntry: function(store, path, callback) {
+ var req = store.get(path);
+ req.onsuccess = function(event) { callback(null, event.target.result); };
+ req.onerror = function() { callback(this.error); };
+ },
+ storeRemoteEntry: function(store, path, entry, callback) {
+ var req = store.put(entry, path);
+ req.onsuccess = function() { callback(null); };
+ req.onerror = function() { callback(this.error); };
+ },
+ removeRemoteEntry: function(store, path, callback) {
+ var req = store.delete(path);
+ req.onsuccess = function() { callback(null); };
+ req.onerror = function() { callback(this.error); };
+ },
+ reconcile: function(src, dst, callback) {
+ var total = 0;
+
+ var create = [];
+ Object.keys(src.entries).forEach(function (key) {
+ var e = src.entries[key];
+ var e2 = dst.entries[key];
+ if (!e2 || e.timestamp > e2.timestamp) {
+ create.push(key);
+ total++;
+ }
+ });
+
+ var remove = [];
+ Object.keys(dst.entries).forEach(function (key) {
+ var e = dst.entries[key];
+ var e2 = src.entries[key];
+ if (!e2) {
+ remove.push(key);
+ total++;
+ }
+ });
+
+ if (!total) {
+ return callback(null);
+ }
+
+ var errored = false;
+ var completed = 0;
+ var db = src.type === 'remote' ? src.db : dst.db;
+ var transaction = db.transaction([IDBFS.DB_STORE_NAME], 'readwrite');
+ var store = transaction.objectStore(IDBFS.DB_STORE_NAME);
+
+ function done(err) {
+ if (err) {
+ if (!done.errored) {
+ done.errored = true;
+ return callback(err);
+ }
+ return;
+ }
+ if (++completed >= total) {
+ return callback(null);
+ }
+ };
+
+ transaction.onerror = function() { done(this.error); };
+
+ // sort paths in ascending order so directory entries are created
+ // before the files inside them
+ create.sort().forEach(function (path) {
+ if (dst.type === 'local') {
+ IDBFS.loadRemoteEntry(store, path, function (err, entry) {
+ if (err) return done(err);
+ IDBFS.storeLocalEntry(path, entry, done);
+ });
+ } else {
+ IDBFS.loadLocalEntry(path, function (err, entry) {
+ if (err) return done(err);
+ IDBFS.storeRemoteEntry(store, path, entry, done);
+ });
+ }
+ });
+
+ // sort paths in descending order so files are deleted before their
+ // parent directories
+ remove.sort().reverse().forEach(function(path) {
+ if (dst.type === 'local') {
+ IDBFS.removeLocalEntry(path, done);
+ } else {
+ IDBFS.removeRemoteEntry(store, path, done);
+ }
+ });
}
}
});
diff --git a/src/library_openal.js b/src/library_openal.js
index 67481824..ac49fe95 100644
--- a/src/library_openal.js
+++ b/src/library_openal.js
@@ -5,6 +5,10 @@ var LibraryOpenAL = {
$AL: {
contexts: [],
currentContext: null,
+
+ stringCache: {},
+ alcStringCache: {},
+
QUEUE_INTERVAL: 25,
QUEUE_LOOKAHEAD: 100,
@@ -235,6 +239,42 @@ var LibraryOpenAL = {
return _alGetError();
},
+ alcGetIntegerv: function(device, param, size, data) {
+ if (size == 0 || !data) {
+ AL.currentContext.err = 0xA003 /* AL_INVALID_VALUE */;
+ return;
+ }
+
+ switch(param) {
+ case 0x1000 /* ALC_MAJOR_VERSION */:
+ {{{ makeSetValue('data', '0', '1', 'i32') }}};
+ break;
+ case 0x1001 /* ALC_MINOR_VERSION */:
+ {{{ makeSetValue('data', '0', '1', 'i32') }}};
+ break;
+ case 0x1002 /* ALC_ATTRIBUTES_SIZE */:
+ if (!device) {
+ AL.currentContext.err = 0xA001 /* ALC_INVALID_DEVICE */;
+ return 0;
+ }
+ {{{ makeSetValue('data', '0', '1', 'i32') }}};
+ break;
+ case 0x1003 /* ALC_ALL_ATTRIBUTES */:
+ if (!device) {
+ AL.currentContext.err = 0xA001 /* ALC_INVALID_DEVICE */;
+ return 0;
+ }
+ {{{ makeSetValue('data', '0', '0', 'i32') }}};
+ break;
+ default:
+#if OPENAL_DEBUG
+ console.log("alcGetIntegerv with param " + param + " not implemented yet");
+#endif
+ AL.currentContext.err = 0xA003 /* ALC_INVALID_ENUM */;
+ break;
+ }
+ },
+
alDeleteSources: function(count, sources) {
if (!AL.currentContext) {
#if OPENAL_DEBUG
@@ -334,6 +374,18 @@ var LibraryOpenAL = {
}
},
+ alIsSource: function(sourceId) {
+ if (!AL.currentContext) {
+ return false;
+ }
+
+ if (!AL.currentContext.src[sourceId - 1]) {
+ return false;
+ } else {
+ return true;
+ }
+ },
+
alSourcei__deps: ['updateSource'],
alSourcei: function(source, param, value) {
if (!AL.currentContext) {
@@ -691,6 +743,7 @@ var LibraryOpenAL = {
}
try {
AL.currentContext.buf[buffer - 1] = AL.currentContext.ctx.createBuffer(channels, size / (bytes * channels), freq);
+ AL.currentContext.buf[buffer - 1].bytesPerSample = bytes;
} catch (e) {
AL.currentContext.err = 0xA003 /* AL_INVALID_VALUE */;
return;
@@ -715,6 +768,41 @@ var LibraryOpenAL = {
}
},
+ alGetBufferi: function(buffer, param, value)
+ {
+ if (!AL.currentContext) {
+#if OPENAL_DEBUG
+ console.error("alGetBufferi called without a valid context");
+#endif
+ return;
+ }
+ var buf = AL.currentContext.buf[buffer - 1];
+ if (!buf) {
+#if OPENAL_DEBUG
+ console.error("alGetBufferi called with an invalid buffer");
+#endif
+ AL.currentContext.err = 0xA001 /* AL_INVALID_NAME */;
+ return;
+ }
+ switch (param) {
+ case 0x2001 /* AL_FREQUENCY */:
+ {{{ makeSetValue('value', '0', 'buf.sampleRate', 'i32') }}};
+ break;
+ case 0x2002 /* AL_BITS */:
+ {{{ makeSetValue('value', '0', 'buf.bytesPerSample * 8', 'i32') }}};
+ break;
+ case 0x2003 /* AL_CHANNELS */:
+ {{{ makeSetValue('value', '0', 'buf.numberOfChannels', 'i32') }}};
+ break;
+ case 0x2004 /* AL_SIZE */:
+ {{{ makeSetValue('value', '0', 'buf.length * buf.bytesPerSample * buf.numberOfChannels', 'i32') }}};
+ break;
+ default:
+ AL.currentContext.err = 0xA002 /* AL_INVALID_ENUM */;
+ break;
+ }
+ },
+
alSourcePlay__deps: ['setSourceState'],
alSourcePlay: function(source) {
if (!AL.currentContext) {
@@ -1128,15 +1216,116 @@ var LibraryOpenAL = {
},
alGetString: function(param) {
- return allocate(intArrayFromString('NA'), 'i8', ALLOC_NORMAL);
+ if (AL.stringCache[param]) return AL.stringCache[param];
+ var ret;
+ switch (param) {
+ case 0 /* AL_NO_ERROR */:
+ ret = 'No Error';
+ break;
+ case 0xA001 /* AL_INVALID_NAME */:
+ ret = 'Invalid Name';
+ break;
+ case 0xA002 /* AL_INVALID_ENUM */:
+ ret = 'Invalid Enum';
+ break;
+ case 0xA003 /* AL_INVALID_VALUE */:
+ ret = 'Invalid Value';
+ break;
+ case 0xA004 /* AL_INVALID_OPERATION */:
+ ret = 'Invalid Operation';
+ break;
+ case 0xA005 /* AL_OUT_OF_MEMORY */:
+ ret = 'Out of Memory';
+ break;
+ case 0xB001 /* AL_VENDOR */:
+ ret = 'Emscripten';
+ break;
+ case 0xB002 /* AL_VERSION */:
+ ret = '1.1';
+ break;
+ case 0xB003 /* AL_RENDERER */:
+ ret = 'WebAudio';
+ break;
+ case 0xB004 /* AL_EXTENSIONS */:
+ ret = '';
+ break;
+ default:
+ AL.currentContext.err = 0xA002 /* AL_INVALID_ENUM */;
+ return 0;
+ }
+
+ ret = allocate(intArrayFromString(ret), 'i8', ALLOC_NORMAL);
+
+ AL.stringCache[param] = ret;
+
+ return ret;
},
alGetProcAddress: function(fname) {
return 0;
},
- alcGetString: function(param) {
- return allocate(intArrayFromString('NA'), 'i8', ALLOC_NORMAL);
+ alcGetString: function(device, param) {
+ if (AL.alcStringCache[param]) return AL.alcStringCache[param];
+ var ret;
+ switch (param) {
+ case 0 /* ALC_NO_ERROR */:
+ ret = 'No Error';
+ break;
+ case 0xA001 /* ALC_INVALID_DEVICE */:
+ ret = 'Invalid Device';
+ break;
+ case 0xA002 /* ALC_INVALID_CONTEXT */:
+ ret = 'Invalid Context';
+ break;
+ case 0xA003 /* ALC_INVALID_ENUM */:
+ ret = 'Invalid Enum';
+ break;
+ case 0xA004 /* ALC_INVALID_VALUE */:
+ ret = 'Invalid Value';
+ break;
+ case 0xA005 /* ALC_OUT_OF_MEMORY */:
+ ret = 'Out of Memory';
+ break;
+ case 0x1004 /* ALC_DEFAULT_DEVICE_SPECIFIER */:
+ if (typeof(AudioContext) == "function" ||
+ typeof(webkitAudioContext) == "function") {
+ ret = 'Device';
+ } else {
+ return 0;
+ }
+ break;
+ case 0x1005 /* ALC_DEVICE_SPECIFIER */:
+ if (typeof(AudioContext) == "function" ||
+ typeof(webkitAudioContext) == "function") {
+ ret = 'Device\0';
+ } else {
+ ret = '\0';
+ }
+ break;
+ case 0x311 /* ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER */:
+ return 0;
+ break;
+ case 0x310 /* ALC_CAPTURE_DEVICE_SPECIFIER */:
+ ret = '\0'
+ break;
+ case 0x1006 /* ALC_EXTENSIONS */:
+ if (!device) {
+ AL.currentContext.err = 0xA001 /* ALC_INVALID_DEVICE */;
+ return 0;
+ }
+ ret = '';
+ break;
+ default:
+ AL.currentContext.err = 0xA003 /* ALC_INVALID_ENUM */;
+ return 0;
+ }
+
+ ret = allocate(intArrayFromString(ret), 'i8', ALLOC_NORMAL);
+
+ AL.alcStringCache[param] = ret;
+
+ return ret;
},
alcGetProcAddress: function(device, fname) {
diff --git a/src/library_sdl.js b/src/library_sdl.js
index 80734d95..8c70ceee 100644
--- a/src/library_sdl.js
+++ b/src/library_sdl.js
@@ -215,7 +215,6 @@ var LibrarySDL = {
makeSurface: function(width, height, flags, usePageCanvas, source, rmask, gmask, bmask, amask) {
flags = flags || 0;
var surf = _malloc({{{ C_STRUCTS.SDL_Surface.__size__ }}}); // SDL_Surface has 15 fields of quantum size
- var buffer = _malloc(width*height*4); // TODO: only allocate when locked the first time
var pixelFormat = _malloc({{{ C_STRUCTS.SDL_PixelFormat.__size__ }}});
flags |= 1; // SDL_HWSURFACE - this tells SDL_MUSTLOCK that this needs to be locked
@@ -229,7 +228,7 @@ var LibrarySDL = {
{{{ makeSetValue('surf', C_STRUCTS.SDL_Surface.h, 'height', 'i32') }}}; // SDL_Surface.h
{{{ makeSetValue('surf', C_STRUCTS.SDL_Surface.pitch, 'width * bpp', 'i32') }}}; // SDL_Surface.pitch, assuming RGBA or indexed for now,
// since that is what ImageData gives us in browsers
- {{{ makeSetValue('surf', C_STRUCTS.SDL_Surface.pixels, 'buffer', 'void*') }}}; // SDL_Surface.pixels
+ {{{ makeSetValue('surf', C_STRUCTS.SDL_Surface.pixels, '0', 'void*') }}}; // SDL_Surface.pixels, lazily initialized inside of SDL_LockSurface
{{{ makeSetValue('surf', C_STRUCTS.SDL_Surface.clip_rect, '0', 'i32*') }}}; // SDL_Surface.offset
{{{ makeSetValue('surf', C_STRUCTS.SDL_Surface.refcount, '1', 'i32') }}};
@@ -274,7 +273,7 @@ var LibrarySDL = {
canvas: canvas,
ctx: ctx,
surf: surf,
- buffer: buffer,
+ buffer: 0,
pixelFormat: pixelFormat,
alpha: 255,
flags: flags,
@@ -337,7 +336,7 @@ var LibrarySDL = {
var info = SDL.surfaces[surf];
if (!info.usePageCanvas && info.canvas) SDL.canvasPool.push(info.canvas);
- _free(info.buffer);
+ if (info.buffer) _free(info.buffer);
_free(info.pixelFormat);
_free(surf);
SDL.surfaces[surf] = null;
@@ -407,7 +406,7 @@ var LibrarySDL = {
// won't fire. However, it's fine (and in some cases necessary) to
// preventDefault for keys that don't generate a character. Otherwise,
// preventDefault is the right thing to do in general.
- if (event.type !== 'keydown' || (event.keyCode === 8 /* backspace */ || event.keyCode === 9 /* tab */)) {
+ if (event.type !== 'keydown' || (!SDL.unicode && !SDL.textInput) || (event.keyCode === 8 /* backspace */ || event.keyCode === 9 /* tab */)) {
event.preventDefault();
}
@@ -986,6 +985,11 @@ var LibrarySDL = {
surfData.locked++;
if (surfData.locked > 1) return 0;
+ if (!surfData.buffer) {
+ surfData.buffer = _malloc(surfData.width * surfData.height * 4);
+ {{{ makeSetValue('surf', C_STRUCTS.SDL_Surface.pixels, 'surfData.buffer', 'void*') }}};
+ }
+
// Mark in C/C++-accessible SDL structure
// SDL_Surface has the following fields: Uint32 flags, SDL_PixelFormat *format; int w, h; Uint16 pitch; void *pixels; ...
// So we have fields all of the same size, and 5 of them before us.
@@ -1723,6 +1727,7 @@ var LibrarySDL = {
SDL.audio.pushAudio=function(ptr,sizeBytes) {
try {
--SDL.audio.numAudioTimersPending;
+ if (SDL.audio.paused) return;
var sizeSamples = sizeBytes / SDL.audio.bytesPerSample; // How many samples fit in the callback buffer?
var sizeSamplesPerChannel = sizeSamples / SDL.audio.channels; // How many samples per a single channel fit in the cb buffer?
@@ -1773,18 +1778,18 @@ var LibrarySDL = {
SDL.audio.soundSource[SDL.audio.nextSoundSource]['start'](playtime);
var buffer_duration = sizeSamplesPerChannel / SDL.audio.freq;
SDL.audio.nextPlayTime = playtime + buffer_duration;
- SDL.audio.nextSoundSource = (SDL.audio.nextSoundSource + 1) % 4;
+ // Timer will be scheduled before the buffer completed playing.
+ // Extra buffers are needed to avoid disturbing playing buffer.
+ SDL.audio.nextSoundSource = (SDL.audio.nextSoundSource + 1) % (SDL.audio.numSimultaneouslyQueuedBuffers + 2);
var secsUntilNextCall = playtime-curtime;
// Queue the next audio frame push to be performed when the previously queued buffer has finished playing.
- if (SDL.audio.numAudioTimersPending == 0) {
- var preemptBufferFeedMSecs = buffer_duration/2.0;
- SDL.audio.timer = Browser.safeSetTimeout(SDL.audio.caller, Math.max(0.0, 1000.0*secsUntilNextCall-preemptBufferFeedMSecs));
- ++SDL.audio.numAudioTimersPending;
- }
+ var preemptBufferFeedMSecs = 1000*buffer_duration/2.0;
+ SDL.audio.timer = Browser.safeSetTimeout(SDL.audio.caller, Math.max(0.0, 1000.0*secsUntilNextCall-preemptBufferFeedMSecs));
+ ++SDL.audio.numAudioTimersPending;
// If we are risking starving, immediately queue extra buffers.
- if (secsUntilNextCall <= buffer_duration && SDL.audio.numAudioTimersPending < SDL.audio.numSimultaneouslyQueuedBuffers) {
+ if (SDL.audio.numAudioTimersPending < SDL.audio.numSimultaneouslyQueuedBuffers) {
++SDL.audio.numAudioTimersPending;
Browser.safeSetTimeout(SDL.audio.caller, 1.0);
}
@@ -2482,7 +2487,7 @@ var LibrarySDL = {
SDL_GL_GetProcAddress__deps: ['emscripten_GetProcAddress'],
SDL_GL_GetProcAddress: function(name_) {
- return _emscripten_GetProcAddress(Pointer_stringify(name_));
+ return _emscripten_GetProcAddress(name_);
},
SDL_GL_SwapBuffers: function() {},
diff --git a/src/parseTools.js b/src/parseTools.js
index e09cd2e2..bad080b7 100644
--- a/src/parseTools.js
+++ b/src/parseTools.js
@@ -1332,7 +1332,7 @@ function makeGetValue(ptr, pos, type, noNeedFirst, unsigned, ignore, align, noSa
if (printType !== 'null' && printType[0] !== '#') printType = '"' + safeQuote(printType) + '"';
if (printType[0] === '#') printType = printType.substr(1);
if (ASM_JS) {
- if (!ignore) return asmCoercion('SAFE_HEAP_LOAD(' + asmCoercion(offset, 'i32') + ', ' + Runtime.getNativeTypeSize(type) + ', ' + ((type in Runtime.FLOAT_TYPES)|0) + ', ' + (!!unsigned+0) + ')', type);
+ if (!ignore && phase !== 'funcs') return asmCoercion('SAFE_HEAP_LOAD(' + asmCoercion(offset, 'i32') + ', ' + Runtime.getNativeTypeSize(type) + ', ' + ((type in Runtime.FLOAT_TYPES)|0) + ', ' + (!!unsigned+0) + ')', type);
// else fall through
} else {
return asmCoercion('SAFE_HEAP_LOAD(' + offset + ', ' + (ASM_JS ? 0 : printType) + ', ' + (!!unsigned+0) + ', ' + ((!checkSafeHeap() || ignore)|0) + ')', type);
@@ -1444,7 +1444,7 @@ function makeSetValue(ptr, pos, value, type, noNeedFirst, ignore, align, noSafe,
if (printType !== 'null' && printType[0] !== '#') printType = '"' + safeQuote(printType) + '"';
if (printType[0] === '#') printType = printType.substr(1);
if (ASM_JS) {
- if (!ignore) return asmCoercion('SAFE_HEAP_STORE(' + asmCoercion(offset, 'i32') + ', ' + asmCoercion(value, type) + ', ' + Runtime.getNativeTypeSize(type) + ', ' + ((type in Runtime.FLOAT_TYPES)|0) + ')', type);
+ if (!ignore && phase !== 'funcs') return asmCoercion('SAFE_HEAP_STORE(' + asmCoercion(offset, 'i32') + ', ' + asmCoercion(value, type) + ', ' + Runtime.getNativeTypeSize(type) + ', ' + ((type in Runtime.FLOAT_TYPES)|0) + ')', type);
// else fall through
} else {
return 'SAFE_HEAP_STORE(' + offset + ', ' + value + ', ' + (ASM_JS ? 0 : printType) + ', ' + ((!checkSafeHeap() || ignore)|0) + ')';
diff --git a/src/preamble.js b/src/preamble.js
index 9a65b092..25ef1fb3 100644
--- a/src/preamble.js
+++ b/src/preamble.js
@@ -188,6 +188,8 @@ function SAFE_HEAP_STORE(dest, value, bytes, isFloat) {
#endif
assert(dest > 0, 'segmentation fault');
assert(dest % bytes === 0);
+ assert(dest < Math.max(DYNAMICTOP, STATICTOP));
+ assert(DYNAMICTOP <= TOTAL_MEMORY);
setValue(dest, value, getSafeHeapType(bytes, isFloat), 1);
}
@@ -197,6 +199,8 @@ function SAFE_HEAP_LOAD(dest, bytes, isFloat, unsigned) {
#endif
assert(dest > 0, 'segmentation fault');
assert(dest % bytes === 0);
+ assert(dest < Math.max(DYNAMICTOP, STATICTOP));
+ assert(DYNAMICTOP <= TOTAL_MEMORY);
var type = getSafeHeapType(bytes, isFloat);
var ret = getValue(dest, type, 1);
if (unsigned) ret = unSign(ret, parseInt(type.substr(1)), 1);
diff --git a/src/runtime.js b/src/runtime.js
index 4fcca56b..a9265e70 100644
--- a/src/runtime.js
+++ b/src/runtime.js
@@ -565,7 +565,7 @@ function getRuntime() {
// Converts a value we have as signed, into an unsigned value. For
// example, -1 in int32 would be a very large number as unsigned.
-function unSign(value, bits, ignore, sig) {
+function unSign(value, bits, ignore) {
if (value >= 0) {
return value;
}
@@ -578,7 +578,7 @@ function unSign(value, bits, ignore, sig) {
// Converts a value we have as unsigned, into a signed value. For
// example, 200 in a uint8 would be a negative number.
-function reSign(value, bits, ignore, sig) {
+function reSign(value, bits, ignore) {
if (value <= 0) {
return value;
}
diff --git a/src/settings.js b/src/settings.js
index 720fb53f..79e949fa 100644
--- a/src/settings.js
+++ b/src/settings.js
@@ -104,6 +104,9 @@ var FORCE_ALIGNED_MEMORY = 0; // If enabled, assumes all reads and writes are fu
// for ways to help find places in your code where unaligned reads/writes are done -
// you might be able to refactor your codebase to prevent them, which leads to
// smaller and faster code, or even the option to turn this flag on.
+var WARN_UNALIGNED = 0; // Warn at compile time about instructions that LLVM tells us are not fully aligned.
+ // This is useful to find places in your code where you might refactor to ensure proper
+ // alignment. (this option is fastcomp-only)
var PRECISE_I64_MATH = 1; // If enabled, i64 addition etc. is emulated - which is slow but precise. If disabled,
// we use the 'double trick' which is fast but incurs rounding at high values.
// Note that we do not catch 32-bit multiplication by default (which must be done in
@@ -121,8 +124,11 @@ var PRECISE_F32 = 0; // 0: Use JS numbers for floating-point values. These are 6
// 1: Model C++ floats precisely, using Math.fround, polyfilling when necessary. This
// can be slow if the polyfill is used on heavy float32 computation.
// 2: Model C++ floats precisely using Math.fround if available in the JS engine, otherwise
- // use an empty polyfill. This will have less of a speed penalty than using the full
- // polyfill in cases where engine support is not present.
+ // use an empty polyfill. This will have much less of a speed penalty than using the full
+ // polyfill in cases where engine support is not present. In addition, we can
+ // remove the empty polyfill calls themselves on the client when generating html,
+ // which should mean that this gives you the best of both worlds of 0 and 1, and is
+ // therefore recommended.
var SIMD = 0; // Whether to emit SIMD code ( https://github.com/johnmccutchan/ecmascript_simd )
var CLOSURE_ANNOTATIONS = 0; // If set, the generated code will be annotated for the closure
@@ -251,8 +257,8 @@ var DISABLE_EXCEPTION_CATCHING = 0; // Disables generating code to actually catc
// TODO: Make this also remove cxa_begin_catch etc., optimize relooper
// for it, etc. (perhaps do all of this as preprocessing on .ll?)
-var EXCEPTION_CATCHING_WHITELIST = []; // Enables catching exception in listed functions if
- // DISABLE_EXCEPTION_CATCHING = 2 set
+var EXCEPTION_CATCHING_WHITELIST = []; // Enables catching exception in the listed functions only, if
+ // DISABLE_EXCEPTION_CATCHING = 2 is set
var EXECUTION_TIMEOUT = -1; // Throw an exception after X seconds - useful to debug infinite loops
var CHECK_OVERFLOWS = 0; // Add code that checks for overflows in integer math operations.
diff --git a/src/struct_info.json b/src/struct_info.json
index 32261c0a..2aeffc9c 100644
--- a/src/struct_info.json
+++ b/src/struct_info.json
@@ -141,7 +141,9 @@
},
{
"file": "libc/stdlib.h",
- "defines": [],
+ "defines": [
+ "RAND_MAX"
+ ],
"structs": {
// NOTE: The hash sign at the end of this name is a hint to the processor that it mustn't prefix "struct " to the name to reference this struct.
// It will be stripped away when writing the compiled JSON file. You can just refer to it as C_STRUCTS.div_t when using it in the JS code.
diff --git a/system/include/X11/XKBlib.h b/system/include/X11/XKBlib.h
new file mode 100644
index 00000000..8f6c72c1
--- /dev/null
+++ b/system/include/X11/XKBlib.h
@@ -0,0 +1,1149 @@
+/************************************************************
+Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc.
+
+Permission to use, copy, modify, and distribute this
+software and its documentation for any purpose and without
+fee is hereby granted, provided that the above copyright
+notice appear in all copies and that both that copyright
+notice and this permission notice appear in supporting
+documentation, and that the name of Silicon Graphics not be
+used in advertising or publicity pertaining to distribution
+of the software without specific prior written permission.
+Silicon Graphics makes no representation about the suitability
+of this software for any purpose. It is provided "as is"
+without any express or implied warranty.
+
+SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
+GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
+THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+********************************************************/
+
+#ifndef _X11_XKBLIB_H_
+#define _X11_XKBLIB_H_
+
+#include <X11/Xlib.h>
+#include <X11/extensions/XKBstr.h>
+
+typedef struct _XkbAnyEvent {
+ int type; /* XkbAnyEvent */
+ unsigned long serial; /* # of last req processed by server */
+ Bool send_event; /* is this from a SendEvent request? */
+ Display * display; /* Display the event was read from */
+ Time time; /* milliseconds */
+ int xkb_type; /* XKB event minor code */
+ unsigned int device; /* device ID */
+} XkbAnyEvent;
+
+typedef struct _XkbNewKeyboardNotify {
+ int type; /* XkbAnyEvent */
+ unsigned long serial; /* of last req processed by server */
+ Bool send_event; /* is this from a SendEvent request? */
+ Display * display; /* Display the event was read from */
+ Time time; /* milliseconds */
+ int xkb_type; /* XkbNewKeyboardNotify */
+ int device; /* device ID */
+ int old_device; /* device ID of previous keyboard */
+ int min_key_code; /* minimum key code */
+ int max_key_code; /* maximum key code */
+ int old_min_key_code;/* min key code of previous kbd */
+ int old_max_key_code;/* max key code of previous kbd */
+ unsigned int changed; /* changed aspects of the keyboard */
+ char req_major; /* major and minor opcode of req */
+ char req_minor; /* that caused change, if applicable */
+} XkbNewKeyboardNotifyEvent;
+
+typedef struct _XkbMapNotifyEvent {
+ int type; /* XkbAnyEvent */
+ unsigned long serial; /* of last req processed by server */
+ Bool send_event; /* is this from a SendEvent request */
+ Display * display; /* Display the event was read from */
+ Time time; /* milliseconds */
+ int xkb_type; /* XkbMapNotify */
+ int device; /* device ID */
+ unsigned int changed; /* fields which have been changed */
+ unsigned int flags; /* reserved */
+ int first_type; /* first changed key type */
+ int num_types; /* number of changed key types */
+ KeyCode min_key_code;
+ KeyCode max_key_code;
+ KeyCode first_key_sym;
+ KeyCode first_key_act;
+ KeyCode first_key_behavior;
+ KeyCode first_key_explicit;
+ KeyCode first_modmap_key;
+ KeyCode first_vmodmap_key;
+ int num_key_syms;
+ int num_key_acts;
+ int num_key_behaviors;
+ int num_key_explicit;
+ int num_modmap_keys;
+ int num_vmodmap_keys;
+ unsigned int vmods; /* mask of changed virtual mods */
+} XkbMapNotifyEvent;
+
+typedef struct _XkbStateNotifyEvent {
+ int type; /* XkbAnyEvent */
+ unsigned long serial; /* # of last req processed by server */
+ Bool send_event; /* is this from a SendEvent request? */
+ Display * display; /* Display the event was read from */
+ Time time; /* milliseconds */
+ int xkb_type; /* XkbStateNotify */
+ int device; /* device ID */
+ unsigned int changed; /* mask of changed state components */
+ int group; /* keyboard group */
+ int base_group; /* base keyboard group */
+ int latched_group; /* latched keyboard group */
+ int locked_group; /* locked keyboard group */
+ unsigned int mods; /* modifier state */
+ unsigned int base_mods; /* base modifier state */
+ unsigned int latched_mods; /* latched modifiers */
+ unsigned int locked_mods; /* locked modifiers */
+ int compat_state; /* compatibility state */
+ unsigned char grab_mods; /* mods used for grabs */
+ unsigned char compat_grab_mods;/* grab mods for non-XKB clients */
+ unsigned char lookup_mods; /* mods sent to clients */
+ unsigned char compat_lookup_mods; /* mods sent to non-XKB clients */
+ int ptr_buttons; /* pointer button state */
+ KeyCode keycode; /* keycode that caused the change */
+ char event_type; /* KeyPress or KeyRelease */
+ char req_major; /* Major opcode of request */
+ char req_minor; /* Minor opcode of request */
+} XkbStateNotifyEvent;
+
+typedef struct _XkbControlsNotify {
+ int type; /* XkbAnyEvent */
+ unsigned long serial; /* of last req processed by server */
+ Bool send_event; /* is this from a SendEvent request? */
+ Display * display; /* Display the event was read from */
+ Time time; /* milliseconds */
+ int xkb_type; /* XkbControlsNotify */
+ int device; /* device ID */
+ unsigned int changed_ctrls; /* controls with changed sub-values */
+ unsigned int enabled_ctrls; /* controls currently enabled */
+ unsigned int enabled_ctrl_changes;/* controls just {en,dis}abled */
+ int num_groups; /* total groups on keyboard */
+ KeyCode keycode; /* key that caused change or 0 */
+ char event_type; /* type of event that caused change */
+ char req_major; /* if keycode==0, major and minor */
+ char req_minor; /* opcode of req that caused change */
+} XkbControlsNotifyEvent;
+
+typedef struct _XkbIndicatorNotify {
+ int type; /* XkbAnyEvent */
+ unsigned long serial; /* of last req processed by server */
+ Bool send_event; /* is this from a SendEvent request? */
+ Display * display; /* Display the event was read from */
+ Time time; /* milliseconds */
+ int xkb_type; /* XkbIndicatorNotify */
+ int device; /* device ID */
+ unsigned int changed; /* indicators with new state or map */
+ unsigned int state; /* current state of all indicators */
+} XkbIndicatorNotifyEvent;
+
+typedef struct _XkbNamesNotify {
+ int type; /* XkbAnyEvent */
+ unsigned long serial; /* of last req processed by server */
+ Bool send_event; /* is this from a SendEvent request? */
+ Display * display; /* Display the event was read from */
+ Time time; /* milliseconds */
+ int xkb_type; /* XkbNamesNotify */
+ int device; /* device ID */
+ unsigned int changed; /* names that have changed */
+ int first_type; /* first key type with new name */
+ int num_types; /* number of key types with new names */
+ int first_lvl; /* first key type new new level names */
+ int num_lvls; /* # of key types w/new level names */
+ int num_aliases; /* total number of key aliases*/
+ int num_radio_groups;/* total number of radio groups */
+ unsigned int changed_vmods; /* virtual modifiers with new names */
+ unsigned int changed_groups; /* groups with new names */
+ unsigned int changed_indicators;/* indicators with new names */
+ int first_key; /* first key with new name */
+ int num_keys; /* number of keys with new names */
+} XkbNamesNotifyEvent;
+
+typedef struct _XkbCompatMapNotify {
+ int type; /* XkbAnyEvent */
+ unsigned long serial; /* of last req processed by server */
+ Bool send_event; /* is this from a SendEvent request? */
+ Display * display; /* Display the event was read from */
+ Time time; /* milliseconds */
+ int xkb_type; /* XkbCompatMapNotify */
+ int device; /* device ID */
+ unsigned int changed_groups; /* groups with new compat maps */
+ int first_si; /* first new symbol interp */
+ int num_si; /* number of new symbol interps */
+ int num_total_si; /* total # of symbol interps */
+} XkbCompatMapNotifyEvent;
+
+typedef struct _XkbBellNotify {
+ int type; /* XkbAnyEvent */
+ unsigned long serial; /* of last req processed by server */
+ Bool send_event; /* is this from a SendEvent request? */
+ Display * display; /* Display the event was read from */
+ Time time; /* milliseconds */
+ int xkb_type; /* XkbBellNotify */
+ int device; /* device ID */
+ int percent; /* requested volume as a % of maximum */
+ int pitch; /* requested pitch in Hz */
+ int duration; /* requested duration in useconds */
+ int bell_class; /* (input extension) feedback class */
+ int bell_id; /* (input extension) ID of feedback */
+ Atom name; /* "name" of requested bell */
+ Window window; /* window associated with event */
+ Bool event_only; /* "event only" requested */
+} XkbBellNotifyEvent;
+
+typedef struct _XkbActionMessage {
+ int type; /* XkbAnyEvent */
+ unsigned long serial; /* of last req processed by server */
+ Bool send_event; /* is this from a SendEvent request? */
+ Display * display; /* Display the event was read from */
+ Time time; /* milliseconds */
+ int xkb_type; /* XkbActionMessage */
+ int device; /* device ID */
+ KeyCode keycode; /* key that generated the event */
+ Bool press; /* true if act caused by key press */
+ Bool key_event_follows;/* true if key event also generated */
+ int group; /* effective group */
+ unsigned int mods; /* effective mods */
+ char message[XkbActionMessageLength+1];
+ /* message -- leave space for NUL */
+} XkbActionMessageEvent;
+
+typedef struct _XkbAccessXNotify {
+ int type; /* XkbAnyEvent */
+ unsigned long serial; /* of last req processed by server */
+ Bool send_event; /* is this from a SendEvent request? */
+ Display * display; /* Display the event was read from */
+ Time time; /* milliseconds */
+ int xkb_type; /* XkbAccessXNotify */
+ int device; /* device ID */
+ int detail; /* XkbAXN_* */
+ int keycode; /* key of event */
+ int sk_delay; /* current slow keys delay */
+ int debounce_delay; /* current debounce delay */
+} XkbAccessXNotifyEvent;
+
+typedef struct _XkbExtensionDeviceNotify {
+ int type; /* XkbAnyEvent */
+ unsigned long serial; /* of last req processed by server */
+ Bool send_event; /* is this from a SendEvent request? */
+ Display * display; /* Display the event was read from */
+ Time time; /* milliseconds */
+ int xkb_type; /* XkbExtensionDeviceNotify */
+ int device; /* device ID */
+ unsigned int reason; /* reason for the event */
+ unsigned int supported; /* mask of supported features */
+ unsigned int unsupported; /* mask of unsupported features */
+ /* that some app tried to use */
+ int first_btn; /* first button that changed */
+ int num_btns; /* range of buttons changed */
+ unsigned int leds_defined; /* indicators with names or maps */
+ unsigned int led_state; /* current state of the indicators */
+ int led_class; /* feedback class for led changes */
+ int led_id; /* feedback id for led changes */
+} XkbExtensionDeviceNotifyEvent;
+
+typedef union _XkbEvent {
+ int type;
+ XkbAnyEvent any;
+ XkbNewKeyboardNotifyEvent new_kbd;
+ XkbMapNotifyEvent map;
+ XkbStateNotifyEvent state;
+ XkbControlsNotifyEvent ctrls;
+ XkbIndicatorNotifyEvent indicators;
+ XkbNamesNotifyEvent names;
+ XkbCompatMapNotifyEvent compat;
+ XkbBellNotifyEvent bell;
+ XkbActionMessageEvent message;
+ XkbAccessXNotifyEvent accessx;
+ XkbExtensionDeviceNotifyEvent device;
+ XEvent core;
+} XkbEvent;
+
+typedef struct _XkbKbdDpyState XkbKbdDpyStateRec,*XkbKbdDpyStatePtr;
+
+ /* XkbOpenDisplay error codes */
+#define XkbOD_Success 0
+#define XkbOD_BadLibraryVersion 1
+#define XkbOD_ConnectionRefused 2
+#define XkbOD_NonXkbServer 3
+#define XkbOD_BadServerVersion 4
+
+ /* Values for XlibFlags */
+#define XkbLC_ForceLatin1Lookup (1<<0)
+#define XkbLC_ConsumeLookupMods (1<<1)
+#define XkbLC_AlwaysConsumeShiftAndLock (1<<2)
+#define XkbLC_IgnoreNewKeyboards (1<<3)
+#define XkbLC_ControlFallback (1<<4)
+#define XkbLC_ConsumeKeysOnComposeFail (1<<29)
+#define XkbLC_ComposeLED (1<<30)
+#define XkbLC_BeepOnComposeFail (1<<31)
+
+#define XkbLC_AllComposeControls (0xc0000000)
+#define XkbLC_AllControls (0xc000001f)
+
+_XFUNCPROTOBEGIN
+
+extern Bool XkbIgnoreExtension(
+ Bool /* ignore */
+);
+
+extern Display *XkbOpenDisplay(
+ char * /* name */,
+ int * /* ev_rtrn */,
+ int * /* err_rtrn */,
+ int * /* major_rtrn */,
+ int * /* minor_rtrn */,
+ int * /* reason */
+);
+
+extern Bool XkbQueryExtension(
+ Display * /* dpy */,
+ int * /* opcodeReturn */,
+ int * /* eventBaseReturn */,
+ int * /* errorBaseReturn */,
+ int * /* majorRtrn */,
+ int * /* minorRtrn */
+);
+
+extern Bool XkbUseExtension(
+ Display * /* dpy */,
+ int * /* major_rtrn */,
+ int * /* minor_rtrn */
+);
+
+extern Bool XkbLibraryVersion(
+ int * /* libMajorRtrn */,
+ int * /* libMinorRtrn */
+);
+
+extern unsigned int XkbSetXlibControls(
+ Display* /* dpy */,
+ unsigned int /* affect */,
+ unsigned int /* values */
+);
+
+extern unsigned int XkbGetXlibControls(
+ Display* /* dpy */
+);
+
+extern unsigned int XkbXlibControlsImplemented(void);
+
+typedef Atom (*XkbInternAtomFunc)(
+ Display * /* dpy */,
+ _Xconst char * /* name */,
+ Bool /* only_if_exists */
+);
+
+typedef char * (*XkbGetAtomNameFunc)(
+ Display * /* dpy */,
+ Atom /* atom */
+);
+
+extern void XkbSetAtomFuncs(
+ XkbInternAtomFunc /* getAtom */,
+ XkbGetAtomNameFunc /* getName */
+);
+
+extern KeySym XkbKeycodeToKeysym(
+ Display * /* dpy */,
+#if NeedWidePrototypes
+ unsigned int /* kc */,
+#else
+ KeyCode /* kc */,
+#endif
+ int /* group */,
+ int /* level */
+);
+
+extern unsigned int XkbKeysymToModifiers(
+ Display * /* dpy */,
+ KeySym /* ks */
+);
+
+extern Bool XkbLookupKeySym(
+ Display * /* dpy */,
+ KeyCode /* keycode */,
+ unsigned int /* modifiers */,
+ unsigned int * /* modifiers_return */,
+ KeySym * /* keysym_return */
+);
+
+extern int XkbLookupKeyBinding(
+ Display * /* dpy */,
+ KeySym /* sym_rtrn */,
+ unsigned int /* mods */,
+ char * /* buffer */,
+ int /* nbytes */,
+ int * /* extra_rtrn */
+);
+
+extern Bool XkbTranslateKeyCode(
+ XkbDescPtr /* xkb */,
+ KeyCode /* keycode */,
+ unsigned int /* modifiers */,
+ unsigned int * /* modifiers_return */,
+ KeySym * /* keysym_return */
+);
+
+extern int XkbTranslateKeySym(
+ Display * /* dpy */,
+ register KeySym * /* sym_return */,
+ unsigned int /* modifiers */,
+ char * /* buffer */,
+ int /* nbytes */,
+ int * /* extra_rtrn */
+);
+
+extern Bool XkbSetAutoRepeatRate(
+ Display * /* dpy */,
+ unsigned int /* deviceSpec */,
+ unsigned int /* delay */,
+ unsigned int /* interval */
+);
+
+extern Bool XkbGetAutoRepeatRate(
+ Display * /* dpy */,
+ unsigned int /* deviceSpec */,
+ unsigned int * /* delayRtrn */,
+ unsigned int * /* intervalRtrn */
+);
+
+extern Bool XkbChangeEnabledControls(
+ Display * /* dpy */,
+ unsigned int /* deviceSpec */,
+ unsigned int /* affect */,
+ unsigned int /* values */
+);
+
+extern Bool XkbDeviceBell(
+ Display * /* dpy */,
+ Window /* win */,
+ int /* deviceSpec */,
+ int /* bellClass */,
+ int /* bellID */,
+ int /* percent */,
+ Atom /* name */
+);
+
+extern Bool XkbForceDeviceBell(
+ Display * /* dpy */,
+ int /* deviceSpec */,
+ int /* bellClass */,
+ int /* bellID */,
+ int /* percent */
+);
+
+extern Bool XkbDeviceBellEvent(
+ Display * /* dpy */,
+ Window /* win */,
+ int /* deviceSpec */,
+ int /* bellClass */,
+ int /* bellID */,
+ int /* percent */,
+ Atom /* name */
+);
+
+extern Bool XkbBell(
+ Display * /* dpy */,
+ Window /* win */,
+ int /* percent */,
+ Atom /* name */
+);
+
+extern Bool XkbForceBell(
+ Display * /* dpy */,
+ int /* percent */
+);
+
+extern Bool XkbBellEvent(
+ Display * /* dpy */,
+ Window /* win */,
+ int /* percent */,
+ Atom /* name */
+);
+
+extern Bool XkbSelectEvents(
+ Display * /* dpy */,
+ unsigned int /* deviceID */,
+ unsigned int /* affect */,
+ unsigned int /* values */
+);
+
+extern Bool XkbSelectEventDetails(
+ Display * /* dpy */,
+ unsigned int /* deviceID */,
+ unsigned int /* eventType */,
+ unsigned long /* affect */,
+ unsigned long /* details */
+);
+
+extern void XkbNoteMapChanges(
+ XkbMapChangesPtr /* old */,
+ XkbMapNotifyEvent * /* new */,
+ unsigned int /* wanted */
+);
+
+extern void XkbNoteNameChanges(
+ XkbNameChangesPtr /* old */,
+ XkbNamesNotifyEvent * /* new */,
+ unsigned int /* wanted */
+);
+
+extern Status XkbGetIndicatorState(
+ Display * /* dpy */,
+ unsigned int /* deviceSpec */,
+ unsigned int * /* pStateRtrn */
+);
+
+extern Status XkbGetDeviceIndicatorState(
+ Display * /* dpy */,
+ unsigned int /* deviceSpec */,
+ unsigned int /* ledClass */,
+ unsigned int /* ledID */,
+ unsigned int * /* pStateRtrn */
+);
+
+extern Status XkbGetIndicatorMap(
+ Display * /* dpy */,
+ unsigned long /* which */,
+ XkbDescPtr /* desc */
+);
+
+extern Bool XkbSetIndicatorMap(
+ Display * /* dpy */,
+ unsigned long /* which */,
+ XkbDescPtr /* desc */
+);
+
+#define XkbNoteIndicatorMapChanges(o,n,w) \
+ ((o)->map_changes|=((n)->map_changes&(w)))
+#define XkbNoteIndicatorStateChanges(o,n,w)\
+ ((o)->state_changes|=((n)->state_changes&(w)))
+#define XkbGetIndicatorMapChanges(d,x,c) \
+ (XkbGetIndicatorMap((d),(c)->map_changes,x))
+#define XkbChangeIndicatorMaps(d,x,c) \
+ (XkbSetIndicatorMap((d),(c)->map_changes,x))
+
+extern Bool XkbGetNamedIndicator(
+ Display * /* dpy */,
+ Atom /* name */,
+ int * /* pNdxRtrn */,
+ Bool * /* pStateRtrn */,
+ XkbIndicatorMapPtr /* pMapRtrn */,
+ Bool * /* pRealRtrn */
+);
+
+extern Bool XkbGetNamedDeviceIndicator(
+ Display * /* dpy */,
+ unsigned int /* deviceSpec */,
+ unsigned int /* ledClass */,
+ unsigned int /* ledID */,
+ Atom /* name */,
+ int * /* pNdxRtrn */,
+ Bool * /* pStateRtrn */,
+ XkbIndicatorMapPtr /* pMapRtrn */,
+ Bool * /* pRealRtrn */
+);
+
+extern Bool XkbSetNamedIndicator(
+ Display * /* dpy */,
+ Atom /* name */,
+ Bool /* changeState */,
+ Bool /* state */,
+ Bool /* createNewMap */,
+ XkbIndicatorMapPtr /* pMap */
+);
+
+extern Bool XkbSetNamedDeviceIndicator(
+ Display * /* dpy */,
+ unsigned int /* deviceSpec */,
+ unsigned int /* ledClass */,
+ unsigned int /* ledID */,
+ Atom /* name */,
+ Bool /* changeState */,
+ Bool /* state */,
+ Bool /* createNewMap */,
+ XkbIndicatorMapPtr /* pMap */
+);
+
+extern Bool XkbLockModifiers(
+ Display * /* dpy */,
+ unsigned int /* deviceSpec */,
+ unsigned int /* affect */,
+ unsigned int /* values */
+);
+
+extern Bool XkbLatchModifiers(
+ Display * /* dpy */,
+ unsigned int /* deviceSpec */,
+ unsigned int /* affect */,
+ unsigned int /* values */
+);
+
+extern Bool XkbLockGroup(
+ Display * /* dpy */,
+ unsigned int /* deviceSpec */,
+ unsigned int /* group */
+);
+
+extern Bool XkbLatchGroup(
+ Display * /* dpy */,
+ unsigned int /* deviceSpec */,
+ unsigned int /* group */
+);
+
+extern Bool XkbSetServerInternalMods(
+ Display * /* dpy */,
+ unsigned int /* deviceSpec */,
+ unsigned int /* affectReal */,
+ unsigned int /* realValues */,
+ unsigned int /* affectVirtual */,
+ unsigned int /* virtualValues */
+);
+
+extern Bool XkbSetIgnoreLockMods(
+ Display * /* dpy */,
+ unsigned int /* deviceSpec */,
+ unsigned int /* affectReal */,
+ unsigned int /* realValues */,
+ unsigned int /* affectVirtual */,
+ unsigned int /* virtualValues */
+);
+
+
+extern Bool XkbVirtualModsToReal(
+ XkbDescPtr /* xkb */,
+ unsigned int /* virtual_mask */,
+ unsigned int * /* mask_rtrn */
+);
+
+extern Bool XkbComputeEffectiveMap(
+ XkbDescPtr /* xkb */,
+ XkbKeyTypePtr /* type */,
+ unsigned char * /* map_rtrn */
+);
+
+extern Status XkbInitCanonicalKeyTypes(
+ XkbDescPtr /* xkb */,
+ unsigned int /* which */,
+ int /* keypadVMod */
+);
+
+extern XkbDescPtr XkbAllocKeyboard(
+ void
+);
+
+extern void XkbFreeKeyboard(
+ XkbDescPtr /* xkb */,
+ unsigned int /* which */,
+ Bool /* freeDesc */
+);
+
+extern Status XkbAllocClientMap(
+ XkbDescPtr /* xkb */,
+ unsigned int /* which */,
+ unsigned int /* nTypes */
+);
+
+extern Status XkbAllocServerMap(
+ XkbDescPtr /* xkb */,
+ unsigned int /* which */,
+ unsigned int /* nActions */
+);
+
+extern void XkbFreeClientMap(
+ XkbDescPtr /* xkb */,
+ unsigned int /* what */,
+ Bool /* freeMap */
+);
+
+extern void XkbFreeServerMap(
+ XkbDescPtr /* xkb */,
+ unsigned int /* what */,
+ Bool /* freeMap */
+);
+
+extern XkbKeyTypePtr XkbAddKeyType(
+ XkbDescPtr /* xkb */,
+ Atom /* name */,
+ int /* map_count */,
+ Bool /* want_preserve */,
+ int /* num_lvls */
+);
+
+extern Status XkbAllocIndicatorMaps(
+ XkbDescPtr /* xkb */
+);
+
+extern void XkbFreeIndicatorMaps(
+ XkbDescPtr /* xkb */
+);
+
+extern XkbDescPtr XkbGetMap(
+ Display * /* dpy */,
+ unsigned int /* which */,
+ unsigned int /* deviceSpec */
+);
+
+extern Status XkbGetUpdatedMap(
+ Display * /* dpy */,
+ unsigned int /* which */,
+ XkbDescPtr /* desc */
+);
+
+extern Status XkbGetMapChanges(
+ Display * /* dpy */,
+ XkbDescPtr /* xkb */,
+ XkbMapChangesPtr /* changes */
+);
+
+
+extern Status XkbRefreshKeyboardMapping(
+ XkbMapNotifyEvent * /* event */
+);
+
+extern Status XkbGetKeyTypes(
+ Display * /* dpy */,
+ unsigned int /* first */,
+ unsigned int /* num */,
+ XkbDescPtr /* xkb */
+);
+
+extern Status XkbGetKeySyms(
+ Display * /* dpy */,
+ unsigned int /* first */,
+ unsigned int /* num */,
+ XkbDescPtr /* xkb */
+);
+
+extern Status XkbGetKeyActions(
+ Display * /* dpy */,
+ unsigned int /* first */,
+ unsigned int /* num */,
+ XkbDescPtr /* xkb */
+);
+
+extern Status XkbGetKeyBehaviors(
+ Display * /* dpy */,
+ unsigned int /* firstKey */,
+ unsigned int /* nKeys */,
+ XkbDescPtr /* desc */
+);
+
+extern Status XkbGetVirtualMods(
+ Display * /* dpy */,
+ unsigned int /* which */,
+ XkbDescPtr /* desc */
+);
+
+extern Status XkbGetKeyExplicitComponents(
+ Display * /* dpy */,
+ unsigned int /* firstKey */,
+ unsigned int /* nKeys */,
+ XkbDescPtr /* desc */
+);
+
+extern Status XkbGetKeyModifierMap(
+ Display * /* dpy */,
+ unsigned int /* firstKey */,
+ unsigned int /* nKeys */,
+ XkbDescPtr /* desc */
+);
+
+extern Status XkbGetKeyVirtualModMap(
+ Display * /* dpy */,
+ unsigned int /* first */,
+ unsigned int /* num */,
+ XkbDescPtr /* xkb */
+);
+
+extern Status XkbAllocControls(
+ XkbDescPtr /* xkb */,
+ unsigned int /* which*/
+);
+
+extern void XkbFreeControls(
+ XkbDescPtr /* xkb */,
+ unsigned int /* which */,
+ Bool /* freeMap */
+);
+
+extern Status XkbGetControls(
+ Display * /* dpy */,
+ unsigned long /* which */,
+ XkbDescPtr /* desc */
+);
+
+extern Bool XkbSetControls(
+ Display * /* dpy */,
+ unsigned long /* which */,
+ XkbDescPtr /* desc */
+);
+
+extern void XkbNoteControlsChanges(
+ XkbControlsChangesPtr /* old */,
+ XkbControlsNotifyEvent * /* new */,
+ unsigned int /* wanted */
+);
+
+#define XkbGetControlsChanges(d,x,c) XkbGetControls(d,(c)->changed_ctrls,x)
+#define XkbChangeControls(d,x,c) XkbSetControls(d,(c)->changed_ctrls,x)
+
+extern Status XkbAllocCompatMap(
+ XkbDescPtr /* xkb */,
+ unsigned int /* which */,
+ unsigned int /* nInterpret */
+);
+
+extern void XkbFreeCompatMap(
+ XkbDescPtr /* xkb */,
+ unsigned int /* which */,
+ Bool /* freeMap */
+);
+
+extern Status XkbGetCompatMap(
+ Display * /* dpy */,
+ unsigned int /* which */,
+ XkbDescPtr /* xkb */
+);
+
+extern Bool XkbSetCompatMap(
+ Display * /* dpy */,
+ unsigned int /* which */,
+ XkbDescPtr /* xkb */,
+ Bool /* updateActions */
+);
+
+extern XkbSymInterpretPtr XkbAddSymInterpret(
+ XkbDescPtr /* xkb */,
+ XkbSymInterpretPtr /* si */,
+ Bool /* updateMap */,
+ XkbChangesPtr /* changes */
+);
+
+extern Status XkbAllocNames(
+ XkbDescPtr /* xkb */,
+ unsigned int /* which */,
+ int /* nTotalRG */,
+ int /* nTotalAliases */
+);
+
+extern Status XkbGetNames(
+ Display * /* dpy */,
+ unsigned int /* which */,
+ XkbDescPtr /* desc */
+);
+
+extern Bool XkbSetNames(
+ Display * /* dpy */,
+ unsigned int /* which */,
+ unsigned int /* firstType */,
+ unsigned int /* nTypes */,
+ XkbDescPtr /* desc */
+);
+
+extern Bool XkbChangeNames(
+ Display * /* dpy */,
+ XkbDescPtr /* xkb */,
+ XkbNameChangesPtr /* changes */
+);
+
+extern void XkbFreeNames(
+ XkbDescPtr /* xkb */,
+ unsigned int /* which */,
+ Bool /* freeMap */
+);
+
+
+extern Status XkbGetState(
+ Display * /* dpy */,
+ unsigned int /* deviceSpec */,
+ XkbStatePtr /* rtrnState */
+);
+
+extern Bool XkbSetMap(
+ Display * /* dpy */,
+ unsigned int /* which */,
+ XkbDescPtr /* desc */
+);
+
+extern Bool XkbChangeMap(
+ Display* /* dpy */,
+ XkbDescPtr /* desc */,
+ XkbMapChangesPtr /* changes */
+);
+
+extern Bool XkbSetDetectableAutoRepeat(
+ Display * /* dpy */,
+ Bool /* detectable */,
+ Bool * /* supported */
+);
+
+extern Bool XkbGetDetectableAutoRepeat(
+ Display * /* dpy */,
+ Bool * /* supported */
+);
+
+extern Bool XkbSetAutoResetControls(
+ Display * /* dpy */,
+ unsigned int /* changes */,
+ unsigned int * /* auto_ctrls */,
+ unsigned int * /* auto_values */
+);
+
+extern Bool XkbGetAutoResetControls(
+ Display * /* dpy */,
+ unsigned int * /* auto_ctrls */,
+ unsigned int * /* auto_ctrl_values */
+);
+
+extern Bool XkbSetPerClientControls(
+ Display * /* dpy */,
+ unsigned int /* change */,
+ unsigned int * /* values */
+);
+
+extern Bool XkbGetPerClientControls(
+ Display * /* dpy */,
+ unsigned int * /* ctrls */
+);
+
+extern Status XkbCopyKeyType(
+ XkbKeyTypePtr /* from */,
+ XkbKeyTypePtr /* into */
+);
+
+extern Status XkbCopyKeyTypes(
+ XkbKeyTypePtr /* from */,
+ XkbKeyTypePtr /* into */,
+ int /* num_types */
+);
+
+extern Status XkbResizeKeyType(
+ XkbDescPtr /* xkb */,
+ int /* type_ndx */,
+ int /* map_count */,
+ Bool /* want_preserve */,
+ int /* new_num_lvls */
+);
+
+extern KeySym *XkbResizeKeySyms(
+ XkbDescPtr /* desc */,
+ int /* forKey */,
+ int /* symsNeeded */
+);
+
+extern XkbAction *XkbResizeKeyActions(
+ XkbDescPtr /* desc */,
+ int /* forKey */,
+ int /* actsNeeded */
+);
+
+extern Status XkbChangeTypesOfKey(
+ XkbDescPtr /* xkb */,
+ int /* key */,
+ int /* num_groups */,
+ unsigned int /* groups */,
+ int * /* newTypes */,
+ XkbMapChangesPtr /* pChanges */
+);
+
+extern Status XkbChangeKeycodeRange(
+ XkbDescPtr /* xkb */,
+ int /* minKC */,
+ int /* maxKC */,
+ XkbChangesPtr /* changes */
+);
+
+/***====================================================================***/
+
+extern XkbComponentListPtr XkbListComponents(
+ Display * /* dpy */,
+ unsigned int /* deviceSpec */,
+ XkbComponentNamesPtr /* ptrns */,
+ int * /* max_inout */
+);
+
+extern void XkbFreeComponentList(
+ XkbComponentListPtr /* list */
+);
+
+extern XkbDescPtr XkbGetKeyboard(
+ Display * /* dpy */,
+ unsigned int /* which */,
+ unsigned int /* deviceSpec */
+);
+
+extern XkbDescPtr XkbGetKeyboardByName(
+ Display * /* dpy */,
+ unsigned int /* deviceSpec */,
+ XkbComponentNamesPtr /* names */,
+ unsigned int /* want */,
+ unsigned int /* need */,
+ Bool /* load */
+);
+
+/***====================================================================***/
+
+extern int XkbKeyTypesForCoreSymbols( /* returns # of groups */
+ XkbDescPtr /* xkb */, /* keyboard device */
+ int /* map_width */, /* width of core KeySym array */
+ KeySym * /* core_syms */, /* always mapWidth symbols */
+ unsigned int /* protected */, /* explicit key types */
+ int * /* types_inout */, /* always four type indices */
+ KeySym * /* xkb_syms_rtrn */ /* must have enough space */
+);
+
+extern Bool XkbApplyCompatMapToKey( /* False only on error */
+ XkbDescPtr /* xkb */, /* keymap to be edited */
+ KeyCode /* key */, /* key to be updated */
+ XkbChangesPtr /* changes */ /* resulting changes to map */
+);
+
+extern Bool XkbUpdateMapFromCore( /* False only on error */
+ XkbDescPtr /* xkb */, /* XKB keyboard to be edited */
+ KeyCode /* first_key */, /* first changed key */
+ int /* num_keys */, /* number of changed keys */
+ int /* map_width */, /* width of core keymap */
+ KeySym * /* core_keysyms */, /* symbols from core keymap */
+ XkbChangesPtr /* changes */ /* resulting changes */
+);
+
+/***====================================================================***/
+
+extern XkbDeviceLedInfoPtr XkbAddDeviceLedInfo(
+ XkbDeviceInfoPtr /* devi */,
+ unsigned int /* ledClass */,
+ unsigned int /* ledId */
+);
+
+extern Status XkbResizeDeviceButtonActions(
+ XkbDeviceInfoPtr /* devi */,
+ unsigned int /* newTotal */
+);
+
+extern XkbDeviceInfoPtr XkbAllocDeviceInfo(
+ unsigned int /* deviceSpec */,
+ unsigned int /* nButtons */,
+ unsigned int /* szLeds */
+);
+
+extern void XkbFreeDeviceInfo(
+ XkbDeviceInfoPtr /* devi */,
+ unsigned int /* which */,
+ Bool /* freeDevI */
+);
+
+extern void XkbNoteDeviceChanges(
+ XkbDeviceChangesPtr /* old */,
+ XkbExtensionDeviceNotifyEvent * /* new */,
+ unsigned int /* wanted */
+);
+
+extern XkbDeviceInfoPtr XkbGetDeviceInfo(
+ Display * /* dpy */,
+ unsigned int /* which */,
+ unsigned int /* deviceSpec */,
+ unsigned int /* ledClass */,
+ unsigned int /* ledID */
+);
+
+extern Status XkbGetDeviceInfoChanges(
+ Display * /* dpy */,
+ XkbDeviceInfoPtr /* devi */,
+ XkbDeviceChangesPtr /* changes */
+);
+
+extern Status XkbGetDeviceButtonActions(
+ Display * /* dpy */,
+ XkbDeviceInfoPtr /* devi */,
+ Bool /* all */,
+ unsigned int /* first */,
+ unsigned int /* nBtns */
+);
+
+extern Status XkbGetDeviceLedInfo(
+ Display * /* dpy */,
+ XkbDeviceInfoPtr /* devi */,
+ unsigned int /* ledClass (class, XIDflt, XIAll) */,
+ unsigned int /* ledId (id, XIDflt, XIAll) */,
+ unsigned int /* which (XkbXI_Indicator{Names,Map}Mask */
+);
+
+extern Bool XkbSetDeviceInfo(
+ Display * /* dpy */,
+ unsigned int /* which */,
+ XkbDeviceInfoPtr /* devi */
+);
+
+extern Bool XkbChangeDeviceInfo(
+ Display* /* dpy */,
+ XkbDeviceInfoPtr /* desc */,
+ XkbDeviceChangesPtr /* changes */
+);
+
+extern Bool XkbSetDeviceLedInfo(
+ Display * /* dpy */,
+ XkbDeviceInfoPtr /* devi */,
+ unsigned int /* ledClass */,
+ unsigned int /* ledID */,
+ unsigned int /* which */
+);
+
+extern Bool XkbSetDeviceButtonActions(
+ Display * /* dpy */,
+ XkbDeviceInfoPtr /* devi */,
+ unsigned int /* first */,
+ unsigned int /* nBtns */
+);
+
+/***====================================================================***/
+
+extern char XkbToControl(
+ char /* c */
+);
+
+/***====================================================================***/
+
+extern Bool XkbSetDebuggingFlags(
+ Display * /* dpy */,
+ unsigned int /* mask */,
+ unsigned int /* flags */,
+ char * /* msg */,
+ unsigned int /* ctrls_mask */,
+ unsigned int /* ctrls */,
+ unsigned int * /* rtrn_flags */,
+ unsigned int * /* rtrn_ctrls */
+);
+
+extern Bool XkbApplyVirtualModChanges(
+ XkbDescPtr /* xkb */,
+ unsigned int /* changed */,
+ XkbChangesPtr /* changes */
+);
+
+extern Bool XkbUpdateActionVirtualMods(
+ XkbDescPtr /* xkb */,
+ XkbAction * /* act */,
+ unsigned int /* changed */
+);
+
+extern void XkbUpdateKeyTypeVirtualMods(
+ XkbDescPtr /* xkb */,
+ XkbKeyTypePtr /* type */,
+ unsigned int /* changed */,
+ XkbChangesPtr /* changes */
+);
+
+_XFUNCPROTOEND
+
+#endif /* _X11_XKBLIB_H_ */
diff --git a/system/include/X11/Xfuncs.h b/system/include/X11/Xfuncs.h
new file mode 100644
index 00000000..2bcf991a
--- /dev/null
+++ b/system/include/X11/Xfuncs.h
@@ -0,0 +1,69 @@
+/*
+ *
+Copyright 1990, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+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
+OPEN GROUP 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.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+ *
+ */
+
+#ifndef _XFUNCS_H_
+# define _XFUNCS_H_
+
+# include <X11/Xosdefs.h>
+
+/* the old Xfuncs.h, for pre-R6 */
+# if !(defined(XFree86LOADER) && defined(IN_MODULE))
+
+# ifdef X_USEBFUNCS
+void bcopy();
+void bzero();
+int bcmp();
+# else
+# if defined(SYSV) && !defined(__SCO__) && !defined(__sun) && !defined(__UNIXWARE__)
+# include <memory.h>
+void bcopy();
+# define bzero(b,len) memset(b, 0, len)
+# define bcmp(b1,b2,len) memcmp(b1, b2, len)
+# else
+# include <string.h>
+# if defined(__SCO__) || defined(__sun) || defined(__UNIXWARE__) || defined(__CYGWIN__)
+# include <strings.h>
+# endif
+# define _XFUNCS_H_INCLUDED_STRING_H
+# endif
+# endif /* X_USEBFUNCS */
+
+/* the new Xfuncs.h */
+
+/* the ANSI C way */
+# ifndef _XFUNCS_H_INCLUDED_STRING_H
+# include <string.h>
+# endif
+# undef bzero
+# define bzero(b,len) memset(b,0,len)
+
+# if defined WIN32 && defined __MINGW32__
+# define bcopy(b1,b2,len) memmove(b2, b1, (size_t)(len))
+# endif
+
+# endif /* !(defined(XFree86LOADER) && defined(IN_MODULE)) */
+
+#endif /* _XFUNCS_H_ */
diff --git a/system/include/X11/XlibConf.h b/system/include/X11/XlibConf.h
new file mode 100644
index 00000000..9f9b9403
--- /dev/null
+++ b/system/include/X11/XlibConf.h
@@ -0,0 +1,38 @@
+/* include/X11/XlibConf.h. Generated from XlibConf.h.in by configure. */
+/*
+ * Copyright © 2005 Keith Packard
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Keith Packard not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. Keith Packard makes no
+ * representations about the suitability of this software for any purpose. It
+ * is provided "as is" without express or implied warranty.
+ *
+ * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifndef _XLIBCONF_H_
+#define _XLIBCONF_H_
+/*
+ * This header file exports defines necessary to correctly
+ * use Xlibint.h both inside Xlib and by external libraries
+ * such as extensions.
+ */
+
+/* Threading support? */
+#define XTHREADS 1
+
+/* Use multi-threaded libc functions? */
+#define XUSE_MTSAFE_API 1
+
+#endif /* _XLIBCONF_H_ */
diff --git a/system/include/X11/Xlibint.h b/system/include/X11/Xlibint.h
new file mode 100644
index 00000000..d04e8fd1
--- /dev/null
+++ b/system/include/X11/Xlibint.h
@@ -0,0 +1,1387 @@
+
+/*
+
+Copyright 1984, 1985, 1987, 1989, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+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 OPEN GROUP 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.
+
+Except as contained in this notice, the name of The Open Group shall
+not be used in advertising or otherwise to promote the sale, use or
+other dealings in this Software without prior written authorization
+from The Open Group.
+
+*/
+
+#ifndef _X11_XLIBINT_H_
+#define _X11_XLIBINT_H_ 1
+
+/*
+ * Xlibint.h - Header definition and support file for the internal
+ * support routines used by the C subroutine interface
+ * library (Xlib) to the X Window System.
+ *
+ * Warning, there be dragons here....
+ */
+
+#include <X11/Xlib.h>
+#include <X11/Xproto.h> /* to declare xEvent */
+#include <X11/XlibConf.h> /* for configured options like XTHREADS */
+
+#ifdef WIN32
+#define _XFlush _XFlushIt
+#endif
+
+/*
+ * If your BytesReadable correctly detects broken connections, then
+ * you should NOT define XCONN_CHECK_FREQ.
+ */
+#ifndef XCONN_CHECK_FREQ
+#define XCONN_CHECK_FREQ 256
+#endif
+
+struct _XGC
+{
+ XExtData *ext_data; /* hook for extension to hang data */
+ GContext gid; /* protocol ID for graphics context */
+ Bool rects; /* boolean: TRUE if clipmask is list of rectangles */
+ Bool dashes; /* boolean: TRUE if dash-list is really a list */
+ unsigned long dirty;/* cache dirty bits */
+ XGCValues values; /* shadow structure of values */
+};
+
+struct _XDisplay
+{
+ XExtData *ext_data; /* hook for extension to hang data */
+ struct _XFreeFuncs *free_funcs; /* internal free functions */
+ int fd; /* Network socket. */
+ int conn_checker; /* ugly thing used by _XEventsQueued */
+ int proto_major_version;/* maj. version of server's X protocol */
+ int proto_minor_version;/* minor version of server's X protocol */
+ char *vendor; /* vendor of the server hardware */
+ XID resource_base; /* resource ID base */
+ XID resource_mask; /* resource ID mask bits */
+ XID resource_id; /* allocator current ID */
+ int resource_shift; /* allocator shift to correct bits */
+ XID (*resource_alloc)( /* allocator function */
+ struct _XDisplay*
+ );
+ int byte_order; /* screen byte order, LSBFirst, MSBFirst */
+ int bitmap_unit; /* padding and data requirements */
+ int bitmap_pad; /* padding requirements on bitmaps */
+ int bitmap_bit_order; /* LeastSignificant or MostSignificant */
+ int nformats; /* number of pixmap formats in list */
+ ScreenFormat *pixmap_format; /* pixmap format list */
+ int vnumber; /* Xlib's X protocol version number. */
+ int release; /* release of the server */
+ struct _XSQEvent *head, *tail; /* Input event queue. */
+ int qlen; /* Length of input event queue */
+ unsigned long last_request_read; /* seq number of last event read */
+ unsigned long request; /* sequence number of last request. */
+ char *last_req; /* beginning of last request, or dummy */
+ char *buffer; /* Output buffer starting address. */
+ char *bufptr; /* Output buffer index pointer. */
+ char *bufmax; /* Output buffer maximum+1 address. */
+ unsigned max_request_size; /* maximum number 32 bit words in request*/
+ struct _XrmHashBucketRec *db;
+ int (*synchandler)( /* Synchronization handler */
+ struct _XDisplay*
+ );
+ char *display_name; /* "host:display" string used on this connect*/
+ int default_screen; /* default screen for operations */
+ int nscreens; /* number of screens on this server*/
+ Screen *screens; /* pointer to list of screens */
+ unsigned long motion_buffer; /* size of motion buffer */
+ volatile unsigned long flags; /* internal connection flags */
+ int min_keycode; /* minimum defined keycode */
+ int max_keycode; /* maximum defined keycode */
+ KeySym *keysyms; /* This server's keysyms */
+ XModifierKeymap *modifiermap; /* This server's modifier keymap */
+ int keysyms_per_keycode;/* number of rows */
+ char *xdefaults; /* contents of defaults from server */
+ char *scratch_buffer; /* place to hang scratch buffer */
+ unsigned long scratch_length; /* length of scratch buffer */
+ int ext_number; /* extension number on this display */
+ struct _XExten *ext_procs; /* extensions initialized on this display */
+ /*
+ * the following can be fixed size, as the protocol defines how
+ * much address space is available.
+ * While this could be done using the extension vector, there
+ * may be MANY events processed, so a search through the extension
+ * list to find the right procedure for each event might be
+ * expensive if many extensions are being used.
+ */
+ Bool (*event_vec[128])( /* vector for wire to event */
+ Display * /* dpy */,
+ XEvent * /* re */,
+ xEvent * /* event */
+ );
+ Status (*wire_vec[128])( /* vector for event to wire */
+ Display * /* dpy */,
+ XEvent * /* re */,
+ xEvent * /* event */
+ );
+ KeySym lock_meaning; /* for XLookupString */
+ struct _XLockInfo *lock; /* multi-thread state, display lock */
+ struct _XInternalAsync *async_handlers; /* for internal async */
+ unsigned long bigreq_size; /* max size of big requests */
+ struct _XLockPtrs *lock_fns; /* pointers to threads functions */
+ void (*idlist_alloc)( /* XID list allocator function */
+ Display * /* dpy */,
+ XID * /* ids */,
+ int /* count */
+ );
+ /* things above this line should not move, for binary compatibility */
+ struct _XKeytrans *key_bindings; /* for XLookupString */
+ Font cursor_font; /* for XCreateFontCursor */
+ struct _XDisplayAtoms *atoms; /* for XInternAtom */
+ unsigned int mode_switch; /* keyboard group modifiers */
+ unsigned int num_lock; /* keyboard numlock modifiers */
+ struct _XContextDB *context_db; /* context database */
+ Bool (**error_vec)( /* vector for wire to error */
+ Display * /* display */,
+ XErrorEvent * /* he */,
+ xError * /* we */
+ );
+ /*
+ * Xcms information
+ */
+ struct {
+ XPointer defaultCCCs; /* pointer to an array of default XcmsCCC */
+ XPointer clientCmaps; /* pointer to linked list of XcmsCmapRec */
+ XPointer perVisualIntensityMaps;
+ /* linked list of XcmsIntensityMap */
+ } cms;
+ struct _XIMFilter *im_filters;
+ struct _XSQEvent *qfree; /* unallocated event queue elements */
+ unsigned long next_event_serial_num; /* inserted into next queue elt */
+ struct _XExten *flushes; /* Flush hooks */
+ struct _XConnectionInfo *im_fd_info; /* _XRegisterInternalConnection */
+ int im_fd_length; /* number of im_fd_info */
+ struct _XConnWatchInfo *conn_watchers; /* XAddConnectionWatch */
+ int watcher_count; /* number of conn_watchers */
+ XPointer filedes; /* struct pollfd cache for _XWaitForReadable */
+ int (*savedsynchandler)( /* user synchandler when Xlib usurps */
+ Display * /* dpy */
+ );
+ XID resource_max; /* allocator max ID */
+ int xcmisc_opcode; /* major opcode for XC-MISC */
+ struct _XkbInfoRec *xkb_info; /* XKB info */
+ struct _XtransConnInfo *trans_conn; /* transport connection object */
+ struct _X11XCBPrivate *xcb; /* XCB glue private data */
+
+ /* Generic event cookie handling */
+ unsigned int next_cookie; /* next event cookie */
+ /* vector for wire to generic event, index is (extension - 128) */
+ Bool (*generic_event_vec[128])(
+ Display * /* dpy */,
+ XGenericEventCookie * /* Xlib event */,
+ xEvent * /* wire event */);
+ /* vector for event copy, index is (extension - 128) */
+ Bool (*generic_event_copy_vec[128])(
+ Display * /* dpy */,
+ XGenericEventCookie * /* in */,
+ XGenericEventCookie * /* out*/);
+ void *cookiejar; /* cookie events returned but not claimed */
+};
+
+#define XAllocIDs(dpy,ids,n) (*(dpy)->idlist_alloc)(dpy,ids,n)
+
+/*
+ * define the following if you want the Data macro to be a procedure instead
+ */
+#ifdef CRAY
+#define DataRoutineIsProcedure
+#endif /* CRAY */
+
+#ifndef _XEVENT_
+/*
+ * _QEvent datatype for use in input queueing.
+ */
+typedef struct _XSQEvent
+{
+ struct _XSQEvent *next;
+ XEvent event;
+ unsigned long qserial_num; /* so multi-threaded code can find new ones */
+} _XQEvent;
+#endif
+
+#include <X11/Xproto.h>
+#ifdef __sgi
+#define _SGI_MP_SOURCE /* turn this on to get MP safe errno */
+#endif
+#include <errno.h>
+#define _XBCOPYFUNC _Xbcopy
+#include <X11/Xfuncs.h>
+#include <X11/Xosdefs.h>
+
+/* Utek leaves kernel macros around in include files (bleah) */
+#ifdef dirty
+#undef dirty
+#endif
+
+#include <stdlib.h>
+#include <string.h>
+
+#include <X11/Xfuncproto.h>
+
+_XFUNCPROTOBEGIN
+
+/*
+ * The following definitions can be used for locking requests in multi-threaded
+ * address spaces.
+ */
+#ifdef XTHREADS
+/* Author: Stephen Gildea, MIT X Consortium
+ *
+ * declarations for C Threads locking
+ */
+
+typedef struct _LockInfoRec *LockInfoPtr;
+
+/* interfaces for locking.c */
+struct _XLockPtrs {
+ /* used by all, including extensions; do not move */
+ void (*lock_display)(
+ Display *dpy
+#if defined(XTHREADS_WARN) || defined(XTHREADS_FILE_LINE)
+ , char *file
+ , int line
+#endif
+ );
+ void (*unlock_display)(
+ Display *dpy
+#if defined(XTHREADS_WARN) || defined(XTHREADS_FILE_LINE)
+ , char *file
+ , int line
+#endif
+ );
+};
+
+#if defined(WIN32) && !defined(_XLIBINT_)
+#define _XCreateMutex_fn (*_XCreateMutex_fn_p)
+#define _XFreeMutex_fn (*_XFreeMutex_fn_p)
+#define _XLockMutex_fn (*_XLockMutex_fn_p)
+#define _XUnlockMutex_fn (*_XUnlockMutex_fn_p)
+#define _Xglobal_lock (*_Xglobal_lock_p)
+#endif
+
+/* in XlibInt.c */
+extern void (*_XCreateMutex_fn)(
+ LockInfoPtr /* lock */
+);
+extern void (*_XFreeMutex_fn)(
+ LockInfoPtr /* lock */
+);
+extern void (*_XLockMutex_fn)(
+ LockInfoPtr /* lock */
+#if defined(XTHREADS_WARN) || defined(XTHREADS_FILE_LINE)
+ , char * /* file */
+ , int /* line */
+#endif
+);
+extern void (*_XUnlockMutex_fn)(
+ LockInfoPtr /* lock */
+#if defined(XTHREADS_WARN) || defined(XTHREADS_FILE_LINE)
+ , char * /* file */
+ , int /* line */
+#endif
+);
+
+extern LockInfoPtr _Xglobal_lock;
+
+#if defined(XTHREADS_WARN) || defined(XTHREADS_FILE_LINE)
+#define LockDisplay(d) if ((d)->lock_fns) (*(d)->lock_fns->lock_display)((d),__FILE__,__LINE__)
+#define UnlockDisplay(d) if ((d)->lock_fns) (*(d)->lock_fns->unlock_display)((d),__FILE__,__LINE__)
+#define _XLockMutex(lock) if (_XLockMutex_fn) (*_XLockMutex_fn)(lock,__FILE__,__LINE__)
+#define _XUnlockMutex(lock) if (_XUnlockMutex_fn) (*_XUnlockMutex_fn)(lock,__FILE__,__LINE__)
+#else
+/* used everywhere, so must be fast if not using threads */
+#define LockDisplay(d) if ((d)->lock_fns) (*(d)->lock_fns->lock_display)(d)
+#define UnlockDisplay(d) if ((d)->lock_fns) (*(d)->lock_fns->unlock_display)(d)
+#define _XLockMutex(lock) if (_XLockMutex_fn) (*_XLockMutex_fn)(lock)
+#define _XUnlockMutex(lock) if (_XUnlockMutex_fn) (*_XUnlockMutex_fn)(lock)
+#endif
+#define _XCreateMutex(lock) if (_XCreateMutex_fn) (*_XCreateMutex_fn)(lock);
+#define _XFreeMutex(lock) if (_XFreeMutex_fn) (*_XFreeMutex_fn)(lock);
+
+#else /* XTHREADS */
+#define LockDisplay(dis)
+#define _XLockMutex(lock)
+#define _XUnlockMutex(lock)
+#define UnlockDisplay(dis)
+#define _XCreateMutex(lock)
+#define _XFreeMutex(lock)
+#endif
+
+#define Xfree(ptr) free((ptr))
+
+/*
+ * Note that some machines do not return a valid pointer for malloc(0), in
+ * which case we provide an alternate under the control of the
+ * define MALLOC_0_RETURNS_NULL. This is necessary because some
+ * Xlib code expects malloc(0) to return a valid pointer to storage.
+ */
+#if defined(MALLOC_0_RETURNS_NULL) || defined(__clang_analyzer__)
+
+# define Xmalloc(size) malloc(((size) == 0 ? 1 : (size)))
+# define Xrealloc(ptr, size) realloc((ptr), ((size) == 0 ? 1 : (size)))
+# define Xcalloc(nelem, elsize) calloc(((nelem) == 0 ? 1 : (nelem)), (elsize))
+
+#else
+
+# define Xmalloc(size) malloc((size))
+# define Xrealloc(ptr, size) realloc((ptr), (size))
+# define Xcalloc(nelem, elsize) calloc((nelem), (elsize))
+
+#endif
+
+#include <stddef.h>
+
+#define LOCKED 1
+#define UNLOCKED 0
+
+#ifndef BUFSIZE
+#define BUFSIZE 2048 /* X output buffer size. */
+#endif
+#ifndef PTSPERBATCH
+#define PTSPERBATCH 1024 /* point batching */
+#endif
+#ifndef WLNSPERBATCH
+#define WLNSPERBATCH 50 /* wide line batching */
+#endif
+#ifndef ZLNSPERBATCH
+#define ZLNSPERBATCH 1024 /* thin line batching */
+#endif
+#ifndef WRCTSPERBATCH
+#define WRCTSPERBATCH 10 /* wide line rectangle batching */
+#endif
+#ifndef ZRCTSPERBATCH
+#define ZRCTSPERBATCH 256 /* thin line rectangle batching */
+#endif
+#ifndef FRCTSPERBATCH
+#define FRCTSPERBATCH 256 /* filled rectangle batching */
+#endif
+#ifndef FARCSPERBATCH
+#define FARCSPERBATCH 256 /* filled arc batching */
+#endif
+#ifndef CURSORFONT
+#define CURSORFONT "cursor" /* standard cursor fonts */
+#endif
+
+/*
+ * Display flags
+ */
+#define XlibDisplayIOError (1L << 0)
+#define XlibDisplayClosing (1L << 1)
+#define XlibDisplayNoXkb (1L << 2)
+#define XlibDisplayPrivSync (1L << 3)
+#define XlibDisplayProcConni (1L << 4) /* in _XProcessInternalConnection */
+#define XlibDisplayReadEvents (1L << 5) /* in _XReadEvents */
+#define XlibDisplayReply (1L << 5) /* in _XReply */
+#define XlibDisplayWriting (1L << 6) /* in _XFlushInt, _XSend */
+#define XlibDisplayDfltRMDB (1L << 7) /* mark if RM db from XGetDefault */
+
+/*
+ * X Protocol packetizing macros.
+ */
+
+/* Need to start requests on 64 bit word boundaries
+ * on a CRAY computer so add a NoOp (127) if needed.
+ * A character pointer on a CRAY computer will be non-zero
+ * after shifting right 61 bits of it is not pointing to
+ * a word boundary.
+ */
+#ifdef WORD64
+#define WORD64ALIGN if ((long)dpy->bufptr >> 61) {\
+ dpy->last_req = dpy->bufptr;\
+ *(dpy->bufptr) = X_NoOperation;\
+ *(dpy->bufptr+1) = 0;\
+ *(dpy->bufptr+2) = 0;\
+ *(dpy->bufptr+3) = 1;\
+ dpy->request++;\
+ dpy->bufptr += 4;\
+ }
+#else /* else does not require alignment on 64-bit boundaries */
+#define WORD64ALIGN
+#endif /* WORD64 */
+
+/**
+ * Return a len-sized request buffer for the request type. This function may
+ * flush the output queue.
+ *
+ * @param dpy The display connection
+ * @param type The request type
+ * @param len Length of the request in bytes
+ *
+ * @returns A pointer to the request buffer with a few default values
+ * initialized.
+ */
+extern void *_XGetRequest(Display *dpy, CARD8 type, size_t len);
+
+/* GetReqSized is the same as GetReq but allows the caller to specify the
+ * size in bytes. 'sz' must be a multiple of 4! */
+
+#if !defined(UNIXCPP) || defined(ANSICPP)
+#define GetReqSized(name, sz, req) \
+ req = (x##name##Req *) _XGetRequest(dpy, X_##name, sz)
+#else
+#define GetReqSized(name, sz, req) \
+ req = (x/**/name/**/Req *) _XGetRequest(dpy, X_/**/name, sz)
+#endif
+
+
+/*
+ * GetReq - Get the next available X request packet in the buffer and
+ * return it.
+ *
+ * "name" is the name of the request, e.g. CreatePixmap, OpenFont, etc.
+ * "req" is the name of the request pointer.
+ *
+ */
+
+#if !defined(UNIXCPP) || defined(ANSICPP)
+#define GetReq(name, req) \
+ GetReqSized(name, SIZEOF(x##name##Req), req)
+#else /* non-ANSI C uses empty comment instead of "##" for token concatenation */
+#define GetReq(name, req) \
+ GetReqSized(name, SIZEOF(x/**/name/**/Req), req)
+#endif
+
+/* GetReqExtra is the same as GetReq, but allocates "n" additional
+ bytes after the request. "n" must be a multiple of 4! */
+
+#if !defined(UNIXCPP) || defined(ANSICPP)
+#define GetReqExtra(name, n, req) \
+ GetReqSized(name, SIZEOF(x##name##Req) + n, req)
+#else
+#define GetReqExtra(name, n, req) \
+ GetReqSized(name, SIZEOF(x/**/name/**/Req) + n, req)
+#endif
+
+
+/*
+ * GetResReq is for those requests that have a resource ID
+ * (Window, Pixmap, GContext, etc.) as their single argument.
+ * "rid" is the name of the resource.
+ */
+
+#if !defined(UNIXCPP) || defined(ANSICPP)
+#define GetResReq(name, rid, req) \
+ req = (xResourceReq *) _XGetRequest(dpy, X_##name, SIZEOF(xResourceReq)); \
+ req->id = (rid)
+#else
+#define GetResReq(name, rid, req) \
+ req = (xResourceReq *) _XGetRequest(dpy, X_/**/name, SIZEOF(xResourceReq)); \
+ req->id = (rid)
+#endif
+
+/*
+ * GetEmptyReq is for those requests that have no arguments
+ * at all.
+ */
+#if !defined(UNIXCPP) || defined(ANSICPP)
+#define GetEmptyReq(name, req) \
+ req = (xReq *) _XGetRequest(dpy, X_##name, SIZEOF(xReq))
+#else
+#define GetEmptyReq(name, req) \
+ req = (xReq *) _XGetRequest(dpy, X_/**/name, SIZEOF(xReq))
+#endif
+
+#ifdef WORD64
+#define MakeBigReq(req,n) \
+ { \
+ char _BRdat[4]; \
+ unsigned long _BRlen = req->length - 1; \
+ req->length = 0; \
+ memcpy(_BRdat, ((char *)req) + (_BRlen << 2), 4); \
+ memmove(((char *)req) + 8, ((char *)req) + 4, _BRlen << 2); \
+ memcpy(((char *)req) + 4, _BRdat, 4); \
+ Data32(dpy, (long *)&_BRdat, 4); \
+ }
+#else
+#ifdef LONG64
+#define MakeBigReq(req,n) \
+ { \
+ CARD64 _BRdat; \
+ CARD32 _BRlen = req->length - 1; \
+ req->length = 0; \
+ _BRdat = ((CARD32 *)req)[_BRlen]; \
+ memmove(((char *)req) + 8, ((char *)req) + 4, _BRlen << 2); \
+ ((CARD32 *)req)[1] = _BRlen + n + 2; \
+ Data32(dpy, &_BRdat, 4); \
+ }
+#else
+#define MakeBigReq(req,n) \
+ { \
+ CARD32 _BRdat; \
+ CARD32 _BRlen = req->length - 1; \
+ req->length = 0; \
+ _BRdat = ((CARD32 *)req)[_BRlen]; \
+ memmove(((char *)req) + 8, ((char *)req) + 4, _BRlen << 2); \
+ ((CARD32 *)req)[1] = _BRlen + n + 2; \
+ Data32(dpy, &_BRdat, 4); \
+ }
+#endif
+#endif
+
+#ifndef __clang_analyzer__
+#define SetReqLen(req,n,badlen) \
+ if ((req->length + n) > (unsigned)65535) { \
+ if (dpy->bigreq_size) { \
+ MakeBigReq(req,n) \
+ } else { \
+ n = badlen; \
+ req->length += n; \
+ } \
+ } else \
+ req->length += n
+#else
+#define SetReqLen(req,n,badlen) \
+ req->length += n
+#endif
+
+#define SyncHandle() \
+ if (dpy->synchandler) (*dpy->synchandler)(dpy)
+
+extern void _XFlushGCCache(Display *dpy, GC gc);
+#define FlushGC(dpy, gc) \
+ if ((gc)->dirty) _XFlushGCCache((dpy), (gc))
+/*
+ * Data - Place data in the buffer and pad the end to provide
+ * 32 bit word alignment. Transmit if the buffer fills.
+ *
+ * "dpy" is a pointer to a Display.
+ * "data" is a pinter to a data buffer.
+ * "len" is the length of the data buffer.
+ */
+#ifndef DataRoutineIsProcedure
+#define Data(dpy, data, len) {\
+ if (dpy->bufptr + (len) <= dpy->bufmax) {\
+ memcpy(dpy->bufptr, data, (int)len);\
+ dpy->bufptr += ((len) + 3) & ~3;\
+ } else\
+ _XSend(dpy, data, len);\
+ }
+#endif /* DataRoutineIsProcedure */
+
+
+/* Allocate bytes from the buffer. No padding is done, so if
+ * the length is not a multiple of 4, the caller must be
+ * careful to leave the buffer aligned after sending the
+ * current request.
+ *
+ * "type" is the type of the pointer being assigned to.
+ * "ptr" is the pointer being assigned to.
+ * "n" is the number of bytes to allocate.
+ *
+ * Example:
+ * xTextElt *elt;
+ * BufAlloc (xTextElt *, elt, nbytes)
+ */
+
+#define BufAlloc(type, ptr, n) \
+ if (dpy->bufptr + (n) > dpy->bufmax) \
+ _XFlush (dpy); \
+ ptr = (type) dpy->bufptr; \
+ memset(ptr, '\0', n); \
+ dpy->bufptr += (n);
+
+#ifdef WORD64
+#define Data16(dpy, data, len) _XData16(dpy, (short *)data, len)
+#define Data32(dpy, data, len) _XData32(dpy, (long *)data, len)
+#else
+#define Data16(dpy, data, len) Data((dpy), (char *)(data), (len))
+#define _XRead16Pad(dpy, data, len) _XReadPad((dpy), (char *)(data), (len))
+#define _XRead16(dpy, data, len) _XRead((dpy), (char *)(data), (len))
+#ifdef LONG64
+#define Data32(dpy, data, len) _XData32(dpy, (long *)data, len)
+extern int _XData32(
+ Display *dpy,
+ register long *data,
+ unsigned len
+);
+extern void _XRead32(
+ Display *dpy,
+ register long *data,
+ long len
+);
+#else
+#define Data32(dpy, data, len) Data((dpy), (char *)(data), (len))
+#define _XRead32(dpy, data, len) _XRead((dpy), (char *)(data), (len))
+#endif
+#endif /* not WORD64 */
+
+#define PackData16(dpy,data,len) Data16 (dpy, data, len)
+#define PackData32(dpy,data,len) Data32 (dpy, data, len)
+
+/* Xlib manual is bogus */
+#define PackData(dpy,data,len) PackData16 (dpy, data, len)
+
+#define min(a,b) (((a) < (b)) ? (a) : (b))
+#define max(a,b) (((a) > (b)) ? (a) : (b))
+
+#define CI_NONEXISTCHAR(cs) (((cs)->width == 0) && \
+ (((cs)->rbearing|(cs)->lbearing| \
+ (cs)->ascent|(cs)->descent) == 0))
+
+/*
+ * CI_GET_CHAR_INFO_1D - return the charinfo struct for the indicated 8bit
+ * character. If the character is in the column and exists, then return the
+ * appropriate metrics (note that fonts with common per-character metrics will
+ * return min_bounds). If none of these hold true, try again with the default
+ * char.
+ */
+#define CI_GET_CHAR_INFO_1D(fs,col,def,cs) \
+{ \
+ cs = def; \
+ if (col >= fs->min_char_or_byte2 && col <= fs->max_char_or_byte2) { \
+ if (fs->per_char == NULL) { \
+ cs = &fs->min_bounds; \
+ } else { \
+ cs = &fs->per_char[(col - fs->min_char_or_byte2)]; \
+ if (CI_NONEXISTCHAR(cs)) cs = def; \
+ } \
+ } \
+}
+
+#define CI_GET_DEFAULT_INFO_1D(fs,cs) \
+ CI_GET_CHAR_INFO_1D (fs, fs->default_char, NULL, cs)
+
+
+
+/*
+ * CI_GET_CHAR_INFO_2D - return the charinfo struct for the indicated row and
+ * column. This is used for fonts that have more than row zero.
+ */
+#define CI_GET_CHAR_INFO_2D(fs,row,col,def,cs) \
+{ \
+ cs = def; \
+ if (row >= fs->min_byte1 && row <= fs->max_byte1 && \
+ col >= fs->min_char_or_byte2 && col <= fs->max_char_or_byte2) { \
+ if (fs->per_char == NULL) { \
+ cs = &fs->min_bounds; \
+ } else { \
+ cs = &fs->per_char[((row - fs->min_byte1) * \
+ (fs->max_char_or_byte2 - \
+ fs->min_char_or_byte2 + 1)) + \
+ (col - fs->min_char_or_byte2)]; \
+ if (CI_NONEXISTCHAR(cs)) cs = def; \
+ } \
+ } \
+}
+
+#define CI_GET_DEFAULT_INFO_2D(fs,cs) \
+{ \
+ unsigned int r = (fs->default_char >> 8); \
+ unsigned int c = (fs->default_char & 0xff); \
+ CI_GET_CHAR_INFO_2D (fs, r, c, NULL, cs); \
+}
+
+
+#ifdef MUSTCOPY
+
+/* for when 32-bit alignment is not good enough */
+#define OneDataCard32(dpy,dstaddr,srcvar) \
+ { dpy->bufptr -= 4; Data32 (dpy, (char *) &(srcvar), 4); }
+
+#else
+
+/* srcvar must be a variable for large architecture version */
+#define OneDataCard32(dpy,dstaddr,srcvar) \
+ { *(CARD32 *)(dstaddr) = (srcvar); }
+
+#endif /* MUSTCOPY */
+
+typedef struct _XInternalAsync {
+ struct _XInternalAsync *next;
+ /*
+ * handler arguments:
+ * rep is the generic reply that caused this handler
+ * to be invoked. It must also be passed to _XGetAsyncReply.
+ * buf and len are opaque values that must be passed to
+ * _XGetAsyncReply or _XGetAsyncData.
+ * data is the closure stored in this struct.
+ * The handler returns True iff it handled this reply.
+ */
+ Bool (*handler)(
+ Display* /* dpy */,
+ xReply* /* rep */,
+ char* /* buf */,
+ int /* len */,
+ XPointer /* data */
+ );
+ XPointer data;
+} _XAsyncHandler;
+
+typedef struct _XAsyncEState {
+ unsigned long min_sequence_number;
+ unsigned long max_sequence_number;
+ unsigned char error_code;
+ unsigned char major_opcode;
+ unsigned short minor_opcode;
+ unsigned char last_error_received;
+ int error_count;
+} _XAsyncErrorState;
+
+extern void _XDeqAsyncHandler(Display *dpy, _XAsyncHandler *handler);
+#define DeqAsyncHandler(dpy,handler) { \
+ if (dpy->async_handlers == (handler)) \
+ dpy->async_handlers = (handler)->next; \
+ else \
+ _XDeqAsyncHandler(dpy, handler); \
+ }
+
+typedef void (*FreeFuncType) (
+ Display* /* display */
+);
+
+typedef int (*FreeModmapType) (
+ XModifierKeymap* /* modmap */
+);
+
+/*
+ * This structure is private to the library.
+ */
+typedef struct _XFreeFuncs {
+ FreeFuncType atoms; /* _XFreeAtomTable */
+ FreeModmapType modifiermap; /* XFreeModifiermap */
+ FreeFuncType key_bindings; /* _XFreeKeyBindings */
+ FreeFuncType context_db; /* _XFreeContextDB */
+ FreeFuncType defaultCCCs; /* _XcmsFreeDefaultCCCs */
+ FreeFuncType clientCmaps; /* _XcmsFreeClientCmaps */
+ FreeFuncType intensityMaps; /* _XcmsFreeIntensityMaps */
+ FreeFuncType im_filters; /* _XFreeIMFilters */
+ FreeFuncType xkb; /* _XkbFreeInfo */
+} _XFreeFuncRec;
+
+/* types for InitExt.c */
+typedef int (*CreateGCType) (
+ Display* /* display */,
+ GC /* gc */,
+ XExtCodes* /* codes */
+);
+
+typedef int (*CopyGCType)(
+ Display* /* display */,
+ GC /* gc */,
+ XExtCodes* /* codes */
+);
+
+typedef int (*FlushGCType) (
+ Display* /* display */,
+ GC /* gc */,
+ XExtCodes* /* codes */
+);
+
+typedef int (*FreeGCType) (
+ Display* /* display */,
+ GC /* gc */,
+ XExtCodes* /* codes */
+);
+
+typedef int (*CreateFontType) (
+ Display* /* display */,
+ XFontStruct* /* fs */,
+ XExtCodes* /* codes */
+);
+
+typedef int (*FreeFontType) (
+ Display* /* display */,
+ XFontStruct* /* fs */,
+ XExtCodes* /* codes */
+);
+
+typedef int (*CloseDisplayType) (
+ Display* /* display */,
+ XExtCodes* /* codes */
+);
+
+typedef int (*ErrorType) (
+ Display* /* display */,
+ xError* /* err */,
+ XExtCodes* /* codes */,
+ int* /* ret_code */
+);
+
+typedef char* (*ErrorStringType) (
+ Display* /* display */,
+ int /* code */,
+ XExtCodes* /* codes */,
+ char* /* buffer */,
+ int /* nbytes */
+);
+
+typedef void (*PrintErrorType)(
+ Display* /* display */,
+ XErrorEvent* /* ev */,
+ void* /* fp */
+);
+
+typedef void (*BeforeFlushType)(
+ Display* /* display */,
+ XExtCodes* /* codes */,
+ _Xconst char* /* data */,
+ long /* len */
+);
+
+/*
+ * This structure is private to the library.
+ */
+typedef struct _XExten { /* private to extension mechanism */
+ struct _XExten *next; /* next in list */
+ XExtCodes codes; /* public information, all extension told */
+ CreateGCType create_GC; /* routine to call when GC created */
+ CopyGCType copy_GC; /* routine to call when GC copied */
+ FlushGCType flush_GC; /* routine to call when GC flushed */
+ FreeGCType free_GC; /* routine to call when GC freed */
+ CreateFontType create_Font; /* routine to call when Font created */
+ FreeFontType free_Font; /* routine to call when Font freed */
+ CloseDisplayType close_display; /* routine to call when connection closed */
+ ErrorType error; /* who to call when an error occurs */
+ ErrorStringType error_string; /* routine to supply error string */
+ char *name; /* name of this extension */
+ PrintErrorType error_values; /* routine to supply error values */
+ BeforeFlushType before_flush; /* routine to call when sending data */
+ struct _XExten *next_flush; /* next in list of those with flushes */
+} _XExtension;
+
+/* Temporary definition until we can depend on an xproto release with it */
+#ifdef _X_COLD
+# define _XLIB_COLD _X_COLD
+#elif defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 403) /* 4.3+ */
+# define _XLIB_COLD __attribute__((__cold__))
+#else
+# define _XLIB_COLD /* nothing */
+#endif
+
+/* extension hooks */
+
+#ifdef DataRoutineIsProcedure
+extern void Data(Display *dpy, char *data, long len);
+#endif
+extern int _XError(
+ Display* /* dpy */,
+ xError* /* rep */
+);
+extern int _XIOError(
+ Display* /* dpy */
+) _X_NORETURN;
+extern int (*_XIOErrorFunction)(
+ Display* /* dpy */
+);
+extern int (*_XErrorFunction)(
+ Display* /* dpy */,
+ XErrorEvent* /* error_event */
+);
+extern void _XEatData(
+ Display* /* dpy */,
+ unsigned long /* n */
+) _XLIB_COLD;
+#ifdef XLIB_WANT_XEATDATAWORDS
+extern void _XEatDataWords(
+ Display* /* dpy */,
+ unsigned long /* n */
+) _XLIB_COLD _X_HIDDEN;
+#endif
+#if defined(__SUNPRO_C) /* Studio compiler alternative to "cold" attribute */
+# pragma rarely_called(_XEatData, _XEatDataWords)
+#endif
+extern char *_XAllocScratch(
+ Display* /* dpy */,
+ unsigned long /* nbytes */
+);
+extern char *_XAllocTemp(
+ Display* /* dpy */,
+ unsigned long /* nbytes */
+);
+extern void _XFreeTemp(
+ Display* /* dpy */,
+ char* /* buf */,
+ unsigned long /* nbytes */
+);
+extern Visual *_XVIDtoVisual(
+ Display* /* dpy */,
+ VisualID /* id */
+);
+extern unsigned long _XSetLastRequestRead(
+ Display* /* dpy */,
+ xGenericReply* /* rep */
+);
+extern int _XGetHostname(
+ char* /* buf */,
+ int /* maxlen */
+);
+extern Screen *_XScreenOfWindow(
+ Display* /* dpy */,
+ Window /* w */
+);
+extern Bool _XAsyncErrorHandler(
+ Display* /* dpy */,
+ xReply* /* rep */,
+ char* /* buf */,
+ int /* len */,
+ XPointer /* data */
+);
+extern char *_XGetAsyncReply(
+ Display* /* dpy */,
+ char* /* replbuf */,
+ xReply* /* rep */,
+ char* /* buf */,
+ int /* len */,
+ int /* extra */,
+ Bool /* discard */
+);
+extern void _XGetAsyncData(
+ Display* /* dpy */,
+ char * /* data */,
+ char * /* buf */,
+ int /* len */,
+ int /* skip */,
+ int /* datalen */,
+ int /* discardtotal */
+);
+extern void _XFlush(
+ Display* /* dpy */
+);
+extern int _XEventsQueued(
+ Display* /* dpy */,
+ int /* mode */
+);
+extern void _XReadEvents(
+ Display* /* dpy */
+);
+extern int _XRead(
+ Display* /* dpy */,
+ char* /* data */,
+ long /* size */
+);
+extern void _XReadPad(
+ Display* /* dpy */,
+ char* /* data */,
+ long /* size */
+);
+extern void _XSend(
+ Display* /* dpy */,
+ _Xconst char* /* data */,
+ long /* size */
+);
+extern Status _XReply(
+ Display* /* dpy */,
+ xReply* /* rep */,
+ int /* extra */,
+ Bool /* discard */
+);
+extern void _XEnq(
+ Display* /* dpy */,
+ xEvent* /* event */
+);
+extern void _XDeq(
+ Display* /* dpy */,
+ _XQEvent* /* prev */,
+ _XQEvent* /* qelt */
+);
+
+extern Bool _XUnknownWireEvent(
+ Display* /* dpy */,
+ XEvent* /* re */,
+ xEvent* /* event */
+);
+
+extern Bool _XUnknownWireEventCookie(
+ Display* /* dpy */,
+ XGenericEventCookie* /* re */,
+ xEvent* /* event */
+);
+
+extern Bool _XUnknownCopyEventCookie(
+ Display* /* dpy */,
+ XGenericEventCookie* /* in */,
+ XGenericEventCookie* /* out */
+);
+
+extern Status _XUnknownNativeEvent(
+ Display* /* dpy */,
+ XEvent* /* re */,
+ xEvent* /* event */
+);
+
+extern Bool _XWireToEvent(Display *dpy, XEvent *re, xEvent *event);
+extern Bool _XDefaultWireError(Display *display, XErrorEvent *he, xError *we);
+extern Bool _XPollfdCacheInit(Display *dpy);
+extern void _XPollfdCacheAdd(Display *dpy, int fd);
+extern void _XPollfdCacheDel(Display *dpy, int fd);
+extern XID _XAllocID(Display *dpy);
+extern void _XAllocIDs(Display *dpy, XID *ids, int count);
+
+extern int _XFreeExtData(
+ XExtData* /* extension */
+);
+
+extern int (*XESetCreateGC(
+ Display* /* display */,
+ int /* extension */,
+ int (*) (
+ Display* /* display */,
+ GC /* gc */,
+ XExtCodes* /* codes */
+ ) /* proc */
+))(
+ Display*, GC, XExtCodes*
+);
+
+extern int (*XESetCopyGC(
+ Display* /* display */,
+ int /* extension */,
+ int (*) (
+ Display* /* display */,
+ GC /* gc */,
+ XExtCodes* /* codes */
+ ) /* proc */
+))(
+ Display*, GC, XExtCodes*
+);
+
+extern int (*XESetFlushGC(
+ Display* /* display */,
+ int /* extension */,
+ int (*) (
+ Display* /* display */,
+ GC /* gc */,
+ XExtCodes* /* codes */
+ ) /* proc */
+))(
+ Display*, GC, XExtCodes*
+);
+
+extern int (*XESetFreeGC(
+ Display* /* display */,
+ int /* extension */,
+ int (*) (
+ Display* /* display */,
+ GC /* gc */,
+ XExtCodes* /* codes */
+ ) /* proc */
+))(
+ Display*, GC, XExtCodes*
+);
+
+extern int (*XESetCreateFont(
+ Display* /* display */,
+ int /* extension */,
+ int (*) (
+ Display* /* display */,
+ XFontStruct* /* fs */,
+ XExtCodes* /* codes */
+ ) /* proc */
+))(
+ Display*, XFontStruct*, XExtCodes*
+);
+
+extern int (*XESetFreeFont(
+ Display* /* display */,
+ int /* extension */,
+ int (*) (
+ Display* /* display */,
+ XFontStruct* /* fs */,
+ XExtCodes* /* codes */
+ ) /* proc */
+))(
+ Display*, XFontStruct*, XExtCodes*
+);
+
+extern int (*XESetCloseDisplay(
+ Display* /* display */,
+ int /* extension */,
+ int (*) (
+ Display* /* display */,
+ XExtCodes* /* codes */
+ ) /* proc */
+))(
+ Display*, XExtCodes*
+);
+
+extern int (*XESetError(
+ Display* /* display */,
+ int /* extension */,
+ int (*) (
+ Display* /* display */,
+ xError* /* err */,
+ XExtCodes* /* codes */,
+ int* /* ret_code */
+ ) /* proc */
+))(
+ Display*, xError*, XExtCodes*, int*
+);
+
+extern char* (*XESetErrorString(
+ Display* /* display */,
+ int /* extension */,
+ char* (*) (
+ Display* /* display */,
+ int /* code */,
+ XExtCodes* /* codes */,
+ char* /* buffer */,
+ int /* nbytes */
+ ) /* proc */
+))(
+ Display*, int, XExtCodes*, char*, int
+);
+
+extern void (*XESetPrintErrorValues (
+ Display* /* display */,
+ int /* extension */,
+ void (*)(
+ Display* /* display */,
+ XErrorEvent* /* ev */,
+ void* /* fp */
+ ) /* proc */
+))(
+ Display*, XErrorEvent*, void*
+);
+
+extern Bool (*XESetWireToEvent(
+ Display* /* display */,
+ int /* event_number */,
+ Bool (*) (
+ Display* /* display */,
+ XEvent* /* re */,
+ xEvent* /* event */
+ ) /* proc */
+))(
+ Display*, XEvent*, xEvent*
+);
+
+extern Bool (*XESetWireToEventCookie(
+ Display* /* display */,
+ int /* extension */,
+ Bool (*) (
+ Display* /* display */,
+ XGenericEventCookie* /* re */,
+ xEvent* /* event */
+ ) /* proc */
+))(
+ Display*, XGenericEventCookie*, xEvent*
+);
+
+extern Bool (*XESetCopyEventCookie(
+ Display* /* display */,
+ int /* extension */,
+ Bool (*) (
+ Display* /* display */,
+ XGenericEventCookie* /* in */,
+ XGenericEventCookie* /* out */
+ ) /* proc */
+))(
+ Display*, XGenericEventCookie*, XGenericEventCookie*
+);
+
+
+extern Status (*XESetEventToWire(
+ Display* /* display */,
+ int /* event_number */,
+ Status (*) (
+ Display* /* display */,
+ XEvent* /* re */,
+ xEvent* /* event */
+ ) /* proc */
+))(
+ Display*, XEvent*, xEvent*
+);
+
+extern Bool (*XESetWireToError(
+ Display* /* display */,
+ int /* error_number */,
+ Bool (*) (
+ Display* /* display */,
+ XErrorEvent* /* he */,
+ xError* /* we */
+ ) /* proc */
+))(
+ Display*, XErrorEvent*, xError*
+);
+
+extern void (*XESetBeforeFlush(
+ Display* /* display */,
+ int /* error_number */,
+ void (*) (
+ Display* /* display */,
+ XExtCodes* /* codes */,
+ _Xconst char* /* data */,
+ long /* len */
+ ) /* proc */
+))(
+ Display*, XExtCodes*, _Xconst char*, long
+);
+
+/* internal connections for IMs */
+
+typedef void (*_XInternalConnectionProc)(
+ Display* /* dpy */,
+ int /* fd */,
+ XPointer /* call_data */
+);
+
+
+extern Status _XRegisterInternalConnection(
+ Display* /* dpy */,
+ int /* fd */,
+ _XInternalConnectionProc /* callback */,
+ XPointer /* call_data */
+);
+
+extern void _XUnregisterInternalConnection(
+ Display* /* dpy */,
+ int /* fd */
+);
+
+extern void _XProcessInternalConnection(
+ Display* /* dpy */,
+ struct _XConnectionInfo* /* conn_info */
+);
+
+/* Display structure has pointers to these */
+
+struct _XConnectionInfo { /* info from _XRegisterInternalConnection */
+ int fd;
+ _XInternalConnectionProc read_callback;
+ XPointer call_data;
+ XPointer *watch_data; /* set/used by XConnectionWatchProc */
+ struct _XConnectionInfo *next;
+};
+
+struct _XConnWatchInfo { /* info from XAddConnectionWatch */
+ XConnectionWatchProc fn;
+ XPointer client_data;
+ struct _XConnWatchInfo *next;
+};
+
+#ifdef __UNIXOS2__
+extern char* __XOS2RedirRoot(
+ char*
+);
+#endif
+
+extern int _XTextHeight(
+ XFontStruct* /* font_struct */,
+ _Xconst char* /* string */,
+ int /* count */
+);
+
+extern int _XTextHeight16(
+ XFontStruct* /* font_struct */,
+ _Xconst XChar2b* /* string */,
+ int /* count */
+);
+
+#if defined(WIN32)
+
+extern int _XOpenFile(
+ _Xconst char* /* path */,
+ int /* flags */
+);
+
+extern int _XOpenFileMode(
+ _Xconst char* /* path */,
+ int /* flags */,
+ mode_t /* mode */
+);
+
+extern void* _XFopenFile(
+ _Xconst char* /* path */,
+ _Xconst char* /* mode */
+);
+
+extern int _XAccessFile(
+ _Xconst char* /* path */
+);
+#else
+#define _XOpenFile(path,flags) open(path,flags)
+#define _XOpenFileMode(path,flags,mode) open(path,flags,mode)
+#define _XFopenFile(path,mode) fopen(path,mode)
+#endif
+
+/* EvToWire.c */
+extern Status _XEventToWire(Display *dpy, XEvent *re, xEvent *event);
+
+extern int _XF86LoadQueryLocaleFont(
+ Display* /* dpy */,
+ _Xconst char* /* name*/,
+ XFontStruct** /* xfp*/,
+ Font* /* fidp */
+);
+
+extern void _XProcessWindowAttributes (
+ register Display *dpy,
+ xChangeWindowAttributesReq *req,
+ register unsigned long valuemask,
+ register XSetWindowAttributes *attributes);
+
+extern int _XDefaultError(
+ Display *dpy,
+ XErrorEvent *event);
+
+extern int _XDefaultIOError(
+ Display *dpy);
+
+extern void _XSetClipRectangles (
+ register Display *dpy,
+ GC gc,
+ int clip_x_origin, int clip_y_origin,
+ XRectangle *rectangles,
+ int n,
+ int ordering);
+
+Status _XGetWindowAttributes(
+ register Display *dpy,
+ Window w,
+ XWindowAttributes *attr);
+
+int _XPutBackEvent (
+ register Display *dpy,
+ register XEvent *event);
+
+extern Bool _XIsEventCookie(
+ Display *dpy,
+ XEvent *ev);
+
+extern void _XFreeEventCookies(
+ Display *dpy);
+
+extern void _XStoreEventCookie(
+ Display *dpy,
+ XEvent *ev);
+
+extern Bool _XFetchEventCookie(
+ Display *dpy,
+ XGenericEventCookie *ev);
+
+extern Bool _XCopyEventCookie(
+ Display *dpy,
+ XGenericEventCookie *in,
+ XGenericEventCookie *out);
+
+/* lcFile.c */
+
+extern void xlocaledir(
+ char *buf,
+ int buf_len
+);
+
+_XFUNCPROTOEND
+
+#endif /* _X11_XLIBINT_H_ */
diff --git a/system/include/X11/Xmd.h b/system/include/X11/Xmd.h
new file mode 100644
index 00000000..f3868b36
--- /dev/null
+++ b/system/include/X11/Xmd.h
@@ -0,0 +1,185 @@
+/***********************************************************
+
+Copyright 1987, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+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
+OPEN GROUP 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.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+#ifndef XMD_H
+# define XMD_H 1
+/*
+ * Xmd.h: MACHINE DEPENDENT DECLARATIONS.
+ */
+
+/*
+ * Special per-machine configuration flags.
+ */
+# if defined(__sun) && defined(__SVR4)
+# include <sys/isa_defs.h> /* Solaris: defines _LP64 if necessary */
+# endif
+
+# if defined (_LP64) || defined(__LP64__) || \
+ defined(__alpha) || defined(__alpha__) || \
+ defined(__ia64__) || defined(ia64) || \
+ defined(__sparc64__) || \
+ defined(__s390x__) || \
+ defined(__amd64__) || defined(amd64) || \
+ defined(__powerpc64__)
+# define LONG64 /* 32/64-bit architecture */
+# endif
+
+/*
+ * Stuff to handle large architecture machines; the constants were generated
+ * on a 32-bit machine and must correspond to the protocol.
+ */
+# ifdef WORD64
+# define MUSTCOPY
+# endif /* WORD64 */
+
+
+/*
+ * Definition of macro used to set constants for size of network structures;
+ * machines with preprocessors that can't handle all of the sz_ symbols
+ * can define this macro to be sizeof(x) if and only if their compiler doesn't
+ * pad out structures (esp. the xTextElt structure which contains only two
+ * one-byte fields). Network structures should always define sz_symbols.
+ *
+ * The sz_ prefix is used instead of something more descriptive so that the
+ * symbols are no more than 32 characters long (which causes problems for some
+ * compilers and preprocessors).
+ *
+ * The extra indirection is to get macro arguments to expand correctly before
+ * the concatenation, rather than afterward.
+ */
+# define _SIZEOF(x) sz_##x
+# define SIZEOF(x) _SIZEOF(x)
+
+/*
+ * Bitfield suffixes for the protocol structure elements, if you
+ * need them. Note that bitfields are not guaranteed to be signed
+ * (or even unsigned) according to ANSI C.
+ */
+# ifdef WORD64
+typedef long INT64;
+typedef unsigned long CARD64;
+# define B32 :32
+# define B16 :16
+# ifdef UNSIGNEDBITFIELDS
+typedef unsigned int INT32;
+typedef unsigned int INT16;
+# else
+typedef signed int INT32;
+typedef signed int INT16;
+# endif
+# else
+# define B32
+# define B16
+# ifdef LONG64
+typedef long INT64;
+typedef int INT32;
+# else
+typedef long INT32;
+# endif
+typedef short INT16;
+# endif
+
+typedef signed char INT8;
+
+# ifdef LONG64
+typedef unsigned long CARD64;
+typedef unsigned int CARD32;
+# else
+typedef unsigned long CARD32;
+# endif
+# if !defined(WORD64) && !defined(LONG64)
+typedef unsigned long long CARD64;
+# endif
+typedef unsigned short CARD16;
+typedef unsigned char CARD8;
+
+typedef CARD32 BITS32;
+typedef CARD16 BITS16;
+
+typedef CARD8 BYTE;
+typedef CARD8 BOOL;
+
+/*
+ * definitions for sign-extending bitfields on 64-bit architectures
+ */
+# if defined(WORD64) && defined(UNSIGNEDBITFIELDS)
+# define cvtINT8toInt(val) (((val) & 0x00000080) ? ((val) | 0xffffffffffffff00) : (val))
+# define cvtINT16toInt(val) (((val) & 0x00008000) ? ((val) | 0xffffffffffff0000) : (val))
+# define cvtINT32toInt(val) (((val) & 0x80000000) ? ((val) | 0xffffffff00000000) : (val))
+# define cvtINT8toShort(val) cvtINT8toInt(val)
+# define cvtINT16toShort(val) cvtINT16toInt(val)
+# define cvtINT32toShort(val) cvtINT32toInt(val)
+# define cvtINT8toLong(val) cvtINT8toInt(val)
+# define cvtINT16toLong(val) cvtINT16toInt(val)
+# define cvtINT32toLong(val) cvtINT32toInt(val)
+# else
+# define cvtINT8toInt(val) (val)
+# define cvtINT16toInt(val) (val)
+# define cvtINT32toInt(val) (val)
+# define cvtINT8toShort(val) (val)
+# define cvtINT16toShort(val) (val)
+# define cvtINT32toShort(val) (val)
+# define cvtINT8toLong(val) (val)
+# define cvtINT16toLong(val) (val)
+# define cvtINT32toLong(val) (val)
+# endif /* WORD64 and UNSIGNEDBITFIELDS */
+
+
+
+# ifdef MUSTCOPY
+/*
+ * This macro must not cast or else pointers will get aligned and be wrong
+ */
+# define NEXTPTR(p,t) (((char *) p) + SIZEOF(t))
+# else /* else not MUSTCOPY, this is used for 32-bit machines */
+/*
+ * this version should leave result of type (t *), but that should only be
+ * used when not in MUSTCOPY
+ */
+# define NEXTPTR(p,t) (((t *)(p)) + 1)
+# endif /* MUSTCOPY - used machines whose C structs don't line up with proto */
+
+#endif /* XMD_H */
diff --git a/system/include/X11/Xproto.h b/system/include/X11/Xproto.h
new file mode 100644
index 00000000..495d4419
--- /dev/null
+++ b/system/include/X11/Xproto.h
@@ -0,0 +1,2157 @@
+/* Definitions for the X window system used by server and c bindings */
+
+/*
+ * This packet-construction scheme makes the following assumptions:
+ *
+ * 1. The compiler is able
+ * to generate code which addresses one- and two-byte quantities.
+ * In the worst case, this would be done with bit-fields. If bit-fields
+ * are used it may be necessary to reorder the request fields in this file,
+ * depending on the order in which the machine assigns bit fields to
+ * machine words. There may also be a problem with sign extension,
+ * as K+R specify that bitfields are always unsigned.
+ *
+ * 2. 2- and 4-byte fields in packet structures must be ordered by hand
+ * such that they are naturally-aligned, so that no compiler will ever
+ * insert padding bytes.
+ *
+ * 3. All packets are hand-padded to a multiple of 4 bytes, for
+ * the same reason.
+ */
+
+#ifndef XPROTO_H
+#define XPROTO_H
+
+/***********************************************************
+
+Copyright 1987, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+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
+OPEN GROUP 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.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#include <X11/Xmd.h>
+#include <X11/Xprotostr.h>
+
+/*
+ * Define constants for the sizes of the network packets. The sz_ prefix is
+ * used instead of something more descriptive so that the symbols are no more
+ * than 32 characters in length (which causes problems for some compilers).
+ */
+#define sz_xSegment 8
+#define sz_xPoint 4
+#define sz_xRectangle 8
+#define sz_xArc 12
+#define sz_xConnClientPrefix 12
+#define sz_xConnSetupPrefix 8
+#define sz_xConnSetup 32
+#define sz_xPixmapFormat 8
+#define sz_xDepth 8
+#define sz_xVisualType 24
+#define sz_xWindowRoot 40
+#define sz_xTimecoord 8
+#define sz_xHostEntry 4
+#define sz_xCharInfo 12
+#define sz_xFontProp 8
+#define sz_xTextElt 2
+#define sz_xColorItem 12
+#define sz_xrgb 8
+#define sz_xGenericReply 32
+#define sz_xGetWindowAttributesReply 44
+#define sz_xGetGeometryReply 32
+#define sz_xQueryTreeReply 32
+#define sz_xInternAtomReply 32
+#define sz_xGetAtomNameReply 32
+#define sz_xGetPropertyReply 32
+#define sz_xListPropertiesReply 32
+#define sz_xGetSelectionOwnerReply 32
+#define sz_xGrabPointerReply 32
+#define sz_xQueryPointerReply 32
+#define sz_xGetMotionEventsReply 32
+#define sz_xTranslateCoordsReply 32
+#define sz_xGetInputFocusReply 32
+#define sz_xQueryKeymapReply 40
+#define sz_xQueryFontReply 60
+#define sz_xQueryTextExtentsReply 32
+#define sz_xListFontsReply 32
+#define sz_xGetFontPathReply 32
+#define sz_xGetImageReply 32
+#define sz_xListInstalledColormapsReply 32
+#define sz_xAllocColorReply 32
+#define sz_xAllocNamedColorReply 32
+#define sz_xAllocColorCellsReply 32
+#define sz_xAllocColorPlanesReply 32
+#define sz_xQueryColorsReply 32
+#define sz_xLookupColorReply 32
+#define sz_xQueryBestSizeReply 32
+#define sz_xQueryExtensionReply 32
+#define sz_xListExtensionsReply 32
+#define sz_xSetMappingReply 32
+#define sz_xGetKeyboardControlReply 52
+#define sz_xGetPointerControlReply 32
+#define sz_xGetScreenSaverReply 32
+#define sz_xListHostsReply 32
+#define sz_xSetModifierMappingReply 32
+#define sz_xError 32
+#define sz_xEvent 32
+#define sz_xKeymapEvent 32
+#define sz_xReq 4
+#define sz_xResourceReq 8
+#define sz_xCreateWindowReq 32
+#define sz_xChangeWindowAttributesReq 12
+#define sz_xChangeSaveSetReq 8
+#define sz_xReparentWindowReq 16
+#define sz_xConfigureWindowReq 12
+#define sz_xCirculateWindowReq 8
+#define sz_xInternAtomReq 8
+#define sz_xChangePropertyReq 24
+#define sz_xDeletePropertyReq 12
+#define sz_xGetPropertyReq 24
+#define sz_xSetSelectionOwnerReq 16
+#define sz_xConvertSelectionReq 24
+#define sz_xSendEventReq 44
+#define sz_xGrabPointerReq 24
+#define sz_xGrabButtonReq 24
+#define sz_xUngrabButtonReq 12
+#define sz_xChangeActivePointerGrabReq 16
+#define sz_xGrabKeyboardReq 16
+#define sz_xGrabKeyReq 16
+#define sz_xUngrabKeyReq 12
+#define sz_xAllowEventsReq 8
+#define sz_xGetMotionEventsReq 16
+#define sz_xTranslateCoordsReq 16
+#define sz_xWarpPointerReq 24
+#define sz_xSetInputFocusReq 12
+#define sz_xOpenFontReq 12
+#define sz_xQueryTextExtentsReq 8
+#define sz_xListFontsReq 8
+#define sz_xSetFontPathReq 8
+#define sz_xCreatePixmapReq 16
+#define sz_xCreateGCReq 16
+#define sz_xChangeGCReq 12
+#define sz_xCopyGCReq 16
+#define sz_xSetDashesReq 12
+#define sz_xSetClipRectanglesReq 12
+#define sz_xCopyAreaReq 28
+#define sz_xCopyPlaneReq 32
+#define sz_xPolyPointReq 12
+#define sz_xPolySegmentReq 12
+#define sz_xFillPolyReq 16
+#define sz_xPutImageReq 24
+#define sz_xGetImageReq 20
+#define sz_xPolyTextReq 16
+#define sz_xImageTextReq 16
+#define sz_xCreateColormapReq 16
+#define sz_xCopyColormapAndFreeReq 12
+#define sz_xAllocColorReq 16
+#define sz_xAllocNamedColorReq 12
+#define sz_xAllocColorCellsReq 12
+#define sz_xAllocColorPlanesReq 16
+#define sz_xFreeColorsReq 12
+#define sz_xStoreColorsReq 8
+#define sz_xStoreNamedColorReq 16
+#define sz_xQueryColorsReq 8
+#define sz_xLookupColorReq 12
+#define sz_xCreateCursorReq 32
+#define sz_xCreateGlyphCursorReq 32
+#define sz_xRecolorCursorReq 20
+#define sz_xQueryBestSizeReq 12
+#define sz_xQueryExtensionReq 8
+#define sz_xChangeKeyboardControlReq 8
+#define sz_xBellReq 4
+#define sz_xChangePointerControlReq 12
+#define sz_xSetScreenSaverReq 12
+#define sz_xChangeHostsReq 8
+#define sz_xListHostsReq 4
+#define sz_xChangeModeReq 4
+#define sz_xRotatePropertiesReq 12
+#define sz_xReply 32
+#define sz_xGrabKeyboardReply 32
+#define sz_xListFontsWithInfoReply 60
+#define sz_xSetPointerMappingReply 32
+#define sz_xGetKeyboardMappingReply 32
+#define sz_xGetPointerMappingReply 32
+#define sz_xGetModifierMappingReply 32
+#define sz_xListFontsWithInfoReq 8
+#define sz_xPolyLineReq 12
+#define sz_xPolyArcReq 12
+#define sz_xPolyRectangleReq 12
+#define sz_xPolyFillRectangleReq 12
+#define sz_xPolyFillArcReq 12
+#define sz_xPolyText8Req 16
+#define sz_xPolyText16Req 16
+#define sz_xImageText8Req 16
+#define sz_xImageText16Req 16
+#define sz_xSetPointerMappingReq 4
+#define sz_xForceScreenSaverReq 4
+#define sz_xSetCloseDownModeReq 4
+#define sz_xClearAreaReq 16
+#define sz_xSetAccessControlReq 4
+#define sz_xGetKeyboardMappingReq 8
+#define sz_xSetModifierMappingReq 4
+#define sz_xPropIconSize 24
+#define sz_xChangeKeyboardMappingReq 8
+
+
+/* For the purpose of the structure definitions in this file,
+we must redefine the following types in terms of Xmd.h's types, which may
+include bit fields. All of these are #undef'd at the end of this file,
+restoring the definitions in X.h. */
+
+#define Window CARD32
+#define Drawable CARD32
+#define Font CARD32
+#define Pixmap CARD32
+#define Cursor CARD32
+#define Colormap CARD32
+#define GContext CARD32
+#define Atom CARD32
+#define VisualID CARD32
+#define Time CARD32
+#define KeyCode CARD8
+#define KeySym CARD32
+
+#define X_TCP_PORT 6000 /* add display number */
+
+#define xTrue 1
+#define xFalse 0
+
+
+typedef CARD16 KeyButMask;
+
+/*****************
+ connection setup structure. This is followed by
+ numRoots xWindowRoot structs.
+*****************/
+
+typedef struct {
+ CARD8 byteOrder;
+ BYTE pad;
+ CARD16 majorVersion B16, minorVersion B16;
+ CARD16 nbytesAuthProto B16; /* Authorization protocol */
+ CARD16 nbytesAuthString B16; /* Authorization string */
+ CARD16 pad2 B16;
+} xConnClientPrefix;
+
+typedef struct {
+ CARD8 success;
+ BYTE lengthReason; /*num bytes in string following if failure */
+ CARD16 majorVersion B16,
+ minorVersion B16;
+ CARD16 length B16; /* 1/4 additional bytes in setup info */
+} xConnSetupPrefix;
+
+
+typedef struct {
+ CARD32 release B32;
+ CARD32 ridBase B32,
+ ridMask B32;
+ CARD32 motionBufferSize B32;
+ CARD16 nbytesVendor B16; /* number of bytes in vendor string */
+ CARD16 maxRequestSize B16;
+ CARD8 numRoots; /* number of roots structs to follow */
+ CARD8 numFormats; /* number of pixmap formats */
+ CARD8 imageByteOrder; /* LSBFirst, MSBFirst */
+ CARD8 bitmapBitOrder; /* LeastSignificant, MostSign...*/
+ CARD8 bitmapScanlineUnit, /* 8, 16, 32 */
+ bitmapScanlinePad; /* 8, 16, 32 */
+ KeyCode minKeyCode, maxKeyCode;
+ CARD32 pad2 B32;
+} xConnSetup;
+
+typedef struct {
+ CARD8 depth;
+ CARD8 bitsPerPixel;
+ CARD8 scanLinePad;
+ CARD8 pad1;
+ CARD32 pad2 B32;
+} xPixmapFormat;
+
+/* window root */
+
+typedef struct {
+ CARD8 depth;
+ CARD8 pad1;
+ CARD16 nVisuals B16; /* number of xVisualType structures following */
+ CARD32 pad2 B32;
+ } xDepth;
+
+typedef struct {
+ VisualID visualID B32;
+#if defined(__cplusplus) || defined(c_plusplus)
+ CARD8 c_class;
+#else
+ CARD8 class;
+#endif
+ CARD8 bitsPerRGB;
+ CARD16 colormapEntries B16;
+ CARD32 redMask B32, greenMask B32, blueMask B32;
+ CARD32 pad B32;
+ } xVisualType;
+
+typedef struct {
+ Window windowId B32;
+ Colormap defaultColormap B32;
+ CARD32 whitePixel B32, blackPixel B32;
+ CARD32 currentInputMask B32;
+ CARD16 pixWidth B16, pixHeight B16;
+ CARD16 mmWidth B16, mmHeight B16;
+ CARD16 minInstalledMaps B16, maxInstalledMaps B16;
+ VisualID rootVisualID B32;
+ CARD8 backingStore;
+ BOOL saveUnders;
+ CARD8 rootDepth;
+ CARD8 nDepths; /* number of xDepth structures following */
+} xWindowRoot;
+
+
+/*****************************************************************
+ * Structure Defns
+ * Structures needed for replies
+ *****************************************************************/
+
+/* Used in GetMotionEvents */
+
+typedef struct {
+ CARD32 time B32;
+ INT16 x B16, y B16;
+} xTimecoord;
+
+typedef struct {
+ CARD8 family;
+ BYTE pad;
+ CARD16 length B16;
+} xHostEntry;
+
+typedef struct {
+ INT16 leftSideBearing B16,
+ rightSideBearing B16,
+ characterWidth B16,
+ ascent B16,
+ descent B16;
+ CARD16 attributes B16;
+} xCharInfo;
+
+typedef struct {
+ Atom name B32;
+ CARD32 value B32;
+} xFontProp;
+
+/*
+ * non-aligned big-endian font ID follows this struct
+ */
+typedef struct { /* followed by string */
+ CARD8 len; /* number of *characters* in string, or FontChange (255)
+ for font change, or 0 if just delta given */
+ INT8 delta;
+} xTextElt;
+
+
+typedef struct {
+ CARD32 pixel B32;
+ CARD16 red B16, green B16, blue B16;
+ CARD8 flags; /* DoRed, DoGreen, DoBlue booleans */
+ CARD8 pad;
+} xColorItem;
+
+
+typedef struct {
+ CARD16 red B16, green B16, blue B16, pad B16;
+} xrgb;
+
+typedef CARD8 KEYCODE;
+
+
+/*****************
+ * XRep:
+ * meant to be 32 byte quantity
+ *****************/
+
+/* GenericReply is the common format of all replies. The "data" items
+ are specific to each individual reply type. */
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE data1; /* depends on reply type */
+ CARD16 sequenceNumber B16; /* of last request received by server */
+ CARD32 length B32; /* 4 byte quantities beyond size of GenericReply */
+ CARD32 data00 B32;
+ CARD32 data01 B32;
+ CARD32 data02 B32;
+ CARD32 data03 B32;
+ CARD32 data04 B32;
+ CARD32 data05 B32;
+ } xGenericReply;
+
+/* Individual reply formats. */
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 backingStore;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32; /* NOT 0; this is an extra-large reply */
+ VisualID visualID B32;
+#if defined(__cplusplus) || defined(c_plusplus)
+ CARD16 c_class B16;
+#else
+ CARD16 class B16;
+#endif
+ CARD8 bitGravity;
+ CARD8 winGravity;
+ CARD32 backingBitPlanes B32;
+ CARD32 backingPixel B32;
+ BOOL saveUnder;
+ BOOL mapInstalled;
+ CARD8 mapState;
+ BOOL override;
+ Colormap colormap B32;
+ CARD32 allEventMasks B32;
+ CARD32 yourEventMask B32;
+ CARD16 doNotPropagateMask B16;
+ CARD16 pad B16;
+ } xGetWindowAttributesReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 depth;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32; /* 0 */
+ Window root B32;
+ INT16 x B16, y B16;
+ CARD16 width B16, height B16;
+ CARD16 borderWidth B16;
+ CARD16 pad1 B16;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ } xGetGeometryReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ Window root B32, parent B32;
+ CARD16 nChildren B16;
+ CARD16 pad2 B16;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ } xQueryTreeReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32; /* 0 */
+ Atom atom B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ } xInternAtomReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32; /* of additional bytes */
+ CARD16 nameLength B16; /* # of characters in name */
+ CARD16 pad2 B16;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ CARD32 pad7 B32;
+ } xGetAtomNameReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 format;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32; /* of additional bytes */
+ Atom propertyType B32;
+ CARD32 bytesAfter B32;
+ CARD32 nItems B32; /* # of 8, 16, or 32-bit entities in reply */
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ } xGetPropertyReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 nProperties B16;
+ CARD16 pad2 B16;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ CARD32 pad7 B32;
+ } xListPropertiesReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32; /* 0 */
+ Window owner B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ } xGetSelectionOwnerReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE status;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32; /* 0 */
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ } xGrabPointerReply;
+
+typedef xGrabPointerReply xGrabKeyboardReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BOOL sameScreen;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32; /* 0 */
+ Window root B32, child B32;
+ INT16 rootX B16, rootY B16, winX B16, winY B16;
+ CARD16 mask B16;
+ CARD16 pad1 B16;
+ CARD32 pad B32;
+ } xQueryPointerReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 nEvents B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ } xGetMotionEventsReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BOOL sameScreen;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32; /* 0 */
+ Window child B32;
+ INT16 dstX B16, dstY B16;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ } xTranslateCoordsReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 revertTo;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32; /* 0 */
+ Window focus B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ } xGetInputFocusReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32; /* 2, NOT 0; this is an extra-large reply */
+ BYTE map[32];
+ } xQueryKeymapReply;
+
+/* Warning: this MUST match (up to component renaming) xListFontsWithInfoReply */
+typedef struct _xQueryFontReply {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32; /* definitely > 0, even if "nCharInfos" is 0 */
+ xCharInfo minBounds;
+#ifndef WORD64
+ CARD32 walign1 B32;
+#endif
+ xCharInfo maxBounds;
+#ifndef WORD64
+ CARD32 walign2 B32;
+#endif
+ CARD16 minCharOrByte2 B16, maxCharOrByte2 B16;
+ CARD16 defaultChar B16;
+ CARD16 nFontProps B16; /* followed by this many xFontProp structures */
+ CARD8 drawDirection;
+ CARD8 minByte1, maxByte1;
+ BOOL allCharsExist;
+ INT16 fontAscent B16, fontDescent B16;
+ CARD32 nCharInfos B32; /* followed by this many xCharInfo structures */
+} xQueryFontReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 drawDirection;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32; /* 0 */
+ INT16 fontAscent B16, fontDescent B16;
+ INT16 overallAscent B16, overallDescent B16;
+ INT32 overallWidth B32, overallLeft B32, overallRight B32;
+ CARD32 pad B32;
+ } xQueryTextExtentsReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 nFonts B16;
+ CARD16 pad2 B16;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ CARD32 pad7 B32;
+ } xListFontsReply;
+
+/* Warning: this MUST match (up to component renaming) xQueryFontReply */
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 nameLength; /* 0 indicates end-of-reply-sequence */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32; /* definitely > 0, even if "nameLength" is 0 */
+ xCharInfo minBounds;
+#ifndef WORD64
+ CARD32 walign1 B32;
+#endif
+ xCharInfo maxBounds;
+#ifndef WORD64
+ CARD32 walign2 B32;
+#endif
+ CARD16 minCharOrByte2 B16, maxCharOrByte2 B16;
+ CARD16 defaultChar B16;
+ CARD16 nFontProps B16; /* followed by this many xFontProp structures */
+ CARD8 drawDirection;
+ CARD8 minByte1, maxByte1;
+ BOOL allCharsExist;
+ INT16 fontAscent B16, fontDescent B16;
+ CARD32 nReplies B32; /* hint as to how many more replies might be coming */
+} xListFontsWithInfoReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 nPaths B16;
+ CARD16 pad2 B16;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ CARD32 pad7 B32;
+ } xGetFontPathReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 depth;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ VisualID visual B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ CARD32 pad7 B32;
+ } xGetImageReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 nColormaps B16;
+ CARD16 pad2 B16;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ CARD32 pad7 B32;
+ } xListInstalledColormapsReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32; /* 0 */
+ CARD16 red B16, green B16, blue B16;
+ CARD16 pad2 B16;
+ CARD32 pixel B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ } xAllocColorReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32; /* 0 */
+ CARD32 pixel B32;
+ CARD16 exactRed B16, exactGreen B16, exactBlue B16;
+ CARD16 screenRed B16, screenGreen B16, screenBlue B16;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ } xAllocNamedColorReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 nPixels B16, nMasks B16;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ CARD32 pad7 B32;
+ } xAllocColorCellsReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 nPixels B16;
+ CARD16 pad2 B16;
+ CARD32 redMask B32, greenMask B32, blueMask B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ } xAllocColorPlanesReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 nColors B16;
+ CARD16 pad2 B16;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ CARD32 pad7 B32;
+ } xQueryColorsReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32; /* 0 */
+ CARD16 exactRed B16, exactGreen B16, exactBlue B16;
+ CARD16 screenRed B16, screenGreen B16, screenBlue B16;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ } xLookupColorReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32; /* 0 */
+ CARD16 width B16, height B16;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ CARD32 pad7 B32;
+ } xQueryBestSizeReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32; /* 0 */
+ BOOL present;
+ CARD8 major_opcode;
+ CARD8 first_event;
+ CARD8 first_error;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ CARD32 pad7 B32;
+ } xQueryExtensionReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 nExtensions;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ CARD32 pad7 B32;
+ } xListExtensionsReply;
+
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 success;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ CARD32 pad7 B32;
+ } xSetMappingReply;
+typedef xSetMappingReply xSetPointerMappingReply;
+typedef xSetMappingReply xSetModifierMappingReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 nElts; /* how many elements does the map have */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ CARD32 pad7 B32;
+ } xGetPointerMappingReply;
+
+typedef struct {
+ BYTE type;
+ CARD8 keySymsPerKeyCode;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ CARD32 pad7 B32;
+} xGetKeyboardMappingReply;
+
+typedef struct {
+ BYTE type;
+ CARD8 numKeyPerModifier;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xGetModifierMappingReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BOOL globalAutoRepeat;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32; /* 5 */
+ CARD32 ledMask B32;
+ CARD8 keyClickPercent, bellPercent;
+ CARD16 bellPitch B16, bellDuration B16;
+ CARD16 pad B16;
+ BYTE map[32]; /* bit masks start here */
+ } xGetKeyboardControlReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32; /* 0 */
+ CARD16 accelNumerator B16, accelDenominator B16;
+ CARD16 threshold B16;
+ CARD16 pad2 B16;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ } xGetPointerControlReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32; /* 0 */
+ CARD16 timeout B16, interval B16;
+ BOOL preferBlanking;
+ BOOL allowExposures;
+ CARD16 pad2 B16;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ } xGetScreenSaverReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BOOL enabled;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 nHosts B16;
+ CARD16 pad1 B16;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ CARD32 pad7 B32;
+ } xListHostsReply;
+
+
+
+
+/*****************************************************************
+ * Xerror
+ * All errors are 32 bytes
+ *****************************************************************/
+
+typedef struct {
+ BYTE type; /* X_Error */
+ BYTE errorCode;
+ CARD16 sequenceNumber B16; /* the nth request from this client */
+ CARD32 resourceID B32;
+ CARD16 minorCode B16;
+ CARD8 majorCode;
+ BYTE pad1;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ CARD32 pad7 B32;
+} xError;
+
+/*****************************************************************
+ * xEvent
+ * All events are 32 bytes
+ *****************************************************************/
+
+typedef struct _xEvent {
+ union {
+ struct {
+ BYTE type;
+ BYTE detail;
+ CARD16 sequenceNumber B16;
+ } u;
+ struct {
+ CARD32 pad00 B32;
+ Time time B32;
+ Window root B32, event B32, child B32;
+ INT16 rootX B16, rootY B16, eventX B16, eventY B16;
+ KeyButMask state B16;
+ BOOL sameScreen;
+ BYTE pad1;
+ } keyButtonPointer;
+ struct {
+ CARD32 pad00 B32;
+ Time time B32;
+ Window root B32, event B32, child B32;
+ INT16 rootX B16, rootY B16, eventX B16, eventY B16;
+ KeyButMask state B16;
+ BYTE mode; /* really XMode */
+ BYTE flags; /* sameScreen and focus booleans, packed together */
+#define ELFlagFocus (1<<0)
+#define ELFlagSameScreen (1<<1)
+ } enterLeave;
+ struct {
+ CARD32 pad00 B32;
+ Window window B32;
+ BYTE mode; /* really XMode */
+ BYTE pad1, pad2, pad3;
+ } focus;
+ struct {
+ CARD32 pad00 B32;
+ Window window B32;
+ CARD16 x B16, y B16, width B16, height B16;
+ CARD16 count B16;
+ CARD16 pad2 B16;
+ } expose;
+ struct {
+ CARD32 pad00 B32;
+ Drawable drawable B32;
+ CARD16 x B16, y B16, width B16, height B16;
+ CARD16 minorEvent B16;
+ CARD16 count B16;
+ BYTE majorEvent;
+ BYTE pad1, pad2, pad3;
+ } graphicsExposure;
+ struct {
+ CARD32 pad00 B32;
+ Drawable drawable B32;
+ CARD16 minorEvent B16;
+ BYTE majorEvent;
+ BYTE bpad;
+ } noExposure;
+ struct {
+ CARD32 pad00 B32;
+ Window window B32;
+ CARD8 state;
+ BYTE pad1, pad2, pad3;
+ } visibility;
+ struct {
+ CARD32 pad00 B32;
+ Window parent B32, window B32;
+ INT16 x B16, y B16;
+ CARD16 width B16, height B16, borderWidth B16;
+ BOOL override;
+ BYTE bpad;
+ } createNotify;
+/*
+ * The event fields in the structures for DestroyNotify, UnmapNotify,
+ * MapNotify, ReparentNotify, ConfigureNotify, CirculateNotify, GravityNotify,
+ * must be at the same offset because server internal code is depending upon
+ * this to patch up the events before they are delivered.
+ * Also note that MapRequest, ConfigureRequest and CirculateRequest have
+ * the same offset for the event window.
+ */
+ struct {
+ CARD32 pad00 B32;
+ Window event B32, window B32;
+ } destroyNotify;
+ struct {
+ CARD32 pad00 B32;
+ Window event B32, window B32;
+ BOOL fromConfigure;
+ BYTE pad1, pad2, pad3;
+ } unmapNotify;
+ struct {
+ CARD32 pad00 B32;
+ Window event B32, window B32;
+ BOOL override;
+ BYTE pad1, pad2, pad3;
+ } mapNotify;
+ struct {
+ CARD32 pad00 B32;
+ Window parent B32, window B32;
+ } mapRequest;
+ struct {
+ CARD32 pad00 B32;
+ Window event B32, window B32, parent B32;
+ INT16 x B16, y B16;
+ BOOL override;
+ BYTE pad1, pad2, pad3;
+ } reparent;
+ struct {
+ CARD32 pad00 B32;
+ Window event B32, window B32, aboveSibling B32;
+ INT16 x B16, y B16;
+ CARD16 width B16, height B16, borderWidth B16;
+ BOOL override;
+ BYTE bpad;
+ } configureNotify;
+ struct {
+ CARD32 pad00 B32;
+ Window parent B32, window B32, sibling B32;
+ INT16 x B16, y B16;
+ CARD16 width B16, height B16, borderWidth B16;
+ CARD16 valueMask B16;
+ CARD32 pad1 B32;
+ } configureRequest;
+ struct {
+ CARD32 pad00 B32;
+ Window event B32, window B32;
+ INT16 x B16, y B16;
+ CARD32 pad1 B32, pad2 B32, pad3 B32, pad4 B32;
+ } gravity;
+ struct {
+ CARD32 pad00 B32;
+ Window window B32;
+ CARD16 width B16, height B16;
+ } resizeRequest;
+ struct {
+/* The event field in the circulate record is really the parent when this
+ is used as a CirculateRequest instead of a CirculateNotify */
+ CARD32 pad00 B32;
+ Window event B32, window B32, parent B32;
+ BYTE place; /* Top or Bottom */
+ BYTE pad1, pad2, pad3;
+ } circulate;
+ struct {
+ CARD32 pad00 B32;
+ Window window B32;
+ Atom atom B32;
+ Time time B32;
+ BYTE state; /* NewValue or Deleted */
+ BYTE pad1;
+ CARD16 pad2 B16;
+ } property;
+ struct {
+ CARD32 pad00 B32;
+ Time time B32;
+ Window window B32;
+ Atom atom B32;
+ } selectionClear;
+ struct {
+ CARD32 pad00 B32;
+ Time time B32;
+ Window owner B32, requestor B32;
+ Atom selection B32, target B32, property B32;
+ } selectionRequest;
+ struct {
+ CARD32 pad00 B32;
+ Time time B32;
+ Window requestor B32;
+ Atom selection B32, target B32, property B32;
+ } selectionNotify;
+ struct {
+ CARD32 pad00 B32;
+ Window window B32;
+ Colormap colormap B32;
+#if defined(__cplusplus) || defined(c_plusplus)
+ BOOL c_new;
+#else
+ BOOL new;
+#endif
+ BYTE state; /* Installed or UnInstalled */
+ BYTE pad1, pad2;
+ } colormap;
+ struct {
+ CARD32 pad00 B32;
+ CARD8 request;
+ KeyCode firstKeyCode;
+ CARD8 count;
+ BYTE pad1;
+ } mappingNotify;
+ struct {
+ CARD32 pad00 B32;
+ Window window B32;
+ union {
+ struct {
+ Atom type B32;
+ INT32 longs0 B32;
+ INT32 longs1 B32;
+ INT32 longs2 B32;
+ INT32 longs3 B32;
+ INT32 longs4 B32;
+ } l;
+ struct {
+ Atom type B32;
+ INT16 shorts0 B16;
+ INT16 shorts1 B16;
+ INT16 shorts2 B16;
+ INT16 shorts3 B16;
+ INT16 shorts4 B16;
+ INT16 shorts5 B16;
+ INT16 shorts6 B16;
+ INT16 shorts7 B16;
+ INT16 shorts8 B16;
+ INT16 shorts9 B16;
+ } s;
+ struct {
+ Atom type B32;
+ INT8 bytes[20];
+ } b;
+ } u;
+ } clientMessage;
+ } u;
+} xEvent;
+
+/*********************************************************
+ *
+ * Generic event
+ *
+ * Those events are not part of the core protocol spec and can be used by
+ * various extensions.
+ * type is always GenericEvent
+ * extension is the minor opcode of the extension the event belongs to.
+ * evtype is the actual event type, unique __per extension__.
+ *
+ * GenericEvents can be longer than 32 bytes, with the length field
+ * specifying the number of 4 byte blocks after the first 32 bytes.
+ *
+ *
+ */
+typedef struct
+{
+ BYTE type;
+ CARD8 extension;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 evtype B16;
+ CARD16 pad2 B16;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ CARD32 pad7 B32;
+} xGenericEvent;
+
+
+
+/* KeymapNotify events are not included in the above union because they
+ are different from all other events: they do not have a "detail"
+ or "sequenceNumber", so there is room for a 248-bit key mask. */
+
+typedef struct {
+ BYTE type;
+ BYTE map[31];
+ } xKeymapEvent;
+
+#define XEventSize (sizeof(xEvent))
+
+/* XReply is the union of all the replies above whose "fixed part"
+fits in 32 bytes. It does NOT include GetWindowAttributesReply,
+QueryFontReply, QueryKeymapReply, or GetKeyboardControlReply
+ListFontsWithInfoReply */
+
+typedef union {
+ xGenericReply generic;
+ xGetGeometryReply geom;
+ xQueryTreeReply tree;
+ xInternAtomReply atom;
+ xGetAtomNameReply atomName;
+ xGetPropertyReply property;
+ xListPropertiesReply listProperties;
+ xGetSelectionOwnerReply selection;
+ xGrabPointerReply grabPointer;
+ xGrabKeyboardReply grabKeyboard;
+ xQueryPointerReply pointer;
+ xGetMotionEventsReply motionEvents;
+ xTranslateCoordsReply coords;
+ xGetInputFocusReply inputFocus;
+ xQueryTextExtentsReply textExtents;
+ xListFontsReply fonts;
+ xGetFontPathReply fontPath;
+ xGetImageReply image;
+ xListInstalledColormapsReply colormaps;
+ xAllocColorReply allocColor;
+ xAllocNamedColorReply allocNamedColor;
+ xAllocColorCellsReply colorCells;
+ xAllocColorPlanesReply colorPlanes;
+ xQueryColorsReply colors;
+ xLookupColorReply lookupColor;
+ xQueryBestSizeReply bestSize;
+ xQueryExtensionReply extension;
+ xListExtensionsReply extensions;
+ xSetModifierMappingReply setModifierMapping;
+ xGetModifierMappingReply getModifierMapping;
+ xSetPointerMappingReply setPointerMapping;
+ xGetKeyboardMappingReply getKeyboardMapping;
+ xGetPointerMappingReply getPointerMapping;
+ xGetPointerControlReply pointerControl;
+ xGetScreenSaverReply screenSaver;
+ xListHostsReply hosts;
+ xError error;
+ xEvent event;
+} xReply;
+
+
+
+/*****************************************************************
+ * REQUESTS
+ *****************************************************************/
+
+
+/* Request structure */
+
+typedef struct _xReq {
+ CARD8 reqType;
+ CARD8 data; /* meaning depends on request type */
+ CARD16 length B16; /* length in 4 bytes quantities
+ of whole request, including this header */
+} xReq;
+
+/*****************************************************************
+ * structures that follow request.
+ *****************************************************************/
+
+/* ResourceReq is used for any request which has a resource ID
+ (or Atom or Time) as its one and only argument. */
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ CARD32 id B32; /* a Window, Drawable, Font, GContext, Pixmap, etc. */
+ } xResourceReq;
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 depth;
+ CARD16 length B16;
+ Window wid B32, parent B32;
+ INT16 x B16, y B16;
+ CARD16 width B16, height B16, borderWidth B16;
+#if defined(__cplusplus) || defined(c_plusplus)
+ CARD16 c_class B16;
+#else
+ CARD16 class B16;
+#endif
+ VisualID visual B32;
+ CARD32 mask B32;
+} xCreateWindowReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ Window window B32;
+ CARD32 valueMask B32;
+} xChangeWindowAttributesReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE mode;
+ CARD16 length B16;
+ Window window B32;
+} xChangeSaveSetReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ Window window B32, parent B32;
+ INT16 x B16, y B16;
+} xReparentWindowReq;
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 pad;
+ CARD16 length B16;
+ Window window B32;
+ CARD16 mask B16;
+ CARD16 pad2 B16;
+} xConfigureWindowReq;
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 direction;
+ CARD16 length B16;
+ Window window B32;
+} xCirculateWindowReq;
+
+typedef struct { /* followed by padded string */
+ CARD8 reqType;
+ BOOL onlyIfExists;
+ CARD16 length B16;
+ CARD16 nbytes B16; /* number of bytes in string */
+ CARD16 pad B16;
+} xInternAtomReq;
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 mode;
+ CARD16 length B16;
+ Window window B32;
+ Atom property B32, type B32;
+ CARD8 format;
+ BYTE pad[3];
+ CARD32 nUnits B32; /* length of stuff following, depends on format */
+} xChangePropertyReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ Window window B32;
+ Atom property B32;
+} xDeletePropertyReq;
+
+typedef struct {
+ CARD8 reqType;
+#if defined(__cplusplus) || defined(c_plusplus)
+ BOOL c_delete;
+#else
+ BOOL delete;
+#endif
+ CARD16 length B16;
+ Window window B32;
+ Atom property B32, type B32;
+ CARD32 longOffset B32;
+ CARD32 longLength B32;
+} xGetPropertyReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ Window window B32;
+ Atom selection B32;
+ Time time B32;
+} xSetSelectionOwnerReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ Window requestor B32;
+ Atom selection B32, target B32, property B32;
+ Time time B32;
+ } xConvertSelectionReq;
+
+typedef struct {
+ CARD8 reqType;
+ BOOL propagate;
+ CARD16 length B16;
+ Window destination B32;
+ CARD32 eventMask B32;
+#ifdef WORD64
+ /* the structure should have been quad-aligned */
+ BYTE eventdata[SIZEOF(xEvent)];
+#else
+ xEvent event;
+#endif /* WORD64 */
+} xSendEventReq;
+
+typedef struct {
+ CARD8 reqType;
+ BOOL ownerEvents;
+ CARD16 length B16;
+ Window grabWindow B32;
+ CARD16 eventMask B16;
+ BYTE pointerMode, keyboardMode;
+ Window confineTo B32;
+ Cursor cursor B32;
+ Time time B32;
+} xGrabPointerReq;
+
+typedef struct {
+ CARD8 reqType;
+ BOOL ownerEvents;
+ CARD16 length B16;
+ Window grabWindow B32;
+ CARD16 eventMask B16;
+ BYTE pointerMode, keyboardMode;
+ Window confineTo B32;
+ Cursor cursor B32;
+ CARD8 button;
+ BYTE pad;
+ CARD16 modifiers B16;
+} xGrabButtonReq;
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 button;
+ CARD16 length B16;
+ Window grabWindow B32;
+ CARD16 modifiers B16;
+ CARD16 pad B16;
+} xUngrabButtonReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ Cursor cursor B32;
+ Time time B32;
+ CARD16 eventMask B16;
+ CARD16 pad2 B16;
+} xChangeActivePointerGrabReq;
+
+typedef struct {
+ CARD8 reqType;
+ BOOL ownerEvents;
+ CARD16 length B16;
+ Window grabWindow B32;
+ Time time B32;
+ BYTE pointerMode, keyboardMode;
+ CARD16 pad B16;
+} xGrabKeyboardReq;
+
+typedef struct {
+ CARD8 reqType;
+ BOOL ownerEvents;
+ CARD16 length B16;
+ Window grabWindow B32;
+ CARD16 modifiers B16;
+ CARD8 key;
+ BYTE pointerMode, keyboardMode;
+ BYTE pad1, pad2, pad3;
+} xGrabKeyReq;
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 key;
+ CARD16 length B16;
+ Window grabWindow B32;
+ CARD16 modifiers B16;
+ CARD16 pad B16;
+} xUngrabKeyReq;
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 mode;
+ CARD16 length B16;
+ Time time B32;
+} xAllowEventsReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ Window window B32;
+ Time start B32, stop B32;
+} xGetMotionEventsReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ Window srcWid B32, dstWid B32;
+ INT16 srcX B16, srcY B16;
+} xTranslateCoordsReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ Window srcWid B32, dstWid B32;
+ INT16 srcX B16, srcY B16;
+ CARD16 srcWidth B16, srcHeight B16;
+ INT16 dstX B16, dstY B16;
+} xWarpPointerReq;
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 revertTo;
+ CARD16 length B16;
+ Window focus B32;
+ Time time B32;
+} xSetInputFocusReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ Font fid B32;
+ CARD16 nbytes B16;
+ BYTE pad1, pad2; /* string follows on word boundary */
+} xOpenFontReq;
+
+typedef struct {
+ CARD8 reqType;
+ BOOL oddLength;
+ CARD16 length B16;
+ Font fid B32;
+ } xQueryTextExtentsReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ CARD16 maxNames B16;
+ CARD16 nbytes B16; /* followed immediately by string bytes */
+} xListFontsReq;
+
+typedef xListFontsReq xListFontsWithInfoReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ CARD16 nFonts B16;
+ BYTE pad1, pad2; /* LISTofSTRING8 follows on word boundary */
+} xSetFontPathReq;
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 depth;
+ CARD16 length B16;
+ Pixmap pid B32;
+ Drawable drawable B32;
+ CARD16 width B16, height B16;
+} xCreatePixmapReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ GContext gc B32;
+ Drawable drawable B32;
+ CARD32 mask B32;
+} xCreateGCReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ GContext gc B32;
+ CARD32 mask B32;
+} xChangeGCReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ GContext srcGC B32, dstGC B32;
+ CARD32 mask B32;
+} xCopyGCReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ GContext gc B32;
+ CARD16 dashOffset B16;
+ CARD16 nDashes B16; /* length LISTofCARD8 of values following */
+} xSetDashesReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE ordering;
+ CARD16 length B16;
+ GContext gc B32;
+ INT16 xOrigin B16, yOrigin B16;
+} xSetClipRectanglesReq;
+
+typedef struct {
+ CARD8 reqType;
+ BOOL exposures;
+ CARD16 length B16;
+ Window window B32;
+ INT16 x B16, y B16;
+ CARD16 width B16, height B16;
+} xClearAreaReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ Drawable srcDrawable B32, dstDrawable B32;
+ GContext gc B32;
+ INT16 srcX B16, srcY B16, dstX B16, dstY B16;
+ CARD16 width B16, height B16;
+} xCopyAreaReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ Drawable srcDrawable B32, dstDrawable B32;
+ GContext gc B32;
+ INT16 srcX B16, srcY B16, dstX B16, dstY B16;
+ CARD16 width B16, height B16;
+ CARD32 bitPlane B32;
+} xCopyPlaneReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE coordMode;
+ CARD16 length B16;
+ Drawable drawable B32;
+ GContext gc B32;
+} xPolyPointReq;
+
+typedef xPolyPointReq xPolyLineReq; /* same request structure */
+
+/* The following used for PolySegment, PolyRectangle, PolyArc, PolyFillRectangle, PolyFillArc */
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ Drawable drawable B32;
+ GContext gc B32;
+} xPolySegmentReq;
+
+typedef xPolySegmentReq xPolyArcReq;
+typedef xPolySegmentReq xPolyRectangleReq;
+typedef xPolySegmentReq xPolyFillRectangleReq;
+typedef xPolySegmentReq xPolyFillArcReq;
+
+typedef struct _FillPolyReq {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ Drawable drawable B32;
+ GContext gc B32;
+ BYTE shape;
+ BYTE coordMode;
+ CARD16 pad1 B16;
+} xFillPolyReq;
+
+
+typedef struct _PutImageReq {
+ CARD8 reqType;
+ CARD8 format;
+ CARD16 length B16;
+ Drawable drawable B32;
+ GContext gc B32;
+ CARD16 width B16, height B16;
+ INT16 dstX B16, dstY B16;
+ CARD8 leftPad;
+ CARD8 depth;
+ CARD16 pad B16;
+} xPutImageReq;
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 format;
+ CARD16 length B16;
+ Drawable drawable B32;
+ INT16 x B16, y B16;
+ CARD16 width B16, height B16;
+ CARD32 planeMask B32;
+} xGetImageReq;
+
+/* the following used by PolyText8 and PolyText16 */
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 pad;
+ CARD16 length B16;
+ Drawable drawable B32;
+ GContext gc B32;
+ INT16 x B16, y B16; /* items (xTextElt) start after struct */
+} xPolyTextReq;
+
+typedef xPolyTextReq xPolyText8Req;
+typedef xPolyTextReq xPolyText16Req;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE nChars;
+ CARD16 length B16;
+ Drawable drawable B32;
+ GContext gc B32;
+ INT16 x B16, y B16;
+} xImageTextReq;
+
+typedef xImageTextReq xImageText8Req;
+typedef xImageTextReq xImageText16Req;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE alloc;
+ CARD16 length B16;
+ Colormap mid B32;
+ Window window B32;
+ VisualID visual B32;
+} xCreateColormapReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ Colormap mid B32;
+ Colormap srcCmap B32;
+} xCopyColormapAndFreeReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ Colormap cmap B32;
+ CARD16 red B16, green B16, blue B16;
+ CARD16 pad2 B16;
+} xAllocColorReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ Colormap cmap B32;
+ CARD16 nbytes B16; /* followed by structure */
+ BYTE pad1, pad2;
+} xAllocNamedColorReq;
+
+typedef struct {
+ CARD8 reqType;
+ BOOL contiguous;
+ CARD16 length B16;
+ Colormap cmap B32;
+ CARD16 colors B16, planes B16;
+} xAllocColorCellsReq;
+
+typedef struct {
+ CARD8 reqType;
+ BOOL contiguous;
+ CARD16 length B16;
+ Colormap cmap B32;
+ CARD16 colors B16, red B16, green B16, blue B16;
+} xAllocColorPlanesReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ Colormap cmap B32;
+ CARD32 planeMask B32;
+} xFreeColorsReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ Colormap cmap B32;
+} xStoreColorsReq;
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 flags; /* DoRed, DoGreen, DoBlue, as in xColorItem */
+ CARD16 length B16;
+ Colormap cmap B32;
+ CARD32 pixel B32;
+ CARD16 nbytes B16; /* number of name string bytes following structure */
+ BYTE pad1, pad2;
+ } xStoreNamedColorReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ Colormap cmap B32;
+} xQueryColorsReq;
+
+typedef struct { /* followed by string of length len */
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ Colormap cmap B32;
+ CARD16 nbytes B16; /* number of string bytes following structure*/
+ BYTE pad1, pad2;
+} xLookupColorReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ Cursor cid B32;
+ Pixmap source B32, mask B32;
+ CARD16 foreRed B16, foreGreen B16, foreBlue B16;
+ CARD16 backRed B16, backGreen B16, backBlue B16;
+ CARD16 x B16, y B16;
+} xCreateCursorReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ Cursor cid B32;
+ Font source B32, mask B32;
+ CARD16 sourceChar B16, maskChar B16;
+ CARD16 foreRed B16, foreGreen B16, foreBlue B16;
+ CARD16 backRed B16, backGreen B16, backBlue B16;
+} xCreateGlyphCursorReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ Cursor cursor B32;
+ CARD16 foreRed B16, foreGreen B16, foreBlue B16;
+ CARD16 backRed B16, backGreen B16, backBlue B16;
+} xRecolorCursorReq;
+
+typedef struct {
+ CARD8 reqType;
+#if defined(__cplusplus) || defined(c_plusplus)
+ CARD8 c_class;
+#else
+ CARD8 class;
+#endif
+ CARD16 length B16;
+ Drawable drawable B32;
+ CARD16 width B16, height B16;
+} xQueryBestSizeReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ CARD16 nbytes B16; /* number of string bytes following structure */
+ BYTE pad1, pad2;
+} xQueryExtensionReq;
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 numKeyPerModifier;
+ CARD16 length B16;
+} xSetModifierMappingReq;
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 nElts; /* how many elements in the map */
+ CARD16 length B16;
+} xSetPointerMappingReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ KeyCode firstKeyCode;
+ CARD8 count;
+ CARD16 pad1 B16;
+} xGetKeyboardMappingReq;
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 keyCodes;
+ CARD16 length B16;
+ KeyCode firstKeyCode;
+ CARD8 keySymsPerKeyCode;
+ CARD16 pad1 B16;
+} xChangeKeyboardMappingReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ CARD32 mask B32;
+} xChangeKeyboardControlReq;
+
+typedef struct {
+ CARD8 reqType;
+ INT8 percent; /* -100 to 100 */
+ CARD16 length B16;
+} xBellReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ INT16 accelNum B16, accelDenum B16;
+ INT16 threshold B16;
+ BOOL doAccel, doThresh;
+} xChangePointerControlReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ INT16 timeout B16, interval B16;
+ BYTE preferBlank, allowExpose;
+ CARD16 pad2 B16;
+} xSetScreenSaverReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE mode;
+ CARD16 length B16;
+ CARD8 hostFamily;
+ BYTE pad;
+ CARD16 hostLength B16;
+} xChangeHostsReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ } xListHostsReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE mode;
+ CARD16 length B16;
+ } xChangeModeReq;
+
+typedef xChangeModeReq xSetAccessControlReq;
+typedef xChangeModeReq xSetCloseDownModeReq;
+typedef xChangeModeReq xForceScreenSaverReq;
+
+typedef struct { /* followed by LIST of ATOM */
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ Window window B32;
+ CARD16 nAtoms B16;
+ INT16 nPositions B16;
+ } xRotatePropertiesReq;
+
+
+
+/* Reply codes */
+
+#define X_Reply 1 /* Normal reply */
+#define X_Error 0 /* Error */
+
+/* Request codes */
+
+#define X_CreateWindow 1
+#define X_ChangeWindowAttributes 2
+#define X_GetWindowAttributes 3
+#define X_DestroyWindow 4
+#define X_DestroySubwindows 5
+#define X_ChangeSaveSet 6
+#define X_ReparentWindow 7
+#define X_MapWindow 8
+#define X_MapSubwindows 9
+#define X_UnmapWindow 10
+#define X_UnmapSubwindows 11
+#define X_ConfigureWindow 12
+#define X_CirculateWindow 13
+#define X_GetGeometry 14
+#define X_QueryTree 15
+#define X_InternAtom 16
+#define X_GetAtomName 17
+#define X_ChangeProperty 18
+#define X_DeleteProperty 19
+#define X_GetProperty 20
+#define X_ListProperties 21
+#define X_SetSelectionOwner 22
+#define X_GetSelectionOwner 23
+#define X_ConvertSelection 24
+#define X_SendEvent 25
+#define X_GrabPointer 26
+#define X_UngrabPointer 27
+#define X_GrabButton 28
+#define X_UngrabButton 29
+#define X_ChangeActivePointerGrab 30
+#define X_GrabKeyboard 31
+#define X_UngrabKeyboard 32
+#define X_GrabKey 33
+#define X_UngrabKey 34
+#define X_AllowEvents 35
+#define X_GrabServer 36
+#define X_UngrabServer 37
+#define X_QueryPointer 38
+#define X_GetMotionEvents 39
+#define X_TranslateCoords 40
+#define X_WarpPointer 41
+#define X_SetInputFocus 42
+#define X_GetInputFocus 43
+#define X_QueryKeymap 44
+#define X_OpenFont 45
+#define X_CloseFont 46
+#define X_QueryFont 47
+#define X_QueryTextExtents 48
+#define X_ListFonts 49
+#define X_ListFontsWithInfo 50
+#define X_SetFontPath 51
+#define X_GetFontPath 52
+#define X_CreatePixmap 53
+#define X_FreePixmap 54
+#define X_CreateGC 55
+#define X_ChangeGC 56
+#define X_CopyGC 57
+#define X_SetDashes 58
+#define X_SetClipRectangles 59
+#define X_FreeGC 60
+#define X_ClearArea 61
+#define X_CopyArea 62
+#define X_CopyPlane 63
+#define X_PolyPoint 64
+#define X_PolyLine 65
+#define X_PolySegment 66
+#define X_PolyRectangle 67
+#define X_PolyArc 68
+#define X_FillPoly 69
+#define X_PolyFillRectangle 70
+#define X_PolyFillArc 71
+#define X_PutImage 72
+#define X_GetImage 73
+#define X_PolyText8 74
+#define X_PolyText16 75
+#define X_ImageText8 76
+#define X_ImageText16 77
+#define X_CreateColormap 78
+#define X_FreeColormap 79
+#define X_CopyColormapAndFree 80
+#define X_InstallColormap 81
+#define X_UninstallColormap 82
+#define X_ListInstalledColormaps 83
+#define X_AllocColor 84
+#define X_AllocNamedColor 85
+#define X_AllocColorCells 86
+#define X_AllocColorPlanes 87
+#define X_FreeColors 88
+#define X_StoreColors 89
+#define X_StoreNamedColor 90
+#define X_QueryColors 91
+#define X_LookupColor 92
+#define X_CreateCursor 93
+#define X_CreateGlyphCursor 94
+#define X_FreeCursor 95
+#define X_RecolorCursor 96
+#define X_QueryBestSize 97
+#define X_QueryExtension 98
+#define X_ListExtensions 99
+#define X_ChangeKeyboardMapping 100
+#define X_GetKeyboardMapping 101
+#define X_ChangeKeyboardControl 102
+#define X_GetKeyboardControl 103
+#define X_Bell 104
+#define X_ChangePointerControl 105
+#define X_GetPointerControl 106
+#define X_SetScreenSaver 107
+#define X_GetScreenSaver 108
+#define X_ChangeHosts 109
+#define X_ListHosts 110
+#define X_SetAccessControl 111
+#define X_SetCloseDownMode 112
+#define X_KillClient 113
+#define X_RotateProperties 114
+#define X_ForceScreenSaver 115
+#define X_SetPointerMapping 116
+#define X_GetPointerMapping 117
+#define X_SetModifierMapping 118
+#define X_GetModifierMapping 119
+#define X_NoOperation 127
+
+/* restore these definitions back to the typedefs in X.h */
+#undef Window
+#undef Drawable
+#undef Font
+#undef Pixmap
+#undef Cursor
+#undef Colormap
+#undef GContext
+#undef Atom
+#undef VisualID
+#undef Time
+#undef KeyCode
+#undef KeySym
+
+#endif /* XPROTO_H */
diff --git a/system/include/X11/Xprotostr.h b/system/include/X11/Xprotostr.h
new file mode 100644
index 00000000..a9e854d3
--- /dev/null
+++ b/system/include/X11/Xprotostr.h
@@ -0,0 +1,77 @@
+#ifndef XPROTOSTRUCTS_H
+#define XPROTOSTRUCTS_H
+
+/***********************************************************
+
+Copyright 1987, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+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
+OPEN GROUP 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.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+#include <X11/Xmd.h>
+
+/* Used by PolySegment */
+
+typedef struct _xSegment {
+ INT16 x1 B16, y1 B16, x2 B16, y2 B16;
+} xSegment;
+
+/* POINT */
+
+typedef struct _xPoint {
+ INT16 x B16, y B16;
+} xPoint;
+
+typedef struct _xRectangle {
+ INT16 x B16, y B16;
+ CARD16 width B16, height B16;
+} xRectangle;
+
+/* ARC */
+
+typedef struct _xArc {
+ INT16 x B16, y B16;
+ CARD16 width B16, height B16;
+ INT16 angle1 B16, angle2 B16;
+} xArc;
+
+#endif /* XPROTOSTRUCTS_H */
diff --git a/system/include/X11/cursorfont.h b/system/include/X11/cursorfont.h
new file mode 100644
index 00000000..c69d508f
--- /dev/null
+++ b/system/include/X11/cursorfont.h
@@ -0,0 +1,111 @@
+/*
+
+Copyright 1987, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+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 OPEN GROUP 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.
+
+Except as contained in this notice, the name of The Open Group shall
+not be used in advertising or otherwise to promote the sale, use or
+other dealings in this Software without prior written authorization
+from The Open Group.
+
+*/
+
+#ifndef _X11_CURSORFONT_H_
+#define _X11_CURSORFONT_H_
+
+#define XC_num_glyphs 154
+#define XC_X_cursor 0
+#define XC_arrow 2
+#define XC_based_arrow_down 4
+#define XC_based_arrow_up 6
+#define XC_boat 8
+#define XC_bogosity 10
+#define XC_bottom_left_corner 12
+#define XC_bottom_right_corner 14
+#define XC_bottom_side 16
+#define XC_bottom_tee 18
+#define XC_box_spiral 20
+#define XC_center_ptr 22
+#define XC_circle 24
+#define XC_clock 26
+#define XC_coffee_mug 28
+#define XC_cross 30
+#define XC_cross_reverse 32
+#define XC_crosshair 34
+#define XC_diamond_cross 36
+#define XC_dot 38
+#define XC_dotbox 40
+#define XC_double_arrow 42
+#define XC_draft_large 44
+#define XC_draft_small 46
+#define XC_draped_box 48
+#define XC_exchange 50
+#define XC_fleur 52
+#define XC_gobbler 54
+#define XC_gumby 56
+#define XC_hand1 58
+#define XC_hand2 60
+#define XC_heart 62
+#define XC_icon 64
+#define XC_iron_cross 66
+#define XC_left_ptr 68
+#define XC_left_side 70
+#define XC_left_tee 72
+#define XC_leftbutton 74
+#define XC_ll_angle 76
+#define XC_lr_angle 78
+#define XC_man 80
+#define XC_middlebutton 82
+#define XC_mouse 84
+#define XC_pencil 86
+#define XC_pirate 88
+#define XC_plus 90
+#define XC_question_arrow 92
+#define XC_right_ptr 94
+#define XC_right_side 96
+#define XC_right_tee 98
+#define XC_rightbutton 100
+#define XC_rtl_logo 102
+#define XC_sailboat 104
+#define XC_sb_down_arrow 106
+#define XC_sb_h_double_arrow 108
+#define XC_sb_left_arrow 110
+#define XC_sb_right_arrow 112
+#define XC_sb_up_arrow 114
+#define XC_sb_v_double_arrow 116
+#define XC_shuttle 118
+#define XC_sizing 120
+#define XC_spider 122
+#define XC_spraycan 124
+#define XC_star 126
+#define XC_target 128
+#define XC_tcross 130
+#define XC_top_left_arrow 132
+#define XC_top_left_corner 134
+#define XC_top_right_corner 136
+#define XC_top_side 138
+#define XC_top_tee 140
+#define XC_trek 142
+#define XC_ul_angle 144
+#define XC_umbrella 146
+#define XC_ur_angle 148
+#define XC_watch 150
+#define XC_xterm 152
+
+#endif /* _X11_CURSORFONT_H_ */
diff --git a/system/include/X11/extensions/XKB.h b/system/include/X11/extensions/XKB.h
new file mode 100644
index 00000000..ee4f7407
--- /dev/null
+++ b/system/include/X11/extensions/XKB.h
@@ -0,0 +1,786 @@
+/************************************************************
+Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc.
+
+Permission to use, copy, modify, and distribute this
+software and its documentation for any purpose and without
+fee is hereby granted, provided that the above copyright
+notice appear in all copies and that both that copyright
+notice and this permission notice appear in supporting
+documentation, and that the name of Silicon Graphics not be
+used in advertising or publicity pertaining to distribution
+of the software without specific prior written permission.
+Silicon Graphics makes no representation about the suitability
+of this software for any purpose. It is provided "as is"
+without any express or implied warranty.
+
+SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
+GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
+THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+********************************************************/
+
+#ifndef _XKB_H_
+#define _XKB_H_
+
+ /*
+ * XKB request codes, used in:
+ * - xkbReqType field of all requests
+ * - requestMinor field of some events
+ */
+#define X_kbUseExtension 0
+#define X_kbSelectEvents 1
+#define X_kbBell 3
+#define X_kbGetState 4
+#define X_kbLatchLockState 5
+#define X_kbGetControls 6
+#define X_kbSetControls 7
+#define X_kbGetMap 8
+#define X_kbSetMap 9
+#define X_kbGetCompatMap 10
+#define X_kbSetCompatMap 11
+#define X_kbGetIndicatorState 12
+#define X_kbGetIndicatorMap 13
+#define X_kbSetIndicatorMap 14
+#define X_kbGetNamedIndicator 15
+#define X_kbSetNamedIndicator 16
+#define X_kbGetNames 17
+#define X_kbSetNames 18
+#define X_kbGetGeometry 19
+#define X_kbSetGeometry 20
+#define X_kbPerClientFlags 21
+#define X_kbListComponents 22
+#define X_kbGetKbdByName 23
+#define X_kbGetDeviceInfo 24
+#define X_kbSetDeviceInfo 25
+#define X_kbSetDebuggingFlags 101
+
+ /*
+ * In the X sense, XKB reports only one event.
+ * The type field of all XKB events is XkbEventCode
+ */
+#define XkbEventCode 0
+#define XkbNumberEvents (XkbEventCode+1)
+
+ /*
+ * XKB has a minor event code so it can use one X event code for
+ * multiple purposes.
+ * - reported in the xkbType field of all XKB events.
+ * - XkbSelectEventDetails: Indicates the event for which event details
+ * are being changed
+ */
+#define XkbNewKeyboardNotify 0
+#define XkbMapNotify 1
+#define XkbStateNotify 2
+#define XkbControlsNotify 3
+#define XkbIndicatorStateNotify 4
+#define XkbIndicatorMapNotify 5
+#define XkbNamesNotify 6
+#define XkbCompatMapNotify 7
+#define XkbBellNotify 8
+#define XkbActionMessage 9
+#define XkbAccessXNotify 10
+#define XkbExtensionDeviceNotify 11
+
+ /*
+ * Event Mask:
+ * - XkbSelectEvents: Specifies event interest.
+ */
+#define XkbNewKeyboardNotifyMask (1L << 0)
+#define XkbMapNotifyMask (1L << 1)
+#define XkbStateNotifyMask (1L << 2)
+#define XkbControlsNotifyMask (1L << 3)
+#define XkbIndicatorStateNotifyMask (1L << 4)
+#define XkbIndicatorMapNotifyMask (1L << 5)
+#define XkbNamesNotifyMask (1L << 6)
+#define XkbCompatMapNotifyMask (1L << 7)
+#define XkbBellNotifyMask (1L << 8)
+#define XkbActionMessageMask (1L << 9)
+#define XkbAccessXNotifyMask (1L << 10)
+#define XkbExtensionDeviceNotifyMask (1L << 11)
+#define XkbAllEventsMask (0xFFF)
+
+ /*
+ * NewKeyboardNotify event details:
+ */
+#define XkbNKN_KeycodesMask (1L << 0)
+#define XkbNKN_GeometryMask (1L << 1)
+#define XkbNKN_DeviceIDMask (1L << 2)
+#define XkbAllNewKeyboardEventsMask (0x7)
+
+ /*
+ * AccessXNotify event types:
+ * - The 'what' field of AccessXNotify events reports the
+ * reason that the event was generated.
+ */
+#define XkbAXN_SKPress 0
+#define XkbAXN_SKAccept 1
+#define XkbAXN_SKReject 2
+#define XkbAXN_SKRelease 3
+#define XkbAXN_BKAccept 4
+#define XkbAXN_BKReject 5
+#define XkbAXN_AXKWarning 6
+
+ /*
+ * AccessXNotify details:
+ * - Used as an event detail mask to limit the conditions under which
+ * AccessXNotify events are reported
+ */
+#define XkbAXN_SKPressMask (1L << 0)
+#define XkbAXN_SKAcceptMask (1L << 1)
+#define XkbAXN_SKRejectMask (1L << 2)
+#define XkbAXN_SKReleaseMask (1L << 3)
+#define XkbAXN_BKAcceptMask (1L << 4)
+#define XkbAXN_BKRejectMask (1L << 5)
+#define XkbAXN_AXKWarningMask (1L << 6)
+#define XkbAllAccessXEventsMask (0x7f)
+
+ /*
+ * Miscellaneous event details:
+ * - event detail masks for assorted events that don't reall
+ * have any details.
+ */
+#define XkbAllStateEventsMask XkbAllStateComponentsMask
+#define XkbAllMapEventsMask XkbAllMapComponentsMask
+#define XkbAllControlEventsMask XkbAllControlsMask
+#define XkbAllIndicatorEventsMask XkbAllIndicatorsMask
+#define XkbAllNameEventsMask XkbAllNamesMask
+#define XkbAllCompatMapEventsMask XkbAllCompatMask
+#define XkbAllBellEventsMask (1L << 0)
+#define XkbAllActionMessagesMask (1L << 0)
+
+ /*
+ * XKB reports one error: BadKeyboard
+ * A further reason for the error is encoded into to most significant
+ * byte of the resourceID for the error:
+ * XkbErr_BadDevice - the device in question was not found
+ * XkbErr_BadClass - the device was found but it doesn't belong to
+ * the appropriate class.
+ * XkbErr_BadId - the device was found and belongs to the right
+ * class, but not feedback with a matching id was
+ * found.
+ * The low byte of the resourceID for this error contains the device
+ * id, class specifier or feedback id that failed.
+ */
+#define XkbKeyboard 0
+#define XkbNumberErrors 1
+
+#define XkbErr_BadDevice 0xff
+#define XkbErr_BadClass 0xfe
+#define XkbErr_BadId 0xfd
+
+ /*
+ * Keyboard Components Mask:
+ * - Specifies the components that follow a GetKeyboardByNameReply
+ */
+#define XkbClientMapMask (1L << 0)
+#define XkbServerMapMask (1L << 1)
+#define XkbCompatMapMask (1L << 2)
+#define XkbIndicatorMapMask (1L << 3)
+#define XkbNamesMask (1L << 4)
+#define XkbGeometryMask (1L << 5)
+#define XkbControlsMask (1L << 6)
+#define XkbAllComponentsMask (0x7f)
+
+ /*
+ * State detail mask:
+ * - The 'changed' field of StateNotify events reports which of
+ * the keyboard state components have changed.
+ * - Used as an event detail mask to limit the conditions under
+ * which StateNotify events are reported.
+ */
+#define XkbModifierStateMask (1L << 0)
+#define XkbModifierBaseMask (1L << 1)
+#define XkbModifierLatchMask (1L << 2)
+#define XkbModifierLockMask (1L << 3)
+#define XkbGroupStateMask (1L << 4)
+#define XkbGroupBaseMask (1L << 5)
+#define XkbGroupLatchMask (1L << 6)
+#define XkbGroupLockMask (1L << 7)
+#define XkbCompatStateMask (1L << 8)
+#define XkbGrabModsMask (1L << 9)
+#define XkbCompatGrabModsMask (1L << 10)
+#define XkbLookupModsMask (1L << 11)
+#define XkbCompatLookupModsMask (1L << 12)
+#define XkbPointerButtonMask (1L << 13)
+#define XkbAllStateComponentsMask (0x3fff)
+
+ /*
+ * Controls detail masks:
+ * The controls specified in XkbAllControlsMask:
+ * - The 'changed' field of ControlsNotify events reports which of
+ * the keyboard controls have changed.
+ * - The 'changeControls' field of the SetControls request specifies
+ * the controls for which values are to be changed.
+ * - Used as an event detail mask to limit the conditions under
+ * which ControlsNotify events are reported.
+ *
+ * The controls specified in the XkbAllBooleanCtrlsMask:
+ * - The 'enabledControls' field of ControlsNotify events reports the
+ * current status of the boolean controls.
+ * - The 'enabledControlsChanges' field of ControlsNotify events reports
+ * any boolean controls that have been turned on or off.
+ * - The 'affectEnabledControls' and 'enabledControls' fields of the
+ * kbSetControls request change the set of enabled controls.
+ * - The 'accessXTimeoutMask' and 'accessXTimeoutValues' fields of
+ * an XkbControlsRec specify the controls to be changed if the keyboard
+ * times out and the values to which they should be changed.
+ * - The 'autoCtrls' and 'autoCtrlsValues' fields of the PerClientFlags
+ * request specifies the specify the controls to be reset when the
+ * client exits and the values to which they should be reset.
+ * - The 'ctrls' field of an indicator map specifies the controls
+ * that drive the indicator.
+ * - Specifies the boolean controls affected by the SetControls and
+ * LockControls key actions.
+ */
+#define XkbRepeatKeysMask (1L << 0)
+#define XkbSlowKeysMask (1L << 1)
+#define XkbBounceKeysMask (1L << 2)
+#define XkbStickyKeysMask (1L << 3)
+#define XkbMouseKeysMask (1L << 4)
+#define XkbMouseKeysAccelMask (1L << 5)
+#define XkbAccessXKeysMask (1L << 6)
+#define XkbAccessXTimeoutMask (1L << 7)
+#define XkbAccessXFeedbackMask (1L << 8)
+#define XkbAudibleBellMask (1L << 9)
+#define XkbOverlay1Mask (1L << 10)
+#define XkbOverlay2Mask (1L << 11)
+#define XkbIgnoreGroupLockMask (1L << 12)
+#define XkbGroupsWrapMask (1L << 27)
+#define XkbInternalModsMask (1L << 28)
+#define XkbIgnoreLockModsMask (1L << 29)
+#define XkbPerKeyRepeatMask (1L << 30)
+#define XkbControlsEnabledMask (1L << 31)
+
+#define XkbAccessXOptionsMask (XkbStickyKeysMask|XkbAccessXFeedbackMask)
+
+#define XkbAllBooleanCtrlsMask (0x00001FFF)
+#define XkbAllControlsMask (0xF8001FFF)
+#define XkbAllControlEventsMask XkbAllControlsMask
+
+ /*
+ * AccessX Options Mask
+ * - The 'accessXOptions' field of an XkbControlsRec specifies the
+ * AccessX options that are currently in effect.
+ * - The 'accessXTimeoutOptionsMask' and 'accessXTimeoutOptionsValues'
+ * fields of an XkbControlsRec specify the Access X options to be
+ * changed if the keyboard times out and the values to which they
+ * should be changed.
+ */
+#define XkbAX_SKPressFBMask (1L << 0)
+#define XkbAX_SKAcceptFBMask (1L << 1)
+#define XkbAX_FeatureFBMask (1L << 2)
+#define XkbAX_SlowWarnFBMask (1L << 3)
+#define XkbAX_IndicatorFBMask (1L << 4)
+#define XkbAX_StickyKeysFBMask (1L << 5)
+#define XkbAX_TwoKeysMask (1L << 6)
+#define XkbAX_LatchToLockMask (1L << 7)
+#define XkbAX_SKReleaseFBMask (1L << 8)
+#define XkbAX_SKRejectFBMask (1L << 9)
+#define XkbAX_BKRejectFBMask (1L << 10)
+#define XkbAX_DumbBellFBMask (1L << 11)
+#define XkbAX_FBOptionsMask (0xF3F)
+#define XkbAX_SKOptionsMask (0x0C0)
+#define XkbAX_AllOptionsMask (0xFFF)
+
+ /*
+ * XkbUseCoreKbd is used to specify the core keyboard without having
+ * to look up its X input extension identifier.
+ * XkbUseCorePtr is used to specify the core pointer without having
+ * to look up its X input extension identifier.
+ * XkbDfltXIClass is used to specify "don't care" any place that the
+ * XKB protocol is looking for an X Input Extension
+ * device class.
+ * XkbDfltXIId is used to specify "don't care" any place that the
+ * XKB protocol is looking for an X Input Extension
+ * feedback identifier.
+ * XkbAllXIClasses is used to get information about all device indicators,
+ * whether they're part of the indicator feedback class
+ * or the keyboard feedback class.
+ * XkbAllXIIds is used to get information about all device indicator
+ * feedbacks without having to list them.
+ * XkbXINone is used to indicate that no class or id has been specified.
+ * XkbLegalXILedClass(c) True if 'c' specifies a legal class with LEDs
+ * XkbLegalXIBellClass(c) True if 'c' specifies a legal class with bells
+ * XkbExplicitXIDevice(d) True if 'd' explicitly specifies a device
+ * XkbExplicitXIClass(c) True if 'c' explicitly specifies a device class
+ * XkbExplicitXIId(c) True if 'i' explicitly specifies a device id
+ * XkbSingleXIClass(c) True if 'c' specifies exactly one device class,
+ * including the default.
+ * XkbSingleXIId(i) True if 'i' specifies exactly one device
+ * identifier, including the default.
+ */
+#define XkbUseCoreKbd 0x0100
+#define XkbUseCorePtr 0x0200
+#define XkbDfltXIClass 0x0300
+#define XkbDfltXIId 0x0400
+#define XkbAllXIClasses 0x0500
+#define XkbAllXIIds 0x0600
+#define XkbXINone 0xff00
+
+#define XkbLegalXILedClass(c) (((c)==KbdFeedbackClass)||\
+ ((c)==LedFeedbackClass)||\
+ ((c)==XkbDfltXIClass)||\
+ ((c)==XkbAllXIClasses))
+#define XkbLegalXIBellClass(c) (((c)==KbdFeedbackClass)||\
+ ((c)==BellFeedbackClass)||\
+ ((c)==XkbDfltXIClass)||\
+ ((c)==XkbAllXIClasses))
+#define XkbExplicitXIDevice(c) (((c)&(~0xff))==0)
+#define XkbExplicitXIClass(c) (((c)&(~0xff))==0)
+#define XkbExplicitXIId(c) (((c)&(~0xff))==0)
+#define XkbSingleXIClass(c) ((((c)&(~0xff))==0)||((c)==XkbDfltXIClass))
+#define XkbSingleXIId(c) ((((c)&(~0xff))==0)||((c)==XkbDfltXIId))
+
+#define XkbNoModifier 0xff
+#define XkbNoShiftLevel 0xff
+#define XkbNoShape 0xff
+#define XkbNoIndicator 0xff
+
+#define XkbNoModifierMask 0
+#define XkbAllModifiersMask 0xff
+#define XkbAllVirtualModsMask 0xffff
+
+#define XkbNumKbdGroups 4
+#define XkbMaxKbdGroup (XkbNumKbdGroups-1)
+
+#define XkbMaxMouseKeysBtn 4
+
+ /*
+ * Group Index and Mask:
+ * - Indices into the kt_index array of a key type.
+ * - Mask specifies types to be changed for XkbChangeTypesOfKey
+ */
+#define XkbGroup1Index 0
+#define XkbGroup2Index 1
+#define XkbGroup3Index 2
+#define XkbGroup4Index 3
+#define XkbAnyGroup 254
+#define XkbAllGroups 255
+
+#define XkbGroup1Mask (1<<0)
+#define XkbGroup2Mask (1<<1)
+#define XkbGroup3Mask (1<<2)
+#define XkbGroup4Mask (1<<3)
+#define XkbAnyGroupMask (1<<7)
+#define XkbAllGroupsMask (0xf)
+
+ /*
+ * BuildCoreState: Given a keyboard group and a modifier state,
+ * construct the value to be reported an event.
+ * GroupForCoreState: Given the state reported in an event,
+ * determine the keyboard group.
+ * IsLegalGroup: Returns TRUE if 'g' is a valid group index.
+ */
+#define XkbBuildCoreState(m,g) ((((g)&0x3)<<13)|((m)&0xff))
+#define XkbGroupForCoreState(s) (((s)>>13)&0x3)
+#define XkbIsLegalGroup(g) (((g)>=0)&&((g)<XkbNumKbdGroups))
+
+ /*
+ * GroupsWrap values:
+ * - The 'groupsWrap' field of an XkbControlsRec specifies the
+ * treatment of out of range groups.
+ * - Bits 6 and 7 of the group info field of a key symbol map
+ * specify the interpretation of out of range groups for the
+ * corresponding key.
+ */
+#define XkbWrapIntoRange (0x00)
+#define XkbClampIntoRange (0x40)
+#define XkbRedirectIntoRange (0x80)
+
+ /*
+ * Action flags: Reported in the 'flags' field of most key actions.
+ * Interpretation depends on the type of the action; not all actions
+ * accept all flags.
+ *
+ * Option Used for Actions
+ * ------ ----------------
+ * ClearLocks SetMods, LatchMods, SetGroup, LatchGroup
+ * LatchToLock SetMods, LatchMods, SetGroup, LatchGroup
+ * LockNoLock LockMods, ISOLock, LockPtrBtn, LockDeviceBtn
+ * LockNoUnlock LockMods, ISOLock, LockPtrBtn, LockDeviceBtn
+ * UseModMapMods SetMods, LatchMods, LockMods, ISOLock
+ * GroupAbsolute SetGroup, LatchGroup, LockGroup, ISOLock
+ * UseDfltButton PtrBtn, LockPtrBtn
+ * NoAcceleration MovePtr
+ * MoveAbsoluteX MovePtr
+ * MoveAbsoluteY MovePtr
+ * ISODfltIsGroup ISOLock
+ * ISONoAffectMods ISOLock
+ * ISONoAffectGroup ISOLock
+ * ISONoAffectPtr ISOLock
+ * ISONoAffectCtrls ISOLock
+ * MessageOnPress ActionMessage
+ * MessageOnRelease ActionMessage
+ * MessageGenKeyEvent ActionMessage
+ * AffectDfltBtn SetPtrDflt
+ * DfltBtnAbsolute SetPtrDflt
+ * SwitchApplication SwitchScreen
+ * SwitchAbsolute SwitchScreen
+ */
+
+#define XkbSA_ClearLocks (1L << 0)
+#define XkbSA_LatchToLock (1L << 1)
+
+#define XkbSA_LockNoLock (1L << 0)
+#define XkbSA_LockNoUnlock (1L << 1)
+
+#define XkbSA_UseModMapMods (1L << 2)
+
+#define XkbSA_GroupAbsolute (1L << 2)
+#define XkbSA_UseDfltButton 0
+
+#define XkbSA_NoAcceleration (1L << 0)
+#define XkbSA_MoveAbsoluteX (1L << 1)
+#define XkbSA_MoveAbsoluteY (1L << 2)
+
+#define XkbSA_ISODfltIsGroup (1L << 7)
+#define XkbSA_ISONoAffectMods (1L << 6)
+#define XkbSA_ISONoAffectGroup (1L << 5)
+#define XkbSA_ISONoAffectPtr (1L << 4)
+#define XkbSA_ISONoAffectCtrls (1L << 3)
+#define XkbSA_ISOAffectMask (0x78)
+
+#define XkbSA_MessageOnPress (1L << 0)
+#define XkbSA_MessageOnRelease (1L << 1)
+#define XkbSA_MessageGenKeyEvent (1L << 2)
+
+#define XkbSA_AffectDfltBtn 1
+#define XkbSA_DfltBtnAbsolute (1L << 2)
+
+#define XkbSA_SwitchApplication (1L << 0)
+#define XkbSA_SwitchAbsolute (1L << 2)
+
+ /*
+ * The following values apply to the SA_DeviceValuator
+ * action only. Valuator operations specify the action
+ * to be taken. Values specified in the action are
+ * multiplied by 2^scale before they are applied.
+ */
+#define XkbSA_IgnoreVal (0x00)
+#define XkbSA_SetValMin (0x10)
+#define XkbSA_SetValCenter (0x20)
+#define XkbSA_SetValMax (0x30)
+#define XkbSA_SetValRelative (0x40)
+#define XkbSA_SetValAbsolute (0x50)
+#define XkbSA_ValOpMask (0x70)
+#define XkbSA_ValScaleMask (0x07)
+#define XkbSA_ValOp(a) ((a)&XkbSA_ValOpMask)
+#define XkbSA_ValScale(a) ((a)&XkbSA_ValScaleMask)
+
+ /*
+ * Action types: specifies the type of a key action. Reported in the
+ * type field of all key actions.
+ */
+#define XkbSA_NoAction 0x00
+#define XkbSA_SetMods 0x01
+#define XkbSA_LatchMods 0x02
+#define XkbSA_LockMods 0x03
+#define XkbSA_SetGroup 0x04
+#define XkbSA_LatchGroup 0x05
+#define XkbSA_LockGroup 0x06
+#define XkbSA_MovePtr 0x07
+#define XkbSA_PtrBtn 0x08
+#define XkbSA_LockPtrBtn 0x09
+#define XkbSA_SetPtrDflt 0x0a
+#define XkbSA_ISOLock 0x0b
+#define XkbSA_Terminate 0x0c
+#define XkbSA_SwitchScreen 0x0d
+#define XkbSA_SetControls 0x0e
+#define XkbSA_LockControls 0x0f
+#define XkbSA_ActionMessage 0x10
+#define XkbSA_RedirectKey 0x11
+#define XkbSA_DeviceBtn 0x12
+#define XkbSA_LockDeviceBtn 0x13
+#define XkbSA_DeviceValuator 0x14
+#define XkbSA_LastAction XkbSA_DeviceValuator
+#define XkbSA_NumActions (XkbSA_LastAction+1)
+
+#define XkbSA_XFree86Private 0x86
+
+ /*
+ * Specifies the key actions that clear latched groups or modifiers.
+ */
+#define XkbSA_BreakLatch \
+ ((1<<XkbSA_NoAction)|(1<<XkbSA_PtrBtn)|(1<<XkbSA_LockPtrBtn)|\
+ (1<<XkbSA_Terminate)|(1<<XkbSA_SwitchScreen)|(1<<XkbSA_SetControls)|\
+ (1<<XkbSA_LockControls)|(1<<XkbSA_ActionMessage)|\
+ (1<<XkbSA_RedirectKey)|(1<<XkbSA_DeviceBtn)|(1<<XkbSA_LockDeviceBtn))
+
+ /*
+ * Macros to classify key actions
+ */
+#define XkbIsModAction(a) (((a)->type>=Xkb_SASetMods)&&((a)->type<=XkbSA_LockMods))
+#define XkbIsGroupAction(a) (((a)->type>=XkbSA_SetGroup)&&((a)->type<=XkbSA_LockGroup))
+#define XkbIsPtrAction(a) (((a)->type>=XkbSA_MovePtr)&&((a)->type<=XkbSA_SetPtrDflt))
+
+
+ /*
+ * Key Behavior Qualifier:
+ * KB_Permanent indicates that the behavior describes an unalterable
+ * characteristic of the keyboard, not an XKB software-simulation of
+ * the listed behavior.
+ * Key Behavior Types:
+ * Specifies the behavior of the underlying key.
+ */
+#define XkbKB_Permanent 0x80
+#define XkbKB_OpMask 0x7f
+
+#define XkbKB_Default 0x00
+#define XkbKB_Lock 0x01
+#define XkbKB_RadioGroup 0x02
+#define XkbKB_Overlay1 0x03
+#define XkbKB_Overlay2 0x04
+
+#define XkbKB_RGAllowNone 0x80
+
+ /*
+ * Various macros which describe the range of legal keycodes.
+ */
+#define XkbMinLegalKeyCode 8
+#define XkbMaxLegalKeyCode 255
+#define XkbMaxKeyCount (XkbMaxLegalKeyCode-XkbMinLegalKeyCode+1)
+#define XkbPerKeyBitArraySize ((XkbMaxLegalKeyCode+1)/8)
+/* Seems kinda silly to check that an unsigned char is <= 255... */
+#define XkbIsLegalKeycode(k) ((k)>=XkbMinLegalKeyCode)
+
+ /*
+ * Assorted constants and limits.
+ */
+#define XkbNumModifiers 8
+#define XkbNumVirtualMods 16
+#define XkbNumIndicators 32
+#define XkbAllIndicatorsMask (0xffffffff)
+#define XkbMaxRadioGroups 32
+#define XkbAllRadioGroupsMask (0xffffffff)
+#define XkbMaxShiftLevel 63
+#define XkbMaxSymsPerKey (XkbMaxShiftLevel*XkbNumKbdGroups)
+#define XkbRGMaxMembers 12
+#define XkbActionMessageLength 6
+#define XkbKeyNameLength 4
+#define XkbMaxRedirectCount 8
+
+#define XkbGeomPtsPerMM 10
+#define XkbGeomMaxColors 32
+#define XkbGeomMaxLabelColors 3
+#define XkbGeomMaxPriority 255
+
+ /*
+ * Key Type index and mask for the four standard key types.
+ */
+#define XkbOneLevelIndex 0
+#define XkbTwoLevelIndex 1
+#define XkbAlphabeticIndex 2
+#define XkbKeypadIndex 3
+#define XkbLastRequiredType XkbKeypadIndex
+#define XkbNumRequiredTypes (XkbLastRequiredType+1)
+#define XkbMaxKeyTypes 255
+
+#define XkbOneLevelMask (1<<0)
+#define XkbTwoLevelMask (1<<1)
+#define XkbAlphabeticMask (1<<2)
+#define XkbKeypadMask (1<<3)
+#define XkbAllRequiredTypes (0xf)
+
+#define XkbShiftLevel(n) ((n)-1)
+#define XkbShiftLevelMask(n) (1<<((n)-1))
+
+ /*
+ * Extension name and version information
+ */
+#define XkbName "XKEYBOARD"
+#define XkbMajorVersion 1
+#define XkbMinorVersion 0
+
+ /*
+ * Explicit map components:
+ * - Used in the 'explicit' field of an XkbServerMap. Specifies
+ * the keyboard components that should _not_ be updated automatically
+ * in response to core protocol keyboard mapping requests.
+ */
+#define XkbExplicitKeyTypesMask (0x0f)
+#define XkbExplicitKeyType1Mask (1<<0)
+#define XkbExplicitKeyType2Mask (1<<1)
+#define XkbExplicitKeyType3Mask (1<<2)
+#define XkbExplicitKeyType4Mask (1<<3)
+#define XkbExplicitInterpretMask (1<<4)
+#define XkbExplicitAutoRepeatMask (1<<5)
+#define XkbExplicitBehaviorMask (1<<6)
+#define XkbExplicitVModMapMask (1<<7)
+#define XkbAllExplicitMask (0xff)
+
+ /*
+ * Map components masks:
+ * Those in AllMapComponentsMask:
+ * - Specifies the individual fields to be loaded or changed for the
+ * GetMap and SetMap requests.
+ * Those in ClientInfoMask:
+ * - Specifies the components to be allocated by XkbAllocClientMap.
+ * Those in ServerInfoMask:
+ * - Specifies the components to be allocated by XkbAllocServerMap.
+ */
+#define XkbKeyTypesMask (1<<0)
+#define XkbKeySymsMask (1<<1)
+#define XkbModifierMapMask (1<<2)
+#define XkbExplicitComponentsMask (1<<3)
+#define XkbKeyActionsMask (1<<4)
+#define XkbKeyBehaviorsMask (1<<5)
+#define XkbVirtualModsMask (1<<6)
+#define XkbVirtualModMapMask (1<<7)
+
+#define XkbAllClientInfoMask (XkbKeyTypesMask|XkbKeySymsMask|XkbModifierMapMask)
+#define XkbAllServerInfoMask (XkbExplicitComponentsMask|XkbKeyActionsMask|XkbKeyBehaviorsMask|XkbVirtualModsMask|XkbVirtualModMapMask)
+#define XkbAllMapComponentsMask (XkbAllClientInfoMask|XkbAllServerInfoMask)
+
+ /*
+ * Symbol interpretations flags:
+ * - Used in the flags field of a symbol interpretation
+ */
+#define XkbSI_AutoRepeat (1<<0)
+#define XkbSI_LockingKey (1<<1)
+
+ /*
+ * Symbol interpretations match specification:
+ * - Used in the match field of a symbol interpretation to specify
+ * the conditions under which an interpretation is used.
+ */
+#define XkbSI_LevelOneOnly (0x80)
+#define XkbSI_OpMask (0x7f)
+#define XkbSI_NoneOf (0)
+#define XkbSI_AnyOfOrNone (1)
+#define XkbSI_AnyOf (2)
+#define XkbSI_AllOf (3)
+#define XkbSI_Exactly (4)
+
+ /*
+ * Indicator map flags:
+ * - Used in the flags field of an indicator map to indicate the
+ * conditions under which and indicator can be changed and the
+ * effects of changing the indicator.
+ */
+#define XkbIM_NoExplicit (1L << 7)
+#define XkbIM_NoAutomatic (1L << 6)
+#define XkbIM_LEDDrivesKB (1L << 5)
+
+ /*
+ * Indicator map component specifications:
+ * - Used by the 'which_groups' and 'which_mods' fields of an indicator
+ * map to specify which keyboard components should be used to drive
+ * the indicator.
+ */
+#define XkbIM_UseBase (1L << 0)
+#define XkbIM_UseLatched (1L << 1)
+#define XkbIM_UseLocked (1L << 2)
+#define XkbIM_UseEffective (1L << 3)
+#define XkbIM_UseCompat (1L << 4)
+
+#define XkbIM_UseNone 0
+#define XkbIM_UseAnyGroup (XkbIM_UseBase|XkbIM_UseLatched|XkbIM_UseLocked\
+ |XkbIM_UseEffective)
+#define XkbIM_UseAnyMods (XkbIM_UseAnyGroup|XkbIM_UseCompat)
+
+ /*
+ * Compatibility Map Compontents:
+ * - Specifies the components to be allocated in XkbAllocCompatMap.
+ */
+#define XkbSymInterpMask (1<<0)
+#define XkbGroupCompatMask (1<<1)
+#define XkbAllCompatMask (0x3)
+
+ /*
+ * Names component mask:
+ * - Specifies the names to be loaded or changed for the GetNames and
+ * SetNames requests.
+ * - Specifies the names that have changed in a NamesNotify event.
+ * - Specifies the names components to be allocated by XkbAllocNames.
+ */
+#define XkbKeycodesNameMask (1<<0)
+#define XkbGeometryNameMask (1<<1)
+#define XkbSymbolsNameMask (1<<2)
+#define XkbPhysSymbolsNameMask (1<<3)
+#define XkbTypesNameMask (1<<4)
+#define XkbCompatNameMask (1<<5)
+#define XkbKeyTypeNamesMask (1<<6)
+#define XkbKTLevelNamesMask (1<<7)
+#define XkbIndicatorNamesMask (1<<8)
+#define XkbKeyNamesMask (1<<9)
+#define XkbKeyAliasesMask (1<<10)
+#define XkbVirtualModNamesMask (1<<11)
+#define XkbGroupNamesMask (1<<12)
+#define XkbRGNamesMask (1<<13)
+#define XkbComponentNamesMask (0x3f)
+#define XkbAllNamesMask (0x3fff)
+
+ /*
+ * GetByName components:
+ * - Specifies desired or necessary components to GetKbdByName request.
+ * - Reports the components that were found in a GetKbdByNameReply
+ */
+#define XkbGBN_TypesMask (1L << 0)
+#define XkbGBN_CompatMapMask (1L << 1)
+#define XkbGBN_ClientSymbolsMask (1L << 2)
+#define XkbGBN_ServerSymbolsMask (1L << 3)
+#define XkbGBN_SymbolsMask (XkbGBN_ClientSymbolsMask|XkbGBN_ServerSymbolsMask)
+#define XkbGBN_IndicatorMapMask (1L << 4)
+#define XkbGBN_KeyNamesMask (1L << 5)
+#define XkbGBN_GeometryMask (1L << 6)
+#define XkbGBN_OtherNamesMask (1L << 7)
+#define XkbGBN_AllComponentsMask (0xff)
+
+ /*
+ * ListComponents flags
+ */
+#define XkbLC_Hidden (1L << 0)
+#define XkbLC_Default (1L << 1)
+#define XkbLC_Partial (1L << 2)
+
+#define XkbLC_AlphanumericKeys (1L << 8)
+#define XkbLC_ModifierKeys (1L << 9)
+#define XkbLC_KeypadKeys (1L << 10)
+#define XkbLC_FunctionKeys (1L << 11)
+#define XkbLC_AlternateGroup (1L << 12)
+
+ /*
+ * X Input Extension Interactions
+ * - Specifies the possible interactions between XKB and the X input
+ * extension
+ * - Used to request (XkbGetDeviceInfo) or change (XKbSetDeviceInfo)
+ * XKB information about an extension device.
+ * - Reports the list of supported optional features in the reply to
+ * XkbGetDeviceInfo or in an XkbExtensionDeviceNotify event.
+ * XkbXI_UnsupportedFeature is reported in XkbExtensionDeviceNotify
+ * events to indicate an attempt to use an unsupported feature.
+ */
+#define XkbXI_KeyboardsMask (1L << 0)
+#define XkbXI_ButtonActionsMask (1L << 1)
+#define XkbXI_IndicatorNamesMask (1L << 2)
+#define XkbXI_IndicatorMapsMask (1L << 3)
+#define XkbXI_IndicatorStateMask (1L << 4)
+#define XkbXI_UnsupportedFeatureMask (1L << 15)
+#define XkbXI_AllFeaturesMask (0x001f)
+#define XkbXI_AllDeviceFeaturesMask (0x001e)
+
+#define XkbXI_IndicatorsMask (0x001c)
+#define XkbAllExtensionDeviceEventsMask (0x801f)
+
+ /*
+ * Per-Client Flags:
+ * - Specifies flags to be changed by the PerClientFlags request.
+ */
+#define XkbPCF_DetectableAutoRepeatMask (1L << 0)
+#define XkbPCF_GrabsUseXKBStateMask (1L << 1)
+#define XkbPCF_AutoResetControlsMask (1L << 2)
+#define XkbPCF_LookupStateWhenGrabbed (1L << 3)
+#define XkbPCF_SendEventUsesXKBState (1L << 4)
+#define XkbPCF_AllFlagsMask (0x1F)
+
+ /*
+ * Debugging flags and controls
+ */
+#define XkbDF_DisableLocks (1<<0)
+
+#endif /* _XKB_H_ */
diff --git a/system/include/X11/extensions/XKBstr.h b/system/include/X11/extensions/XKBstr.h
new file mode 100644
index 00000000..e519e657
--- /dev/null
+++ b/system/include/X11/extensions/XKBstr.h
@@ -0,0 +1,613 @@
+/************************************************************
+Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc.
+
+Permission to use, copy, modify, and distribute this
+software and its documentation for any purpose and without
+fee is hereby granted, provided that the above copyright
+notice appear in all copies and that both that copyright
+notice and this permission notice appear in supporting
+documentation, and that the name of Silicon Graphics not be
+used in advertising or publicity pertaining to distribution
+of the software without specific prior written permission.
+Silicon Graphics makes no representation about the suitability
+of this software for any purpose. It is provided "as is"
+without any express or implied warranty.
+
+SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
+GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
+THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+********************************************************/
+
+#ifndef _XKBSTR_H_
+#define _XKBSTR_H_
+
+#include <X11/extensions/XKB.h>
+
+#define XkbCharToInt(v) ((v)&0x80?(int)((v)|(~0xff)):(int)((v)&0x7f))
+#define XkbIntTo2Chars(i,h,l) (((h)=((i>>8)&0xff)),((l)=((i)&0xff)))
+
+#if defined(WORD64) && defined(UNSIGNEDBITFIELDS)
+#define Xkb2CharsToInt(h,l) ((h)&0x80?(int)(((h)<<8)|(l)|(~0xffff)):\
+ (int)(((h)<<8)|(l)&0x7fff))
+#else
+#define Xkb2CharsToInt(h,l) ((short)(((h)<<8)|(l)))
+#endif
+
+ /*
+ * Common data structures and access macros
+ */
+
+typedef struct _XkbStateRec {
+ unsigned char group;
+ unsigned char locked_group;
+ unsigned short base_group;
+ unsigned short latched_group;
+ unsigned char mods;
+ unsigned char base_mods;
+ unsigned char latched_mods;
+ unsigned char locked_mods;
+ unsigned char compat_state;
+ unsigned char grab_mods;
+ unsigned char compat_grab_mods;
+ unsigned char lookup_mods;
+ unsigned char compat_lookup_mods;
+ unsigned short ptr_buttons;
+} XkbStateRec,*XkbStatePtr;
+#define XkbModLocks(s) ((s)->locked_mods)
+#define XkbStateMods(s) ((s)->base_mods|(s)->latched_mods|XkbModLocks(s))
+#define XkbGroupLock(s) ((s)->locked_group)
+#define XkbStateGroup(s) ((s)->base_group+(s)->latched_group+XkbGroupLock(s))
+#define XkbStateFieldFromRec(s) XkbBuildCoreState((s)->lookup_mods,(s)->group)
+#define XkbGrabStateFromRec(s) XkbBuildCoreState((s)->grab_mods,(s)->group)
+
+typedef struct _XkbMods {
+ unsigned char mask; /* effective mods */
+ unsigned char real_mods;
+ unsigned short vmods;
+} XkbModsRec,*XkbModsPtr;
+
+typedef struct _XkbKTMapEntry {
+ Bool active;
+ unsigned char level;
+ XkbModsRec mods;
+} XkbKTMapEntryRec,*XkbKTMapEntryPtr;
+
+typedef struct _XkbKeyType {
+ XkbModsRec mods;
+ unsigned char num_levels;
+ unsigned char map_count;
+ XkbKTMapEntryPtr map;
+ XkbModsPtr preserve;
+ Atom name;
+ Atom * level_names;
+} XkbKeyTypeRec, *XkbKeyTypePtr;
+
+#define XkbNumGroups(g) ((g)&0x0f)
+#define XkbOutOfRangeGroupInfo(g) ((g)&0xf0)
+#define XkbOutOfRangeGroupAction(g) ((g)&0xc0)
+#define XkbOutOfRangeGroupNumber(g) (((g)&0x30)>>4)
+#define XkbSetGroupInfo(g,w,n) (((w)&0xc0)|(((n)&3)<<4)|((g)&0x0f))
+#define XkbSetNumGroups(g,n) (((g)&0xf0)|((n)&0x0f))
+
+ /*
+ * Structures and access macros used primarily by the server
+ */
+
+typedef struct _XkbBehavior {
+ unsigned char type;
+ unsigned char data;
+} XkbBehavior;
+
+#define XkbAnyActionDataSize 7
+typedef struct _XkbAnyAction {
+ unsigned char type;
+ unsigned char data[XkbAnyActionDataSize];
+} XkbAnyAction;
+
+typedef struct _XkbModAction {
+ unsigned char type;
+ unsigned char flags;
+ unsigned char mask;
+ unsigned char real_mods;
+ unsigned char vmods1;
+ unsigned char vmods2;
+} XkbModAction;
+#define XkbModActionVMods(a) \
+ ((short)(((a)->vmods1<<8)|((a)->vmods2)))
+#define XkbSetModActionVMods(a,v) \
+ (((a)->vmods1=(((v)>>8)&0xff)),(a)->vmods2=((v)&0xff))
+
+typedef struct _XkbGroupAction {
+ unsigned char type;
+ unsigned char flags;
+ char group_XXX;
+} XkbGroupAction;
+#define XkbSAGroup(a) (XkbCharToInt((a)->group_XXX))
+#define XkbSASetGroup(a,g) ((a)->group_XXX=(g))
+
+typedef struct _XkbISOAction {
+ unsigned char type;
+ unsigned char flags;
+ unsigned char mask;
+ unsigned char real_mods;
+ char group_XXX;
+ unsigned char affect;
+ unsigned char vmods1;
+ unsigned char vmods2;
+} XkbISOAction;
+
+typedef struct _XkbPtrAction {
+ unsigned char type;
+ unsigned char flags;
+ unsigned char high_XXX;
+ unsigned char low_XXX;
+ unsigned char high_YYY;
+ unsigned char low_YYY;
+} XkbPtrAction;
+#define XkbPtrActionX(a) (Xkb2CharsToInt((a)->high_XXX,(a)->low_XXX))
+#define XkbPtrActionY(a) (Xkb2CharsToInt((a)->high_YYY,(a)->low_YYY))
+#define XkbSetPtrActionX(a,x) (XkbIntTo2Chars(x,(a)->high_XXX,(a)->low_XXX))
+#define XkbSetPtrActionY(a,y) (XkbIntTo2Chars(y,(a)->high_YYY,(a)->low_YYY))
+
+typedef struct _XkbPtrBtnAction {
+ unsigned char type;
+ unsigned char flags;
+ unsigned char count;
+ unsigned char button;
+} XkbPtrBtnAction;
+
+typedef struct _XkbPtrDfltAction {
+ unsigned char type;
+ unsigned char flags;
+ unsigned char affect;
+ char valueXXX;
+} XkbPtrDfltAction;
+#define XkbSAPtrDfltValue(a) (XkbCharToInt((a)->valueXXX))
+#define XkbSASetPtrDfltValue(a,c) ((a)->valueXXX= ((c)&0xff))
+
+typedef struct _XkbSwitchScreenAction {
+ unsigned char type;
+ unsigned char flags;
+ char screenXXX;
+} XkbSwitchScreenAction;
+#define XkbSAScreen(a) (XkbCharToInt((a)->screenXXX))
+#define XkbSASetScreen(a,s) ((a)->screenXXX= ((s)&0xff))
+
+typedef struct _XkbCtrlsAction {
+ unsigned char type;
+ unsigned char flags;
+ unsigned char ctrls3;
+ unsigned char ctrls2;
+ unsigned char ctrls1;
+ unsigned char ctrls0;
+} XkbCtrlsAction;
+#define XkbActionSetCtrls(a,c) (((a)->ctrls3=(((c)>>24)&0xff)),\
+ ((a)->ctrls2=(((c)>>16)&0xff)),\
+ ((a)->ctrls1=(((c)>>8)&0xff)),\
+ ((a)->ctrls0=((c)&0xff)))
+#define XkbActionCtrls(a) ((((unsigned int)(a)->ctrls3)<<24)|\
+ (((unsigned int)(a)->ctrls2)<<16)|\
+ (((unsigned int)(a)->ctrls1)<<8)|\
+ ((unsigned int)((a)->ctrls0)))
+
+typedef struct _XkbMessageAction {
+ unsigned char type;
+ unsigned char flags;
+ unsigned char message[6];
+} XkbMessageAction;
+
+typedef struct _XkbRedirectKeyAction {
+ unsigned char type;
+ unsigned char new_key;
+ unsigned char mods_mask;
+ unsigned char mods;
+ unsigned char vmods_mask0;
+ unsigned char vmods_mask1;
+ unsigned char vmods0;
+ unsigned char vmods1;
+} XkbRedirectKeyAction;
+
+#define XkbSARedirectVMods(a) ((((unsigned int)(a)->vmods1)<<8)|\
+ ((unsigned int)(a)->vmods0))
+#define XkbSARedirectSetVMods(a,m) (((a)->vmods_mask1=(((m)>>8)&0xff)),\
+ ((a)->vmods_mask0=((m)&0xff)))
+#define XkbSARedirectVModsMask(a) ((((unsigned int)(a)->vmods_mask1)<<8)|\
+ ((unsigned int)(a)->vmods_mask0))
+#define XkbSARedirectSetVModsMask(a,m) (((a)->vmods_mask1=(((m)>>8)&0xff)),\
+ ((a)->vmods_mask0=((m)&0xff)))
+
+typedef struct _XkbDeviceBtnAction {
+ unsigned char type;
+ unsigned char flags;
+ unsigned char count;
+ unsigned char button;
+ unsigned char device;
+} XkbDeviceBtnAction;
+
+typedef struct _XkbDeviceValuatorAction {
+ unsigned char type;
+ unsigned char device;
+ unsigned char v1_what;
+ unsigned char v1_ndx;
+ unsigned char v1_value;
+ unsigned char v2_what;
+ unsigned char v2_ndx;
+ unsigned char v2_value;
+} XkbDeviceValuatorAction;
+
+typedef union _XkbAction {
+ XkbAnyAction any;
+ XkbModAction mods;
+ XkbGroupAction group;
+ XkbISOAction iso;
+ XkbPtrAction ptr;
+ XkbPtrBtnAction btn;
+ XkbPtrDfltAction dflt;
+ XkbSwitchScreenAction screen;
+ XkbCtrlsAction ctrls;
+ XkbMessageAction msg;
+ XkbRedirectKeyAction redirect;
+ XkbDeviceBtnAction devbtn;
+ XkbDeviceValuatorAction devval;
+ unsigned char type;
+} XkbAction;
+
+typedef struct _XkbControls {
+ unsigned char mk_dflt_btn;
+ unsigned char num_groups;
+ unsigned char groups_wrap;
+ XkbModsRec internal;
+ XkbModsRec ignore_lock;
+ unsigned int enabled_ctrls;
+ unsigned short repeat_delay;
+ unsigned short repeat_interval;
+ unsigned short slow_keys_delay;
+ unsigned short debounce_delay;
+ unsigned short mk_delay;
+ unsigned short mk_interval;
+ unsigned short mk_time_to_max;
+ unsigned short mk_max_speed;
+ short mk_curve;
+ unsigned short ax_options;
+ unsigned short ax_timeout;
+ unsigned short axt_opts_mask;
+ unsigned short axt_opts_values;
+ unsigned int axt_ctrls_mask;
+ unsigned int axt_ctrls_values;
+ unsigned char per_key_repeat[XkbPerKeyBitArraySize];
+} XkbControlsRec, *XkbControlsPtr;
+
+#define XkbAX_AnyFeedback(c) ((c)->enabled_ctrls&XkbAccessXFeedbackMask)
+#define XkbAX_NeedOption(c,w) ((c)->ax_options&(w))
+#define XkbAX_NeedFeedback(c,w) (XkbAX_AnyFeedback(c)&&XkbAX_NeedOption(c,w))
+
+typedef struct _XkbServerMapRec {
+ unsigned short num_acts;
+ unsigned short size_acts;
+ XkbAction *acts;
+
+ XkbBehavior *behaviors;
+ unsigned short *key_acts;
+#if defined(__cplusplus) || defined(c_plusplus)
+ /* explicit is a C++ reserved word */
+ unsigned char *c_explicit;
+#else
+ unsigned char *explicit;
+#endif
+ unsigned char vmods[XkbNumVirtualMods];
+ unsigned short *vmodmap;
+} XkbServerMapRec, *XkbServerMapPtr;
+
+#define XkbSMKeyActionsPtr(m,k) (&(m)->acts[(m)->key_acts[k]])
+
+ /*
+ * Structures and access macros used primarily by clients
+ */
+
+typedef struct _XkbSymMapRec {
+ unsigned char kt_index[XkbNumKbdGroups];
+ unsigned char group_info;
+ unsigned char width;
+ unsigned short offset;
+} XkbSymMapRec, *XkbSymMapPtr;
+
+typedef struct _XkbClientMapRec {
+ unsigned char size_types;
+ unsigned char num_types;
+ XkbKeyTypePtr types;
+
+ unsigned short size_syms;
+ unsigned short num_syms;
+ KeySym *syms;
+ XkbSymMapPtr key_sym_map;
+
+ unsigned char *modmap;
+} XkbClientMapRec, *XkbClientMapPtr;
+
+#define XkbCMKeyGroupInfo(m,k) ((m)->key_sym_map[k].group_info)
+#define XkbCMKeyNumGroups(m,k) (XkbNumGroups((m)->key_sym_map[k].group_info))
+#define XkbCMKeyGroupWidth(m,k,g) (XkbCMKeyType(m,k,g)->num_levels)
+#define XkbCMKeyGroupsWidth(m,k) ((m)->key_sym_map[k].width)
+#define XkbCMKeyTypeIndex(m,k,g) ((m)->key_sym_map[k].kt_index[g&0x3])
+#define XkbCMKeyType(m,k,g) (&(m)->types[XkbCMKeyTypeIndex(m,k,g)])
+#define XkbCMKeyNumSyms(m,k) (XkbCMKeyGroupsWidth(m,k)*XkbCMKeyNumGroups(m,k))
+#define XkbCMKeySymsOffset(m,k) ((m)->key_sym_map[k].offset)
+#define XkbCMKeySymsPtr(m,k) (&(m)->syms[XkbCMKeySymsOffset(m,k)])
+
+ /*
+ * Compatibility structures and access macros
+ */
+
+typedef struct _XkbSymInterpretRec {
+ KeySym sym;
+ unsigned char flags;
+ unsigned char match;
+ unsigned char mods;
+ unsigned char virtual_mod;
+ XkbAnyAction act;
+} XkbSymInterpretRec,*XkbSymInterpretPtr;
+
+typedef struct _XkbCompatMapRec {
+ XkbSymInterpretPtr sym_interpret;
+ XkbModsRec groups[XkbNumKbdGroups];
+ unsigned short num_si;
+ unsigned short size_si;
+} XkbCompatMapRec, *XkbCompatMapPtr;
+
+typedef struct _XkbIndicatorMapRec {
+ unsigned char flags;
+ unsigned char which_groups;
+ unsigned char groups;
+ unsigned char which_mods;
+ XkbModsRec mods;
+ unsigned int ctrls;
+} XkbIndicatorMapRec, *XkbIndicatorMapPtr;
+
+#define XkbIM_IsAuto(i) ((((i)->flags&XkbIM_NoAutomatic)==0)&&\
+ (((i)->which_groups&&(i)->groups)||\
+ ((i)->which_mods&&(i)->mods.mask)||\
+ ((i)->ctrls)))
+#define XkbIM_InUse(i) (((i)->flags)||((i)->which_groups)||\
+ ((i)->which_mods)||((i)->ctrls))
+
+
+typedef struct _XkbIndicatorRec {
+ unsigned long phys_indicators;
+ XkbIndicatorMapRec maps[XkbNumIndicators];
+} XkbIndicatorRec,*XkbIndicatorPtr;
+
+typedef struct _XkbKeyNameRec {
+ char name[XkbKeyNameLength];
+} XkbKeyNameRec,*XkbKeyNamePtr;
+
+typedef struct _XkbKeyAliasRec {
+ char real[XkbKeyNameLength];
+ char alias[XkbKeyNameLength];
+} XkbKeyAliasRec,*XkbKeyAliasPtr;
+
+ /*
+ * Names for everything
+ */
+typedef struct _XkbNamesRec {
+ Atom keycodes;
+ Atom geometry;
+ Atom symbols;
+ Atom types;
+ Atom compat;
+ Atom vmods[XkbNumVirtualMods];
+ Atom indicators[XkbNumIndicators];
+ Atom groups[XkbNumKbdGroups];
+ XkbKeyNamePtr keys;
+ XkbKeyAliasPtr key_aliases;
+ Atom *radio_groups;
+ Atom phys_symbols;
+
+ unsigned char num_keys;
+ unsigned char num_key_aliases;
+ unsigned short num_rg;
+} XkbNamesRec,*XkbNamesPtr;
+
+typedef struct _XkbGeometry *XkbGeometryPtr;
+ /*
+ * Tie it all together into one big keyboard description
+ */
+typedef struct _XkbDesc {
+ struct _XDisplay * dpy;
+ unsigned short flags;
+ unsigned short device_spec;
+ KeyCode min_key_code;
+ KeyCode max_key_code;
+
+ XkbControlsPtr ctrls;
+ XkbServerMapPtr server;
+ XkbClientMapPtr map;
+ XkbIndicatorPtr indicators;
+ XkbNamesPtr names;
+ XkbCompatMapPtr compat;
+ XkbGeometryPtr geom;
+} XkbDescRec, *XkbDescPtr;
+#define XkbKeyKeyTypeIndex(d,k,g) (XkbCMKeyTypeIndex((d)->map,k,g))
+#define XkbKeyKeyType(d,k,g) (XkbCMKeyType((d)->map,k,g))
+#define XkbKeyGroupWidth(d,k,g) (XkbCMKeyGroupWidth((d)->map,k,g))
+#define XkbKeyGroupsWidth(d,k) (XkbCMKeyGroupsWidth((d)->map,k))
+#define XkbKeyGroupInfo(d,k) (XkbCMKeyGroupInfo((d)->map,(k)))
+#define XkbKeyNumGroups(d,k) (XkbCMKeyNumGroups((d)->map,(k)))
+#define XkbKeyNumSyms(d,k) (XkbCMKeyNumSyms((d)->map,(k)))
+#define XkbKeySymsPtr(d,k) (XkbCMKeySymsPtr((d)->map,(k)))
+#define XkbKeySym(d,k,n) (XkbKeySymsPtr(d,k)[n])
+#define XkbKeySymEntry(d,k,sl,g) \
+ (XkbKeySym(d,k,((XkbKeyGroupsWidth(d,k)*(g))+(sl))))
+#define XkbKeyAction(d,k,n) \
+ (XkbKeyHasActions(d,k)?&XkbKeyActionsPtr(d,k)[n]:NULL)
+#define XkbKeyActionEntry(d,k,sl,g) \
+ (XkbKeyHasActions(d,k)?\
+ XkbKeyAction(d,k,((XkbKeyGroupsWidth(d,k)*(g))+(sl))):NULL)
+
+#define XkbKeyHasActions(d,k) ((d)->server->key_acts[k]!=0)
+#define XkbKeyNumActions(d,k) (XkbKeyHasActions(d,k)?XkbKeyNumSyms(d,k):1)
+#define XkbKeyActionsPtr(d,k) (XkbSMKeyActionsPtr((d)->server,k))
+#define XkbKeycodeInRange(d,k) (((k)>=(d)->min_key_code)&&\
+ ((k)<=(d)->max_key_code))
+#define XkbNumKeys(d) ((d)->max_key_code-(d)->min_key_code+1)
+
+
+ /*
+ * The following structures can be used to track changes
+ * to a keyboard device
+ */
+typedef struct _XkbMapChanges {
+ unsigned short changed;
+ KeyCode min_key_code;
+ KeyCode max_key_code;
+ unsigned char first_type;
+ unsigned char num_types;
+ KeyCode first_key_sym;
+ unsigned char num_key_syms;
+ KeyCode first_key_act;
+ unsigned char num_key_acts;
+ KeyCode first_key_behavior;
+ unsigned char num_key_behaviors;
+ KeyCode first_key_explicit;
+ unsigned char num_key_explicit;
+ KeyCode first_modmap_key;
+ unsigned char num_modmap_keys;
+ KeyCode first_vmodmap_key;
+ unsigned char num_vmodmap_keys;
+ unsigned char pad;
+ unsigned short vmods;
+} XkbMapChangesRec,*XkbMapChangesPtr;
+
+typedef struct _XkbControlsChanges {
+ unsigned int changed_ctrls;
+ unsigned int enabled_ctrls_changes;
+ Bool num_groups_changed;
+} XkbControlsChangesRec,*XkbControlsChangesPtr;
+
+typedef struct _XkbIndicatorChanges {
+ unsigned int state_changes;
+ unsigned int map_changes;
+} XkbIndicatorChangesRec,*XkbIndicatorChangesPtr;
+
+typedef struct _XkbNameChanges {
+ unsigned int changed;
+ unsigned char first_type;
+ unsigned char num_types;
+ unsigned char first_lvl;
+ unsigned char num_lvls;
+ unsigned char num_aliases;
+ unsigned char num_rg;
+ unsigned char first_key;
+ unsigned char num_keys;
+ unsigned short changed_vmods;
+ unsigned long changed_indicators;
+ unsigned char changed_groups;
+} XkbNameChangesRec,*XkbNameChangesPtr;
+
+typedef struct _XkbCompatChanges {
+ unsigned char changed_groups;
+ unsigned short first_si;
+ unsigned short num_si;
+} XkbCompatChangesRec,*XkbCompatChangesPtr;
+
+typedef struct _XkbChanges {
+ unsigned short device_spec;
+ unsigned short state_changes;
+ XkbMapChangesRec map;
+ XkbControlsChangesRec ctrls;
+ XkbIndicatorChangesRec indicators;
+ XkbNameChangesRec names;
+ XkbCompatChangesRec compat;
+} XkbChangesRec, *XkbChangesPtr;
+
+ /*
+ * These data structures are used to construct a keymap from
+ * a set of components or to list components in the server
+ * database.
+ */
+typedef struct _XkbComponentNames {
+ char * keymap;
+ char * keycodes;
+ char * types;
+ char * compat;
+ char * symbols;
+ char * geometry;
+} XkbComponentNamesRec, *XkbComponentNamesPtr;
+
+typedef struct _XkbComponentName {
+ unsigned short flags;
+ char * name;
+} XkbComponentNameRec,*XkbComponentNamePtr;
+
+typedef struct _XkbComponentList {
+ int num_keymaps;
+ int num_keycodes;
+ int num_types;
+ int num_compat;
+ int num_symbols;
+ int num_geometry;
+ XkbComponentNamePtr keymaps;
+ XkbComponentNamePtr keycodes;
+ XkbComponentNamePtr types;
+ XkbComponentNamePtr compat;
+ XkbComponentNamePtr symbols;
+ XkbComponentNamePtr geometry;
+} XkbComponentListRec, *XkbComponentListPtr;
+
+ /*
+ * The following data structures describe and track changes to a
+ * non-keyboard extension device
+ */
+typedef struct _XkbDeviceLedInfo {
+ unsigned short led_class;
+ unsigned short led_id;
+ unsigned int phys_indicators;
+ unsigned int maps_present;
+ unsigned int names_present;
+ unsigned int state;
+ Atom names[XkbNumIndicators];
+ XkbIndicatorMapRec maps[XkbNumIndicators];
+} XkbDeviceLedInfoRec,*XkbDeviceLedInfoPtr;
+
+typedef struct _XkbDeviceInfo {
+ char * name;
+ Atom type;
+ unsigned short device_spec;
+ Bool has_own_state;
+ unsigned short supported;
+ unsigned short unsupported;
+
+ unsigned short num_btns;
+ XkbAction * btn_acts;
+
+ unsigned short sz_leds;
+ unsigned short num_leds;
+ unsigned short dflt_kbd_fb;
+ unsigned short dflt_led_fb;
+ XkbDeviceLedInfoPtr leds;
+} XkbDeviceInfoRec,*XkbDeviceInfoPtr;
+
+#define XkbXI_DevHasBtnActs(d) (((d)->num_btns>0)&&((d)->btn_acts!=NULL))
+#define XkbXI_LegalDevBtn(d,b) (XkbXI_DevHasBtnActs(d)&&((b)<(d)->num_btns))
+#define XkbXI_DevHasLeds(d) (((d)->num_leds>0)&&((d)->leds!=NULL))
+
+typedef struct _XkbDeviceLedChanges {
+ unsigned short led_class;
+ unsigned short led_id;
+ unsigned int defined; /* names or maps changed */
+ struct _XkbDeviceLedChanges *next;
+} XkbDeviceLedChangesRec,*XkbDeviceLedChangesPtr;
+
+typedef struct _XkbDeviceChanges {
+ unsigned int changed;
+ unsigned short first_btn;
+ unsigned short num_btns;
+ XkbDeviceLedChangesRec leds;
+} XkbDeviceChangesRec,*XkbDeviceChangesPtr;
+
+#endif /* _XKBSTR_H_ */
diff --git a/system/include/X11/extensions/XShm.h b/system/include/X11/extensions/XShm.h
new file mode 100644
index 00000000..23f06511
--- /dev/null
+++ b/system/include/X11/extensions/XShm.h
@@ -0,0 +1,135 @@
+/************************************************************
+
+Copyright 1989, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+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
+OPEN GROUP 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.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+********************************************************/
+
+/* THIS IS NOT AN X CONSORTIUM STANDARD OR AN X PROJECT TEAM SPECIFICATION */
+
+#ifndef _XSHM_H_
+#define _XSHM_H_
+
+#include <X11/Xfuncproto.h>
+#include <X11/extensions/shm.h>
+
+#ifndef _XSHM_SERVER_
+typedef unsigned long ShmSeg;
+
+typedef struct {
+ int type; /* of event */
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came frome a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Drawable drawable; /* drawable of request */
+ int major_code; /* ShmReqCode */
+ int minor_code; /* X_ShmPutImage */
+ ShmSeg shmseg; /* the ShmSeg used in the request */
+ unsigned long offset; /* the offset into ShmSeg used in the request */
+} XShmCompletionEvent;
+
+typedef struct {
+ ShmSeg shmseg; /* resource id */
+ int shmid; /* kernel id */
+ char *shmaddr; /* address in client */
+ Bool readOnly; /* how the server should attach it */
+} XShmSegmentInfo;
+
+_XFUNCPROTOBEGIN
+
+Bool XShmQueryExtension(
+ Display* /* dpy */
+);
+
+int XShmGetEventBase(
+ Display* /* dpy */
+);
+
+Bool XShmQueryVersion(
+ Display* /* dpy */,
+ int* /* majorVersion */,
+ int* /* minorVersion */,
+ Bool* /* sharedPixmaps */
+);
+
+int XShmPixmapFormat(
+ Display* /* dpy */
+);
+
+Bool XShmAttach(
+ Display* /* dpy */,
+ XShmSegmentInfo* /* shminfo */
+);
+
+Bool XShmDetach(
+ Display* /* dpy */,
+ XShmSegmentInfo* /* shminfo */
+);
+
+Bool XShmPutImage(
+ Display* /* dpy */,
+ Drawable /* d */,
+ GC /* gc */,
+ XImage* /* image */,
+ int /* src_x */,
+ int /* src_y */,
+ int /* dst_x */,
+ int /* dst_y */,
+ unsigned int /* src_width */,
+ unsigned int /* src_height */,
+ Bool /* send_event */
+);
+
+Bool XShmGetImage(
+ Display* /* dpy */,
+ Drawable /* d */,
+ XImage* /* image */,
+ int /* x */,
+ int /* y */,
+ unsigned long /* plane_mask */
+);
+
+XImage *XShmCreateImage(
+ Display* /* dpy */,
+ Visual* /* visual */,
+ unsigned int /* depth */,
+ int /* format */,
+ char* /* data */,
+ XShmSegmentInfo* /* shminfo */,
+ unsigned int /* width */,
+ unsigned int /* height */
+);
+
+Pixmap XShmCreatePixmap(
+ Display* /* dpy */,
+ Drawable /* d */,
+ char* /* data */,
+ XShmSegmentInfo* /* shminfo */,
+ unsigned int /* width */,
+ unsigned int /* height */,
+ unsigned int /* depth */
+);
+
+_XFUNCPROTOEND
+#endif /* _XSHM_SERVER_ */
+
+#endif
diff --git a/system/include/X11/extensions/Xext.h b/system/include/X11/extensions/Xext.h
new file mode 100644
index 00000000..858592b7
--- /dev/null
+++ b/system/include/X11/extensions/Xext.h
@@ -0,0 +1,53 @@
+/*
+ *
+Copyright 1989, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+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
+OPEN GROUP 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.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+ */
+
+#ifndef _XEXT_H_
+#define _XEXT_H_
+
+#include <X11/Xfuncproto.h>
+
+_XFUNCPROTOBEGIN
+
+typedef int (*XextErrorHandler) (
+ Display * /* dpy */,
+ _Xconst char* /* ext_name */,
+ _Xconst char* /* reason */
+);
+
+extern XextErrorHandler XSetExtensionErrorHandler(
+ XextErrorHandler /* handler */
+);
+
+extern int XMissingExtension(
+ Display* /* dpy */,
+ _Xconst char* /* ext_name */
+);
+
+_XFUNCPROTOEND
+
+#define X_EXTENSION_UNKNOWN "unknown"
+#define X_EXTENSION_MISSING "missing"
+
+#endif /* _XEXT_H_ */
diff --git a/system/include/X11/extensions/extutil.h b/system/include/X11/extensions/extutil.h
new file mode 100644
index 00000000..29404d5a
--- /dev/null
+++ b/system/include/X11/extensions/extutil.h
@@ -0,0 +1,190 @@
+/*
+ *
+Copyright 1989, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+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
+OPEN GROUP 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.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+ *
+ * Author: Jim Fulton, MIT The Open Group
+ *
+ * Xlib Extension-Writing Utilities
+ *
+ * This package contains utilities for writing the client API for various
+ * protocol extensions. THESE INTERFACES ARE NOT PART OF THE X STANDARD AND
+ * ARE SUBJECT TO CHANGE!
+ */
+
+#ifndef _EXTUTIL_H_
+#define _EXTUTIL_H_
+
+#include <X11/extensions/Xext.h>
+
+/*
+ * We need to keep a list of open displays since the Xlib display list isn't
+ * public. We also have to per-display info in a separate block since it isn't
+ * stored directly in the Display structure.
+ */
+typedef struct _XExtDisplayInfo {
+ struct _XExtDisplayInfo *next; /* keep a linked list */
+ Display *display; /* which display this is */
+ XExtCodes *codes; /* the extension protocol codes */
+ XPointer data; /* extra data for extension to use */
+} XExtDisplayInfo;
+
+typedef struct _XExtensionInfo {
+ XExtDisplayInfo *head; /* start of list */
+ XExtDisplayInfo *cur; /* most recently used */
+ int ndisplays; /* number of displays */
+} XExtensionInfo;
+
+typedef struct _XExtensionHooks {
+ int (*create_gc)(
+ Display* /* display */,
+ GC /* gc */,
+ XExtCodes* /* codes */
+);
+ int (*copy_gc)(
+ Display* /* display */,
+ GC /* gc */,
+ XExtCodes* /* codes */
+);
+ int (*flush_gc)(
+ Display* /* display */,
+ GC /* gc */,
+ XExtCodes* /* codes */
+);
+ int (*free_gc)(
+ Display* /* display */,
+ GC /* gc */,
+ XExtCodes* /* codes */
+);
+ int (*create_font)(
+ Display* /* display */,
+ XFontStruct* /* fs */,
+ XExtCodes* /* codes */
+);
+ int (*free_font)(
+ Display* /* display */,
+ XFontStruct* /* fs */,
+ XExtCodes* /* codes */
+);
+ int (*close_display)(
+ Display* /* display */,
+ XExtCodes* /* codes */
+);
+ Bool (*wire_to_event)(
+ Display* /* display */,
+ XEvent* /* re */,
+ xEvent* /* event */
+);
+ Status (*event_to_wire)(
+ Display* /* display */,
+ XEvent* /* re */,
+ xEvent* /* event */
+);
+ int (*error)(
+ Display* /* display */,
+ xError* /* err */,
+ XExtCodes* /* codes */,
+ int* /* ret_code */
+);
+ char *(*error_string)(
+ Display* /* display */,
+ int /* code */,
+ XExtCodes* /* codes */,
+ char* /* buffer */,
+ int /* nbytes */
+);
+} XExtensionHooks;
+
+extern XExtensionInfo *XextCreateExtension(
+ void
+);
+extern void XextDestroyExtension(
+ XExtensionInfo* /* info */
+);
+extern XExtDisplayInfo *XextAddDisplay(
+ XExtensionInfo* /* extinfo */,
+ Display* /* dpy */,
+ _Xconst char* /* ext_name */,
+ XExtensionHooks* /* hooks */,
+ int /* nevents */,
+ XPointer /* data */
+);
+extern int XextRemoveDisplay(
+ XExtensionInfo* /* extinfo */,
+ Display* /* dpy */
+);
+extern XExtDisplayInfo *XextFindDisplay(
+ XExtensionInfo* /* extinfo */,
+ Display* /* dpy */
+);
+
+#define XextHasExtension(i) ((i) && ((i)->codes))
+#define XextCheckExtension(dpy,i,name,val) \
+ if (!XextHasExtension(i)) { XMissingExtension (dpy, name); return val; }
+#define XextSimpleCheckExtension(dpy,i,name) \
+ if (!XextHasExtension(i)) { XMissingExtension (dpy, name); return; }
+
+
+/*
+ * helper macros to generate code that is common to all extensions; caller
+ * should prefix it with static if extension source is in one file; this
+ * could be a utility function, but have to stack 6 unused arguments for
+ * something that is called many, many times would be bad.
+ */
+#define XEXT_GENERATE_FIND_DISPLAY(proc,extinfo,extname,hooks,nev,data) \
+XExtDisplayInfo *proc (Display *dpy) \
+{ \
+ XExtDisplayInfo *dpyinfo; \
+ if (!extinfo) { if (!(extinfo = XextCreateExtension())) return NULL; } \
+ if (!(dpyinfo = XextFindDisplay (extinfo, dpy))) \
+ dpyinfo = XextAddDisplay (extinfo,dpy,extname,hooks,nev,data); \
+ return dpyinfo; \
+}
+
+#define XEXT_FIND_DISPLAY_PROTO(proc) \
+ XExtDisplayInfo *proc(Display *dpy)
+
+#define XEXT_GENERATE_CLOSE_DISPLAY(proc,extinfo) \
+int proc (Display *dpy, XExtCodes *codes) \
+{ \
+ return XextRemoveDisplay (extinfo, dpy); \
+}
+
+#define XEXT_CLOSE_DISPLAY_PROTO(proc) \
+ int proc(Display *dpy, XExtCodes *codes)
+
+#define XEXT_GENERATE_ERROR_STRING(proc,extname,nerr,errl) \
+char *proc (Display *dpy, int code, XExtCodes *codes, char *buf, int n) \
+{ \
+ code -= codes->first_error; \
+ if (code >= 0 && code < nerr) { \
+ char tmp[256]; \
+ sprintf (tmp, "%s.%d", extname, code); \
+ XGetErrorDatabaseText (dpy, "XProtoError", tmp, errl[code], buf, n); \
+ return buf; \
+ } \
+ return (char *)0; \
+}
+
+#define XEXT_ERROR_STRING_PROTO(proc) \
+ char *proc(Display *dpy, int code, XExtCodes *codes, char *buf, int n)
+#endif
diff --git a/system/include/X11/extensions/shm.h b/system/include/X11/extensions/shm.h
new file mode 100644
index 00000000..e076402a
--- /dev/null
+++ b/system/include/X11/extensions/shm.h
@@ -0,0 +1,44 @@
+/************************************************************
+
+Copyright 1989, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+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
+OPEN GROUP 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.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+********************************************************/
+
+/* THIS IS NOT AN X CONSORTIUM STANDARD OR AN X PROJECT TEAM SPECIFICATION */
+
+#ifndef _SHM_H_
+#define _SHM_H_
+
+#define SHMNAME "MIT-SHM"
+
+#define SHM_MAJOR_VERSION 1 /* current version numbers */
+#define SHM_MINOR_VERSION 1
+
+#define ShmCompletion 0
+#define ShmNumberEvents (ShmCompletion + 1)
+
+#define BadShmSeg 0
+#define ShmNumberErrors (BadShmSeg + 1)
+
+
+#endif /* _SHM_H_ */
diff --git a/system/include/emscripten/bind.h b/system/include/emscripten/bind.h
index 403d8084..4d7547a1 100644
--- a/system/include/emscripten/bind.h
+++ b/system/include/emscripten/bind.h
@@ -533,6 +533,8 @@ namespace emscripten {
template<typename ClassType>
class value_array : public internal::noncopyable {
public:
+ typedef ClassType class_type;
+
value_array(const char* name) {
using namespace internal;
_embind_register_value_array(
@@ -605,6 +607,8 @@ namespace emscripten {
template<typename ClassType>
class value_object : public internal::noncopyable {
public:
+ typedef ClassType class_type;
+
value_object(const char* name) {
using namespace internal;
_embind_register_value_object(
@@ -689,6 +693,10 @@ namespace emscripten {
static void* share(void* v) {
return 0; // no sharing
}
+
+ static PointerType* construct_null() {
+ return new PointerType;
+ }
};
// specialize if you have a different pointer type
@@ -720,6 +728,10 @@ namespace emscripten {
val_deleter(val::take_ownership(v)));
}
+ static PointerType* construct_null() {
+ return new PointerType;
+ }
+
private:
class val_deleter {
public:
@@ -745,6 +757,8 @@ namespace emscripten {
template<typename T>
class wrapper : public T {
public:
+ typedef T class_type;
+
explicit wrapper(val&& wrapped)
: wrapped(std::forward<val>(wrapped))
{}
@@ -794,13 +808,14 @@ namespace emscripten {
// NOTE: this returns the class type, not the pointer type
template<typename T>
inline TYPEID getActualType(T* ptr) {
- assert(ptr);
return reinterpret_cast<TYPEID>(&typeid(*ptr));
};
}
template<typename BaseClass>
struct base {
+ typedef BaseClass class_type;
+
template<typename ClassType>
static void verify() {
static_assert(!std::is_same<ClassType, BaseClass>::value, "Base must not have same type as class");
@@ -847,6 +862,9 @@ namespace emscripten {
template<typename ClassType, typename BaseSpecifier = internal::NoBaseClass>
class class_ {
public:
+ typedef ClassType class_type;
+ typedef BaseSpecifier base_specifier;
+
class_() = delete;
explicit class_(const char* name) {
@@ -867,7 +885,7 @@ namespace emscripten {
}
template<typename PointerType>
- class_& smart_ptr() {
+ const class_& smart_ptr() const {
using namespace internal;
typedef smart_ptr_trait<PointerType> PointerTrait;
@@ -881,21 +899,21 @@ namespace emscripten {
typeid(PointerType).name(),
PointerTrait::get_sharing_policy(),
reinterpret_cast<GenericFunction>(&PointerTrait::get),
- reinterpret_cast<GenericFunction>(&operator_new<PointerType>),
+ reinterpret_cast<GenericFunction>(&PointerTrait::construct_null),
reinterpret_cast<GenericFunction>(&PointerTrait::share),
reinterpret_cast<GenericFunction>(&raw_destructor<PointerType>));
return *this;
};
template<typename... ConstructorArgs, typename... Policies>
- class_& constructor(Policies... policies) {
+ const class_& constructor(Policies... policies) const {
return constructor(
&internal::operator_new<ClassType, ConstructorArgs...>,
policies...);
}
template<typename... Args, typename ReturnType, typename... Policies>
- class_& constructor(ReturnType (*factory)(Args...), Policies...) {
+ const class_& constructor(ReturnType (*factory)(Args...), Policies...) const {
using namespace internal;
// TODO: allows all raw pointers... policies need a rethink
@@ -910,7 +928,7 @@ namespace emscripten {
}
template<typename SmartPtr, typename... Args, typename... Policies>
- class_& smart_ptr_constructor(SmartPtr (*factory)(Args...), Policies...) {
+ const class_& smart_ptr_constructor(SmartPtr (*factory)(Args...), Policies...) const {
using namespace internal;
smart_ptr<SmartPtr>();
@@ -926,7 +944,7 @@ namespace emscripten {
}
template<typename WrapperType, typename PointerType = WrapperType*>
- class_& allow_subclass() {
+ const class_& allow_subclass() const {
using namespace internal;
auto cls = class_<WrapperType, base<ClassType>>(typeid(WrapperType).name())
@@ -940,7 +958,7 @@ namespace emscripten {
}
template<typename ReturnType, typename... Args, typename... Policies>
- class_& function(const char* methodName, ReturnType (ClassType::*memberFunction)(Args...), Policies...) {
+ const class_& function(const char* methodName, ReturnType (ClassType::*memberFunction)(Args...), Policies...) const {
using namespace internal;
typename WithPolicies<Policies...>::template ArgTypeList<ReturnType, AllowedRawPointer<ClassType>, Args...> args;
@@ -955,7 +973,7 @@ namespace emscripten {
}
template<typename ReturnType, typename... Args, typename... Policies>
- class_& function(const char* methodName, ReturnType (ClassType::*memberFunction)(Args...) const, Policies...) {
+ const class_& function(const char* methodName, ReturnType (ClassType::*memberFunction)(Args...) const, Policies...) const {
using namespace internal;
typename WithPolicies<Policies...>::template ArgTypeList<ReturnType, AllowedRawPointer<const ClassType>, Args...> args;
@@ -970,7 +988,7 @@ namespace emscripten {
}
template<typename ReturnType, typename ThisType, typename... Args, typename... Policies>
- class_& function(const char* methodName, ReturnType (*function)(ThisType, Args...), Policies...) {
+ const class_& function(const char* methodName, ReturnType (*function)(ThisType, Args...), Policies...) const {
using namespace internal;
typename WithPolicies<Policies...>::template ArgTypeList<ReturnType, ThisType, Args...> args;
@@ -985,7 +1003,7 @@ namespace emscripten {
}
template<typename FieldType, typename = typename std::enable_if<!std::is_function<FieldType>::value>::type>
- class_& property(const char* fieldName, const FieldType ClassType::*field) {
+ const class_& property(const char* fieldName, const FieldType ClassType::*field) const {
using namespace internal;
_embind_register_class_property(
@@ -1001,7 +1019,7 @@ namespace emscripten {
}
template<typename FieldType, typename = typename std::enable_if<!std::is_function<FieldType>::value>::type>
- class_& property(const char* fieldName, FieldType ClassType::*field) {
+ const class_& property(const char* fieldName, FieldType ClassType::*field) const {
using namespace internal;
_embind_register_class_property(
@@ -1017,7 +1035,7 @@ namespace emscripten {
}
template<typename Getter>
- class_& property(const char* fieldName, Getter getter) {
+ const class_& property(const char* fieldName, Getter getter) const {
using namespace internal;
typedef GetterPolicy<Getter> GP;
_embind_register_class_property(
@@ -1033,7 +1051,7 @@ namespace emscripten {
}
template<typename Getter, typename Setter>
- class_& property(const char* fieldName, Getter getter, Setter setter) {
+ const class_& property(const char* fieldName, Getter getter, Setter setter) const {
using namespace internal;
typedef GetterPolicy<Getter> GP;
typedef SetterPolicy<Setter> SP;
@@ -1050,7 +1068,7 @@ namespace emscripten {
}
template<typename ReturnType, typename... Args, typename... Policies>
- class_& class_function(const char* methodName, ReturnType (*classMethod)(Args...), Policies...) {
+ const class_& class_function(const char* methodName, ReturnType (*classMethod)(Args...), Policies...) const {
using namespace internal;
typename WithPolicies<Policies...>::template ArgTypeList<ReturnType, Args...> args;
@@ -1157,6 +1175,8 @@ namespace emscripten {
template<typename EnumType>
class enum_ {
public:
+ typedef EnumType enum_type;
+
enum_(const char* name) {
_embind_register_enum(
internal::TypeID<EnumType>::get(),
@@ -1199,7 +1219,7 @@ namespace emscripten {
_embind_register_constant(
name,
TypeID<const ConstantType&>::get(),
- asGenericValue(BindingType<const ConstantType&>::toWireType(v)));
+ asGenericValue(BT::toWireType(v)));
}
}
diff --git a/system/include/emscripten/emscripten.h b/system/include/emscripten/emscripten.h
index 2fc82f50..eb5ded91 100644
--- a/system/include/emscripten/emscripten.h
+++ b/system/include/emscripten/emscripten.h
@@ -100,7 +100,13 @@ extern void emscripten_async_load_script(const char *script, void (*onload)(), v
* Set a C function as the main event loop. The JS environment
* will call that function at a specified number of frames per
* second. Setting 0 or a negative value as the fps will use
- * the browser's requestAnimationFrame mechanism.
+ * the browser's requestAnimationFrame mechanism. This is
+ * *HIGHLY* recommended if you are doing rendering, as
+ * the browser's requestAnimationFrame will make sure you
+ * render at a proper smooth rate that lines up with the
+ * the browser and monitor in a proper way. (If you do not
+ * render at all in your application, then you should pick a
+ * specific frame rate that makes sense for your code.)
*
* Pausing and resuming the main loop is useful if your app
* needs to perform some synchronous operation, for example
diff --git a/system/include/emscripten/val.h b/system/include/emscripten/val.h
index b712d164..19b1beb1 100644
--- a/system/include/emscripten/val.h
+++ b/system/include/emscripten/val.h
@@ -11,10 +11,18 @@ namespace emscripten {
void _emval_register_symbol(const char*);
typedef struct _EM_VAL* EM_VAL;
+ typedef struct _EM_DESTRUCTORS* EM_DESTRUCTORS;
+
+ // TODO: functions returning this are reinterpret_cast
+ // into the correct return type. this needs some thought
+ // for asm.js.
+ typedef void _POLYMORPHIC_RESULT;
void _emval_incref(EM_VAL value);
void _emval_decref(EM_VAL value);
+ void _emval_run_destructors(EM_DESTRUCTORS handle);
+
EM_VAL _emval_new_array();
EM_VAL _emval_new_object();
EM_VAL _emval_undefined();
@@ -32,7 +40,8 @@ namespace emscripten {
EM_VAL _emval_get_module_property(const char* name);
EM_VAL _emval_get_property(EM_VAL object, EM_VAL key);
void _emval_set_property(EM_VAL object, EM_VAL key, EM_VAL value);
- void _emval_as(EM_VAL value, TYPEID returnType);
+ _POLYMORPHIC_RESULT _emval_as(EM_VAL value, TYPEID returnType, EM_DESTRUCTORS* runDestructors);
+
EM_VAL _emval_call(
EM_VAL value,
unsigned argCount,
@@ -57,7 +66,11 @@ namespace emscripten {
template<typename ReturnType, typename... Args>
struct Signature {
- typedef typename BindingType<ReturnType>::WireType (*MethodCaller)(EM_VAL value, const char* methodName, typename BindingType<Args>::WireType...);
+ typedef typename BindingType<ReturnType>::WireType (*MethodCaller)(
+ EM_VAL value,
+ const char* methodName,
+ EM_DESTRUCTORS* destructors,
+ typename BindingType<Args>::WireType...);
static MethodCaller get_method_caller() {
static MethodCaller fp = reinterpret_cast<MethodCaller>(init_method_caller());
@@ -71,15 +84,34 @@ namespace emscripten {
}
};
+ struct DestructorsRunner {
+ public:
+ explicit DestructorsRunner(EM_DESTRUCTORS d)
+ : destructors(d)
+ {}
+ ~DestructorsRunner() {
+ _emval_run_destructors(destructors);
+ }
+
+ DestructorsRunner(const DestructorsRunner&) = delete;
+ void operator=(const DestructorsRunner&) = delete;
+
+ private:
+ EM_DESTRUCTORS destructors;
+ };
+
template<typename ReturnType, typename... Args>
struct MethodCaller {
static ReturnType call(EM_VAL handle, const char* methodName, Args&&... args) {
auto caller = Signature<ReturnType, Args...>::get_method_caller();
+
+ EM_DESTRUCTORS destructors;
auto wireType = caller(
handle,
methodName,
+ &destructors,
toWireType(std::forward<Args>(args))...);
- WireDeleter<ReturnType> deleter(wireType);
+ DestructorsRunner rd(destructors);
return BindingType<ReturnType>::fromWireType(wireType);
}
};
@@ -88,10 +120,15 @@ namespace emscripten {
struct MethodCaller<void, Args...> {
static void call(EM_VAL handle, const char* methodName, Args&&... args) {
auto caller = Signature<void, Args...>::get_method_caller();
- return caller(
+
+ EM_DESTRUCTORS destructors;
+ caller(
handle,
methodName,
+ &destructors,
toWireType(std::forward<Args>(args))...);
+ DestructorsRunner rd(destructors);
+ // void requires no translation
}
};
}
@@ -262,11 +299,13 @@ namespace emscripten {
typedef typename BT::WireType (*TypedAs)(
EM_VAL value,
- TYPEID returnType);
+ TYPEID returnType,
+ EM_DESTRUCTORS* runDestructors);
TypedAs typedAs = reinterpret_cast<TypedAs>(&_emval_as);
- typename BT::WireType wt = typedAs(handle, TypeID<T>::get());
- WireDeleter<T> deleter(wt);
+ EM_DESTRUCTORS destructors;
+ typename BT::WireType wt = typedAs(handle, TypeID<T>::get(), &destructors);
+ DestructorsRunner dr(destructors);
return BT::fromWireType(wt);
}
@@ -292,8 +331,6 @@ namespace emscripten {
static val fromWireType(WireType v) {
return val::take_ownership(v);
}
- static void destroy(WireType v) {
- }
};
}
diff --git a/system/include/emscripten/wire.h b/system/include/emscripten/wire.h
index a5892216..c3ce8dd0 100644
--- a/system/include/emscripten/wire.h
+++ b/system/include/emscripten/wire.h
@@ -7,6 +7,7 @@
//
// We'll call the on-the-wire type WireType.
+#include <stdio.h>
#include <cstdlib>
#include <memory>
#include <string>
@@ -130,8 +131,6 @@ namespace emscripten {
constexpr static type fromWireType(WireType v) { \
return v; \
} \
- static void destroy(WireType) { \
- } \
}
EMSCRIPTEN_DEFINE_NATIVE_BINDING_TYPE(char);
@@ -160,8 +159,6 @@ namespace emscripten {
static bool fromWireType(WireType wt) {
return wt;
}
- static void destroy(WireType) {
- }
};
template<>
@@ -179,9 +176,6 @@ namespace emscripten {
static std::string fromWireType(WireType v) {
return std::string(v->data, v->length);
}
- static void destroy(WireType v) {
- free(v);
- }
};
template<>
@@ -199,9 +193,6 @@ namespace emscripten {
static std::wstring fromWireType(WireType v) {
return std::wstring(v->data, v->length);
}
- static void destroy(WireType v) {
- free(v);
- }
};
template<typename T>
@@ -254,10 +245,6 @@ namespace emscripten {
static ActualT& fromWireType(WireType p) {
return *p;
}
-
- static void destroy(WireType p) {
- delete p;
- }
};
// Is this necessary?
@@ -280,8 +267,6 @@ namespace emscripten {
static Enum fromWireType(WireType v) {
return v;
}
- static void destroy(WireType) {
- }
};
// catch-all generic binding
@@ -296,21 +281,6 @@ namespace emscripten {
auto toWireType(T&& v) -> typename BindingType<T>::WireType {
return BindingType<T>::toWireType(std::forward<T>(v));
}
-
- template<typename T>
- struct WireDeleter {
- typedef typename BindingType<T>::WireType WireType;
-
- WireDeleter(WireType wt)
- : wt(wt)
- {}
-
- ~WireDeleter() {
- BindingType<T>::destroy(wt);
- }
-
- WireType wt;
- };
}
struct memory_view {
diff --git a/system/include/libc/unistd.h b/system/include/libc/unistd.h
index ef6ba3b3..995a84ea 100644
--- a/system/include/libc/unistd.h
+++ b/system/include/libc/unistd.h
@@ -7,9 +7,9 @@ extern "C" {
#include <features.h>
-#define STDIN_FILENO 1
-#define STDOUT_FILENO 2
-#define STDERR_FILENO 3
+#define STDIN_FILENO 0
+#define STDOUT_FILENO 1
+#define STDERR_FILENO 2
#define SEEK_SET 0
#define SEEK_CUR 1
diff --git a/system/lib/gl.c b/system/lib/gl.c
new file mode 100644
index 00000000..e6c60956
--- /dev/null
+++ b/system/lib/gl.c
@@ -0,0 +1,1729 @@
+// GL proc address retrieval
+
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+
+#define GL_GLEXT_PROTOTYPES
+#include <GL/gl.h>
+#include <GL/glext.h>
+
+// Define emscripten_ versions of gl functions, to avoid name collisions
+
+/*
+ * Miscellaneous
+ */
+
+GLAPI void GLAPIENTRY emscripten_glClearIndex( GLfloat c );
+
+GLAPI void GLAPIENTRY emscripten_glClearColor( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha );
+
+GLAPI void GLAPIENTRY emscripten_glClear( GLbitfield mask );
+
+GLAPI void GLAPIENTRY emscripten_glIndexMask( GLuint mask );
+
+GLAPI void GLAPIENTRY emscripten_glColorMask( GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha );
+
+GLAPI void GLAPIENTRY emscripten_glAlphaFunc( GLenum func, GLclampf ref );
+
+GLAPI void GLAPIENTRY emscripten_glBlendFunc( GLenum sfactor, GLenum dfactor );
+
+GLAPI void GLAPIENTRY emscripten_glLogicOp( GLenum opcode );
+
+GLAPI void GLAPIENTRY emscripten_glCullFace( GLenum mode );
+
+GLAPI void GLAPIENTRY emscripten_glFrontFace( GLenum mode );
+
+GLAPI void GLAPIENTRY emscripten_glPointSize( GLfloat size );
+
+GLAPI void GLAPIENTRY emscripten_glLineWidth( GLfloat width );
+
+GLAPI void GLAPIENTRY emscripten_glLineStipple( GLint factor, GLushort pattern );
+
+GLAPI void GLAPIENTRY emscripten_glPolygonMode( GLenum face, GLenum mode );
+
+GLAPI void GLAPIENTRY emscripten_glPolygonOffset( GLfloat factor, GLfloat units );
+
+GLAPI void GLAPIENTRY emscripten_glPolygonStipple( const GLubyte *mask );
+
+GLAPI void GLAPIENTRY emscripten_glGetPolygonStipple( GLubyte *mask );
+
+GLAPI void GLAPIENTRY emscripten_glEdgeFlag( GLboolean flag );
+
+GLAPI void GLAPIENTRY emscripten_glEdgeFlagv( const GLboolean *flag );
+
+GLAPI void GLAPIENTRY emscripten_glScissor( GLint x, GLint y, GLsizei width, GLsizei height);
+
+GLAPI void GLAPIENTRY emscripten_glClipPlane( GLenum plane, const GLdouble *equation );
+
+GLAPI void GLAPIENTRY emscripten_glGetClipPlane( GLenum plane, GLdouble *equation );
+
+GLAPI void GLAPIENTRY emscripten_glDrawBuffer( GLenum mode );
+
+GLAPI void GLAPIENTRY emscripten_glReadBuffer( GLenum mode );
+
+GLAPI void GLAPIENTRY emscripten_glEnable( GLenum cap );
+
+GLAPI void GLAPIENTRY emscripten_glDisable( GLenum cap );
+
+GLAPI GLboolean GLAPIENTRY emscripten_glIsEnabled( GLenum cap );
+
+
+GLAPI void GLAPIENTRY emscripten_glEnableClientState( GLenum cap ); /* 1.1 */
+
+GLAPI void GLAPIENTRY emscripten_glDisableClientState( GLenum cap ); /* 1.1 */
+
+
+GLAPI void GLAPIENTRY emscripten_glGetBooleanv( GLenum pname, GLboolean *params );
+
+GLAPI void GLAPIENTRY emscripten_glGetDoublev( GLenum pname, GLdouble *params );
+
+GLAPI void GLAPIENTRY emscripten_glGetFloatv( GLenum pname, GLfloat *params );
+
+GLAPI void GLAPIENTRY emscripten_glGetIntegerv( GLenum pname, GLint *params );
+
+
+GLAPI void GLAPIENTRY emscripten_glPushAttrib( GLbitfield mask );
+
+GLAPI void GLAPIENTRY emscripten_glPopAttrib( void );
+
+
+GLAPI void GLAPIENTRY emscripten_glPushClientAttrib( GLbitfield mask ); /* 1.1 */
+
+GLAPI void GLAPIENTRY emscripten_glPopClientAttrib( void ); /* 1.1 */
+
+
+GLAPI GLint GLAPIENTRY emscripten_glRenderMode( GLenum mode );
+
+GLAPI GLenum GLAPIENTRY emscripten_glGetError( void );
+
+GLAPI const GLubyte * GLAPIENTRY emscripten_glGetString( GLenum name );
+
+GLAPI void GLAPIENTRY emscripten_glFinish( void );
+
+GLAPI void GLAPIENTRY emscripten_glFlush( void );
+
+GLAPI void GLAPIENTRY emscripten_glHint( GLenum target, GLenum mode );
+
+
+/*
+ * Depth Buffer
+ */
+
+GLAPI void GLAPIENTRY emscripten_glClearDepth( GLclampd depth );
+
+GLAPI void GLAPIENTRY emscripten_glDepthFunc( GLenum func );
+
+GLAPI void GLAPIENTRY emscripten_glDepthMask( GLboolean flag );
+
+GLAPI void GLAPIENTRY emscripten_glDepthRange( GLclampd near_val, GLclampd far_val );
+
+
+/*
+ * Accumulation Buffer
+ */
+
+GLAPI void GLAPIENTRY emscripten_glClearAccum( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha );
+
+GLAPI void GLAPIENTRY emscripten_glAccum( GLenum op, GLfloat value );
+
+
+/*
+ * Transformation
+ */
+
+GLAPI void GLAPIENTRY emscripten_glMatrixMode( GLenum mode );
+
+GLAPI void GLAPIENTRY emscripten_glOrtho( GLdouble left, GLdouble right,
+ GLdouble bottom, GLdouble top,
+ GLdouble near_val, GLdouble far_val );
+
+GLAPI void GLAPIENTRY emscripten_glFrustum( GLdouble left, GLdouble right,
+ GLdouble bottom, GLdouble top,
+ GLdouble near_val, GLdouble far_val );
+
+GLAPI void GLAPIENTRY emscripten_glViewport( GLint x, GLint y,
+ GLsizei width, GLsizei height );
+
+GLAPI void GLAPIENTRY emscripten_glPushMatrix( void );
+
+GLAPI void GLAPIENTRY emscripten_glPopMatrix( void );
+
+GLAPI void GLAPIENTRY emscripten_glLoadIdentity( void );
+
+GLAPI void GLAPIENTRY emscripten_glLoadMatrixd( const GLdouble *m );
+GLAPI void GLAPIENTRY emscripten_glLoadMatrixf( const GLfloat *m );
+
+GLAPI void GLAPIENTRY emscripten_glMultMatrixd( const GLdouble *m );
+GLAPI void GLAPIENTRY emscripten_glMultMatrixf( const GLfloat *m );
+
+GLAPI void GLAPIENTRY emscripten_glRotated( GLdouble angle,
+ GLdouble x, GLdouble y, GLdouble z );
+GLAPI void GLAPIENTRY emscripten_glRotatef( GLfloat angle,
+ GLfloat x, GLfloat y, GLfloat z );
+
+GLAPI void GLAPIENTRY emscripten_glScaled( GLdouble x, GLdouble y, GLdouble z );
+GLAPI void GLAPIENTRY emscripten_glScalef( GLfloat x, GLfloat y, GLfloat z );
+
+GLAPI void GLAPIENTRY emscripten_glTranslated( GLdouble x, GLdouble y, GLdouble z );
+GLAPI void GLAPIENTRY emscripten_glTranslatef( GLfloat x, GLfloat y, GLfloat z );
+
+
+/*
+ * Display Lists
+ */
+
+GLAPI GLboolean GLAPIENTRY emscripten_glIsList( GLuint list );
+
+GLAPI void GLAPIENTRY emscripten_glDeleteLists( GLuint list, GLsizei range );
+
+GLAPI GLuint GLAPIENTRY emscripten_glGenLists( GLsizei range );
+
+GLAPI void GLAPIENTRY emscripten_glNewList( GLuint list, GLenum mode );
+
+GLAPI void GLAPIENTRY emscripten_glEndList( void );
+
+GLAPI void GLAPIENTRY emscripten_glCallList( GLuint list );
+
+GLAPI void GLAPIENTRY emscripten_glCallLists( GLsizei n, GLenum type,
+ const GLvoid *lists );
+
+GLAPI void GLAPIENTRY emscripten_glListBase( GLuint base );
+
+
+/*
+ * Drawing Functions
+ */
+
+GLAPI void GLAPIENTRY emscripten_glBegin( GLenum mode );
+
+GLAPI void GLAPIENTRY emscripten_glEnd( void );
+
+
+GLAPI void GLAPIENTRY emscripten_glVertex2d( GLdouble x, GLdouble y );
+GLAPI void GLAPIENTRY emscripten_glVertex2f( GLfloat x, GLfloat y );
+GLAPI void GLAPIENTRY emscripten_glVertex2i( GLint x, GLint y );
+GLAPI void GLAPIENTRY emscripten_glVertex2s( GLshort x, GLshort y );
+
+GLAPI void GLAPIENTRY emscripten_glVertex3d( GLdouble x, GLdouble y, GLdouble z );
+GLAPI void GLAPIENTRY emscripten_glVertex3f( GLfloat x, GLfloat y, GLfloat z );
+GLAPI void GLAPIENTRY emscripten_glVertex3i( GLint x, GLint y, GLint z );
+GLAPI void GLAPIENTRY emscripten_glVertex3s( GLshort x, GLshort y, GLshort z );
+
+GLAPI void GLAPIENTRY emscripten_glVertex4d( GLdouble x, GLdouble y, GLdouble z, GLdouble w );
+GLAPI void GLAPIENTRY emscripten_glVertex4f( GLfloat x, GLfloat y, GLfloat z, GLfloat w );
+GLAPI void GLAPIENTRY emscripten_glVertex4i( GLint x, GLint y, GLint z, GLint w );
+GLAPI void GLAPIENTRY emscripten_glVertex4s( GLshort x, GLshort y, GLshort z, GLshort w );
+
+GLAPI void GLAPIENTRY emscripten_glVertex2dv( const GLdouble *v );
+GLAPI void GLAPIENTRY emscripten_glVertex2fv( const GLfloat *v );
+GLAPI void GLAPIENTRY emscripten_glVertex2iv( const GLint *v );
+GLAPI void GLAPIENTRY emscripten_glVertex2sv( const GLshort *v );
+
+GLAPI void GLAPIENTRY emscripten_glVertex3dv( const GLdouble *v );
+GLAPI void GLAPIENTRY emscripten_glVertex3fv( const GLfloat *v );
+GLAPI void GLAPIENTRY emscripten_glVertex3iv( const GLint *v );
+GLAPI void GLAPIENTRY emscripten_glVertex3sv( const GLshort *v );
+
+GLAPI void GLAPIENTRY emscripten_glVertex4dv( const GLdouble *v );
+GLAPI void GLAPIENTRY emscripten_glVertex4fv( const GLfloat *v );
+GLAPI void GLAPIENTRY emscripten_glVertex4iv( const GLint *v );
+GLAPI void GLAPIENTRY emscripten_glVertex4sv( const GLshort *v );
+
+
+GLAPI void GLAPIENTRY emscripten_glNormal3b( GLbyte nx, GLbyte ny, GLbyte nz );
+GLAPI void GLAPIENTRY emscripten_glNormal3d( GLdouble nx, GLdouble ny, GLdouble nz );
+GLAPI void GLAPIENTRY emscripten_glNormal3f( GLfloat nx, GLfloat ny, GLfloat nz );
+GLAPI void GLAPIENTRY emscripten_glNormal3i( GLint nx, GLint ny, GLint nz );
+GLAPI void GLAPIENTRY emscripten_glNormal3s( GLshort nx, GLshort ny, GLshort nz );
+
+GLAPI void GLAPIENTRY emscripten_glNormal3bv( const GLbyte *v );
+GLAPI void GLAPIENTRY emscripten_glNormal3dv( const GLdouble *v );
+GLAPI void GLAPIENTRY emscripten_glNormal3fv( const GLfloat *v );
+GLAPI void GLAPIENTRY emscripten_glNormal3iv( const GLint *v );
+GLAPI void GLAPIENTRY emscripten_glNormal3sv( const GLshort *v );
+
+
+GLAPI void GLAPIENTRY emscripten_glIndexd( GLdouble c );
+GLAPI void GLAPIENTRY emscripten_glIndexf( GLfloat c );
+GLAPI void GLAPIENTRY emscripten_glIndexi( GLint c );
+GLAPI void GLAPIENTRY emscripten_glIndexs( GLshort c );
+GLAPI void GLAPIENTRY emscripten_glIndexub( GLubyte c ); /* 1.1 */
+
+GLAPI void GLAPIENTRY emscripten_glIndexdv( const GLdouble *c );
+GLAPI void GLAPIENTRY emscripten_glIndexfv( const GLfloat *c );
+GLAPI void GLAPIENTRY emscripten_glIndexiv( const GLint *c );
+GLAPI void GLAPIENTRY emscripten_glIndexsv( const GLshort *c );
+GLAPI void GLAPIENTRY emscripten_glIndexubv( const GLubyte *c ); /* 1.1 */
+
+GLAPI void GLAPIENTRY emscripten_glColor3b( GLbyte red, GLbyte green, GLbyte blue );
+GLAPI void GLAPIENTRY emscripten_glColor3d( GLdouble red, GLdouble green, GLdouble blue );
+GLAPI void GLAPIENTRY emscripten_glColor3f( GLfloat red, GLfloat green, GLfloat blue );
+GLAPI void GLAPIENTRY emscripten_glColor3i( GLint red, GLint green, GLint blue );
+GLAPI void GLAPIENTRY emscripten_glColor3s( GLshort red, GLshort green, GLshort blue );
+GLAPI void GLAPIENTRY emscripten_glColor3ub( GLubyte red, GLubyte green, GLubyte blue );
+GLAPI void GLAPIENTRY emscripten_glColor3ui( GLuint red, GLuint green, GLuint blue );
+GLAPI void GLAPIENTRY emscripten_glColor3us( GLushort red, GLushort green, GLushort blue );
+
+GLAPI void GLAPIENTRY emscripten_glColor4b( GLbyte red, GLbyte green,
+ GLbyte blue, GLbyte alpha );
+GLAPI void GLAPIENTRY emscripten_glColor4d( GLdouble red, GLdouble green,
+ GLdouble blue, GLdouble alpha );
+GLAPI void GLAPIENTRY emscripten_glColor4f( GLfloat red, GLfloat green,
+ GLfloat blue, GLfloat alpha );
+GLAPI void GLAPIENTRY emscripten_glColor4i( GLint red, GLint green,
+ GLint blue, GLint alpha );
+GLAPI void GLAPIENTRY emscripten_glColor4s( GLshort red, GLshort green,
+ GLshort blue, GLshort alpha );
+GLAPI void GLAPIENTRY emscripten_glColor4ub( GLubyte red, GLubyte green,
+ GLubyte blue, GLubyte alpha );
+GLAPI void GLAPIENTRY emscripten_glColor4ui( GLuint red, GLuint green,
+ GLuint blue, GLuint alpha );
+GLAPI void GLAPIENTRY emscripten_glColor4us( GLushort red, GLushort green,
+ GLushort blue, GLushort alpha );
+
+
+GLAPI void GLAPIENTRY emscripten_glColor3bv( const GLbyte *v );
+GLAPI void GLAPIENTRY emscripten_glColor3dv( const GLdouble *v );
+GLAPI void GLAPIENTRY emscripten_glColor3fv( const GLfloat *v );
+GLAPI void GLAPIENTRY emscripten_glColor3iv( const GLint *v );
+GLAPI void GLAPIENTRY emscripten_glColor3sv( const GLshort *v );
+GLAPI void GLAPIENTRY emscripten_glColor3ubv( const GLubyte *v );
+GLAPI void GLAPIENTRY emscripten_glColor3uiv( const GLuint *v );
+GLAPI void GLAPIENTRY emscripten_glColor3usv( const GLushort *v );
+
+GLAPI void GLAPIENTRY emscripten_glColor4bv( const GLbyte *v );
+GLAPI void GLAPIENTRY emscripten_glColor4dv( const GLdouble *v );
+GLAPI void GLAPIENTRY emscripten_glColor4fv( const GLfloat *v );
+GLAPI void GLAPIENTRY emscripten_glColor4iv( const GLint *v );
+GLAPI void GLAPIENTRY emscripten_glColor4sv( const GLshort *v );
+GLAPI void GLAPIENTRY emscripten_glColor4ubv( const GLubyte *v );
+GLAPI void GLAPIENTRY emscripten_glColor4uiv( const GLuint *v );
+GLAPI void GLAPIENTRY emscripten_glColor4usv( const GLushort *v );
+
+
+GLAPI void GLAPIENTRY emscripten_glTexCoord1d( GLdouble s );
+GLAPI void GLAPIENTRY emscripten_glTexCoord1f( GLfloat s );
+GLAPI void GLAPIENTRY emscripten_glTexCoord1i( GLint s );
+GLAPI void GLAPIENTRY emscripten_glTexCoord1s( GLshort s );
+
+GLAPI void GLAPIENTRY emscripten_glTexCoord2d( GLdouble s, GLdouble t );
+GLAPI void GLAPIENTRY emscripten_glTexCoord2f( GLfloat s, GLfloat t );
+GLAPI void GLAPIENTRY emscripten_glTexCoord2i( GLint s, GLint t );
+GLAPI void GLAPIENTRY emscripten_glTexCoord2s( GLshort s, GLshort t );
+
+GLAPI void GLAPIENTRY emscripten_glTexCoord3d( GLdouble s, GLdouble t, GLdouble r );
+GLAPI void GLAPIENTRY emscripten_glTexCoord3f( GLfloat s, GLfloat t, GLfloat r );
+GLAPI void GLAPIENTRY emscripten_glTexCoord3i( GLint s, GLint t, GLint r );
+GLAPI void GLAPIENTRY emscripten_glTexCoord3s( GLshort s, GLshort t, GLshort r );
+
+GLAPI void GLAPIENTRY emscripten_glTexCoord4d( GLdouble s, GLdouble t, GLdouble r, GLdouble q );
+GLAPI void GLAPIENTRY emscripten_glTexCoord4f( GLfloat s, GLfloat t, GLfloat r, GLfloat q );
+GLAPI void GLAPIENTRY emscripten_glTexCoord4i( GLint s, GLint t, GLint r, GLint q );
+GLAPI void GLAPIENTRY emscripten_glTexCoord4s( GLshort s, GLshort t, GLshort r, GLshort q );
+
+GLAPI void GLAPIENTRY emscripten_glTexCoord1dv( const GLdouble *v );
+GLAPI void GLAPIENTRY emscripten_glTexCoord1fv( const GLfloat *v );
+GLAPI void GLAPIENTRY emscripten_glTexCoord1iv( const GLint *v );
+GLAPI void GLAPIENTRY emscripten_glTexCoord1sv( const GLshort *v );
+
+GLAPI void GLAPIENTRY emscripten_glTexCoord2dv( const GLdouble *v );
+GLAPI void GLAPIENTRY emscripten_glTexCoord2fv( const GLfloat *v );
+GLAPI void GLAPIENTRY emscripten_glTexCoord2iv( const GLint *v );
+GLAPI void GLAPIENTRY emscripten_glTexCoord2sv( const GLshort *v );
+
+GLAPI void GLAPIENTRY emscripten_glTexCoord3dv( const GLdouble *v );
+GLAPI void GLAPIENTRY emscripten_glTexCoord3fv( const GLfloat *v );
+GLAPI void GLAPIENTRY emscripten_glTexCoord3iv( const GLint *v );
+GLAPI void GLAPIENTRY emscripten_glTexCoord3sv( const GLshort *v );
+
+GLAPI void GLAPIENTRY emscripten_glTexCoord4dv( const GLdouble *v );
+GLAPI void GLAPIENTRY emscripten_glTexCoord4fv( const GLfloat *v );
+GLAPI void GLAPIENTRY emscripten_glTexCoord4iv( const GLint *v );
+GLAPI void GLAPIENTRY emscripten_glTexCoord4sv( const GLshort *v );
+
+
+GLAPI void GLAPIENTRY emscripten_glRasterPos2d( GLdouble x, GLdouble y );
+GLAPI void GLAPIENTRY emscripten_glRasterPos2f( GLfloat x, GLfloat y );
+GLAPI void GLAPIENTRY emscripten_glRasterPos2i( GLint x, GLint y );
+GLAPI void GLAPIENTRY emscripten_glRasterPos2s( GLshort x, GLshort y );
+
+GLAPI void GLAPIENTRY emscripten_glRasterPos3d( GLdouble x, GLdouble y, GLdouble z );
+GLAPI void GLAPIENTRY emscripten_glRasterPos3f( GLfloat x, GLfloat y, GLfloat z );
+GLAPI void GLAPIENTRY emscripten_glRasterPos3i( GLint x, GLint y, GLint z );
+GLAPI void GLAPIENTRY emscripten_glRasterPos3s( GLshort x, GLshort y, GLshort z );
+
+GLAPI void GLAPIENTRY emscripten_glRasterPos4d( GLdouble x, GLdouble y, GLdouble z, GLdouble w );
+GLAPI void GLAPIENTRY emscripten_glRasterPos4f( GLfloat x, GLfloat y, GLfloat z, GLfloat w );
+GLAPI void GLAPIENTRY emscripten_glRasterPos4i( GLint x, GLint y, GLint z, GLint w );
+GLAPI void GLAPIENTRY emscripten_glRasterPos4s( GLshort x, GLshort y, GLshort z, GLshort w );
+
+GLAPI void GLAPIENTRY emscripten_glRasterPos2dv( const GLdouble *v );
+GLAPI void GLAPIENTRY emscripten_glRasterPos2fv( const GLfloat *v );
+GLAPI void GLAPIENTRY emscripten_glRasterPos2iv( const GLint *v );
+GLAPI void GLAPIENTRY emscripten_glRasterPos2sv( const GLshort *v );
+
+GLAPI void GLAPIENTRY emscripten_glRasterPos3dv( const GLdouble *v );
+GLAPI void GLAPIENTRY emscripten_glRasterPos3fv( const GLfloat *v );
+GLAPI void GLAPIENTRY emscripten_glRasterPos3iv( const GLint *v );
+GLAPI void GLAPIENTRY emscripten_glRasterPos3sv( const GLshort *v );
+
+GLAPI void GLAPIENTRY emscripten_glRasterPos4dv( const GLdouble *v );
+GLAPI void GLAPIENTRY emscripten_glRasterPos4fv( const GLfloat *v );
+GLAPI void GLAPIENTRY emscripten_glRasterPos4iv( const GLint *v );
+GLAPI void GLAPIENTRY emscripten_glRasterPos4sv( const GLshort *v );
+
+
+GLAPI void GLAPIENTRY emscripten_glRectd( GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2 );
+GLAPI void GLAPIENTRY emscripten_glRectf( GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2 );
+GLAPI void GLAPIENTRY emscripten_glRecti( GLint x1, GLint y1, GLint x2, GLint y2 );
+GLAPI void GLAPIENTRY emscripten_glRects( GLshort x1, GLshort y1, GLshort x2, GLshort y2 );
+
+
+GLAPI void GLAPIENTRY emscripten_glRectdv( const GLdouble *v1, const GLdouble *v2 );
+GLAPI void GLAPIENTRY emscripten_glRectfv( const GLfloat *v1, const GLfloat *v2 );
+GLAPI void GLAPIENTRY emscripten_glRectiv( const GLint *v1, const GLint *v2 );
+GLAPI void GLAPIENTRY emscripten_glRectsv( const GLshort *v1, const GLshort *v2 );
+
+
+/*
+ * Vertex Arrays (1.1)
+ */
+
+GLAPI void GLAPIENTRY emscripten_glVertexPointer( GLint size, GLenum type,
+ GLsizei stride, const GLvoid *ptr );
+
+GLAPI void GLAPIENTRY emscripten_glNormalPointer( GLenum type, GLsizei stride,
+ const GLvoid *ptr );
+
+GLAPI void GLAPIENTRY emscripten_glColorPointer( GLint size, GLenum type,
+ GLsizei stride, const GLvoid *ptr );
+
+GLAPI void GLAPIENTRY emscripten_glIndexPointer( GLenum type, GLsizei stride,
+ const GLvoid *ptr );
+
+GLAPI void GLAPIENTRY emscripten_glTexCoordPointer( GLint size, GLenum type,
+ GLsizei stride, const GLvoid *ptr );
+
+GLAPI void GLAPIENTRY emscripten_glEdgeFlagPointer( GLsizei stride, const GLvoid *ptr );
+
+GLAPI void GLAPIENTRY emscripten_glGetPointerv( GLenum pname, GLvoid **params );
+
+GLAPI void GLAPIENTRY emscripten_glArrayElement( GLint i );
+
+GLAPI void GLAPIENTRY emscripten_glDrawArrays( GLenum mode, GLint first, GLsizei count );
+
+GLAPI void GLAPIENTRY emscripten_glDrawElements( GLenum mode, GLsizei count,
+ GLenum type, const GLvoid *indices );
+
+GLAPI void GLAPIENTRY emscripten_glInterleavedArrays( GLenum format, GLsizei stride,
+ const GLvoid *pointer );
+
+/*
+ * Lighting
+ */
+
+GLAPI void GLAPIENTRY emscripten_glShadeModel( GLenum mode );
+
+GLAPI void GLAPIENTRY emscripten_glLightf( GLenum light, GLenum pname, GLfloat param );
+GLAPI void GLAPIENTRY emscripten_glLighti( GLenum light, GLenum pname, GLint param );
+GLAPI void GLAPIENTRY emscripten_glLightfv( GLenum light, GLenum pname,
+ const GLfloat *params );
+GLAPI void GLAPIENTRY emscripten_glLightiv( GLenum light, GLenum pname,
+ const GLint *params );
+
+GLAPI void GLAPIENTRY emscripten_glGetLightfv( GLenum light, GLenum pname,
+ GLfloat *params );
+GLAPI void GLAPIENTRY emscripten_glGetLightiv( GLenum light, GLenum pname,
+ GLint *params );
+
+GLAPI void GLAPIENTRY emscripten_glLightModelf( GLenum pname, GLfloat param );
+GLAPI void GLAPIENTRY emscripten_glLightModeli( GLenum pname, GLint param );
+GLAPI void GLAPIENTRY emscripten_glLightModelfv( GLenum pname, const GLfloat *params );
+GLAPI void GLAPIENTRY emscripten_glLightModeliv( GLenum pname, const GLint *params );
+
+GLAPI void GLAPIENTRY emscripten_glMaterialf( GLenum face, GLenum pname, GLfloat param );
+GLAPI void GLAPIENTRY emscripten_glMateriali( GLenum face, GLenum pname, GLint param );
+GLAPI void GLAPIENTRY emscripten_glMaterialfv( GLenum face, GLenum pname, const GLfloat *params );
+GLAPI void GLAPIENTRY emscripten_glMaterialiv( GLenum face, GLenum pname, const GLint *params );
+
+GLAPI void GLAPIENTRY emscripten_glGetMaterialfv( GLenum face, GLenum pname, GLfloat *params );
+GLAPI void GLAPIENTRY emscripten_glGetMaterialiv( GLenum face, GLenum pname, GLint *params );
+
+GLAPI void GLAPIENTRY emscripten_glColorMaterial( GLenum face, GLenum mode );
+
+
+/*
+ * Raster functions
+ */
+
+GLAPI void GLAPIENTRY emscripten_glPixelZoom( GLfloat xfactor, GLfloat yfactor );
+
+GLAPI void GLAPIENTRY emscripten_glPixelStoref( GLenum pname, GLfloat param );
+GLAPI void GLAPIENTRY emscripten_glPixelStorei( GLenum pname, GLint param );
+
+GLAPI void GLAPIENTRY emscripten_glPixelTransferf( GLenum pname, GLfloat param );
+GLAPI void GLAPIENTRY emscripten_glPixelTransferi( GLenum pname, GLint param );
+
+GLAPI void GLAPIENTRY emscripten_glPixelMapfv( GLenum map, GLsizei mapsize,
+ const GLfloat *values );
+GLAPI void GLAPIENTRY emscripten_glPixelMapuiv( GLenum map, GLsizei mapsize,
+ const GLuint *values );
+GLAPI void GLAPIENTRY emscripten_glPixelMapusv( GLenum map, GLsizei mapsize,
+ const GLushort *values );
+
+GLAPI void GLAPIENTRY emscripten_glGetPixelMapfv( GLenum map, GLfloat *values );
+GLAPI void GLAPIENTRY emscripten_glGetPixelMapuiv( GLenum map, GLuint *values );
+GLAPI void GLAPIENTRY emscripten_glGetPixelMapusv( GLenum map, GLushort *values );
+
+GLAPI void GLAPIENTRY emscripten_glBitmap( GLsizei width, GLsizei height,
+ GLfloat xorig, GLfloat yorig,
+ GLfloat xmove, GLfloat ymove,
+ const GLubyte *bitmap );
+
+GLAPI void GLAPIENTRY emscripten_glReadPixels( GLint x, GLint y,
+ GLsizei width, GLsizei height,
+ GLenum format, GLenum type,
+ GLvoid *pixels );
+
+GLAPI void GLAPIENTRY emscripten_glDrawPixels( GLsizei width, GLsizei height,
+ GLenum format, GLenum type,
+ const GLvoid *pixels );
+
+GLAPI void GLAPIENTRY emscripten_glCopyPixels( GLint x, GLint y,
+ GLsizei width, GLsizei height,
+ GLenum type );
+
+/*
+ * Stenciling
+ */
+
+GLAPI void GLAPIENTRY emscripten_glStencilFunc( GLenum func, GLint ref, GLuint mask );
+
+GLAPI void GLAPIENTRY emscripten_glStencilMask( GLuint mask );
+
+GLAPI void GLAPIENTRY emscripten_glStencilOp( GLenum fail, GLenum zfail, GLenum zpass );
+
+GLAPI void GLAPIENTRY emscripten_glClearStencil( GLint s );
+
+
+
+/*
+ * Texture mapping
+ */
+
+GLAPI void GLAPIENTRY emscripten_glTexGend( GLenum coord, GLenum pname, GLdouble param );
+GLAPI void GLAPIENTRY emscripten_glTexGenf( GLenum coord, GLenum pname, GLfloat param );
+GLAPI void GLAPIENTRY emscripten_glTexGeni( GLenum coord, GLenum pname, GLint param );
+
+GLAPI void GLAPIENTRY emscripten_glTexGendv( GLenum coord, GLenum pname, const GLdouble *params );
+GLAPI void GLAPIENTRY emscripten_glTexGenfv( GLenum coord, GLenum pname, const GLfloat *params );
+GLAPI void GLAPIENTRY emscripten_glTexGeniv( GLenum coord, GLenum pname, const GLint *params );
+
+GLAPI void GLAPIENTRY emscripten_glGetTexGendv( GLenum coord, GLenum pname, GLdouble *params );
+GLAPI void GLAPIENTRY emscripten_glGetTexGenfv( GLenum coord, GLenum pname, GLfloat *params );
+GLAPI void GLAPIENTRY emscripten_glGetTexGeniv( GLenum coord, GLenum pname, GLint *params );
+
+
+GLAPI void GLAPIENTRY emscripten_glTexEnvf( GLenum target, GLenum pname, GLfloat param );
+GLAPI void GLAPIENTRY emscripten_glTexEnvi( GLenum target, GLenum pname, GLint param );
+
+GLAPI void GLAPIENTRY emscripten_glTexEnvfv( GLenum target, GLenum pname, const GLfloat *params );
+GLAPI void GLAPIENTRY emscripten_glTexEnviv( GLenum target, GLenum pname, const GLint *params );
+
+GLAPI void GLAPIENTRY emscripten_glGetTexEnvfv( GLenum target, GLenum pname, GLfloat *params );
+GLAPI void GLAPIENTRY emscripten_glGetTexEnviv( GLenum target, GLenum pname, GLint *params );
+
+
+GLAPI void GLAPIENTRY emscripten_glTexParameterf( GLenum target, GLenum pname, GLfloat param );
+GLAPI void GLAPIENTRY emscripten_glTexParameteri( GLenum target, GLenum pname, GLint param );
+
+GLAPI void GLAPIENTRY emscripten_glTexParameterfv( GLenum target, GLenum pname,
+ const GLfloat *params );
+GLAPI void GLAPIENTRY emscripten_glTexParameteriv( GLenum target, GLenum pname,
+ const GLint *params );
+
+GLAPI void GLAPIENTRY emscripten_glGetTexParameterfv( GLenum target,
+ GLenum pname, GLfloat *params);
+GLAPI void GLAPIENTRY emscripten_glGetTexParameteriv( GLenum target,
+ GLenum pname, GLint *params );
+
+GLAPI void GLAPIENTRY emscripten_glGetTexLevelParameterfv( GLenum target, GLint level,
+ GLenum pname, GLfloat *params );
+GLAPI void GLAPIENTRY emscripten_glGetTexLevelParameteriv( GLenum target, GLint level,
+ GLenum pname, GLint *params );
+
+
+GLAPI void GLAPIENTRY emscripten_glTexImage1D( GLenum target, GLint level,
+ GLint internalFormat,
+ GLsizei width, GLint border,
+ GLenum format, GLenum type,
+ const GLvoid *pixels );
+
+GLAPI void GLAPIENTRY emscripten_glTexImage2D( GLenum target, GLint level,
+ GLint internalFormat,
+ GLsizei width, GLsizei height,
+ GLint border, GLenum format, GLenum type,
+ const GLvoid *pixels );
+
+GLAPI void GLAPIENTRY emscripten_glGetTexImage( GLenum target, GLint level,
+ GLenum format, GLenum type,
+ GLvoid *pixels );
+
+
+/* 1.1 functions */
+
+GLAPI void GLAPIENTRY emscripten_glGenTextures( GLsizei n, GLuint *textures );
+
+GLAPI void GLAPIENTRY emscripten_glDeleteTextures( GLsizei n, const GLuint *textures);
+
+GLAPI void GLAPIENTRY emscripten_glBindTexture( GLenum target, GLuint texture );
+
+GLAPI void GLAPIENTRY emscripten_glPrioritizeTextures( GLsizei n,
+ const GLuint *textures,
+ const GLclampf *priorities );
+
+GLAPI GLboolean GLAPIENTRY emscripten_glAreTexturesResident( GLsizei n,
+ const GLuint *textures,
+ GLboolean *residences );
+
+GLAPI GLboolean GLAPIENTRY emscripten_glIsTexture( GLuint texture );
+
+
+GLAPI void GLAPIENTRY emscripten_glTexSubImage1D( GLenum target, GLint level,
+ GLint xoffset,
+ GLsizei width, GLenum format,
+ GLenum type, const GLvoid *pixels );
+
+
+GLAPI void GLAPIENTRY emscripten_glTexSubImage2D( GLenum target, GLint level,
+ GLint xoffset, GLint yoffset,
+ GLsizei width, GLsizei height,
+ GLenum format, GLenum type,
+ const GLvoid *pixels );
+
+
+GLAPI void GLAPIENTRY emscripten_glCopyTexImage1D( GLenum target, GLint level,
+ GLenum internalformat,
+ GLint x, GLint y,
+ GLsizei width, GLint border );
+
+
+GLAPI void GLAPIENTRY emscripten_glCopyTexImage2D( GLenum target, GLint level,
+ GLenum internalformat,
+ GLint x, GLint y,
+ GLsizei width, GLsizei height,
+ GLint border );
+
+
+GLAPI void GLAPIENTRY emscripten_glCopyTexSubImage1D( GLenum target, GLint level,
+ GLint xoffset, GLint x, GLint y,
+ GLsizei width );
+
+
+GLAPI void GLAPIENTRY emscripten_glCopyTexSubImage2D( GLenum target, GLint level,
+ GLint xoffset, GLint yoffset,
+ GLint x, GLint y,
+ GLsizei width, GLsizei height );
+
+
+/*
+ * Evaluators
+ */
+
+GLAPI void GLAPIENTRY emscripten_glMap1d( GLenum target, GLdouble u1, GLdouble u2,
+ GLint stride,
+ GLint order, const GLdouble *points );
+GLAPI void GLAPIENTRY emscripten_glMap1f( GLenum target, GLfloat u1, GLfloat u2,
+ GLint stride,
+ GLint order, const GLfloat *points );
+
+GLAPI void GLAPIENTRY emscripten_glMap2d( GLenum target,
+ GLdouble u1, GLdouble u2, GLint ustride, GLint uorder,
+ GLdouble v1, GLdouble v2, GLint vstride, GLint vorder,
+ const GLdouble *points );
+GLAPI void GLAPIENTRY emscripten_glMap2f( GLenum target,
+ GLfloat u1, GLfloat u2, GLint ustride, GLint uorder,
+ GLfloat v1, GLfloat v2, GLint vstride, GLint vorder,
+ const GLfloat *points );
+
+GLAPI void GLAPIENTRY emscripten_glGetMapdv( GLenum target, GLenum query, GLdouble *v );
+GLAPI void GLAPIENTRY emscripten_glGetMapfv( GLenum target, GLenum query, GLfloat *v );
+GLAPI void GLAPIENTRY emscripten_glGetMapiv( GLenum target, GLenum query, GLint *v );
+
+GLAPI void GLAPIENTRY emscripten_glEvalCoord1d( GLdouble u );
+GLAPI void GLAPIENTRY emscripten_glEvalCoord1f( GLfloat u );
+
+GLAPI void GLAPIENTRY emscripten_glEvalCoord1dv( const GLdouble *u );
+GLAPI void GLAPIENTRY emscripten_glEvalCoord1fv( const GLfloat *u );
+
+GLAPI void GLAPIENTRY emscripten_glEvalCoord2d( GLdouble u, GLdouble v );
+GLAPI void GLAPIENTRY emscripten_glEvalCoord2f( GLfloat u, GLfloat v );
+
+GLAPI void GLAPIENTRY emscripten_glEvalCoord2dv( const GLdouble *u );
+GLAPI void GLAPIENTRY emscripten_glEvalCoord2fv( const GLfloat *u );
+
+GLAPI void GLAPIENTRY emscripten_glMapGrid1d( GLint un, GLdouble u1, GLdouble u2 );
+GLAPI void GLAPIENTRY emscripten_glMapGrid1f( GLint un, GLfloat u1, GLfloat u2 );
+
+GLAPI void GLAPIENTRY emscripten_glMapGrid2d( GLint un, GLdouble u1, GLdouble u2,
+ GLint vn, GLdouble v1, GLdouble v2 );
+GLAPI void GLAPIENTRY emscripten_glMapGrid2f( GLint un, GLfloat u1, GLfloat u2,
+ GLint vn, GLfloat v1, GLfloat v2 );
+
+GLAPI void GLAPIENTRY emscripten_glEvalPoint1( GLint i );
+
+GLAPI void GLAPIENTRY emscripten_glEvalPoint2( GLint i, GLint j );
+
+GLAPI void GLAPIENTRY emscripten_glEvalMesh1( GLenum mode, GLint i1, GLint i2 );
+
+GLAPI void GLAPIENTRY emscripten_glEvalMesh2( GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2 );
+
+
+/*
+ * Fog
+ */
+
+GLAPI void GLAPIENTRY emscripten_glFogf( GLenum pname, GLfloat param );
+
+GLAPI void GLAPIENTRY emscripten_glFogi( GLenum pname, GLint param );
+
+GLAPI void GLAPIENTRY emscripten_glFogfv( GLenum pname, const GLfloat *params );
+
+GLAPI void GLAPIENTRY emscripten_glFogiv( GLenum pname, const GLint *params );
+
+
+/*
+ * Selection and Feedback
+ */
+
+GLAPI void GLAPIENTRY emscripten_glFeedbackBuffer( GLsizei size, GLenum type, GLfloat *buffer );
+
+GLAPI void GLAPIENTRY emscripten_glPassThrough( GLfloat token );
+
+GLAPI void GLAPIENTRY emscripten_glSelectBuffer( GLsizei size, GLuint *buffer );
+
+GLAPI void GLAPIENTRY emscripten_glInitNames( void );
+
+GLAPI void GLAPIENTRY emscripten_glLoadName( GLuint name );
+
+GLAPI void GLAPIENTRY emscripten_glPushName( GLuint name );
+
+GLAPI void GLAPIENTRY emscripten_glPopName( void );
+
+
+GLAPI void GLAPIENTRY emscripten_glDrawRangeElements( GLenum mode, GLuint start,
+ GLuint end, GLsizei count, GLenum type, const GLvoid *indices );
+
+GLAPI void GLAPIENTRY emscripten_glTexImage3D( GLenum target, GLint level,
+ GLint internalFormat,
+ GLsizei width, GLsizei height,
+ GLsizei depth, GLint border,
+ GLenum format, GLenum type,
+ const GLvoid *pixels );
+
+GLAPI void GLAPIENTRY emscripten_glTexSubImage3D( GLenum target, GLint level,
+ GLint xoffset, GLint yoffset,
+ GLint zoffset, GLsizei width,
+ GLsizei height, GLsizei depth,
+ GLenum format,
+ GLenum type, const GLvoid *pixels);
+
+GLAPI void GLAPIENTRY emscripten_glCopyTexSubImage3D( GLenum target, GLint level,
+ GLint xoffset, GLint yoffset,
+ GLint zoffset, GLint x,
+ GLint y, GLsizei width,
+ GLsizei height );
+
+
+GLAPI void GLAPIENTRY emscripten_glColorTable( GLenum target, GLenum internalformat,
+ GLsizei width, GLenum format,
+ GLenum type, const GLvoid *table );
+
+GLAPI void GLAPIENTRY emscripten_glColorSubTable( GLenum target,
+ GLsizei start, GLsizei count,
+ GLenum format, GLenum type,
+ const GLvoid *data );
+
+GLAPI void GLAPIENTRY emscripten_glColorTableParameteriv(GLenum target, GLenum pname,
+ const GLint *params);
+
+GLAPI void GLAPIENTRY emscripten_glColorTableParameterfv(GLenum target, GLenum pname,
+ const GLfloat *params);
+
+GLAPI void GLAPIENTRY emscripten_glCopyColorSubTable( GLenum target, GLsizei start,
+ GLint x, GLint y, GLsizei width );
+
+GLAPI void GLAPIENTRY emscripten_glCopyColorTable( GLenum target, GLenum internalformat,
+ GLint x, GLint y, GLsizei width );
+
+GLAPI void GLAPIENTRY emscripten_glGetColorTable( GLenum target, GLenum format,
+ GLenum type, GLvoid *table );
+
+GLAPI void GLAPIENTRY emscripten_glGetColorTableParameterfv( GLenum target, GLenum pname,
+ GLfloat *params );
+
+GLAPI void GLAPIENTRY emscripten_glGetColorTableParameteriv( GLenum target, GLenum pname,
+ GLint *params );
+
+GLAPI void GLAPIENTRY emscripten_glBlendEquation( GLenum mode );
+
+GLAPI void GLAPIENTRY emscripten_glBlendColor( GLclampf red, GLclampf green,
+ GLclampf blue, GLclampf alpha );
+
+GLAPI void GLAPIENTRY emscripten_glHistogram( GLenum target, GLsizei width,
+ GLenum internalformat, GLboolean sink );
+
+GLAPI void GLAPIENTRY emscripten_glResetHistogram( GLenum target );
+
+GLAPI void GLAPIENTRY emscripten_glGetHistogram( GLenum target, GLboolean reset,
+ GLenum format, GLenum type,
+ GLvoid *values );
+
+GLAPI void GLAPIENTRY emscripten_glGetHistogramParameterfv( GLenum target, GLenum pname,
+ GLfloat *params );
+
+GLAPI void GLAPIENTRY emscripten_glGetHistogramParameteriv( GLenum target, GLenum pname,
+ GLint *params );
+
+GLAPI void GLAPIENTRY emscripten_glMinmax( GLenum target, GLenum internalformat,
+ GLboolean sink );
+
+GLAPI void GLAPIENTRY emscripten_glResetMinmax( GLenum target );
+
+GLAPI void GLAPIENTRY emscripten_glGetMinmax( GLenum target, GLboolean reset,
+ GLenum format, GLenum types,
+ GLvoid *values );
+
+GLAPI void GLAPIENTRY emscripten_glGetMinmaxParameterfv( GLenum target, GLenum pname,
+ GLfloat *params );
+
+GLAPI void GLAPIENTRY emscripten_glGetMinmaxParameteriv( GLenum target, GLenum pname,
+ GLint *params );
+
+GLAPI void GLAPIENTRY emscripten_glConvolutionFilter1D( GLenum target,
+ GLenum internalformat, GLsizei width, GLenum format, GLenum type,
+ const GLvoid *image );
+
+GLAPI void GLAPIENTRY emscripten_glConvolutionFilter2D( GLenum target,
+ GLenum internalformat, GLsizei width, GLsizei height, GLenum format,
+ GLenum type, const GLvoid *image );
+
+GLAPI void GLAPIENTRY emscripten_glConvolutionParameterf( GLenum target, GLenum pname,
+ GLfloat params );
+
+GLAPI void GLAPIENTRY emscripten_glConvolutionParameterfv( GLenum target, GLenum pname,
+ const GLfloat *params );
+
+GLAPI void GLAPIENTRY emscripten_glConvolutionParameteri( GLenum target, GLenum pname,
+ GLint params );
+
+GLAPI void GLAPIENTRY emscripten_glConvolutionParameteriv( GLenum target, GLenum pname,
+ const GLint *params );
+
+GLAPI void GLAPIENTRY emscripten_glCopyConvolutionFilter1D( GLenum target,
+ GLenum internalformat, GLint x, GLint y, GLsizei width );
+
+GLAPI void GLAPIENTRY emscripten_glCopyConvolutionFilter2D( GLenum target,
+ GLenum internalformat, GLint x, GLint y, GLsizei width,
+ GLsizei height);
+
+GLAPI void GLAPIENTRY emscripten_glGetConvolutionFilter( GLenum target, GLenum format,
+ GLenum type, GLvoid *image );
+
+GLAPI void GLAPIENTRY emscripten_glGetConvolutionParameterfv( GLenum target, GLenum pname,
+ GLfloat *params );
+
+GLAPI void GLAPIENTRY emscripten_glGetConvolutionParameteriv( GLenum target, GLenum pname,
+ GLint *params );
+
+GLAPI void GLAPIENTRY emscripten_glSeparableFilter2D( GLenum target,
+ GLenum internalformat, GLsizei width, GLsizei height, GLenum format,
+ GLenum type, const GLvoid *row, const GLvoid *column );
+
+GLAPI void GLAPIENTRY emscripten_glGetSeparableFilter( GLenum target, GLenum format,
+ GLenum type, GLvoid *row, GLvoid *column, GLvoid *span );
+
+
+GLAPI void GLAPIENTRY emscripten_glActiveTexture( GLenum texture );
+
+GLAPI void GLAPIENTRY emscripten_glClientActiveTexture( GLenum texture );
+
+GLAPI void GLAPIENTRY emscripten_glCompressedTexImage1D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data );
+
+GLAPI void GLAPIENTRY emscripten_glCompressedTexImage2D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data );
+
+GLAPI void GLAPIENTRY emscripten_glCompressedTexImage3D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data );
+
+GLAPI void GLAPIENTRY emscripten_glCompressedTexSubImage1D( GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data );
+
+GLAPI void GLAPIENTRY emscripten_glCompressedTexSubImage2D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data );
+
+GLAPI void GLAPIENTRY emscripten_glCompressedTexSubImage3D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data );
+
+GLAPI void GLAPIENTRY emscripten_glGetCompressedTexImage( GLenum target, GLint lod, GLvoid *img );
+
+GLAPI void GLAPIENTRY emscripten_glMultiTexCoord1d( GLenum target, GLdouble s );
+
+GLAPI void GLAPIENTRY emscripten_glMultiTexCoord1dv( GLenum target, const GLdouble *v );
+
+GLAPI void GLAPIENTRY emscripten_glMultiTexCoord1f( GLenum target, GLfloat s );
+
+GLAPI void GLAPIENTRY emscripten_glMultiTexCoord1fv( GLenum target, const GLfloat *v );
+
+GLAPI void GLAPIENTRY emscripten_glMultiTexCoord1i( GLenum target, GLint s );
+
+GLAPI void GLAPIENTRY emscripten_glMultiTexCoord1iv( GLenum target, const GLint *v );
+
+GLAPI void GLAPIENTRY emscripten_glMultiTexCoord1s( GLenum target, GLshort s );
+
+GLAPI void GLAPIENTRY emscripten_glMultiTexCoord1sv( GLenum target, const GLshort *v );
+
+GLAPI void GLAPIENTRY emscripten_glMultiTexCoord2d( GLenum target, GLdouble s, GLdouble t );
+
+GLAPI void GLAPIENTRY emscripten_glMultiTexCoord2dv( GLenum target, const GLdouble *v );
+
+GLAPI void GLAPIENTRY emscripten_glMultiTexCoord2f( GLenum target, GLfloat s, GLfloat t );
+
+GLAPI void GLAPIENTRY emscripten_glMultiTexCoord2fv( GLenum target, const GLfloat *v );
+
+GLAPI void GLAPIENTRY emscripten_glMultiTexCoord2i( GLenum target, GLint s, GLint t );
+
+GLAPI void GLAPIENTRY emscripten_glMultiTexCoord2iv( GLenum target, const GLint *v );
+
+GLAPI void GLAPIENTRY emscripten_glMultiTexCoord2s( GLenum target, GLshort s, GLshort t );
+
+GLAPI void GLAPIENTRY emscripten_glMultiTexCoord2sv( GLenum target, const GLshort *v );
+
+GLAPI void GLAPIENTRY emscripten_glMultiTexCoord3d( GLenum target, GLdouble s, GLdouble t, GLdouble r );
+
+GLAPI void GLAPIENTRY emscripten_glMultiTexCoord3dv( GLenum target, const GLdouble *v );
+
+GLAPI void GLAPIENTRY emscripten_glMultiTexCoord3f( GLenum target, GLfloat s, GLfloat t, GLfloat r );
+
+GLAPI void GLAPIENTRY emscripten_glMultiTexCoord3fv( GLenum target, const GLfloat *v );
+
+GLAPI void GLAPIENTRY emscripten_glMultiTexCoord3i( GLenum target, GLint s, GLint t, GLint r );
+
+GLAPI void GLAPIENTRY emscripten_glMultiTexCoord3iv( GLenum target, const GLint *v );
+
+GLAPI void GLAPIENTRY emscripten_glMultiTexCoord3s( GLenum target, GLshort s, GLshort t, GLshort r );
+
+GLAPI void GLAPIENTRY emscripten_glMultiTexCoord3sv( GLenum target, const GLshort *v );
+
+GLAPI void GLAPIENTRY emscripten_glMultiTexCoord4d( GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q );
+
+GLAPI void GLAPIENTRY emscripten_glMultiTexCoord4dv( GLenum target, const GLdouble *v );
+
+GLAPI void GLAPIENTRY emscripten_glMultiTexCoord4f( GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q );
+
+GLAPI void GLAPIENTRY emscripten_glMultiTexCoord4fv( GLenum target, const GLfloat *v );
+
+GLAPI void GLAPIENTRY emscripten_glMultiTexCoord4i( GLenum target, GLint s, GLint t, GLint r, GLint q );
+
+GLAPI void GLAPIENTRY emscripten_glMultiTexCoord4iv( GLenum target, const GLint *v );
+
+GLAPI void GLAPIENTRY emscripten_glMultiTexCoord4s( GLenum target, GLshort s, GLshort t, GLshort r, GLshort q );
+
+GLAPI void GLAPIENTRY emscripten_glMultiTexCoord4sv( GLenum target, const GLshort *v );
+
+
+GLAPI void GLAPIENTRY emscripten_glLoadTransposeMatrixd( const GLdouble m[16] );
+
+GLAPI void GLAPIENTRY emscripten_glLoadTransposeMatrixf( const GLfloat m[16] );
+
+GLAPI void GLAPIENTRY emscripten_glMultTransposeMatrixd( const GLdouble m[16] );
+
+GLAPI void GLAPIENTRY emscripten_glMultTransposeMatrixf( const GLfloat m[16] );
+
+GLAPI void GLAPIENTRY emscripten_glSampleCoverage( GLclampf value, GLboolean invert );
+
+
+GLAPI void GLAPIENTRY emscripten_glActiveTextureARB(GLenum texture);
+GLAPI void GLAPIENTRY emscripten_glClientActiveTextureARB(GLenum texture);
+GLAPI void GLAPIENTRY emscripten_glMultiTexCoord1dARB(GLenum target, GLdouble s);
+GLAPI void GLAPIENTRY emscripten_glMultiTexCoord1dvARB(GLenum target, const GLdouble *v);
+GLAPI void GLAPIENTRY emscripten_glMultiTexCoord1fARB(GLenum target, GLfloat s);
+GLAPI void GLAPIENTRY emscripten_glMultiTexCoord1fvARB(GLenum target, const GLfloat *v);
+GLAPI void GLAPIENTRY emscripten_glMultiTexCoord1iARB(GLenum target, GLint s);
+GLAPI void GLAPIENTRY emscripten_glMultiTexCoord1ivARB(GLenum target, const GLint *v);
+GLAPI void GLAPIENTRY emscripten_glMultiTexCoord1sARB(GLenum target, GLshort s);
+GLAPI void GLAPIENTRY emscripten_glMultiTexCoord1svARB(GLenum target, const GLshort *v);
+GLAPI void GLAPIENTRY emscripten_glMultiTexCoord2dARB(GLenum target, GLdouble s, GLdouble t);
+GLAPI void GLAPIENTRY emscripten_glMultiTexCoord2dvARB(GLenum target, const GLdouble *v);
+GLAPI void GLAPIENTRY emscripten_glMultiTexCoord2fARB(GLenum target, GLfloat s, GLfloat t);
+GLAPI void GLAPIENTRY emscripten_glMultiTexCoord2fvARB(GLenum target, const GLfloat *v);
+GLAPI void GLAPIENTRY emscripten_glMultiTexCoord2iARB(GLenum target, GLint s, GLint t);
+GLAPI void GLAPIENTRY emscripten_glMultiTexCoord2ivARB(GLenum target, const GLint *v);
+GLAPI void GLAPIENTRY emscripten_glMultiTexCoord2sARB(GLenum target, GLshort s, GLshort t);
+GLAPI void GLAPIENTRY emscripten_glMultiTexCoord2svARB(GLenum target, const GLshort *v);
+GLAPI void GLAPIENTRY emscripten_glMultiTexCoord3dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r);
+GLAPI void GLAPIENTRY emscripten_glMultiTexCoord3dvARB(GLenum target, const GLdouble *v);
+GLAPI void GLAPIENTRY emscripten_glMultiTexCoord3fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r);
+GLAPI void GLAPIENTRY emscripten_glMultiTexCoord3fvARB(GLenum target, const GLfloat *v);
+GLAPI void GLAPIENTRY emscripten_glMultiTexCoord3iARB(GLenum target, GLint s, GLint t, GLint r);
+GLAPI void GLAPIENTRY emscripten_glMultiTexCoord3ivARB(GLenum target, const GLint *v);
+GLAPI void GLAPIENTRY emscripten_glMultiTexCoord3sARB(GLenum target, GLshort s, GLshort t, GLshort r);
+GLAPI void GLAPIENTRY emscripten_glMultiTexCoord3svARB(GLenum target, const GLshort *v);
+GLAPI void GLAPIENTRY emscripten_glMultiTexCoord4dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
+GLAPI void GLAPIENTRY emscripten_glMultiTexCoord4dvARB(GLenum target, const GLdouble *v);
+GLAPI void GLAPIENTRY emscripten_glMultiTexCoord4fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
+GLAPI void GLAPIENTRY emscripten_glMultiTexCoord4fvARB(GLenum target, const GLfloat *v);
+GLAPI void GLAPIENTRY emscripten_glMultiTexCoord4iARB(GLenum target, GLint s, GLint t, GLint r, GLint q);
+GLAPI void GLAPIENTRY emscripten_glMultiTexCoord4ivARB(GLenum target, const GLint *v);
+GLAPI void GLAPIENTRY emscripten_glMultiTexCoord4sARB(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
+GLAPI void GLAPIENTRY emscripten_glMultiTexCoord4svARB(GLenum target, const GLshort *v);
+
+
+GLAPI void APIENTRY emscripten_glBlendColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
+GLAPI void APIENTRY emscripten_glBlendEquation (GLenum mode);
+GLAPI void APIENTRY emscripten_glDrawRangeElements (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices);
+GLAPI void APIENTRY emscripten_glTexImage3D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
+GLAPI void APIENTRY emscripten_glTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels);
+GLAPI void APIENTRY emscripten_glCopyTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+
+
+GLAPI void APIENTRY emscripten_glColorTable (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);
+GLAPI void APIENTRY emscripten_glColorTableParameterfv (GLenum target, GLenum pname, const GLfloat *params);
+GLAPI void APIENTRY emscripten_glColorTableParameteriv (GLenum target, GLenum pname, const GLint *params);
+GLAPI void APIENTRY emscripten_glCopyColorTable (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
+GLAPI void APIENTRY emscripten_glGetColorTable (GLenum target, GLenum format, GLenum type, GLvoid *table);
+GLAPI void APIENTRY emscripten_glGetColorTableParameterfv (GLenum target, GLenum pname, GLfloat *params);
+GLAPI void APIENTRY emscripten_glGetColorTableParameteriv (GLenum target, GLenum pname, GLint *params);
+GLAPI void APIENTRY emscripten_glColorSubTable (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data);
+GLAPI void APIENTRY emscripten_glCopyColorSubTable (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
+GLAPI void APIENTRY emscripten_glConvolutionFilter1D (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image);
+GLAPI void APIENTRY emscripten_glConvolutionFilter2D (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image);
+GLAPI void APIENTRY emscripten_glConvolutionParameterf (GLenum target, GLenum pname, GLfloat params);
+GLAPI void APIENTRY emscripten_glConvolutionParameterfv (GLenum target, GLenum pname, const GLfloat *params);
+GLAPI void APIENTRY emscripten_glConvolutionParameteri (GLenum target, GLenum pname, GLint params);
+GLAPI void APIENTRY emscripten_glConvolutionParameteriv (GLenum target, GLenum pname, const GLint *params);
+GLAPI void APIENTRY emscripten_glCopyConvolutionFilter1D (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
+GLAPI void APIENTRY emscripten_glCopyConvolutionFilter2D (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
+GLAPI void APIENTRY emscripten_glGetConvolutionFilter (GLenum target, GLenum format, GLenum type, GLvoid *image);
+GLAPI void APIENTRY emscripten_glGetConvolutionParameterfv (GLenum target, GLenum pname, GLfloat *params);
+GLAPI void APIENTRY emscripten_glGetConvolutionParameteriv (GLenum target, GLenum pname, GLint *params);
+GLAPI void APIENTRY emscripten_glGetSeparableFilter (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span);
+GLAPI void APIENTRY emscripten_glSeparableFilter2D (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column);
+GLAPI void APIENTRY emscripten_glGetHistogram (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
+GLAPI void APIENTRY emscripten_glGetHistogramParameterfv (GLenum target, GLenum pname, GLfloat *params);
+GLAPI void APIENTRY emscripten_glGetHistogramParameteriv (GLenum target, GLenum pname, GLint *params);
+GLAPI void APIENTRY emscripten_glGetMinmax (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
+GLAPI void APIENTRY emscripten_glGetMinmaxParameterfv (GLenum target, GLenum pname, GLfloat *params);
+GLAPI void APIENTRY emscripten_glGetMinmaxParameteriv (GLenum target, GLenum pname, GLint *params);
+GLAPI void APIENTRY emscripten_glHistogram (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
+GLAPI void APIENTRY emscripten_glMinmax (GLenum target, GLenum internalformat, GLboolean sink);
+GLAPI void APIENTRY emscripten_glResetHistogram (GLenum target);
+GLAPI void APIENTRY emscripten_glResetMinmax (GLenum target);
+
+
+GLAPI void APIENTRY emscripten_glActiveTexture (GLenum texture);
+GLAPI void APIENTRY emscripten_glSampleCoverage (GLclampf value, GLboolean invert);
+GLAPI void APIENTRY emscripten_glCompressedTexImage3D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data);
+GLAPI void APIENTRY emscripten_glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
+GLAPI void APIENTRY emscripten_glCompressedTexImage1D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data);
+GLAPI void APIENTRY emscripten_glCompressedTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data);
+GLAPI void APIENTRY emscripten_glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
+GLAPI void APIENTRY emscripten_glCompressedTexSubImage1D (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data);
+GLAPI void APIENTRY emscripten_glGetCompressedTexImage (GLenum target, GLint level, GLvoid *img);
+
+
+GLAPI void APIENTRY emscripten_glClientActiveTexture (GLenum texture);
+GLAPI void APIENTRY emscripten_glMultiTexCoord1d (GLenum target, GLdouble s);
+GLAPI void APIENTRY emscripten_glMultiTexCoord1dv (GLenum target, const GLdouble *v);
+GLAPI void APIENTRY emscripten_glMultiTexCoord1f (GLenum target, GLfloat s);
+GLAPI void APIENTRY emscripten_glMultiTexCoord1fv (GLenum target, const GLfloat *v);
+GLAPI void APIENTRY emscripten_glMultiTexCoord1i (GLenum target, GLint s);
+GLAPI void APIENTRY emscripten_glMultiTexCoord1iv (GLenum target, const GLint *v);
+GLAPI void APIENTRY emscripten_glMultiTexCoord1s (GLenum target, GLshort s);
+GLAPI void APIENTRY emscripten_glMultiTexCoord1sv (GLenum target, const GLshort *v);
+GLAPI void APIENTRY emscripten_glMultiTexCoord2d (GLenum target, GLdouble s, GLdouble t);
+GLAPI void APIENTRY emscripten_glMultiTexCoord2dv (GLenum target, const GLdouble *v);
+GLAPI void APIENTRY emscripten_glMultiTexCoord2f (GLenum target, GLfloat s, GLfloat t);
+GLAPI void APIENTRY emscripten_glMultiTexCoord2fv (GLenum target, const GLfloat *v);
+GLAPI void APIENTRY emscripten_glMultiTexCoord2i (GLenum target, GLint s, GLint t);
+GLAPI void APIENTRY emscripten_glMultiTexCoord2iv (GLenum target, const GLint *v);
+GLAPI void APIENTRY emscripten_glMultiTexCoord2s (GLenum target, GLshort s, GLshort t);
+GLAPI void APIENTRY emscripten_glMultiTexCoord2sv (GLenum target, const GLshort *v);
+GLAPI void APIENTRY emscripten_glMultiTexCoord3d (GLenum target, GLdouble s, GLdouble t, GLdouble r);
+GLAPI void APIENTRY emscripten_glMultiTexCoord3dv (GLenum target, const GLdouble *v);
+GLAPI void APIENTRY emscripten_glMultiTexCoord3f (GLenum target, GLfloat s, GLfloat t, GLfloat r);
+GLAPI void APIENTRY emscripten_glMultiTexCoord3fv (GLenum target, const GLfloat *v);
+GLAPI void APIENTRY emscripten_glMultiTexCoord3i (GLenum target, GLint s, GLint t, GLint r);
+GLAPI void APIENTRY emscripten_glMultiTexCoord3iv (GLenum target, const GLint *v);
+GLAPI void APIENTRY emscripten_glMultiTexCoord3s (GLenum target, GLshort s, GLshort t, GLshort r);
+GLAPI void APIENTRY emscripten_glMultiTexCoord3sv (GLenum target, const GLshort *v);
+GLAPI void APIENTRY emscripten_glMultiTexCoord4d (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
+GLAPI void APIENTRY emscripten_glMultiTexCoord4dv (GLenum target, const GLdouble *v);
+GLAPI void APIENTRY emscripten_glMultiTexCoord4f (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
+GLAPI void APIENTRY emscripten_glMultiTexCoord4fv (GLenum target, const GLfloat *v);
+GLAPI void APIENTRY emscripten_glMultiTexCoord4i (GLenum target, GLint s, GLint t, GLint r, GLint q);
+GLAPI void APIENTRY emscripten_glMultiTexCoord4iv (GLenum target, const GLint *v);
+GLAPI void APIENTRY emscripten_glMultiTexCoord4s (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
+GLAPI void APIENTRY emscripten_glMultiTexCoord4sv (GLenum target, const GLshort *v);
+GLAPI void APIENTRY emscripten_glLoadTransposeMatrixf (const GLfloat *m);
+GLAPI void APIENTRY emscripten_glLoadTransposeMatrixd (const GLdouble *m);
+GLAPI void APIENTRY emscripten_glMultTransposeMatrixf (const GLfloat *m);
+GLAPI void APIENTRY emscripten_glMultTransposeMatrixd (const GLdouble *m);
+
+
+GLAPI void APIENTRY emscripten_glBlendFuncSeparate (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
+GLAPI void APIENTRY emscripten_glMultiDrawArrays (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);
+GLAPI void APIENTRY emscripten_glMultiDrawElements (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount);
+GLAPI void APIENTRY emscripten_glPointParameterf (GLenum pname, GLfloat param);
+GLAPI void APIENTRY emscripten_glPointParameterfv (GLenum pname, const GLfloat *params);
+GLAPI void APIENTRY emscripten_glPointParameteri (GLenum pname, GLint param);
+GLAPI void APIENTRY emscripten_glPointParameteriv (GLenum pname, const GLint *params);
+
+
+GLAPI void APIENTRY emscripten_glFogCoordf (GLfloat coord);
+GLAPI void APIENTRY emscripten_glFogCoordfv (const GLfloat *coord);
+GLAPI void APIENTRY emscripten_glFogCoordd (GLdouble coord);
+GLAPI void APIENTRY emscripten_glFogCoorddv (const GLdouble *coord);
+GLAPI void APIENTRY emscripten_glFogCoordPointer (GLenum type, GLsizei stride, const GLvoid *pointer);
+GLAPI void APIENTRY emscripten_glSecondaryColor3b (GLbyte red, GLbyte green, GLbyte blue);
+GLAPI void APIENTRY emscripten_glSecondaryColor3bv (const GLbyte *v);
+GLAPI void APIENTRY emscripten_glSecondaryColor3d (GLdouble red, GLdouble green, GLdouble blue);
+GLAPI void APIENTRY emscripten_glSecondaryColor3dv (const GLdouble *v);
+GLAPI void APIENTRY emscripten_glSecondaryColor3f (GLfloat red, GLfloat green, GLfloat blue);
+GLAPI void APIENTRY emscripten_glSecondaryColor3fv (const GLfloat *v);
+GLAPI void APIENTRY emscripten_glSecondaryColor3i (GLint red, GLint green, GLint blue);
+GLAPI void APIENTRY emscripten_glSecondaryColor3iv (const GLint *v);
+GLAPI void APIENTRY emscripten_glSecondaryColor3s (GLshort red, GLshort green, GLshort blue);
+GLAPI void APIENTRY emscripten_glSecondaryColor3sv (const GLshort *v);
+GLAPI void APIENTRY emscripten_glSecondaryColor3ub (GLubyte red, GLubyte green, GLubyte blue);
+GLAPI void APIENTRY emscripten_glSecondaryColor3ubv (const GLubyte *v);
+GLAPI void APIENTRY emscripten_glSecondaryColor3ui (GLuint red, GLuint green, GLuint blue);
+GLAPI void APIENTRY emscripten_glSecondaryColor3uiv (const GLuint *v);
+GLAPI void APIENTRY emscripten_glSecondaryColor3us (GLushort red, GLushort green, GLushort blue);
+GLAPI void APIENTRY emscripten_glSecondaryColor3usv (const GLushort *v);
+GLAPI void APIENTRY emscripten_glSecondaryColorPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+GLAPI void APIENTRY emscripten_glWindowPos2d (GLdouble x, GLdouble y);
+GLAPI void APIENTRY emscripten_glWindowPos2dv (const GLdouble *v);
+GLAPI void APIENTRY emscripten_glWindowPos2f (GLfloat x, GLfloat y);
+GLAPI void APIENTRY emscripten_glWindowPos2fv (const GLfloat *v);
+GLAPI void APIENTRY emscripten_glWindowPos2i (GLint x, GLint y);
+GLAPI void APIENTRY emscripten_glWindowPos2iv (const GLint *v);
+GLAPI void APIENTRY emscripten_glWindowPos2s (GLshort x, GLshort y);
+GLAPI void APIENTRY emscripten_glWindowPos2sv (const GLshort *v);
+GLAPI void APIENTRY emscripten_glWindowPos3d (GLdouble x, GLdouble y, GLdouble z);
+GLAPI void APIENTRY emscripten_glWindowPos3dv (const GLdouble *v);
+GLAPI void APIENTRY emscripten_glWindowPos3f (GLfloat x, GLfloat y, GLfloat z);
+GLAPI void APIENTRY emscripten_glWindowPos3fv (const GLfloat *v);
+GLAPI void APIENTRY emscripten_glWindowPos3i (GLint x, GLint y, GLint z);
+GLAPI void APIENTRY emscripten_glWindowPos3iv (const GLint *v);
+GLAPI void APIENTRY emscripten_glWindowPos3s (GLshort x, GLshort y, GLshort z);
+GLAPI void APIENTRY emscripten_glWindowPos3sv (const GLshort *v);
+
+
+GLAPI void APIENTRY emscripten_glGenQueries (GLsizei n, GLuint *ids);
+GLAPI void APIENTRY emscripten_glDeleteQueries (GLsizei n, const GLuint *ids);
+GLAPI GLboolean APIENTRY emscripten_glIsQuery (GLuint id);
+GLAPI void APIENTRY emscripten_glBeginQuery (GLenum target, GLuint id);
+GLAPI void APIENTRY emscripten_glEndQuery (GLenum target);
+GLAPI void APIENTRY emscripten_glGetQueryiv (GLenum target, GLenum pname, GLint *params);
+GLAPI void APIENTRY emscripten_glGetQueryObjectiv (GLuint id, GLenum pname, GLint *params);
+GLAPI void APIENTRY emscripten_glGetQueryObjectuiv (GLuint id, GLenum pname, GLuint *params);
+GLAPI void APIENTRY emscripten_glBindBuffer (GLenum target, GLuint buffer);
+GLAPI void APIENTRY emscripten_glDeleteBuffers (GLsizei n, const GLuint *buffers);
+GLAPI void APIENTRY emscripten_glGenBuffers (GLsizei n, GLuint *buffers);
+GLAPI GLboolean APIENTRY emscripten_glIsBuffer (GLuint buffer);
+GLAPI void APIENTRY emscripten_glBufferData (GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage);
+GLAPI void APIENTRY emscripten_glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data);
+GLAPI void APIENTRY emscripten_glGetBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, GLvoid *data);
+GLAPI GLvoid* APIENTRY emscripten_glMapBuffer (GLenum target, GLenum access);
+GLAPI GLboolean APIENTRY emscripten_glUnmapBuffer (GLenum target);
+GLAPI void APIENTRY emscripten_glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params);
+GLAPI void APIENTRY emscripten_glGetBufferPointerv (GLenum target, GLenum pname, GLvoid* *params);
+
+
+GLAPI void APIENTRY emscripten_glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha);
+GLAPI void APIENTRY emscripten_glDrawBuffers (GLsizei n, const GLenum *bufs);
+GLAPI void APIENTRY emscripten_glStencilOpSeparate (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
+GLAPI void APIENTRY emscripten_glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask);
+GLAPI void APIENTRY emscripten_glStencilMaskSeparate (GLenum face, GLuint mask);
+GLAPI void APIENTRY emscripten_glAttachShader (GLuint program, GLuint shader);
+GLAPI void APIENTRY emscripten_glBindAttribLocation (GLuint program, GLuint index, const GLchar *name);
+GLAPI void APIENTRY emscripten_glCompileShader (GLuint shader);
+GLAPI GLuint APIENTRY emscripten_glCreateProgram (void);
+GLAPI GLuint APIENTRY emscripten_glCreateShader (GLenum type);
+GLAPI void APIENTRY emscripten_glDeleteProgram (GLuint program);
+GLAPI void APIENTRY emscripten_glDeleteShader (GLuint shader);
+GLAPI void APIENTRY emscripten_glDetachShader (GLuint program, GLuint shader);
+GLAPI void APIENTRY emscripten_glDisableVertexAttribArray (GLuint index);
+GLAPI void APIENTRY emscripten_glEnableVertexAttribArray (GLuint index);
+GLAPI void APIENTRY emscripten_glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
+GLAPI void APIENTRY emscripten_glGetActiveUniform (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
+GLAPI void APIENTRY emscripten_glGetAttachedShaders (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *obj);
+GLAPI GLint APIENTRY emscripten_glGetAttribLocation (GLuint program, const GLchar *name);
+GLAPI void APIENTRY emscripten_glGetProgramiv (GLuint program, GLenum pname, GLint *params);
+GLAPI void APIENTRY emscripten_glGetProgramInfoLog (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
+GLAPI void APIENTRY emscripten_glGetShaderiv (GLuint shader, GLenum pname, GLint *params);
+GLAPI void APIENTRY emscripten_glGetShaderInfoLog (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
+GLAPI void APIENTRY emscripten_glGetShaderSource (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source);
+GLAPI GLint APIENTRY emscripten_glGetUniformLocation (GLuint program, const GLchar *name);
+GLAPI void APIENTRY emscripten_glGetUniformfv (GLuint program, GLint location, GLfloat *params);
+GLAPI void APIENTRY emscripten_glGetUniformiv (GLuint program, GLint location, GLint *params);
+GLAPI void APIENTRY emscripten_glGetVertexAttribdv (GLuint index, GLenum pname, GLdouble *params);
+GLAPI void APIENTRY emscripten_glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat *params);
+GLAPI void APIENTRY emscripten_glGetVertexAttribiv (GLuint index, GLenum pname, GLint *params);
+GLAPI void APIENTRY emscripten_glGetVertexAttribPointerv (GLuint index, GLenum pname, GLvoid* *pointer);
+GLAPI GLboolean APIENTRY emscripten_glIsProgram (GLuint program);
+GLAPI GLboolean APIENTRY emscripten_glIsShader (GLuint shader);
+GLAPI void APIENTRY emscripten_glLinkProgram (GLuint program);
+GLAPI void APIENTRY emscripten_glShaderSource (GLuint shader, GLsizei count, const GLchar* *string, const GLint *length);
+GLAPI void APIENTRY emscripten_glUseProgram (GLuint program);
+GLAPI void APIENTRY emscripten_glUniform1f (GLint location, GLfloat v0);
+GLAPI void APIENTRY emscripten_glUniform2f (GLint location, GLfloat v0, GLfloat v1);
+GLAPI void APIENTRY emscripten_glUniform3f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
+GLAPI void APIENTRY emscripten_glUniform4f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
+GLAPI void APIENTRY emscripten_glUniform1i (GLint location, GLint v0);
+GLAPI void APIENTRY emscripten_glUniform2i (GLint location, GLint v0, GLint v1);
+GLAPI void APIENTRY emscripten_glUniform3i (GLint location, GLint v0, GLint v1, GLint v2);
+GLAPI void APIENTRY emscripten_glUniform4i (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
+GLAPI void APIENTRY emscripten_glUniform1fv (GLint location, GLsizei count, const GLfloat *value);
+GLAPI void APIENTRY emscripten_glUniform2fv (GLint location, GLsizei count, const GLfloat *value);
+GLAPI void APIENTRY emscripten_glUniform3fv (GLint location, GLsizei count, const GLfloat *value);
+GLAPI void APIENTRY emscripten_glUniform4fv (GLint location, GLsizei count, const GLfloat *value);
+GLAPI void APIENTRY emscripten_glUniform1iv (GLint location, GLsizei count, const GLint *value);
+GLAPI void APIENTRY emscripten_glUniform2iv (GLint location, GLsizei count, const GLint *value);
+GLAPI void APIENTRY emscripten_glUniform3iv (GLint location, GLsizei count, const GLint *value);
+GLAPI void APIENTRY emscripten_glUniform4iv (GLint location, GLsizei count, const GLint *value);
+GLAPI void APIENTRY emscripten_glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GLAPI void APIENTRY emscripten_glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GLAPI void APIENTRY emscripten_glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GLAPI void APIENTRY emscripten_glValidateProgram (GLuint program);
+GLAPI void APIENTRY emscripten_glVertexAttrib1d (GLuint index, GLdouble x);
+GLAPI void APIENTRY emscripten_glVertexAttrib1dv (GLuint index, const GLdouble *v);
+GLAPI void APIENTRY emscripten_glVertexAttrib1f (GLuint index, GLfloat x);
+GLAPI void APIENTRY emscripten_glVertexAttrib1fv (GLuint index, const GLfloat *v);
+GLAPI void APIENTRY emscripten_glVertexAttrib1s (GLuint index, GLshort x);
+GLAPI void APIENTRY emscripten_glVertexAttrib1sv (GLuint index, const GLshort *v);
+GLAPI void APIENTRY emscripten_glVertexAttrib2d (GLuint index, GLdouble x, GLdouble y);
+GLAPI void APIENTRY emscripten_glVertexAttrib2dv (GLuint index, const GLdouble *v);
+GLAPI void APIENTRY emscripten_glVertexAttrib2f (GLuint index, GLfloat x, GLfloat y);
+GLAPI void APIENTRY emscripten_glVertexAttrib2fv (GLuint index, const GLfloat *v);
+GLAPI void APIENTRY emscripten_glVertexAttrib2s (GLuint index, GLshort x, GLshort y);
+GLAPI void APIENTRY emscripten_glVertexAttrib2sv (GLuint index, const GLshort *v);
+GLAPI void APIENTRY emscripten_glVertexAttrib3d (GLuint index, GLdouble x, GLdouble y, GLdouble z);
+GLAPI void APIENTRY emscripten_glVertexAttrib3dv (GLuint index, const GLdouble *v);
+GLAPI void APIENTRY emscripten_glVertexAttrib3f (GLuint index, GLfloat x, GLfloat y, GLfloat z);
+GLAPI void APIENTRY emscripten_glVertexAttrib3fv (GLuint index, const GLfloat *v);
+GLAPI void APIENTRY emscripten_glVertexAttrib3s (GLuint index, GLshort x, GLshort y, GLshort z);
+GLAPI void APIENTRY emscripten_glVertexAttrib3sv (GLuint index, const GLshort *v);
+GLAPI void APIENTRY emscripten_glVertexAttrib4Nbv (GLuint index, const GLbyte *v);
+GLAPI void APIENTRY emscripten_glVertexAttrib4Niv (GLuint index, const GLint *v);
+GLAPI void APIENTRY emscripten_glVertexAttrib4Nsv (GLuint index, const GLshort *v);
+GLAPI void APIENTRY emscripten_glVertexAttrib4Nub (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
+GLAPI void APIENTRY emscripten_glVertexAttrib4Nubv (GLuint index, const GLubyte *v);
+GLAPI void APIENTRY emscripten_glVertexAttrib4Nuiv (GLuint index, const GLuint *v);
+GLAPI void APIENTRY emscripten_glVertexAttrib4Nusv (GLuint index, const GLushort *v);
+GLAPI void APIENTRY emscripten_glVertexAttrib4bv (GLuint index, const GLbyte *v);
+GLAPI void APIENTRY emscripten_glVertexAttrib4d (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+GLAPI void APIENTRY emscripten_glVertexAttrib4dv (GLuint index, const GLdouble *v);
+GLAPI void APIENTRY emscripten_glVertexAttrib4f (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+GLAPI void APIENTRY emscripten_glVertexAttrib4fv (GLuint index, const GLfloat *v);
+GLAPI void APIENTRY emscripten_glVertexAttrib4iv (GLuint index, const GLint *v);
+GLAPI void APIENTRY emscripten_glVertexAttrib4s (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
+GLAPI void APIENTRY emscripten_glVertexAttrib4sv (GLuint index, const GLshort *v);
+GLAPI void APIENTRY emscripten_glVertexAttrib4ubv (GLuint index, const GLubyte *v);
+GLAPI void APIENTRY emscripten_glVertexAttrib4uiv (GLuint index, const GLuint *v);
+GLAPI void APIENTRY emscripten_glVertexAttrib4usv (GLuint index, const GLushort *v);
+GLAPI void APIENTRY emscripten_glVertexAttribPointer (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer);
+
+
+GLAPI void APIENTRY emscripten_glUniformMatrix2x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GLAPI void APIENTRY emscripten_glUniformMatrix3x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GLAPI void APIENTRY emscripten_glUniformMatrix2x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GLAPI void APIENTRY emscripten_glUniformMatrix4x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GLAPI void APIENTRY emscripten_glUniformMatrix3x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GLAPI void APIENTRY emscripten_glUniformMatrix4x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+
+
+GLAPI void APIENTRY emscripten_glColorMaski (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
+GLAPI void APIENTRY emscripten_glGetBooleani_v (GLenum target, GLuint index, GLboolean *data);
+GLAPI void APIENTRY emscripten_glGetIntegeri_v (GLenum target, GLuint index, GLint *data);
+GLAPI void APIENTRY emscripten_glEnablei (GLenum target, GLuint index);
+GLAPI void APIENTRY emscripten_glDisablei (GLenum target, GLuint index);
+GLAPI GLboolean APIENTRY emscripten_glIsEnabledi (GLenum target, GLuint index);
+GLAPI void APIENTRY emscripten_glBeginTransformFeedback (GLenum primitiveMode);
+GLAPI void APIENTRY emscripten_glEndTransformFeedback (void);
+GLAPI void APIENTRY emscripten_glBindBufferRange (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
+GLAPI void APIENTRY emscripten_glBindBufferBase (GLenum target, GLuint index, GLuint buffer);
+GLAPI void APIENTRY emscripten_glTransformFeedbackVaryings (GLuint program, GLsizei count, const GLchar* *varyings, GLenum bufferMode);
+GLAPI void APIENTRY emscripten_glGetTransformFeedbackVarying (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
+GLAPI void APIENTRY emscripten_glClampColor (GLenum target, GLenum clamp);
+GLAPI void APIENTRY emscripten_glBeginConditionalRender (GLuint id, GLenum mode);
+GLAPI void APIENTRY emscripten_glEndConditionalRender (void);
+GLAPI void APIENTRY emscripten_glVertexAttribIPointer (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+GLAPI void APIENTRY emscripten_glGetVertexAttribIiv (GLuint index, GLenum pname, GLint *params);
+GLAPI void APIENTRY emscripten_glGetVertexAttribIuiv (GLuint index, GLenum pname, GLuint *params);
+GLAPI void APIENTRY emscripten_glVertexAttribI1i (GLuint index, GLint x);
+GLAPI void APIENTRY emscripten_glVertexAttribI2i (GLuint index, GLint x, GLint y);
+GLAPI void APIENTRY emscripten_glVertexAttribI3i (GLuint index, GLint x, GLint y, GLint z);
+GLAPI void APIENTRY emscripten_glVertexAttribI4i (GLuint index, GLint x, GLint y, GLint z, GLint w);
+GLAPI void APIENTRY emscripten_glVertexAttribI1ui (GLuint index, GLuint x);
+GLAPI void APIENTRY emscripten_glVertexAttribI2ui (GLuint index, GLuint x, GLuint y);
+GLAPI void APIENTRY emscripten_glVertexAttribI3ui (GLuint index, GLuint x, GLuint y, GLuint z);
+GLAPI void APIENTRY emscripten_glVertexAttribI4ui (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
+GLAPI void APIENTRY emscripten_glVertexAttribI1iv (GLuint index, const GLint *v);
+GLAPI void APIENTRY emscripten_glVertexAttribI2iv (GLuint index, const GLint *v);
+GLAPI void APIENTRY emscripten_glVertexAttribI3iv (GLuint index, const GLint *v);
+GLAPI void APIENTRY emscripten_glVertexAttribI4iv (GLuint index, const GLint *v);
+GLAPI void APIENTRY emscripten_glVertexAttribI1uiv (GLuint index, const GLuint *v);
+GLAPI void APIENTRY emscripten_glVertexAttribI2uiv (GLuint index, const GLuint *v);
+GLAPI void APIENTRY emscripten_glVertexAttribI3uiv (GLuint index, const GLuint *v);
+GLAPI void APIENTRY emscripten_glVertexAttribI4uiv (GLuint index, const GLuint *v);
+GLAPI void APIENTRY emscripten_glVertexAttribI4bv (GLuint index, const GLbyte *v);
+GLAPI void APIENTRY emscripten_glVertexAttribI4sv (GLuint index, const GLshort *v);
+GLAPI void APIENTRY emscripten_glVertexAttribI4ubv (GLuint index, const GLubyte *v);
+GLAPI void APIENTRY emscripten_glVertexAttribI4usv (GLuint index, const GLushort *v);
+GLAPI void APIENTRY emscripten_glGetUniformuiv (GLuint program, GLint location, GLuint *params);
+GLAPI void APIENTRY emscripten_glBindFragDataLocation (GLuint program, GLuint color, const GLchar *name);
+GLAPI GLint APIENTRY emscripten_glGetFragDataLocation (GLuint program, const GLchar *name);
+GLAPI void APIENTRY emscripten_glUniform1ui (GLint location, GLuint v0);
+GLAPI void APIENTRY emscripten_glUniform2ui (GLint location, GLuint v0, GLuint v1);
+GLAPI void APIENTRY emscripten_glUniform3ui (GLint location, GLuint v0, GLuint v1, GLuint v2);
+GLAPI void APIENTRY emscripten_glUniform4ui (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
+GLAPI void APIENTRY emscripten_glUniform1uiv (GLint location, GLsizei count, const GLuint *value);
+GLAPI void APIENTRY emscripten_glUniform2uiv (GLint location, GLsizei count, const GLuint *value);
+GLAPI void APIENTRY emscripten_glUniform3uiv (GLint location, GLsizei count, const GLuint *value);
+GLAPI void APIENTRY emscripten_glUniform4uiv (GLint location, GLsizei count, const GLuint *value);
+GLAPI void APIENTRY emscripten_glTexParameterIiv (GLenum target, GLenum pname, const GLint *params);
+GLAPI void APIENTRY emscripten_glTexParameterIuiv (GLenum target, GLenum pname, const GLuint *params);
+GLAPI void APIENTRY emscripten_glGetTexParameterIiv (GLenum target, GLenum pname, GLint *params);
+GLAPI void APIENTRY emscripten_glGetTexParameterIuiv (GLenum target, GLenum pname, GLuint *params);
+GLAPI void APIENTRY emscripten_glClearBufferiv (GLenum buffer, GLint drawbuffer, const GLint *value);
+GLAPI void APIENTRY emscripten_glClearBufferuiv (GLenum buffer, GLint drawbuffer, const GLuint *value);
+GLAPI void APIENTRY emscripten_glClearBufferfv (GLenum buffer, GLint drawbuffer, const GLfloat *value);
+GLAPI void APIENTRY emscripten_glClearBufferfi (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil);
+
+
+GLAPI void APIENTRY emscripten_glDrawArraysInstanced (GLenum mode, GLint first, GLsizei count, GLsizei primcount);
+GLAPI void APIENTRY emscripten_glDrawElementsInstanced (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount);
+GLAPI void APIENTRY emscripten_glTexBuffer (GLenum target, GLenum internalformat, GLuint buffer);
+GLAPI void APIENTRY emscripten_glPrimitiveRestartIndex (GLuint index);
+
+
+GLAPI void APIENTRY emscripten_glActiveTextureARB (GLenum texture);
+GLAPI void APIENTRY emscripten_glClientActiveTextureARB (GLenum texture);
+GLAPI void APIENTRY emscripten_glMultiTexCoord1dARB (GLenum target, GLdouble s);
+GLAPI void APIENTRY emscripten_glMultiTexCoord1dvARB (GLenum target, const GLdouble *v);
+GLAPI void APIENTRY emscripten_glMultiTexCoord1fARB (GLenum target, GLfloat s);
+GLAPI void APIENTRY emscripten_glMultiTexCoord1fvARB (GLenum target, const GLfloat *v);
+GLAPI void APIENTRY emscripten_glMultiTexCoord1iARB (GLenum target, GLint s);
+GLAPI void APIENTRY emscripten_glMultiTexCoord1ivARB (GLenum target, const GLint *v);
+GLAPI void APIENTRY emscripten_glMultiTexCoord1sARB (GLenum target, GLshort s);
+GLAPI void APIENTRY emscripten_glMultiTexCoord1svARB (GLenum target, const GLshort *v);
+GLAPI void APIENTRY emscripten_glMultiTexCoord2dARB (GLenum target, GLdouble s, GLdouble t);
+GLAPI void APIENTRY emscripten_glMultiTexCoord2dvARB (GLenum target, const GLdouble *v);
+GLAPI void APIENTRY emscripten_glMultiTexCoord2fARB (GLenum target, GLfloat s, GLfloat t);
+GLAPI void APIENTRY emscripten_glMultiTexCoord2fvARB (GLenum target, const GLfloat *v);
+GLAPI void APIENTRY emscripten_glMultiTexCoord2iARB (GLenum target, GLint s, GLint t);
+GLAPI void APIENTRY emscripten_glMultiTexCoord2ivARB (GLenum target, const GLint *v);
+GLAPI void APIENTRY emscripten_glMultiTexCoord2sARB (GLenum target, GLshort s, GLshort t);
+GLAPI void APIENTRY emscripten_glMultiTexCoord2svARB (GLenum target, const GLshort *v);
+GLAPI void APIENTRY emscripten_glMultiTexCoord3dARB (GLenum target, GLdouble s, GLdouble t, GLdouble r);
+GLAPI void APIENTRY emscripten_glMultiTexCoord3dvARB (GLenum target, const GLdouble *v);
+GLAPI void APIENTRY emscripten_glMultiTexCoord3fARB (GLenum target, GLfloat s, GLfloat t, GLfloat r);
+GLAPI void APIENTRY emscripten_glMultiTexCoord3fvARB (GLenum target, const GLfloat *v);
+GLAPI void APIENTRY emscripten_glMultiTexCoord3iARB (GLenum target, GLint s, GLint t, GLint r);
+GLAPI void APIENTRY emscripten_glMultiTexCoord3ivARB (GLenum target, const GLint *v);
+GLAPI void APIENTRY emscripten_glMultiTexCoord3sARB (GLenum target, GLshort s, GLshort t, GLshort r);
+GLAPI void APIENTRY emscripten_glMultiTexCoord3svARB (GLenum target, const GLshort *v);
+GLAPI void APIENTRY emscripten_glMultiTexCoord4dARB (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
+GLAPI void APIENTRY emscripten_glMultiTexCoord4dvARB (GLenum target, const GLdouble *v);
+GLAPI void APIENTRY emscripten_glMultiTexCoord4fARB (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
+GLAPI void APIENTRY emscripten_glMultiTexCoord4fvARB (GLenum target, const GLfloat *v);
+GLAPI void APIENTRY emscripten_glMultiTexCoord4iARB (GLenum target, GLint s, GLint t, GLint r, GLint q);
+GLAPI void APIENTRY emscripten_glMultiTexCoord4ivARB (GLenum target, const GLint *v);
+GLAPI void APIENTRY emscripten_glMultiTexCoord4sARB (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
+GLAPI void APIENTRY emscripten_glMultiTexCoord4svARB (GLenum target, const GLshort *v);
+
+
+GLAPI void APIENTRY emscripten_glLoadTransposeMatrixfARB (const GLfloat *m);
+GLAPI void APIENTRY emscripten_glLoadTransposeMatrixdARB (const GLdouble *m);
+GLAPI void APIENTRY emscripten_glMultTransposeMatrixfARB (const GLfloat *m);
+GLAPI void APIENTRY emscripten_glMultTransposeMatrixdARB (const GLdouble *m);
+
+
+GLAPI void APIENTRY emscripten_glCompressedTexImage3DARB (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data);
+GLAPI void APIENTRY emscripten_glCompressedTexImage2DARB (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
+GLAPI void APIENTRY emscripten_glCompressedTexImage1DARB (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data);
+GLAPI void APIENTRY emscripten_glCompressedTexSubImage3DARB (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data);
+GLAPI void APIENTRY emscripten_glCompressedTexSubImage2DARB (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
+GLAPI void APIENTRY emscripten_glCompressedTexSubImage1DARB (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data);
+GLAPI void APIENTRY emscripten_glGetCompressedTexImageARB (GLenum target, GLint level, GLvoid *img);
+
+
+GLAPI void APIENTRY emscripten_glVertexAttrib1dARB (GLuint index, GLdouble x);
+GLAPI void APIENTRY emscripten_glVertexAttrib1dvARB (GLuint index, const GLdouble *v);
+GLAPI void APIENTRY emscripten_glVertexAttrib1fARB (GLuint index, GLfloat x);
+GLAPI void APIENTRY emscripten_glVertexAttrib1fvARB (GLuint index, const GLfloat *v);
+GLAPI void APIENTRY emscripten_glVertexAttrib1sARB (GLuint index, GLshort x);
+GLAPI void APIENTRY emscripten_glVertexAttrib1svARB (GLuint index, const GLshort *v);
+GLAPI void APIENTRY emscripten_glVertexAttrib2dARB (GLuint index, GLdouble x, GLdouble y);
+GLAPI void APIENTRY emscripten_glVertexAttrib2dvARB (GLuint index, const GLdouble *v);
+GLAPI void APIENTRY emscripten_glVertexAttrib2fARB (GLuint index, GLfloat x, GLfloat y);
+GLAPI void APIENTRY emscripten_glVertexAttrib2fvARB (GLuint index, const GLfloat *v);
+GLAPI void APIENTRY emscripten_glVertexAttrib2sARB (GLuint index, GLshort x, GLshort y);
+GLAPI void APIENTRY emscripten_glVertexAttrib2svARB (GLuint index, const GLshort *v);
+GLAPI void APIENTRY emscripten_glVertexAttrib3dARB (GLuint index, GLdouble x, GLdouble y, GLdouble z);
+GLAPI void APIENTRY emscripten_glVertexAttrib3dvARB (GLuint index, const GLdouble *v);
+GLAPI void APIENTRY emscripten_glVertexAttrib3fARB (GLuint index, GLfloat x, GLfloat y, GLfloat z);
+GLAPI void APIENTRY emscripten_glVertexAttrib3fvARB (GLuint index, const GLfloat *v);
+GLAPI void APIENTRY emscripten_glVertexAttrib3sARB (GLuint index, GLshort x, GLshort y, GLshort z);
+GLAPI void APIENTRY emscripten_glVertexAttrib3svARB (GLuint index, const GLshort *v);
+GLAPI void APIENTRY emscripten_glVertexAttrib4NbvARB (GLuint index, const GLbyte *v);
+GLAPI void APIENTRY emscripten_glVertexAttrib4NivARB (GLuint index, const GLint *v);
+GLAPI void APIENTRY emscripten_glVertexAttrib4NsvARB (GLuint index, const GLshort *v);
+GLAPI void APIENTRY emscripten_glVertexAttrib4NubARB (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
+GLAPI void APIENTRY emscripten_glVertexAttrib4NubvARB (GLuint index, const GLubyte *v);
+GLAPI void APIENTRY emscripten_glVertexAttrib4NuivARB (GLuint index, const GLuint *v);
+GLAPI void APIENTRY emscripten_glVertexAttrib4NusvARB (GLuint index, const GLushort *v);
+GLAPI void APIENTRY emscripten_glVertexAttrib4bvARB (GLuint index, const GLbyte *v);
+GLAPI void APIENTRY emscripten_glVertexAttrib4dARB (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+GLAPI void APIENTRY emscripten_glVertexAttrib4dvARB (GLuint index, const GLdouble *v);
+GLAPI void APIENTRY emscripten_glVertexAttrib4fARB (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+GLAPI void APIENTRY emscripten_glVertexAttrib4fvARB (GLuint index, const GLfloat *v);
+GLAPI void APIENTRY emscripten_glVertexAttrib4ivARB (GLuint index, const GLint *v);
+GLAPI void APIENTRY emscripten_glVertexAttrib4sARB (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
+GLAPI void APIENTRY emscripten_glVertexAttrib4svARB (GLuint index, const GLshort *v);
+GLAPI void APIENTRY emscripten_glVertexAttrib4ubvARB (GLuint index, const GLubyte *v);
+GLAPI void APIENTRY emscripten_glVertexAttrib4uivARB (GLuint index, const GLuint *v);
+GLAPI void APIENTRY emscripten_glVertexAttrib4usvARB (GLuint index, const GLushort *v);
+GLAPI void APIENTRY emscripten_glVertexAttribPointerARB (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer);
+GLAPI void APIENTRY emscripten_glEnableVertexAttribArrayARB (GLuint index);
+GLAPI void APIENTRY emscripten_glDisableVertexAttribArrayARB (GLuint index);
+GLAPI void APIENTRY emscripten_glProgramStringARB (GLenum target, GLenum format, GLsizei len, const GLvoid *string);
+GLAPI void APIENTRY emscripten_glBindProgramARB (GLenum target, GLuint program);
+GLAPI void APIENTRY emscripten_glDeleteProgramsARB (GLsizei n, const GLuint *programs);
+GLAPI void APIENTRY emscripten_glGenProgramsARB (GLsizei n, GLuint *programs);
+GLAPI void APIENTRY emscripten_glProgramEnvParameter4dARB (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+GLAPI void APIENTRY emscripten_glProgramEnvParameter4dvARB (GLenum target, GLuint index, const GLdouble *params);
+GLAPI void APIENTRY emscripten_glProgramEnvParameter4fARB (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+GLAPI void APIENTRY emscripten_glProgramEnvParameter4fvARB (GLenum target, GLuint index, const GLfloat *params);
+GLAPI void APIENTRY emscripten_glProgramLocalParameter4dARB (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+GLAPI void APIENTRY emscripten_glProgramLocalParameter4dvARB (GLenum target, GLuint index, const GLdouble *params);
+GLAPI void APIENTRY emscripten_glProgramLocalParameter4fARB (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+GLAPI void APIENTRY emscripten_glProgramLocalParameter4fvARB (GLenum target, GLuint index, const GLfloat *params);
+GLAPI void APIENTRY emscripten_glGetProgramEnvParameterdvARB (GLenum target, GLuint index, GLdouble *params);
+GLAPI void APIENTRY emscripten_glGetProgramEnvParameterfvARB (GLenum target, GLuint index, GLfloat *params);
+GLAPI void APIENTRY emscripten_glGetProgramLocalParameterdvARB (GLenum target, GLuint index, GLdouble *params);
+GLAPI void APIENTRY emscripten_glGetProgramLocalParameterfvARB (GLenum target, GLuint index, GLfloat *params);
+GLAPI void APIENTRY emscripten_glGetProgramivARB (GLenum target, GLenum pname, GLint *params);
+GLAPI void APIENTRY emscripten_glGetProgramStringARB (GLenum target, GLenum pname, GLvoid *string);
+GLAPI void APIENTRY emscripten_glGetVertexAttribdvARB (GLuint index, GLenum pname, GLdouble *params);
+GLAPI void APIENTRY emscripten_glGetVertexAttribfvARB (GLuint index, GLenum pname, GLfloat *params);
+GLAPI void APIENTRY emscripten_glGetVertexAttribivARB (GLuint index, GLenum pname, GLint *params);
+GLAPI void APIENTRY emscripten_glGetVertexAttribPointervARB (GLuint index, GLenum pname, GLvoid* *pointer);
+GLAPI GLboolean APIENTRY emscripten_glIsProgramARB (GLuint program);
+
+
+GLAPI void APIENTRY emscripten_glBindBufferARB (GLenum target, GLuint buffer);
+GLAPI void APIENTRY emscripten_glDeleteBuffersARB (GLsizei n, const GLuint *buffers);
+GLAPI void APIENTRY emscripten_glGenBuffersARB (GLsizei n, GLuint *buffers);
+GLAPI GLboolean APIENTRY emscripten_glIsBufferARB (GLuint buffer);
+GLAPI void APIENTRY emscripten_glBufferDataARB (GLenum target, GLsizeiptrARB size, const GLvoid *data, GLenum usage);
+GLAPI void APIENTRY emscripten_glBufferSubDataARB (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid *data);
+GLAPI void APIENTRY emscripten_glGetBufferSubDataARB (GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid *data);
+GLAPI GLvoid* APIENTRY emscripten_glMapBufferARB (GLenum target, GLenum access);
+GLAPI GLboolean APIENTRY emscripten_glUnmapBufferARB (GLenum target);
+GLAPI void APIENTRY emscripten_glGetBufferParameterivARB (GLenum target, GLenum pname, GLint *params);
+GLAPI void APIENTRY emscripten_glGetBufferPointervARB (GLenum target, GLenum pname, GLvoid* *params);
+
+
+GLAPI void APIENTRY emscripten_glGenQueriesARB (GLsizei n, GLuint *ids);
+GLAPI void APIENTRY emscripten_glDeleteQueriesARB (GLsizei n, const GLuint *ids);
+GLAPI GLboolean APIENTRY emscripten_glIsQueryARB (GLuint id);
+GLAPI void APIENTRY emscripten_glBeginQueryARB (GLenum target, GLuint id);
+GLAPI void APIENTRY emscripten_glEndQueryARB (GLenum target);
+GLAPI void APIENTRY emscripten_glGetQueryivARB (GLenum target, GLenum pname, GLint *params);
+GLAPI void APIENTRY emscripten_glGetQueryObjectivARB (GLuint id, GLenum pname, GLint *params);
+GLAPI void APIENTRY emscripten_glGetQueryObjectuivARB (GLuint id, GLenum pname, GLuint *params);
+
+
+GLAPI void APIENTRY emscripten_glDeleteObjectARB (GLhandleARB obj);
+GLAPI GLhandleARB APIENTRY emscripten_glGetHandleARB (GLenum pname);
+GLAPI void APIENTRY emscripten_glDetachObjectARB (GLhandleARB containerObj, GLhandleARB attachedObj);
+GLAPI GLhandleARB APIENTRY emscripten_glCreateShaderObjectARB (GLenum shaderType);
+GLAPI void APIENTRY emscripten_glShaderSourceARB (GLhandleARB shaderObj, GLsizei count, const GLcharARB* *string, const GLint *length);
+GLAPI void APIENTRY emscripten_glCompileShaderARB (GLhandleARB shaderObj);
+GLAPI GLhandleARB APIENTRY emscripten_glCreateProgramObjectARB (void);
+GLAPI void APIENTRY emscripten_glAttachObjectARB (GLhandleARB containerObj, GLhandleARB obj);
+GLAPI void APIENTRY emscripten_glLinkProgramARB (GLhandleARB programObj);
+GLAPI void APIENTRY emscripten_glUseProgramObjectARB (GLhandleARB programObj);
+GLAPI void APIENTRY emscripten_glValidateProgramARB (GLhandleARB programObj);
+GLAPI void APIENTRY emscripten_glUniform1fARB (GLint location, GLfloat v0);
+GLAPI void APIENTRY emscripten_glUniform2fARB (GLint location, GLfloat v0, GLfloat v1);
+GLAPI void APIENTRY emscripten_glUniform3fARB (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
+GLAPI void APIENTRY emscripten_glUniform4fARB (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
+GLAPI void APIENTRY emscripten_glUniform1iARB (GLint location, GLint v0);
+GLAPI void APIENTRY emscripten_glUniform2iARB (GLint location, GLint v0, GLint v1);
+GLAPI void APIENTRY emscripten_glUniform3iARB (GLint location, GLint v0, GLint v1, GLint v2);
+GLAPI void APIENTRY emscripten_glUniform4iARB (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
+GLAPI void APIENTRY emscripten_glUniform1fvARB (GLint location, GLsizei count, const GLfloat *value);
+GLAPI void APIENTRY emscripten_glUniform2fvARB (GLint location, GLsizei count, const GLfloat *value);
+GLAPI void APIENTRY emscripten_glUniform3fvARB (GLint location, GLsizei count, const GLfloat *value);
+GLAPI void APIENTRY emscripten_glUniform4fvARB (GLint location, GLsizei count, const GLfloat *value);
+GLAPI void APIENTRY emscripten_glUniform1ivARB (GLint location, GLsizei count, const GLint *value);
+GLAPI void APIENTRY emscripten_glUniform2ivARB (GLint location, GLsizei count, const GLint *value);
+GLAPI void APIENTRY emscripten_glUniform3ivARB (GLint location, GLsizei count, const GLint *value);
+GLAPI void APIENTRY emscripten_glUniform4ivARB (GLint location, GLsizei count, const GLint *value);
+GLAPI void APIENTRY emscripten_glUniformMatrix2fvARB (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GLAPI void APIENTRY emscripten_glUniformMatrix3fvARB (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GLAPI void APIENTRY emscripten_glUniformMatrix4fvARB (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GLAPI void APIENTRY emscripten_glGetObjectParameterfvARB (GLhandleARB obj, GLenum pname, GLfloat *params);
+GLAPI void APIENTRY emscripten_glGetObjectParameterivARB (GLhandleARB obj, GLenum pname, GLint *params);
+GLAPI void APIENTRY emscripten_glGetInfoLogARB (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog);
+GLAPI void APIENTRY emscripten_glGetAttachedObjectsARB (GLhandleARB containerObj, GLsizei maxCount, GLsizei *count, GLhandleARB *obj);
+GLAPI GLint APIENTRY emscripten_glGetUniformLocationARB (GLhandleARB programObj, const GLcharARB *name);
+GLAPI void APIENTRY emscripten_glGetActiveUniformARB (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name);
+GLAPI void APIENTRY emscripten_glGetUniformfvARB (GLhandleARB programObj, GLint location, GLfloat *params);
+GLAPI void APIENTRY emscripten_glGetUniformivARB (GLhandleARB programObj, GLint location, GLint *params);
+GLAPI void APIENTRY emscripten_glGetShaderSourceARB (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *source);
+
+
+GLAPI void APIENTRY emscripten_glBindAttribLocationARB (GLhandleARB programObj, GLuint index, const GLcharARB *name);
+GLAPI void APIENTRY emscripten_glGetActiveAttribARB (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name);
+GLAPI GLint APIENTRY emscripten_glGetAttribLocationARB (GLhandleARB programObj, const GLcharARB *name);
+
+
+GLAPI void APIENTRY emscripten_glDrawArraysInstancedARB (GLenum mode, GLint first, GLsizei count, GLsizei primcount);
+GLAPI void APIENTRY emscripten_glDrawElementsInstancedARB (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount);
+
+
+GLAPI GLboolean APIENTRY emscripten_glIsRenderbuffer (GLuint renderbuffer);
+GLAPI void APIENTRY emscripten_glBindRenderbuffer (GLenum target, GLuint renderbuffer);
+GLAPI void APIENTRY emscripten_glDeleteRenderbuffers (GLsizei n, const GLuint *renderbuffers);
+GLAPI void APIENTRY emscripten_glGenRenderbuffers (GLsizei n, GLuint *renderbuffers);
+GLAPI void APIENTRY emscripten_glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
+GLAPI void APIENTRY emscripten_glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint *params);
+GLAPI GLboolean APIENTRY emscripten_glIsFramebuffer (GLuint framebuffer);
+GLAPI void APIENTRY emscripten_glBindFramebuffer (GLenum target, GLuint framebuffer);
+GLAPI void APIENTRY emscripten_glDeleteFramebuffers (GLsizei n, const GLuint *framebuffers);
+GLAPI void APIENTRY emscripten_glGenFramebuffers (GLsizei n, GLuint *framebuffers);
+GLAPI GLenum APIENTRY emscripten_glCheckFramebufferStatus (GLenum target);
+GLAPI void APIENTRY emscripten_glFramebufferTexture1D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+GLAPI void APIENTRY emscripten_glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+GLAPI void APIENTRY emscripten_glFramebufferTexture3D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
+GLAPI void APIENTRY emscripten_glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
+GLAPI void APIENTRY emscripten_glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint *params);
+GLAPI void APIENTRY emscripten_glGenerateMipmap (GLenum target);
+GLAPI void APIENTRY emscripten_glBlitFramebuffer (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
+GLAPI void APIENTRY emscripten_glRenderbufferStorageMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+GLAPI void APIENTRY emscripten_glFramebufferTextureLayer (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
+
+
+GLAPI void APIENTRY emscripten_glBindVertexArray (GLuint array);
+GLAPI void APIENTRY emscripten_glDeleteVertexArrays (GLsizei n, const GLuint *arrays);
+GLAPI void APIENTRY emscripten_glGenVertexArrays (GLsizei n, GLuint *arrays);
+GLAPI GLboolean APIENTRY emscripten_glIsVertexArray (GLuint array);
+
+
+GLAPI void APIENTRY emscripten_glGetUniformIndices (GLuint program, GLsizei uniformCount, const GLchar* *uniformNames, GLuint *uniformIndices);
+GLAPI void APIENTRY emscripten_glGetActiveUniformsiv (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params);
+GLAPI void APIENTRY emscripten_glGetActiveUniformName (GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformName);
+GLAPI GLuint APIENTRY emscripten_glGetUniformBlockIndex (GLuint program, const GLchar *uniformBlockName);
+GLAPI void APIENTRY emscripten_glGetActiveUniformBlockiv (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params);
+GLAPI void APIENTRY emscripten_glGetActiveUniformBlockName (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName);
+GLAPI void APIENTRY emscripten_glUniformBlockBinding (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding);
+
+
+GLAPI void APIENTRY emscripten_glReleaseShaderCompiler (void);
+GLAPI void APIENTRY emscripten_glShaderBinary (GLsizei count, const GLuint *shaders, GLenum binaryformat, const GLvoid *binary, GLsizei length);
+GLAPI void APIENTRY emscripten_glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision);
+GLAPI void APIENTRY emscripten_glDepthRangef (GLclampf n, GLclampf f);
+GLAPI void APIENTRY emscripten_glClearDepthf (GLclampf d);
+
+
+GLAPI void APIENTRY emscripten_glVertexAttribDivisor (GLuint index, GLuint divisor);
+
+
+void* emscripten_GetProcAddress(const char *name_) {
+ char *name = malloc(strlen(name_)+1);
+ strcpy(name, name_);
+ // remove EXT|ARB suffixes
+ char *end = strstr(name, "EXT");
+ if (end) *end = 0;
+ end = strstr(name, "ARB");
+ if (end) *end = 0;
+ // misc renamings
+ if (!strcmp(name, "glCreateProgramObject")) name = "glCreateProgram";
+ else if (!strcmp(name, "glUseProgramObject")) name = "glUseProgram";
+ else if (!strcmp(name, "glCreateShaderObject")) name = "glCreateShader";
+ else if (!strcmp(name, "glAttachObject")) name = "glAttachShader";
+ else if (!strcmp(name, "glDetachObject")) name = "glDetachShader";
+ // main list
+ if (!strcmp(name, "glPixelStorei")) return emscripten_glPixelStorei;
+ else if (!strcmp(name, "glGetString")) return emscripten_glGetString;
+ else if (!strcmp(name, "glGetIntegerv")) return emscripten_glGetIntegerv;
+ else if (!strcmp(name, "glGetFloatv")) return emscripten_glGetFloatv;
+ else if (!strcmp(name, "glGetBooleanv")) return emscripten_glGetBooleanv;
+ else if (!strcmp(name, "glGenTextures")) return emscripten_glGenTextures;
+ else if (!strcmp(name, "glDeleteTextures")) return emscripten_glDeleteTextures;
+ else if (!strcmp(name, "glCompressedTexImage2D")) return emscripten_glCompressedTexImage2D;
+ else if (!strcmp(name, "glCompressedTexSubImage2D")) return emscripten_glCompressedTexSubImage2D;
+ else if (!strcmp(name, "glTexImage2D")) return emscripten_glTexImage2D;
+ else if (!strcmp(name, "glTexSubImage2D")) return emscripten_glTexSubImage2D;
+ else if (!strcmp(name, "glReadPixels")) return emscripten_glReadPixels;
+ else if (!strcmp(name, "glBindTexture")) return emscripten_glBindTexture;
+ else if (!strcmp(name, "glGetTexParameterfv")) return emscripten_glGetTexParameterfv;
+ else if (!strcmp(name, "glGetTexParameteriv")) return emscripten_glGetTexParameteriv;
+ else if (!strcmp(name, "glTexParameterfv")) return emscripten_glTexParameterfv;
+ else if (!strcmp(name, "glTexParameteriv")) return emscripten_glTexParameteriv;
+ else if (!strcmp(name, "glIsTexture")) return emscripten_glIsTexture;
+ else if (!strcmp(name, "glGenBuffers")) return emscripten_glGenBuffers;
+ else if (!strcmp(name, "glDeleteBuffers")) return emscripten_glDeleteBuffers;
+ else if (!strcmp(name, "glGetBufferParameteriv")) return emscripten_glGetBufferParameteriv;
+ else if (!strcmp(name, "glBufferData")) return emscripten_glBufferData;
+ else if (!strcmp(name, "glBufferSubData")) return emscripten_glBufferSubData;
+ else if (!strcmp(name, "glIsBuffer")) return emscripten_glIsBuffer;
+ else if (!strcmp(name, "glGenRenderbuffers")) return emscripten_glGenRenderbuffers;
+ else if (!strcmp(name, "glDeleteRenderbuffers")) return emscripten_glDeleteRenderbuffers;
+ else if (!strcmp(name, "glBindRenderbuffer")) return emscripten_glBindRenderbuffer;
+ else if (!strcmp(name, "glGetRenderbufferParameteriv")) return emscripten_glGetRenderbufferParameteriv;
+ else if (!strcmp(name, "glIsRenderbuffer")) return emscripten_glIsRenderbuffer;
+ else if (!strcmp(name, "glGetUniformfv")) return emscripten_glGetUniformfv;
+ else if (!strcmp(name, "glGetUniformiv")) return emscripten_glGetUniformiv;
+ else if (!strcmp(name, "glGetUniformLocation")) return emscripten_glGetUniformLocation;
+ else if (!strcmp(name, "glGetVertexAttribfv")) return emscripten_glGetVertexAttribfv;
+ else if (!strcmp(name, "glGetVertexAttribiv")) return emscripten_glGetVertexAttribiv;
+ else if (!strcmp(name, "glGetVertexAttribPointerv")) return emscripten_glGetVertexAttribPointerv;
+ else if (!strcmp(name, "glGetActiveUniform")) return emscripten_glGetActiveUniform;
+ else if (!strcmp(name, "glUniform1f")) return emscripten_glUniform1f;
+ else if (!strcmp(name, "glUniform2f")) return emscripten_glUniform2f;
+ else if (!strcmp(name, "glUniform3f")) return emscripten_glUniform3f;
+ else if (!strcmp(name, "glUniform4f")) return emscripten_glUniform4f;
+ else if (!strcmp(name, "glUniform1i")) return emscripten_glUniform1i;
+ else if (!strcmp(name, "glUniform2i")) return emscripten_glUniform2i;
+ else if (!strcmp(name, "glUniform3i")) return emscripten_glUniform3i;
+ else if (!strcmp(name, "glUniform4i")) return emscripten_glUniform4i;
+ else if (!strcmp(name, "glUniform1iv")) return emscripten_glUniform1iv;
+ else if (!strcmp(name, "glUniform2iv")) return emscripten_glUniform2iv;
+ else if (!strcmp(name, "glUniform3iv")) return emscripten_glUniform3iv;
+ else if (!strcmp(name, "glUniform4iv")) return emscripten_glUniform4iv;
+ else if (!strcmp(name, "glUniform1fv")) return emscripten_glUniform1fv;
+ else if (!strcmp(name, "glUniform2fv")) return emscripten_glUniform2fv;
+ else if (!strcmp(name, "glUniform3fv")) return emscripten_glUniform3fv;
+ else if (!strcmp(name, "glUniform4fv")) return emscripten_glUniform4fv;
+ else if (!strcmp(name, "glUniformMatrix2fv")) return emscripten_glUniformMatrix2fv;
+ else if (!strcmp(name, "glUniformMatrix3fv")) return emscripten_glUniformMatrix3fv;
+ else if (!strcmp(name, "glUniformMatrix4fv")) return emscripten_glUniformMatrix4fv;
+ else if (!strcmp(name, "glBindBuffer")) return emscripten_glBindBuffer;
+ else if (!strcmp(name, "glVertexAttrib1fv")) return emscripten_glVertexAttrib1fv;
+ else if (!strcmp(name, "glVertexAttrib2fv")) return emscripten_glVertexAttrib2fv;
+ else if (!strcmp(name, "glVertexAttrib3fv")) return emscripten_glVertexAttrib3fv;
+ else if (!strcmp(name, "glVertexAttrib4fv")) return emscripten_glVertexAttrib4fv;
+ else if (!strcmp(name, "glGetAttribLocation")) return emscripten_glGetAttribLocation;
+ else if (!strcmp(name, "glGetActiveAttrib")) return emscripten_glGetActiveAttrib;
+ else if (!strcmp(name, "glCreateShader")) return emscripten_glCreateShader;
+ else if (!strcmp(name, "glDeleteShader")) return emscripten_glDeleteShader;
+ else if (!strcmp(name, "glGetAttachedShaders")) return emscripten_glGetAttachedShaders;
+ else if (!strcmp(name, "glShaderSource")) return emscripten_glShaderSource;
+ else if (!strcmp(name, "glGetShaderSource")) return emscripten_glGetShaderSource;
+ else if (!strcmp(name, "glCompileShader")) return emscripten_glCompileShader;
+ else if (!strcmp(name, "glGetShaderInfoLog")) return emscripten_glGetShaderInfoLog;
+ else if (!strcmp(name, "glGetShaderiv")) return emscripten_glGetShaderiv;
+ else if (!strcmp(name, "glGetProgramiv")) return emscripten_glGetProgramiv;
+ else if (!strcmp(name, "glIsShader")) return emscripten_glIsShader;
+ else if (!strcmp(name, "glCreateProgram")) return emscripten_glCreateProgram;
+ else if (!strcmp(name, "glDeleteProgram")) return emscripten_glDeleteProgram;
+ else if (!strcmp(name, "glAttachShader")) return emscripten_glAttachShader;
+ else if (!strcmp(name, "glDetachShader")) return emscripten_glDetachShader;
+ else if (!strcmp(name, "glGetShaderPrecisionFormat")) return emscripten_glGetShaderPrecisionFormat;
+ else if (!strcmp(name, "glLinkProgram")) return emscripten_glLinkProgram;
+ else if (!strcmp(name, "glGetProgramInfoLog")) return emscripten_glGetProgramInfoLog;
+ else if (!strcmp(name, "glUseProgram")) return emscripten_glUseProgram;
+ else if (!strcmp(name, "glValidateProgram")) return emscripten_glValidateProgram;
+ else if (!strcmp(name, "glIsProgram")) return emscripten_glIsProgram;
+ else if (!strcmp(name, "glBindAttribLocation")) return emscripten_glBindAttribLocation;
+ else if (!strcmp(name, "glBindFramebuffer")) return emscripten_glBindFramebuffer;
+ else if (!strcmp(name, "glGenFramebuffers")) return emscripten_glGenFramebuffers;
+ else if (!strcmp(name, "glDeleteFramebuffers")) return emscripten_glDeleteFramebuffers;
+ else if (!strcmp(name, "glFramebufferRenderbuffer")) return emscripten_glFramebufferRenderbuffer;
+ else if (!strcmp(name, "glFramebufferTexture2D")) return emscripten_glFramebufferTexture2D;
+ else if (!strcmp(name, "glGetFramebufferAttachmentParameteriv")) return emscripten_glGetFramebufferAttachmentParameteriv;
+ else if (!strcmp(name, "glIsFramebuffer")) return emscripten_glIsFramebuffer;
+ else if (!strcmp(name, "glDeleteObject")) return emscripten_glDeleteObjectARB;
+ else if (!strcmp(name, "glGetObjectParameteriv")) return emscripten_glGetObjectParameterivARB;
+ else if (!strcmp(name, "glGetInfoLog")) return emscripten_glGetInfoLogARB;
+ else if (!strcmp(name, "glBindProgram")) return emscripten_glBindProgramARB;
+ else if (!strcmp(name, "glGetPointerv")) return emscripten_glGetPointerv;
+ else if (!strcmp(name, "glDrawRangeElements")) return emscripten_glDrawRangeElements;
+ else if (!strcmp(name, "glEnableClientState")) return emscripten_glEnableClientState;
+ else if (!strcmp(name, "glVertexPointer")) return emscripten_glVertexPointer;
+ else if (!strcmp(name, "glTexCoordPointer")) return emscripten_glTexCoordPointer;
+ else if (!strcmp(name, "glNormalPointer")) return emscripten_glNormalPointer;
+ else if (!strcmp(name, "glColorPointer")) return emscripten_glColorPointer;
+ else if (!strcmp(name, "glClientActiveTexture")) return emscripten_glClientActiveTexture;
+ else if (!strcmp(name, "glGenVertexArrays")) return emscripten_glGenVertexArrays;
+ else if (!strcmp(name, "glDeleteVertexArrays")) return emscripten_glDeleteVertexArrays;
+ else if (!strcmp(name, "glBindVertexArray")) return emscripten_glBindVertexArray;
+ else if (!strcmp(name, "glMatrixMode")) return emscripten_glMatrixMode;
+ else if (!strcmp(name, "glLoadIdentity")) return emscripten_glLoadIdentity;
+ else if (!strcmp(name, "glLoadMatrixf")) return emscripten_glLoadMatrixf;
+ else if (!strcmp(name, "glFrustum")) return emscripten_glFrustum;
+ else if (!strcmp(name, "glRotatef")) return emscripten_glRotatef;
+ else if (!strcmp(name, "glVertexAttribPointer")) return emscripten_glVertexAttribPointer;
+ else if (!strcmp(name, "glEnableVertexAttribArray")) return emscripten_glEnableVertexAttribArray;
+ else if (!strcmp(name, "glDisableVertexAttribArray")) return emscripten_glDisableVertexAttribArray;
+ else if (!strcmp(name, "glDrawArrays")) return emscripten_glDrawArrays;
+ else if (!strcmp(name, "glDrawElements")) return emscripten_glDrawElements;
+ else if (!strcmp(name, "glShaderBinary")) return emscripten_glShaderBinary;
+ else if (!strcmp(name, "glReleaseShaderCompiler")) return emscripten_glReleaseShaderCompiler;
+ else if (!strcmp(name, "glGetError")) return emscripten_glGetError;
+ else if (!strcmp(name, "glVertexAttribDivisor")) return emscripten_glVertexAttribDivisor;
+ else if (!strcmp(name, "glDrawArraysInstanced")) return emscripten_glDrawArraysInstanced;
+ else if (!strcmp(name, "glDrawElementsInstanced")) return emscripten_glDrawElementsInstanced;
+ else if (!strcmp(name, "glFinish")) return emscripten_glFinish;
+ else if (!strcmp(name, "glFlush")) return emscripten_glFlush;
+ else if (!strcmp(name, "glClearDepth")) return emscripten_glClearDepth;
+ else if (!strcmp(name, "glClearDepthf")) return emscripten_glClearDepthf;
+ else if (!strcmp(name, "glDepthFunc")) return emscripten_glDepthFunc;
+ else if (!strcmp(name, "glEnable")) return emscripten_glEnable;
+ else if (!strcmp(name, "glDisable")) return emscripten_glDisable;
+ else if (!strcmp(name, "glFrontFace")) return emscripten_glFrontFace;
+ else if (!strcmp(name, "glCullFace")) return emscripten_glCullFace;
+ else if (!strcmp(name, "glClear")) return emscripten_glClear;
+ else if (!strcmp(name, "glLineWidth")) return emscripten_glLineWidth;
+ else if (!strcmp(name, "glClearStencil")) return emscripten_glClearStencil;
+ else if (!strcmp(name, "glDepthMask")) return emscripten_glDepthMask;
+ else if (!strcmp(name, "glStencilMask")) return emscripten_glStencilMask;
+ else if (!strcmp(name, "glCheckFramebufferStatus")) return emscripten_glCheckFramebufferStatus;
+ else if (!strcmp(name, "glGenerateMipmap")) return emscripten_glGenerateMipmap;
+ else if (!strcmp(name, "glActiveTexture")) return emscripten_glActiveTexture;
+ else if (!strcmp(name, "glBlendEquation")) return emscripten_glBlendEquation;
+ else if (!strcmp(name, "glIsEnabled")) return emscripten_glIsEnabled;
+ else if (!strcmp(name, "glBlendFunc")) return emscripten_glBlendFunc;
+ else if (!strcmp(name, "glBlendEquationSeparate")) return emscripten_glBlendEquationSeparate;
+ else if (!strcmp(name, "glDepthRange")) return emscripten_glDepthRange;
+ else if (!strcmp(name, "glDepthRangef")) return emscripten_glDepthRangef;
+ else if (!strcmp(name, "glStencilMaskSeparate")) return emscripten_glStencilMaskSeparate;
+ else if (!strcmp(name, "glHint")) return emscripten_glHint;
+ else if (!strcmp(name, "glPolygonOffset")) return emscripten_glPolygonOffset;
+ else if (!strcmp(name, "glVertexAttrib1f")) return emscripten_glVertexAttrib1f;
+ else if (!strcmp(name, "glSampleCoverage")) return emscripten_glSampleCoverage;
+ else if (!strcmp(name, "glTexParameteri")) return emscripten_glTexParameteri;
+ else if (!strcmp(name, "glTexParameterf")) return emscripten_glTexParameterf;
+ else if (!strcmp(name, "glVertexAttrib2f")) return emscripten_glVertexAttrib2f;
+ else if (!strcmp(name, "glStencilFunc")) return emscripten_glStencilFunc;
+ else if (!strcmp(name, "glStencilOp")) return emscripten_glStencilOp;
+ else if (!strcmp(name, "glViewport")) return emscripten_glViewport;
+ else if (!strcmp(name, "glClearColor")) return emscripten_glClearColor;
+ else if (!strcmp(name, "glScissor")) return emscripten_glScissor;
+ else if (!strcmp(name, "glVertexAttrib3f")) return emscripten_glVertexAttrib3f;
+ else if (!strcmp(name, "glColorMask")) return emscripten_glColorMask;
+ else if (!strcmp(name, "glRenderbufferStorage")) return emscripten_glRenderbufferStorage;
+ else if (!strcmp(name, "glBlendFuncSeparate")) return emscripten_glBlendFuncSeparate;
+ else if (!strcmp(name, "glBlendColor")) return emscripten_glBlendColor;
+ else if (!strcmp(name, "glStencilFuncSeparate")) return emscripten_glStencilFuncSeparate;
+ else if (!strcmp(name, "glStencilOpSeparate")) return emscripten_glStencilOpSeparate;
+ else if (!strcmp(name, "glVertexAttrib4f")) return emscripten_glVertexAttrib4f;
+ else if (!strcmp(name, "glCopyTexImage2D")) return emscripten_glCopyTexImage2D;
+ else if (!strcmp(name, "glCopyTexSubImage2D")) return emscripten_glCopyTexSubImage2D;
+
+ fprintf(stderr, "bad name in getProcAddress: %s | %s\n", name_, name);
+ return 0;
+}
+
diff --git a/system/lib/gl.symbols b/system/lib/gl.symbols
new file mode 100644
index 00000000..8ba8d6f7
--- /dev/null
+++ b/system/lib/gl.symbols
@@ -0,0 +1 @@
+ T emscripten_GetProcAddress
diff --git a/system/lib/libc.symbols b/system/lib/libc.symbols
index 6f80ef90..53a27082 100644
--- a/system/lib/libc.symbols
+++ b/system/lib/libc.symbols
@@ -72,7 +72,16 @@
W realloc_in_place
T scalbn
T scalbnl
+ T memcmp
+ T memcpy
T strtod
+ T strcoll
+ T __strcoll_l
+ W strcoll_l
+ T strcmp
+ T strncmp
+ T strcasecmp
+ T strncasecmp
T strtod_l
T strtof
T strtof_l
diff --git a/system/lib/libc/musl/src/locale/strcoll.c b/system/lib/libc/musl/src/locale/strcoll.c
new file mode 100644
index 00000000..39ea1123
--- /dev/null
+++ b/system/lib/libc/musl/src/locale/strcoll.c
@@ -0,0 +1,15 @@
+#include <string.h>
+#include <locale.h>
+#include "libc.h"
+
+int __strcoll_l(const char *l, const char *r, locale_t loc)
+{
+ return strcmp(l, r);
+}
+
+int strcoll(const char *l, const char *r)
+{
+ return __strcoll_l(l, r, 0);
+}
+
+weak_alias(__strcoll_l, strcoll_l);
diff --git a/system/lib/libc/musl/src/string/memcmp.c b/system/lib/libc/musl/src/string/memcmp.c
new file mode 100644
index 00000000..bdbce9f0
--- /dev/null
+++ b/system/lib/libc/musl/src/string/memcmp.c
@@ -0,0 +1,8 @@
+#include <string.h>
+
+int memcmp(const void *vl, const void *vr, size_t n)
+{
+ const unsigned char *l=vl, *r=vr;
+ for (; n && *l == *r; n--, l++, r++);
+ return n ? *l-*r : 0;
+}
diff --git a/system/lib/libc/musl/src/string/strcasecmp.c b/system/lib/libc/musl/src/string/strcasecmp.c
new file mode 100644
index 00000000..02fd5f8c
--- /dev/null
+++ b/system/lib/libc/musl/src/string/strcasecmp.c
@@ -0,0 +1,9 @@
+#include <strings.h>
+#include <ctype.h>
+
+int strcasecmp(const char *_l, const char *_r)
+{
+ const unsigned char *l=(void *)_l, *r=(void *)_r;
+ for (; *l && *r && (*l == *r || tolower(*l) == tolower(*r)); l++, r++);
+ return tolower(*l) - tolower(*r);
+}
diff --git a/system/lib/libc/musl/src/string/strcmp.c b/system/lib/libc/musl/src/string/strcmp.c
new file mode 100644
index 00000000..91eb7404
--- /dev/null
+++ b/system/lib/libc/musl/src/string/strcmp.c
@@ -0,0 +1,7 @@
+#include <string.h>
+
+int strcmp(const char *l, const char *r)
+{
+ for (; *l==*r && *l && *r; l++, r++);
+ return *(unsigned char *)l - *(unsigned char *)r;
+}
diff --git a/system/lib/libc/musl/src/string/strncasecmp.c b/system/lib/libc/musl/src/string/strncasecmp.c
new file mode 100644
index 00000000..24659721
--- /dev/null
+++ b/system/lib/libc/musl/src/string/strncasecmp.c
@@ -0,0 +1,10 @@
+#include <strings.h>
+#include <ctype.h>
+
+int strncasecmp(const char *_l, const char *_r, size_t n)
+{
+ const unsigned char *l=(void *)_l, *r=(void *)_r;
+ if (!n--) return 0;
+ for (; *l && *r && n && (*l == *r || tolower(*l) == tolower(*r)); l++, r++, n--);
+ return tolower(*l) - tolower(*r);
+}
diff --git a/system/lib/libc/musl/src/string/strncmp.c b/system/lib/libc/musl/src/string/strncmp.c
new file mode 100644
index 00000000..e228843f
--- /dev/null
+++ b/system/lib/libc/musl/src/string/strncmp.c
@@ -0,0 +1,9 @@
+#include <string.h>
+
+int strncmp(const char *_l, const char *_r, size_t n)
+{
+ const unsigned char *l=(void *)_l, *r=(void *)_r;
+ if (!n--) return 0;
+ for (; *l && *r && n && *l == *r ; l++, r++, n--);
+ return *l - *r;
+}
diff --git a/system/lib/sdl.cpp b/system/lib/sdl.cpp
deleted file mode 100644
index 7038cdb1..00000000
--- a/system/lib/sdl.cpp
+++ /dev/null
@@ -1,13 +0,0 @@
-
-#include <stdlib.h>
-
-// force malloc&free to be included in from libc
-struct Force {
- Force() {
- void *x = malloc(10);
- free(x);
- }
-};
-
-static Force f;
-
diff --git a/system/lib/sdl.symbols b/system/lib/sdl.symbols
deleted file mode 100644
index c2c0af42..00000000
--- a/system/lib/sdl.symbols
+++ /dev/null
@@ -1 +0,0 @@
- W SDL_Init
diff --git a/tests/cases/bigdouble.ll b/tests/cases/bigdouble.ll
new file mode 100644
index 00000000..cd58c08b
--- /dev/null
+++ b/tests/cases/bigdouble.ll
@@ -0,0 +1,17 @@
+; ModuleID = '/tmp/tmpijH2sB/a.out.bc'
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
+target triple = "le32-unknown-nacl"
+
+@.str = private unnamed_addr constant [4 x i8] c"%f\0A\00", align 1
+
+; Function Attrs: nounwind
+define i32 @main() #0 {
+ %1 = fmul double 0x370000000000000, 1.0e+300
+ %2 = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([4 x i8]* @.str, i32 0, i32 0), double %1)
+ ret i32 0
+}
+
+; Function Attrs: nounwind
+declare i32 @printf(i8* nocapture, ...) #0
+
+attributes #0 = { nounwind "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf"="true" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "unsafe-fp-math"="false" "use-soft-float"="false" }
diff --git a/tests/cases/bigdouble.txt b/tests/cases/bigdouble.txt
new file mode 100644
index 00000000..689709cd
--- /dev/null
+++ b/tests/cases/bigdouble.txt
@@ -0,0 +1 @@
+400833672.001795
diff --git a/tests/cases/fuzz6_ta2.ll b/tests/cases/fuzz6_ta2.ll
new file mode 100644
index 00000000..dea3a21d
--- /dev/null
+++ b/tests/cases/fuzz6_ta2.ll
@@ -0,0 +1,3306 @@
+; ModuleID = 'emcc-0-basebc.bc'
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
+target triple = "le32-unknown-nacl"
+
+%struct.S3 = type { i32, i32 }
+%struct.S1 = type { i32, i32, i8, i16 }
+%union.U4 = type { i32 }
+%struct.S2 = type { [2 x i8], [2 x i8] }
+%struct.S0 = type { i32, [4 x i8], [4 x i8], [4 x i8], i8, [7 x i8] }
+
+@.str = private unnamed_addr constant [2 x i8] c"1\00", align 1
+@g_5 = internal unnamed_addr global i32 -1, align 4
+@.str1 = private unnamed_addr constant [4 x i8] c"g_5\00", align 1
+@g_25 = internal global %struct.S3 { i32 1301409902, i32 1607156808 }, align 8
+@.str2 = private unnamed_addr constant [8 x i8] c"g_25.f0\00", align 1
+@.str3 = private unnamed_addr constant [8 x i8] c"g_25.f1\00", align 1
+@g_49 = internal global [9 x %struct.S3] [%struct.S3 { i32 -8, i32 -762592976 }, %struct.S3 { i32 -8, i32 -762592976 }, %struct.S3 { i32 -8, i32 -762592976 }, %struct.S3 { i32 -8, i32 -762592976 }, %struct.S3 { i32 -8, i32 -762592976 }, %struct.S3 { i32 -8, i32 -762592976 }, %struct.S3 { i32 -8, i32 -762592976 }, %struct.S3 { i32 -8, i32 -762592976 }, %struct.S3 { i32 -8, i32 -762592976 }], align 8
+@.str4 = private unnamed_addr constant [11 x i8] c"g_49[i].f0\00", align 1
+@.str5 = private unnamed_addr constant [11 x i8] c"g_49[i].f1\00", align 1
+@.str6 = private unnamed_addr constant [14 x i8] c"index = [%d]\0A\00", align 1
+@g_52 = internal global i32 2110022177, align 4
+@.str7 = private unnamed_addr constant [5 x i8] c"g_52\00", align 1
+@.str8 = private unnamed_addr constant [5 x i8] c"g_82\00", align 1
+@g_90 = internal global i32 888749341, align 4
+@.str9 = private unnamed_addr constant [5 x i8] c"g_90\00", align 1
+@g_92 = internal unnamed_addr global i8 -97, align 1
+@.str10 = private unnamed_addr constant [5 x i8] c"g_92\00", align 1
+@g_96 = internal global i8 -23, align 1
+@.str11 = private unnamed_addr constant [5 x i8] c"g_96\00", align 1
+@g_99 = internal global %struct.S1 { i32 -845795437, i32 0, i8 0, i16 4 }, align 4
+@.str12 = private unnamed_addr constant [8 x i8] c"g_99.f0\00", align 1
+@.str13 = private unnamed_addr constant [8 x i8] c"g_99.f1\00", align 1
+@.str14 = private unnamed_addr constant [8 x i8] c"g_99.f2\00", align 1
+@.str15 = private unnamed_addr constant [8 x i8] c"g_99.f3\00", align 1
+@g_103 = internal unnamed_addr global i16 23707, align 2
+@.str16 = private unnamed_addr constant [6 x i8] c"g_103\00", align 1
+@.str17 = private unnamed_addr constant [9 x i8] c"g_108.f0\00", align 1
+@.str18 = private unnamed_addr constant [9 x i8] c"g_108.f1\00", align 1
+@.str19 = private unnamed_addr constant [9 x i8] c"g_108.f2\00", align 1
+@.str20 = private unnamed_addr constant [9 x i8] c"g_108.f3\00", align 1
+@.str21 = private unnamed_addr constant [9 x i8] c"g_108.f4\00", align 1
+@.str22 = private unnamed_addr constant [9 x i8] c"g_108.f5\00", align 1
+@.str23 = private unnamed_addr constant [9 x i8] c"g_108.f6\00", align 1
+@.str24 = private unnamed_addr constant [9 x i8] c"g_109.f0\00", align 1
+@.str25 = private unnamed_addr constant [9 x i8] c"g_110.f0\00", align 1
+@g_183 = internal global %union.U4 zeroinitializer, align 4
+@.str26 = private unnamed_addr constant [9 x i8] c"g_183.f0\00", align 1
+@.str27 = private unnamed_addr constant [9 x i8] c"g_218.f0\00", align 1
+@g_258 = internal unnamed_addr global i8 -11, align 1
+@.str28 = private unnamed_addr constant [6 x i8] c"g_258\00", align 1
+@g_332 = internal unnamed_addr global i16 1, align 2
+@.str29 = private unnamed_addr constant [6 x i8] c"g_332\00", align 1
+@g_345 = internal global [10 x [1 x %union.U4]] [[1 x %union.U4] [%union.U4 { i32 -9 }], [1 x %union.U4] [%union.U4 { i32 -8 }], [1 x %union.U4] [%union.U4 { i32 -8 }], [1 x %union.U4] [%union.U4 { i32 -9 }], [1 x %union.U4] [%union.U4 { i32 -8 }], [1 x %union.U4] [%union.U4 { i32 -8 }], [1 x %union.U4] [%union.U4 { i32 -9 }], [1 x %union.U4] [%union.U4 { i32 -8 }], [1 x %union.U4] [%union.U4 { i32 -8 }], [1 x %union.U4] [%union.U4 { i32 -9 }]], align 4
+@.str30 = private unnamed_addr constant [15 x i8] c"g_345[i][j].f0\00", align 1
+@.str31 = private unnamed_addr constant [18 x i8] c"index = [%d][%d]\0A\00", align 1
+@.str32 = private unnamed_addr constant [9 x i8] c"g_393[i]\00", align 1
+@g_395 = internal global i16 -7025, align 2
+@.str33 = private unnamed_addr constant [6 x i8] c"g_395\00", align 1
+@.str34 = private unnamed_addr constant [6 x i8] c"g_398\00", align 1
+@g_404 = internal constant [9 x [3 x [7 x %struct.S1]]] [[3 x [7 x %struct.S1]] [[7 x %struct.S1] [%struct.S1 { i32 -4, i32 1, i8 1, i16 -28668 }, %struct.S1 { i32 -7, i32 759214664, i8 9, i16 -4 }, %struct.S1 { i32 1, i32 349068844, i8 -1, i16 0 }, %struct.S1 { i32 -3, i32 9, i8 -61, i16 -1 }, %struct.S1 { i32 9, i32 0, i8 -11, i16 -30413 }, %struct.S1 { i32 1861205821, i32 110616061, i8 40, i16 -9 }, %struct.S1 { i32 -7, i32 759214664, i8 9, i16 -4 }], [7 x %struct.S1] [%struct.S1 { i32 -244445179, i32 1776214206, i8 -2, i16 1 }, %struct.S1 { i32 1543082949, i32 -1355807875, i8 6, i16 -31022 }, %struct.S1 { i32 1025177860, i32 6, i8 9, i16 9090 }, %struct.S1 { i32 -244445179, i32 1776214206, i8 -2, i16 1 }, %struct.S1 { i32 0, i32 8, i8 63, i16 -15114 }, %struct.S1 { i32 -237948286, i32 -602674988, i8 9, i16 -23496 }, %struct.S1 { i32 0, i32 1, i8 -66, i16 -1 }], [7 x %struct.S1] [%struct.S1 { i32 -1258444377, i32 0, i8 -3, i16 -18764 }, %struct.S1 { i32 -4, i32 1865801250, i8 1, i16 -5 }, %struct.S1 { i32 -1411946461, i32 1547736314, i8 -89, i16 29618 }, %struct.S1 { i32 -624352579, i32 -2, i8 109, i16 -10276 }, %struct.S1 { i32 -2023789489, i32 -902579792, i8 -1, i16 1 }, %struct.S1 { i32 -41003017, i32 1569787914, i8 -6, i16 18403 }, %struct.S1 { i32 -41003017, i32 1569787914, i8 -6, i16 18403 }]], [3 x [7 x %struct.S1]] [[7 x %struct.S1] [%struct.S1 { i32 -4, i32 -392352954, i8 -1, i16 14048 }, %struct.S1 { i32 0, i32 1, i8 -66, i16 -1 }, %struct.S1 { i32 -917235207, i32 -237206527, i8 -2, i16 0 }, %struct.S1 { i32 0, i32 1, i8 -66, i16 -1 }, %struct.S1 { i32 -4, i32 -392352954, i8 -1, i16 14048 }, %struct.S1 { i32 0, i32 -270755058, i8 -10, i16 -6 }, %struct.S1 { i32 823728956, i32 -762967062, i8 -7, i16 -13824 }], [7 x %struct.S1] [%struct.S1 { i32 1, i32 276540291, i8 -118, i16 -1 }, %struct.S1 { i32 2060359313, i32 0, i8 0, i16 -4 }, %struct.S1 { i32 -1, i32 60410192, i8 -105, i16 0 }, %struct.S1 { i32 -1832135439, i32 -117259837, i8 -1, i16 -1 }, %struct.S1 { i32 -7, i32 1258034932, i8 1, i16 -1 }, %struct.S1 { i32 -1718057571, i32 0, i8 0, i16 -8992 }, %struct.S1 { i32 9, i32 0, i8 -11, i16 -30413 }], [7 x %struct.S1] [%struct.S1 { i32 1025177860, i32 6, i8 9, i16 9090 }, %struct.S1 { i32 -1959266718, i32 1, i8 0, i16 -9111 }, %struct.S1 { i32 -1, i32 781657959, i8 57, i16 22085 }, %struct.S1 { i32 -2076059332, i32 -1205200163, i8 55, i16 -3996 }, %struct.S1 { i32 -1959266718, i32 1, i8 0, i16 -9111 }, %struct.S1 { i32 1, i32 1260336922, i8 116, i16 13140 }, %struct.S1 { i32 -1, i32 -263772962, i8 0, i16 1 }]], [3 x [7 x %struct.S1]] [[7 x %struct.S1] [%struct.S1 { i32 1, i32 276540291, i8 -118, i16 -1 }, %struct.S1 { i32 -1832135439, i32 -117259837, i8 -1, i16 -1 }, %struct.S1 { i32 1861205821, i32 110616061, i8 40, i16 -9 }, %struct.S1 { i32 -513205, i32 -1424064346, i8 -59, i16 5 }, %struct.S1 { i32 1184341626, i32 -1, i8 76, i16 1 }, %struct.S1 { i32 -1784578731, i32 -650939753, i8 7, i16 -13401 }, %struct.S1 { i32 -4, i32 1, i8 1, i16 -28668 }], [7 x %struct.S1] [%struct.S1 { i32 -4, i32 -392352954, i8 -1, i16 14048 }, %struct.S1 { i32 0, i32 1, i8 -23, i16 1 }, %struct.S1 { i32 1543082949, i32 -1355807875, i8 6, i16 -31022 }, %struct.S1 { i32 -1, i32 -358692379, i8 0, i16 1 }, %struct.S1 { i32 1, i32 1260336922, i8 116, i16 13140 }, %struct.S1 { i32 -10, i32 1571736142, i8 8, i16 -9 }, %struct.S1 { i32 -4, i32 -392352954, i8 -1, i16 14048 }], [7 x %struct.S1] [%struct.S1 { i32 -1258444377, i32 0, i8 -3, i16 -18764 }, %struct.S1 { i32 -4, i32 1, i8 1, i16 -28668 }, %struct.S1 { i32 -624352579, i32 -2, i8 109, i16 -10276 }, %struct.S1 { i32 -7, i32 1258034932, i8 1, i16 -1 }, %struct.S1 { i32 1774264700, i32 1743797768, i8 -12, i16 0 }, %struct.S1 { i32 -1258444377, i32 0, i8 -3, i16 -18764 }, %struct.S1 { i32 -637055085, i32 -947781708, i8 4, i16 -6808 }]], [3 x [7 x %struct.S1]] [[7 x %struct.S1] [%struct.S1 { i32 -244445179, i32 1776214206, i8 -2, i16 1 }, %struct.S1 { i32 -267149299, i32 -1636597397, i8 7, i16 13475 }, %struct.S1 { i32 2018342595, i32 -68458340, i8 -1, i16 -13443 }, %struct.S1 { i32 823728956, i32 -762967062, i8 -7, i16 -13824 }, %struct.S1 { i32 823728956, i32 -762967062, i8 -7, i16 -13824 }, %struct.S1 { i32 2018342595, i32 -68458340, i8 -1, i16 -13443 }, %struct.S1 { i32 -267149299, i32 -1636597397, i8 7, i16 13475 }], [7 x %struct.S1] [%struct.S1 { i32 -4, i32 1, i8 1, i16 -28668 }, %struct.S1 { i32 2060359313, i32 0, i8 0, i16 -4 }, %struct.S1 { i32 -1, i32 6, i8 57, i16 1 }, %struct.S1 { i32 -1357864411, i32 8, i8 91, i16 0 }, %struct.S1 { i32 1538544702, i32 -1554648331, i8 0, i16 -1 }, %struct.S1 { i32 -7, i32 1258034932, i8 1, i16 -1 }, %struct.S1 { i32 1184341626, i32 -1, i8 76, i16 1 }], [7 x %struct.S1] [%struct.S1 { i32 506767331, i32 2, i8 53, i16 -3 }, %struct.S1 { i32 2128045624, i32 0, i8 -127, i16 -13358 }, %struct.S1 { i32 1025177860, i32 6, i8 9, i16 9090 }, %struct.S1 { i32 -237948286, i32 -602674988, i8 9, i16 -23496 }, %struct.S1 { i32 -267149299, i32 -1636597397, i8 7, i16 13475 }, %struct.S1 { i32 1338273418, i32 -692826440, i8 -5, i16 -6354 }, %struct.S1 { i32 1543082949, i32 -1355807875, i8 6, i16 -31022 }]], [3 x [7 x %struct.S1]] [[7 x %struct.S1] [%struct.S1 { i32 -4, i32 1865801250, i8 1, i16 -5 }, %struct.S1 { i32 1774264700, i32 1743797768, i8 -12, i16 0 }, %struct.S1 { i32 1861205821, i32 110616061, i8 40, i16 -9 }, %struct.S1 { i32 -1357864411, i32 8, i8 91, i16 0 }, %struct.S1 { i32 -2023789489, i32 -902579792, i8 -1, i16 1 }, %struct.S1 { i32 -124134025, i32 -1549553076, i8 1, i16 -3 }, %struct.S1 { i32 -10, i32 2023506657, i8 6, i16 -1 }], [7 x %struct.S1] [%struct.S1 { i32 -1, i32 2138051897, i8 -48, i16 -1 }, %struct.S1 { i32 1543082949, i32 -1355807875, i8 6, i16 -31022 }, %struct.S1 { i32 -2076059332, i32 -1205200163, i8 55, i16 -3996 }, %struct.S1 { i32 823728956, i32 -762967062, i8 -7, i16 -13824 }, %struct.S1 { i32 0, i32 -1, i8 11, i16 26719 }, %struct.S1 { i32 0, i32 1, i8 -23, i16 1 }, %struct.S1 { i32 823728956, i32 -762967062, i8 -7, i16 -13824 }], [7 x %struct.S1] [%struct.S1 { i32 759088742, i32 -2109967385, i8 -108, i16 5309 }, %struct.S1 { i32 9, i32 0, i8 -11, i16 -30413 }, %struct.S1 { i32 -1718057571, i32 0, i8 0, i16 -8992 }, %struct.S1 { i32 -7, i32 1258034932, i8 1, i16 -1 }, %struct.S1 { i32 -1832135439, i32 -117259837, i8 -1, i16 -1 }, %struct.S1 { i32 -1, i32 60410192, i8 -105, i16 0 }, %struct.S1 { i32 2060359313, i32 0, i8 0, i16 -4 }]], [3 x [7 x %struct.S1]] [[7 x %struct.S1] [%struct.S1 { i32 823728956, i32 -762967062, i8 -7, i16 -13824 }, %struct.S1 { i32 -1959266718, i32 1, i8 0, i16 -9111 }, %struct.S1 { i32 -917235207, i32 -237206527, i8 -2, i16 0 }, %struct.S1 { i32 -1, i32 -358692379, i8 0, i16 1 }, %struct.S1 { i32 -1865005823, i32 1247557675, i8 9, i16 -1 }, %struct.S1 { i32 -837942276, i32 -10, i8 -4, i16 -6 }, %struct.S1 { i32 -1865005823, i32 1247557675, i8 9, i16 -1 }], [7 x %struct.S1] [%struct.S1 { i32 -513205, i32 -1424064346, i8 -59, i16 5 }, %struct.S1 { i32 -637055085, i32 -947781708, i8 4, i16 -6808 }, %struct.S1 { i32 -637055085, i32 -947781708, i8 4, i16 -6808 }, %struct.S1 { i32 -513205, i32 -1424064346, i8 -59, i16 5 }, %struct.S1 { i32 1538544702, i32 -1554648331, i8 0, i16 -1 }, %struct.S1 { i32 759088742, i32 -2109967385, i8 -108, i16 5309 }, %struct.S1 { i32 -2023789489, i32 -902579792, i8 -1, i16 1 }], [7 x %struct.S1] [%struct.S1 { i32 -10, i32 1571736142, i8 8, i16 -9 }, %struct.S1 { i32 -1923318042, i32 1, i8 -50, i16 -29192 }, %struct.S1 { i32 1, i32 1260336922, i8 116, i16 13140 }, %struct.S1 { i32 -2076059332, i32 -1205200163, i8 55, i16 -3996 }, %struct.S1 { i32 0, i32 1, i8 -66, i16 -1 }, %struct.S1 { i32 -10, i32 1571736142, i8 8, i16 -9 }, %struct.S1 { i32 0, i32 1, i8 -23, i16 1 }]], [3 x [7 x %struct.S1]] [[7 x %struct.S1] [%struct.S1 { i32 1774264700, i32 1743797768, i8 -12, i16 0 }, %struct.S1 { i32 -2023789489, i32 -902579792, i8 -1, i16 1 }, %struct.S1 { i32 1, i32 349068844, i8 -1, i16 0 }, %struct.S1 { i32 -1832135439, i32 -117259837, i8 -1, i16 -1 }, %struct.S1 { i32 -10, i32 2023506657, i8 6, i16 -1 }, %struct.S1 { i32 -124134025, i32 -1549553076, i8 1, i16 -3 }, %struct.S1 { i32 -2023789489, i32 -902579792, i8 -1, i16 1 }], [7 x %struct.S1] [%struct.S1 { i32 -244445179, i32 1776214206, i8 -2, i16 1 }, %struct.S1 { i32 -1, i32 -263772962, i8 0, i16 1 }, %struct.S1 { i32 506767331, i32 2, i8 53, i16 -3 }, %struct.S1 { i32 0, i32 1, i8 -66, i16 -1 }, %struct.S1 { i32 1, i32 1260336922, i8 116, i16 13140 }, %struct.S1 { i32 -237948286, i32 -602674988, i8 9, i16 -23496 }, %struct.S1 { i32 -1865005823, i32 1247557675, i8 9, i16 -1 }], [7 x %struct.S1] [%struct.S1 { i32 -1411946461, i32 1547736314, i8 -89, i16 29618 }, %struct.S1 { i32 -7, i32 759214664, i8 9, i16 -4 }, %struct.S1 { i32 -1, i32 6, i8 57, i16 1 }, %struct.S1 { i32 -624352579, i32 -2, i8 109, i16 -10276 }, %struct.S1 { i32 -7, i32 759214664, i8 9, i16 -4 }, %struct.S1 { i32 -637055085, i32 -947781708, i8 4, i16 -6808 }, %struct.S1 { i32 2060359313, i32 0, i8 0, i16 -4 }]], [3 x [7 x %struct.S1]] [[7 x %struct.S1] [%struct.S1 { i32 968381354, i32 -4, i8 -127, i16 -14432 }, %struct.S1 { i32 0, i32 1, i8 -66, i16 -1 }, %struct.S1 { i32 -837942276, i32 -10, i8 -4, i16 -6 }, %struct.S1 { i32 -244445179, i32 1776214206, i8 -2, i16 1 }, %struct.S1 { i32 -267149299, i32 -1636597397, i8 7, i16 13475 }, %struct.S1 { i32 1, i32 -5, i8 -10, i16 13038 }, %struct.S1 { i32 506767331, i32 2, i8 53, i16 -3 }], [7 x %struct.S1] [%struct.S1 { i32 -1411946461, i32 1547736314, i8 -89, i16 29618 }, %struct.S1 { i32 1861205821, i32 110616061, i8 40, i16 -9 }, %struct.S1 { i32 -1, i32 -6, i8 -4, i16 2 }, %struct.S1 { i32 -1024677174, i32 -1, i8 -126, i16 -10239 }, %struct.S1 { i32 -1, i32 -6, i8 -4, i16 2 }, %struct.S1 { i32 1861205821, i32 110616061, i8 40, i16 -9 }, %struct.S1 { i32 -1411946461, i32 1547736314, i8 -89, i16 29618 }], [7 x %struct.S1] [%struct.S1 { i32 -1223483863, i32 -1578792888, i8 -22, i16 1 }, %struct.S1 { i32 506767331, i32 2, i8 53, i16 -3 }, %struct.S1 { i32 0, i32 5, i8 -6, i16 19467 }, %struct.S1 { i32 1, i32 -1042812290, i8 -97, i16 -20099 }, %struct.S1 { i32 1025177860, i32 6, i8 9, i16 9090 }, %struct.S1 { i32 1525253711, i32 -1607228738, i8 1, i16 -392 }, %struct.S1 { i32 2018342595, i32 -68458340, i8 -1, i16 -13443 }]], [3 x [7 x %struct.S1]] [[7 x %struct.S1] [%struct.S1 { i32 -1, i32 6, i8 57, i16 1 }, %struct.S1 { i32 -1258444377, i32 0, i8 -3, i16 -18764 }, %struct.S1 { i32 -3, i32 9, i8 -61, i16 -1 }, %struct.S1 { i32 -1718057571, i32 0, i8 0, i16 -8992 }, %struct.S1 { i32 -1, i32 60410192, i8 -105, i16 0 }, %struct.S1 { i32 -3, i32 9, i8 -61, i16 -1 }, %struct.S1 { i32 0, i32 -866224393, i8 -65, i16 24132 }], [7 x %struct.S1] [%struct.S1 { i32 1338273418, i32 -692826440, i8 -5, i16 -6354 }, %struct.S1 { i32 0, i32 -270755058, i8 -10, i16 -6 }, %struct.S1 { i32 0, i32 5, i8 -6, i16 19467 }, %struct.S1 { i32 -1, i32 -263772962, i8 0, i16 1 }, %struct.S1 { i32 2, i32 -137424052, i8 1, i16 11792 }, %struct.S1 { i32 708881223, i32 670081913, i8 -53, i16 12097 }, %struct.S1 { i32 0, i32 1, i8 -23, i16 1 }], [7 x %struct.S1] [%struct.S1 { i32 1361878214, i32 -1, i8 115, i16 7 }, %struct.S1 { i32 -1, i32 60410192, i8 -105, i16 0 }, %struct.S1 { i32 -1, i32 -6, i8 -4, i16 2 }, %struct.S1 { i32 -992507318, i32 8, i8 90, i16 -12692 }, %struct.S1 { i32 0, i32 -866224393, i8 -65, i16 24132 }, %struct.S1 { i32 1361878214, i32 -1, i8 115, i16 7 }, %struct.S1 { i32 -1784578731, i32 -650939753, i8 7, i16 -13401 }]]], align 4
+@.str35 = private unnamed_addr constant [18 x i8] c"g_404[i][j][k].f0\00", align 1
+@.str36 = private unnamed_addr constant [18 x i8] c"g_404[i][j][k].f1\00", align 1
+@.str37 = private unnamed_addr constant [18 x i8] c"g_404[i][j][k].f2\00", align 1
+@.str38 = private unnamed_addr constant [18 x i8] c"g_404[i][j][k].f3\00", align 1
+@.str39 = private unnamed_addr constant [22 x i8] c"index = [%d][%d][%d]\0A\00", align 1
+@g_452 = internal unnamed_addr global i1 false
+@.str40 = private unnamed_addr constant [6 x i8] c"g_452\00", align 1
+@.str41 = private unnamed_addr constant [6 x i8] c"g_454\00", align 1
+@g_455 = internal unnamed_addr global [1 x i16] [i16 -21015], align 2
+@.str42 = private unnamed_addr constant [9 x i8] c"g_455[i]\00", align 1
+@g_465 = internal global i32 1537435609, align 4
+@.str43 = private unnamed_addr constant [6 x i8] c"g_465\00", align 1
+@.str44 = private unnamed_addr constant [6 x i8] c"g_466\00", align 1
+@g_467 = internal unnamed_addr global i8 -1, align 1
+@.str45 = private unnamed_addr constant [6 x i8] c"g_467\00", align 1
+@.str46 = private unnamed_addr constant [6 x i8] c"g_518\00", align 1
+@.str47 = private unnamed_addr constant [9 x i8] c"g_525.f0\00", align 1
+@.str48 = private unnamed_addr constant [9 x i8] c"g_525.f1\00", align 1
+@.str49 = private unnamed_addr constant [9 x i8] c"g_525.f2\00", align 1
+@.str50 = private unnamed_addr constant [9 x i8] c"g_525.f3\00", align 1
+@.str51 = private unnamed_addr constant [6 x i8] c"g_531\00", align 1
+@g_532 = internal global i32 -4, align 4
+@.str52 = private unnamed_addr constant [6 x i8] c"g_532\00", align 1
+@g_534 = internal unnamed_addr global i16 -12709, align 2
+@.str53 = private unnamed_addr constant [6 x i8] c"g_534\00", align 1
+@g_535 = internal unnamed_addr global [3 x [6 x [4 x i16]]] [[6 x [4 x i16]] [[4 x i16] [i16 1, i16 -5, i16 1, i16 0], [4 x i16] [i16 -5, i16 1, i16 -18349, i16 3093], [4 x i16] [i16 6, i16 1, i16 -5, i16 -24951], [4 x i16] [i16 7, i16 -9, i16 -1, i16 0], [4 x i16] [i16 0, i16 -3322, i16 0, i16 17466], [4 x i16] [i16 27553, i16 0, i16 3881, i16 0]], [6 x [4 x i16]] [[4 x i16] [i16 -3322, i16 -23234, i16 -24951, i16 3881], [4 x i16] [i16 1, i16 6, i16 -5, i16 1], [4 x i16] [i16 -1, i16 1, i16 0, i16 6914], [4 x i16] [i16 -1, i16 -3322, i16 -5, i16 -1], [4 x i16] [i16 1, i16 6914, i16 -24951, i16 0], [4 x i16] [i16 -3322, i16 -30274, i16 3881, i16 3093]], [6 x [4 x i16]] [[4 x i16] [i16 27553, i16 1, i16 0, i16 1], [4 x i16] [i16 0, i16 -23234, i16 -1, i16 0], [4 x i16] [i16 1, i16 17466, i16 17466, i16 1], [4 x i16] [i16 6914, i16 -1, i16 -10, i16 -1], [4 x i16] [i16 17466, i16 0, i16 -9, i16 11044], [4 x i16] [i16 -5, i16 0, i16 1, i16 11044]]], align 2
+@.str54 = private unnamed_addr constant [15 x i8] c"g_535[i][j][k]\00", align 1
+@g_538 = internal unnamed_addr global i16 9, align 2
+@.str55 = private unnamed_addr constant [6 x i8] c"g_538\00", align 1
+@g_557 = internal unnamed_addr global i16 15797, align 2
+@.str56 = private unnamed_addr constant [6 x i8] c"g_557\00", align 1
+@g_575 = internal unnamed_addr global i8 -5, align 1
+@.str57 = private unnamed_addr constant [6 x i8] c"g_575\00", align 1
+@g_591 = internal global [10 x [8 x %union.U4]] [[8 x %union.U4] [%union.U4 { i32 1 }, %union.U4 { i32 62345350 }, %union.U4 { i32 1 }, %union.U4 { i32 62345350 }, %union.U4 { i32 1 }, %union.U4 { i32 62345350 }, %union.U4 { i32 1 }, %union.U4 { i32 62345350 }], [8 x %union.U4] [%union.U4 { i32 1 }, %union.U4 { i32 62345350 }, %union.U4 { i32 1 }, %union.U4 { i32 62345350 }, %union.U4 { i32 1 }, %union.U4 { i32 62345350 }, %union.U4 { i32 1 }, %union.U4 { i32 62345350 }], [8 x %union.U4] [%union.U4 { i32 1 }, %union.U4 { i32 62345350 }, %union.U4 { i32 1 }, %union.U4 { i32 62345350 }, %union.U4 { i32 1 }, %union.U4 { i32 62345350 }, %union.U4 { i32 1 }, %union.U4 { i32 62345350 }], [8 x %union.U4] [%union.U4 { i32 1 }, %union.U4 { i32 62345350 }, %union.U4 { i32 1 }, %union.U4 { i32 62345350 }, %union.U4 { i32 1 }, %union.U4 { i32 62345350 }, %union.U4 { i32 1 }, %union.U4 { i32 62345350 }], [8 x %union.U4] [%union.U4 { i32 1 }, %union.U4 { i32 62345350 }, %union.U4 { i32 1 }, %union.U4 { i32 62345350 }, %union.U4 { i32 1 }, %union.U4 { i32 62345350 }, %union.U4 { i32 1 }, %union.U4 { i32 62345350 }], [8 x %union.U4] [%union.U4 { i32 1 }, %union.U4 { i32 62345350 }, %union.U4 { i32 1 }, %union.U4 { i32 62345350 }, %union.U4 { i32 1 }, %union.U4 { i32 62345350 }, %union.U4 { i32 1 }, %union.U4 { i32 62345350 }], [8 x %union.U4] [%union.U4 { i32 1 }, %union.U4 { i32 62345350 }, %union.U4 { i32 1 }, %union.U4 { i32 62345350 }, %union.U4 { i32 1 }, %union.U4 { i32 62345350 }, %union.U4 { i32 1 }, %union.U4 { i32 62345350 }], [8 x %union.U4] [%union.U4 { i32 1 }, %union.U4 { i32 62345350 }, %union.U4 { i32 1 }, %union.U4 { i32 62345350 }, %union.U4 { i32 1 }, %union.U4 { i32 62345350 }, %union.U4 { i32 1 }, %union.U4 { i32 62345350 }], [8 x %union.U4] [%union.U4 { i32 1 }, %union.U4 { i32 62345350 }, %union.U4 { i32 1 }, %union.U4 { i32 62345350 }, %union.U4 { i32 1 }, %union.U4 { i32 62345350 }, %union.U4 { i32 1 }, %union.U4 { i32 62345350 }], [8 x %union.U4] [%union.U4 { i32 1 }, %union.U4 { i32 62345350 }, %union.U4 { i32 1 }, %union.U4 { i32 62345350 }, %union.U4 { i32 1 }, %union.U4 { i32 62345350 }, %union.U4 { i32 1 }, %union.U4 { i32 62345350 }]], align 4
+@.str58 = private unnamed_addr constant [15 x i8] c"g_591[i][j].f0\00", align 1
+@.str59 = private unnamed_addr constant [9 x i8] c"g_623.f0\00", align 1
+@.str60 = private unnamed_addr constant [9 x i8] c"g_623.f1\00", align 1
+@.str61 = private unnamed_addr constant [9 x i8] c"g_623.f2\00", align 1
+@.str62 = private unnamed_addr constant [9 x i8] c"g_623.f3\00", align 1
+@.str63 = private unnamed_addr constant [9 x i8] c"g_623.f4\00", align 1
+@.str64 = private unnamed_addr constant [9 x i8] c"g_623.f5\00", align 1
+@.str65 = private unnamed_addr constant [9 x i8] c"g_623.f6\00", align 1
+@g_815 = internal unnamed_addr constant [4 x [3 x i8]] [[3 x i8] c"\F6\F6\F6", [3 x i8] c"\F6\F6\F6", [3 x i8] c"\F6\F6\F6", [3 x i8] c"\F6\F6\F6"], align 1
+@.str66 = private unnamed_addr constant [12 x i8] c"g_815[i][j]\00", align 1
+@.str67 = private unnamed_addr constant [9 x i8] c"g_901.f0\00", align 1
+@.str68 = private unnamed_addr constant [7 x i8] c"g_1054\00", align 1
+@g_1055 = internal global i32 -1754892444, align 4
+@.str69 = private unnamed_addr constant [7 x i8] c"g_1055\00", align 1
+@g_1057 = internal unnamed_addr global [4 x [5 x i32]] [[5 x i32] [i32 1, i32 569906689, i32 569906689, i32 1, i32 1], [5 x i32] [i32 1, i32 1140362115, i32 1140362115, i32 1, i32 2], [5 x i32] [i32 1, i32 569906689, i32 569906689, i32 1, i32 1], [5 x i32] [i32 1, i32 1140362115, i32 1140362115, i32 1, i32 2]], align 4
+@.str70 = private unnamed_addr constant [13 x i8] c"g_1057[i][j]\00", align 1
+@crc32_context = internal unnamed_addr global i32 -1, align 4
+@.str71 = private unnamed_addr constant [15 x i8] c"checksum = %X\0A\00", align 1
+@g_901 = internal unnamed_addr constant { i8, i8, [2 x i8] } { i8 9, i8 0, [2 x i8] undef }, align 4
+@g_623 = internal global { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 -98308741, i8 21, i8 1, i8 0, i8 undef, i8 -107, i8 -8, i8 -1, i8 undef, i8 93, i8 1, i8 0, i8 0, i8 1, i8 -122, i8 9, i8 0, i8 72, i8 79, i8 0, i8 0 }, align 4
+@g_110 = internal global { i8, i8, [2 x i8] } { i8 123, i8 0, [2 x i8] undef }, align 4
+@g_108 = internal global { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 -1, i8 126, i8 -4, i8 15, i8 undef, i8 20, i8 -3, i8 -1, i8 undef, i8 -13, i8 27, i8 0, i8 0, i8 -52, i8 21, i8 4, i8 0, i8 69, i8 69, i8 0, i8 0 }, align 4
+@.str72 = private unnamed_addr constant [36 x i8] c"...checksum after hashing %s : %lX\0A\00", align 1
+@crc32_tab = internal unnamed_addr global [256 x i32] zeroinitializer, align 4
+@func_1.l_1252 = private unnamed_addr constant %struct.S3 { i32 -1, i32 2063360091 }, align 4
+@func_2.l_1232 = private unnamed_addr constant { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 0, i8 -128, i8 3, i8 0, i8 undef, i8 -119, i8 13, i8 0, i8 undef, i8 12, i8 15, i8 0, i8 0, i8 74, i8 80, i8 12, i8 0, i8 119, i8 18, i8 0, i8 0 }, align 4
+@func_2.l_1235 = private unnamed_addr constant [3 x [7 x i32]] [[7 x i32] [i32 439875158, i32 1, i32 0, i32 2, i32 1, i32 2, i32 0], [7 x i32] [i32 1, i32 1, i32 0, i32 1694927858, i32 -3, i32 0, i32 -3], [7 x i32] [i32 1694927858, i32 0, i32 0, i32 1694927858, i32 2, i32 439875158, i32 1694927858]], align 4
+@g_192 = internal global [6 x [10 x %struct.S2*]] [[10 x %struct.S2*] [%struct.S2* bitcast ({ i8, i8, [2 x i8] }* @g_110 to %struct.S2*), %struct.S2* bitcast ({ i8, i8, [2 x i8] }* @g_110 to %struct.S2*), %struct.S2* bitcast ({ i8, i8, [2 x i8] }* @g_110 to %struct.S2*), %struct.S2* bitcast ({ i8, i8, [2 x i8] }* @g_110 to %struct.S2*), %struct.S2* bitcast ({ i8, i8, [2 x i8] }* @g_110 to %struct.S2*), %struct.S2* bitcast ({ i8, i8, [2 x i8] }* @g_110 to %struct.S2*), %struct.S2* bitcast ({ i8, i8, [2 x i8] }* @g_110 to %struct.S2*), %struct.S2* bitcast ({ i8, i8, [2 x i8] }* @g_110 to %struct.S2*), %struct.S2* bitcast ({ i8, i8, [2 x i8] }* @g_110 to %struct.S2*), %struct.S2* bitcast ({ i8, i8, [2 x i8] }* @g_110 to %struct.S2*)], [10 x %struct.S2*] [%struct.S2* bitcast ({ i8, i8, [2 x i8] }* @g_110 to %struct.S2*), %struct.S2* bitcast ({ i8, i8, [2 x i8] }* @g_110 to %struct.S2*), %struct.S2* bitcast ({ i8, i8, [2 x i8] }* @g_110 to %struct.S2*), %struct.S2* bitcast ({ i8, i8, [2 x i8] }* @g_110 to %struct.S2*), %struct.S2* bitcast ({ i8, i8, [2 x i8] }* @g_110 to %struct.S2*), %struct.S2* bitcast ({ i8, i8, [2 x i8] }* @g_110 to %struct.S2*), %struct.S2* bitcast ({ i8, i8, [2 x i8] }* @g_110 to %struct.S2*), %struct.S2* bitcast ({ i8, i8, [2 x i8] }* @g_110 to %struct.S2*), %struct.S2* bitcast ({ i8, i8, [2 x i8] }* @g_110 to %struct.S2*), %struct.S2* bitcast ({ i8, i8, [2 x i8] }* @g_110 to %struct.S2*)], [10 x %struct.S2*] [%struct.S2* bitcast ({ i8, i8, [2 x i8] }* @g_110 to %struct.S2*), %struct.S2* bitcast ({ i8, i8, [2 x i8] }* @g_110 to %struct.S2*), %struct.S2* bitcast ({ i8, i8, [2 x i8] }* @g_110 to %struct.S2*), %struct.S2* bitcast ({ i8, i8, [2 x i8] }* @g_110 to %struct.S2*), %struct.S2* bitcast ({ i8, i8, [2 x i8] }* @g_110 to %struct.S2*), %struct.S2* bitcast ({ i8, i8, [2 x i8] }* @g_110 to %struct.S2*), %struct.S2* bitcast ({ i8, i8, [2 x i8] }* @g_110 to %struct.S2*), %struct.S2* bitcast ({ i8, i8, [2 x i8] }* @g_110 to %struct.S2*), %struct.S2* bitcast ({ i8, i8, [2 x i8] }* @g_110 to %struct.S2*), %struct.S2* bitcast ({ i8, i8, [2 x i8] }* @g_110 to %struct.S2*)], [10 x %struct.S2*] [%struct.S2* bitcast ({ i8, i8, [2 x i8] }* @g_110 to %struct.S2*), %struct.S2* bitcast ({ i8, i8, [2 x i8] }* @g_110 to %struct.S2*), %struct.S2* bitcast ({ i8, i8, [2 x i8] }* @g_110 to %struct.S2*), %struct.S2* bitcast ({ i8, i8, [2 x i8] }* @g_110 to %struct.S2*), %struct.S2* bitcast ({ i8, i8, [2 x i8] }* @g_110 to %struct.S2*), %struct.S2* bitcast ({ i8, i8, [2 x i8] }* @g_110 to %struct.S2*), %struct.S2* bitcast ({ i8, i8, [2 x i8] }* @g_110 to %struct.S2*), %struct.S2* bitcast ({ i8, i8, [2 x i8] }* @g_110 to %struct.S2*), %struct.S2* bitcast ({ i8, i8, [2 x i8] }* @g_110 to %struct.S2*), %struct.S2* bitcast ({ i8, i8, [2 x i8] }* @g_110 to %struct.S2*)], [10 x %struct.S2*] [%struct.S2* bitcast ({ i8, i8, [2 x i8] }* @g_110 to %struct.S2*), %struct.S2* bitcast ({ i8, i8, [2 x i8] }* @g_110 to %struct.S2*), %struct.S2* bitcast ({ i8, i8, [2 x i8] }* @g_110 to %struct.S2*), %struct.S2* bitcast ({ i8, i8, [2 x i8] }* @g_110 to %struct.S2*), %struct.S2* bitcast ({ i8, i8, [2 x i8] }* @g_110 to %struct.S2*), %struct.S2* bitcast ({ i8, i8, [2 x i8] }* @g_110 to %struct.S2*), %struct.S2* bitcast ({ i8, i8, [2 x i8] }* @g_110 to %struct.S2*), %struct.S2* bitcast ({ i8, i8, [2 x i8] }* @g_110 to %struct.S2*), %struct.S2* bitcast ({ i8, i8, [2 x i8] }* @g_110 to %struct.S2*), %struct.S2* bitcast ({ i8, i8, [2 x i8] }* @g_110 to %struct.S2*)], [10 x %struct.S2*] [%struct.S2* bitcast ({ i8, i8, [2 x i8] }* @g_110 to %struct.S2*), %struct.S2* bitcast ({ i8, i8, [2 x i8] }* @g_110 to %struct.S2*), %struct.S2* bitcast ({ i8, i8, [2 x i8] }* @g_110 to %struct.S2*), %struct.S2* bitcast ({ i8, i8, [2 x i8] }* @g_110 to %struct.S2*), %struct.S2* bitcast ({ i8, i8, [2 x i8] }* @g_110 to %struct.S2*), %struct.S2* bitcast ({ i8, i8, [2 x i8] }* @g_110 to %struct.S2*), %struct.S2* bitcast ({ i8, i8, [2 x i8] }* @g_110 to %struct.S2*), %struct.S2* bitcast ({ i8, i8, [2 x i8] }* @g_110 to %struct.S2*), %struct.S2* bitcast ({ i8, i8, [2 x i8] }* @g_110 to %struct.S2*), %struct.S2* bitcast ({ i8, i8, [2 x i8] }* @g_110 to %struct.S2*)]], align 4
+@func_2.l_1247 = private unnamed_addr constant [10 x %struct.S3] [%struct.S3 { i32 -1, i32 -1 }, %struct.S3 { i32 -1, i32 -1 }, %struct.S3 { i32 -1, i32 -1 }, %struct.S3 { i32 -1, i32 -1 }, %struct.S3 { i32 -1, i32 -1 }, %struct.S3 { i32 -1, i32 -1 }, %struct.S3 { i32 -1, i32 -1 }, %struct.S3 { i32 -1, i32 -1 }, %struct.S3 { i32 -1, i32 -1 }, %struct.S3 { i32 -1, i32 -1 }], align 4
+@g_1182 = internal unnamed_addr global i32*** @g_1183, align 4
+@func_2.l_1249 = private unnamed_addr constant %struct.S3 { i32 -1, i32 1 }, align 4
+@func_45.l_152 = private unnamed_addr constant <{ { i8, i8, [2 x i8] }, { i8, i8, [2 x i8] }, { i8, i8, [2 x i8] }, { i8, i8, [2 x i8] }, { i8, i8, [2 x i8] }, { i8, i8, [2 x i8] }, { i8, i8, [2 x i8] } }> <{ { i8, i8, [2 x i8] } { i8 -119, i8 0, [2 x i8] undef }, { i8, i8, [2 x i8] } { i8 -119, i8 0, [2 x i8] undef }, { i8, i8, [2 x i8] } { i8 -119, i8 0, [2 x i8] undef }, { i8, i8, [2 x i8] } { i8 -119, i8 0, [2 x i8] undef }, { i8, i8, [2 x i8] } { i8 -119, i8 0, [2 x i8] undef }, { i8, i8, [2 x i8] } { i8 -119, i8 0, [2 x i8] undef }, { i8, i8, [2 x i8] } { i8 -119, i8 0, [2 x i8] undef } }>, align 4
+@func_45.l_154 = private unnamed_addr constant { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 1335375908, i8 -31, i8 -3, i8 15, i8 undef, i8 -17, i8 11, i8 0, i8 undef, i8 -61, i8 13, i8 0, i8 0, i8 8, i8 100, i8 2, i8 0, i8 17, i8 13, i8 0, i8 0 }, align 4
+@func_45.l_81 = private unnamed_addr constant [8 x [5 x i32]] [[5 x i32] [i32 -7, i32 -1414374823, i32 -632497018, i32 -10, i32 -10], [5 x i32] [i32 -10, i32 -1642393851, i32 -10, i32 -8, i32 1286323839], [5 x i32] [i32 -632497018, i32 -1414374823, i32 -7, i32 0, i32 1286323839], [5 x i32] [i32 -1471816903, i32 4, i32 4, i32 -1471816903, i32 -10], [5 x i32] [i32 1490958412, i32 -1471816903, i32 -7, i32 1286323839, i32 -1414374823], [5 x i32] [i32 1490958412, i32 -7, i32 -10, i32 -7, i32 1490958412], [5 x i32] [i32 -1471816903, i32 0, i32 -632497018, i32 1286323839, i32 4], [5 x i32] [i32 -632497018, i32 0, i32 -1471816903, i32 -1471816903, i32 0]], align 4
+@func_45.l_74 = private unnamed_addr constant [9 x i8] c"K\C8\C8K\C8\C8K\C8\C8", align 1
+@func_45.l_126 = private unnamed_addr constant { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 -10, i8 50, i8 3, i8 0, i8 undef, i8 103, i8 -1, i8 -1, i8 undef, i8 -101, i8 6, i8 0, i8 0, i8 1, i8 -70, i8 14, i8 0, i8 80, i8 74, i8 0, i8 0 }, align 4
+@func_45.l_130 = private unnamed_addr constant %struct.S3 { i32 0, i32 -1 }, align 4
+@func_45.l_149 = private unnamed_addr constant { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 1318996756, i8 -89, i8 1, i8 0, i8 undef, i8 103, i8 3, i8 0, i8 undef, i8 -42, i8 3, i8 0, i8 0, i8 60, i8 -36, i8 3, i8 0, i8 -116, i8 24, i8 0, i8 0 }, align 4
+@func_34.l_409 = private unnamed_addr constant { i8, i8, [2 x i8] } { i8 93, i8 127, [2 x i8] undef }, align 4
+@g_1183 = internal global i32** getelementptr inbounds ([3 x [9 x i32*]]* @g_680, i32 0, i32 2, i32 7), align 4
+@g_680 = internal global [3 x [9 x i32*]] [[9 x i32*] [i32* @g_90, i32* @g_90, i32* @g_90, i32* @g_90, i32* @g_90, i32* @g_90, i32* @g_90, i32* @g_90, i32* @g_90], [9 x i32*] zeroinitializer, [9 x i32*] [i32* @g_90, i32* @g_90, i32* @g_90, i32* @g_90, i32* @g_90, i32* @g_90, i32* @g_90, i32* @g_90, i32* @g_90]], align 4
+@func_26.l_486 = private unnamed_addr constant %union.U4 { i32 -1830168395 }, align 4
+@func_26.l_488 = private unnamed_addr constant %struct.S1 { i32 -1750699628, i32 0, i8 -10, i16 -14848 }, align 4
+@func_26.l_489 = private unnamed_addr constant %struct.S3 { i32 -277744967, i32 878104721 }, align 4
+@func_26.l_504 = private unnamed_addr constant [8 x [3 x [4 x i32]]] [[3 x [4 x i32]] [[4 x i32] [i32 -1525661844, i32 -1, i32 265542515, i32 -1], [4 x i32] [i32 -329602546, i32 3, i32 0, i32 -1525661844], [4 x i32] [i32 424579621, i32 0, i32 -1, i32 1972604273]], [3 x [4 x i32]] [[4 x i32] [i32 0, i32 -329602546, i32 4, i32 4], [4 x i32] [i32 0, i32 0, i32 -1, i32 0], [4 x i32] [i32 424579621, i32 4, i32 0, i32 0]], [3 x [4 x i32]] [[4 x i32] [i32 -329602546, i32 0, i32 265542515, i32 0], [4 x i32] [i32 -1525661844, i32 0, i32 -1525661844, i32 0], [4 x i32] [i32 0, i32 4, i32 -1983181016, i32 0]], [3 x [4 x i32]] [[4 x i32] [i32 0, i32 0, i32 -329602546, i32 4], [4 x i32] [i32 1972604273, i32 -329602546, i32 -329602546, i32 1972604273], [4 x i32] [i32 0, i32 0, i32 -1983181016, i32 -1525661844]], [3 x [4 x i32]] [[4 x i32] [i32 0, i32 3, i32 -1525661844, i32 -1], [4 x i32] [i32 -1525661844, i32 -1, i32 265542515, i32 -1], [4 x i32] [i32 -329602546, i32 3, i32 0, i32 -1525661844]], [3 x [4 x i32]] [[4 x i32] [i32 424579621, i32 0, i32 -1, i32 1972604273], [4 x i32] [i32 0, i32 -329602546, i32 4, i32 4], [4 x i32] [i32 0, i32 0, i32 -1, i32 0]], [3 x [4 x i32]] [[4 x i32] [i32 424579621, i32 4, i32 0, i32 0], [4 x i32] [i32 -329602546, i32 0, i32 265542515, i32 0], [4 x i32] [i32 -1525661844, i32 0, i32 -1525661844, i32 0]], [3 x [4 x i32]] [[4 x i32] [i32 0, i32 4, i32 -1983181016, i32 0], [4 x i32] [i32 0, i32 0, i32 -329602546, i32 4], [4 x i32] [i32 1972604273, i32 -329602546, i32 -329602546, i32 1972604273]]], align 4
+@func_26.l_550 = private unnamed_addr constant { i8, i8, [2 x i8] } { i8 102, i8 0, [2 x i8] undef }, align 4
+@func_26.l_478 = private unnamed_addr constant { i8, i8, [2 x i8] } { i8 -122, i8 0, [2 x i8] undef }, align 4
+@func_26.l_546 = private unnamed_addr constant <{ <{ <{ { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } }>, <{ { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } }>, <{ { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } }>, <{ { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } }>, <{ { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } }> }>, <{ <{ { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } }>, <{ { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } }>, <{ { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } }>, <{ { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } }>, <{ { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } }> }>, <{ <{ { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } }>, <{ { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } }>, <{ { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } }>, <{ { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } }>, <{ { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } }> }> }> <{ <{ <{ { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } }>, <{ { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } }>, <{ { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } }>, <{ { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } }>, <{ { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } }> }> <{ <{ { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } }> <{ { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 9, i8 -46, i8 -3, i8 15, i8 undef, i8 116, i8 8, i8 0, i8 undef, i8 88, i8 31, i8 0, i8 0, i8 -2, i8 -8, i8 4, i8 0, i8 -59, i8 18, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 9, i8 -46, i8 -3, i8 15, i8 undef, i8 116, i8 8, i8 0, i8 undef, i8 88, i8 31, i8 0, i8 0, i8 -2, i8 -8, i8 4, i8 0, i8 -59, i8 18, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 -1729945884, i8 12, i8 2, i8 0, i8 undef, i8 -95, i8 14, i8 0, i8 undef, i8 -123, i8 25, i8 0, i8 0, i8 0, i8 41, i8 3, i8 0, i8 22, i8 51, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 1835773250, i8 108, i8 0, i8 0, i8 undef, i8 28, i8 -15, i8 -1, i8 undef, i8 109, i8 20, i8 0, i8 0, i8 30, i8 114, i8 6, i8 0, i8 -90, i8 12, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 -7, i8 106, i8 -4, i8 15, i8 undef, i8 102, i8 12, i8 0, i8 undef, i8 -24, i8 14, i8 0, i8 0, i8 92, i8 85, i8 1, i8 0, i8 -23, i8 61, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 -1729945884, i8 12, i8 2, i8 0, i8 undef, i8 -95, i8 14, i8 0, i8 undef, i8 -123, i8 25, i8 0, i8 0, i8 0, i8 41, i8 3, i8 0, i8 22, i8 51, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 -7, i8 106, i8 -4, i8 15, i8 undef, i8 102, i8 12, i8 0, i8 undef, i8 -24, i8 14, i8 0, i8 0, i8 92, i8 85, i8 1, i8 0, i8 -23, i8 61, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 1835773250, i8 108, i8 0, i8 0, i8 undef, i8 28, i8 -15, i8 -1, i8 undef, i8 109, i8 20, i8 0, i8 0, i8 30, i8 114, i8 6, i8 0, i8 -90, i8 12, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 -1729945884, i8 12, i8 2, i8 0, i8 undef, i8 -95, i8 14, i8 0, i8 undef, i8 -123, i8 25, i8 0, i8 0, i8 0, i8 41, i8 3, i8 0, i8 22, i8 51, i8 0, i8 0 } }>, <{ { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } }> <{ { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 83317218, i8 -42, i8 -4, i8 15, i8 undef, i8 123, i8 9, i8 0, i8 undef, i8 -121, i8 21, i8 0, i8 0, i8 -121, i8 -73, i8 5, i8 0, i8 -98, i8 27, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 83317218, i8 -42, i8 -4, i8 15, i8 undef, i8 123, i8 9, i8 0, i8 undef, i8 -121, i8 21, i8 0, i8 0, i8 -121, i8 -73, i8 5, i8 0, i8 -98, i8 27, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 -1256296454, i8 -103, i8 -3, i8 15, i8 undef, i8 -101, i8 8, i8 0, i8 undef, i8 -100, i8 3, i8 0, i8 0, i8 28, i8 -71, i8 3, i8 0, i8 -93, i8 76, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 -1, i8 -68, i8 -2, i8 15, i8 undef, i8 -97, i8 2, i8 0, i8 undef, i8 -108, i8 23, i8 0, i8 0, i8 24, i8 -25, i8 2, i8 0, i8 -125, i8 88, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 6, i8 58, i8 -1, i8 15, i8 undef, i8 98, i8 -1, i8 -1, i8 undef, i8 115, i8 14, i8 0, i8 0, i8 25, i8 -77, i8 14, i8 0, i8 18, i8 8, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 -1256296454, i8 -103, i8 -3, i8 15, i8 undef, i8 -101, i8 8, i8 0, i8 undef, i8 -100, i8 3, i8 0, i8 0, i8 28, i8 -71, i8 3, i8 0, i8 -93, i8 76, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 6, i8 58, i8 -1, i8 15, i8 undef, i8 98, i8 -1, i8 -1, i8 undef, i8 115, i8 14, i8 0, i8 0, i8 25, i8 -77, i8 14, i8 0, i8 18, i8 8, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 -1, i8 -68, i8 -2, i8 15, i8 undef, i8 -97, i8 2, i8 0, i8 undef, i8 -108, i8 23, i8 0, i8 0, i8 24, i8 -25, i8 2, i8 0, i8 -125, i8 88, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 -1256296454, i8 -103, i8 -3, i8 15, i8 undef, i8 -101, i8 8, i8 0, i8 undef, i8 -100, i8 3, i8 0, i8 0, i8 28, i8 -71, i8 3, i8 0, i8 -93, i8 76, i8 0, i8 0 } }>, <{ { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } }> <{ { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 9, i8 -46, i8 -3, i8 15, i8 undef, i8 116, i8 8, i8 0, i8 undef, i8 88, i8 31, i8 0, i8 0, i8 -2, i8 -8, i8 4, i8 0, i8 -59, i8 18, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 9, i8 -46, i8 -3, i8 15, i8 undef, i8 116, i8 8, i8 0, i8 undef, i8 88, i8 31, i8 0, i8 0, i8 -2, i8 -8, i8 4, i8 0, i8 -59, i8 18, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 -1729945884, i8 12, i8 2, i8 0, i8 undef, i8 -95, i8 14, i8 0, i8 undef, i8 -123, i8 25, i8 0, i8 0, i8 0, i8 41, i8 3, i8 0, i8 22, i8 51, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 1835773250, i8 108, i8 0, i8 0, i8 undef, i8 28, i8 -15, i8 -1, i8 undef, i8 109, i8 20, i8 0, i8 0, i8 30, i8 114, i8 6, i8 0, i8 -90, i8 12, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 -7, i8 106, i8 -4, i8 15, i8 undef, i8 102, i8 12, i8 0, i8 undef, i8 -24, i8 14, i8 0, i8 0, i8 92, i8 85, i8 1, i8 0, i8 -23, i8 61, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 -1729945884, i8 12, i8 2, i8 0, i8 undef, i8 -95, i8 14, i8 0, i8 undef, i8 -123, i8 25, i8 0, i8 0, i8 0, i8 41, i8 3, i8 0, i8 22, i8 51, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 -7, i8 106, i8 -4, i8 15, i8 undef, i8 102, i8 12, i8 0, i8 undef, i8 -24, i8 14, i8 0, i8 0, i8 92, i8 85, i8 1, i8 0, i8 -23, i8 61, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 1835773250, i8 108, i8 0, i8 0, i8 undef, i8 28, i8 -15, i8 -1, i8 undef, i8 109, i8 20, i8 0, i8 0, i8 30, i8 114, i8 6, i8 0, i8 -90, i8 12, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 -1729945884, i8 12, i8 2, i8 0, i8 undef, i8 -95, i8 14, i8 0, i8 undef, i8 -123, i8 25, i8 0, i8 0, i8 0, i8 41, i8 3, i8 0, i8 22, i8 51, i8 0, i8 0 } }>, <{ { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } }> <{ { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 83317218, i8 -42, i8 -4, i8 15, i8 undef, i8 123, i8 9, i8 0, i8 undef, i8 -121, i8 21, i8 0, i8 0, i8 -121, i8 -73, i8 5, i8 0, i8 -98, i8 27, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 83317218, i8 -42, i8 -4, i8 15, i8 undef, i8 123, i8 9, i8 0, i8 undef, i8 -121, i8 21, i8 0, i8 0, i8 -121, i8 -73, i8 5, i8 0, i8 -98, i8 27, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 -1256296454, i8 -103, i8 -3, i8 15, i8 undef, i8 -101, i8 8, i8 0, i8 undef, i8 -100, i8 3, i8 0, i8 0, i8 28, i8 -71, i8 3, i8 0, i8 -93, i8 76, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 -1, i8 -68, i8 -2, i8 15, i8 undef, i8 -97, i8 2, i8 0, i8 undef, i8 -108, i8 23, i8 0, i8 0, i8 24, i8 -25, i8 2, i8 0, i8 -125, i8 88, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 6, i8 58, i8 -1, i8 15, i8 undef, i8 98, i8 -1, i8 -1, i8 undef, i8 115, i8 14, i8 0, i8 0, i8 25, i8 -77, i8 14, i8 0, i8 18, i8 8, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 -1256296454, i8 -103, i8 -3, i8 15, i8 undef, i8 -101, i8 8, i8 0, i8 undef, i8 -100, i8 3, i8 0, i8 0, i8 28, i8 -71, i8 3, i8 0, i8 -93, i8 76, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 6, i8 58, i8 -1, i8 15, i8 undef, i8 98, i8 -1, i8 -1, i8 undef, i8 115, i8 14, i8 0, i8 0, i8 25, i8 -77, i8 14, i8 0, i8 18, i8 8, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 -1, i8 -68, i8 -2, i8 15, i8 undef, i8 -97, i8 2, i8 0, i8 undef, i8 -108, i8 23, i8 0, i8 0, i8 24, i8 -25, i8 2, i8 0, i8 -125, i8 88, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 -1256296454, i8 -103, i8 -3, i8 15, i8 undef, i8 -101, i8 8, i8 0, i8 undef, i8 -100, i8 3, i8 0, i8 0, i8 28, i8 -71, i8 3, i8 0, i8 -93, i8 76, i8 0, i8 0 } }>, <{ { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } }> <{ { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 9, i8 -46, i8 -3, i8 15, i8 undef, i8 116, i8 8, i8 0, i8 undef, i8 88, i8 31, i8 0, i8 0, i8 -2, i8 -8, i8 4, i8 0, i8 -59, i8 18, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 9, i8 -46, i8 -3, i8 15, i8 undef, i8 116, i8 8, i8 0, i8 undef, i8 88, i8 31, i8 0, i8 0, i8 -2, i8 -8, i8 4, i8 0, i8 -59, i8 18, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 -1729945884, i8 12, i8 2, i8 0, i8 undef, i8 -95, i8 14, i8 0, i8 undef, i8 -123, i8 25, i8 0, i8 0, i8 0, i8 41, i8 3, i8 0, i8 22, i8 51, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 1835773250, i8 108, i8 0, i8 0, i8 undef, i8 28, i8 -15, i8 -1, i8 undef, i8 109, i8 20, i8 0, i8 0, i8 30, i8 114, i8 6, i8 0, i8 -90, i8 12, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 -7, i8 106, i8 -4, i8 15, i8 undef, i8 102, i8 12, i8 0, i8 undef, i8 -24, i8 14, i8 0, i8 0, i8 92, i8 85, i8 1, i8 0, i8 -23, i8 61, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 -1729945884, i8 12, i8 2, i8 0, i8 undef, i8 -95, i8 14, i8 0, i8 undef, i8 -123, i8 25, i8 0, i8 0, i8 0, i8 41, i8 3, i8 0, i8 22, i8 51, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 -7, i8 106, i8 -4, i8 15, i8 undef, i8 102, i8 12, i8 0, i8 undef, i8 -24, i8 14, i8 0, i8 0, i8 92, i8 85, i8 1, i8 0, i8 -23, i8 61, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 1835773250, i8 108, i8 0, i8 0, i8 undef, i8 28, i8 -15, i8 -1, i8 undef, i8 109, i8 20, i8 0, i8 0, i8 30, i8 114, i8 6, i8 0, i8 -90, i8 12, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 -1729945884, i8 12, i8 2, i8 0, i8 undef, i8 -95, i8 14, i8 0, i8 undef, i8 -123, i8 25, i8 0, i8 0, i8 0, i8 41, i8 3, i8 0, i8 22, i8 51, i8 0, i8 0 } }> }>, <{ <{ { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } }>, <{ { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } }>, <{ { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } }>, <{ { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } }>, <{ { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } }> }> <{ <{ { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } }> <{ { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 83317218, i8 -42, i8 -4, i8 15, i8 undef, i8 123, i8 9, i8 0, i8 undef, i8 -121, i8 21, i8 0, i8 0, i8 -121, i8 -73, i8 5, i8 0, i8 -98, i8 27, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 83317218, i8 -42, i8 -4, i8 15, i8 undef, i8 123, i8 9, i8 0, i8 undef, i8 -121, i8 21, i8 0, i8 0, i8 -121, i8 -73, i8 5, i8 0, i8 -98, i8 27, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 -1256296454, i8 -103, i8 -3, i8 15, i8 undef, i8 -101, i8 8, i8 0, i8 undef, i8 -100, i8 3, i8 0, i8 0, i8 28, i8 -71, i8 3, i8 0, i8 -93, i8 76, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 -1, i8 -68, i8 -2, i8 15, i8 undef, i8 -97, i8 2, i8 0, i8 undef, i8 -108, i8 23, i8 0, i8 0, i8 24, i8 -25, i8 2, i8 0, i8 -125, i8 88, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 6, i8 58, i8 -1, i8 15, i8 undef, i8 98, i8 -1, i8 -1, i8 undef, i8 115, i8 14, i8 0, i8 0, i8 25, i8 -77, i8 14, i8 0, i8 18, i8 8, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 -1256296454, i8 -103, i8 -3, i8 15, i8 undef, i8 -101, i8 8, i8 0, i8 undef, i8 -100, i8 3, i8 0, i8 0, i8 28, i8 -71, i8 3, i8 0, i8 -93, i8 76, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 6, i8 58, i8 -1, i8 15, i8 undef, i8 98, i8 -1, i8 -1, i8 undef, i8 115, i8 14, i8 0, i8 0, i8 25, i8 -77, i8 14, i8 0, i8 18, i8 8, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 -1, i8 -68, i8 -2, i8 15, i8 undef, i8 -97, i8 2, i8 0, i8 undef, i8 -108, i8 23, i8 0, i8 0, i8 24, i8 -25, i8 2, i8 0, i8 -125, i8 88, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 -1256296454, i8 -103, i8 -3, i8 15, i8 undef, i8 -101, i8 8, i8 0, i8 undef, i8 -100, i8 3, i8 0, i8 0, i8 28, i8 -71, i8 3, i8 0, i8 -93, i8 76, i8 0, i8 0 } }>, <{ { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } }> <{ { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 9, i8 -46, i8 -3, i8 15, i8 undef, i8 116, i8 8, i8 0, i8 undef, i8 88, i8 31, i8 0, i8 0, i8 -2, i8 -8, i8 4, i8 0, i8 -59, i8 18, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 9, i8 -46, i8 -3, i8 15, i8 undef, i8 116, i8 8, i8 0, i8 undef, i8 88, i8 31, i8 0, i8 0, i8 -2, i8 -8, i8 4, i8 0, i8 -59, i8 18, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 -1729945884, i8 12, i8 2, i8 0, i8 undef, i8 -95, i8 14, i8 0, i8 undef, i8 -123, i8 25, i8 0, i8 0, i8 0, i8 41, i8 3, i8 0, i8 22, i8 51, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 1835773250, i8 108, i8 0, i8 0, i8 undef, i8 28, i8 -15, i8 -1, i8 undef, i8 109, i8 20, i8 0, i8 0, i8 30, i8 114, i8 6, i8 0, i8 -90, i8 12, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 -7, i8 106, i8 -4, i8 15, i8 undef, i8 102, i8 12, i8 0, i8 undef, i8 -24, i8 14, i8 0, i8 0, i8 92, i8 85, i8 1, i8 0, i8 -23, i8 61, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 -1729945884, i8 12, i8 2, i8 0, i8 undef, i8 -95, i8 14, i8 0, i8 undef, i8 -123, i8 25, i8 0, i8 0, i8 0, i8 41, i8 3, i8 0, i8 22, i8 51, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 -7, i8 106, i8 -4, i8 15, i8 undef, i8 102, i8 12, i8 0, i8 undef, i8 -24, i8 14, i8 0, i8 0, i8 92, i8 85, i8 1, i8 0, i8 -23, i8 61, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 1835773250, i8 108, i8 0, i8 0, i8 undef, i8 28, i8 -15, i8 -1, i8 undef, i8 109, i8 20, i8 0, i8 0, i8 30, i8 114, i8 6, i8 0, i8 -90, i8 12, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 -1729945884, i8 12, i8 2, i8 0, i8 undef, i8 -95, i8 14, i8 0, i8 undef, i8 -123, i8 25, i8 0, i8 0, i8 0, i8 41, i8 3, i8 0, i8 22, i8 51, i8 0, i8 0 } }>, <{ { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } }> <{ { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 83317218, i8 -42, i8 -4, i8 15, i8 undef, i8 123, i8 9, i8 0, i8 undef, i8 -121, i8 21, i8 0, i8 0, i8 -121, i8 -73, i8 5, i8 0, i8 -98, i8 27, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 83317218, i8 -42, i8 -4, i8 15, i8 undef, i8 123, i8 9, i8 0, i8 undef, i8 -121, i8 21, i8 0, i8 0, i8 -121, i8 -73, i8 5, i8 0, i8 -98, i8 27, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 -1256296454, i8 -103, i8 -3, i8 15, i8 undef, i8 -101, i8 8, i8 0, i8 undef, i8 -100, i8 3, i8 0, i8 0, i8 28, i8 -71, i8 3, i8 0, i8 -93, i8 76, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 -1, i8 -68, i8 -2, i8 15, i8 undef, i8 -97, i8 2, i8 0, i8 undef, i8 -108, i8 23, i8 0, i8 0, i8 24, i8 -25, i8 2, i8 0, i8 -125, i8 88, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 6, i8 58, i8 -1, i8 15, i8 undef, i8 98, i8 -1, i8 -1, i8 undef, i8 115, i8 14, i8 0, i8 0, i8 25, i8 -77, i8 14, i8 0, i8 18, i8 8, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 -1256296454, i8 -103, i8 -3, i8 15, i8 undef, i8 -101, i8 8, i8 0, i8 undef, i8 -100, i8 3, i8 0, i8 0, i8 28, i8 -71, i8 3, i8 0, i8 -93, i8 76, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 6, i8 58, i8 -1, i8 15, i8 undef, i8 98, i8 -1, i8 -1, i8 undef, i8 115, i8 14, i8 0, i8 0, i8 25, i8 -77, i8 14, i8 0, i8 18, i8 8, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 -1, i8 -68, i8 -2, i8 15, i8 undef, i8 -97, i8 2, i8 0, i8 undef, i8 -108, i8 23, i8 0, i8 0, i8 24, i8 -25, i8 2, i8 0, i8 -125, i8 88, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 -1256296454, i8 -103, i8 -3, i8 15, i8 undef, i8 -101, i8 8, i8 0, i8 undef, i8 -100, i8 3, i8 0, i8 0, i8 28, i8 -71, i8 3, i8 0, i8 -93, i8 76, i8 0, i8 0 } }>, <{ { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } }> <{ { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 9, i8 -46, i8 -3, i8 15, i8 undef, i8 116, i8 8, i8 0, i8 undef, i8 88, i8 31, i8 0, i8 0, i8 -2, i8 -8, i8 4, i8 0, i8 -59, i8 18, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 9, i8 -46, i8 -3, i8 15, i8 undef, i8 116, i8 8, i8 0, i8 undef, i8 88, i8 31, i8 0, i8 0, i8 -2, i8 -8, i8 4, i8 0, i8 -59, i8 18, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 -1729945884, i8 12, i8 2, i8 0, i8 undef, i8 -95, i8 14, i8 0, i8 undef, i8 -123, i8 25, i8 0, i8 0, i8 0, i8 41, i8 3, i8 0, i8 22, i8 51, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 1835773250, i8 108, i8 0, i8 0, i8 undef, i8 28, i8 -15, i8 -1, i8 undef, i8 109, i8 20, i8 0, i8 0, i8 30, i8 114, i8 6, i8 0, i8 -90, i8 12, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 -7, i8 106, i8 -4, i8 15, i8 undef, i8 102, i8 12, i8 0, i8 undef, i8 -24, i8 14, i8 0, i8 0, i8 92, i8 85, i8 1, i8 0, i8 -23, i8 61, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 -1729945884, i8 12, i8 2, i8 0, i8 undef, i8 -95, i8 14, i8 0, i8 undef, i8 -123, i8 25, i8 0, i8 0, i8 0, i8 41, i8 3, i8 0, i8 22, i8 51, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 -7, i8 106, i8 -4, i8 15, i8 undef, i8 102, i8 12, i8 0, i8 undef, i8 -24, i8 14, i8 0, i8 0, i8 92, i8 85, i8 1, i8 0, i8 -23, i8 61, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 1835773250, i8 108, i8 0, i8 0, i8 undef, i8 28, i8 -15, i8 -1, i8 undef, i8 109, i8 20, i8 0, i8 0, i8 30, i8 114, i8 6, i8 0, i8 -90, i8 12, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 -1729945884, i8 12, i8 2, i8 0, i8 undef, i8 -95, i8 14, i8 0, i8 undef, i8 -123, i8 25, i8 0, i8 0, i8 0, i8 41, i8 3, i8 0, i8 22, i8 51, i8 0, i8 0 } }>, <{ { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } }> <{ { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 83317218, i8 -42, i8 -4, i8 15, i8 undef, i8 123, i8 9, i8 0, i8 undef, i8 -121, i8 21, i8 0, i8 0, i8 -121, i8 -73, i8 5, i8 0, i8 -98, i8 27, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 83317218, i8 -42, i8 -4, i8 15, i8 undef, i8 123, i8 9, i8 0, i8 undef, i8 -121, i8 21, i8 0, i8 0, i8 -121, i8 -73, i8 5, i8 0, i8 -98, i8 27, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 -1256296454, i8 -103, i8 -3, i8 15, i8 undef, i8 -101, i8 8, i8 0, i8 undef, i8 -100, i8 3, i8 0, i8 0, i8 28, i8 -71, i8 3, i8 0, i8 -93, i8 76, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 -1, i8 -68, i8 -2, i8 15, i8 undef, i8 -97, i8 2, i8 0, i8 undef, i8 -108, i8 23, i8 0, i8 0, i8 24, i8 -25, i8 2, i8 0, i8 -125, i8 88, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 6, i8 58, i8 -1, i8 15, i8 undef, i8 98, i8 -1, i8 -1, i8 undef, i8 115, i8 14, i8 0, i8 0, i8 25, i8 -77, i8 14, i8 0, i8 18, i8 8, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 -1256296454, i8 -103, i8 -3, i8 15, i8 undef, i8 -101, i8 8, i8 0, i8 undef, i8 -100, i8 3, i8 0, i8 0, i8 28, i8 -71, i8 3, i8 0, i8 -93, i8 76, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 6, i8 58, i8 -1, i8 15, i8 undef, i8 98, i8 -1, i8 -1, i8 undef, i8 115, i8 14, i8 0, i8 0, i8 25, i8 -77, i8 14, i8 0, i8 18, i8 8, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 -1, i8 -68, i8 -2, i8 15, i8 undef, i8 -97, i8 2, i8 0, i8 undef, i8 -108, i8 23, i8 0, i8 0, i8 24, i8 -25, i8 2, i8 0, i8 -125, i8 88, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 -1256296454, i8 -103, i8 -3, i8 15, i8 undef, i8 -101, i8 8, i8 0, i8 undef, i8 -100, i8 3, i8 0, i8 0, i8 28, i8 -71, i8 3, i8 0, i8 -93, i8 76, i8 0, i8 0 } }> }>, <{ <{ { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } }>, <{ { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } }>, <{ { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } }>, <{ { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } }>, <{ { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } }> }> <{ <{ { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } }> <{ { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 9, i8 -46, i8 -3, i8 15, i8 undef, i8 116, i8 8, i8 0, i8 undef, i8 88, i8 31, i8 0, i8 0, i8 -2, i8 -8, i8 4, i8 0, i8 -59, i8 18, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 0, i8 -99, i8 -4, i8 15, i8 undef, i8 -126, i8 -3, i8 -1, i8 undef, i8 -58, i8 20, i8 0, i8 0, i8 48, i8 27, i8 0, i8 0, i8 110, i8 37, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 9, i8 -46, i8 -3, i8 15, i8 undef, i8 116, i8 8, i8 0, i8 undef, i8 88, i8 31, i8 0, i8 0, i8 -2, i8 -8, i8 4, i8 0, i8 -59, i8 18, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 1016053414, i8 -114, i8 -2, i8 15, i8 undef, i8 -43, i8 -9, i8 -1, i8 undef, i8 -83, i8 10, i8 0, i8 0, i8 110, i8 8, i8 15, i8 0, i8 -96, i8 28, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 -96548638, i8 65, i8 -1, i8 15, i8 undef, i8 -31, i8 -2, i8 -1, i8 undef, i8 49, i8 29, i8 0, i8 0, i8 -31, i8 -60, i8 12, i8 0, i8 110, i8 75, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 9, i8 -46, i8 -3, i8 15, i8 undef, i8 116, i8 8, i8 0, i8 undef, i8 88, i8 31, i8 0, i8 0, i8 -2, i8 -8, i8 4, i8 0, i8 -59, i8 18, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 -96548638, i8 65, i8 -1, i8 15, i8 undef, i8 -31, i8 -2, i8 -1, i8 undef, i8 49, i8 29, i8 0, i8 0, i8 -31, i8 -60, i8 12, i8 0, i8 110, i8 75, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 1016053414, i8 -114, i8 -2, i8 15, i8 undef, i8 -43, i8 -9, i8 -1, i8 undef, i8 -83, i8 10, i8 0, i8 0, i8 110, i8 8, i8 15, i8 0, i8 -96, i8 28, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 9, i8 -46, i8 -3, i8 15, i8 undef, i8 116, i8 8, i8 0, i8 undef, i8 88, i8 31, i8 0, i8 0, i8 -2, i8 -8, i8 4, i8 0, i8 -59, i8 18, i8 0, i8 0 } }>, <{ { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } }> <{ { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 1, i8 49, i8 -2, i8 15, i8 undef, i8 -32, i8 13, i8 0, i8 undef, i8 -127, i8 18, i8 0, i8 0, i8 9, i8 60, i8 13, i8 0, i8 -77, i8 21, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 1, i8 49, i8 -2, i8 15, i8 undef, i8 -32, i8 13, i8 0, i8 undef, i8 -127, i8 18, i8 0, i8 0, i8 9, i8 60, i8 13, i8 0, i8 -77, i8 21, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 83317218, i8 -42, i8 -4, i8 15, i8 undef, i8 123, i8 9, i8 0, i8 undef, i8 -121, i8 21, i8 0, i8 0, i8 -121, i8 -73, i8 5, i8 0, i8 -98, i8 27, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 -1181053651, i8 111, i8 2, i8 0, i8 undef, i8 -2, i8 0, i8 0, i8 undef, i8 -4, i8 25, i8 0, i8 0, i8 0, i8 -76, i8 10, i8 0, i8 -93, i8 23, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 1796036025, i8 18, i8 3, i8 0, i8 undef, i8 65, i8 13, i8 0, i8 undef, i8 -86, i8 14, i8 0, i8 0, i8 -101, i8 14, i8 9, i8 0, i8 -81, i8 63, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 83317218, i8 -42, i8 -4, i8 15, i8 undef, i8 123, i8 9, i8 0, i8 undef, i8 -121, i8 21, i8 0, i8 0, i8 -121, i8 -73, i8 5, i8 0, i8 -98, i8 27, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 1796036025, i8 18, i8 3, i8 0, i8 undef, i8 65, i8 13, i8 0, i8 undef, i8 -86, i8 14, i8 0, i8 0, i8 -101, i8 14, i8 9, i8 0, i8 -81, i8 63, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 -1181053651, i8 111, i8 2, i8 0, i8 undef, i8 -2, i8 0, i8 0, i8 undef, i8 -4, i8 25, i8 0, i8 0, i8 0, i8 -76, i8 10, i8 0, i8 -93, i8 23, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 83317218, i8 -42, i8 -4, i8 15, i8 undef, i8 123, i8 9, i8 0, i8 undef, i8 -121, i8 21, i8 0, i8 0, i8 -121, i8 -73, i8 5, i8 0, i8 -98, i8 27, i8 0, i8 0 } }>, <{ { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } }> <{ { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 0, i8 -99, i8 -4, i8 15, i8 undef, i8 -126, i8 -3, i8 -1, i8 undef, i8 -58, i8 20, i8 0, i8 0, i8 48, i8 27, i8 0, i8 0, i8 110, i8 37, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 0, i8 -99, i8 -4, i8 15, i8 undef, i8 -126, i8 -3, i8 -1, i8 undef, i8 -58, i8 20, i8 0, i8 0, i8 48, i8 27, i8 0, i8 0, i8 110, i8 37, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 9, i8 -46, i8 -3, i8 15, i8 undef, i8 116, i8 8, i8 0, i8 undef, i8 88, i8 31, i8 0, i8 0, i8 -2, i8 -8, i8 4, i8 0, i8 -59, i8 18, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 1016053414, i8 -114, i8 -2, i8 15, i8 undef, i8 -43, i8 -9, i8 -1, i8 undef, i8 -83, i8 10, i8 0, i8 0, i8 110, i8 8, i8 15, i8 0, i8 -96, i8 28, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 -96548638, i8 65, i8 -1, i8 15, i8 undef, i8 -31, i8 -2, i8 -1, i8 undef, i8 49, i8 29, i8 0, i8 0, i8 -31, i8 -60, i8 12, i8 0, i8 110, i8 75, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 9, i8 -46, i8 -3, i8 15, i8 undef, i8 116, i8 8, i8 0, i8 undef, i8 88, i8 31, i8 0, i8 0, i8 -2, i8 -8, i8 4, i8 0, i8 -59, i8 18, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 -96548638, i8 65, i8 -1, i8 15, i8 undef, i8 -31, i8 -2, i8 -1, i8 undef, i8 49, i8 29, i8 0, i8 0, i8 -31, i8 -60, i8 12, i8 0, i8 110, i8 75, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 1016053414, i8 -114, i8 -2, i8 15, i8 undef, i8 -43, i8 -9, i8 -1, i8 undef, i8 -83, i8 10, i8 0, i8 0, i8 110, i8 8, i8 15, i8 0, i8 -96, i8 28, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 9, i8 -46, i8 -3, i8 15, i8 undef, i8 116, i8 8, i8 0, i8 undef, i8 88, i8 31, i8 0, i8 0, i8 -2, i8 -8, i8 4, i8 0, i8 -59, i8 18, i8 0, i8 0 } }>, <{ { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } }> <{ { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 1, i8 49, i8 -2, i8 15, i8 undef, i8 -32, i8 13, i8 0, i8 undef, i8 -127, i8 18, i8 0, i8 0, i8 9, i8 60, i8 13, i8 0, i8 -77, i8 21, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 1, i8 49, i8 -2, i8 15, i8 undef, i8 -32, i8 13, i8 0, i8 undef, i8 -127, i8 18, i8 0, i8 0, i8 9, i8 60, i8 13, i8 0, i8 -77, i8 21, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 83317218, i8 -42, i8 -4, i8 15, i8 undef, i8 123, i8 9, i8 0, i8 undef, i8 -121, i8 21, i8 0, i8 0, i8 -121, i8 -73, i8 5, i8 0, i8 -98, i8 27, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 -1181053651, i8 111, i8 2, i8 0, i8 undef, i8 -2, i8 0, i8 0, i8 undef, i8 -4, i8 25, i8 0, i8 0, i8 0, i8 -76, i8 10, i8 0, i8 -93, i8 23, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 1796036025, i8 18, i8 3, i8 0, i8 undef, i8 65, i8 13, i8 0, i8 undef, i8 -86, i8 14, i8 0, i8 0, i8 -101, i8 14, i8 9, i8 0, i8 -81, i8 63, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 83317218, i8 -42, i8 -4, i8 15, i8 undef, i8 123, i8 9, i8 0, i8 undef, i8 -121, i8 21, i8 0, i8 0, i8 -121, i8 -73, i8 5, i8 0, i8 -98, i8 27, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 1796036025, i8 18, i8 3, i8 0, i8 undef, i8 65, i8 13, i8 0, i8 undef, i8 -86, i8 14, i8 0, i8 0, i8 -101, i8 14, i8 9, i8 0, i8 -81, i8 63, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 -1181053651, i8 111, i8 2, i8 0, i8 undef, i8 -2, i8 0, i8 0, i8 undef, i8 -4, i8 25, i8 0, i8 0, i8 0, i8 -76, i8 10, i8 0, i8 -93, i8 23, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 83317218, i8 -42, i8 -4, i8 15, i8 undef, i8 123, i8 9, i8 0, i8 undef, i8 -121, i8 21, i8 0, i8 0, i8 -121, i8 -73, i8 5, i8 0, i8 -98, i8 27, i8 0, i8 0 } }>, <{ { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } }> <{ { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 0, i8 -99, i8 -4, i8 15, i8 undef, i8 -126, i8 -3, i8 -1, i8 undef, i8 -58, i8 20, i8 0, i8 0, i8 48, i8 27, i8 0, i8 0, i8 110, i8 37, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 0, i8 -99, i8 -4, i8 15, i8 undef, i8 -126, i8 -3, i8 -1, i8 undef, i8 -58, i8 20, i8 0, i8 0, i8 48, i8 27, i8 0, i8 0, i8 110, i8 37, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 9, i8 -46, i8 -3, i8 15, i8 undef, i8 116, i8 8, i8 0, i8 undef, i8 88, i8 31, i8 0, i8 0, i8 -2, i8 -8, i8 4, i8 0, i8 -59, i8 18, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 1016053414, i8 -114, i8 -2, i8 15, i8 undef, i8 -43, i8 -9, i8 -1, i8 undef, i8 -83, i8 10, i8 0, i8 0, i8 110, i8 8, i8 15, i8 0, i8 -96, i8 28, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 -96548638, i8 65, i8 -1, i8 15, i8 undef, i8 -31, i8 -2, i8 -1, i8 undef, i8 49, i8 29, i8 0, i8 0, i8 -31, i8 -60, i8 12, i8 0, i8 110, i8 75, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 9, i8 -46, i8 -3, i8 15, i8 undef, i8 116, i8 8, i8 0, i8 undef, i8 88, i8 31, i8 0, i8 0, i8 -2, i8 -8, i8 4, i8 0, i8 -59, i8 18, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 -96548638, i8 65, i8 -1, i8 15, i8 undef, i8 -31, i8 -2, i8 -1, i8 undef, i8 49, i8 29, i8 0, i8 0, i8 -31, i8 -60, i8 12, i8 0, i8 110, i8 75, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 1016053414, i8 -114, i8 -2, i8 15, i8 undef, i8 -43, i8 -9, i8 -1, i8 undef, i8 -83, i8 10, i8 0, i8 0, i8 110, i8 8, i8 15, i8 0, i8 -96, i8 28, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 9, i8 -46, i8 -3, i8 15, i8 undef, i8 116, i8 8, i8 0, i8 undef, i8 88, i8 31, i8 0, i8 0, i8 -2, i8 -8, i8 4, i8 0, i8 -59, i8 18, i8 0, i8 0 } }> }> }>, align 4
+@g_304 = internal global i32* @g_52, align 4
+@func_26.l_545 = private unnamed_addr constant { i8, i8, [2 x i8] } { i8 59, i8 0, [2 x i8] undef }, align 4
+@func_26.l_555 = private unnamed_addr constant %struct.S1 { i32 0, i32 385064286, i8 1, i16 6 }, align 4
+@func_26.l_556 = private unnamed_addr constant { i8, i8, [2 x i8] } { i8 116, i8 127, [2 x i8] undef }, align 4
+@func_26.l_519 = private unnamed_addr constant [3 x [8 x [7 x i16]]] [[8 x [7 x i16]] [[7 x i16] [i16 1, i16 29750, i16 2870, i16 -1, i16 4901, i16 -1, i16 6254], [7 x i16] [i16 0, i16 -1, i16 21433, i16 -26659, i16 -9861, i16 -6, i16 0], [7 x i16] [i16 -17574, i16 -5, i16 2870, i16 -26602, i16 -4, i16 -1, i16 3424], [7 x i16] [i16 -4228, i16 -19682, i16 -1, i16 -12043, i16 -23978, i16 6254, i16 0], [7 x i16] [i16 -12017, i16 0, i16 -26659, i16 -11464, i16 21433, i16 9, i16 -19572], [7 x i16] [i16 0, i16 9, i16 1, i16 0, i16 0, i16 -1, i16 1], [7 x i16] [i16 2870, i16 26454, i16 -19682, i16 9, i16 0, i16 1, i16 -9861], [7 x i16] [i16 14396, i16 6, i16 0, i16 -3602, i16 4, i16 1, i16 -17583]], [8 x [7 x i16]] [[7 x i16] [i16 -6, i16 29079, i16 4901, i16 1, i16 -18681, i16 -1, i16 26360], [7 x i16] [i16 -4, i16 -1, i16 0, i16 1, i16 -5, i16 9, i16 -1], [7 x i16] [i16 1, i16 0, i16 2174, i16 -1, i16 -4, i16 -19343, i16 9], [7 x i16] [i16 0, i16 -5, i16 -22340, i16 -22340, i16 -5, i16 0, i16 5640], [7 x i16] [i16 -26659, i16 -8480, i16 9, i16 -9861, i16 2174, i16 -5, i16 0], [7 x i16] [i16 -1, i16 -1, i16 -6, i16 1, i16 3424, i16 12084, i16 -1], [7 x i16] [i16 6, i16 -8480, i16 -17583, i16 -3, i16 -7, i16 9, i16 -5], [7 x i16] [i16 -3602, i16 -5, i16 0, i16 6254, i16 -1, i16 4, i16 -17574]], [8 x [7 x i16]] [[7 x i16] [i16 -1, i16 -22340, i16 -7, i16 14396, i16 -1, i16 -3602, i16 1], [7 x i16] [i16 -31686, i16 12084, i16 -4228, i16 1, i16 -19841, i16 -8480, i16 0], [7 x i16] [i16 0, i16 -1, i16 1, i16 -3, i16 -17515, i16 1, i16 -32701], [7 x i16] [i16 -1, i16 6, i16 -3, i16 -32701, i16 -17515, i16 0, i16 0], [7 x i16] [i16 1, i16 -1, i16 26360, i16 -23978, i16 -19841, i16 2174, i16 -1], [7 x i16] [i16 0, i16 -3602, i16 1, i16 -7, i16 -1, i16 1, i16 0], [7 x i16] [i16 0, i16 0, i16 1, i16 -19841, i16 -1, i16 -11464, i16 -11464], [7 x i16] [i16 -7, i16 -30008, i16 3424, i16 -30008, i16 -7, i16 -4770, i16 26360]]], align 2
+@func_26.l_522 = private unnamed_addr constant %struct.S1 { i32 1684909689, i32 -8, i8 1, i16 -26127 }, align 4
+@g_524 = internal unnamed_addr global [2 x [8 x [6 x %struct.S1*]]] [[8 x [6 x %struct.S1*]] [[6 x %struct.S1*] [%struct.S1* null, %struct.S1* bitcast (i8* getelementptr (i8* bitcast ([9 x [3 x [7 x %struct.S1]]]* @g_404 to i8*), i64 912) to %struct.S1*), %struct.S1* bitcast (i8* getelementptr (i8* bitcast ([9 x [3 x [7 x %struct.S1]]]* @g_404 to i8*), i64 1236) to %struct.S1*), %struct.S1* @g_99, %struct.S1* bitcast (i8* getelementptr (i8* bitcast ([9 x [3 x [7 x %struct.S1]]]* @g_404 to i8*), i64 1236) to %struct.S1*), %struct.S1* bitcast (i8* getelementptr (i8* bitcast ([9 x [3 x [7 x %struct.S1]]]* @g_404 to i8*), i64 912) to %struct.S1*)], [6 x %struct.S1*] [%struct.S1* null, %struct.S1* bitcast (i8* getelementptr (i8* bitcast ([9 x [3 x [7 x %struct.S1]]]* @g_404 to i8*), i64 912) to %struct.S1*), %struct.S1* bitcast (i8* getelementptr (i8* bitcast ([9 x [3 x [7 x %struct.S1]]]* @g_404 to i8*), i64 1236) to %struct.S1*), %struct.S1* @g_99, %struct.S1* bitcast (i8* getelementptr (i8* bitcast ([9 x [3 x [7 x %struct.S1]]]* @g_404 to i8*), i64 1236) to %struct.S1*), %struct.S1* bitcast (i8* getelementptr (i8* bitcast ([9 x [3 x [7 x %struct.S1]]]* @g_404 to i8*), i64 912) to %struct.S1*)], [6 x %struct.S1*] [%struct.S1* null, %struct.S1* bitcast (i8* getelementptr (i8* bitcast ([9 x [3 x [7 x %struct.S1]]]* @g_404 to i8*), i64 912) to %struct.S1*), %struct.S1* bitcast (i8* getelementptr (i8* bitcast ([9 x [3 x [7 x %struct.S1]]]* @g_404 to i8*), i64 1236) to %struct.S1*), %struct.S1* @g_99, %struct.S1* bitcast (i8* getelementptr (i8* bitcast ([9 x [3 x [7 x %struct.S1]]]* @g_404 to i8*), i64 1236) to %struct.S1*), %struct.S1* bitcast (i8* getelementptr (i8* bitcast ([9 x [3 x [7 x %struct.S1]]]* @g_404 to i8*), i64 912) to %struct.S1*)], [6 x %struct.S1*] [%struct.S1* null, %struct.S1* bitcast (i8* getelementptr (i8* bitcast ([9 x [3 x [7 x %struct.S1]]]* @g_404 to i8*), i64 912) to %struct.S1*), %struct.S1* bitcast (i8* getelementptr (i8* bitcast ([9 x [3 x [7 x %struct.S1]]]* @g_404 to i8*), i64 1236) to %struct.S1*), %struct.S1* @g_99, %struct.S1* bitcast (i8* getelementptr (i8* bitcast ([9 x [3 x [7 x %struct.S1]]]* @g_404 to i8*), i64 1236) to %struct.S1*), %struct.S1* bitcast (i8* getelementptr (i8* bitcast ([9 x [3 x [7 x %struct.S1]]]* @g_404 to i8*), i64 912) to %struct.S1*)], [6 x %struct.S1*] [%struct.S1* null, %struct.S1* bitcast (i8* getelementptr (i8* bitcast ([9 x [3 x [7 x %struct.S1]]]* @g_404 to i8*), i64 912) to %struct.S1*), %struct.S1* bitcast (i8* getelementptr (i8* bitcast ([9 x [3 x [7 x %struct.S1]]]* @g_404 to i8*), i64 1236) to %struct.S1*), %struct.S1* @g_99, %struct.S1* bitcast (i8* getelementptr (i8* bitcast ([9 x [3 x [7 x %struct.S1]]]* @g_404 to i8*), i64 1236) to %struct.S1*), %struct.S1* bitcast (i8* getelementptr (i8* bitcast ([9 x [3 x [7 x %struct.S1]]]* @g_404 to i8*), i64 912) to %struct.S1*)], [6 x %struct.S1*] [%struct.S1* null, %struct.S1* bitcast (i8* getelementptr (i8* bitcast ([9 x [3 x [7 x %struct.S1]]]* @g_404 to i8*), i64 912) to %struct.S1*), %struct.S1* bitcast (i8* getelementptr (i8* bitcast ([9 x [3 x [7 x %struct.S1]]]* @g_404 to i8*), i64 1236) to %struct.S1*), %struct.S1* @g_99, %struct.S1* bitcast (i8* getelementptr (i8* bitcast ([9 x [3 x [7 x %struct.S1]]]* @g_404 to i8*), i64 1236) to %struct.S1*), %struct.S1* bitcast (i8* getelementptr (i8* bitcast ([9 x [3 x [7 x %struct.S1]]]* @g_404 to i8*), i64 912) to %struct.S1*)], [6 x %struct.S1*] [%struct.S1* null, %struct.S1* bitcast (i8* getelementptr (i8* bitcast ([9 x [3 x [7 x %struct.S1]]]* @g_404 to i8*), i64 912) to %struct.S1*), %struct.S1* bitcast (i8* getelementptr (i8* bitcast ([9 x [3 x [7 x %struct.S1]]]* @g_404 to i8*), i64 1236) to %struct.S1*), %struct.S1* @g_99, %struct.S1* bitcast (i8* getelementptr (i8* bitcast ([9 x [3 x [7 x %struct.S1]]]* @g_404 to i8*), i64 1236) to %struct.S1*), %struct.S1* bitcast (i8* getelementptr (i8* bitcast ([9 x [3 x [7 x %struct.S1]]]* @g_404 to i8*), i64 912) to %struct.S1*)], [6 x %struct.S1*] [%struct.S1* null, %struct.S1* bitcast (i8* getelementptr (i8* bitcast ([9 x [3 x [7 x %struct.S1]]]* @g_404 to i8*), i64 912) to %struct.S1*), %struct.S1* bitcast (i8* getelementptr (i8* bitcast ([9 x [3 x [7 x %struct.S1]]]* @g_404 to i8*), i64 1236) to %struct.S1*), %struct.S1* @g_99, %struct.S1* bitcast (i8* getelementptr (i8* bitcast ([9 x [3 x [7 x %struct.S1]]]* @g_404 to i8*), i64 1236) to %struct.S1*), %struct.S1* bitcast (i8* getelementptr (i8* bitcast ([9 x [3 x [7 x %struct.S1]]]* @g_404 to i8*), i64 912) to %struct.S1*)]], [8 x [6 x %struct.S1*]] [[6 x %struct.S1*] [%struct.S1* null, %struct.S1* bitcast (i8* getelementptr (i8* bitcast ([9 x [3 x [7 x %struct.S1]]]* @g_404 to i8*), i64 912) to %struct.S1*), %struct.S1* bitcast (i8* getelementptr (i8* bitcast ([9 x [3 x [7 x %struct.S1]]]* @g_404 to i8*), i64 1236) to %struct.S1*), %struct.S1* @g_99, %struct.S1* bitcast (i8* getelementptr (i8* bitcast ([9 x [3 x [7 x %struct.S1]]]* @g_404 to i8*), i64 1236) to %struct.S1*), %struct.S1* bitcast (i8* getelementptr (i8* bitcast ([9 x [3 x [7 x %struct.S1]]]* @g_404 to i8*), i64 912) to %struct.S1*)], [6 x %struct.S1*] [%struct.S1* null, %struct.S1* bitcast (i8* getelementptr (i8* bitcast ([9 x [3 x [7 x %struct.S1]]]* @g_404 to i8*), i64 912) to %struct.S1*), %struct.S1* bitcast (i8* getelementptr (i8* bitcast ([9 x [3 x [7 x %struct.S1]]]* @g_404 to i8*), i64 1236) to %struct.S1*), %struct.S1* @g_99, %struct.S1* bitcast (i8* getelementptr (i8* bitcast ([9 x [3 x [7 x %struct.S1]]]* @g_404 to i8*), i64 1236) to %struct.S1*), %struct.S1* bitcast (i8* getelementptr (i8* bitcast ([9 x [3 x [7 x %struct.S1]]]* @g_404 to i8*), i64 912) to %struct.S1*)], [6 x %struct.S1*] [%struct.S1* null, %struct.S1* bitcast (i8* getelementptr (i8* bitcast ([9 x [3 x [7 x %struct.S1]]]* @g_404 to i8*), i64 912) to %struct.S1*), %struct.S1* bitcast (i8* getelementptr (i8* bitcast ([9 x [3 x [7 x %struct.S1]]]* @g_404 to i8*), i64 1236) to %struct.S1*), %struct.S1* @g_99, %struct.S1* bitcast (i8* getelementptr (i8* bitcast ([9 x [3 x [7 x %struct.S1]]]* @g_404 to i8*), i64 1236) to %struct.S1*), %struct.S1* bitcast (i8* getelementptr (i8* bitcast ([9 x [3 x [7 x %struct.S1]]]* @g_404 to i8*), i64 912) to %struct.S1*)], [6 x %struct.S1*] [%struct.S1* null, %struct.S1* bitcast (i8* getelementptr (i8* bitcast ([9 x [3 x [7 x %struct.S1]]]* @g_404 to i8*), i64 912) to %struct.S1*), %struct.S1* bitcast (i8* getelementptr (i8* bitcast ([9 x [3 x [7 x %struct.S1]]]* @g_404 to i8*), i64 1236) to %struct.S1*), %struct.S1* @g_99, %struct.S1* bitcast (i8* getelementptr (i8* bitcast ([9 x [3 x [7 x %struct.S1]]]* @g_404 to i8*), i64 1236) to %struct.S1*), %struct.S1* bitcast (i8* getelementptr (i8* bitcast ([9 x [3 x [7 x %struct.S1]]]* @g_404 to i8*), i64 912) to %struct.S1*)], [6 x %struct.S1*] [%struct.S1* null, %struct.S1* bitcast (i8* getelementptr (i8* bitcast ([9 x [3 x [7 x %struct.S1]]]* @g_404 to i8*), i64 912) to %struct.S1*), %struct.S1* bitcast (i8* getelementptr (i8* bitcast ([9 x [3 x [7 x %struct.S1]]]* @g_404 to i8*), i64 1236) to %struct.S1*), %struct.S1* @g_99, %struct.S1* bitcast (i8* getelementptr (i8* bitcast ([9 x [3 x [7 x %struct.S1]]]* @g_404 to i8*), i64 1236) to %struct.S1*), %struct.S1* bitcast (i8* getelementptr (i8* bitcast ([9 x [3 x [7 x %struct.S1]]]* @g_404 to i8*), i64 912) to %struct.S1*)], [6 x %struct.S1*] [%struct.S1* null, %struct.S1* bitcast (i8* getelementptr (i8* bitcast ([9 x [3 x [7 x %struct.S1]]]* @g_404 to i8*), i64 912) to %struct.S1*), %struct.S1* bitcast (i8* getelementptr (i8* bitcast ([9 x [3 x [7 x %struct.S1]]]* @g_404 to i8*), i64 1236) to %struct.S1*), %struct.S1* @g_99, %struct.S1* bitcast (i8* getelementptr (i8* bitcast ([9 x [3 x [7 x %struct.S1]]]* @g_404 to i8*), i64 1236) to %struct.S1*), %struct.S1* bitcast (i8* getelementptr (i8* bitcast ([9 x [3 x [7 x %struct.S1]]]* @g_404 to i8*), i64 912) to %struct.S1*)], [6 x %struct.S1*] [%struct.S1* null, %struct.S1* bitcast (i8* getelementptr (i8* bitcast ([9 x [3 x [7 x %struct.S1]]]* @g_404 to i8*), i64 912) to %struct.S1*), %struct.S1* bitcast (i8* getelementptr (i8* bitcast ([9 x [3 x [7 x %struct.S1]]]* @g_404 to i8*), i64 1236) to %struct.S1*), %struct.S1* @g_99, %struct.S1* bitcast (i8* getelementptr (i8* bitcast ([9 x [3 x [7 x %struct.S1]]]* @g_404 to i8*), i64 1236) to %struct.S1*), %struct.S1* bitcast (i8* getelementptr (i8* bitcast ([9 x [3 x [7 x %struct.S1]]]* @g_404 to i8*), i64 912) to %struct.S1*)], [6 x %struct.S1*] [%struct.S1* null, %struct.S1* bitcast (i8* getelementptr (i8* bitcast ([9 x [3 x [7 x %struct.S1]]]* @g_404 to i8*), i64 912) to %struct.S1*), %struct.S1* bitcast (i8* getelementptr (i8* bitcast ([9 x [3 x [7 x %struct.S1]]]* @g_404 to i8*), i64 1236) to %struct.S1*), %struct.S1* @g_99, %struct.S1* bitcast (i8* getelementptr (i8* bitcast ([9 x [3 x [7 x %struct.S1]]]* @g_404 to i8*), i64 1236) to %struct.S1*), %struct.S1* bitcast (i8* getelementptr (i8* bitcast ([9 x [3 x [7 x %struct.S1]]]* @g_404 to i8*), i64 912) to %struct.S1*)]]], align 4
+@func_26.l_548 = private unnamed_addr constant [5 x i16] [i16 -1728, i16 -1728, i16 -1728, i16 -1728, i16 -1728], align 2
+@func_26.l_543 = private unnamed_addr constant { i8, i8, [2 x i8] } { i8 91, i8 0, [2 x i8] undef }, align 4
+@func_10.l_1026 = private unnamed_addr constant %union.U4 { i32 -10 }, align 4
+@func_10.l_1189 = private unnamed_addr constant { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 -313965653, i8 5, i8 -3, i8 15, i8 undef, i8 34, i8 -3, i8 -1, i8 undef, i8 -96, i8 16, i8 0, i8 0, i8 -60, i8 -101, i8 12, i8 0, i8 -31, i8 6, i8 0, i8 0 }, align 4
+@func_10.l_1033 = private unnamed_addr constant { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 1, i8 -70, i8 2, i8 0, i8 undef, i8 -123, i8 3, i8 0, i8 undef, i8 -45, i8 4, i8 0, i8 0, i8 -20, i8 115, i8 1, i8 0, i8 83, i8 66, i8 0, i8 0 }, align 4
+@func_10.l_1050 = private unnamed_addr constant [4 x i32] [i32 400752475, i32 400752475, i32 400752475, i32 400752475], align 4
+@func_10.l_1075 = private unnamed_addr constant { i8, i8, [2 x i8] } { i8 83, i8 0, [2 x i8] undef }, align 4
+@func_10.l_1143 = private unnamed_addr constant %struct.S1 { i32 1162530280, i32 0, i8 -63, i16 -1 }, align 4
+@func_10.l_1044 = private unnamed_addr constant [5 x i32*] [i32* @g_465, i32* @g_465, i32* @g_465, i32* @g_465, i32* @g_465], align 4
+@func_31.l_43 = private unnamed_addr constant %struct.S3 { i32 1332693062, i32 1 }, align 4
+@func_31.l_50 = private unnamed_addr constant %struct.S3 { i32 4, i32 -7 }, align 4
+@func_31.l_406 = private unnamed_addr constant [7 x %union.U4] [%union.U4 { i32 -3 }, %union.U4 { i32 -1216898264 }, %union.U4 { i32 -3 }, %union.U4 { i32 -3 }, %union.U4 { i32 -1216898264 }, %union.U4 { i32 -3 }, %union.U4 { i32 -3 }], align 4
+@func_31.l_167 = internal constant %struct.S1 { i32 1017613823, i32 -1908625821, i8 1, i16 0 }, align 4
+@func_38.l_176 = private unnamed_addr constant { i8, i8, [2 x i8] } { i8 87, i8 127, [2 x i8] undef }, align 4
+@func_38.l_262 = private unnamed_addr constant { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 -1043958261, i8 -54, i8 -1, i8 15, i8 undef, i8 -70, i8 8, i8 0, i8 undef, i8 -64, i8 13, i8 0, i8 0, i8 0, i8 -22, i8 10, i8 0, i8 92, i8 1, i8 0, i8 0 }, align 8
+@func_38.l_293 = private unnamed_addr constant %struct.S3 { i32 -183694793, i32 -5 }, align 4
+@func_38.l_378 = private unnamed_addr constant [4 x i32] [i32 -1651091075, i32 -1651091075, i32 -1651091075, i32 -1651091075], align 4
+@func_38.l_217 = private unnamed_addr constant { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 -1664524927, i8 39, i8 -4, i8 15, i8 undef, i8 20, i8 -6, i8 -1, i8 undef, i8 -28, i8 27, i8 0, i8 0, i8 -87, i8 -19, i8 8, i8 0, i8 -73, i8 43, i8 0, i8 0 }, align 8
+@func_38.l_259 = private unnamed_addr constant [5 x [5 x [8 x i32]]] [[5 x [8 x i32]] [[8 x i32] [i32 1078268908, i32 1, i32 223410181, i32 -3, i32 223410181, i32 1, i32 1078268908, i32 1702862848], [8 x i32] [i32 -1, i32 -8, i32 1, i32 -1117972742, i32 -339602607, i32 223410181, i32 -601140634, i32 -99824884], [8 x i32] [i32 1, i32 0, i32 -1610789521, i32 -2, i32 -339602607, i32 1078268908, i32 1727150236, i32 -3], [8 x i32] [i32 -1, i32 7, i32 0, i32 -99824884, i32 223410181, i32 449187001, i32 1, i32 1], [8 x i32] [i32 1078268908, i32 1, i32 -8, i32 -339602607, i32 4, i32 1, i32 -1762498432, i32 449187001]], [5 x [8 x i32]] [[8 x i32] [i32 591018478, i32 -1509313059, i32 -99824884, i32 -638114951, i32 -1355867497, i32 6, i32 7, i32 -1], [8 x i32] [i32 -8, i32 -8, i32 1, i32 0, i32 -1, i32 -4, i32 -4, i32 -2], [8 x i32] [i32 -4, i32 -8, i32 -8, i32 -4, i32 449187001, i32 -1117972742, i32 -1762498432, i32 1770112494], [8 x i32] [i32 1, i32 -1610789521, i32 -1, i32 -99824884, i32 -1, i32 -1739949486, i32 551870971, i32 1], [8 x i32] [i32 -1, i32 -1610789521, i32 1, i32 -1509313059, i32 -8, i32 -1117972742, i32 1, i32 -259527796]], [5 x [8 x i32]] [[8 x i32] [i32 -3, i32 -8, i32 6, i32 -1, i32 -1, i32 -4, i32 -1355867497, i32 0], [8 x i32] [i32 -601140634, i32 1206242802, i32 4, i32 1, i32 1, i32 1262780235, i32 -8, i32 223410181], [8 x i32] [i32 -548640644, i32 -4, i32 -1610789521, i32 -3, i32 1206242802, i32 0, i32 -1, i32 -99824884], [8 x i32] [i32 -8, i32 -638114951, i32 591018478, i32 -1332204189, i32 0, i32 -1332204189, i32 591018478, i32 -638114951], [8 x i32] [i32 1702862848, i32 -966943802, i32 2016316978, i32 1262780235, i32 -1, i32 -1, i32 1770112494, i32 -8]], [5 x [8 x i32]] [[8 x i32] [i32 707900158, i32 1727150236, i32 -1, i32 223410181, i32 1702862848, i32 0, i32 1770112494, i32 2016316978], [8 x i32] [i32 0, i32 223410181, i32 2016316978, i32 -1, i32 -1610789521, i32 1, i32 591018478, i32 -548640644], [8 x i32] [i32 -1610789521, i32 1, i32 591018478, i32 -548640644, i32 -966943802, i32 -1, i32 -1, i32 1702862848], [8 x i32] [i32 1840137829, i32 -99824884, i32 -1610789521, i32 1, i32 -1117972742, i32 -8, i32 -8, i32 1], [8 x i32] [i32 -1509313059, i32 0, i32 4, i32 -638114951, i32 1078268908, i32 1, i32 -1355867497, i32 -1355867497]], [5 x [8 x i32]] [[8 x i32] [i32 1770112494, i32 1, i32 6, i32 6, i32 1, i32 1770112494, i32 1, i32 8], [8 x i32] [i32 -966943802, i32 707900158, i32 1, i32 1, i32 -1509313059, i32 1, i32 551870971, i32 -1117972742], [8 x i32] [i32 6, i32 1, i32 -1, i32 1, i32 -3, i32 2016316978, i32 -1762498432, i32 8], [8 x i32] [i32 0, i32 -3, i32 -8, i32 6, i32 -1, i32 -1, i32 -4, i32 -1355867497], [8 x i32] [i32 -259527796, i32 0, i32 1, i32 -638114951, i32 1840137829, i32 -1, i32 -966943802, i32 1]]], align 4
+@func_38.l_235 = private unnamed_addr constant { i8, i8, [2 x i8] } { i8 -27, i8 127, [2 x i8] undef }, align 4
+@func_38.l_292 = private unnamed_addr constant [2 x [4 x %struct.S3*]] [[4 x %struct.S3*] [%struct.S3* bitcast (i8* getelementptr (i8* bitcast ([9 x %struct.S3]* @g_49 to i8*), i64 24) to %struct.S3*), %struct.S3* bitcast (i8* getelementptr (i8* bitcast ([9 x %struct.S3]* @g_49 to i8*), i64 24) to %struct.S3*), %struct.S3* bitcast (i8* getelementptr (i8* bitcast ([9 x %struct.S3]* @g_49 to i8*), i64 24) to %struct.S3*), %struct.S3* bitcast (i8* getelementptr (i8* bitcast ([9 x %struct.S3]* @g_49 to i8*), i64 24) to %struct.S3*)], [4 x %struct.S3*] [%struct.S3* bitcast (i8* getelementptr (i8* bitcast ([9 x %struct.S3]* @g_49 to i8*), i64 24) to %struct.S3*), %struct.S3* bitcast (i8* getelementptr (i8* bitcast ([9 x %struct.S3]* @g_49 to i8*), i64 24) to %struct.S3*), %struct.S3* bitcast (i8* getelementptr (i8* bitcast ([9 x %struct.S3]* @g_49 to i8*), i64 24) to %struct.S3*), %struct.S3* bitcast (i8* getelementptr (i8* bitcast ([9 x %struct.S3]* @g_49 to i8*), i64 24) to %struct.S3*)]], align 4
+@func_38.l_349 = private unnamed_addr constant [3 x [6 x i32**]] [[6 x i32**] [i32** @g_304, i32** @g_304, i32** @g_304, i32** @g_304, i32** @g_304, i32** @g_304], [6 x i32**] [i32** @g_304, i32** @g_304, i32** @g_304, i32** @g_304, i32** @g_304, i32** @g_304], [6 x i32**] [i32** @g_304, i32** @g_304, i32** @g_304, i32** @g_304, i32** @g_304, i32** @g_304]], align 4
+@func_38.l_321 = private unnamed_addr constant [6 x [7 x i32]] [[7 x i32] [i32 -5, i32 -5, i32 -692510939, i32 4, i32 -1, i32 4, i32 -692510939], [7 x i32] [i32 -1397227185, i32 -1397227185, i32 1054299477, i32 -1098985294, i32 1, i32 -1098985294, i32 1054299477], [7 x i32] [i32 -5, i32 -5, i32 -692510939, i32 -362345779, i32 -3, i32 -362345779, i32 -5], [7 x i32] [i32 1, i32 1, i32 -1397227185, i32 0, i32 -1801226716, i32 0, i32 -1397227185], [7 x i32] [i32 -1, i32 -1, i32 -5, i32 -362345779, i32 -3, i32 -362345779, i32 -5], [7 x i32] [i32 1, i32 1, i32 -1397227185, i32 0, i32 -1801226716, i32 0, i32 -1397227185]], align 4
+@func_38.l_392 = private unnamed_addr constant [1 x [2 x [8 x i32]]] [[2 x [8 x i32]] [[8 x i32] [i32 -1758527188, i32 0, i32 0, i32 -1758527188, i32 0, i32 0, i32 -1758527188, i32 0], [8 x i32] [i32 -1758527188, i32 -1758527188, i32 -8, i32 -1758527188, i32 -1758527188, i32 -8, i32 -1758527188, i32 -1758527188]]], align 4
+@func_19.l_603 = private unnamed_addr constant <{ { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } }> <{ { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 1, i8 1, i8 -1, i8 15, i8 undef, i8 -73, i8 11, i8 0, i8 undef, i8 13, i8 10, i8 0, i8 0, i8 0, i8 -82, i8 6, i8 0, i8 100, i8 77, i8 0, i8 0 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 1, i8 1, i8 -1, i8 15, i8 undef, i8 -73, i8 11, i8 0, i8 undef, i8 13, i8 10, i8 0, i8 0, i8 0, i8 -82, i8 6, i8 0, i8 100, i8 77, i8 0, i8 0 } }>, align 4
+@func_19.l_598 = private unnamed_addr constant [4 x i16*] [i16* @g_395, i16* @g_395, i16* @g_395, i16* @g_395], align 4
+@func_19.l_617 = private unnamed_addr constant [7 x [3 x i32]] [[3 x i32] [i32 1, i32 1, i32 -1], [3 x i32] [i32 3, i32 2, i32 -1], [3 x i32] [i32 2, i32 3, i32 -1], [3 x i32] [i32 1, i32 1, i32 -1], [3 x i32] [i32 3, i32 2, i32 -1], [3 x i32] [i32 2, i32 3, i32 -1], [3 x i32] [i32 1, i32 1, i32 1]], align 4
+@func_19.l_622 = private unnamed_addr constant { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 -1881615275, i8 -42, i8 1, i8 0, i8 undef, i8 -113, i8 3, i8 0, i8 undef, i8 4, i8 5, i8 0, i8 0, i8 1, i8 53, i8 7, i8 0, i8 90, i8 42, i8 0, i8 0 }, align 4
+@func_15.l_789 = private unnamed_addr constant [6 x %union.U4] [%union.U4 { i32 -1636516384 }, %union.U4 { i32 958775946 }, %union.U4 { i32 -1636516384 }, %union.U4 { i32 -1636516384 }, %union.U4 { i32 958775946 }, %union.U4 { i32 -1636516384 }], align 4
+@func_15.l_814 = private unnamed_addr constant [8 x [1 x [4 x i32]]] [[1 x [4 x i32]] [[4 x i32] [i32 -6, i32 6, i32 1822782642, i32 1]], [1 x [4 x i32]] [[4 x i32] [i32 -6, i32 1822782642, i32 -6, i32 0]], [1 x [4 x i32]] [[4 x i32] [i32 6, i32 1, i32 0, i32 0]], [1 x [4 x i32]] [[4 x i32] [i32 1822782642, i32 1822782642, i32 557110867, i32 1]], [1 x [4 x i32]] [[4 x i32] [i32 1, i32 6, i32 557110867, i32 6]], [1 x [4 x i32]] [[4 x i32] [i32 1822782642, i32 -6, i32 0, i32 557110867]], [1 x [4 x i32]] [[4 x i32] [i32 6, i32 -6, i32 -6, i32 6]], [1 x [4 x i32]] [[4 x i32] [i32 -6, i32 6, i32 1822782642, i32 1]]], align 4
+@func_15.l_963 = private unnamed_addr constant %struct.S1 { i32 8, i32 0, i8 -8, i16 1 }, align 4
+@func_15.l_765 = private unnamed_addr constant [7 x i32*] [i32* @g_465, i32* @g_465, i32* @g_532, i32* @g_465, i32* @g_465, i32* @g_532, i32* @g_465], align 4
+@func_15.l_773 = private unnamed_addr constant [10 x [2 x [1 x i8*]]] [[2 x [1 x i8*]] zeroinitializer, [2 x [1 x i8*]] zeroinitializer, [2 x [1 x i8*]] [[1 x i8*] [i8* @g_96], [1 x i8*] zeroinitializer], [2 x [1 x i8*]] zeroinitializer, [2 x [1 x i8*]] [[1 x i8*] zeroinitializer, [1 x i8*] [i8* @g_96]], [2 x [1 x i8*]] zeroinitializer, [2 x [1 x i8*]] zeroinitializer, [2 x [1 x i8*]] [[1 x i8*] [i8* @g_96], [1 x i8*] zeroinitializer], [2 x [1 x i8*]] zeroinitializer, [2 x [1 x i8*]] [[1 x i8*] zeroinitializer, [1 x i8*] [i8* @g_96]]], align 4
+@func_15.l_826 = private unnamed_addr constant { i8, i8, [2 x i8] } { i8 -115, i8 127, [2 x i8] undef }, align 4
+@func_15.l_915 = private unnamed_addr constant { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } { i32 -2073639257, i8 53, i8 -1, i8 15, i8 undef, i8 32, i8 14, i8 0, i8 undef, i8 -99, i8 31, i8 0, i8 0, i8 -2, i8 12, i8 10, i8 0, i8 76, i8 56, i8 0, i8 0 }, align 4
+
+; Function Attrs: nounwind
+define i32 @main(i32 %argc, i8** nocapture %argv) #0 {
+ %1 = alloca %struct.S3, align 4
+ call void @llvm.dbg.value(metadata !{i32 %argc}, i64 0, metadata !302), !dbg !303
+ call void @llvm.dbg.value(metadata !{i8** %argv}, i64 0, metadata !304), !dbg !303
+ call void @llvm.dbg.value(metadata !2, i64 0, metadata !305), !dbg !306
+ %2 = icmp eq i32 %argc, 2, !dbg !307
+ br i1 %2, label %3, label %8, !dbg !307
+
+; <label>:3 ; preds = %0
+ %4 = getelementptr inbounds i8** %argv, i32 1, !dbg !307
+ %5 = load i8** %4, align 4, !dbg !307
+ %6 = call i32 @strcmp(i8* %5, i8* getelementptr inbounds ([2 x i8]* @.str, i32 0, i32 0)) #3, !dbg !307
+ %7 = icmp eq i32 %6, 0, !dbg !307
+ call void @llvm.dbg.value(metadata !308, i64 0, metadata !305), !dbg !307
+ %. = zext i1 %7 to i32, !dbg !307
+ br label %8, !dbg !307
+
+; <label>:8 ; preds = %3, %0
+ %print_hash_value.0 = phi i32 [ 0, %0 ], [ %., %3 ]
+ call fastcc void @crc32_gentab(), !dbg !309
+ call fastcc void @func_1(%struct.S3* sret %1), !dbg !310
+ %9 = load i32* @g_5, align 4, !dbg !311
+ %10 = sext i32 %9 to i64, !dbg !311
+ call fastcc void @transparent_crc(i64 %10, i8* getelementptr inbounds ([4 x i8]* @.str1, i32 0, i32 0), i32 %print_hash_value.0), !dbg !311
+ %11 = load i32* getelementptr inbounds (%struct.S3* @g_25, i32 0, i32 0), align 8, !dbg !312
+ %12 = zext i32 %11 to i64, !dbg !312
+ call fastcc void @transparent_crc(i64 %12, i8* getelementptr inbounds ([8 x i8]* @.str2, i32 0, i32 0), i32 %print_hash_value.0), !dbg !312
+ %13 = load i32* getelementptr inbounds (%struct.S3* @g_25, i32 0, i32 1), align 4, !dbg !313
+ %14 = zext i32 %13 to i64, !dbg !313
+ call fastcc void @transparent_crc(i64 %14, i8* getelementptr inbounds ([8 x i8]* @.str3, i32 0, i32 0), i32 %print_hash_value.0), !dbg !313
+ call void @llvm.dbg.value(metadata !2, i64 0, metadata !314), !dbg !315
+ %15 = icmp eq i32 %print_hash_value.0, 0, !dbg !317
+ br label %16, !dbg !315
+
+; <label>:16 ; preds = %25, %8
+ %i.028 = phi i32 [ 0, %8 ], [ %26, %25 ]
+ %17 = getelementptr inbounds [9 x %struct.S3]* @g_49, i32 0, i32 %i.028, i32 0, !dbg !319
+ %18 = load i32* %17, align 8, !dbg !319
+ %19 = zext i32 %18 to i64, !dbg !319
+ call fastcc void @transparent_crc(i64 %19, i8* getelementptr inbounds ([11 x i8]* @.str4, i32 0, i32 0), i32 %print_hash_value.0), !dbg !319
+ %20 = getelementptr inbounds [9 x %struct.S3]* @g_49, i32 0, i32 %i.028, i32 1, !dbg !320
+ %21 = load i32* %20, align 4, !dbg !320
+ %22 = zext i32 %21 to i64, !dbg !320
+ call fastcc void @transparent_crc(i64 %22, i8* getelementptr inbounds ([11 x i8]* @.str5, i32 0, i32 0), i32 %print_hash_value.0), !dbg !320
+ br i1 %15, label %25, label %23, !dbg !317
+
+; <label>:23 ; preds = %16
+ %24 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([14 x i8]* @.str6, i32 0, i32 0), i32 %i.028) #3, !dbg !317
+ br label %25, !dbg !317
+
+; <label>:25 ; preds = %23, %16
+ %26 = add nsw i32 %i.028, 1, !dbg !315
+ call void @llvm.dbg.value(metadata !{i32 %26}, i64 0, metadata !314), !dbg !315
+ %27 = icmp slt i32 %26, 9, !dbg !315
+ br i1 %27, label %16, label %28, !dbg !315
+
+; <label>:28 ; preds = %25
+ %29 = load i32* @g_52, align 4, !dbg !321
+ %30 = sext i32 %29 to i64, !dbg !321
+ call fastcc void @transparent_crc(i64 %30, i8* getelementptr inbounds ([5 x i8]* @.str7, i32 0, i32 0), i32 %print_hash_value.0), !dbg !321
+ call fastcc void @transparent_crc(i64 -56, i8* getelementptr inbounds ([5 x i8]* @.str8, i32 0, i32 0), i32 %print_hash_value.0), !dbg !322
+ %31 = load i32* @g_90, align 4, !dbg !323
+ %32 = sext i32 %31 to i64, !dbg !323
+ call fastcc void @transparent_crc(i64 %32, i8* getelementptr inbounds ([5 x i8]* @.str9, i32 0, i32 0), i32 %print_hash_value.0), !dbg !323
+ %33 = load i8* @g_92, align 1, !dbg !324
+ %34 = sext i8 %33 to i64, !dbg !324
+ call fastcc void @transparent_crc(i64 %34, i8* getelementptr inbounds ([5 x i8]* @.str10, i32 0, i32 0), i32 %print_hash_value.0), !dbg !324
+ %35 = load i8* @g_96, align 1, !dbg !325
+ %36 = zext i8 %35 to i64, !dbg !325
+ call fastcc void @transparent_crc(i64 %36, i8* getelementptr inbounds ([5 x i8]* @.str11, i32 0, i32 0), i32 %print_hash_value.0), !dbg !325
+ %37 = load i32* getelementptr inbounds (%struct.S1* @g_99, i32 0, i32 0), align 4, !dbg !326
+ %38 = zext i32 %37 to i64, !dbg !326
+ call fastcc void @transparent_crc(i64 %38, i8* getelementptr inbounds ([8 x i8]* @.str12, i32 0, i32 0), i32 %print_hash_value.0), !dbg !326
+ %39 = load i32* getelementptr inbounds (%struct.S1* @g_99, i32 0, i32 1), align 4, !dbg !327
+ %40 = zext i32 %39 to i64, !dbg !327
+ call fastcc void @transparent_crc(i64 %40, i8* getelementptr inbounds ([8 x i8]* @.str13, i32 0, i32 0), i32 %print_hash_value.0), !dbg !327
+ %41 = load i8* getelementptr inbounds (%struct.S1* @g_99, i32 0, i32 2), align 4, !dbg !328
+ %42 = zext i8 %41 to i64, !dbg !328
+ call fastcc void @transparent_crc(i64 %42, i8* getelementptr inbounds ([8 x i8]* @.str14, i32 0, i32 0), i32 %print_hash_value.0), !dbg !328
+ %43 = load i16* getelementptr inbounds (%struct.S1* @g_99, i32 0, i32 3), align 2, !dbg !329
+ %44 = sext i16 %43 to i64, !dbg !329
+ call fastcc void @transparent_crc(i64 %44, i8* getelementptr inbounds ([8 x i8]* @.str15, i32 0, i32 0), i32 %print_hash_value.0), !dbg !329
+ %45 = load i16* @g_103, align 2, !dbg !330
+ %46 = zext i16 %45 to i64, !dbg !330
+ call fastcc void @transparent_crc(i64 %46, i8* getelementptr inbounds ([6 x i8]* @.str16, i32 0, i32 0), i32 %print_hash_value.0), !dbg !330
+ %47 = load i32* getelementptr inbounds ({ i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }* @g_108, i32 0, i32 0), align 4, !dbg !331
+ %48 = sext i32 %47 to i64, !dbg !331
+ call fastcc void @transparent_crc(i64 %48, i8* getelementptr inbounds ([9 x i8]* @.str17, i32 0, i32 0), i32 %print_hash_value.0), !dbg !331
+ %49 = load i32* bitcast (i8* getelementptr inbounds ({ i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }* @g_108, i32 0, i32 1) to i32*), align 4, !dbg !332
+ %50 = shl i32 %49, 12, !dbg !332
+ %51 = ashr exact i32 %50, 12, !dbg !332
+ %52 = sext i32 %51 to i64, !dbg !332
+ call fastcc void @transparent_crc(i64 %52, i8* getelementptr inbounds ([9 x i8]* @.str18, i32 0, i32 0), i32 %print_hash_value.0), !dbg !332
+ %53 = load i32* bitcast (i8* getelementptr inbounds ({ i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }* @g_108, i32 0, i32 5) to i32*), align 4, !dbg !333
+ %54 = shl i32 %53, 8, !dbg !333
+ %55 = ashr exact i32 %54, 8, !dbg !333
+ %56 = sext i32 %55 to i64, !dbg !333
+ call fastcc void @transparent_crc(i64 %56, i8* getelementptr inbounds ([9 x i8]* @.str19, i32 0, i32 0), i32 %print_hash_value.0), !dbg !333
+ %57 = load i32* bitcast (i8* getelementptr inbounds ({ i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }* @g_108, i32 0, i32 9) to i32*), align 4, !dbg !334
+ %58 = and i32 %57, 67108863, !dbg !334
+ %59 = zext i32 %58 to i64, !dbg !334
+ call fastcc void @transparent_crc(i64 %59, i8* getelementptr inbounds ([9 x i8]* @.str20, i32 0, i32 0), i32 %print_hash_value.0), !dbg !334
+ %60 = load i8* getelementptr inbounds ({ i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }* @g_108, i32 0, i32 13), align 4, !dbg !335
+ %61 = sext i8 %60 to i64, !dbg !335
+ call fastcc void @transparent_crc(i64 %61, i8* getelementptr inbounds ([9 x i8]* @.str21, i32 0, i32 0), i32 %print_hash_value.0), !dbg !335
+ %62 = load i56* bitcast (i8* getelementptr inbounds ({ i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }* @g_108, i32 0, i32 14) to i56*), align 1, !dbg !336
+ %.tr = trunc i56 %62 to i32, !dbg !336
+ %63 = and i32 %.tr, 16777215, !dbg !336
+ %64 = zext i32 %63 to i64, !dbg !336
+ call fastcc void @transparent_crc(i64 %64, i8* getelementptr inbounds ([9 x i8]* @.str22, i32 0, i32 0), i32 %print_hash_value.0), !dbg !336
+ %65 = load i56* bitcast (i8* getelementptr inbounds ({ i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }* @g_108, i32 0, i32 14) to i56*), align 1, !dbg !337
+ %66 = lshr i56 %65, 24, !dbg !337
+ %.tr1 = trunc i56 %66 to i32, !dbg !337
+ %67 = and i32 %.tr1, 536870911, !dbg !337
+ %68 = zext i32 %67 to i64, !dbg !337
+ call fastcc void @transparent_crc(i64 %68, i8* getelementptr inbounds ([9 x i8]* @.str23, i32 0, i32 0), i32 %print_hash_value.0), !dbg !337
+ call fastcc void @transparent_crc(i64 762265952, i8* getelementptr inbounds ([9 x i8]* @.str24, i32 0, i32 0), i32 %print_hash_value.0), !dbg !338
+ %69 = load i16* bitcast ({ i8, i8, [2 x i8] }* @g_110 to i16*), align 4, !dbg !339
+ %70 = shl i16 %69, 1, !dbg !339
+ %71 = ashr exact i16 %70, 1, !dbg !339
+ %72 = sext i16 %71 to i64, !dbg !339
+ call fastcc void @transparent_crc(i64 %72, i8* getelementptr inbounds ([9 x i8]* @.str25, i32 0, i32 0), i32 %print_hash_value.0), !dbg !339
+ %73 = load i32* getelementptr inbounds (%union.U4* @g_183, i32 0, i32 0), align 4, !dbg !340
+ %74 = sext i32 %73 to i64, !dbg !340
+ call fastcc void @transparent_crc(i64 %74, i8* getelementptr inbounds ([9 x i8]* @.str26, i32 0, i32 0), i32 %print_hash_value.0), !dbg !340
+ call fastcc void @transparent_crc(i64 169, i8* getelementptr inbounds ([9 x i8]* @.str27, i32 0, i32 0), i32 %print_hash_value.0), !dbg !341
+ %75 = load i8* @g_258, align 1, !dbg !342
+ %76 = sext i8 %75 to i64, !dbg !342
+ call fastcc void @transparent_crc(i64 %76, i8* getelementptr inbounds ([6 x i8]* @.str28, i32 0, i32 0), i32 %print_hash_value.0), !dbg !342
+ %77 = load i16* @g_332, align 2, !dbg !343
+ %78 = zext i16 %77 to i64, !dbg !343
+ call fastcc void @transparent_crc(i64 %78, i8* getelementptr inbounds ([6 x i8]* @.str29, i32 0, i32 0), i32 %print_hash_value.0), !dbg !343
+ call void @llvm.dbg.value(metadata !2, i64 0, metadata !314), !dbg !344
+ %79 = icmp eq i32 %print_hash_value.0, 0, !dbg !346
+ br label %.preheader25, !dbg !344
+
+.preheader25: ; preds = %85, %28
+ %i.127 = phi i32 [ 0, %28 ], [ %86, %85 ]
+ %80 = getelementptr inbounds [10 x [1 x %union.U4]]* @g_345, i32 0, i32 %i.127, i32 0, i32 0, !dbg !350
+ %81 = load i32* %80, align 4, !dbg !350
+ %82 = sext i32 %81 to i64, !dbg !350
+ call fastcc void @transparent_crc(i64 %82, i8* getelementptr inbounds ([15 x i8]* @.str30, i32 0, i32 0), i32 %print_hash_value.0), !dbg !350
+ br i1 %79, label %85, label %83, !dbg !346
+
+; <label>:83 ; preds = %.preheader25
+ %84 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([18 x i8]* @.str31, i32 0, i32 0), i32 %i.127, i32 0) #3, !dbg !346
+ br label %85, !dbg !346
+
+; <label>:85 ; preds = %83, %.preheader25
+ %86 = add nsw i32 %i.127, 1, !dbg !344
+ call void @llvm.dbg.value(metadata !{i32 %86}, i64 0, metadata !314), !dbg !344
+ %87 = icmp slt i32 %86, 10, !dbg !344
+ br i1 %87, label %.preheader25, label %88, !dbg !344
+
+; <label>:88 ; preds = %85
+ %89 = icmp eq i32 %print_hash_value.0, 0, !dbg !351
+ call fastcc void @transparent_crc(i64 0, i8* getelementptr inbounds ([9 x i8]* @.str32, i32 0, i32 0), i32 %print_hash_value.0), !dbg !354
+ br i1 %89, label %.thread32, label %341, !dbg !351
+
+.thread32: ; preds = %88
+ call void @llvm.dbg.value(metadata !308, i64 0, metadata !314), !dbg !355
+ call fastcc void @transparent_crc(i64 0, i8* getelementptr inbounds ([9 x i8]* @.str32, i32 0, i32 0), i32 %print_hash_value.0), !dbg !354
+ call void @llvm.dbg.value(metadata !308, i64 0, metadata !314), !dbg !355
+ call fastcc void @transparent_crc(i64 0, i8* getelementptr inbounds ([9 x i8]* @.str32, i32 0, i32 0), i32 %print_hash_value.0), !dbg !354
+ call void @llvm.dbg.value(metadata !308, i64 0, metadata !314), !dbg !355
+ call fastcc void @transparent_crc(i64 0, i8* getelementptr inbounds ([9 x i8]* @.str32, i32 0, i32 0), i32 %print_hash_value.0), !dbg !354
+ call void @llvm.dbg.value(metadata !308, i64 0, metadata !314), !dbg !355
+ call fastcc void @transparent_crc(i64 0, i8* getelementptr inbounds ([9 x i8]* @.str32, i32 0, i32 0), i32 %print_hash_value.0), !dbg !354
+ call void @llvm.dbg.value(metadata !308, i64 0, metadata !314), !dbg !355
+ call fastcc void @transparent_crc(i64 0, i8* getelementptr inbounds ([9 x i8]* @.str32, i32 0, i32 0), i32 %print_hash_value.0), !dbg !354
+ br label %348, !dbg !351
+
+.preheader18: ; preds = %348, %338
+ %i.322 = phi i32 [ 0, %348 ], [ %339, %338 ]
+ br label %90, !dbg !356
+
+; <label>:90 ; preds = %105, %.preheader18
+ %k.019 = phi i32 [ 0, %.preheader18 ], [ %106, %105 ]
+ %91 = getelementptr inbounds [9 x [3 x [7 x %struct.S1]]]* @g_404, i32 0, i32 %i.322, i32 0, i32 %k.019, i32 0, !dbg !362
+ %92 = load i32* %91, align 4, !dbg !362
+ %93 = zext i32 %92 to i64, !dbg !362
+ call fastcc void @transparent_crc(i64 %93, i8* getelementptr inbounds ([18 x i8]* @.str35, i32 0, i32 0), i32 %print_hash_value.0), !dbg !362
+ %94 = getelementptr inbounds [9 x [3 x [7 x %struct.S1]]]* @g_404, i32 0, i32 %i.322, i32 0, i32 %k.019, i32 1, !dbg !364
+ %95 = load i32* %94, align 4, !dbg !364
+ %96 = zext i32 %95 to i64, !dbg !364
+ call fastcc void @transparent_crc(i64 %96, i8* getelementptr inbounds ([18 x i8]* @.str36, i32 0, i32 0), i32 %print_hash_value.0), !dbg !364
+ %97 = getelementptr inbounds [9 x [3 x [7 x %struct.S1]]]* @g_404, i32 0, i32 %i.322, i32 0, i32 %k.019, i32 2, !dbg !365
+ %98 = load i8* %97, align 4, !dbg !365
+ %99 = zext i8 %98 to i64, !dbg !365
+ call fastcc void @transparent_crc(i64 %99, i8* getelementptr inbounds ([18 x i8]* @.str37, i32 0, i32 0), i32 %print_hash_value.0), !dbg !365
+ %100 = getelementptr inbounds [9 x [3 x [7 x %struct.S1]]]* @g_404, i32 0, i32 %i.322, i32 0, i32 %k.019, i32 3, !dbg !366
+ %101 = load i16* %100, align 2, !dbg !366
+ %102 = sext i16 %101 to i64, !dbg !366
+ call fastcc void @transparent_crc(i64 %102, i8* getelementptr inbounds ([18 x i8]* @.str38, i32 0, i32 0), i32 %print_hash_value.0), !dbg !366
+ br i1 %351, label %105, label %103, !dbg !367
+
+; <label>:103 ; preds = %90
+ %104 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([22 x i8]* @.str39, i32 0, i32 0), i32 %i.322, i32 0, i32 %k.019) #3, !dbg !367
+ br label %105, !dbg !367
+
+; <label>:105 ; preds = %103, %90
+ %106 = add nsw i32 %k.019, 1, !dbg !356
+ call void @llvm.dbg.value(metadata !{i32 %106}, i64 0, metadata !368), !dbg !356
+ %107 = icmp slt i32 %106, 7, !dbg !356
+ br i1 %107, label %90, label %.preheader18.1, !dbg !356
+
+; <label>:108 ; preds = %338
+ %.b = load i1* @g_452, align 1
+ %109 = select i1 %.b, i64 4, i64 7, !dbg !369
+ call fastcc void @transparent_crc(i64 %109, i8* getelementptr inbounds ([6 x i8]* @.str40, i32 0, i32 0), i32 %print_hash_value.0), !dbg !369
+ call fastcc void @transparent_crc(i64 -1300072605, i8* getelementptr inbounds ([6 x i8]* @.str41, i32 0, i32 0), i32 %print_hash_value.0), !dbg !370
+ call void @llvm.dbg.value(metadata !2, i64 0, metadata !314), !dbg !371
+ %110 = icmp eq i32 %print_hash_value.0, 0, !dbg !373
+ %111 = load i16* getelementptr inbounds ([1 x i16]* @g_455, i32 0, i32 0), align 2, !dbg !375
+ %112 = zext i16 %111 to i64, !dbg !375
+ call fastcc void @transparent_crc(i64 %112, i8* getelementptr inbounds ([9 x i8]* @.str42, i32 0, i32 0), i32 %print_hash_value.0), !dbg !375
+ br i1 %110, label %115, label %113, !dbg !373
+
+; <label>:113 ; preds = %108
+ %114 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([14 x i8]* @.str6, i32 0, i32 0), i32 0) #3, !dbg !373
+ br label %115, !dbg !373
+
+; <label>:115 ; preds = %113, %108
+ %116 = load i32* @g_465, align 4, !dbg !376
+ %117 = sext i32 %116 to i64, !dbg !376
+ call fastcc void @transparent_crc(i64 %117, i8* getelementptr inbounds ([6 x i8]* @.str43, i32 0, i32 0), i32 %print_hash_value.0), !dbg !376
+ call fastcc void @transparent_crc(i64 8, i8* getelementptr inbounds ([6 x i8]* @.str44, i32 0, i32 0), i32 %print_hash_value.0), !dbg !377
+ %118 = load i8* @g_467, align 1, !dbg !378
+ %119 = zext i8 %118 to i64, !dbg !378
+ call fastcc void @transparent_crc(i64 %119, i8* getelementptr inbounds ([6 x i8]* @.str45, i32 0, i32 0), i32 %print_hash_value.0), !dbg !378
+ call fastcc void @transparent_crc(i64 0, i8* getelementptr inbounds ([6 x i8]* @.str46, i32 0, i32 0), i32 %print_hash_value.0), !dbg !379
+ call fastcc void @transparent_crc(i64 3359972097, i8* getelementptr inbounds ([9 x i8]* @.str47, i32 0, i32 0), i32 %print_hash_value.0), !dbg !380
+ call fastcc void @transparent_crc(i64 6, i8* getelementptr inbounds ([9 x i8]* @.str48, i32 0, i32 0), i32 %print_hash_value.0), !dbg !381
+ call fastcc void @transparent_crc(i64 144, i8* getelementptr inbounds ([9 x i8]* @.str49, i32 0, i32 0), i32 %print_hash_value.0), !dbg !382
+ call fastcc void @transparent_crc(i64 1, i8* getelementptr inbounds ([9 x i8]* @.str50, i32 0, i32 0), i32 %print_hash_value.0), !dbg !383
+ call fastcc void @transparent_crc(i64 87, i8* getelementptr inbounds ([6 x i8]* @.str51, i32 0, i32 0), i32 %print_hash_value.0), !dbg !384
+ %120 = load i32* @g_532, align 4, !dbg !385
+ %121 = sext i32 %120 to i64, !dbg !385
+ call fastcc void @transparent_crc(i64 %121, i8* getelementptr inbounds ([6 x i8]* @.str52, i32 0, i32 0), i32 %print_hash_value.0), !dbg !385
+ %122 = load i16* @g_534, align 2, !dbg !386
+ %123 = sext i16 %122 to i64, !dbg !386
+ call fastcc void @transparent_crc(i64 %123, i8* getelementptr inbounds ([6 x i8]* @.str53, i32 0, i32 0), i32 %print_hash_value.0), !dbg !386
+ call void @llvm.dbg.value(metadata !2, i64 0, metadata !314), !dbg !387
+ %124 = icmp eq i32 %print_hash_value.0, 0, !dbg !389
+ br label %.preheader14, !dbg !387
+
+.preheader14: ; preds = %134, %115
+ %i.516 = phi i32 [ 0, %115 ], [ %135, %134 ]
+ br label %.preheader12, !dbg !395
+
+.preheader12: ; preds = %301, %.preheader14
+ %j.215 = phi i32 [ 0, %.preheader14 ], [ %302, %301 ]
+ %125 = getelementptr inbounds [3 x [6 x [4 x i16]]]* @g_535, i32 0, i32 %i.516, i32 %j.215, i32 0, !dbg !396
+ %126 = load i16* %125, align 2, !dbg !396
+ %127 = zext i16 %126 to i64, !dbg !396
+ call fastcc void @transparent_crc(i64 %127, i8* getelementptr inbounds ([15 x i8]* @.str54, i32 0, i32 0), i32 %print_hash_value.0), !dbg !396
+ br i1 %124, label %.critedge, label %128, !dbg !389
+
+; <label>:128 ; preds = %.preheader12
+ %129 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([22 x i8]* @.str39, i32 0, i32 0), i32 %i.516, i32 %j.215, i32 0) #3, !dbg !389
+ call void @llvm.dbg.value(metadata !308, i64 0, metadata !368), !dbg !397
+ %130 = getelementptr inbounds [3 x [6 x [4 x i16]]]* @g_535, i32 0, i32 %i.516, i32 %j.215, i32 1, !dbg !396
+ %131 = load i16* %130, align 2, !dbg !396
+ %132 = zext i16 %131 to i64, !dbg !396
+ call fastcc void @transparent_crc(i64 %132, i8* getelementptr inbounds ([15 x i8]* @.str54, i32 0, i32 0), i32 %print_hash_value.0), !dbg !396
+ %133 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([22 x i8]* @.str39, i32 0, i32 0), i32 %i.516, i32 %j.215, i32 1) #3, !dbg !389
+ br label %288, !dbg !389
+
+; <label>:134 ; preds = %301
+ %135 = add nsw i32 %i.516, 1, !dbg !387
+ call void @llvm.dbg.value(metadata !{i32 %135}, i64 0, metadata !314), !dbg !387
+ %136 = icmp slt i32 %135, 3, !dbg !387
+ br i1 %136, label %.preheader14, label %137, !dbg !387
+
+; <label>:137 ; preds = %134
+ %138 = load i16* @g_538, align 2, !dbg !398
+ %139 = zext i16 %138 to i64, !dbg !398
+ call fastcc void @transparent_crc(i64 %139, i8* getelementptr inbounds ([6 x i8]* @.str55, i32 0, i32 0), i32 %print_hash_value.0), !dbg !398
+ %140 = load i16* @g_557, align 2, !dbg !399
+ %141 = sext i16 %140 to i64, !dbg !399
+ call fastcc void @transparent_crc(i64 %141, i8* getelementptr inbounds ([6 x i8]* @.str56, i32 0, i32 0), i32 %print_hash_value.0), !dbg !399
+ %142 = load i8* @g_575, align 1, !dbg !400
+ %143 = zext i8 %142 to i64, !dbg !400
+ call fastcc void @transparent_crc(i64 %143, i8* getelementptr inbounds ([6 x i8]* @.str57, i32 0, i32 0), i32 %print_hash_value.0), !dbg !400
+ call void @llvm.dbg.value(metadata !2, i64 0, metadata !314), !dbg !401
+ %144 = icmp eq i32 %print_hash_value.0, 0, !dbg !403
+ br label %.preheader9, !dbg !401
+
+.preheader9: ; preds = %282, %137
+ %i.611 = phi i32 [ 0, %137 ], [ %283, %282 ]
+ %145 = getelementptr inbounds [10 x [8 x %union.U4]]* @g_591, i32 0, i32 %i.611, i32 0, i32 0, !dbg !407
+ %146 = load i32* %145, align 4, !dbg !407
+ %147 = sext i32 %146 to i64, !dbg !407
+ call fastcc void @transparent_crc(i64 %147, i8* getelementptr inbounds ([15 x i8]* @.str58, i32 0, i32 0), i32 %print_hash_value.0), !dbg !407
+ br i1 %144, label %.critedge33, label %148, !dbg !403
+
+; <label>:148 ; preds = %.preheader9
+ %149 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([18 x i8]* @.str31, i32 0, i32 0), i32 %i.611, i32 0) #3, !dbg !403
+ call void @llvm.dbg.value(metadata !308, i64 0, metadata !408), !dbg !409
+ %150 = getelementptr inbounds [10 x [8 x %union.U4]]* @g_591, i32 0, i32 %i.611, i32 1, i32 0, !dbg !407
+ %151 = load i32* %150, align 4, !dbg !407
+ %152 = sext i32 %151 to i64, !dbg !407
+ call fastcc void @transparent_crc(i64 %152, i8* getelementptr inbounds ([15 x i8]* @.str58, i32 0, i32 0), i32 %print_hash_value.0), !dbg !407
+ %153 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([18 x i8]* @.str31, i32 0, i32 0), i32 %i.611, i32 1) #3, !dbg !403
+ br label %243, !dbg !403
+
+; <label>:154 ; preds = %282
+ %155 = load i32* getelementptr inbounds ({ i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }* @g_623, i32 0, i32 0), align 4, !dbg !410
+ %156 = sext i32 %155 to i64, !dbg !410
+ call fastcc void @transparent_crc(i64 %156, i8* getelementptr inbounds ([9 x i8]* @.str59, i32 0, i32 0), i32 %print_hash_value.0), !dbg !410
+ %157 = load i32* bitcast (i8* getelementptr inbounds ({ i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }* @g_623, i32 0, i32 1) to i32*), align 4, !dbg !411
+ %158 = shl i32 %157, 12, !dbg !411
+ %159 = ashr exact i32 %158, 12, !dbg !411
+ %160 = sext i32 %159 to i64, !dbg !411
+ call fastcc void @transparent_crc(i64 %160, i8* getelementptr inbounds ([9 x i8]* @.str60, i32 0, i32 0), i32 %print_hash_value.0), !dbg !411
+ %161 = load i32* bitcast (i8* getelementptr inbounds ({ i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }* @g_623, i32 0, i32 5) to i32*), align 4, !dbg !412
+ %162 = shl i32 %161, 8, !dbg !412
+ %163 = ashr exact i32 %162, 8, !dbg !412
+ %164 = sext i32 %163 to i64, !dbg !412
+ call fastcc void @transparent_crc(i64 %164, i8* getelementptr inbounds ([9 x i8]* @.str61, i32 0, i32 0), i32 %print_hash_value.0), !dbg !412
+ %165 = load i32* bitcast (i8* getelementptr inbounds ({ i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }* @g_623, i32 0, i32 9) to i32*), align 4, !dbg !413
+ %166 = and i32 %165, 67108863, !dbg !413
+ %167 = zext i32 %166 to i64, !dbg !413
+ call fastcc void @transparent_crc(i64 %167, i8* getelementptr inbounds ([9 x i8]* @.str62, i32 0, i32 0), i32 %print_hash_value.0), !dbg !413
+ %168 = load i8* getelementptr inbounds ({ i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }* @g_623, i32 0, i32 13), align 4, !dbg !414
+ %169 = sext i8 %168 to i64, !dbg !414
+ call fastcc void @transparent_crc(i64 %169, i8* getelementptr inbounds ([9 x i8]* @.str63, i32 0, i32 0), i32 %print_hash_value.0), !dbg !414
+ %170 = load i56* bitcast (i8* getelementptr inbounds ({ i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }* @g_623, i32 0, i32 14) to i56*), align 1, !dbg !415
+ %.tr2 = trunc i56 %170 to i32, !dbg !415
+ %171 = and i32 %.tr2, 16777215, !dbg !415
+ %172 = zext i32 %171 to i64, !dbg !415
+ call fastcc void @transparent_crc(i64 %172, i8* getelementptr inbounds ([9 x i8]* @.str64, i32 0, i32 0), i32 %print_hash_value.0), !dbg !415
+ %173 = load i56* bitcast (i8* getelementptr inbounds ({ i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }* @g_623, i32 0, i32 14) to i56*), align 1, !dbg !416
+ %174 = lshr i56 %173, 24, !dbg !416
+ %.tr3 = trunc i56 %174 to i32, !dbg !416
+ %175 = and i32 %.tr3, 536870911, !dbg !416
+ %176 = zext i32 %175 to i64, !dbg !416
+ call fastcc void @transparent_crc(i64 %176, i8* getelementptr inbounds ([9 x i8]* @.str65, i32 0, i32 0), i32 %print_hash_value.0), !dbg !416
+ call void @llvm.dbg.value(metadata !2, i64 0, metadata !314), !dbg !417
+ %177 = icmp eq i32 %print_hash_value.0, 0, !dbg !419
+ br label %.preheader6, !dbg !417
+
+.preheader6: ; preds = %237, %154
+ %i.78 = phi i32 [ 0, %154 ], [ %238, %237 ]
+ %178 = getelementptr inbounds [4 x [3 x i8]]* @g_815, i32 0, i32 %i.78, i32 0, !dbg !423
+ %179 = load i8* %178, align 1, !dbg !423
+ %180 = sext i8 %179 to i64, !dbg !423
+ call fastcc void @transparent_crc(i64 %180, i8* getelementptr inbounds ([12 x i8]* @.str66, i32 0, i32 0), i32 %print_hash_value.0), !dbg !423
+ br i1 %177, label %.critedge34, label %181, !dbg !419
+
+; <label>:181 ; preds = %.preheader6
+ %182 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([18 x i8]* @.str31, i32 0, i32 0), i32 %i.78, i32 0) #3, !dbg !419
+ call void @llvm.dbg.value(metadata !308, i64 0, metadata !408), !dbg !424
+ %183 = getelementptr inbounds [4 x [3 x i8]]* @g_815, i32 0, i32 %i.78, i32 1, !dbg !423
+ %184 = load i8* %183, align 1, !dbg !423
+ %185 = sext i8 %184 to i64, !dbg !423
+ call fastcc void @transparent_crc(i64 %185, i8* getelementptr inbounds ([12 x i8]* @.str66, i32 0, i32 0), i32 %print_hash_value.0), !dbg !423
+ %186 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([18 x i8]* @.str31, i32 0, i32 0), i32 %i.78, i32 1) #3, !dbg !419
+ br label %231, !dbg !419
+
+; <label>:187 ; preds = %237
+ call fastcc void @transparent_crc(i64 9, i8* getelementptr inbounds ([9 x i8]* @.str67, i32 0, i32 0), i32 %print_hash_value.0), !dbg !425
+ call fastcc void @transparent_crc(i64 -13, i8* getelementptr inbounds ([7 x i8]* @.str68, i32 0, i32 0), i32 %print_hash_value.0), !dbg !426
+ %188 = load i32* @g_1055, align 4, !dbg !427
+ %189 = sext i32 %188 to i64, !dbg !427
+ call fastcc void @transparent_crc(i64 %189, i8* getelementptr inbounds ([7 x i8]* @.str69, i32 0, i32 0), i32 %print_hash_value.0), !dbg !427
+ call void @llvm.dbg.value(metadata !2, i64 0, metadata !314), !dbg !428
+ %190 = icmp eq i32 %print_hash_value.0, 0, !dbg !430
+ br label %.preheader, !dbg !428
+
+.preheader: ; preds = %225, %187
+ %i.85 = phi i32 [ 0, %187 ], [ %226, %225 ]
+ %191 = getelementptr inbounds [4 x [5 x i32]]* @g_1057, i32 0, i32 %i.85, i32 0, !dbg !434
+ %192 = load i32* %191, align 4, !dbg !434
+ %193 = zext i32 %192 to i64, !dbg !434
+ call fastcc void @transparent_crc(i64 %193, i8* getelementptr inbounds ([13 x i8]* @.str70, i32 0, i32 0), i32 %print_hash_value.0), !dbg !434
+ br i1 %190, label %.critedge35, label %194, !dbg !430
+
+; <label>:194 ; preds = %.preheader
+ %195 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([18 x i8]* @.str31, i32 0, i32 0), i32 %i.85, i32 0) #3, !dbg !430
+ call void @llvm.dbg.value(metadata !308, i64 0, metadata !408), !dbg !435
+ %196 = getelementptr inbounds [4 x [5 x i32]]* @g_1057, i32 0, i32 %i.85, i32 1, !dbg !434
+ %197 = load i32* %196, align 4, !dbg !434
+ %198 = zext i32 %197 to i64, !dbg !434
+ call fastcc void @transparent_crc(i64 %198, i8* getelementptr inbounds ([13 x i8]* @.str70, i32 0, i32 0), i32 %print_hash_value.0), !dbg !434
+ %199 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([18 x i8]* @.str31, i32 0, i32 0), i32 %i.85, i32 1) #3, !dbg !430
+ br label %206, !dbg !430
+
+; <label>:200 ; preds = %225
+ %201 = load i32* @crc32_context, align 4, !dbg !436
+ %202 = xor i32 %201, -1, !dbg !436
+ call fastcc void @platform_main_end(i32 %202), !dbg !436
+ ret i32 0, !dbg !437
+
+.critedge35: ; preds = %.preheader
+ call void @llvm.dbg.value(metadata !308, i64 0, metadata !408), !dbg !435
+ %203 = getelementptr inbounds [4 x [5 x i32]]* @g_1057, i32 0, i32 %i.85, i32 1, !dbg !434
+ %204 = load i32* %203, align 4, !dbg !434
+ %205 = zext i32 %204 to i64, !dbg !434
+ call fastcc void @transparent_crc(i64 %205, i8* getelementptr inbounds ([13 x i8]* @.str70, i32 0, i32 0), i32 %print_hash_value.0), !dbg !434
+ br label %206
+
+; <label>:206 ; preds = %.critedge35, %194
+ call void @llvm.dbg.value(metadata !308, i64 0, metadata !408), !dbg !435
+ %207 = getelementptr inbounds [4 x [5 x i32]]* @g_1057, i32 0, i32 %i.85, i32 2, !dbg !434
+ %208 = load i32* %207, align 4, !dbg !434
+ %209 = zext i32 %208 to i64, !dbg !434
+ call fastcc void @transparent_crc(i64 %209, i8* getelementptr inbounds ([13 x i8]* @.str70, i32 0, i32 0), i32 %print_hash_value.0), !dbg !434
+ br i1 %190, label %.critedge37, label %210, !dbg !430
+
+; <label>:210 ; preds = %206
+ %211 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([18 x i8]* @.str31, i32 0, i32 0), i32 %i.85, i32 2) #3, !dbg !430
+ call void @llvm.dbg.value(metadata !308, i64 0, metadata !408), !dbg !435
+ %212 = getelementptr inbounds [4 x [5 x i32]]* @g_1057, i32 0, i32 %i.85, i32 3, !dbg !434
+ %213 = load i32* %212, align 4, !dbg !434
+ %214 = zext i32 %213 to i64, !dbg !434
+ call fastcc void @transparent_crc(i64 %214, i8* getelementptr inbounds ([13 x i8]* @.str70, i32 0, i32 0), i32 %print_hash_value.0), !dbg !434
+ %215 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([18 x i8]* @.str31, i32 0, i32 0), i32 %i.85, i32 3) #3, !dbg !430
+ br label %219, !dbg !430
+
+.critedge37: ; preds = %206
+ call void @llvm.dbg.value(metadata !308, i64 0, metadata !408), !dbg !435
+ %216 = getelementptr inbounds [4 x [5 x i32]]* @g_1057, i32 0, i32 %i.85, i32 3, !dbg !434
+ %217 = load i32* %216, align 4, !dbg !434
+ %218 = zext i32 %217 to i64, !dbg !434
+ call fastcc void @transparent_crc(i64 %218, i8* getelementptr inbounds ([13 x i8]* @.str70, i32 0, i32 0), i32 %print_hash_value.0), !dbg !434
+ br label %219
+
+; <label>:219 ; preds = %.critedge37, %210
+ call void @llvm.dbg.value(metadata !308, i64 0, metadata !408), !dbg !435
+ %220 = getelementptr inbounds [4 x [5 x i32]]* @g_1057, i32 0, i32 %i.85, i32 4, !dbg !434
+ %221 = load i32* %220, align 4, !dbg !434
+ %222 = zext i32 %221 to i64, !dbg !434
+ call fastcc void @transparent_crc(i64 %222, i8* getelementptr inbounds ([13 x i8]* @.str70, i32 0, i32 0), i32 %print_hash_value.0), !dbg !434
+ br i1 %190, label %225, label %223, !dbg !430
+
+; <label>:223 ; preds = %219
+ %224 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([18 x i8]* @.str31, i32 0, i32 0), i32 %i.85, i32 4) #3, !dbg !430
+ br label %225, !dbg !430
+
+; <label>:225 ; preds = %223, %219
+ call void @llvm.dbg.value(metadata !308, i64 0, metadata !408), !dbg !435
+ %226 = add nsw i32 %i.85, 1, !dbg !428
+ call void @llvm.dbg.value(metadata !{i32 %226}, i64 0, metadata !314), !dbg !428
+ %227 = icmp slt i32 %226, 4, !dbg !428
+ br i1 %227, label %.preheader, label %200, !dbg !428
+
+.critedge34: ; preds = %.preheader6
+ call void @llvm.dbg.value(metadata !308, i64 0, metadata !408), !dbg !424
+ %228 = getelementptr inbounds [4 x [3 x i8]]* @g_815, i32 0, i32 %i.78, i32 1, !dbg !423
+ %229 = load i8* %228, align 1, !dbg !423
+ %230 = sext i8 %229 to i64, !dbg !423
+ call fastcc void @transparent_crc(i64 %230, i8* getelementptr inbounds ([12 x i8]* @.str66, i32 0, i32 0), i32 %print_hash_value.0), !dbg !423
+ br label %231
+
+; <label>:231 ; preds = %.critedge34, %181
+ call void @llvm.dbg.value(metadata !308, i64 0, metadata !408), !dbg !424
+ %232 = getelementptr inbounds [4 x [3 x i8]]* @g_815, i32 0, i32 %i.78, i32 2, !dbg !423
+ %233 = load i8* %232, align 1, !dbg !423
+ %234 = sext i8 %233 to i64, !dbg !423
+ call fastcc void @transparent_crc(i64 %234, i8* getelementptr inbounds ([12 x i8]* @.str66, i32 0, i32 0), i32 %print_hash_value.0), !dbg !423
+ br i1 %177, label %237, label %235, !dbg !419
+
+; <label>:235 ; preds = %231
+ %236 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([18 x i8]* @.str31, i32 0, i32 0), i32 %i.78, i32 2) #3, !dbg !419
+ br label %237, !dbg !419
+
+; <label>:237 ; preds = %235, %231
+ call void @llvm.dbg.value(metadata !308, i64 0, metadata !408), !dbg !424
+ %238 = add nsw i32 %i.78, 1, !dbg !417
+ call void @llvm.dbg.value(metadata !{i32 %238}, i64 0, metadata !314), !dbg !417
+ %239 = icmp slt i32 %238, 4, !dbg !417
+ br i1 %239, label %.preheader6, label %187, !dbg !417
+
+.critedge33: ; preds = %.preheader9
+ call void @llvm.dbg.value(metadata !308, i64 0, metadata !408), !dbg !409
+ %240 = getelementptr inbounds [10 x [8 x %union.U4]]* @g_591, i32 0, i32 %i.611, i32 1, i32 0, !dbg !407
+ %241 = load i32* %240, align 4, !dbg !407
+ %242 = sext i32 %241 to i64, !dbg !407
+ call fastcc void @transparent_crc(i64 %242, i8* getelementptr inbounds ([15 x i8]* @.str58, i32 0, i32 0), i32 %print_hash_value.0), !dbg !407
+ br label %243
+
+; <label>:243 ; preds = %.critedge33, %148
+ call void @llvm.dbg.value(metadata !308, i64 0, metadata !408), !dbg !409
+ %244 = getelementptr inbounds [10 x [8 x %union.U4]]* @g_591, i32 0, i32 %i.611, i32 2, i32 0, !dbg !407
+ %245 = load i32* %244, align 4, !dbg !407
+ %246 = sext i32 %245 to i64, !dbg !407
+ call fastcc void @transparent_crc(i64 %246, i8* getelementptr inbounds ([15 x i8]* @.str58, i32 0, i32 0), i32 %print_hash_value.0), !dbg !407
+ br i1 %144, label %.critedge41, label %247, !dbg !403
+
+; <label>:247 ; preds = %243
+ %248 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([18 x i8]* @.str31, i32 0, i32 0), i32 %i.611, i32 2) #3, !dbg !403
+ call void @llvm.dbg.value(metadata !308, i64 0, metadata !408), !dbg !409
+ %249 = getelementptr inbounds [10 x [8 x %union.U4]]* @g_591, i32 0, i32 %i.611, i32 3, i32 0, !dbg !407
+ %250 = load i32* %249, align 4, !dbg !407
+ %251 = sext i32 %250 to i64, !dbg !407
+ call fastcc void @transparent_crc(i64 %251, i8* getelementptr inbounds ([15 x i8]* @.str58, i32 0, i32 0), i32 %print_hash_value.0), !dbg !407
+ %252 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([18 x i8]* @.str31, i32 0, i32 0), i32 %i.611, i32 3) #3, !dbg !403
+ br label %256, !dbg !403
+
+.critedge41: ; preds = %243
+ call void @llvm.dbg.value(metadata !308, i64 0, metadata !408), !dbg !409
+ %253 = getelementptr inbounds [10 x [8 x %union.U4]]* @g_591, i32 0, i32 %i.611, i32 3, i32 0, !dbg !407
+ %254 = load i32* %253, align 4, !dbg !407
+ %255 = sext i32 %254 to i64, !dbg !407
+ call fastcc void @transparent_crc(i64 %255, i8* getelementptr inbounds ([15 x i8]* @.str58, i32 0, i32 0), i32 %print_hash_value.0), !dbg !407
+ br label %256
+
+; <label>:256 ; preds = %.critedge41, %247
+ call void @llvm.dbg.value(metadata !308, i64 0, metadata !408), !dbg !409
+ %257 = getelementptr inbounds [10 x [8 x %union.U4]]* @g_591, i32 0, i32 %i.611, i32 4, i32 0, !dbg !407
+ %258 = load i32* %257, align 4, !dbg !407
+ %259 = sext i32 %258 to i64, !dbg !407
+ call fastcc void @transparent_crc(i64 %259, i8* getelementptr inbounds ([15 x i8]* @.str58, i32 0, i32 0), i32 %print_hash_value.0), !dbg !407
+ br i1 %144, label %.critedge43, label %260, !dbg !403
+
+; <label>:260 ; preds = %256
+ %261 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([18 x i8]* @.str31, i32 0, i32 0), i32 %i.611, i32 4) #3, !dbg !403
+ call void @llvm.dbg.value(metadata !308, i64 0, metadata !408), !dbg !409
+ %262 = getelementptr inbounds [10 x [8 x %union.U4]]* @g_591, i32 0, i32 %i.611, i32 5, i32 0, !dbg !407
+ %263 = load i32* %262, align 4, !dbg !407
+ %264 = sext i32 %263 to i64, !dbg !407
+ call fastcc void @transparent_crc(i64 %264, i8* getelementptr inbounds ([15 x i8]* @.str58, i32 0, i32 0), i32 %print_hash_value.0), !dbg !407
+ %265 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([18 x i8]* @.str31, i32 0, i32 0), i32 %i.611, i32 5) #3, !dbg !403
+ br label %269, !dbg !403
+
+.critedge43: ; preds = %256
+ call void @llvm.dbg.value(metadata !308, i64 0, metadata !408), !dbg !409
+ %266 = getelementptr inbounds [10 x [8 x %union.U4]]* @g_591, i32 0, i32 %i.611, i32 5, i32 0, !dbg !407
+ %267 = load i32* %266, align 4, !dbg !407
+ %268 = sext i32 %267 to i64, !dbg !407
+ call fastcc void @transparent_crc(i64 %268, i8* getelementptr inbounds ([15 x i8]* @.str58, i32 0, i32 0), i32 %print_hash_value.0), !dbg !407
+ br label %269
+
+; <label>:269 ; preds = %.critedge43, %260
+ call void @llvm.dbg.value(metadata !308, i64 0, metadata !408), !dbg !409
+ %270 = getelementptr inbounds [10 x [8 x %union.U4]]* @g_591, i32 0, i32 %i.611, i32 6, i32 0, !dbg !407
+ %271 = load i32* %270, align 4, !dbg !407
+ %272 = sext i32 %271 to i64, !dbg !407
+ call fastcc void @transparent_crc(i64 %272, i8* getelementptr inbounds ([15 x i8]* @.str58, i32 0, i32 0), i32 %print_hash_value.0), !dbg !407
+ br i1 %144, label %.critedge45, label %273, !dbg !403
+
+; <label>:273 ; preds = %269
+ %274 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([18 x i8]* @.str31, i32 0, i32 0), i32 %i.611, i32 6) #3, !dbg !403
+ call void @llvm.dbg.value(metadata !308, i64 0, metadata !408), !dbg !409
+ %275 = getelementptr inbounds [10 x [8 x %union.U4]]* @g_591, i32 0, i32 %i.611, i32 7, i32 0, !dbg !407
+ %276 = load i32* %275, align 4, !dbg !407
+ %277 = sext i32 %276 to i64, !dbg !407
+ call fastcc void @transparent_crc(i64 %277, i8* getelementptr inbounds ([15 x i8]* @.str58, i32 0, i32 0), i32 %print_hash_value.0), !dbg !407
+ %278 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([18 x i8]* @.str31, i32 0, i32 0), i32 %i.611, i32 7) #3, !dbg !403
+ br label %282, !dbg !403
+
+.critedge45: ; preds = %269
+ call void @llvm.dbg.value(metadata !308, i64 0, metadata !408), !dbg !409
+ %279 = getelementptr inbounds [10 x [8 x %union.U4]]* @g_591, i32 0, i32 %i.611, i32 7, i32 0, !dbg !407
+ %280 = load i32* %279, align 4, !dbg !407
+ %281 = sext i32 %280 to i64, !dbg !407
+ call fastcc void @transparent_crc(i64 %281, i8* getelementptr inbounds ([15 x i8]* @.str58, i32 0, i32 0), i32 %print_hash_value.0), !dbg !407
+ br label %282
+
+; <label>:282 ; preds = %.critedge45, %273
+ call void @llvm.dbg.value(metadata !308, i64 0, metadata !408), !dbg !409
+ %283 = add nsw i32 %i.611, 1, !dbg !401
+ call void @llvm.dbg.value(metadata !{i32 %283}, i64 0, metadata !314), !dbg !401
+ %284 = icmp slt i32 %283, 10, !dbg !401
+ br i1 %284, label %.preheader9, label %154, !dbg !401
+
+.critedge: ; preds = %.preheader12
+ call void @llvm.dbg.value(metadata !308, i64 0, metadata !368), !dbg !397
+ %285 = getelementptr inbounds [3 x [6 x [4 x i16]]]* @g_535, i32 0, i32 %i.516, i32 %j.215, i32 1, !dbg !396
+ %286 = load i16* %285, align 2, !dbg !396
+ %287 = zext i16 %286 to i64, !dbg !396
+ call fastcc void @transparent_crc(i64 %287, i8* getelementptr inbounds ([15 x i8]* @.str54, i32 0, i32 0), i32 %print_hash_value.0), !dbg !396
+ br label %288
+
+; <label>:288 ; preds = %.critedge, %128
+ call void @llvm.dbg.value(metadata !308, i64 0, metadata !368), !dbg !397
+ %289 = getelementptr inbounds [3 x [6 x [4 x i16]]]* @g_535, i32 0, i32 %i.516, i32 %j.215, i32 2, !dbg !396
+ %290 = load i16* %289, align 2, !dbg !396
+ %291 = zext i16 %290 to i64, !dbg !396
+ call fastcc void @transparent_crc(i64 %291, i8* getelementptr inbounds ([15 x i8]* @.str54, i32 0, i32 0), i32 %print_hash_value.0), !dbg !396
+ br i1 %124, label %.critedge47, label %292, !dbg !389
+
+; <label>:292 ; preds = %288
+ %293 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([22 x i8]* @.str39, i32 0, i32 0), i32 %i.516, i32 %j.215, i32 2) #3, !dbg !389
+ call void @llvm.dbg.value(metadata !308, i64 0, metadata !368), !dbg !397
+ %294 = getelementptr inbounds [3 x [6 x [4 x i16]]]* @g_535, i32 0, i32 %i.516, i32 %j.215, i32 3, !dbg !396
+ %295 = load i16* %294, align 2, !dbg !396
+ %296 = zext i16 %295 to i64, !dbg !396
+ call fastcc void @transparent_crc(i64 %296, i8* getelementptr inbounds ([15 x i8]* @.str54, i32 0, i32 0), i32 %print_hash_value.0), !dbg !396
+ %297 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([22 x i8]* @.str39, i32 0, i32 0), i32 %i.516, i32 %j.215, i32 3) #3, !dbg !389
+ br label %301, !dbg !389
+
+.critedge47: ; preds = %288
+ call void @llvm.dbg.value(metadata !308, i64 0, metadata !368), !dbg !397
+ %298 = getelementptr inbounds [3 x [6 x [4 x i16]]]* @g_535, i32 0, i32 %i.516, i32 %j.215, i32 3, !dbg !396
+ %299 = load i16* %298, align 2, !dbg !396
+ %300 = zext i16 %299 to i64, !dbg !396
+ call fastcc void @transparent_crc(i64 %300, i8* getelementptr inbounds ([15 x i8]* @.str54, i32 0, i32 0), i32 %print_hash_value.0), !dbg !396
+ br label %301
+
+; <label>:301 ; preds = %.critedge47, %292
+ call void @llvm.dbg.value(metadata !308, i64 0, metadata !368), !dbg !397
+ %302 = add nsw i32 %j.215, 1, !dbg !395
+ call void @llvm.dbg.value(metadata !{i32 %302}, i64 0, metadata !408), !dbg !395
+ %303 = icmp slt i32 %302, 6, !dbg !395
+ br i1 %303, label %.preheader12, label %134, !dbg !395
+
+.preheader18.1: ; preds = %318, %105
+ %k.019.1 = phi i32 [ %319, %318 ], [ 0, %105 ]
+ %304 = getelementptr inbounds [9 x [3 x [7 x %struct.S1]]]* @g_404, i32 0, i32 %i.322, i32 1, i32 %k.019.1, i32 0, !dbg !362
+ %305 = load i32* %304, align 4, !dbg !362
+ %306 = zext i32 %305 to i64, !dbg !362
+ call fastcc void @transparent_crc(i64 %306, i8* getelementptr inbounds ([18 x i8]* @.str35, i32 0, i32 0), i32 %print_hash_value.0), !dbg !362
+ %307 = getelementptr inbounds [9 x [3 x [7 x %struct.S1]]]* @g_404, i32 0, i32 %i.322, i32 1, i32 %k.019.1, i32 1, !dbg !364
+ %308 = load i32* %307, align 4, !dbg !364
+ %309 = zext i32 %308 to i64, !dbg !364
+ call fastcc void @transparent_crc(i64 %309, i8* getelementptr inbounds ([18 x i8]* @.str36, i32 0, i32 0), i32 %print_hash_value.0), !dbg !364
+ %310 = getelementptr inbounds [9 x [3 x [7 x %struct.S1]]]* @g_404, i32 0, i32 %i.322, i32 1, i32 %k.019.1, i32 2, !dbg !365
+ %311 = load i8* %310, align 4, !dbg !365
+ %312 = zext i8 %311 to i64, !dbg !365
+ call fastcc void @transparent_crc(i64 %312, i8* getelementptr inbounds ([18 x i8]* @.str37, i32 0, i32 0), i32 %print_hash_value.0), !dbg !365
+ %313 = getelementptr inbounds [9 x [3 x [7 x %struct.S1]]]* @g_404, i32 0, i32 %i.322, i32 1, i32 %k.019.1, i32 3, !dbg !366
+ %314 = load i16* %313, align 2, !dbg !366
+ %315 = sext i16 %314 to i64, !dbg !366
+ call fastcc void @transparent_crc(i64 %315, i8* getelementptr inbounds ([18 x i8]* @.str38, i32 0, i32 0), i32 %print_hash_value.0), !dbg !366
+ br i1 %351, label %318, label %316, !dbg !367
+
+; <label>:316 ; preds = %.preheader18.1
+ %317 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([22 x i8]* @.str39, i32 0, i32 0), i32 %i.322, i32 1, i32 %k.019.1) #3, !dbg !367
+ br label %318, !dbg !367
+
+; <label>:318 ; preds = %316, %.preheader18.1
+ %319 = add nsw i32 %k.019.1, 1, !dbg !356
+ call void @llvm.dbg.value(metadata !{i32 %106}, i64 0, metadata !368), !dbg !356
+ %320 = icmp slt i32 %319, 7, !dbg !356
+ br i1 %320, label %.preheader18.1, label %.preheader18.2, !dbg !356
+
+.preheader18.2: ; preds = %335, %318
+ %k.019.2 = phi i32 [ %336, %335 ], [ 0, %318 ]
+ %321 = getelementptr inbounds [9 x [3 x [7 x %struct.S1]]]* @g_404, i32 0, i32 %i.322, i32 2, i32 %k.019.2, i32 0, !dbg !362
+ %322 = load i32* %321, align 4, !dbg !362
+ %323 = zext i32 %322 to i64, !dbg !362
+ call fastcc void @transparent_crc(i64 %323, i8* getelementptr inbounds ([18 x i8]* @.str35, i32 0, i32 0), i32 %print_hash_value.0), !dbg !362
+ %324 = getelementptr inbounds [9 x [3 x [7 x %struct.S1]]]* @g_404, i32 0, i32 %i.322, i32 2, i32 %k.019.2, i32 1, !dbg !364
+ %325 = load i32* %324, align 4, !dbg !364
+ %326 = zext i32 %325 to i64, !dbg !364
+ call fastcc void @transparent_crc(i64 %326, i8* getelementptr inbounds ([18 x i8]* @.str36, i32 0, i32 0), i32 %print_hash_value.0), !dbg !364
+ %327 = getelementptr inbounds [9 x [3 x [7 x %struct.S1]]]* @g_404, i32 0, i32 %i.322, i32 2, i32 %k.019.2, i32 2, !dbg !365
+ %328 = load i8* %327, align 4, !dbg !365
+ %329 = zext i8 %328 to i64, !dbg !365
+ call fastcc void @transparent_crc(i64 %329, i8* getelementptr inbounds ([18 x i8]* @.str37, i32 0, i32 0), i32 %print_hash_value.0), !dbg !365
+ %330 = getelementptr inbounds [9 x [3 x [7 x %struct.S1]]]* @g_404, i32 0, i32 %i.322, i32 2, i32 %k.019.2, i32 3, !dbg !366
+ %331 = load i16* %330, align 2, !dbg !366
+ %332 = sext i16 %331 to i64, !dbg !366
+ call fastcc void @transparent_crc(i64 %332, i8* getelementptr inbounds ([18 x i8]* @.str38, i32 0, i32 0), i32 %print_hash_value.0), !dbg !366
+ br i1 %351, label %335, label %333, !dbg !367
+
+; <label>:333 ; preds = %.preheader18.2
+ %334 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([22 x i8]* @.str39, i32 0, i32 0), i32 %i.322, i32 2, i32 %k.019.2) #3, !dbg !367
+ br label %335, !dbg !367
+
+; <label>:335 ; preds = %333, %.preheader18.2
+ %336 = add nsw i32 %k.019.2, 1, !dbg !356
+ call void @llvm.dbg.value(metadata !{i32 %106}, i64 0, metadata !368), !dbg !356
+ %337 = icmp slt i32 %336, 7, !dbg !356
+ br i1 %337, label %.preheader18.2, label %338, !dbg !356
+
+; <label>:338 ; preds = %335
+ call void @llvm.dbg.value(metadata !308, i64 0, metadata !408), !dbg !438
+ %339 = add nsw i32 %i.322, 1, !dbg !439
+ call void @llvm.dbg.value(metadata !{i32 %339}, i64 0, metadata !314), !dbg !439
+ %340 = icmp slt i32 %339, 9, !dbg !439
+ br i1 %340, label %.preheader18, label %108, !dbg !439
+
+; <label>:341 ; preds = %88
+ %342 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([14 x i8]* @.str6, i32 0, i32 0), i32 0) #3, !dbg !351
+ call void @llvm.dbg.value(metadata !308, i64 0, metadata !314), !dbg !355
+ call fastcc void @transparent_crc(i64 0, i8* getelementptr inbounds ([9 x i8]* @.str32, i32 0, i32 0), i32 %print_hash_value.0), !dbg !354
+ %343 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([14 x i8]* @.str6, i32 0, i32 0), i32 1) #3, !dbg !351
+ call void @llvm.dbg.value(metadata !308, i64 0, metadata !314), !dbg !355
+ call fastcc void @transparent_crc(i64 0, i8* getelementptr inbounds ([9 x i8]* @.str32, i32 0, i32 0), i32 %print_hash_value.0), !dbg !354
+ %344 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([14 x i8]* @.str6, i32 0, i32 0), i32 2) #3, !dbg !351
+ call void @llvm.dbg.value(metadata !308, i64 0, metadata !314), !dbg !355
+ call fastcc void @transparent_crc(i64 0, i8* getelementptr inbounds ([9 x i8]* @.str32, i32 0, i32 0), i32 %print_hash_value.0), !dbg !354
+ %345 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([14 x i8]* @.str6, i32 0, i32 0), i32 3) #3, !dbg !351
+ call void @llvm.dbg.value(metadata !308, i64 0, metadata !314), !dbg !355
+ call fastcc void @transparent_crc(i64 0, i8* getelementptr inbounds ([9 x i8]* @.str32, i32 0, i32 0), i32 %print_hash_value.0), !dbg !354
+ %346 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([14 x i8]* @.str6, i32 0, i32 0), i32 4) #3, !dbg !351
+ call void @llvm.dbg.value(metadata !308, i64 0, metadata !314), !dbg !355
+ call fastcc void @transparent_crc(i64 0, i8* getelementptr inbounds ([9 x i8]* @.str32, i32 0, i32 0), i32 %print_hash_value.0), !dbg !354
+ %347 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([14 x i8]* @.str6, i32 0, i32 0), i32 5) #3, !dbg !351
+ br label %348, !dbg !351
+
+; <label>:348 ; preds = %341, %.thread32
+ call void @llvm.dbg.value(metadata !308, i64 0, metadata !314), !dbg !355
+ %349 = load i16* @g_395, align 2, !dbg !440
+ %350 = zext i16 %349 to i64, !dbg !440
+ call fastcc void @transparent_crc(i64 %350, i8* getelementptr inbounds ([6 x i8]* @.str33, i32 0, i32 0), i32 %print_hash_value.0), !dbg !440
+ call fastcc void @transparent_crc(i64 18, i8* getelementptr inbounds ([6 x i8]* @.str34, i32 0, i32 0), i32 %print_hash_value.0), !dbg !441
+ call void @llvm.dbg.value(metadata !2, i64 0, metadata !314), !dbg !439
+ %351 = icmp eq i32 %print_hash_value.0, 0, !dbg !367
+ br label %.preheader18, !dbg !439
+}
+
+; Function Attrs: nounwind readnone
+declare void @llvm.dbg.declare(metadata, metadata) #1
+
+; Function Attrs: nounwind readonly
+declare i32 @strcmp(i8* nocapture, i8* nocapture) #2
+
+; Function Attrs: nounwind
+define internal fastcc void @crc32_gentab() #0 {
+ tail call void @llvm.dbg.value(metadata !442, i64 0, metadata !443), !dbg !445
+ tail call void @llvm.dbg.value(metadata !2, i64 0, metadata !446), !dbg !447
+ br label %.preheader, !dbg !447
+
+.preheader: ; preds = %.preheader, %0
+ %i.03 = phi i32 [ 0, %0 ], [ %34, %.preheader ]
+ %1 = and i32 %i.03, 1, !dbg !449
+ %2 = icmp eq i32 %1, 0, !dbg !449
+ %3 = lshr i32 %i.03, 1, !dbg !453
+ %4 = xor i32 %3, -306674912, !dbg !453
+ tail call void @llvm.dbg.value(metadata !{i32 %4}, i64 0, metadata !455), !dbg !453
+ %crc.1 = select i1 %2, i32 %3, i32 %4, !dbg !449
+ tail call void @llvm.dbg.value(metadata !456, i64 0, metadata !457), !dbg !458
+ %5 = and i32 %crc.1, 1, !dbg !449
+ %6 = icmp eq i32 %5, 0, !dbg !449
+ %7 = lshr i32 %crc.1, 1, !dbg !453
+ %8 = xor i32 %7, -306674912, !dbg !453
+ tail call void @llvm.dbg.value(metadata !{i32 %4}, i64 0, metadata !455), !dbg !453
+ %crc.1.1 = select i1 %6, i32 %7, i32 %8, !dbg !449
+ tail call void @llvm.dbg.value(metadata !456, i64 0, metadata !457), !dbg !458
+ %9 = and i32 %crc.1.1, 1, !dbg !449
+ %10 = icmp eq i32 %9, 0, !dbg !449
+ %11 = lshr i32 %crc.1.1, 1, !dbg !453
+ %12 = xor i32 %11, -306674912, !dbg !453
+ tail call void @llvm.dbg.value(metadata !{i32 %4}, i64 0, metadata !455), !dbg !453
+ %crc.1.2 = select i1 %10, i32 %11, i32 %12, !dbg !449
+ tail call void @llvm.dbg.value(metadata !456, i64 0, metadata !457), !dbg !458
+ %13 = and i32 %crc.1.2, 1, !dbg !449
+ %14 = icmp eq i32 %13, 0, !dbg !449
+ %15 = lshr i32 %crc.1.2, 1, !dbg !453
+ %16 = xor i32 %15, -306674912, !dbg !453
+ tail call void @llvm.dbg.value(metadata !{i32 %4}, i64 0, metadata !455), !dbg !453
+ %crc.1.3 = select i1 %14, i32 %15, i32 %16, !dbg !449
+ tail call void @llvm.dbg.value(metadata !456, i64 0, metadata !457), !dbg !458
+ %17 = and i32 %crc.1.3, 1, !dbg !449
+ %18 = icmp eq i32 %17, 0, !dbg !449
+ %19 = lshr i32 %crc.1.3, 1, !dbg !453
+ %20 = xor i32 %19, -306674912, !dbg !453
+ tail call void @llvm.dbg.value(metadata !{i32 %4}, i64 0, metadata !455), !dbg !453
+ %crc.1.4 = select i1 %18, i32 %19, i32 %20, !dbg !449
+ tail call void @llvm.dbg.value(metadata !456, i64 0, metadata !457), !dbg !458
+ %21 = and i32 %crc.1.4, 1, !dbg !449
+ %22 = icmp eq i32 %21, 0, !dbg !449
+ %23 = lshr i32 %crc.1.4, 1, !dbg !453
+ %24 = xor i32 %23, -306674912, !dbg !453
+ tail call void @llvm.dbg.value(metadata !{i32 %4}, i64 0, metadata !455), !dbg !453
+ %crc.1.5 = select i1 %22, i32 %23, i32 %24, !dbg !449
+ tail call void @llvm.dbg.value(metadata !456, i64 0, metadata !457), !dbg !458
+ %25 = and i32 %crc.1.5, 1, !dbg !449
+ %26 = icmp eq i32 %25, 0, !dbg !449
+ %27 = lshr i32 %crc.1.5, 1, !dbg !453
+ %28 = xor i32 %27, -306674912, !dbg !453
+ tail call void @llvm.dbg.value(metadata !{i32 %4}, i64 0, metadata !455), !dbg !453
+ %crc.1.6 = select i1 %26, i32 %27, i32 %28, !dbg !449
+ tail call void @llvm.dbg.value(metadata !456, i64 0, metadata !457), !dbg !458
+ %29 = and i32 %crc.1.6, 1, !dbg !449
+ %30 = icmp eq i32 %29, 0, !dbg !449
+ %31 = lshr i32 %crc.1.6, 1, !dbg !453
+ %32 = xor i32 %31, -306674912, !dbg !453
+ tail call void @llvm.dbg.value(metadata !{i32 %4}, i64 0, metadata !455), !dbg !453
+ %crc.1.7 = select i1 %30, i32 %31, i32 %32, !dbg !449
+ tail call void @llvm.dbg.value(metadata !456, i64 0, metadata !457), !dbg !458
+ %33 = getelementptr inbounds [256 x i32]* @crc32_tab, i32 0, i32 %i.03, !dbg !459
+ store i32 %crc.1.7, i32* %33, align 4, !dbg !459
+ %34 = add nsw i32 %i.03, 1, !dbg !447
+ tail call void @llvm.dbg.value(metadata !{i32 %34}, i64 0, metadata !446), !dbg !447
+ %35 = icmp slt i32 %34, 256, !dbg !447
+ br i1 %35, label %.preheader, label %36, !dbg !447
+
+; <label>:36 ; preds = %.preheader
+ ret void, !dbg !460
+}
+
+; Function Attrs: nounwind
+define internal fastcc void @func_1(%struct.S3* noalias nocapture sret %agg.result) #0 {
+ tail call void @llvm.dbg.value(metadata !461, i64 0, metadata !462), !dbg !464
+ tail call void @llvm.dbg.declare(metadata !465, metadata !466), !dbg !467
+ %1 = load i32* @g_5, align 4, !dbg !468
+ %2 = trunc i32 %1 to i8, !dbg !468
+ %3 = tail call fastcc i32 @func_2(i8 zeroext %2), !dbg !468
+ store i32 %3, i32* @g_465, align 4, !dbg !468
+ %4 = bitcast %struct.S3* %agg.result to i64*, !dbg !469
+ store i64 8862064115011551231, i64* %4, align 4, !dbg !469
+ ret void, !dbg !469
+}
+
+; Function Attrs: nounwind
+define internal fastcc void @transparent_crc(i64 %val, i8* %vname, i32 %flag) #0 {
+ tail call void @llvm.dbg.value(metadata !{i64 %val}, i64 0, metadata !470), !dbg !471
+ tail call void @llvm.dbg.value(metadata !{i8* %vname}, i64 0, metadata !472), !dbg !471
+ tail call void @llvm.dbg.value(metadata !{i32 %flag}, i64 0, metadata !473), !dbg !471
+ tail call fastcc void @crc32_8bytes(i64 %val), !dbg !474
+ %1 = icmp eq i32 %flag, 0, !dbg !476
+ br i1 %1, label %6, label %2, !dbg !476
+
+; <label>:2 ; preds = %0
+ %3 = load i32* @crc32_context, align 4, !dbg !477
+ %4 = xor i32 %3, -1, !dbg !477
+ %5 = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([36 x i8]* @.str72, i32 0, i32 0), i8* %vname, i32 %4) #3, !dbg !477
+ br label %6, !dbg !479
+
+; <label>:6 ; preds = %2, %0
+ ret void, !dbg !480
+}
+
+; Function Attrs: nounwind
+declare i32 @printf(i8* nocapture, ...) #0
+
+; Function Attrs: nounwind
+define internal fastcc void @platform_main_end(i32 %crc) #0 {
+ tail call void @llvm.dbg.value(metadata !2, i64 0, metadata !481), !dbg !482
+ %1 = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([15 x i8]* @.str71, i32 0, i32 0), i32 %crc) #3, !dbg !483
+ ret void, !dbg !485
+}
+
+; Function Attrs: nounwind
+define internal fastcc void @crc32_8bytes(i64 %val) #0 {
+ tail call void @llvm.dbg.value(metadata !{i64 %val}, i64 0, metadata !486), !dbg !487
+ %1 = trunc i64 %val to i8, !dbg !488
+ tail call fastcc void @crc32_byte(i8 zeroext %1), !dbg !488
+ %2 = lshr i64 %val, 8, !dbg !489
+ %3 = trunc i64 %2 to i8, !dbg !489
+ tail call fastcc void @crc32_byte(i8 zeroext %3), !dbg !489
+ %4 = lshr i64 %val, 16, !dbg !490
+ %5 = trunc i64 %4 to i8, !dbg !490
+ tail call fastcc void @crc32_byte(i8 zeroext %5), !dbg !490
+ %6 = lshr i64 %val, 24, !dbg !491
+ %7 = trunc i64 %6 to i8, !dbg !491
+ tail call fastcc void @crc32_byte(i8 zeroext %7), !dbg !491
+ %8 = lshr i64 %val, 32, !dbg !492
+ %9 = trunc i64 %8 to i8, !dbg !492
+ tail call fastcc void @crc32_byte(i8 zeroext %9), !dbg !492
+ %10 = lshr i64 %val, 40, !dbg !493
+ %11 = trunc i64 %10 to i8, !dbg !493
+ tail call fastcc void @crc32_byte(i8 zeroext %11), !dbg !493
+ %12 = lshr i64 %val, 48, !dbg !494
+ %13 = trunc i64 %12 to i8, !dbg !494
+ tail call fastcc void @crc32_byte(i8 zeroext %13), !dbg !494
+ %14 = lshr i64 %val, 56, !dbg !495
+ %15 = trunc i64 %14 to i8, !dbg !495
+ tail call fastcc void @crc32_byte(i8 zeroext %15), !dbg !495
+ ret void, !dbg !496
+}
+
+; Function Attrs: nounwind
+define internal fastcc void @crc32_byte(i8 zeroext %b) #0 {
+ tail call void @llvm.dbg.value(metadata !{i8 %b}, i64 0, metadata !497), !dbg !498
+ %1 = load i32* @crc32_context, align 4, !dbg !499
+ %2 = lshr i32 %1, 8, !dbg !499
+ %3 = zext i8 %b to i32, !dbg !499
+ %.masked = and i32 %1, 255, !dbg !499
+ %4 = xor i32 %.masked, %3, !dbg !499
+ %5 = getelementptr inbounds [256 x i32]* @crc32_tab, i32 0, i32 %4, !dbg !499
+ %6 = load i32* %5, align 4, !dbg !499
+ %7 = xor i32 %2, %6, !dbg !499
+ store i32 %7, i32* @crc32_context, align 4, !dbg !499
+ ret void, !dbg !500
+}
+
+; Function Attrs: nounwind
+declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) #3
+
+; Function Attrs: nounwind
+define internal fastcc i32 @func_2(i8 zeroext %p_3) #0 {
+ %1 = alloca %struct.S0, align 4
+ %2 = alloca %struct.S3, align 4
+ call void @llvm.dbg.value(metadata !501, i64 0, metadata !502), !dbg !503
+ call void @llvm.dbg.value(metadata !504, i64 0, metadata !505), !dbg !506
+ call void @llvm.dbg.declare(metadata !507, metadata !508), !dbg !509
+ call void @llvm.dbg.value(metadata !510, i64 0, metadata !511), !dbg !512
+ call void @llvm.dbg.value(metadata !513, i64 0, metadata !514), !dbg !516
+ call void @llvm.dbg.value(metadata !517, i64 0, metadata !518), !dbg !519
+ call void @llvm.dbg.value(metadata !520, i64 0, metadata !521), !dbg !522
+ call void @llvm.dbg.value(metadata !523, i64 0, metadata !524), !dbg !525
+ call void @llvm.dbg.declare(metadata !526, metadata !527), !dbg !528
+ call void @llvm.dbg.declare(metadata !529, metadata !530), !dbg !533
+ call void @llvm.dbg.value(metadata !534, i64 0, metadata !535), !dbg !536
+ call void @llvm.dbg.declare(metadata !537, metadata !538), !dbg !541
+ call void @llvm.dbg.value(metadata !542, i64 0, metadata !543), !dbg !544
+ %3 = zext i8 %p_3 to i32, !dbg !545
+ call fastcc void @func_10(%struct.S0* sret %1, i8 zeroext -3), !dbg !545
+ %4 = call fastcc i32 @safe_unary_minus_func_int32_t_s(i32 %3), !dbg !545
+ %not. = icmp ne i32 %4, 0, !dbg !545
+ %. = zext i1 %not. to i32, !dbg !545
+ %5 = call fastcc i32 @safe_mod_func_int32_t_s_s(i32 %., i32 %3)
+ store i32 %5, i32* @g_465, align 4
+ call void @llvm.dbg.value(metadata !517, i64 0, metadata !518), !dbg !519
+ call void @llvm.dbg.value(metadata !517, i64 0, metadata !521), !dbg !522
+ %6 = load i16* @g_103, align 2, !dbg !546
+ %7 = zext i16 %6 to i32, !dbg !546
+ %8 = call fastcc signext i8 @safe_mul_func_int8_t_s_s(i8 signext 0, i8 signext 1), !dbg !546
+ %9 = sext i8 %8 to i32, !dbg !546
+ %10 = load i32* @g_1055, align 4, !dbg !546
+ %11 = xor i32 %10, %9, !dbg !546
+ store i32 %11, i32* @g_1055, align 4, !dbg !546
+ %12 = and i32 %7, 18676, !dbg !546
+ call fastcc void @func_26(%struct.S3* sret %2, i32 %12, i32* @g_1055), !dbg !546
+ %13 = load i32* @g_1055, align 4, !dbg !546
+ %14 = icmp eq i32 %13, 0, !dbg !546
+ br i1 %14, label %26, label %15, !dbg !546
+
+; <label>:15 ; preds = %0
+ call void @llvm.dbg.value(metadata !547, i64 0, metadata !548), !dbg !552
+ call void @llvm.dbg.value(metadata !553, i64 0, metadata !554), !dbg !555
+ call void @llvm.dbg.value(metadata !556, i64 0, metadata !557), !dbg !558
+ store i16 -15853, i16* @g_103, align 2
+ %16 = call fastcc signext i8 @safe_lshift_func_int8_t_s_s(i8 signext 19, i32 5)
+ %17 = sext i8 %16 to i32
+ %18 = load i32* @g_465, align 4
+ %19 = and i32 %18, %17
+ store i32 %19, i32* @g_465, align 4
+ %20 = call fastcc i32* @func_45(i32* @g_1055, %struct.S3* byval getelementptr inbounds ([10 x %struct.S3]* @func_2.l_1247, i32 0, i32 3)), !dbg !559
+ %21 = call fastcc i32* @func_34(%union.U4* byval getelementptr inbounds ([10 x [1 x %union.U4]]* @g_345, i32 0, i32 5, i32 0), i32* getelementptr inbounds ({ i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }* @g_623, i32 0, i32 0)), !dbg !559
+ %22 = call fastcc i32* @func_34(%union.U4* byval getelementptr inbounds ([10 x [8 x %union.U4]]* @g_591, i32 0, i32 3, i32 4), i32* %21), !dbg !559
+ %23 = load i32* getelementptr inbounds ({ i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }* @g_623, i32 0, i32 0), align 4, !dbg !560
+ %24 = load i32* @g_1055, align 4, !dbg !560
+ %25 = xor i32 %24, %23, !dbg !560
+ store i32 %25, i32* @g_1055, align 4, !dbg !560
+ br label %27, !dbg !561
+
+; <label>:26 ; preds = %0
+ call void @llvm.dbg.declare(metadata !562, metadata !563), !dbg !565
+ call void @llvm.dbg.value(metadata !566, i64 0, metadata !567), !dbg !568
+ call void @llvm.dbg.declare(metadata !569, metadata !570), !dbg !573
+ store i64 8589934591, i64* bitcast (%struct.S3* getelementptr inbounds ([9 x %struct.S3]* @g_49, i32 0, i32 4) to i64*), align 8, !dbg !574
+ br label %27
+
+; <label>:27 ; preds = %26, %15
+ %28 = load i32* @g_465, align 4, !dbg !575
+ ret i32 %28, !dbg !575
+}
+
+; Function Attrs: nounwind readnone
+define internal fastcc i32 @safe_mod_func_int32_t_s_s(i32 %si1, i32 %si2) #4 {
+ tail call void @llvm.dbg.value(metadata !{i32 %si1}, i64 0, metadata !576), !dbg !577
+ tail call void @llvm.dbg.value(metadata !{i32 %si2}, i64 0, metadata !578), !dbg !577
+ %1 = icmp eq i32 %si2, 0, !dbg !579
+ br i1 %1, label %7, label %2, !dbg !579
+
+; <label>:2 ; preds = %0
+ %3 = icmp eq i32 %si1, -2147483648, !dbg !579
+ %4 = icmp eq i32 %si2, -1, !dbg !579
+ %or.cond = and i1 %3, %4, !dbg !579
+ br i1 %or.cond, label %7, label %5, !dbg !579
+
+; <label>:5 ; preds = %2
+ %6 = srem i32 %si1, %si2, !dbg !579
+ br label %7, !dbg !579
+
+; <label>:7 ; preds = %5, %2, %0
+ %8 = phi i32 [ %6, %5 ], [ %si1, %2 ], [ %si1, %0 ], !dbg !579
+ ret i32 %8, !dbg !579
+}
+
+; Function Attrs: nounwind readnone
+define internal fastcc i32 @safe_unary_minus_func_int32_t_s(i32 %si) #4 {
+ tail call void @llvm.dbg.value(metadata !{i32 %si}, i64 0, metadata !580), !dbg !581
+ %1 = sub nsw i32 0, %si, !dbg !582
+ ret i32 %1, !dbg !582
+}
+
+; Function Attrs: nounwind
+define internal fastcc void @func_10(%struct.S0* noalias nocapture sret %agg.result, i8 zeroext %p_11) #0 {
+.preheader9:
+ %l_14 = alloca i16, align 2, !dbg !584
+ %tmpcast = bitcast i16* %l_14 to [2 x i8]*, !dbg !584
+ %l_1179 = alloca i32**, align 4
+ %0 = alloca %struct.S3, align 4
+ %l_1143 = alloca %struct.S1, align 4
+ %l_1169 = alloca [1 x [2 x i16]], align 2
+ %1 = alloca %struct.S3, align 4
+ call void @llvm.dbg.value(metadata !2, i64 0, metadata !587), !dbg !588
+ call void @llvm.dbg.declare(metadata !{[2 x i8]* %tmpcast}, metadata !589), !dbg !592
+ call void @llvm.dbg.value(metadata !593, i64 0, metadata !594), !dbg !595
+ call void @llvm.dbg.declare(metadata !596, metadata !597), !dbg !598
+ call void @llvm.dbg.value(metadata !599, i64 0, metadata !600), !dbg !601
+ call void @llvm.dbg.value(metadata !602, i64 0, metadata !603), !dbg !604
+ call void @llvm.dbg.value(metadata !308, i64 0, metadata !605), !dbg !606
+ call void @llvm.dbg.value(metadata !607, i64 0, metadata !608), !dbg !609
+ call void @llvm.dbg.value(metadata !607, i64 0, metadata !610), !dbg !611
+ call void @llvm.dbg.value(metadata !612, i64 0, metadata !613), !dbg !614
+ call void @llvm.dbg.value(metadata !615, i64 0, metadata !616), !dbg !617
+ call void @llvm.dbg.value(metadata !618, i64 0, metadata !619), !dbg !620
+ call void @llvm.dbg.value(metadata !621, i64 0, metadata !622), !dbg !623
+ call void @llvm.dbg.value(metadata !621, i64 0, metadata !622), !dbg !624
+ call void @llvm.dbg.value(metadata !621, i64 0, metadata !628), !dbg !629
+ store i32** null, i32*** %l_1179, align 4, !dbg !629
+ call void @llvm.dbg.value(metadata !{i32*** %l_1179}, i64 0, metadata !630), !dbg !631
+ call void @llvm.dbg.value(metadata !{i32*** %l_1179}, i64 0, metadata !632), !dbg !633
+ call void @llvm.dbg.declare(metadata !634, metadata !635), !dbg !638
+ call void @llvm.dbg.value(metadata !639, i64 0, metadata !640), !dbg !641
+ call void @llvm.dbg.value(metadata !642, i64 0, metadata !643), !dbg !645
+ call void @llvm.dbg.declare(metadata !646, metadata !647), !dbg !648
+ call void @llvm.dbg.value(metadata !2, i64 0, metadata !649), !dbg !650
+ store i16 0, i16* %l_14, align 2, !dbg !584
+ br label %2, !dbg !651
+
+; <label>:2 ; preds = %2, %.preheader9
+ %.010 = phi i32 [ 0, %.preheader9 ], [ %9, %2 ]
+ store i16 0, i16* %l_14, align 2, !dbg !653
+ store i32 2, i32* @g_5, align 4, !dbg !657
+ %3 = getelementptr inbounds [2 x i8]* %tmpcast, i32 0, i32 %.010, !dbg !658
+ %4 = load i8* %3, align 1, !dbg !658
+ %5 = zext i8 %4 to i32, !dbg !658
+ %6 = call fastcc zeroext i8 @func_31(), !dbg !658
+ store i8 %6, i8* @g_96, align 1, !dbg !658
+ call fastcc void @func_26(%struct.S3* sret %0, i32 %5, i32* @g_465), !dbg !658
+ call fastcc void @func_19(%struct.S3* byval @g_25), !dbg !658
+ %7 = load i8* getelementptr inbounds ({ i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }* @g_623, i32 0, i32 13), align 4, !dbg !658
+ %8 = sext i8 %7 to i32, !dbg !658
+ call fastcc void @func_15(i32 %8), !dbg !658
+ call void @llvm.dbg.value(metadata !520, i64 0, metadata !659), !dbg !658
+ %9 = add i32 %.010, 1, !dbg !651
+ call void @llvm.dbg.value(metadata !660, i64 0, metadata !587), !dbg !651
+ %10 = icmp ult i32 %9, 2, !dbg !651
+ br i1 %10, label %2, label %11, !dbg !651
+
+; <label>:11 ; preds = %2
+ store i32 0, i32* @g_465, align 4, !dbg !661
+ %12 = load i16* @g_103, align 2, !dbg !662
+ %13 = zext i8 %p_11 to i32, !dbg !662
+ %14 = call fastcc zeroext i16 @safe_mod_func_uint16_t_u_u(i16 zeroext %12, i16 zeroext %12), !dbg !662
+ %15 = icmp eq i16 %14, 0, !dbg !662
+ br i1 %15, label %17, label %16, !dbg !662
+
+; <label>:16 ; preds = %11
+ store i1 true, i1* @g_452, align 1
+ br label %53, !dbg !663
+
+; <label>:17 ; preds = %11
+ call void @llvm.dbg.value(metadata !599, i64 0, metadata !666), !dbg !667
+ call void @llvm.dbg.value(metadata !668, i64 0, metadata !669), !dbg !670
+ call void @llvm.dbg.value(metadata !671, i64 0, metadata !672), !dbg !673
+ call void @llvm.dbg.value(metadata !674, i64 0, metadata !675), !dbg !676
+ call void @llvm.dbg.value(metadata !2, i64 0, metadata !677), !dbg !678
+ call void @llvm.dbg.declare(metadata !679, metadata !680), !dbg !683
+ call void @llvm.dbg.declare(metadata !684, metadata !685), !dbg !686
+ call void @llvm.dbg.value(metadata !687, i64 0, metadata !688), !dbg !689
+ call void @llvm.dbg.declare(metadata !{%struct.S1* %l_1143}, metadata !690), !dbg !691
+ %18 = bitcast %struct.S1* %l_1143 to i8*, !dbg !691
+ call void @llvm.memcpy.p0i8.p0i8.i32(i8* %18, i8* bitcast (%struct.S1* @func_10.l_1143 to i8*), i32 12, i32 4, i1 false), !dbg !691
+ call void @llvm.dbg.value(metadata !621, i64 0, metadata !692), !dbg !694
+ store i8 -8, i8* getelementptr inbounds ({ i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }* @g_108, i32 0, i32 13), align 4, !dbg !695
+ %19 = load i32* getelementptr inbounds ({ i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }* @g_108, i32 0, i32 0), align 4, !dbg !697
+ %20 = icmp eq i32 %19, 0, !dbg !697
+ br i1 %20, label %43, label %21, !dbg !697
+
+; <label>:21 ; preds = %17
+ call void @llvm.dbg.value(metadata !698, i64 0, metadata !699), !dbg !701
+ call void @llvm.dbg.value(metadata !599, i64 0, metadata !702), !dbg !703
+ call void @llvm.dbg.value(metadata !542, i64 0, metadata !704), !dbg !705
+ call void @llvm.dbg.value(metadata !698, i64 0, metadata !706), !dbg !707
+ call void @llvm.dbg.value(metadata !698, i64 0, metadata !708), !dbg !709
+ call void @llvm.dbg.value(metadata !2, i64 0, metadata !710), !dbg !711
+ call void @llvm.dbg.declare(metadata !712, metadata !713), !dbg !716
+ call void @llvm.dbg.value(metadata !717, i64 0, metadata !718), !dbg !720
+ call void @llvm.dbg.value(metadata !721, i64 0, metadata !722), !dbg !724
+ call void @llvm.dbg.value(metadata !725, i64 0, metadata !726), !dbg !727
+ %22 = load i32* getelementptr inbounds ([4 x [5 x i32]]* @g_1057, i32 0, i32 2, i32 2), align 4, !dbg !728
+ %23 = add i32 %22, 1, !dbg !728
+ store i32 %23, i32* getelementptr inbounds ([4 x [5 x i32]]* @g_1057, i32 0, i32 2, i32 2), align 4, !dbg !728
+ %24 = load i32* @g_465, align 4, !dbg !729
+ %25 = load i8* @g_258, align 1, !dbg !729
+ %26 = zext i8 %25 to i32, !dbg !729
+ %27 = and i32 %26, %24, !dbg !729
+ %28 = trunc i32 %27 to i8, !dbg !729
+ store i8 %28, i8* @g_258, align 1, !dbg !729
+ %29 = icmp eq i8 %28, 0, !dbg !729
+ %30 = zext i1 %29 to i8, !dbg !729
+ %31 = load i32* getelementptr inbounds ({ i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }* @g_108, i32 0, i32 0), align 4, !dbg !729
+ %32 = trunc i32 %31 to i16, !dbg !729
+ %33 = call fastcc zeroext i16 @safe_mul_func_uint16_t_u_u(i16 zeroext 2, i16 zeroext %32), !dbg !729
+ %34 = trunc i16 %33 to i8, !dbg !729
+ %35 = call fastcc signext i8 @safe_mul_func_int8_t_s_s(i8 signext %30, i8 signext %34), !dbg !729
+ %36 = sext i8 %35 to i32, !dbg !729
+ store i32 %36, i32* getelementptr inbounds (%struct.S3* @g_25, i32 0, i32 0), align 8, !dbg !729
+ %37 = load i32* getelementptr inbounds ([4 x [5 x i32]]* @g_1057, i32 0, i32 2, i32 1), align 4, !dbg !729
+ %38 = and i32 %37, %36, !dbg !729
+ store i32 %38, i32* getelementptr inbounds ([4 x [5 x i32]]* @g_1057, i32 0, i32 2, i32 1), align 4, !dbg !729
+ %39 = call fastcc signext i16 @safe_add_func_int16_t_s_s(i16 signext 1, i16 signext 2)
+ %40 = sext i16 %39 to i32
+ %41 = load i32* getelementptr inbounds ({ i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }* @g_623, i32 0, i32 0), align 4
+ %42 = and i32 %41, %40
+ store i32 %42, i32* getelementptr inbounds ({ i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }* @g_623, i32 0, i32 0), align 4
+ store i32 %42, i32* @g_465, align 4
+ br label %53, !dbg !730
+
+; <label>:43 ; preds = %17
+ %44 = getelementptr inbounds [1 x [2 x i16]]* %l_1169, i32 0, i32 0, i32 0, !dbg !731
+ store i16 5, i16* %44, align 2, !dbg !731
+ call void @llvm.dbg.value(metadata !308, i64 0, metadata !735), !dbg !736
+ %45 = getelementptr inbounds [1 x [2 x i16]]* %l_1169, i32 0, i32 0, i32 1, !dbg !731
+ store i16 5, i16* %45, align 2, !dbg !731
+ call void @llvm.dbg.value(metadata !308, i64 0, metadata !735), !dbg !736
+ call void @llvm.dbg.value(metadata !621, i64 0, metadata !692), !dbg !624
+ call fastcc void @func_26(%struct.S3* sret %1, i32 0, i32* @g_465), !dbg !624
+ %46 = load i32* bitcast (i8* getelementptr inbounds ({ i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }* @g_623, i32 0, i32 9) to i32*), align 4, !dbg !624
+ %47 = and i32 %46, 67108863, !dbg !624
+ %48 = call fastcc zeroext i8 @safe_rshift_func_uint8_t_u_s(i8 zeroext 1, i32 %47), !dbg !624
+ %49 = zext i8 %48 to i16, !dbg !624
+ %50 = getelementptr inbounds [1 x [2 x i16]]* %l_1169, i32 0, i32 0, i32 0, !dbg !624
+ %51 = load i16* %50, align 2, !dbg !624
+ %52 = or i16 %51, %49, !dbg !624
+ store i16 %52, i16* %50, align 2, !dbg !624
+ call void @llvm.dbg.value(metadata !{%struct.S1* %l_1143}, i64 0, metadata !690), !dbg !737
+ store %struct.S1* %l_1143, %struct.S1** getelementptr inbounds ([2 x [8 x [6 x %struct.S1*]]]* @g_524, i32 0, i32 1, i32 2, i32 3), align 4, !dbg !737
+ store %struct.S2* null, %struct.S2** getelementptr inbounds ([6 x [10 x %struct.S2*]]* @g_192, i32 0, i32 3, i32 4), align 4, !dbg !738
+ br label %53
+
+; <label>:53 ; preds = %43, %21, %16
+ call void @llvm.dbg.value(metadata !{i32*** %l_1179}, i64 0, metadata !630), !dbg !739
+ call void @llvm.dbg.value(metadata !{i32*** %l_1179}, i64 0, metadata !628), !dbg !739
+ store i32*** %l_1179, i32**** @g_1182, align 4, !dbg !739
+ store i8 109, i8* @g_96, align 1, !dbg !739
+ %54 = call fastcc zeroext i8 @safe_mul_func_uint8_t_u_u(i8 zeroext 109, i8 zeroext %p_11), !dbg !739
+ %55 = zext i8 %54 to i32, !dbg !739
+ %56 = load i32* getelementptr inbounds ({ i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }* @g_108, i32 0, i32 0), align 4, !dbg !739
+ %57 = or i32 %56, %55, !dbg !739
+ store i32 %57, i32* getelementptr inbounds ({ i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }* @g_108, i32 0, i32 0), align 4, !dbg !739
+ %58 = icmp sgt i32 %57, 238, !dbg !739
+ %59 = zext i1 %58 to i16, !dbg !739
+ store i16 %59, i16* @g_534, align 2, !dbg !739
+ %60 = call fastcc signext i16 @safe_add_func_int16_t_s_s(i16 signext 0, i16 signext %59), !dbg !739
+ %61 = sext i16 %60 to i32, !dbg !739
+ %62 = icmp sge i32 %61, %13, !dbg !739
+ %63 = zext i1 %62 to i32, !dbg !739
+ %64 = load i32* @g_465, align 4, !dbg !739
+ %65 = or i32 %63, %64, !dbg !739
+ store i32 %65, i32* @g_465, align 4, !dbg !739
+ %66 = bitcast %struct.S0* %agg.result to i8*, !dbg !740
+ call void @llvm.memcpy.p0i8.p0i8.i32(i8* %66, i8* bitcast ({ i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }* @func_10.l_1189 to i8*), i32 24, i32 4, i1 false), !dbg !740
+ ret void, !dbg !741
+}
+
+; Function Attrs: nounwind readnone
+define internal fastcc zeroext i16 @safe_sub_func_uint16_t_u_u(i16 zeroext %ui1, i16 zeroext %ui2) #4 {
+ tail call void @llvm.dbg.value(metadata !{i16 %ui1}, i64 0, metadata !742), !dbg !743
+ tail call void @llvm.dbg.value(metadata !{i16 %ui2}, i64 0, metadata !744), !dbg !743
+ %1 = sub i16 %ui1, %ui2, !dbg !745
+ ret i16 %1, !dbg !745
+}
+
+; Function Attrs: nounwind readnone
+define internal fastcc zeroext i8 @safe_mul_func_uint8_t_u_u(i8 zeroext %ui1, i8 zeroext %ui2) #4 {
+ tail call void @llvm.dbg.value(metadata !{i8 %ui1}, i64 0, metadata !746), !dbg !747
+ tail call void @llvm.dbg.value(metadata !{i8 %ui2}, i64 0, metadata !748), !dbg !747
+ %1 = mul i8 %ui2, %ui1, !dbg !749
+ ret i8 %1, !dbg !749
+}
+
+; Function Attrs: nounwind readnone
+define internal fastcc signext i8 @safe_lshift_func_int8_t_s_s(i8 signext %left, i32 %right) #4 {
+ tail call void @llvm.dbg.value(metadata !{i8 %left}, i64 0, metadata !750), !dbg !751
+ tail call void @llvm.dbg.value(metadata !{i32 %right}, i64 0, metadata !752), !dbg !751
+ %1 = sext i8 %left to i32, !dbg !753
+ %2 = icmp slt i8 %left, 0, !dbg !753
+ %3 = icmp ugt i32 %right, 31, !dbg !753
+ %or.cond = or i1 %2, %3, !dbg !753
+ %4 = lshr i32 127, %right, !dbg !753
+ %5 = icmp sgt i32 %1, %4, !dbg !753
+ %or.cond4 = or i1 %or.cond, %5, !dbg !753
+ br i1 %or.cond4, label %8, label %6, !dbg !753
+
+; <label>:6 ; preds = %0
+ %7 = shl i32 %1, %right, !dbg !753
+ %extract.t2 = trunc i32 %7 to i8, !dbg !753
+ br label %8, !dbg !753
+
+; <label>:8 ; preds = %6, %0
+ %.off0 = phi i8 [ %extract.t2, %6 ], [ %left, %0 ]
+ ret i8 %.off0, !dbg !753
+}
+
+; Function Attrs: nounwind readnone
+define internal fastcc zeroext i16 @safe_rshift_func_uint16_t_u_s(i16 zeroext %left, i32 %right) #4 {
+ tail call void @llvm.dbg.value(metadata !{i16 %left}, i64 0, metadata !754), !dbg !755
+ tail call void @llvm.dbg.value(metadata !{i32 %right}, i64 0, metadata !756), !dbg !755
+ %1 = icmp ugt i32 %right, 31, !dbg !757
+ br i1 %1, label %5, label %2, !dbg !757
+
+; <label>:2 ; preds = %0
+ %3 = zext i16 %left to i32, !dbg !757
+ %4 = lshr i32 %3, %right, !dbg !757
+ %extract.t = trunc i32 %4 to i16, !dbg !757
+ br label %5, !dbg !757
+
+; <label>:5 ; preds = %2, %0
+ %.off0 = phi i16 [ %extract.t, %2 ], [ %left, %0 ]
+ ret i16 %.off0, !dbg !757
+}
+
+; Function Attrs: nounwind readnone
+define internal fastcc i32 @safe_mod_func_uint32_t_u_u(i32 %ui1, i32 %ui2) #4 {
+ tail call void @llvm.dbg.value(metadata !{i32 %ui1}, i64 0, metadata !758), !dbg !759
+ tail call void @llvm.dbg.value(metadata !{i32 %ui2}, i64 0, metadata !760), !dbg !759
+ %1 = icmp eq i32 %ui2, 0, !dbg !761
+ br i1 %1, label %4, label %2, !dbg !761
+
+; <label>:2 ; preds = %0
+ %3 = urem i32 %ui1, %ui2, !dbg !761
+ br label %4, !dbg !761
+
+; <label>:4 ; preds = %2, %0
+ %5 = phi i32 [ %3, %2 ], [ %ui1, %0 ], !dbg !761
+ ret i32 %5, !dbg !761
+}
+
+; Function Attrs: nounwind readnone
+define internal fastcc i32 @safe_sub_func_int32_t_s_s(i32 %si1, i32 %si2) #4 {
+ tail call void @llvm.dbg.value(metadata !{i32 %si1}, i64 0, metadata !762), !dbg !763
+ tail call void @llvm.dbg.value(metadata !{i32 %si2}, i64 0, metadata !764), !dbg !763
+ %1 = xor i32 %si2, %si1, !dbg !765
+ %2 = and i32 %1, -2147483648, !dbg !765
+ %3 = xor i32 %2, %si1, !dbg !765
+ %4 = sub nsw i32 %3, %si2, !dbg !765
+ %5 = xor i32 %4, %si2, !dbg !765
+ %6 = and i32 %5, %1, !dbg !765
+ %7 = icmp slt i32 %6, 0, !dbg !765
+ %8 = select i1 %7, i32 0, i32 %si2, !dbg !765
+ %si1. = sub nsw i32 %si1, %8, !dbg !765
+ ret i32 %si1., !dbg !765
+}
+
+; Function Attrs: nounwind
+define internal fastcc void @func_26(%struct.S3* noalias nocapture sret %agg.result, i32 %p_27, i32* nocapture %p_28) #0 {
+ tail call void @llvm.dbg.value(metadata !{i32 %p_27}, i64 0, metadata !766), !dbg !767
+ tail call void @llvm.dbg.value(metadata !{i32* %p_28}, i64 0, metadata !768), !dbg !767
+ tail call void @llvm.dbg.value(metadata !769, i64 0, metadata !770), !dbg !772
+ tail call void @llvm.dbg.value(metadata !773, i64 0, metadata !774), !dbg !775
+ tail call void @llvm.dbg.value(metadata !776, i64 0, metadata !777), !dbg !778
+ tail call void @llvm.dbg.declare(metadata !779, metadata !780), !dbg !781
+ tail call void @llvm.dbg.declare(metadata !782, metadata !783), !dbg !784
+ tail call void @llvm.dbg.declare(metadata !785, metadata !786), !dbg !787
+ tail call void @llvm.dbg.declare(metadata !788, metadata !789), !dbg !792
+ tail call void @llvm.dbg.value(metadata !793, i64 0, metadata !794), !dbg !795
+ tail call void @llvm.dbg.declare(metadata !796, metadata !797), !dbg !798
+ tail call void @llvm.dbg.value(metadata !799, i64 0, metadata !800), !dbg !801
+ tail call void @llvm.dbg.value(metadata !802, i64 0, metadata !803), !dbg !804
+ tail call void @llvm.dbg.value(metadata !520, i64 0, metadata !805), !dbg !806
+ tail call void @llvm.dbg.value(metadata !520, i64 0, metadata !807), !dbg !808
+ tail call void @llvm.dbg.value(metadata !698, i64 0, metadata !809), !dbg !810
+ tail call void @llvm.dbg.value(metadata !799, i64 0, metadata !811), !dbg !812
+ tail call void @llvm.dbg.value(metadata !799, i64 0, metadata !813), !dbg !814
+ tail call void @llvm.dbg.value(metadata !599, i64 0, metadata !815), !dbg !816
+ tail call void @llvm.dbg.value(metadata !799, i64 0, metadata !817), !dbg !818
+ tail call void @llvm.dbg.value(metadata !520, i64 0, metadata !819), !dbg !820
+ tail call void @llvm.dbg.value(metadata !799, i64 0, metadata !821), !dbg !822
+ tail call void @llvm.dbg.value(metadata !799, i64 0, metadata !823), !dbg !824
+ tail call void @llvm.dbg.value(metadata !2, i64 0, metadata !825), !dbg !826
+ store i16 0, i16* @g_395, align 2, !dbg !828
+ store i32 247, i32* %p_28, align 4, !dbg !830
+ %1 = tail call fastcc signext i16 @safe_rshift_func_int16_t_s_s(i16 signext 247, i32 134), !dbg !830
+ %2 = sext i16 %1 to i32, !dbg !830
+ tail call void @llvm.dbg.value(metadata !{i32 %2}, i64 0, metadata !777), !dbg !830
+ %3 = tail call fastcc i32 @safe_sub_func_int32_t_s_s(i32 %2, i32 134), !dbg !830
+ %4 = icmp eq i32 %3, 247, !dbg !830
+ br i1 %4, label %5, label %11, !dbg !830
+
+; <label>:5 ; preds = %0
+ tail call void @llvm.dbg.value(metadata !832, i64 0, metadata !833), !dbg !835
+ tail call void @llvm.dbg.declare(metadata !836, metadata !837), !dbg !839
+ %6 = tail call fastcc i32* @func_34(%union.U4* byval @func_26.l_486, i32* @g_465), !dbg !840
+ %7 = tail call fastcc i32* @func_45(i32* %6, %struct.S3* byval @func_26.l_489), !dbg !840
+ %8 = tail call fastcc i32* @func_34(%union.U4* byval getelementptr inbounds ([10 x [1 x %union.U4]]* @g_345, i32 0, i32 7, i32 0), i32* getelementptr inbounds ({ i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }* @g_108, i32 0, i32 0)), !dbg !840
+ store i32* %8, i32** @g_304, align 4, !dbg !840
+ store i8 1, i8* @g_96, align 1, !dbg !841
+ %9 = bitcast %struct.S3* %agg.result to i64*, !dbg !843
+ %10 = load i64* bitcast (%struct.S3* getelementptr inbounds ([9 x %struct.S3]* @g_49, i32 0, i32 1) to i64*), align 8, !dbg !843
+ store i64 %10, i64* %9, align 4, !dbg !843
+ br label %22, !dbg !843
+
+; <label>:11 ; preds = %0
+ tail call void @llvm.dbg.value(metadata !845, i64 0, metadata !846), !dbg !848
+ tail call void @llvm.dbg.value(metadata !849, i64 0, metadata !850), !dbg !851
+ tail call void @llvm.dbg.value(metadata !852, i64 0, metadata !853), !dbg !854
+ tail call void @llvm.dbg.value(metadata !2, i64 0, metadata !855), !dbg !856
+ tail call void @llvm.dbg.value(metadata !857, i64 0, metadata !858), !dbg !859
+ tail call void @llvm.dbg.value(metadata !860, i64 0, metadata !861), !dbg !862
+ tail call void @llvm.dbg.value(metadata !863, i64 0, metadata !864), !dbg !865
+ tail call void @llvm.dbg.value(metadata !866, i64 0, metadata !867), !dbg !868
+ tail call void @llvm.dbg.declare(metadata !869, metadata !870), !dbg !871
+ tail call void @llvm.dbg.declare(metadata !872, metadata !873), !dbg !874
+ store i16 0, i16* @g_103, align 2, !dbg !875
+ tail call void @llvm.dbg.value(metadata !877, i64 0, metadata !878), !dbg !880
+ tail call void @llvm.dbg.value(metadata !799, i64 0, metadata !881), !dbg !882
+ tail call void @llvm.dbg.value(metadata !599, i64 0, metadata !883), !dbg !884
+ tail call void @llvm.dbg.value(metadata !885, i64 0, metadata !886), !dbg !887
+ tail call void @llvm.dbg.declare(metadata !888, metadata !889), !dbg !892
+ tail call void @llvm.dbg.value(metadata !893, i64 0, metadata !894), !dbg !896
+ tail call void @llvm.dbg.value(metadata !897, i64 0, metadata !794), !dbg !898
+ tail call void @llvm.dbg.value(metadata !308, i64 0, metadata !777), !dbg !899
+ tail call void @llvm.dbg.value(metadata !901, i64 0, metadata !902), !dbg !904
+ tail call void @llvm.dbg.declare(metadata !905, metadata !906), !dbg !909
+ tail call void @llvm.dbg.declare(metadata !910, metadata !911), !dbg !912
+ %12 = tail call fastcc signext i8 @safe_rshift_func_int8_t_s_u(i8 signext 1, i32 %p_27), !dbg !913
+ %13 = sext i8 %12 to i32, !dbg !913
+ %14 = load i32* %p_28, align 4, !dbg !913
+ %15 = and i32 %14, %13, !dbg !913
+ store i32 %15, i32* %p_28, align 4, !dbg !913
+ %16 = load i16* @g_395, align 2, !dbg !914
+ %17 = zext i16 %16 to i32, !dbg !914
+ %18 = getelementptr inbounds [9 x %struct.S3]* @g_49, i32 0, i32 %17, !dbg !914
+ %19 = bitcast %struct.S3* %18 to i64*, !dbg !914
+ %20 = bitcast %struct.S3* %agg.result to i64*, !dbg !914
+ %21 = load i64* %19, align 8, !dbg !914
+ store i64 %21, i64* %20, align 4, !dbg !914
+ br label %22, !dbg !914
+
+; <label>:22 ; preds = %11, %5
+ ret void, !dbg !915
+}
+
+; Function Attrs: nounwind readnone
+define internal fastcc signext i8 @safe_mul_func_int8_t_s_s(i8 signext %si1, i8 signext %si2) #4 {
+ tail call void @llvm.dbg.value(metadata !{i8 %si1}, i64 0, metadata !916), !dbg !917
+ tail call void @llvm.dbg.value(metadata !{i8 %si2}, i64 0, metadata !918), !dbg !917
+ %1 = mul i8 %si2, %si1, !dbg !919
+ ret i8 %1, !dbg !919
+}
+
+; Function Attrs: nounwind readnone
+define internal fastcc zeroext i16 @safe_div_func_uint16_t_u_u(i16 zeroext %ui1, i16 zeroext %ui2) #4 {
+ tail call void @llvm.dbg.value(metadata !{i16 %ui1}, i64 0, metadata !920), !dbg !921
+ tail call void @llvm.dbg.value(metadata !{i16 %ui2}, i64 0, metadata !922), !dbg !921
+ %1 = icmp eq i16 %ui2, 0, !dbg !923
+ br i1 %1, label %3, label %2, !dbg !923
+
+; <label>:2 ; preds = %0
+ %div = udiv i16 %ui1, %ui2, !dbg !923
+ br label %3, !dbg !923
+
+; <label>:3 ; preds = %2, %0
+ %.in = phi i16 [ %div, %2 ], [ %ui1, %0 ]
+ ret i16 %.in, !dbg !923
+}
+
+; Function Attrs: nounwind
+define internal fastcc i32* @func_34(%union.U4* byval nocapture %p_36, i32* %p_37) #0 {
+ tail call void @llvm.dbg.value(metadata !802, i64 0, metadata !924), !dbg !925
+ tail call void @llvm.dbg.declare(metadata !796, metadata !926), !dbg !928
+ tail call void @llvm.dbg.value(metadata !802, i64 0, metadata !929), !dbg !930
+ tail call void @llvm.dbg.value(metadata !2, i64 0, metadata !931), !dbg !932
+ tail call void @llvm.dbg.value(metadata !933, i64 0, metadata !934), !dbg !935
+ tail call void @llvm.dbg.value(metadata !936, i64 0, metadata !937), !dbg !938
+ tail call void @llvm.dbg.value(metadata !556, i64 0, metadata !939), !dbg !940
+ tail call void @llvm.dbg.value(metadata !802, i64 0, metadata !941), !dbg !942
+ tail call void @llvm.dbg.value(metadata !802, i64 0, metadata !943), !dbg !944
+ tail call void @llvm.dbg.value(metadata !802, i64 0, metadata !945), !dbg !946
+ tail call void @llvm.dbg.value(metadata !599, i64 0, metadata !947), !dbg !948
+ tail call void @llvm.dbg.declare(metadata !949, metadata !950), !dbg !953
+ tail call void @llvm.dbg.value(metadata !954, i64 0, metadata !955), !dbg !956
+ tail call void @llvm.dbg.value(metadata !2, i64 0, metadata !957), !dbg !958
+ %1 = getelementptr inbounds %union.U4* %p_36, i32 0, i32 0, !dbg !960
+ %2 = load i32* %1, align 4, !dbg !960
+ %3 = icmp eq i32 %2, 0, !dbg !960
+ br i1 %3, label %12, label %4, !dbg !960
+
+; <label>:4 ; preds = %0
+ %5 = load i32* getelementptr inbounds ([9 x %struct.S3]* @g_49, i32 0, i32 3, i32 1), align 4, !dbg !960
+ %6 = add i32 %5, -1, !dbg !960
+ store i32 %6, i32* getelementptr inbounds ([9 x %struct.S3]* @g_49, i32 0, i32 3, i32 1), align 4, !dbg !960
+ %7 = tail call fastcc signext i16 @safe_mul_func_int16_t_s_s(i16 signext -13853, i16 signext 1), !dbg !960
+ %8 = trunc i16 %7 to i8, !dbg !960
+ %9 = tail call fastcc zeroext i8 @safe_lshift_func_uint8_t_u_u(i8 zeroext %8, i32 0), !dbg !960
+ %10 = load i8* @g_258, align 1, !dbg !960
+ %11 = xor i8 %10, %9, !dbg !960
+ store i8 %11, i8* @g_258, align 1, !dbg !960
+ br label %12
+
+; <label>:12 ; preds = %4, %0
+ %13 = load i16* getelementptr inbounds ([1 x i16]* @g_455, i32 0, i32 0), align 2, !dbg !961
+ %14 = add i16 %13, 1, !dbg !961
+ store i16 %14, i16* getelementptr inbounds ([1 x i16]* @g_455, i32 0, i32 0), align 2, !dbg !961
+ ret i32* %p_37, !dbg !962
+}
+
+; Function Attrs: nounwind
+define internal fastcc i32* @func_45(i32* %p_46, %struct.S3* byval nocapture %p_47) #0 {
+ tail call void @llvm.dbg.value(metadata !{i32* %p_46}, i64 0, metadata !963), !dbg !964
+ tail call void @llvm.dbg.declare(metadata !{%struct.S3* %p_47}, metadata !965), !dbg !964
+ tail call void @llvm.dbg.value(metadata !799, i64 0, metadata !966), !dbg !967
+ tail call void @llvm.dbg.value(metadata !799, i64 0, metadata !968), !dbg !969
+ tail call void @llvm.dbg.value(metadata !799, i64 0, metadata !970), !dbg !971
+ tail call void @llvm.dbg.value(metadata !799, i64 0, metadata !972), !dbg !973
+ tail call void @llvm.dbg.value(metadata !799, i64 0, metadata !974), !dbg !975
+ tail call void @llvm.dbg.value(metadata !799, i64 0, metadata !976), !dbg !977
+ tail call void @llvm.dbg.value(metadata !799, i64 0, metadata !978), !dbg !979
+ tail call void @llvm.dbg.value(metadata !799, i64 0, metadata !980), !dbg !981
+ tail call void @llvm.dbg.value(metadata !982, i64 0, metadata !983), !dbg !984
+ tail call void @llvm.dbg.value(metadata !802, i64 0, metadata !985), !dbg !986
+ tail call void @llvm.dbg.value(metadata !799, i64 0, metadata !987), !dbg !988
+ tail call void @llvm.dbg.value(metadata !802, i64 0, metadata !989), !dbg !990
+ tail call void @llvm.dbg.value(metadata !799, i64 0, metadata !991), !dbg !992
+ tail call void @llvm.dbg.value(metadata !993, i64 0, metadata !994), !dbg !995
+ tail call void @llvm.dbg.declare(metadata !996, metadata !997), !dbg !998
+ tail call void @llvm.dbg.value(metadata !2, i64 0, metadata !999), !dbg !1000
+ tail call void @llvm.dbg.value(metadata !1001, i64 0, metadata !1002), !dbg !1003
+ tail call void @llvm.dbg.value(metadata !1004, i64 0, metadata !1005), !dbg !1006
+ tail call void @llvm.dbg.declare(metadata !1007, metadata !1008), !dbg !1011
+ tail call void @llvm.dbg.declare(metadata !1012, metadata !1013), !dbg !1014
+ tail call void @llvm.dbg.value(metadata !1015, i64 0, metadata !994), !dbg !1016
+ store i16 13, i16* getelementptr inbounds (%struct.S1* @g_99, i32 0, i32 3), align 2, !dbg !1017
+ ret i32* %p_46, !dbg !1019
+}
+
+; Function Attrs: nounwind readnone
+define internal fastcc zeroext i8 @safe_add_func_uint8_t_u_u(i8 zeroext %ui1) #4 {
+ tail call void @llvm.dbg.value(metadata !1020, i64 0, metadata !1021), !dbg !1022
+ %1 = add i8 %ui1, -22, !dbg !1023
+ ret i8 %1, !dbg !1023
+}
+
+; Function Attrs: nounwind readnone
+define internal fastcc signext i16 @safe_add_func_int16_t_s_s(i16 signext %si1, i16 signext %si2) #4 {
+ tail call void @llvm.dbg.value(metadata !{i16 %si1}, i64 0, metadata !1024), !dbg !1025
+ tail call void @llvm.dbg.value(metadata !{i16 %si2}, i64 0, metadata !1026), !dbg !1025
+ %1 = add i16 %si2, %si1, !dbg !1027
+ ret i16 %1, !dbg !1027
+}
+
+; Function Attrs: nounwind readnone
+define internal fastcc zeroext i16 @safe_lshift_func_uint16_t_u_s(i16 zeroext %left) #4 {
+ tail call void @llvm.dbg.value(metadata !1028, i64 0, metadata !1029), !dbg !1030
+ %1 = icmp ugt i16 %left, 4095, !dbg !1031
+ %2 = shl i16 %left, 4, !dbg !1031
+ %.off0 = select i1 %1, i16 %left, i16 %2, !dbg !1031
+ ret i16 %.off0, !dbg !1031
+}
+
+; Function Attrs: nounwind readnone
+define internal fastcc zeroext i16 @safe_rshift_func_uint16_t_u_u(i16 zeroext %left, i32 %right) #4 {
+ tail call void @llvm.dbg.value(metadata !{i16 %left}, i64 0, metadata !1032), !dbg !1033
+ tail call void @llvm.dbg.value(metadata !{i32 %right}, i64 0, metadata !1034), !dbg !1033
+ %1 = icmp ugt i32 %right, 31, !dbg !1035
+ br i1 %1, label %5, label %2, !dbg !1035
+
+; <label>:2 ; preds = %0
+ %3 = zext i16 %left to i32, !dbg !1035
+ %4 = lshr i32 %3, %right, !dbg !1035
+ %extract.t = trunc i32 %4 to i16, !dbg !1035
+ br label %5, !dbg !1035
+
+; <label>:5 ; preds = %2, %0
+ %.off0 = phi i16 [ %extract.t, %2 ], [ %left, %0 ]
+ ret i16 %.off0, !dbg !1035
+}
+
+; Function Attrs: nounwind
+define internal fastcc void @safe_lshift_func_uint8_t_u_s() #0 {
+ unreachable
+}
+
+; Function Attrs: nounwind readnone
+define internal fastcc i32 @safe_div_func_int32_t_s_s(i32 %si2) #4 {
+ tail call void @llvm.dbg.value(metadata !2, i64 0, metadata !1036), !dbg !1037
+ ret i32 0, !dbg !1038
+}
+
+; Function Attrs: nounwind readnone
+define internal fastcc signext i8 @safe_rshift_func_int8_t_s_u(i8 signext %left, i32 %right) #4 {
+ tail call void @llvm.dbg.value(metadata !{i8 %left}, i64 0, metadata !1039), !dbg !1040
+ tail call void @llvm.dbg.value(metadata !{i32 %right}, i64 0, metadata !1041), !dbg !1040
+ %1 = icmp slt i8 %left, 0, !dbg !1042
+ %2 = icmp ugt i32 %right, 31, !dbg !1042
+ %or.cond = or i1 %1, %2, !dbg !1042
+ br i1 %or.cond, label %6, label %3, !dbg !1042
+
+; <label>:3 ; preds = %0
+ %4 = sext i8 %left to i32, !dbg !1042
+ %5 = ashr i32 %4, %right, !dbg !1042
+ %extract.t1 = trunc i32 %5 to i8, !dbg !1042
+ br label %6, !dbg !1042
+
+; <label>:6 ; preds = %3, %0
+ %.off0 = phi i8 [ %extract.t1, %3 ], [ %left, %0 ]
+ ret i8 %.off0, !dbg !1042
+}
+
+; Function Attrs: nounwind readnone
+define internal fastcc zeroext i8 @safe_lshift_func_uint8_t_u_u(i8 zeroext %left, i32 %right) #4 {
+ tail call void @llvm.dbg.value(metadata !{i8 %left}, i64 0, metadata !1043), !dbg !1044
+ tail call void @llvm.dbg.value(metadata !{i32 %right}, i64 0, metadata !1045), !dbg !1044
+ %1 = icmp ugt i32 %right, 31, !dbg !1046
+ br i1 %1, label %8, label %2, !dbg !1046
+
+; <label>:2 ; preds = %0
+ %3 = zext i8 %left to i32, !dbg !1046
+ %4 = lshr i32 255, %right, !dbg !1046
+ %5 = icmp sgt i32 %3, %4, !dbg !1046
+ br i1 %5, label %8, label %6, !dbg !1046
+
+; <label>:6 ; preds = %2
+ %7 = shl i32 %3, %right, !dbg !1046
+ %extract.t1 = trunc i32 %7 to i8, !dbg !1046
+ br label %8, !dbg !1046
+
+; <label>:8 ; preds = %6, %2, %0
+ %.off0 = phi i8 [ %extract.t1, %6 ], [ %left, %2 ], [ %left, %0 ]
+ ret i8 %.off0, !dbg !1046
+}
+
+; Function Attrs: nounwind readnone
+define internal fastcc signext i16 @safe_mul_func_int16_t_s_s(i16 signext %si1, i16 signext %si2) #4 {
+ tail call void @llvm.dbg.value(metadata !{i16 %si1}, i64 0, metadata !1047), !dbg !1048
+ tail call void @llvm.dbg.value(metadata !{i16 %si2}, i64 0, metadata !1049), !dbg !1048
+ %1 = mul i16 %si2, %si1, !dbg !1050
+ ret i16 %1, !dbg !1050
+}
+
+; Function Attrs: nounwind readnone
+define internal fastcc zeroext i16 @safe_mod_func_uint16_t_u_u(i16 zeroext %ui1, i16 zeroext %ui2) #4 {
+ tail call void @llvm.dbg.value(metadata !{i16 %ui1}, i64 0, metadata !1051), !dbg !1052
+ tail call void @llvm.dbg.value(metadata !{i16 %ui2}, i64 0, metadata !1053), !dbg !1052
+ %1 = icmp eq i16 %ui2, 0, !dbg !1054
+ br i1 %1, label %4, label %2, !dbg !1054
+
+; <label>:2 ; preds = %0
+ %3 = urem i16 %ui1, %ui2, !dbg !1054
+ br label %4, !dbg !1054
+
+; <label>:4 ; preds = %2, %0
+ %.in = phi i16 [ %3, %2 ], [ %ui1, %0 ]
+ ret i16 %.in, !dbg !1054
+}
+
+; Function Attrs: nounwind readnone
+define internal fastcc zeroext i16 @safe_add_func_uint16_t_u_u(i16 zeroext %ui1, i16 zeroext %ui2) #4 {
+ tail call void @llvm.dbg.value(metadata !{i16 %ui1}, i64 0, metadata !1055), !dbg !1056
+ tail call void @llvm.dbg.value(metadata !{i16 %ui2}, i64 0, metadata !1057), !dbg !1056
+ %1 = add i16 %ui2, %ui1, !dbg !1058
+ ret i16 %1, !dbg !1058
+}
+
+; Function Attrs: nounwind readnone
+define internal fastcc signext i16 @safe_rshift_func_int16_t_s_s(i16 signext %left, i32 %right) #4 {
+ tail call void @llvm.dbg.value(metadata !{i16 %left}, i64 0, metadata !1060), !dbg !1061
+ tail call void @llvm.dbg.value(metadata !{i32 %right}, i64 0, metadata !1062), !dbg !1061
+ %1 = icmp slt i16 %left, 0, !dbg !1063
+ %2 = icmp ugt i32 %right, 31, !dbg !1063
+ %or.cond = or i1 %1, %2, !dbg !1063
+ br i1 %or.cond, label %6, label %3, !dbg !1063
+
+; <label>:3 ; preds = %0
+ %4 = sext i16 %left to i32, !dbg !1063
+ %5 = ashr i32 %4, %right, !dbg !1063
+ %extract.t2 = trunc i32 %5 to i16, !dbg !1063
+ br label %6, !dbg !1063
+
+; <label>:6 ; preds = %3, %0
+ %.off0 = phi i16 [ %extract.t2, %3 ], [ %left, %0 ]
+ ret i16 %.off0, !dbg !1063
+}
+
+; Function Attrs: nounwind
+define internal fastcc void @func_15(i32 %p_17) #0 {
+ tail call void @llvm.dbg.value(metadata !802, i64 0, metadata !1065), !dbg !1066
+ tail call void @llvm.dbg.value(metadata !1067, i64 0, metadata !1068), !dbg !1066
+ tail call void @llvm.dbg.value(metadata !1069, i64 0, metadata !1070), !dbg !1072
+ tail call void @llvm.dbg.value(metadata !593, i64 0, metadata !1073), !dbg !1074
+ tail call void @llvm.dbg.value(metadata !2, i64 0, metadata !1075), !dbg !1076
+ tail call void @llvm.dbg.declare(metadata !1077, metadata !1078), !dbg !1080
+ tail call void @llvm.dbg.value(metadata !520, i64 0, metadata !1081), !dbg !1082
+ tail call void @llvm.dbg.value(metadata !1083, i64 0, metadata !1084), !dbg !1085
+ tail call void @llvm.dbg.value(metadata !1086, i64 0, metadata !1087), !dbg !1088
+ tail call void @llvm.dbg.value(metadata !1089, i64 0, metadata !1090), !dbg !1091
+ tail call void @llvm.dbg.declare(metadata !1092, metadata !1093), !dbg !1096
+ tail call void @llvm.dbg.value(metadata !1067, i64 0, metadata !1097), !dbg !1098
+ tail call void @llvm.dbg.value(metadata !1099, i64 0, metadata !1100), !dbg !1101
+ tail call void @llvm.dbg.declare(metadata !1102, metadata !1103), !dbg !1107
+ tail call void @llvm.dbg.value(metadata !1108, i64 0, metadata !1109), !dbg !1112
+ tail call void @llvm.dbg.declare(metadata !1113, metadata !1114), !dbg !1115
+ tail call void @llvm.dbg.value(metadata !556, i64 0, metadata !1116), !dbg !1117
+ tail call void @llvm.dbg.value(metadata !1118, i64 0, metadata !1119), !dbg !1121
+ tail call void @llvm.dbg.declare(metadata !1122, metadata !1123), !dbg !1128
+ tail call void @llvm.dbg.value(metadata !2, i64 0, metadata !1129), !dbg !1130
+ store i32 0, i32* @g_52, align 4, !dbg !1132
+ store i16 -5, i16* @g_103, align 2, !dbg !1134
+ tail call void @llvm.dbg.value(metadata !1135, i64 0, metadata !1068), !dbg !1134
+ ret void
+}
+
+; Function Attrs: nounwind
+define internal fastcc void @func_19(%struct.S3* byval nocapture %p_21) #0 {
+ tail call void @llvm.dbg.value(metadata !802, i64 0, metadata !1136), !dbg !1137
+ tail call void @llvm.dbg.value(metadata !802, i64 0, metadata !1138), !dbg !1137
+ tail call void @llvm.dbg.value(metadata !520, i64 0, metadata !1139), !dbg !1137
+ tail call void @llvm.dbg.value(metadata !1140, i64 0, metadata !1141), !dbg !1143
+ tail call void @llvm.dbg.value(metadata !513, i64 0, metadata !1144), !dbg !1145
+ tail call void @llvm.dbg.value(metadata !799, i64 0, metadata !1146), !dbg !1147
+ tail call void @llvm.dbg.declare(metadata !1148, metadata !1149), !dbg !1151
+ tail call void @llvm.dbg.value(metadata !556, i64 0, metadata !1152), !dbg !1153
+ tail call void @llvm.dbg.value(metadata !1154, i64 0, metadata !1155), !dbg !1156
+ tail call void @llvm.dbg.value(metadata !1157, i64 0, metadata !1158), !dbg !1159
+ tail call void @llvm.dbg.value(metadata !1160, i64 0, metadata !1161), !dbg !1162
+ tail call void @llvm.dbg.value(metadata !1163, i64 0, metadata !1164), !dbg !1165
+ tail call void @llvm.dbg.value(metadata !1140, i64 0, metadata !1141), !dbg !1166
+ tail call void @llvm.dbg.value(metadata !513, i64 0, metadata !1144), !dbg !1167
+ store i32 1, i32* @g_532, align 4, !dbg !1168
+ %1 = load i32* @g_52, align 4, !dbg !1168
+ %2 = xor i32 %1, 1, !dbg !1168
+ store i32 %2, i32* @g_52, align 4, !dbg !1168
+ %3 = load i32* bitcast (i8* getelementptr inbounds ({ i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }* @g_108, i32 0, i32 5) to i32*), align 4
+ %4 = shl i32 %3, 8
+ %5 = icmp slt i32 %4, 256
+ %6 = zext i1 %5 to i32
+ %g_532.promoted = load i32* @g_532, align 4
+ %7 = and i32 %6, %g_532.promoted
+ store i32 %7, i32* @g_532, align 4
+ ret void
+}
+
+; Function Attrs: nounwind
+define internal fastcc zeroext i8 @func_31() #0 {
+.preheader:
+ %l_33 = alloca [2 x i32], align 4
+ %0 = alloca i64, align 8, !dbg !1169
+ call void @llvm.dbg.value(metadata !802, i64 0, metadata !1173), !dbg !1174
+ call void @llvm.dbg.declare(metadata !{[2 x i32]* %l_33}, metadata !1175), !dbg !1177
+ call void @llvm.dbg.declare(metadata !1178, metadata !1179), !dbg !1180
+ call void @llvm.dbg.declare(metadata !1181, metadata !1182), !dbg !1184
+ call void @llvm.dbg.value(metadata !556, i64 0, metadata !1185), !dbg !1186
+ call void @llvm.dbg.value(metadata !2, i64 0, metadata !1187), !dbg !1188
+ %1 = getelementptr inbounds [2 x i32]* %l_33, i32 0, i32 0, !dbg !1190
+ store i32 -10, i32* %1, align 4, !dbg !1190
+ call void @llvm.dbg.value(metadata !308, i64 0, metadata !1187), !dbg !1188
+ %2 = getelementptr inbounds [2 x i32]* %l_33, i32 0, i32 1, !dbg !1190
+ store i32 -10, i32* %2, align 4, !dbg !1190
+ call void @llvm.dbg.value(metadata !308, i64 0, metadata !1187), !dbg !1188
+ %tmpcast = bitcast i64* %0 to %struct.S3*, !dbg !1169
+ store i32 1, i32* @g_5, align 4, !dbg !1191
+ br label %3, !dbg !1191
+
+; <label>:3 ; preds = %3, %.preheader
+ %storemerge2 = phi i32 [ 1, %.preheader ], [ %10, %3 ]
+ call void @llvm.dbg.value(metadata !1178, i64 0, metadata !1192), !dbg !1193
+ call void @llvm.dbg.value(metadata !593, i64 0, metadata !1194), !dbg !1195
+ call void @llvm.dbg.value(metadata !1196, i64 0, metadata !1197), !dbg !1198
+ call void @llvm.dbg.value(metadata !1199, i64 0, metadata !1200), !dbg !1202
+ %4 = getelementptr inbounds [2 x i32]* %l_33, i32 0, i32 %storemerge2, !dbg !1169
+ %5 = load i32* %4, align 4, !dbg !1169
+ %6 = load i64* bitcast (%struct.S3* @g_25 to i64*), align 8, !dbg !1169
+ store i64 %6, i64* bitcast (%struct.S3* getelementptr inbounds ([9 x %struct.S3]* @g_49, i32 0, i32 3) to i64*), align 8, !dbg !1169
+ store i64 %6, i64* %0, align 8, !dbg !1169
+ %7 = call fastcc i32* @func_45(i32* null, %struct.S3* byval %tmpcast), !dbg !1169
+ call fastcc void @func_38(%struct.S3* byval @func_31.l_43, i32 %5, i32* %7, %struct.S1* byval @func_31.l_167), !dbg !1169
+ %8 = call fastcc i32* @func_34(%union.U4* byval getelementptr inbounds ([7 x %union.U4]* @func_31.l_406, i32 0, i32 3), i32* null), !dbg !1169
+ store i32* %8, i32** @g_304, align 4, !dbg !1169
+ store i8 2, i8* getelementptr inbounds (%struct.S1* @g_99, i32 0, i32 2), align 4, !dbg !1203
+ %9 = load i32* @g_5, align 4, !dbg !1191
+ %10 = add nsw i32 %9, -1, !dbg !1191
+ store i32 %10, i32* @g_5, align 4, !dbg !1191
+ %11 = icmp sgt i32 %9, 0, !dbg !1191
+ br i1 %11, label %3, label %12, !dbg !1191
+
+; <label>:12 ; preds = %3
+ %13 = load i8* @g_467, align 1, !dbg !1205
+ %14 = add i8 %13, 1, !dbg !1205
+ store i8 %14, i8* @g_467, align 1, !dbg !1205
+ ret i8 %14, !dbg !1206
+}
+
+; Function Attrs: nounwind readnone
+define internal fastcc zeroext i16 @safe_mul_func_uint16_t_u_u(i16 zeroext %ui1, i16 zeroext %ui2) #4 {
+ tail call void @llvm.dbg.value(metadata !{i16 %ui1}, i64 0, metadata !1207), !dbg !1208
+ tail call void @llvm.dbg.value(metadata !{i16 %ui2}, i64 0, metadata !1209), !dbg !1208
+ %1 = mul i16 %ui2, %ui1, !dbg !1210
+ ret i16 %1, !dbg !1210
+}
+
+; Function Attrs: nounwind
+define internal fastcc void @safe_div_func_int16_t_s_s() #0 {
+ unreachable
+}
+
+; Function Attrs: nounwind
+define internal fastcc void @safe_lshift_func_int16_t_s_s() #0 {
+ unreachable
+}
+
+; Function Attrs: nounwind
+define internal fastcc void @safe_add_func_uint32_t_u_u() #0 {
+ unreachable
+}
+
+; Function Attrs: nounwind
+define internal fastcc void @safe_unary_minus_func_uint32_t_u() #0 {
+ unreachable
+}
+
+; Function Attrs: nounwind
+define internal fastcc void @safe_div_func_uint32_t_u_u() #0 {
+ unreachable
+}
+
+; Function Attrs: nounwind readnone
+define internal fastcc zeroext i8 @safe_rshift_func_uint8_t_u_s(i8 zeroext %left, i32 %right) #4 {
+ tail call void @llvm.dbg.value(metadata !{i8 %left}, i64 0, metadata !1211), !dbg !1212
+ tail call void @llvm.dbg.value(metadata !{i32 %right}, i64 0, metadata !1213), !dbg !1212
+ %1 = icmp ugt i32 %right, 31, !dbg !1214
+ br i1 %1, label %5, label %2, !dbg !1214
+
+; <label>:2 ; preds = %0
+ %3 = zext i8 %left to i32, !dbg !1214
+ %4 = lshr i32 %3, %right, !dbg !1214
+ %extract.t = trunc i32 %4 to i8, !dbg !1214
+ br label %5, !dbg !1214
+
+; <label>:5 ; preds = %2, %0
+ %.off0 = phi i8 [ %extract.t, %2 ], [ %left, %0 ]
+ ret i8 %.off0, !dbg !1214
+}
+
+; Function Attrs: nounwind
+define internal fastcc void @func_38(%struct.S3* byval nocapture %p_39, i32 %p_40, i32* %p_41, %struct.S1* byval nocapture %p_42) #0 {
+ call void @llvm.dbg.value(metadata !{i32* %p_41}, i64 0, metadata !1215), !dbg !1216
+ call void @llvm.dbg.value(metadata !1217, i64 0, metadata !1218), !dbg !1219
+ call void @llvm.dbg.value(metadata !802, i64 0, metadata !1220), !dbg !1221
+ call void @llvm.dbg.value(metadata !1222, i64 0, metadata !1223), !dbg !1224
+ call void @llvm.dbg.declare(metadata !1225, metadata !1226), !dbg !1227
+ call void @llvm.dbg.value(metadata !1228, i64 0, metadata !1229), !dbg !1231
+ call void @llvm.dbg.value(metadata !1232, i64 0, metadata !1233), !dbg !1234
+ call void @llvm.dbg.value(metadata !1235, i64 0, metadata !1236), !dbg !1237
+ call void @llvm.dbg.value(metadata !1238, i64 0, metadata !1239), !dbg !1240
+ call void @llvm.dbg.value(metadata !1241, i64 0, metadata !1242), !dbg !1243
+ call void @llvm.dbg.declare(metadata !1244, metadata !1245), !dbg !1246
+ call void @llvm.dbg.declare(metadata !1247, metadata !1248), !dbg !1249
+ call void @llvm.dbg.value(metadata !1250, i64 0, metadata !1251), !dbg !1252
+ call void @llvm.dbg.value(metadata !1253, i64 0, metadata !1254), !dbg !1255
+ call void @llvm.dbg.declare(metadata !679, metadata !1256), !dbg !1258
+ call void @llvm.dbg.value(metadata !1259, i64 0, metadata !1260), !dbg !1261
+ call void @llvm.dbg.value(metadata !2, i64 0, metadata !1262), !dbg !1263
+ %1 = getelementptr inbounds %struct.S3* %p_39, i32 0, i32 0, !dbg !1265
+ %2 = load i32* %1, align 4, !dbg !1265
+ %3 = trunc i32 %2 to i16, !dbg !1265
+ %4 = load i32* @g_52, align 4, !dbg !1265
+ %5 = load i32* bitcast (i8* getelementptr inbounds ({ i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }* @g_108, i32 0, i32 5) to i32*), align 4, !dbg !1265
+ %6 = shl i32 %5, 8, !dbg !1265
+ %7 = ashr exact i32 %6, 8, !dbg !1265
+ %8 = icmp sle i32 %4, %7, !dbg !1265
+ %9 = zext i1 %8 to i16, !dbg !1265
+ %10 = call fastcc zeroext i16 @safe_add_func_uint16_t_u_u(i16 zeroext %3, i16 zeroext %9), !dbg !1265
+ %11 = trunc i16 %10 to i8, !dbg !1265
+ %12 = call fastcc signext i8 @safe_rshift_func_int8_t_s_u(i8 signext %11, i32 5), !dbg !1265
+ %13 = icmp eq i8 %12, 0, !dbg !1265
+ br i1 %13, label %14, label %17, !dbg !1265
+
+; <label>:14 ; preds = %0
+ %15 = load i16* @g_103, align 2, !dbg !1265
+ %16 = icmp ne i16 %15, 0, !dbg !1265
+ %phitmp = zext i1 %16 to i32, !dbg !1265
+ br label %17, !dbg !1265
+
+; <label>:17 ; preds = %14, %0
+ %18 = phi i32 [ 1, %0 ], [ %phitmp, %14 ]
+ store i32 %18, i32* getelementptr inbounds ({ i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }* @g_108, i32 0, i32 0), align 4, !dbg !1265
+ %19 = getelementptr inbounds %struct.S1* %p_42, i32 0, i32 0, !dbg !1266
+ %20 = load i32* %19, align 4, !dbg !1266
+ %21 = trunc i32 %20 to i8, !dbg !1266
+ store i8 %21, i8* getelementptr inbounds (%struct.S1* @g_99, i32 0, i32 2), align 4, !dbg !1266
+ call void @llvm.dbg.value(metadata !1267, i64 0, metadata !1268), !dbg !1270
+ call void @llvm.dbg.value(metadata !1271, i64 0, metadata !1272), !dbg !1273
+ call void @llvm.dbg.value(metadata !901, i64 0, metadata !1274), !dbg !1275
+ call void @llvm.dbg.declare(metadata !1244, metadata !1276), !dbg !1277
+ call void @llvm.dbg.declare(metadata !1278, metadata !1279), !dbg !1282
+ br label %.backedge, !dbg !1283
+
+.backedge: ; preds = %.backedge, %17
+ store i32 0, i32* @g_52, align 4, !dbg !1284
+ %22 = load i32* getelementptr inbounds (%union.U4* @g_183, i32 0, i32 0), align 4, !dbg !1286
+ %23 = icmp eq i32 %22, 0, !dbg !1286
+ br i1 %23, label %24, label %.backedge, !dbg !1286
+
+; <label>:24 ; preds = %.backedge
+ ret void
+}
+
+; Function Attrs: nounwind
+define internal fastcc void @safe_div_func_uint8_t_u_u() #0 {
+ unreachable
+}
+
+; Function Attrs: nounwind readnone
+define internal fastcc signext i8 @safe_lshift_func_int8_t_s_u(i8 signext %left, i32 %right) #4 {
+ tail call void @llvm.dbg.value(metadata !{i8 %left}, i64 0, metadata !1287), !dbg !1288
+ tail call void @llvm.dbg.value(metadata !{i32 %right}, i64 0, metadata !1289), !dbg !1288
+ %1 = sext i8 %left to i32, !dbg !1290
+ %2 = icmp slt i8 %left, 0, !dbg !1290
+ %3 = icmp ugt i32 %right, 31, !dbg !1290
+ %or.cond = or i1 %2, %3, !dbg !1290
+ %4 = lshr i32 127, %right, !dbg !1290
+ %5 = icmp sgt i32 %1, %4, !dbg !1290
+ %or.cond3 = or i1 %or.cond, %5, !dbg !1290
+ br i1 %or.cond3, label %8, label %6, !dbg !1290
+
+; <label>:6 ; preds = %0
+ %7 = shl i32 %1, %right, !dbg !1290
+ %extract.t1 = trunc i32 %7 to i8, !dbg !1290
+ br label %8, !dbg !1290
+
+; <label>:8 ; preds = %6, %0
+ %.off0 = phi i8 [ %extract.t1, %6 ], [ %left, %0 ]
+ ret i8 %.off0, !dbg !1290
+}
+
+; Function Attrs: nounwind readnone
+declare void @llvm.dbg.value(metadata, i64, metadata) #1
+
+attributes #0 = { nounwind "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf"="true" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "unsafe-fp-math"="false" "use-soft-float"="false" }
+attributes #1 = { nounwind readnone }
+attributes #2 = { nounwind readonly "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf"="true" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "unsafe-fp-math"="false" "use-soft-float"="false" }
+attributes #3 = { nounwind }
+attributes #4 = { nounwind readnone "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf"="true" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "unsafe-fp-math"="false" "use-soft-float"="false" }
+
+!llvm.dbg.cu = !{!0}
+
+!0 = metadata !{i32 786449, metadata !1, i32 12, metadata !"clang version 3.3 (https://chromium.googlesource.com/native_client/pnacl-clang a963b803407c9d1cac644cc425004e0ccd28fa45) (https://chromium.googlesource.com/native_client/pnacl-llvm git@github.com:kripken/emscripten-fastcomp.git eea5cbe96fc5c5c2796c3ab3ea64f50fe350f75b)", i1 false, metadata !"", i32 0, metadata !2, metadata !2, metadata !3, metadata !180, metadata !2, metadata !""} ; [ DW_TAG_compile_unit ] [/home/alon/Dev/emscripten/tests/fuzz/newfail1.c] [DW_LANG_C99]
+!1 = metadata !{metadata !"newfail1.c", metadata !"/home/alon/Dev/emscripten/tests/fuzz"}
+!2 = metadata !{i32 0}
+!3 = metadata !{metadata !4, metadata !12, metadata !20, metadata !26, metadata !29, metadata !34, metadata !41, metadata !47, metadata !51, metadata !56, metadata !61, metadata !62, metadata !65, metadata !68, metadata !71, metadata !74, metadata !79, metadata !82, metadata !89, metadata !92, metadata !93, metadata !94, metadata !95, metadata !98, metadata !99, metadata !102, metadata !105, metadata !106, metadata !107, metadata !108, metadata !111, metadata !114, metadata !117, metadata !118, metadata !119, metadata !120, metadata !121, metadata !122, metadata !123, metadata !124, metadata !125, metadata !137, metadata !138, metadata !139, metadata !140, metadata !143, metadata !144, metadata !145, metadata !146, metadata !147, metadata !148, metadata !151, metadata !162, metadata !163, metadata !164, metadata !168, metadata !169, metadata !172, metadata !175, metadata !176, metadata !179}
+!4 = metadata !{i32 786478, metadata !1, metadata !5, metadata !"main", metadata !"main", metadata !"", i32 1057, metadata !6, i1 false, i1 true, i32 0, i32 0, null, i32 256, i1 false, i32 (i32, i8**)* @main, null, null, metadata !2, i32 1058} ; [ DW_TAG_subprogram ] [line 1057] [def] [scope 1058] [main]
+!5 = metadata !{i32 786473, metadata !1} ; [ DW_TAG_file_type ] [/home/alon/Dev/emscripten/tests/fuzz/newfail1.c]
+!6 = metadata !{i32 786453, i32 0, i32 0, metadata !"", i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !7, i32 0, i32 0} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]
+!7 = metadata !{metadata !8, metadata !8, metadata !9}
+!8 = metadata !{i32 786468, null, null, metadata !"int", i32 0, i64 32, i64 32, i64 0, i32 0, i32 5} ; [ DW_TAG_base_type ] [int] [line 0, size 32, align 32, offset 0, enc DW_ATE_signed]
+!9 = metadata !{i32 786447, null, null, metadata !"", i32 0, i64 32, i64 32, i64 0, i32 0, metadata !10} ; [ DW_TAG_pointer_type ] [line 0, size 32, align 32, offset 0] [from ]
+!10 = metadata !{i32 786447, null, null, metadata !"", i32 0, i64 32, i64 32, i64 0, i32 0, metadata !11} ; [ DW_TAG_pointer_type ] [line 0, size 32, align 32, offset 0] [from char]
+!11 = metadata !{i32 786468, null, null, metadata !"char", i32 0, i64 8, i64 8, i64 0, i32 0, i32 6} ; [ DW_TAG_base_type ] [char] [line 0, size 8, align 8, offset 0, enc DW_ATE_signed_char]
+!12 = metadata !{i32 786478, metadata !13, metadata !14, metadata !"platform_main_end", metadata !"platform_main_end", metadata !"", i32 50, metadata !15, i1 true, i1 true, i32 0, i32 0, null, i32 256, i1 false, void (i32)* @platform_main_end, null, null, metadata !2, i32 51} ; [ DW_TAG_subprogram ] [line 50] [local] [def] [scope 51] [platform_main_end]
+!13 = metadata !{metadata !"./platform_generic.h", metadata !"/home/alon/Dev/emscripten/tests/fuzz"}
+!14 = metadata !{i32 786473, metadata !13} ; [ DW_TAG_file_type ] [/home/alon/Dev/emscripten/tests/fuzz/./platform_generic.h]
+!15 = metadata !{i32 786453, i32 0, i32 0, metadata !"", i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !16, i32 0, i32 0} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]
+!16 = metadata !{null, metadata !17, metadata !8}
+!17 = metadata !{i32 786454, metadata !18, null, metadata !"uint32_t", i32 182, i64 0, i64 0, i64 0, i32 0, metadata !19} ; [ DW_TAG_typedef ] [uint32_t] [line 182, size 0, align 0, offset 0] [from unsigned int]
+!18 = metadata !{metadata !"./csmith.h", metadata !"/home/alon/Dev/emscripten/tests/fuzz"}
+!19 = metadata !{i32 786468, null, null, metadata !"unsigned int", i32 0, i64 32, i64 32, i64 0, i32 0, i32 7} ; [ DW_TAG_base_type ] [unsigned int] [line 0, size 32, align 32, offset 0, enc DW_ATE_unsigned]
+!20 = metadata !{i32 786478, metadata !18, metadata !21, metadata !"transparent_crc", metadata !"transparent_crc", metadata !"", i32 108, metadata !22, i1 true, i1 true, i32 0, i32 0, null, i32 256, i1 false, void (i64, i8*, i32)* @transparent_crc, null, null, metadata !2, i32 109} ; [ DW_TAG_subprogram ] [line 108] [local] [def] [scope 109] [transparent_crc]
+!21 = metadata !{i32 786473, metadata !18} ; [ DW_TAG_file_type ] [/home/alon/Dev/emscripten/tests/fuzz/./csmith.h]
+!22 = metadata !{i32 786453, i32 0, i32 0, metadata !"", i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !23, i32 0, i32 0} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]
+!23 = metadata !{null, metadata !24, metadata !10, metadata !8}
+!24 = metadata !{i32 786454, metadata !18, null, metadata !"uint64_t", i32 187, i64 0, i64 0, i64 0, i32 0, metadata !25} ; [ DW_TAG_typedef ] [uint64_t] [line 187, size 0, align 0, offset 0] [from long long unsigned int]
+!25 = metadata !{i32 786468, null, null, metadata !"long long unsigned int", i32 0, i64 64, i64 64, i64 0, i32 0, i32 7} ; [ DW_TAG_base_type ] [long long unsigned int] [line 0, size 64, align 64, offset 0, enc DW_ATE_unsigned]
+!26 = metadata !{i32 786478, metadata !18, metadata !21, metadata !"crc32_8bytes", metadata !"crc32_8bytes", metadata !"", i32 95, metadata !27, i1 true, i1 true, i32 0, i32 0, null, i32 256, i1 false, void (i64)* @crc32_8bytes, null, null, metadata !2, i32 96} ; [ DW_TAG_subprogram ] [line 95] [local] [def] [scope 96] [crc32_8bytes]
+!27 = metadata !{i32 786453, i32 0, i32 0, metadata !"", i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !28, i32 0, i32 0} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]
+!28 = metadata !{null, metadata !24}
+!29 = metadata !{i32 786478, metadata !18, metadata !21, metadata !"crc32_byte", metadata !"crc32_byte", metadata !"", i32 69, metadata !30, i1 true, i1 true, i32 0, i32 0, null, i32 256, i1 false, void (i8)* @crc32_byte, null, null, metadata !2, i32 69} ; [ DW_TAG_subprogram ] [line 69] [local] [def] [crc32_byte]
+!30 = metadata !{i32 786453, i32 0, i32 0, metadata !"", i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !31, i32 0, i32 0} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]
+!31 = metadata !{null, metadata !32}
+!32 = metadata !{i32 786454, metadata !1, null, metadata !"uint8_t", i32 172, i64 0, i64 0, i64 0, i32 0, metadata !33} ; [ DW_TAG_typedef ] [uint8_t] [line 172, size 0, align 0, offset 0] [from unsigned char]
+!33 = metadata !{i32 786468, null, null, metadata !"unsigned char", i32 0, i64 8, i64 8, i64 0, i32 0, i32 8} ; [ DW_TAG_base_type ] [unsigned char] [line 0, size 8, align 8, offset 0, enc DW_ATE_unsigned_char]
+!34 = metadata !{i32 786478, metadata !1, metadata !5, metadata !"func_1", metadata !"func_1", metadata !"", i32 130, metadata !35, i1 true, i1 true, i32 0, i32 0, null, i32 256, i1 false, void (%struct.S3*)* @func_1, null, null, metadata !2, i32 131} ; [ DW_TAG_subprogram ] [line 130] [local] [def] [scope 131] [func_1]
+!35 = metadata !{i32 786453, i32 0, i32 0, metadata !"", i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !36, i32 0, i32 0} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]
+!36 = metadata !{metadata !37}
+!37 = metadata !{i32 786451, metadata !1, null, metadata !"S3", i32 39, i64 64, i64 32, i32 0, i32 0, null, metadata !38, i32 0, null, null} ; [ DW_TAG_structure_type ] [S3] [line 39, size 64, align 32, offset 0] [from ]
+!38 = metadata !{metadata !39, metadata !40}
+!39 = metadata !{i32 786445, metadata !1, metadata !37, metadata !"f0", i32 40, i64 32, i64 32, i64 0, i32 0, metadata !17} ; [ DW_TAG_member ] [f0] [line 40, size 32, align 32, offset 0] [from uint32_t]
+!40 = metadata !{i32 786445, metadata !1, metadata !37, metadata !"f1", i32 41, i64 32, i64 32, i64 32, i32 0, metadata !17} ; [ DW_TAG_member ] [f1] [line 41, size 32, align 32, offset 32] [from uint32_t]
+!41 = metadata !{i32 786478, metadata !1, metadata !5, metadata !"func_2", metadata !"func_2", metadata !"", i32 144, metadata !42, i1 true, i1 true, i32 0, i32 0, null, i32 256, i1 false, i32 (i8)* @func_2, null, null, metadata !2, i32 145} ; [ DW_TAG_subprogram ] [line 144] [local] [def] [scope 145] [func_2]
+!42 = metadata !{i32 786453, i32 0, i32 0, metadata !"", i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !43, i32 0, i32 0} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]
+!43 = metadata !{metadata !44, metadata !32, metadata !45}
+!44 = metadata !{i32 786454, metadata !1, null, metadata !"int32_t", i32 157, i64 0, i64 0, i64 0, i32 0, metadata !8} ; [ DW_TAG_typedef ] [int32_t] [line 157, size 0, align 0, offset 0] [from int]
+!45 = metadata !{i32 786454, metadata !1, null, metadata !"uint16_t", i32 177, i64 0, i64 0, i64 0, i32 0, metadata !46} ; [ DW_TAG_typedef ] [uint16_t] [line 177, size 0, align 0, offset 0] [from unsigned short]
+!46 = metadata !{i32 786468, null, null, metadata !"unsigned short", i32 0, i64 16, i64 16, i64 0, i32 0, i32 7} ; [ DW_TAG_base_type ] [unsigned short] [line 0, size 16, align 16, offset 0, enc DW_ATE_unsigned]
+!47 = metadata !{i32 786478, metadata !1, metadata !5, metadata !"func_45", metadata !"func_45", metadata !"", i32 933, metadata !48, i1 true, i1 true, i32 0, i32 0, null, i32 256, i1 false, i32* (i32*, %struct.S3*)* @func_45, null, null, metadata !2, i32 934} ; [ DW_TAG_subprogram ] [line 933] [local] [def] [scope 934] [func_45]
+!48 = metadata !{i32 786453, i32 0, i32 0, metadata !"", i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !49, i32 0, i32 0} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]
+!49 = metadata !{metadata !50, metadata !50, metadata !37}
+!50 = metadata !{i32 786447, null, null, metadata !"", i32 0, i64 32, i64 32, i64 0, i32 0, metadata !44} ; [ DW_TAG_pointer_type ] [line 0, size 32, align 32, offset 0] [from int32_t]
+!51 = metadata !{i32 786478, metadata !52, metadata !53, metadata !"safe_sub_func_uint32_t_u_u", metadata !"safe_sub_func_uint32_t_u_u", metadata !"", i32 757, metadata !54, i1 true, i1 true, i32 0, i32 0, null, i32 256, i1 false, null, null, null, metadata !2, i32 758} ; [ DW_TAG_subprogram ] [line 757] [local] [def] [scope 758] [safe_sub_func_uint32_t_u_u]
+!52 = metadata !{metadata !"./safe_math.h", metadata !"/home/alon/Dev/emscripten/tests/fuzz"}
+!53 = metadata !{i32 786473, metadata !52} ; [ DW_TAG_file_type ] [/home/alon/Dev/emscripten/tests/fuzz/./safe_math.h]
+!54 = metadata !{i32 786453, i32 0, i32 0, metadata !"", i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !55, i32 0, i32 0} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]
+!55 = metadata !{metadata !17, metadata !17, metadata !17}
+!56 = metadata !{i32 786478, metadata !52, metadata !53, metadata !"safe_div_func_int8_t_s_s", metadata !"safe_div_func_int8_t_s_s", metadata !"", i32 82, metadata !57, i1 true, i1 true, i32 0, i32 0, null, i32 256, i1 false, null, null, null, metadata !2, i32 83} ; [ DW_TAG_subprogram ] [line 82] [local] [def] [scope 83] [safe_div_func_int8_t_s_s]
+!57 = metadata !{i32 786453, i32 0, i32 0, metadata !"", i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !58, i32 0, i32 0} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]
+!58 = metadata !{metadata !59, metadata !59, metadata !59}
+!59 = metadata !{i32 786454, metadata !1, null, metadata !"int8_t", i32 147, i64 0, i64 0, i64 0, i32 0, metadata !60} ; [ DW_TAG_typedef ] [int8_t] [line 147, size 0, align 0, offset 0] [from signed char]
+!60 = metadata !{i32 786468, null, null, metadata !"signed char", i32 0, i64 8, i64 8, i64 0, i32 0, i32 6} ; [ DW_TAG_base_type ] [signed char] [line 0, size 8, align 8, offset 0, enc DW_ATE_signed_char]
+!61 = metadata !{i32 786478, metadata !52, metadata !53, metadata !"safe_sub_func_int8_t_s_s", metadata !"safe_sub_func_int8_t_s_s", metadata !"", i32 42, metadata !57, i1 true, i1 true, i32 0, i32 0, null, i32 256, i1 false, null, null, null, metadata !2, i32 43} ; [ DW_TAG_subprogram ] [line 42] [local] [def] [scope 43] [safe_sub_func_int8_t_s_s]
+!62 = metadata !{i32 786478, metadata !52, metadata !53, metadata !"safe_div_func_int32_t_s_s", metadata !"safe_div_func_int32_t_s_s", metadata !"", i32 342, metadata !63, i1 true, i1 true, i32 0, i32 0, null, i32 256, i1 false, i32 (i32)* @safe_div_func_int32_t_s_s, null, null, metadata !2, i32 343} ; [ DW_TAG_subprogram ] [line 342] [local] [def] [scope 343] [safe_div_func_int32_t_s_s]
+!63 = metadata !{i32 786453, i32 0, i32 0, metadata !"", i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !64, i32 0, i32 0} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]
+!64 = metadata !{metadata !44, metadata !44, metadata !44}
+!65 = metadata !{i32 786478, metadata !52, metadata !53, metadata !"safe_lshift_func_uint8_t_u_s", metadata !"safe_lshift_func_uint8_t_u_s", metadata !"", i32 591, metadata !66, i1 true, i1 true, i32 0, i32 0, null, i32 256, i1 false, void ()* @safe_lshift_func_uint8_t_u_s, null, null, metadata !2, i32 592} ; [ DW_TAG_subprogram ] [line 591] [local] [def] [scope 592] [safe_lshift_func_uint8_t_u_s]
+!66 = metadata !{i32 786453, i32 0, i32 0, metadata !"", i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !67, i32 0, i32 0} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]
+!67 = metadata !{metadata !32, metadata !32, metadata !8}
+!68 = metadata !{i32 786478, metadata !52, metadata !53, metadata !"safe_rshift_func_uint16_t_u_u", metadata !"safe_rshift_func_uint16_t_u_u", metadata !"", i32 729, metadata !69, i1 true, i1 true, i32 0, i32 0, null, i32 256, i1 false, i16 (i16, i32)* @safe_rshift_func_uint16_t_u_u, null, null, metadata !2, i32 730} ; [ DW_TAG_subprogram ] [line 729] [local] [def] [scope 730] [safe_rshift_func_uint16_t_u_u]
+!69 = metadata !{i32 786453, i32 0, i32 0, metadata !"", i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !70, i32 0, i32 0} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]
+!70 = metadata !{metadata !45, metadata !45, metadata !19}
+!71 = metadata !{i32 786478, metadata !52, metadata !53, metadata !"safe_lshift_func_uint16_t_u_s", metadata !"safe_lshift_func_uint16_t_u_s", metadata !"", i32 693, metadata !72, i1 true, i1 true, i32 0, i32 0, null, i32 256, i1 false, i16 (i16)* @safe_lshift_func_uint16_t_u_s, null, null, metadata !2, i32 694} ; [ DW_TAG_subprogram ] [line 693] [local] [def] [scope 694] [safe_lshift_func_uint16_t_u_s]
+!72 = metadata !{i32 786453, i32 0, i32 0, metadata !"", i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !73, i32 0, i32 0} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]
+!73 = metadata !{metadata !45, metadata !45, metadata !8}
+!74 = metadata !{i32 786478, metadata !52, metadata !53, metadata !"safe_add_func_int16_t_s_s", metadata !"safe_add_func_int16_t_s_s", metadata !"", i32 158, metadata !75, i1 true, i1 true, i32 0, i32 0, null, i32 256, i1 false, i16 (i16, i16)* @safe_add_func_int16_t_s_s, null, null, metadata !2, i32 159} ; [ DW_TAG_subprogram ] [line 158] [local] [def] [scope 159] [safe_add_func_int16_t_s_s]
+!75 = metadata !{i32 786453, i32 0, i32 0, metadata !"", i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !76, i32 0, i32 0} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]
+!76 = metadata !{metadata !77, metadata !77, metadata !77}
+!77 = metadata !{i32 786454, metadata !1, null, metadata !"int16_t", i32 152, i64 0, i64 0, i64 0, i32 0, metadata !78} ; [ DW_TAG_typedef ] [int16_t] [line 152, size 0, align 0, offset 0] [from short]
+!78 = metadata !{i32 786468, null, null, metadata !"short", i32 0, i64 16, i64 16, i64 0, i32 0, i32 5} ; [ DW_TAG_base_type ] [short] [line 0, size 16, align 16, offset 0, enc DW_ATE_signed]
+!79 = metadata !{i32 786478, metadata !52, metadata !53, metadata !"safe_add_func_uint8_t_u_u", metadata !"safe_add_func_uint8_t_u_u", metadata !"", i32 546, metadata !80, i1 true, i1 true, i32 0, i32 0, null, i32 256, i1 false, i8 (i8)* @safe_add_func_uint8_t_u_u, null, null, metadata !2, i32 547} ; [ DW_TAG_subprogram ] [line 546] [local] [def] [scope 547] [safe_add_func_uint8_t_u_u]
+!80 = metadata !{i32 786453, i32 0, i32 0, metadata !"", i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !81, i32 0, i32 0} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]
+!81 = metadata !{metadata !32, metadata !32, metadata !32}
+!82 = metadata !{i32 786478, metadata !1, metadata !5, metadata !"func_34", metadata !"func_34", metadata !"", i32 653, metadata !83, i1 true, i1 true, i32 0, i32 0, null, i32 256, i1 false, i32* (%union.U4*, i32*)* @func_34, null, null, metadata !2, i32 654} ; [ DW_TAG_subprogram ] [line 653] [local] [def] [scope 654] [func_34]
+!83 = metadata !{i32 786453, i32 0, i32 0, metadata !"", i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !84, i32 0, i32 0} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]
+!84 = metadata !{metadata !50, metadata !50, metadata !85, metadata !50}
+!85 = metadata !{i32 786455, metadata !1, null, metadata !"U4", i32 44, i64 32, i64 32, i64 0, i32 0, null, metadata !86, i32 0, i32 0, null} ; [ DW_TAG_union_type ] [U4] [line 44, size 32, align 32, offset 0] [from ]
+!86 = metadata !{metadata !87}
+!87 = metadata !{i32 786445, metadata !1, metadata !85, metadata !"f0", i32 45, i64 32, i64 32, i64 0, i32 0, metadata !88} ; [ DW_TAG_member ] [f0] [line 45, size 32, align 32, offset 0] [from ]
+!88 = metadata !{i32 786470, null, null, metadata !"", i32 0, i64 0, i64 0, i64 0, i32 0, metadata !44} ; [ DW_TAG_const_type ] [line 0, size 0, align 0, offset 0] [from int32_t]
+!89 = metadata !{i32 786478, metadata !52, metadata !53, metadata !"safe_add_func_uint16_t_u_u", metadata !"safe_add_func_uint16_t_u_u", metadata !"", i32 648, metadata !90, i1 true, i1 true, i32 0, i32 0, null, i32 256, i1 false, i16 (i16, i16)* @safe_add_func_uint16_t_u_u, null, null, metadata !2, i32 649} ; [ DW_TAG_subprogram ] [line 648] [local] [def] [scope 649] [safe_add_func_uint16_t_u_u]
+!90 = metadata !{i32 786453, i32 0, i32 0, metadata !"", i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !91, i32 0, i32 0} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]
+!91 = metadata !{metadata !45, metadata !45, metadata !45}
+!92 = metadata !{i32 786478, metadata !52, metadata !53, metadata !"safe_lshift_func_uint16_t_u_u", metadata !"safe_lshift_func_uint16_t_u_u", metadata !"", i32 705, metadata !69, i1 true, i1 true, i32 0, i32 0, null, i32 256, i1 false, null, null, null, metadata !2, i32 706} ; [ DW_TAG_subprogram ] [line 705] [local] [def] [scope 706] [safe_lshift_func_uint16_t_u_u]
+!93 = metadata !{i32 786478, metadata !52, metadata !53, metadata !"safe_mod_func_uint16_t_u_u", metadata !"safe_mod_func_uint16_t_u_u", metadata !"", i32 669, metadata !90, i1 true, i1 true, i32 0, i32 0, null, i32 256, i1 false, i16 (i16, i16)* @safe_mod_func_uint16_t_u_u, null, null, metadata !2, i32 670} ; [ DW_TAG_subprogram ] [line 669] [local] [def] [scope 670] [safe_mod_func_uint16_t_u_u]
+!94 = metadata !{i32 786478, metadata !52, metadata !53, metadata !"safe_mul_func_int16_t_s_s", metadata !"safe_mul_func_int16_t_s_s", metadata !"", i32 186, metadata !75, i1 true, i1 true, i32 0, i32 0, null, i32 256, i1 false, i16 (i16, i16)* @safe_mul_func_int16_t_s_s, null, null, metadata !2, i32 187} ; [ DW_TAG_subprogram ] [line 186] [local] [def] [scope 187] [safe_mul_func_int16_t_s_s]
+!95 = metadata !{i32 786478, metadata !52, metadata !53, metadata !"safe_lshift_func_uint8_t_u_u", metadata !"safe_lshift_func_uint8_t_u_u", metadata !"", i32 603, metadata !96, i1 true, i1 true, i32 0, i32 0, null, i32 256, i1 false, i8 (i8, i32)* @safe_lshift_func_uint8_t_u_u, null, null, metadata !2, i32 604} ; [ DW_TAG_subprogram ] [line 603] [local] [def] [scope 604] [safe_lshift_func_uint8_t_u_u]
+!96 = metadata !{i32 786453, i32 0, i32 0, metadata !"", i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !97, i32 0, i32 0} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]
+!97 = metadata !{metadata !32, metadata !32, metadata !19}
+!98 = metadata !{i32 786478, metadata !52, metadata !53, metadata !"safe_mod_func_uint8_t_u_u", metadata !"safe_mod_func_uint8_t_u_u", metadata !"", i32 567, metadata !80, i1 true, i1 true, i32 0, i32 0, null, i32 256, i1 false, null, null, null, metadata !2, i32 568} ; [ DW_TAG_subprogram ] [line 567] [local] [def] [scope 568] [safe_mod_func_uint8_t_u_u]
+!99 = metadata !{i32 786478, metadata !52, metadata !53, metadata !"safe_rshift_func_int16_t_s_u", metadata !"safe_rshift_func_int16_t_s_u", metadata !"", i32 260, metadata !100, i1 true, i1 true, i32 0, i32 0, null, i32 256, i1 false, null, null, null, metadata !2, i32 261} ; [ DW_TAG_subprogram ] [line 260] [local] [def] [scope 261] [safe_rshift_func_int16_t_s_u]
+!100 = metadata !{i32 786453, i32 0, i32 0, metadata !"", i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !101, i32 0, i32 0} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]
+!101 = metadata !{metadata !77, metadata !77, metadata !19}
+!102 = metadata !{i32 786478, metadata !52, metadata !53, metadata !"safe_rshift_func_int8_t_s_u", metadata !"safe_rshift_func_int8_t_s_u", metadata !"", i32 130, metadata !103, i1 true, i1 true, i32 0, i32 0, null, i32 256, i1 false, i8 (i8, i32)* @safe_rshift_func_int8_t_s_u, null, null, metadata !2, i32 131} ; [ DW_TAG_subprogram ] [line 130] [local] [def] [scope 131] [safe_rshift_func_int8_t_s_u]
+!103 = metadata !{i32 786453, i32 0, i32 0, metadata !"", i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !104, i32 0, i32 0} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]
+!104 = metadata !{metadata !59, metadata !59, metadata !19}
+!105 = metadata !{i32 786478, metadata !52, metadata !53, metadata !"safe_div_func_uint16_t_u_u", metadata !"safe_div_func_uint16_t_u_u", metadata !"", i32 681, metadata !90, i1 true, i1 true, i32 0, i32 0, null, i32 256, i1 false, i16 (i16, i16)* @safe_div_func_uint16_t_u_u, null, null, metadata !2, i32 682} ; [ DW_TAG_subprogram ] [line 681] [local] [def] [scope 682] [safe_div_func_uint16_t_u_u]
+!106 = metadata !{i32 786478, metadata !52, metadata !53, metadata !"safe_mod_func_int8_t_s_s", metadata !"safe_mod_func_int8_t_s_s", metadata !"", i32 70, metadata !57, i1 true, i1 true, i32 0, i32 0, null, i32 256, i1 false, null, null, null, metadata !2, i32 71} ; [ DW_TAG_subprogram ] [line 70] [local] [def] [scope 71] [safe_mod_func_int8_t_s_s]
+!107 = metadata !{i32 786478, metadata !52, metadata !53, metadata !"safe_mul_func_int8_t_s_s", metadata !"safe_mul_func_int8_t_s_s", metadata !"", i32 56, metadata !57, i1 true, i1 true, i32 0, i32 0, null, i32 256, i1 false, i8 (i8, i8)* @safe_mul_func_int8_t_s_s, null, null, metadata !2, i32 57} ; [ DW_TAG_subprogram ] [line 56] [local] [def] [scope 57] [safe_mul_func_int8_t_s_s]
+!108 = metadata !{i32 786478, metadata !52, metadata !53, metadata !"safe_rshift_func_int8_t_s_s", metadata !"safe_rshift_func_int8_t_s_s", metadata !"", i32 118, metadata !109, i1 true, i1 true, i32 0, i32 0, null, i32 256, i1 false, null, null, null, metadata !2, i32 119} ; [ DW_TAG_subprogram ] [line 118] [local] [def] [scope 119] [safe_rshift_func_int8_t_s_s]
+!109 = metadata !{i32 786453, i32 0, i32 0, metadata !"", i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !110, i32 0, i32 0} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]
+!110 = metadata !{metadata !59, metadata !59, metadata !8}
+!111 = metadata !{i32 786478, metadata !1, metadata !5, metadata !"func_26", metadata !"func_26", metadata !"", i32 461, metadata !112, i1 true, i1 true, i32 0, i32 0, null, i32 256, i1 false, void (%struct.S3*, i32, i32*)* @func_26, null, null, metadata !2, i32 462} ; [ DW_TAG_subprogram ] [line 461] [local] [def] [scope 462] [func_26]
+!112 = metadata !{i32 786453, i32 0, i32 0, metadata !"", i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !113, i32 0, i32 0} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]
+!113 = metadata !{metadata !37, metadata !44, metadata !50}
+!114 = metadata !{i32 786478, metadata !52, metadata !53, metadata !"safe_rshift_func_int16_t_s_s", metadata !"safe_rshift_func_int16_t_s_s", metadata !"", i32 248, metadata !115, i1 true, i1 true, i32 0, i32 0, null, i32 256, i1 false, i16 (i16, i32)* @safe_rshift_func_int16_t_s_s, null, null, metadata !2, i32 249} ; [ DW_TAG_subprogram ] [line 248] [local] [def] [scope 249] [safe_rshift_func_int16_t_s_s]
+!115 = metadata !{i32 786453, i32 0, i32 0, metadata !"", i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !116, i32 0, i32 0} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]
+!116 = metadata !{metadata !77, metadata !77, metadata !8}
+!117 = metadata !{i32 786478, metadata !52, metadata !53, metadata !"safe_sub_func_int32_t_s_s", metadata !"safe_sub_func_int32_t_s_s", metadata !"", i32 302, metadata !63, i1 true, i1 true, i32 0, i32 0, null, i32 256, i1 false, i32 (i32, i32)* @safe_sub_func_int32_t_s_s, null, null, metadata !2, i32 303} ; [ DW_TAG_subprogram ] [line 302] [local] [def] [scope 303] [safe_sub_func_int32_t_s_s]
+!118 = metadata !{i32 786478, metadata !52, metadata !53, metadata !"safe_mod_func_uint32_t_u_u", metadata !"safe_mod_func_uint32_t_u_u", metadata !"", i32 771, metadata !54, i1 true, i1 true, i32 0, i32 0, null, i32 256, i1 false, i32 (i32, i32)* @safe_mod_func_uint32_t_u_u, null, null, metadata !2, i32 772} ; [ DW_TAG_subprogram ] [line 771] [local] [def] [scope 772] [safe_mod_func_uint32_t_u_u]
+!119 = metadata !{i32 786478, metadata !52, metadata !53, metadata !"safe_rshift_func_uint16_t_u_s", metadata !"safe_rshift_func_uint16_t_u_s", metadata !"", i32 717, metadata !72, i1 true, i1 true, i32 0, i32 0, null, i32 256, i1 false, i16 (i16, i32)* @safe_rshift_func_uint16_t_u_s, null, null, metadata !2, i32 718} ; [ DW_TAG_subprogram ] [line 717] [local] [def] [scope 718] [safe_rshift_func_uint16_t_u_s]
+!120 = metadata !{i32 786478, metadata !52, metadata !53, metadata !"safe_lshift_func_int8_t_s_s", metadata !"safe_lshift_func_int8_t_s_s", metadata !"", i32 94, metadata !109, i1 true, i1 true, i32 0, i32 0, null, i32 256, i1 false, i8 (i8, i32)* @safe_lshift_func_int8_t_s_s, null, null, metadata !2, i32 95} ; [ DW_TAG_subprogram ] [line 94] [local] [def] [scope 95] [safe_lshift_func_int8_t_s_s]
+!121 = metadata !{i32 786478, metadata !52, metadata !53, metadata !"safe_mod_func_int16_t_s_s", metadata !"safe_mod_func_int16_t_s_s", metadata !"", i32 200, metadata !75, i1 true, i1 true, i32 0, i32 0, null, i32 256, i1 false, null, null, null, metadata !2, i32 201} ; [ DW_TAG_subprogram ] [line 200] [local] [def] [scope 201] [safe_mod_func_int16_t_s_s]
+!122 = metadata !{i32 786478, metadata !52, metadata !53, metadata !"safe_add_func_int32_t_s_s", metadata !"safe_add_func_int32_t_s_s", metadata !"", i32 288, metadata !63, i1 true, i1 true, i32 0, i32 0, null, i32 256, i1 false, null, null, null, metadata !2, i32 289} ; [ DW_TAG_subprogram ] [line 288] [local] [def] [scope 289] [safe_add_func_int32_t_s_s]
+!123 = metadata !{i32 786478, metadata !52, metadata !53, metadata !"safe_mul_func_uint8_t_u_u", metadata !"safe_mul_func_uint8_t_u_u", metadata !"", i32 560, metadata !80, i1 true, i1 true, i32 0, i32 0, null, i32 256, i1 false, i8 (i8, i8)* @safe_mul_func_uint8_t_u_u, null, null, metadata !2, i32 561} ; [ DW_TAG_subprogram ] [line 560] [local] [def] [scope 561] [safe_mul_func_uint8_t_u_u]
+!124 = metadata !{i32 786478, metadata !52, metadata !53, metadata !"safe_sub_func_uint16_t_u_u", metadata !"safe_sub_func_uint16_t_u_u", metadata !"", i32 655, metadata !90, i1 true, i1 true, i32 0, i32 0, null, i32 256, i1 false, i16 (i16, i16)* @safe_sub_func_uint16_t_u_u, null, null, metadata !2, i32 656} ; [ DW_TAG_subprogram ] [line 655] [local] [def] [scope 656] [safe_sub_func_uint16_t_u_u]
+!125 = metadata !{i32 786478, metadata !1, metadata !5, metadata !"func_10", metadata !"func_10", metadata !"", i32 194, metadata !126, i1 true, i1 true, i32 0, i32 0, null, i32 256, i1 false, void (%struct.S0*, i8)* @func_10, null, null, metadata !2, i32 195} ; [ DW_TAG_subprogram ] [line 194] [local] [def] [scope 195] [func_10]
+!126 = metadata !{i32 786453, i32 0, i32 0, metadata !"", i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !127, i32 0, i32 0} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]
+!127 = metadata !{metadata !128, metadata !32, metadata !17}
+!128 = metadata !{i32 786451, metadata !1, null, metadata !"S0", i32 16, i64 192, i64 32, i32 0, i32 0, null, metadata !129, i32 0, null, null} ; [ DW_TAG_structure_type ] [S0] [line 16, size 192, align 32, offset 0] [from ]
+!129 = metadata !{metadata !130, metadata !131, metadata !132, metadata !133, metadata !134, metadata !135, metadata !136}
+!130 = metadata !{i32 786445, metadata !1, metadata !128, metadata !"f0", i32 17, i64 32, i64 32, i64 0, i32 0, metadata !44} ; [ DW_TAG_member ] [f0] [line 17, size 32, align 32, offset 0] [from int32_t]
+!131 = metadata !{i32 786445, metadata !1, metadata !128, metadata !"f1", i32 18, i64 20, i64 32, i64 32, i32 0, metadata !8} ; [ DW_TAG_member ] [f1] [line 18, size 20, align 32, offset 32] [from int]
+!132 = metadata !{i32 786445, metadata !1, metadata !128, metadata !"f2", i32 19, i64 24, i64 32, i64 64, i32 0, metadata !8} ; [ DW_TAG_member ] [f2] [line 19, size 24, align 32, offset 64] [from int]
+!133 = metadata !{i32 786445, metadata !1, metadata !128, metadata !"f3", i32 20, i64 26, i64 32, i64 96, i32 0, metadata !19} ; [ DW_TAG_member ] [f3] [line 20, size 26, align 32, offset 96] [from unsigned int]
+!134 = metadata !{i32 786445, metadata !1, metadata !128, metadata !"f4", i32 21, i64 8, i64 8, i64 128, i32 0, metadata !59} ; [ DW_TAG_member ] [f4] [line 21, size 8, align 8, offset 128] [from int8_t]
+!135 = metadata !{i32 786445, metadata !1, metadata !128, metadata !"f5", i32 22, i64 24, i64 32, i64 136, i32 0, metadata !19} ; [ DW_TAG_member ] [f5] [line 22, size 24, align 32, offset 136] [from unsigned int]
+!136 = metadata !{i32 786445, metadata !1, metadata !128, metadata !"f6", i32 23, i64 29, i64 32, i64 160, i32 0, metadata !19} ; [ DW_TAG_member ] [f6] [line 23, size 29, align 32, offset 160] [from unsigned int]
+!137 = metadata !{i32 786478, metadata !52, metadata !53, metadata !"safe_sub_func_int16_t_s_s", metadata !"safe_sub_func_int16_t_s_s", metadata !"", i32 172, metadata !75, i1 true, i1 true, i32 0, i32 0, null, i32 256, i1 false, null, null, null, metadata !2, i32 173} ; [ DW_TAG_subprogram ] [line 172] [local] [def] [scope 173] [safe_sub_func_int16_t_s_s]
+!138 = metadata !{i32 786478, metadata !52, metadata !53, metadata !"safe_rshift_func_uint8_t_u_s", metadata !"safe_rshift_func_uint8_t_u_s", metadata !"", i32 615, metadata !66, i1 true, i1 true, i32 0, i32 0, null, i32 256, i1 false, i8 (i8, i32)* @safe_rshift_func_uint8_t_u_s, null, null, metadata !2, i32 616} ; [ DW_TAG_subprogram ] [line 615] [local] [def] [scope 616] [safe_rshift_func_uint8_t_u_s]
+!139 = metadata !{i32 786478, metadata !52, metadata !53, metadata !"safe_div_func_uint32_t_u_u", metadata !"safe_div_func_uint32_t_u_u", metadata !"", i32 783, metadata !54, i1 true, i1 true, i32 0, i32 0, null, i32 256, i1 false, void ()* @safe_div_func_uint32_t_u_u, null, null, metadata !2, i32 784} ; [ DW_TAG_subprogram ] [line 783] [local] [def] [scope 784] [safe_div_func_uint32_t_u_u]
+!140 = metadata !{i32 786478, metadata !52, metadata !53, metadata !"safe_unary_minus_func_uint32_t_u", metadata !"safe_unary_minus_func_uint32_t_u", metadata !"", i32 743, metadata !141, i1 true, i1 true, i32 0, i32 0, null, i32 256, i1 false, void ()* @safe_unary_minus_func_uint32_t_u, null, null, metadata !2, i32 744} ; [ DW_TAG_subprogram ] [line 743] [local] [def] [scope 744] [safe_unary_minus_func_uint32_t_u]
+!141 = metadata !{i32 786453, i32 0, i32 0, metadata !"", i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !142, i32 0, i32 0} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]
+!142 = metadata !{metadata !17, metadata !17}
+!143 = metadata !{i32 786478, metadata !52, metadata !53, metadata !"safe_add_func_uint32_t_u_u", metadata !"safe_add_func_uint32_t_u_u", metadata !"", i32 750, metadata !54, i1 true, i1 true, i32 0, i32 0, null, i32 256, i1 false, void ()* @safe_add_func_uint32_t_u_u, null, null, metadata !2, i32 751} ; [ DW_TAG_subprogram ] [line 750] [local] [def] [scope 751] [safe_add_func_uint32_t_u_u]
+!144 = metadata !{i32 786478, metadata !52, metadata !53, metadata !"safe_lshift_func_int16_t_s_s", metadata !"safe_lshift_func_int16_t_s_s", metadata !"", i32 224, metadata !115, i1 true, i1 true, i32 0, i32 0, null, i32 256, i1 false, void ()* @safe_lshift_func_int16_t_s_s, null, null, metadata !2, i32 225} ; [ DW_TAG_subprogram ] [line 224] [local] [def] [scope 225] [safe_lshift_func_int16_t_s_s]
+!145 = metadata !{i32 786478, metadata !52, metadata !53, metadata !"safe_div_func_int16_t_s_s", metadata !"safe_div_func_int16_t_s_s", metadata !"", i32 212, metadata !75, i1 true, i1 true, i32 0, i32 0, null, i32 256, i1 false, void ()* @safe_div_func_int16_t_s_s, null, null, metadata !2, i32 213} ; [ DW_TAG_subprogram ] [line 212] [local] [def] [scope 213] [safe_div_func_int16_t_s_s]
+!146 = metadata !{i32 786478, metadata !52, metadata !53, metadata !"safe_mul_func_uint16_t_u_u", metadata !"safe_mul_func_uint16_t_u_u", metadata !"", i32 662, metadata !90, i1 true, i1 true, i32 0, i32 0, null, i32 256, i1 false, i16 (i16, i16)* @safe_mul_func_uint16_t_u_u, null, null, metadata !2, i32 663} ; [ DW_TAG_subprogram ] [line 662] [local] [def] [scope 663] [safe_mul_func_uint16_t_u_u]
+!147 = metadata !{i32 786478, metadata !52, metadata !53, metadata !"safe_add_func_int8_t_s_s", metadata !"safe_add_func_int8_t_s_s", metadata !"", i32 28, metadata !57, i1 true, i1 true, i32 0, i32 0, null, i32 256, i1 false, null, null, null, metadata !2, i32 29} ; [ DW_TAG_subprogram ] [line 28] [local] [def] [scope 29] [safe_add_func_int8_t_s_s]
+!148 = metadata !{i32 786478, metadata !1, metadata !5, metadata !"func_31", metadata !"func_31", metadata !"", i32 612, metadata !149, i1 true, i1 true, i32 0, i32 0, null, i32 256, i1 false, i8 ()* @func_31, null, null, metadata !2, i32 613} ; [ DW_TAG_subprogram ] [line 612] [local] [def] [scope 613] [func_31]
+!149 = metadata !{i32 786453, i32 0, i32 0, metadata !"", i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !150, i32 0, i32 0} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]
+!150 = metadata !{metadata !32, metadata !50}
+!151 = metadata !{i32 786478, metadata !1, metadata !5, metadata !"func_38", metadata !"func_38", metadata !"", i32 685, metadata !152, i1 true, i1 true, i32 0, i32 0, null, i32 256, i1 false, void (%struct.S3*, i32, i32*, %struct.S1*)* @func_38, null, null, metadata !2, i32 686} ; [ DW_TAG_subprogram ] [line 685] [local] [def] [scope 686] [func_38]
+!152 = metadata !{i32 786453, i32 0, i32 0, metadata !"", i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !153, i32 0, i32 0} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]
+!153 = metadata !{metadata !50, metadata !37, metadata !17, metadata !50, metadata !154}
+!154 = metadata !{i32 786470, null, null, metadata !"", i32 0, i64 0, i64 0, i64 0, i32 0, metadata !155} ; [ DW_TAG_const_type ] [line 0, size 0, align 0, offset 0] [from S1]
+!155 = metadata !{i32 786451, metadata !1, null, metadata !"S1", i32 27, i64 96, i64 32, i32 0, i32 0, null, metadata !156, i32 0, null, null} ; [ DW_TAG_structure_type ] [S1] [line 27, size 96, align 32, offset 0] [from ]
+!156 = metadata !{metadata !157, metadata !159, metadata !160, metadata !161}
+!157 = metadata !{i32 786445, metadata !1, metadata !155, metadata !"f0", i32 28, i64 32, i64 32, i64 0, i32 0, metadata !158} ; [ DW_TAG_member ] [f0] [line 28, size 32, align 32, offset 0] [from ]
+!158 = metadata !{i32 786470, null, null, metadata !"", i32 0, i64 0, i64 0, i64 0, i32 0, metadata !17} ; [ DW_TAG_const_type ] [line 0, size 0, align 0, offset 0] [from uint32_t]
+!159 = metadata !{i32 786445, metadata !1, metadata !155, metadata !"f1", i32 29, i64 32, i64 32, i64 32, i32 0, metadata !158} ; [ DW_TAG_member ] [f1] [line 29, size 32, align 32, offset 32] [from ]
+!160 = metadata !{i32 786445, metadata !1, metadata !155, metadata !"f2", i32 30, i64 8, i64 8, i64 64, i32 0, metadata !32} ; [ DW_TAG_member ] [f2] [line 30, size 8, align 8, offset 64] [from uint8_t]
+!161 = metadata !{i32 786445, metadata !1, metadata !155, metadata !"f3", i32 31, i64 16, i64 16, i64 80, i32 0, metadata !77} ; [ DW_TAG_member ] [f3] [line 31, size 16, align 16, offset 80] [from int16_t]
+!162 = metadata !{i32 786478, metadata !52, metadata !53, metadata !"safe_div_func_uint8_t_u_u", metadata !"safe_div_func_uint8_t_u_u", metadata !"", i32 579, metadata !80, i1 true, i1 true, i32 0, i32 0, null, i32 256, i1 false, void ()* @safe_div_func_uint8_t_u_u, null, null, metadata !2, i32 580} ; [ DW_TAG_subprogram ] [line 579] [local] [def] [scope 580] [safe_div_func_uint8_t_u_u]
+!163 = metadata !{i32 786478, metadata !52, metadata !53, metadata !"safe_sub_func_uint8_t_u_u", metadata !"safe_sub_func_uint8_t_u_u", metadata !"", i32 553, metadata !80, i1 true, i1 true, i32 0, i32 0, null, i32 256, i1 false, null, null, null, metadata !2, i32 554} ; [ DW_TAG_subprogram ] [line 553] [local] [def] [scope 554] [safe_sub_func_uint8_t_u_u]
+!164 = metadata !{i32 786478, metadata !1, metadata !5, metadata !"func_19", metadata !"func_19", metadata !"", i32 414, metadata !165, i1 true, i1 true, i32 0, i32 0, null, i32 256, i1 false, void (%struct.S3*)* @func_19, null, null, metadata !2, i32 415} ; [ DW_TAG_subprogram ] [line 414] [local] [def] [scope 415] [func_19]
+!165 = metadata !{i32 786453, i32 0, i32 0, metadata !"", i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !166, i32 0, i32 0} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]
+!166 = metadata !{metadata !50, metadata !50, metadata !37, metadata !167, metadata !50}
+!167 = metadata !{i32 786447, null, null, metadata !"", i32 0, i64 32, i64 32, i64 0, i32 0, metadata !88} ; [ DW_TAG_pointer_type ] [line 0, size 32, align 32, offset 0] [from ]
+!168 = metadata !{i32 786478, metadata !52, metadata !53, metadata !"safe_lshift_func_int8_t_s_u", metadata !"safe_lshift_func_int8_t_s_u", metadata !"", i32 106, metadata !103, i1 true, i1 true, i32 0, i32 0, null, i32 256, i1 false, i8 (i8, i32)* @safe_lshift_func_int8_t_s_u, null, null, metadata !2, i32 107} ; [ DW_TAG_subprogram ] [line 106] [local] [def] [scope 107] [safe_lshift_func_int8_t_s_u]
+!169 = metadata !{i32 786478, metadata !1, metadata !5, metadata !"func_15", metadata !"func_15", metadata !"", i32 357, metadata !170, i1 true, i1 true, i32 0, i32 0, null, i32 256, i1 false, void (i32)* @func_15, null, null, metadata !2, i32 358} ; [ DW_TAG_subprogram ] [line 357] [local] [def] [scope 358] [func_15]
+!170 = metadata !{i32 786453, i32 0, i32 0, metadata !"", i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !171, i32 0, i32 0} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]
+!171 = metadata !{metadata !50, metadata !167, metadata !17, metadata !45}
+!172 = metadata !{i32 786478, metadata !52, metadata !53, metadata !"safe_unary_minus_func_int32_t_s", metadata !"safe_unary_minus_func_int32_t_s", metadata !"", i32 274, metadata !173, i1 true, i1 true, i32 0, i32 0, null, i32 256, i1 false, i32 (i32)* @safe_unary_minus_func_int32_t_s, null, null, metadata !2, i32 275} ; [ DW_TAG_subprogram ] [line 274] [local] [def] [scope 275] [safe_unary_minus_func_int32_t_s]
+!173 = metadata !{i32 786453, i32 0, i32 0, metadata !"", i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !174, i32 0, i32 0} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]
+!174 = metadata !{metadata !44, metadata !44}
+!175 = metadata !{i32 786478, metadata !52, metadata !53, metadata !"safe_mod_func_int32_t_s_s", metadata !"safe_mod_func_int32_t_s_s", metadata !"", i32 330, metadata !63, i1 true, i1 true, i32 0, i32 0, null, i32 256, i1 false, i32 (i32, i32)* @safe_mod_func_int32_t_s_s, null, null, metadata !2, i32 331} ; [ DW_TAG_subprogram ] [line 330] [local] [def] [scope 331] [safe_mod_func_int32_t_s_s]
+!176 = metadata !{i32 786478, metadata !18, metadata !21, metadata !"crc32_gentab", metadata !"crc32_gentab", metadata !"", i32 49, metadata !177, i1 true, i1 true, i32 0, i32 0, null, i32 256, i1 false, void ()* @crc32_gentab, null, null, metadata !2, i32 50} ; [ DW_TAG_subprogram ] [line 49] [local] [def] [scope 50] [crc32_gentab]
+!177 = metadata !{i32 786453, i32 0, i32 0, metadata !"", i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !178, i32 0, i32 0} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]
+!178 = metadata !{null}
+!179 = metadata !{i32 786478, metadata !13, metadata !14, metadata !"platform_main_begin", metadata !"platform_main_begin", metadata !"", i32 44, metadata !177, i1 true, i1 true, i32 0, i32 0, null, i32 256, i1 false, null, null, null, metadata !2, i32 45} ; [ DW_TAG_subprogram ] [line 44] [local] [def] [scope 45] [platform_main_begin]
+!180 = metadata !{metadata !181, metadata !182, metadata !187, metadata !188, metadata !189, metadata !193, metadata !197, metadata !198, metadata !203, metadata !204, metadata !205, metadata !206, metadata !210, metadata !211, metadata !212, metadata !213, metadata !214, metadata !215, metadata !216, metadata !217, metadata !218, metadata !222, metadata !223, metadata !224, metadata !229, metadata !230, metadata !231, metadata !234, metadata !237, metadata !238, metadata !239, metadata !241, metadata !242, metadata !243, metadata !245, metadata !246, metadata !247, metadata !248, metadata !249, metadata !250, metadata !251, metadata !252, metadata !253, metadata !256, metadata !257, metadata !258, metadata !262, metadata !263, metadata !265, metadata !268, metadata !269, metadata !272, metadata !274, metadata !279, metadata !280, metadata !281, metadata !284, metadata !287, metadata !289, metadata !291, metadata !292, metadata !292, metadata !292, metadata !292, metadata !292, metadata !292, metadata !293, metadata !293, metadata !293, metadata !293, metadata !294, metadata !298, metadata !301}
+!181 = metadata !{i32 786484, i32 0, null, metadata !"crc32_context", metadata !"crc32_context", metadata !"", metadata !21, i32 46, metadata !17, i32 1, i32 1, i32* @crc32_context, null} ; [ DW_TAG_variable ] [crc32_context] [line 46] [local] [def]
+!182 = metadata !{i32 786484, i32 0, null, metadata !"g_1057", metadata !"g_1057", metadata !"", metadata !5, i32 103, metadata !183, i32 1, i32 1, [4 x [5 x i32]]* @g_1057, null} ; [ DW_TAG_variable ] [g_1057] [line 103] [local] [def]
+!183 = metadata !{i32 786433, null, null, metadata !"", i32 0, i64 640, i64 32, i32 0, i32 0, metadata !17, metadata !184, i32 0, i32 0} ; [ DW_TAG_array_type ] [line 0, size 640, align 32, offset 0] [from uint32_t]
+!184 = metadata !{metadata !185, metadata !186}
+!185 = metadata !{i32 786465, i64 0, i64 4} ; [ DW_TAG_subrange_type ] [0, 3]
+!186 = metadata !{i32 786465, i64 0, i64 5} ; [ DW_TAG_subrange_type ] [0, 4]
+!187 = metadata !{i32 786484, i32 0, null, metadata !"g_1055", metadata !"g_1055", metadata !"", metadata !5, i32 102, metadata !44, i32 1, i32 1, i32* @g_1055, null} ; [ DW_TAG_variable ] [g_1055] [line 102] [local] [def]
+!188 = metadata !{i32 786484, i32 0, null, metadata !"g_1054", metadata !"g_1054", metadata !"", metadata !5, i32 101, metadata !59, i32 1, i32 1, null, null}
+!189 = metadata !{i32 786484, i32 0, null, metadata !"g_901", metadata !"g_901", metadata !"", metadata !5, i32 98, metadata !190, i32 1, i32 1, { i8, i8, [2 x i8] }* @g_901, null} ; [ DW_TAG_variable ] [g_901] [line 98] [local] [def]
+!190 = metadata !{i32 786451, metadata !1, null, metadata !"S2", i32 34, i64 32, i64 32, i32 0, i32 0, null, metadata !191, i32 0, null, null} ; [ DW_TAG_structure_type ] [S2] [line 34, size 32, align 32, offset 0] [from ]
+!191 = metadata !{metadata !192}
+!192 = metadata !{i32 786445, metadata !1, metadata !190, metadata !"f0", i32 35, i64 15, i64 32, i64 0, i32 0, metadata !8} ; [ DW_TAG_member ] [f0] [line 35, size 15, align 32, offset 0] [from int]
+!193 = metadata !{i32 786484, i32 0, null, metadata !"g_815", metadata !"g_815", metadata !"", metadata !5, i32 97, metadata !194, i32 1, i32 1, [4 x [3 x i8]]* @g_815, null} ; [ DW_TAG_variable ] [g_815] [line 97] [local] [def]
+!194 = metadata !{i32 786433, null, null, metadata !"", i32 0, i64 96, i64 8, i32 0, i32 0, metadata !59, metadata !195, i32 0, i32 0} ; [ DW_TAG_array_type ] [line 0, size 96, align 8, offset 0] [from int8_t]
+!195 = metadata !{metadata !185, metadata !196}
+!196 = metadata !{i32 786465, i64 0, i64 3} ; [ DW_TAG_subrange_type ] [0, 2]
+!197 = metadata !{i32 786484, i32 0, null, metadata !"g_623", metadata !"g_623", metadata !"", metadata !5, i32 92, metadata !128, i32 1, i32 1, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }* @g_623, null} ; [ DW_TAG_variable ] [g_623] [line 92] [local] [def]
+!198 = metadata !{i32 786484, i32 0, null, metadata !"g_591", metadata !"g_591", metadata !"", metadata !5, i32 91, metadata !199, i32 1, i32 1, [10 x [8 x %union.U4]]* @g_591, null} ; [ DW_TAG_variable ] [g_591] [line 91] [local] [def]
+!199 = metadata !{i32 786433, null, null, metadata !"", i32 0, i64 2560, i64 32, i32 0, i32 0, metadata !85, metadata !200, i32 0, i32 0} ; [ DW_TAG_array_type ] [line 0, size 2560, align 32, offset 0] [from U4]
+!200 = metadata !{metadata !201, metadata !202}
+!201 = metadata !{i32 786465, i64 0, i64 10} ; [ DW_TAG_subrange_type ] [0, 9]
+!202 = metadata !{i32 786465, i64 0, i64 8} ; [ DW_TAG_subrange_type ] [0, 7]
+!203 = metadata !{i32 786484, i32 0, null, metadata !"g_575", metadata !"g_575", metadata !"", metadata !5, i32 90, metadata !32, i32 1, i32 1, i8* @g_575, null} ; [ DW_TAG_variable ] [g_575] [line 90] [local] [def]
+!204 = metadata !{i32 786484, i32 0, null, metadata !"g_557", metadata !"g_557", metadata !"", metadata !5, i32 89, metadata !77, i32 1, i32 1, i16* @g_557, null} ; [ DW_TAG_variable ] [g_557] [line 89] [local] [def]
+!205 = metadata !{i32 786484, i32 0, null, metadata !"g_538", metadata !"g_538", metadata !"", metadata !5, i32 88, metadata !45, i32 1, i32 1, i16* @g_538, null} ; [ DW_TAG_variable ] [g_538] [line 88] [local] [def]
+!206 = metadata !{i32 786484, i32 0, null, metadata !"g_535", metadata !"g_535", metadata !"", metadata !5, i32 87, metadata !207, i32 1, i32 1, [3 x [6 x [4 x i16]]]* @g_535, null} ; [ DW_TAG_variable ] [g_535] [line 87] [local] [def]
+!207 = metadata !{i32 786433, null, null, metadata !"", i32 0, i64 1152, i64 16, i32 0, i32 0, metadata !45, metadata !208, i32 0, i32 0} ; [ DW_TAG_array_type ] [line 0, size 1152, align 16, offset 0] [from uint16_t]
+!208 = metadata !{metadata !196, metadata !209, metadata !185}
+!209 = metadata !{i32 786465, i64 0, i64 6} ; [ DW_TAG_subrange_type ] [0, 5]
+!210 = metadata !{i32 786484, i32 0, null, metadata !"g_534", metadata !"g_534", metadata !"", metadata !5, i32 86, metadata !77, i32 1, i32 1, i16* @g_534, null} ; [ DW_TAG_variable ] [g_534] [line 86] [local] [def]
+!211 = metadata !{i32 786484, i32 0, null, metadata !"g_532", metadata !"g_532", metadata !"", metadata !5, i32 85, metadata !44, i32 1, i32 1, i32* @g_532, null} ; [ DW_TAG_variable ] [g_532] [line 85] [local] [def]
+!212 = metadata !{i32 786484, i32 0, null, metadata !"g_531", metadata !"g_531", metadata !"", metadata !5, i32 84, metadata !59, i32 1, i32 1, null, null}
+!213 = metadata !{i32 786484, i32 0, null, metadata !"g_525", metadata !"g_525", metadata !"", metadata !5, i32 82, metadata !155, i32 1, i32 1, null, null}
+!214 = metadata !{i32 786484, i32 0, null, metadata !"g_518", metadata !"g_518", metadata !"", metadata !5, i32 81, metadata !45, i32 1, i32 1, null, null}
+!215 = metadata !{i32 786484, i32 0, null, metadata !"g_467", metadata !"g_467", metadata !"", metadata !5, i32 80, metadata !32, i32 1, i32 1, i8* @g_467, null} ; [ DW_TAG_variable ] [g_467] [line 80] [local] [def]
+!216 = metadata !{i32 786484, i32 0, null, metadata !"g_466", metadata !"g_466", metadata !"", metadata !5, i32 79, metadata !59, i32 1, i32 1, null, null}
+!217 = metadata !{i32 786484, i32 0, null, metadata !"g_465", metadata !"g_465", metadata !"", metadata !5, i32 78, metadata !44, i32 1, i32 1, i32* @g_465, null} ; [ DW_TAG_variable ] [g_465] [line 78] [local] [def]
+!218 = metadata !{i32 786484, i32 0, null, metadata !"g_455", metadata !"g_455", metadata !"", metadata !5, i32 77, metadata !219, i32 1, i32 1, [1 x i16]* @g_455, null} ; [ DW_TAG_variable ] [g_455] [line 77] [local] [def]
+!219 = metadata !{i32 786433, null, null, metadata !"", i32 0, i64 16, i64 16, i32 0, i32 0, metadata !45, metadata !220, i32 0, i32 0} ; [ DW_TAG_array_type ] [line 0, size 16, align 16, offset 0] [from uint16_t]
+!220 = metadata !{metadata !221}
+!221 = metadata !{i32 786465, i64 0, i64 1} ; [ DW_TAG_subrange_type ] [0, 0]
+!222 = metadata !{i32 786484, i32 0, null, metadata !"g_454", metadata !"g_454", metadata !"", metadata !5, i32 76, metadata !44, i32 1, i32 1, null, null}
+!223 = metadata !{i32 786484, i32 0, null, metadata !"g_452", metadata !"g_452", metadata !"", metadata !5, i32 75, metadata !59, i32 1, i32 1, null, null}
+!224 = metadata !{i32 786484, i32 0, null, metadata !"g_404", metadata !"g_404", metadata !"", metadata !5, i32 74, metadata !225, i32 1, i32 1, [9 x [3 x [7 x %struct.S1]]]* @g_404, null} ; [ DW_TAG_variable ] [g_404] [line 74] [local] [def]
+!225 = metadata !{i32 786433, null, null, metadata !"", i32 0, i64 18144, i64 32, i32 0, i32 0, metadata !154, metadata !226, i32 0, i32 0} ; [ DW_TAG_array_type ] [line 0, size 18144, align 32, offset 0] [from ]
+!226 = metadata !{metadata !227, metadata !196, metadata !228}
+!227 = metadata !{i32 786465, i64 0, i64 9} ; [ DW_TAG_subrange_type ] [0, 8]
+!228 = metadata !{i32 786465, i64 0, i64 7} ; [ DW_TAG_subrange_type ] [0, 6]
+!229 = metadata !{i32 786484, i32 0, null, metadata !"g_398", metadata !"g_398", metadata !"", metadata !5, i32 73, metadata !32, i32 1, i32 1, null, null}
+!230 = metadata !{i32 786484, i32 0, null, metadata !"g_395", metadata !"g_395", metadata !"", metadata !5, i32 72, metadata !45, i32 1, i32 1, i16* @g_395, null} ; [ DW_TAG_variable ] [g_395] [line 72] [local] [def]
+!231 = metadata !{i32 786484, i32 0, null, metadata !"g_393", metadata !"g_393", metadata !"", metadata !5, i32 71, metadata !232, i32 1, i32 1, null, null}
+!232 = metadata !{i32 786433, null, null, metadata !"", i32 0, i64 48, i64 8, i32 0, i32 0, metadata !59, metadata !233, i32 0, i32 0} ; [ DW_TAG_array_type ] [line 0, size 48, align 8, offset 0] [from int8_t]
+!233 = metadata !{metadata !209}
+!234 = metadata !{i32 786484, i32 0, null, metadata !"g_345", metadata !"g_345", metadata !"", metadata !5, i32 70, metadata !235, i32 1, i32 1, [10 x [1 x %union.U4]]* @g_345, null} ; [ DW_TAG_variable ] [g_345] [line 70] [local] [def]
+!235 = metadata !{i32 786433, null, null, metadata !"", i32 0, i64 320, i64 32, i32 0, i32 0, metadata !85, metadata !236, i32 0, i32 0} ; [ DW_TAG_array_type ] [line 0, size 320, align 32, offset 0] [from U4]
+!236 = metadata !{metadata !201, metadata !221}
+!237 = metadata !{i32 786484, i32 0, null, metadata !"g_332", metadata !"g_332", metadata !"", metadata !5, i32 69, metadata !45, i32 1, i32 1, i16* @g_332, null} ; [ DW_TAG_variable ] [g_332] [line 69] [local] [def]
+!238 = metadata !{i32 786484, i32 0, null, metadata !"g_258", metadata !"g_258", metadata !"", metadata !5, i32 67, metadata !59, i32 1, i32 1, i8* @g_258, null} ; [ DW_TAG_variable ] [g_258] [line 67] [local] [def]
+!239 = metadata !{i32 786484, i32 0, null, metadata !"g_218", metadata !"g_218", metadata !"", metadata !5, i32 66, metadata !240, i32 1, i32 1, null, null}
+!240 = metadata !{i32 786470, null, null, metadata !"", i32 0, i64 0, i64 0, i64 0, i32 0, metadata !190} ; [ DW_TAG_const_type ] [line 0, size 0, align 0, offset 0] [from S2]
+!241 = metadata !{i32 786484, i32 0, null, metadata !"g_183", metadata !"g_183", metadata !"", metadata !5, i32 63, metadata !85, i32 1, i32 1, %union.U4* @g_183, null} ; [ DW_TAG_variable ] [g_183] [line 63] [local] [def]
+!242 = metadata !{i32 786484, i32 0, null, metadata !"g_110", metadata !"g_110", metadata !"", metadata !5, i32 61, metadata !190, i32 1, i32 1, { i8, i8, [2 x i8] }* @g_110, null} ; [ DW_TAG_variable ] [g_110] [line 61] [local] [def]
+!243 = metadata !{i32 786484, i32 0, null, metadata !"g_109", metadata !"g_109", metadata !"", metadata !5, i32 60, metadata !244, i32 1, i32 1, null, null}
+!244 = metadata !{i32 786470, null, null, metadata !"", i32 0, i64 0, i64 0, i64 0, i32 0, metadata !85} ; [ DW_TAG_const_type ] [line 0, size 0, align 0, offset 0] [from U4]
+!245 = metadata !{i32 786484, i32 0, null, metadata !"g_108", metadata !"g_108", metadata !"", metadata !5, i32 59, metadata !128, i32 1, i32 1, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }* @g_108, null} ; [ DW_TAG_variable ] [g_108] [line 59] [local] [def]
+!246 = metadata !{i32 786484, i32 0, null, metadata !"g_103", metadata !"g_103", metadata !"", metadata !5, i32 58, metadata !45, i32 1, i32 1, i16* @g_103, null} ; [ DW_TAG_variable ] [g_103] [line 58] [local] [def]
+!247 = metadata !{i32 786484, i32 0, null, metadata !"g_99", metadata !"g_99", metadata !"", metadata !5, i32 57, metadata !155, i32 1, i32 1, %struct.S1* @g_99, null} ; [ DW_TAG_variable ] [g_99] [line 57] [local] [def]
+!248 = metadata !{i32 786484, i32 0, null, metadata !"g_96", metadata !"g_96", metadata !"", metadata !5, i32 56, metadata !32, i32 1, i32 1, i8* @g_96, null} ; [ DW_TAG_variable ] [g_96] [line 56] [local] [def]
+!249 = metadata !{i32 786484, i32 0, null, metadata !"g_92", metadata !"g_92", metadata !"", metadata !5, i32 55, metadata !59, i32 1, i32 1, i8* @g_92, null} ; [ DW_TAG_variable ] [g_92] [line 55] [local] [def]
+!250 = metadata !{i32 786484, i32 0, null, metadata !"g_90", metadata !"g_90", metadata !"", metadata !5, i32 54, metadata !44, i32 1, i32 1, i32* @g_90, null} ; [ DW_TAG_variable ] [g_90] [line 54] [local] [def]
+!251 = metadata !{i32 786484, i32 0, null, metadata !"g_82", metadata !"g_82", metadata !"", metadata !5, i32 53, metadata !59, i32 1, i32 1, null, null}
+!252 = metadata !{i32 786484, i32 0, null, metadata !"g_52", metadata !"g_52", metadata !"", metadata !5, i32 52, metadata !44, i32 1, i32 1, i32* @g_52, null} ; [ DW_TAG_variable ] [g_52] [line 52] [local] [def]
+!253 = metadata !{i32 786484, i32 0, null, metadata !"g_49", metadata !"g_49", metadata !"", metadata !5, i32 51, metadata !254, i32 1, i32 1, [9 x %struct.S3]* @g_49, null} ; [ DW_TAG_variable ] [g_49] [line 51] [local] [def]
+!254 = metadata !{i32 786433, null, null, metadata !"", i32 0, i64 576, i64 32, i32 0, i32 0, metadata !37, metadata !255, i32 0, i32 0} ; [ DW_TAG_array_type ] [line 0, size 576, align 32, offset 0] [from S3]
+!255 = metadata !{metadata !227}
+!256 = metadata !{i32 786484, i32 0, null, metadata !"g_25", metadata !"g_25", metadata !"", metadata !5, i32 50, metadata !37, i32 1, i32 1, %struct.S3* @g_25, null} ; [ DW_TAG_variable ] [g_25] [line 50] [local] [def]
+!257 = metadata !{i32 786484, i32 0, null, metadata !"g_5", metadata !"g_5", metadata !"", metadata !5, i32 49, metadata !44, i32 1, i32 1, i32* @g_5, null} ; [ DW_TAG_variable ] [g_5] [line 49] [local] [def]
+!258 = metadata !{i32 786484, i32 0, null, metadata !"crc32_tab", metadata !"crc32_tab", metadata !"", metadata !21, i32 45, metadata !259, i32 1, i32 1, [256 x i32]* @crc32_tab, null} ; [ DW_TAG_variable ] [crc32_tab] [line 45] [local] [def]
+!259 = metadata !{i32 786433, null, null, metadata !"", i32 0, i64 8192, i64 32, i32 0, i32 0, metadata !17, metadata !260, i32 0, i32 0} ; [ DW_TAG_array_type ] [line 0, size 8192, align 32, offset 0] [from uint32_t]
+!260 = metadata !{metadata !261}
+!261 = metadata !{i32 786465, i64 0, i64 256} ; [ DW_TAG_subrange_type ] [0, 255]
+!262 = metadata !{i32 786484, i32 0, null, metadata !"g_692", metadata !"g_692", metadata !"", metadata !5, i32 96, metadata !50, i32 1, i32 1, null, null}
+!263 = metadata !{i32 786484, i32 0, metadata !41, metadata !"l_1216", metadata !"l_1216", metadata !"", metadata !5, i32 151, metadata !264, i32 1, i32 1, null, null}
+!264 = metadata !{i32 786433, null, null, metadata !"", i32 0, i64 192, i64 32, i32 0, i32 0, metadata !240, metadata !233, i32 0, i32 0} ; [ DW_TAG_array_type ] [line 0, size 192, align 32, offset 0] [from ]
+!265 = metadata !{i32 786484, i32 0, null, metadata !"g_1182", metadata !"g_1182", metadata !"", metadata !5, i32 107, metadata !266, i32 1, i32 1, i32**** @g_1182, null} ; [ DW_TAG_variable ] [g_1182] [line 107] [local] [def]
+!266 = metadata !{i32 786447, null, null, metadata !"", i32 0, i64 32, i64 32, i64 0, i32 0, metadata !267} ; [ DW_TAG_pointer_type ] [line 0, size 32, align 32, offset 0] [from ]
+!267 = metadata !{i32 786447, null, null, metadata !"", i32 0, i64 32, i64 32, i64 0, i32 0, metadata !50} ; [ DW_TAG_pointer_type ] [line 0, size 32, align 32, offset 0] [from ]
+!268 = metadata !{i32 786484, i32 0, null, metadata !"g_1183", metadata !"g_1183", metadata !"", metadata !5, i32 106, metadata !267, i32 1, i32 1, i32*** @g_1183, null} ; [ DW_TAG_variable ] [g_1183] [line 106] [local] [def]
+!269 = metadata !{i32 786484, i32 0, null, metadata !"g_680", metadata !"g_680", metadata !"", metadata !5, i32 93, metadata !270, i32 1, i32 1, [3 x [9 x i32*]]* @g_680, null} ; [ DW_TAG_variable ] [g_680] [line 93] [local] [def]
+!270 = metadata !{i32 786433, null, null, metadata !"", i32 0, i64 864, i64 32, i32 0, i32 0, metadata !50, metadata !271, i32 0, i32 0} ; [ DW_TAG_array_type ] [line 0, size 864, align 32, offset 0] [from ]
+!271 = metadata !{metadata !196, metadata !227}
+!272 = metadata !{i32 786484, i32 0, null, metadata !"g_165", metadata !"g_165", metadata !"", metadata !5, i32 62, metadata !273, i32 1, i32 1, null, null}
+!273 = metadata !{i32 786447, null, null, metadata !"", i32 0, i64 32, i64 32, i64 0, i32 0, metadata !45} ; [ DW_TAG_pointer_type ] [line 0, size 32, align 32, offset 0] [from uint16_t]
+!274 = metadata !{i32 786484, i32 0, null, metadata !"g_524", metadata !"g_524", metadata !"", metadata !5, i32 83, metadata !275, i32 1, i32 1, [2 x [8 x [6 x %struct.S1*]]]* @g_524, null} ; [ DW_TAG_variable ] [g_524] [line 83] [local] [def]
+!275 = metadata !{i32 786433, null, null, metadata !"", i32 0, i64 3072, i64 32, i32 0, i32 0, metadata !276, metadata !277, i32 0, i32 0} ; [ DW_TAG_array_type ] [line 0, size 3072, align 32, offset 0] [from ]
+!276 = metadata !{i32 786447, null, null, metadata !"", i32 0, i64 32, i64 32, i64 0, i32 0, metadata !154} ; [ DW_TAG_pointer_type ] [line 0, size 32, align 32, offset 0] [from ]
+!277 = metadata !{metadata !278, metadata !202, metadata !209}
+!278 = metadata !{i32 786465, i64 0, i64 2} ; [ DW_TAG_subrange_type ] [0, 1]
+!279 = metadata !{i32 786484, i32 0, null, metadata !"g_304", metadata !"g_304", metadata !"", metadata !5, i32 68, metadata !50, i32 1, i32 1, i32** @g_304, null} ; [ DW_TAG_variable ] [g_304] [line 68] [local] [def]
+!280 = metadata !{i32 786484, i32 0, null, metadata !"g_1184", metadata !"g_1184", metadata !"", metadata !5, i32 108, metadata !266, i32 1, i32 1, null, null}
+!281 = metadata !{i32 786484, i32 0, null, metadata !"g_1175", metadata !"g_1175", metadata !"", metadata !5, i32 105, metadata !282, i32 1, i32 1, null, null}
+!282 = metadata !{i32 786447, null, null, metadata !"", i32 0, i64 32, i64 32, i64 0, i32 0, metadata !283} ; [ DW_TAG_pointer_type ] [line 0, size 32, align 32, offset 0] [from ]
+!283 = metadata !{i32 786470, null, null, metadata !"", i32 0, i64 0, i64 0, i64 0, i32 0, metadata !267} ; [ DW_TAG_const_type ] [line 0, size 0, align 0, offset 0] [from ]
+!284 = metadata !{i32 786484, i32 0, null, metadata !"g_191", metadata !"g_191", metadata !"", metadata !5, i32 65, metadata !285, i32 1, i32 1, null, null}
+!285 = metadata !{i32 786447, null, null, metadata !"", i32 0, i64 32, i64 32, i64 0, i32 0, metadata !286} ; [ DW_TAG_pointer_type ] [line 0, size 32, align 32, offset 0] [from ]
+!286 = metadata !{i32 786447, null, null, metadata !"", i32 0, i64 32, i64 32, i64 0, i32 0, metadata !240} ; [ DW_TAG_pointer_type ] [line 0, size 32, align 32, offset 0] [from ]
+!287 = metadata !{i32 786484, i32 0, null, metadata !"g_1170", metadata !"g_1170", metadata !"", metadata !5, i32 104, metadata !288, i32 1, i32 1, null, null}
+!288 = metadata !{i32 786447, null, null, metadata !"", i32 0, i64 32, i64 32, i64 0, i32 0, metadata !37} ; [ DW_TAG_pointer_type ] [line 0, size 32, align 32, offset 0] [from S3]
+!289 = metadata !{i32 786484, i32 0, null, metadata !"g_966", metadata !"g_966", metadata !"", metadata !5, i32 99, metadata !290, i32 1, i32 1, null, null}
+!290 = metadata !{i32 786470, null, null, metadata !"", i32 0, i64 0, i64 0, i64 0, i32 0, metadata !288} ; [ DW_TAG_const_type ] [line 0, size 0, align 0, offset 0] [from ]
+!291 = metadata !{i32 786484, i32 0, metadata !148, metadata !"l_167", metadata !"l_167", metadata !"", metadata !5, i32 630, metadata !154, i32 1, i32 1, %struct.S1* @func_31.l_167, null} ; [ DW_TAG_variable ] [l_167] [line 630] [local] [def]
+!292 = metadata !{i32 786484, i32 0, metadata !5, metadata !"l_242", metadata !"l_242", metadata !"l_242", metadata !5, i32 749, metadata !88, i32 1, i32 1, i32 0, null} ; [ DW_TAG_variable ] [l_242] [line 749] [local] [def]
+!293 = metadata !{i32 786484, i32 0, metadata !5, metadata !"l_374", metadata !"l_374", metadata !"l_374", metadata !5, i32 886, metadata !88, i32 1, i32 1, i32 388483030, null} ; [ DW_TAG_variable ] [l_374] [line 886] [local] [def]
+!294 = metadata !{i32 786484, i32 0, metadata !169, metadata !"l_830", metadata !"l_830", metadata !"", metadata !5, i32 370, metadata !295, i32 1, i32 1, null, null}
+!295 = metadata !{i32 786433, null, null, metadata !"", i32 0, i64 192, i64 32, i32 0, i32 0, metadata !296, metadata !233, i32 0, i32 0} ; [ DW_TAG_array_type ] [line 0, size 192, align 32, offset 0] [from ]
+!296 = metadata !{i32 786470, null, null, metadata !"", i32 0, i64 0, i64 0, i64 0, i32 0, metadata !297} ; [ DW_TAG_const_type ] [line 0, size 0, align 0, offset 0] [from ]
+!297 = metadata !{i32 786447, null, null, metadata !"", i32 0, i64 32, i64 32, i64 0, i32 0, metadata !273} ; [ DW_TAG_pointer_type ] [line 0, size 32, align 32, offset 0] [from ]
+!298 = metadata !{i32 786484, i32 0, null, metadata !"g_192", metadata !"g_192", metadata !"", metadata !5, i32 64, metadata !299, i32 1, i32 1, [6 x [10 x %struct.S2*]]* @g_192, null} ; [ DW_TAG_variable ] [g_192] [line 64] [local] [def]
+!299 = metadata !{i32 786433, null, null, metadata !"", i32 0, i64 1920, i64 32, i32 0, i32 0, metadata !286, metadata !300, i32 0, i32 0} ; [ DW_TAG_array_type ] [line 0, size 1920, align 32, offset 0] [from ]
+!300 = metadata !{metadata !209, metadata !201}
+!301 = metadata !{i32 786484, i32 0, metadata !21, metadata !"poly", metadata !"poly", metadata !"poly", metadata !21, i32 52, metadata !158, i32 1, i32 1, i32 -306674912, null} ; [ DW_TAG_variable ] [poly] [line 52] [local] [def]
+!302 = metadata !{i32 786689, metadata !4, metadata !"argc", metadata !5, i32 16778273, metadata !8, i32 0, i32 0} ; [ DW_TAG_arg_variable ] [argc] [line 1057]
+!303 = metadata !{i32 1057, i32 0, metadata !4, null}
+!304 = metadata !{i32 786689, metadata !4, metadata !"argv", metadata !5, i32 33555489, metadata !9, i32 0, i32 0} ; [ DW_TAG_arg_variable ] [argv] [line 1057]
+!305 = metadata !{i32 786688, metadata !4, metadata !"print_hash_value", metadata !5, i32 1060, metadata !8, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [print_hash_value] [line 1060]
+!306 = metadata !{i32 1060, i32 0, metadata !4, null}
+!307 = metadata !{i32 1061, i32 0, metadata !4, null}
+!308 = metadata !{i32 1}
+!309 = metadata !{i32 1063, i32 0, metadata !4, null}
+!310 = metadata !{i32 1064, i32 0, metadata !4, null}
+!311 = metadata !{i32 1065, i32 0, metadata !4, null}
+!312 = metadata !{i32 1066, i32 0, metadata !4, null}
+!313 = metadata !{i32 1067, i32 0, metadata !4, null}
+!314 = metadata !{i32 786688, metadata !4, metadata !"i", metadata !5, i32 1059, metadata !8, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [i] [line 1059]
+!315 = metadata !{i32 1068, i32 0, metadata !316, null}
+!316 = metadata !{i32 786443, metadata !1, metadata !4, i32 1068, i32 0, i32 0} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/newfail1.c]
+!317 = metadata !{i32 1072, i32 0, metadata !318, null}
+!318 = metadata !{i32 786443, metadata !1, metadata !316, i32 1069, i32 0, i32 1} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/newfail1.c]
+!319 = metadata !{i32 1070, i32 0, metadata !318, null}
+!320 = metadata !{i32 1071, i32 0, metadata !318, null}
+!321 = metadata !{i32 1075, i32 0, metadata !4, null}
+!322 = metadata !{i32 1076, i32 0, metadata !4, null}
+!323 = metadata !{i32 1077, i32 0, metadata !4, null}
+!324 = metadata !{i32 1078, i32 0, metadata !4, null}
+!325 = metadata !{i32 1079, i32 0, metadata !4, null}
+!326 = metadata !{i32 1080, i32 0, metadata !4, null}
+!327 = metadata !{i32 1081, i32 0, metadata !4, null}
+!328 = metadata !{i32 1082, i32 0, metadata !4, null}
+!329 = metadata !{i32 1083, i32 0, metadata !4, null}
+!330 = metadata !{i32 1084, i32 0, metadata !4, null}
+!331 = metadata !{i32 1085, i32 0, metadata !4, null}
+!332 = metadata !{i32 1086, i32 0, metadata !4, null}
+!333 = metadata !{i32 1087, i32 0, metadata !4, null}
+!334 = metadata !{i32 1088, i32 0, metadata !4, null}
+!335 = metadata !{i32 1089, i32 0, metadata !4, null}
+!336 = metadata !{i32 1090, i32 0, metadata !4, null}
+!337 = metadata !{i32 1091, i32 0, metadata !4, null}
+!338 = metadata !{i32 1092, i32 0, metadata !4, null}
+!339 = metadata !{i32 1093, i32 0, metadata !4, null}
+!340 = metadata !{i32 1094, i32 0, metadata !4, null}
+!341 = metadata !{i32 1095, i32 0, metadata !4, null}
+!342 = metadata !{i32 1096, i32 0, metadata !4, null}
+!343 = metadata !{i32 1097, i32 0, metadata !4, null}
+!344 = metadata !{i32 1098, i32 0, metadata !345, null}
+!345 = metadata !{i32 786443, metadata !1, metadata !4, i32 1098, i32 0, i32 2} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/newfail1.c]
+!346 = metadata !{i32 1103, i32 0, metadata !347, null}
+!347 = metadata !{i32 786443, metadata !1, metadata !348, i32 1101, i32 0, i32 5} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/newfail1.c]
+!348 = metadata !{i32 786443, metadata !1, metadata !349, i32 1100, i32 0, i32 4} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/newfail1.c]
+!349 = metadata !{i32 786443, metadata !1, metadata !345, i32 1099, i32 0, i32 3} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/newfail1.c]
+!350 = metadata !{i32 1102, i32 0, metadata !347, null}
+!351 = metadata !{i32 1110, i32 0, metadata !352, null}
+!352 = metadata !{i32 786443, metadata !1, metadata !353, i32 1108, i32 0, i32 7} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/newfail1.c]
+!353 = metadata !{i32 786443, metadata !1, metadata !4, i32 1107, i32 0, i32 6} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/newfail1.c]
+!354 = metadata !{i32 1109, i32 0, metadata !352, null}
+!355 = metadata !{i32 1107, i32 0, metadata !353, null}
+!356 = metadata !{i32 1119, i32 0, metadata !357, null}
+!357 = metadata !{i32 786443, metadata !1, metadata !358, i32 1119, i32 0, i32 12} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/newfail1.c]
+!358 = metadata !{i32 786443, metadata !1, metadata !359, i32 1118, i32 0, i32 11} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/newfail1.c]
+!359 = metadata !{i32 786443, metadata !1, metadata !360, i32 1117, i32 0, i32 10} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/newfail1.c]
+!360 = metadata !{i32 786443, metadata !1, metadata !361, i32 1116, i32 0, i32 9} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/newfail1.c]
+!361 = metadata !{i32 786443, metadata !1, metadata !4, i32 1115, i32 0, i32 8} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/newfail1.c]
+!362 = metadata !{i32 1121, i32 0, metadata !363, null}
+!363 = metadata !{i32 786443, metadata !1, metadata !357, i32 1120, i32 0, i32 13} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/newfail1.c]
+!364 = metadata !{i32 1122, i32 0, metadata !363, null}
+!365 = metadata !{i32 1123, i32 0, metadata !363, null}
+!366 = metadata !{i32 1124, i32 0, metadata !363, null}
+!367 = metadata !{i32 1125, i32 0, metadata !363, null}
+!368 = metadata !{i32 786688, metadata !4, metadata !"k", metadata !5, i32 1059, metadata !8, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [k] [line 1059]
+!369 = metadata !{i32 1130, i32 0, metadata !4, null}
+!370 = metadata !{i32 1131, i32 0, metadata !4, null}
+!371 = metadata !{i32 1132, i32 0, metadata !372, null}
+!372 = metadata !{i32 786443, metadata !1, metadata !4, i32 1132, i32 0, i32 14} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/newfail1.c]
+!373 = metadata !{i32 1135, i32 0, metadata !374, null}
+!374 = metadata !{i32 786443, metadata !1, metadata !372, i32 1133, i32 0, i32 15} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/newfail1.c]
+!375 = metadata !{i32 1134, i32 0, metadata !374, null}
+!376 = metadata !{i32 1138, i32 0, metadata !4, null}
+!377 = metadata !{i32 1139, i32 0, metadata !4, null}
+!378 = metadata !{i32 1140, i32 0, metadata !4, null}
+!379 = metadata !{i32 1141, i32 0, metadata !4, null}
+!380 = metadata !{i32 1142, i32 0, metadata !4, null}
+!381 = metadata !{i32 1143, i32 0, metadata !4, null}
+!382 = metadata !{i32 1144, i32 0, metadata !4, null}
+!383 = metadata !{i32 1145, i32 0, metadata !4, null}
+!384 = metadata !{i32 1146, i32 0, metadata !4, null}
+!385 = metadata !{i32 1147, i32 0, metadata !4, null}
+!386 = metadata !{i32 1148, i32 0, metadata !4, null}
+!387 = metadata !{i32 1149, i32 0, metadata !388, null}
+!388 = metadata !{i32 786443, metadata !1, metadata !4, i32 1149, i32 0, i32 16} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/newfail1.c]
+!389 = metadata !{i32 1156, i32 0, metadata !390, null}
+!390 = metadata !{i32 786443, metadata !1, metadata !391, i32 1154, i32 0, i32 21} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/newfail1.c]
+!391 = metadata !{i32 786443, metadata !1, metadata !392, i32 1153, i32 0, i32 20} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/newfail1.c]
+!392 = metadata !{i32 786443, metadata !1, metadata !393, i32 1152, i32 0, i32 19} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/newfail1.c]
+!393 = metadata !{i32 786443, metadata !1, metadata !394, i32 1151, i32 0, i32 18} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/newfail1.c]
+!394 = metadata !{i32 786443, metadata !1, metadata !388, i32 1150, i32 0, i32 17} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/newfail1.c]
+!395 = metadata !{i32 1151, i32 0, metadata !393, null}
+!396 = metadata !{i32 1155, i32 0, metadata !390, null}
+!397 = metadata !{i32 1153, i32 0, metadata !391, null}
+!398 = metadata !{i32 1161, i32 0, metadata !4, null}
+!399 = metadata !{i32 1162, i32 0, metadata !4, null}
+!400 = metadata !{i32 1163, i32 0, metadata !4, null}
+!401 = metadata !{i32 1164, i32 0, metadata !402, null}
+!402 = metadata !{i32 786443, metadata !1, metadata !4, i32 1164, i32 0, i32 22} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/newfail1.c]
+!403 = metadata !{i32 1169, i32 0, metadata !404, null}
+!404 = metadata !{i32 786443, metadata !1, metadata !405, i32 1167, i32 0, i32 25} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/newfail1.c]
+!405 = metadata !{i32 786443, metadata !1, metadata !406, i32 1166, i32 0, i32 24} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/newfail1.c]
+!406 = metadata !{i32 786443, metadata !1, metadata !402, i32 1165, i32 0, i32 23} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/newfail1.c]
+!407 = metadata !{i32 1168, i32 0, metadata !404, null}
+!408 = metadata !{i32 786688, metadata !4, metadata !"j", metadata !5, i32 1059, metadata !8, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [j] [line 1059]
+!409 = metadata !{i32 1166, i32 0, metadata !405, null}
+!410 = metadata !{i32 1173, i32 0, metadata !4, null}
+!411 = metadata !{i32 1174, i32 0, metadata !4, null}
+!412 = metadata !{i32 1175, i32 0, metadata !4, null}
+!413 = metadata !{i32 1176, i32 0, metadata !4, null}
+!414 = metadata !{i32 1177, i32 0, metadata !4, null}
+!415 = metadata !{i32 1178, i32 0, metadata !4, null}
+!416 = metadata !{i32 1179, i32 0, metadata !4, null}
+!417 = metadata !{i32 1180, i32 0, metadata !418, null}
+!418 = metadata !{i32 786443, metadata !1, metadata !4, i32 1180, i32 0, i32 26} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/newfail1.c]
+!419 = metadata !{i32 1185, i32 0, metadata !420, null}
+!420 = metadata !{i32 786443, metadata !1, metadata !421, i32 1183, i32 0, i32 29} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/newfail1.c]
+!421 = metadata !{i32 786443, metadata !1, metadata !422, i32 1182, i32 0, i32 28} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/newfail1.c]
+!422 = metadata !{i32 786443, metadata !1, metadata !418, i32 1181, i32 0, i32 27} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/newfail1.c]
+!423 = metadata !{i32 1184, i32 0, metadata !420, null}
+!424 = metadata !{i32 1182, i32 0, metadata !421, null}
+!425 = metadata !{i32 1189, i32 0, metadata !4, null}
+!426 = metadata !{i32 1190, i32 0, metadata !4, null}
+!427 = metadata !{i32 1191, i32 0, metadata !4, null}
+!428 = metadata !{i32 1192, i32 0, metadata !429, null}
+!429 = metadata !{i32 786443, metadata !1, metadata !4, i32 1192, i32 0, i32 30} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/newfail1.c]
+!430 = metadata !{i32 1197, i32 0, metadata !431, null}
+!431 = metadata !{i32 786443, metadata !1, metadata !432, i32 1195, i32 0, i32 33} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/newfail1.c]
+!432 = metadata !{i32 786443, metadata !1, metadata !433, i32 1194, i32 0, i32 32} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/newfail1.c]
+!433 = metadata !{i32 786443, metadata !1, metadata !429, i32 1193, i32 0, i32 31} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/newfail1.c]
+!434 = metadata !{i32 1196, i32 0, metadata !431, null}
+!435 = metadata !{i32 1194, i32 0, metadata !432, null}
+!436 = metadata !{i32 1201, i32 0, metadata !4, null}
+!437 = metadata !{i32 1202, i32 0, metadata !4, null}
+!438 = metadata !{i32 1117, i32 0, metadata !359, null}
+!439 = metadata !{i32 1115, i32 0, metadata !361, null}
+!440 = metadata !{i32 1113, i32 0, metadata !4, null}
+!441 = metadata !{i32 1114, i32 0, metadata !4, null}
+!442 = metadata !{i32 -306674912}
+!443 = metadata !{i32 786688, metadata !444, metadata !"poly", metadata !21, i32 52, metadata !158, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [poly] [line 52]
+!444 = metadata !{i32 786443, metadata !18, metadata !176} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/./csmith.h]
+!445 = metadata !{i32 52, i32 0, metadata !444, null}
+!446 = metadata !{i32 786688, metadata !444, metadata !"i", metadata !21, i32 53, metadata !8, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [i] [line 53]
+!447 = metadata !{i32 55, i32 0, metadata !448, null}
+!448 = metadata !{i32 786443, metadata !18, metadata !444, i32 55, i32 0, i32 165} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/./csmith.h]
+!449 = metadata !{i32 58, i32 0, metadata !450, null} ; [ DW_TAG_imported_module ]
+!450 = metadata !{i32 786443, metadata !18, metadata !451, i32 57, i32 0, i32 168} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/./csmith.h]
+!451 = metadata !{i32 786443, metadata !18, metadata !452, i32 57, i32 0, i32 167} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/./csmith.h]
+!452 = metadata !{i32 786443, metadata !18, metadata !448, i32 55, i32 0, i32 166} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/./csmith.h]
+!453 = metadata !{i32 59, i32 0, metadata !454, null}
+!454 = metadata !{i32 786443, metadata !18, metadata !450, i32 58, i32 0, i32 169} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/./csmith.h]
+!455 = metadata !{i32 786688, metadata !444, metadata !"crc", metadata !21, i32 51, metadata !17, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [crc] [line 51]
+!456 = metadata !{i32 7}
+!457 = metadata !{i32 786688, metadata !444, metadata !"j", metadata !21, i32 53, metadata !8, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [j] [line 53]
+!458 = metadata !{i32 57, i32 0, metadata !451, null}
+!459 = metadata !{i32 64, i32 0, metadata !452, null}
+!460 = metadata !{i32 66, i32 0, metadata !444, null}
+!461 = metadata !{i32 1101644307}
+!462 = metadata !{i32 786688, metadata !463, metadata !"l_6", metadata !5, i32 132, metadata !17, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_6] [line 132]
+!463 = metadata !{i32 786443, metadata !1, metadata !34} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/newfail1.c]
+!464 = metadata !{i32 132, i32 0, metadata !463, null}
+!465 = metadata !{%struct.S3* @func_1.l_1252}
+!466 = metadata !{i32 786688, metadata !463, metadata !"l_1252", metadata !5, i32 133, metadata !37, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_1252] [line 133]
+!467 = metadata !{i32 133, i32 0, metadata !463, null}
+!468 = metadata !{i32 134, i32 0, metadata !463, null}
+!469 = metadata !{i32 135, i32 0, metadata !463, null}
+!470 = metadata !{i32 786689, metadata !20, metadata !"val", metadata !21, i32 16777324, metadata !24, i32 0, i32 0} ; [ DW_TAG_arg_variable ] [val] [line 108]
+!471 = metadata !{i32 108, i32 0, metadata !20, null}
+!472 = metadata !{i32 786689, metadata !20, metadata !"vname", metadata !21, i32 33554540, metadata !10, i32 0, i32 0} ; [ DW_TAG_arg_variable ] [vname] [line 108]
+!473 = metadata !{i32 786689, metadata !20, metadata !"flag", metadata !21, i32 50331756, metadata !8, i32 0, i32 0} ; [ DW_TAG_arg_variable ] [flag] [line 108]
+!474 = metadata !{i32 110, i32 0, metadata !475, null}
+!475 = metadata !{i32 786443, metadata !18, metadata !20} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/./csmith.h]
+!476 = metadata !{i32 111, i32 0, metadata !475, null}
+!477 = metadata !{i32 112, i32 0, metadata !478, null}
+!478 = metadata !{i32 786443, metadata !18, metadata !475, i32 111, i32 0, i32 34} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/./csmith.h]
+!479 = metadata !{i32 113, i32 0, metadata !478, null}
+!480 = metadata !{i32 114, i32 0, metadata !475, null}
+!481 = metadata !{i32 786689, metadata !12, metadata !"flag", metadata !14, i32 33554482, metadata !8, i32 0, i32 0} ; [ DW_TAG_arg_variable ] [flag] [line 50]
+!482 = metadata !{i32 50, i32 0, metadata !12, null}
+!483 = metadata !{i32 55, i32 0, metadata !484, null}
+!484 = metadata !{i32 786443, metadata !13, metadata !12} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/./platform_generic.h]
+!485 = metadata !{i32 117, i32 0, metadata !484, null}
+!486 = metadata !{i32 786689, metadata !26, metadata !"val", metadata !21, i32 16777311, metadata !24, i32 0, i32 0} ; [ DW_TAG_arg_variable ] [val] [line 95]
+!487 = metadata !{i32 95, i32 0, metadata !26, null}
+!488 = metadata !{i32 97, i32 0, metadata !26, null}
+!489 = metadata !{i32 98, i32 0, metadata !26, null}
+!490 = metadata !{i32 99, i32 0, metadata !26, null}
+!491 = metadata !{i32 100, i32 0, metadata !26, null}
+!492 = metadata !{i32 101, i32 0, metadata !26, null}
+!493 = metadata !{i32 102, i32 0, metadata !26, null}
+!494 = metadata !{i32 103, i32 0, metadata !26, null}
+!495 = metadata !{i32 104, i32 0, metadata !26, null}
+!496 = metadata !{i32 105, i32 0, metadata !26, null}
+!497 = metadata !{i32 786689, metadata !29, metadata !"b", metadata !21, i32 16777285, metadata !32, i32 0, i32 0} ; [ DW_TAG_arg_variable ] [b] [line 69]
+!498 = metadata !{i32 69, i32 0, metadata !29, null}
+!499 = metadata !{i32 70, i32 0, metadata !29, null}
+!500 = metadata !{i32 73, i32 0, metadata !29, null}
+!501 = metadata !{i16 -15853}
+!502 = metadata !{i32 786689, metadata !41, metadata !"p_4", metadata !5, i32 33554576, metadata !45, i32 0, i32 0} ; [ DW_TAG_arg_variable ] [p_4] [line 144]
+!503 = metadata !{i32 144, i32 0, metadata !41, null}
+!504 = metadata !{i32 -3}
+!505 = metadata !{i32 786688, metadata !41, metadata !"l_13", metadata !5, i32 146, metadata !17, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_13] [line 146]
+!506 = metadata !{i32 146, i32 0, metadata !41, null}
+!507 = metadata !{%struct.S1* undef}
+!508 = metadata !{i32 786688, metadata !41, metadata !"l_1192", metadata !5, i32 147, metadata !155, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_1192] [line 147]
+!509 = metadata !{i32 147, i32 0, metadata !41, null}
+!510 = metadata !{i32 -883922836}
+!511 = metadata !{i32 786688, metadata !41, metadata !"l_1195", metadata !5, i32 148, metadata !17, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_1195] [line 148]
+!512 = metadata !{i32 148, i32 0, metadata !41, null}
+!513 = metadata !{%union.U4* getelementptr inbounds ([10 x [1 x %union.U4]]* @g_345, i32 0, i32 6, i32 0)}
+!514 = metadata !{i32 786688, metadata !41, metadata !"l_1201", metadata !5, i32 149, metadata !515, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_1201] [line 149]
+!515 = metadata !{i32 786447, null, null, metadata !"", i32 0, i64 32, i64 32, i64 0, i32 0, metadata !85} ; [ DW_TAG_pointer_type ] [line 0, size 32, align 32, offset 0] [from U4]
+!516 = metadata !{i32 149, i32 0, metadata !41, null}
+!517 = metadata !{i32* @g_1055}
+!518 = metadata !{i32 786688, metadata !41, metadata !"l_1217", metadata !5, i32 152, metadata !50, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_1217] [line 152]
+!519 = metadata !{i32 152, i32 0, metadata !41, null}
+!520 = metadata !{i32* @g_532}
+!521 = metadata !{i32 786688, metadata !41, metadata !"l_1219", metadata !5, i32 154, metadata !50, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_1219] [line 154]
+!522 = metadata !{i32 154, i32 0, metadata !41, null}
+!523 = metadata !{i32* @g_90}
+!524 = metadata !{i32 786688, metadata !41, metadata !"l_1225", metadata !5, i32 155, metadata !167, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_1225] [line 155]
+!525 = metadata !{i32 155, i32 0, metadata !41, null}
+!526 = metadata !{%struct.S0* bitcast ({ i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }* @func_2.l_1232 to %struct.S0*)}
+!527 = metadata !{i32 786688, metadata !41, metadata !"l_1232", metadata !5, i32 159, metadata !128, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_1232] [line 159]
+!528 = metadata !{i32 159, i32 0, metadata !41, null}
+!529 = metadata !{[3 x [7 x i32]]* undef}
+!530 = metadata !{i32 786688, metadata !41, metadata !"l_1235", metadata !5, i32 160, metadata !531, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_1235] [line 160]
+!531 = metadata !{i32 786433, null, null, metadata !"", i32 0, i64 672, i64 32, i32 0, i32 0, metadata !17, metadata !532, i32 0, i32 0} ; [ DW_TAG_array_type ] [line 0, size 672, align 32, offset 0] [from uint32_t]
+!532 = metadata !{metadata !196, metadata !228}
+!533 = metadata !{i32 160, i32 0, metadata !41, null}
+!534 = metadata !{i32 -1251538840}
+!535 = metadata !{i32 786688, metadata !41, metadata !"l_1244", metadata !5, i32 162, metadata !88, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_1244] [line 162]
+!536 = metadata !{i32 162, i32 0, metadata !41, null}
+!537 = metadata !{[10 x %struct.S3]* @func_2.l_1247}
+!538 = metadata !{i32 786688, metadata !41, metadata !"l_1247", metadata !5, i32 163, metadata !539, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_1247] [line 163]
+!539 = metadata !{i32 786433, null, null, metadata !"", i32 0, i64 640, i64 32, i32 0, i32 0, metadata !37, metadata !540, i32 0, i32 0} ; [ DW_TAG_array_type ] [line 0, size 640, align 32, offset 0] [from S3]
+!540 = metadata !{metadata !201}
+!541 = metadata !{i32 163, i32 0, metadata !41, null}
+!542 = metadata !{i32* getelementptr inbounds (%struct.S0* bitcast ({ i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }* @g_623 to %struct.S0*), i32 0, i32 0)}
+!543 = metadata !{i32 786688, metadata !41, metadata !"l_1248", metadata !5, i32 164, metadata !50, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_1248] [line 164]
+!544 = metadata !{i32 164, i32 0, metadata !41, null}
+!545 = metadata !{i32 166, i32 0, metadata !41, null}
+!546 = metadata !{i32 168, i32 0, metadata !41, null}
+!547 = metadata !{%struct.S2** null}
+!548 = metadata !{i32 786688, metadata !549, metadata !"l_1243", metadata !5, i32 170, metadata !550, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_1243] [line 170]
+!549 = metadata !{i32 786443, metadata !1, metadata !41, i32 169, i32 0, i32 35} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/newfail1.c]
+!550 = metadata !{i32 786447, null, null, metadata !"", i32 0, i64 32, i64 32, i64 0, i32 0, metadata !551} ; [ DW_TAG_pointer_type ] [line 0, size 32, align 32, offset 0] [from ]
+!551 = metadata !{i32 786447, null, null, metadata !"", i32 0, i64 32, i64 32, i64 0, i32 0, metadata !190} ; [ DW_TAG_pointer_type ] [line 0, size 32, align 32, offset 0] [from S2]
+!552 = metadata !{i32 170, i32 0, metadata !549, null}
+!553 = metadata !{%union.U4* getelementptr inbounds ([10 x [8 x %union.U4]]* @g_591, i32 0, i32 3, i32 4)}
+!554 = metadata !{i32 786688, metadata !549, metadata !"l_1245", metadata !5, i32 171, metadata !515, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_1245] [line 171]
+!555 = metadata !{i32 171, i32 0, metadata !549, null}
+!556 = metadata !{i32 -1}
+!557 = metadata !{i32 786688, metadata !549, metadata !"l_1246", metadata !5, i32 172, metadata !44, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_1246] [line 172]
+!558 = metadata !{i32 172, i32 0, metadata !549, null}
+!559 = metadata !{i32 174, i32 0, metadata !549, null}
+!560 = metadata !{i32 175, i32 0, metadata !549, null}
+!561 = metadata !{i32 176, i32 0, metadata !549, null}
+!562 = metadata !{%struct.S3* @func_2.l_1249}
+!563 = metadata !{i32 786688, metadata !564, metadata !"l_1249", metadata !5, i32 179, metadata !37, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_1249] [line 179]
+!564 = metadata !{i32 786443, metadata !1, metadata !41, i32 178, i32 0, i32 36} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/newfail1.c]
+!565 = metadata !{i32 179, i32 0, metadata !564, null}
+!566 = metadata !{%struct.S3* null}
+!567 = metadata !{i32 786688, metadata !564, metadata !"l_1250", metadata !5, i32 180, metadata !288, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_1250] [line 180]
+!568 = metadata !{i32 180, i32 0, metadata !564, null}
+!569 = metadata !{[7 x [8 x [1 x %struct.S3*]]]* undef}
+!570 = metadata !{i32 786688, metadata !564, metadata !"l_1251", metadata !5, i32 181, metadata !571, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_1251] [line 181]
+!571 = metadata !{i32 786433, null, null, metadata !"", i32 0, i64 1792, i64 32, i32 0, i32 0, metadata !288, metadata !572, i32 0, i32 0} ; [ DW_TAG_array_type ] [line 0, size 1792, align 32, offset 0] [from ]
+!572 = metadata !{metadata !228, metadata !202, metadata !221}
+!573 = metadata !{i32 181, i32 0, metadata !564, null}
+!574 = metadata !{i32 183, i32 0, metadata !564, null}
+!575 = metadata !{i32 185, i32 0, metadata !41, null}
+!576 = metadata !{i32 786689, metadata !175, metadata !"si1", metadata !53, i32 16777546, metadata !44, i32 0, i32 0} ; [ DW_TAG_arg_variable ] [si1] [line 330]
+!577 = metadata !{i32 330, i32 0, metadata !175, null}
+!578 = metadata !{i32 786689, metadata !175, metadata !"si2", metadata !53, i32 33554762, metadata !44, i32 0, i32 0} ; [ DW_TAG_arg_variable ] [si2] [line 330]
+!579 = metadata !{i32 333, i32 0, metadata !175, null}
+!580 = metadata !{i32 786689, metadata !172, metadata !"si", metadata !53, i32 16777490, metadata !44, i32 0, i32 0} ; [ DW_TAG_arg_variable ] [si] [line 274]
+!581 = metadata !{i32 274, i32 0, metadata !172, null}
+!582 = metadata !{i32 277, i32 0, metadata !583, null}
+!583 = metadata !{i32 786443, metadata !52, metadata !172} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/./safe_math.h]
+!584 = metadata !{i32 218, i32 0, metadata !585, null}
+!585 = metadata !{i32 786443, metadata !1, metadata !586, i32 217, i32 0, i32 79} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/newfail1.c]
+!586 = metadata !{i32 786443, metadata !1, metadata !125} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/newfail1.c]
+!587 = metadata !{i32 786689, metadata !125, metadata !"p_12", metadata !5, i32 33554626, metadata !17, i32 0, i32 0} ; [ DW_TAG_arg_variable ] [p_12] [line 194]
+!588 = metadata !{i32 194, i32 0, metadata !125, null}
+!589 = metadata !{i32 786688, metadata !586, metadata !"l_14", metadata !5, i32 196, metadata !590, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_14] [line 196]
+!590 = metadata !{i32 786433, null, null, metadata !"", i32 0, i64 16, i64 8, i32 0, i32 0, metadata !32, metadata !591, i32 0, i32 0} ; [ DW_TAG_array_type ] [line 0, size 16, align 8, offset 0] [from uint8_t]
+!591 = metadata !{metadata !278}
+!592 = metadata !{i32 196, i32 0, metadata !586, null}
+!593 = metadata !{%struct.S3* getelementptr inbounds ([9 x %struct.S3]* @g_49, i32 0, i32 3)}
+!594 = metadata !{i32 786688, metadata !586, metadata !"l_1025", metadata !5, i32 197, metadata !288, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_1025] [line 197]
+!595 = metadata !{i32 197, i32 0, metadata !586, null}
+!596 = metadata !{%union.U4* @func_10.l_1026}
+!597 = metadata !{i32 786688, metadata !586, metadata !"l_1026", metadata !5, i32 199, metadata !85, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_1026] [line 199]
+!598 = metadata !{i32 199, i32 0, metadata !586, null}
+!599 = metadata !{i32* getelementptr inbounds (%struct.S0* bitcast ({ i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }* @g_108 to %struct.S0*), i32 0, i32 0)}
+!600 = metadata !{i32 786688, metadata !586, metadata !"l_1037", metadata !5, i32 200, metadata !50, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_1037] [line 200]
+!601 = metadata !{i32 200, i32 0, metadata !586, null}
+!602 = metadata !{i32 -1677573085}
+!603 = metadata !{i32 786688, metadata !586, metadata !"l_1049", metadata !5, i32 201, metadata !44, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_1049] [line 201]
+!604 = metadata !{i32 201, i32 0, metadata !586, null}
+!605 = metadata !{i32 786688, metadata !586, metadata !"l_1051", metadata !5, i32 202, metadata !44, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_1051] [line 202]
+!606 = metadata !{i32 202, i32 0, metadata !586, null}
+!607 = metadata !{i32 6}
+!608 = metadata !{i32 786688, metadata !586, metadata !"l_1052", metadata !5, i32 203, metadata !44, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_1052] [line 203]
+!609 = metadata !{i32 203, i32 0, metadata !586, null}
+!610 = metadata !{i32 786688, metadata !586, metadata !"l_1053", metadata !5, i32 204, metadata !44, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_1053] [line 204]
+!611 = metadata !{i32 204, i32 0, metadata !586, null}
+!612 = metadata !{i32 -10}
+!613 = metadata !{i32 786688, metadata !586, metadata !"l_1056", metadata !5, i32 205, metadata !44, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_1056] [line 205]
+!614 = metadata !{i32 205, i32 0, metadata !586, null}
+!615 = metadata !{i32 5}
+!616 = metadata !{i32 786688, metadata !586, metadata !"l_1080", metadata !5, i32 206, metadata !44, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_1080] [line 206]
+!617 = metadata !{i32 206, i32 0, metadata !586, null}
+!618 = metadata !{i16 8759}
+!619 = metadata !{i32 786688, metadata !586, metadata !"l_1149", metadata !5, i32 207, metadata !77, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_1149] [line 207]
+!620 = metadata !{i32 207, i32 0, metadata !586, null}
+!621 = metadata !{i32** null}
+!622 = metadata !{i32 786688, metadata !586, metadata !"l_1152", metadata !5, i32 208, metadata !283, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_1152] [line 208]
+!623 = metadata !{i32 208, i32 0, metadata !586, null}
+!624 = metadata !{i32 340, i32 0, metadata !625, null}
+!625 = metadata !{i32 786443, metadata !1, metadata !626, i32 322, i32 0, i32 101} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/newfail1.c]
+!626 = metadata !{i32 786443, metadata !1, metadata !627, i32 277, i32 0, i32 91} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/newfail1.c]
+!627 = metadata !{i32 786443, metadata !1, metadata !586, i32 244, i32 0, i32 87} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/newfail1.c]
+!628 = metadata !{i32 786688, metadata !586, metadata !"l_1179", metadata !5, i32 209, metadata !267, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_1179] [line 209]
+!629 = metadata !{i32 209, i32 0, metadata !586, null}
+!630 = metadata !{i32 786688, metadata !586, metadata !"l_1178", metadata !5, i32 210, metadata !266, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_1178] [line 210]
+!631 = metadata !{i32 210, i32 0, metadata !586, null}
+!632 = metadata !{i32 786688, metadata !586, metadata !"l_1181", metadata !5, i32 211, metadata !266, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_1181] [line 211]
+!633 = metadata !{i32 211, i32 0, metadata !586, null}
+!634 = metadata !{[9 x i32****]* undef}
+!635 = metadata !{i32 786688, metadata !586, metadata !"l_1180", metadata !5, i32 212, metadata !636, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_1180] [line 212]
+!636 = metadata !{i32 786433, null, null, metadata !"", i32 0, i64 288, i64 32, i32 0, i32 0, metadata !637, metadata !255, i32 0, i32 0} ; [ DW_TAG_array_type ] [line 0, size 288, align 32, offset 0] [from ]
+!637 = metadata !{i32 786447, null, null, metadata !"", i32 0, i64 32, i64 32, i64 0, i32 0, metadata !266} ; [ DW_TAG_pointer_type ] [line 0, size 32, align 32, offset 0] [from ]
+!638 = metadata !{i32 212, i32 0, metadata !586, null}
+!639 = metadata !{i8 -8}
+!640 = metadata !{i32 786688, metadata !586, metadata !"l_1187", metadata !5, i32 213, metadata !59, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_1187] [line 213]
+!641 = metadata !{i32 213, i32 0, metadata !586, null}
+!642 = metadata !{i16* null}
+!643 = metadata !{i32 786688, metadata !586, metadata !"l_1188", metadata !5, i32 214, metadata !644, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_1188] [line 214]
+!644 = metadata !{i32 786447, null, null, metadata !"", i32 0, i64 32, i64 32, i64 0, i32 0, metadata !77} ; [ DW_TAG_pointer_type ] [line 0, size 32, align 32, offset 0] [from int16_t]
+!645 = metadata !{i32 214, i32 0, metadata !586, null}
+!646 = metadata !{%struct.S0* bitcast ({ i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }* @func_10.l_1189 to %struct.S0*)}
+!647 = metadata !{i32 786688, metadata !586, metadata !"l_1189", metadata !5, i32 215, metadata !128, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_1189] [line 215]
+!648 = metadata !{i32 215, i32 0, metadata !586, null}
+!649 = metadata !{i32 786688, metadata !586, metadata !"i", metadata !5, i32 216, metadata !8, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [i] [line 216]
+!650 = metadata !{i32 217, i32 0, metadata !585, null}
+!651 = metadata !{i32 219, i32 0, metadata !652, null}
+!652 = metadata !{i32 786443, metadata !1, metadata !586, i32 219, i32 0, i32 80} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/newfail1.c]
+!653 = metadata !{i32 227, i32 0, metadata !654, null}
+!654 = metadata !{i32 786443, metadata !1, metadata !655, i32 226, i32 0, i32 83} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/newfail1.c]
+!655 = metadata !{i32 786443, metadata !1, metadata !656, i32 225, i32 0, i32 82} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/newfail1.c]
+!656 = metadata !{i32 786443, metadata !1, metadata !652, i32 220, i32 0, i32 81} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/newfail1.c]
+!657 = metadata !{i32 225, i32 0, metadata !655, null}
+!658 = metadata !{i32 229, i32 0, metadata !656, null}
+!659 = metadata !{i32 786688, metadata !656, metadata !"l_24", metadata !5, i32 221, metadata !50, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_24] [line 221]
+!660 = metadata !{i32 2}
+!661 = metadata !{i32 234, i32 0, metadata !586, null}
+!662 = metadata !{i32 235, i32 0, metadata !586, null}
+!663 = metadata !{i32 237, i32 0, metadata !664, null}
+!664 = metadata !{i32 786443, metadata !1, metadata !665, i32 237, i32 0, i32 85} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/newfail1.c]
+!665 = metadata !{i32 786443, metadata !1, metadata !586, i32 236, i32 0, i32 84} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/newfail1.c]
+!666 = metadata !{i32 786688, metadata !627, metadata !"l_1036", metadata !5, i32 245, metadata !50, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_1036] [line 245]
+!667 = metadata !{i32 245, i32 0, metadata !627, null}
+!668 = metadata !{i32 -1530573517}
+!669 = metadata !{i32 786688, metadata !627, metadata !"l_1045", metadata !5, i32 246, metadata !44, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_1045] [line 246]
+!670 = metadata !{i32 246, i32 0, metadata !627, null}
+!671 = metadata !{i32 -2046861780}
+!672 = metadata !{i32 786688, metadata !627, metadata !"l_1046", metadata !5, i32 247, metadata !44, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_1046] [line 247]
+!673 = metadata !{i32 247, i32 0, metadata !627, null}
+!674 = metadata !{i32 -1684490856}
+!675 = metadata !{i32 786688, metadata !627, metadata !"l_1047", metadata !5, i32 248, metadata !44, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_1047] [line 248]
+!676 = metadata !{i32 248, i32 0, metadata !627, null}
+!677 = metadata !{i32 786688, metadata !627, metadata !"l_1048", metadata !5, i32 249, metadata !44, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_1048] [line 249]
+!678 = metadata !{i32 249, i32 0, metadata !627, null}
+!679 = metadata !{[4 x i32]* undef}
+!680 = metadata !{i32 786688, metadata !627, metadata !"l_1050", metadata !5, i32 250, metadata !681, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_1050] [line 250]
+!681 = metadata !{i32 786433, null, null, metadata !"", i32 0, i64 128, i64 32, i32 0, i32 0, metadata !44, metadata !682, i32 0, i32 0} ; [ DW_TAG_array_type ] [line 0, size 128, align 32, offset 0] [from int32_t]
+!682 = metadata !{metadata !185}
+!683 = metadata !{i32 250, i32 0, metadata !627, null}
+!684 = metadata !{%struct.S2* bitcast ({ i8, i8, [2 x i8] }* @func_10.l_1075 to %struct.S2*)}
+!685 = metadata !{i32 786688, metadata !627, metadata !"l_1075", metadata !5, i32 251, metadata !190, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_1075] [line 251]
+!686 = metadata !{i32 251, i32 0, metadata !627, null}
+!687 = metadata !{i16 -28090}
+!688 = metadata !{i32 786688, metadata !627, metadata !"l_1081", metadata !5, i32 252, metadata !77, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_1081] [line 252]
+!689 = metadata !{i32 252, i32 0, metadata !627, null}
+!690 = metadata !{i32 786688, metadata !627, metadata !"l_1143", metadata !5, i32 253, metadata !155, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_1143] [line 253]
+!691 = metadata !{i32 253, i32 0, metadata !627, null}
+!692 = metadata !{i32 786688, metadata !627, metadata !"l_1150", metadata !5, i32 254, metadata !693, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_1150] [line 254]
+!693 = metadata !{i32 786447, null, null, metadata !"", i32 0, i64 32, i64 32, i64 0, i32 0, metadata !167} ; [ DW_TAG_pointer_type ] [line 0, size 32, align 32, offset 0] [from ]
+!694 = metadata !{i32 254, i32 0, metadata !627, null}
+!695 = metadata !{i32 256, i32 0, metadata !696, null}
+!696 = metadata !{i32 786443, metadata !1, metadata !627, i32 256, i32 0, i32 88} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/newfail1.c]
+!697 = metadata !{i32 260, i32 0, metadata !627, null}
+!698 = metadata !{i32* @g_465}
+!699 = metadata !{i32 786688, metadata !700, metadata !"l_1038", metadata !5, i32 262, metadata !50, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_1038] [line 262]
+!700 = metadata !{i32 786443, metadata !1, metadata !627, i32 261, i32 0, i32 90} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/newfail1.c]
+!701 = metadata !{i32 262, i32 0, metadata !700, null}
+!702 = metadata !{i32 786688, metadata !700, metadata !"l_1039", metadata !5, i32 263, metadata !50, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_1039] [line 263]
+!703 = metadata !{i32 263, i32 0, metadata !700, null}
+!704 = metadata !{i32 786688, metadata !700, metadata !"l_1040", metadata !5, i32 264, metadata !50, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_1040] [line 264]
+!705 = metadata !{i32 264, i32 0, metadata !700, null}
+!706 = metadata !{i32 786688, metadata !700, metadata !"l_1041", metadata !5, i32 265, metadata !50, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_1041] [line 265]
+!707 = metadata !{i32 265, i32 0, metadata !700, null}
+!708 = metadata !{i32 786688, metadata !700, metadata !"l_1042", metadata !5, i32 266, metadata !50, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_1042] [line 266]
+!709 = metadata !{i32 266, i32 0, metadata !700, null}
+!710 = metadata !{i32 786688, metadata !700, metadata !"l_1043", metadata !5, i32 267, metadata !44, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_1043] [line 267]
+!711 = metadata !{i32 267, i32 0, metadata !700, null}
+!712 = metadata !{[5 x i32*]* @func_10.l_1044}
+!713 = metadata !{i32 786688, metadata !700, metadata !"l_1044", metadata !5, i32 268, metadata !714, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_1044] [line 268]
+!714 = metadata !{i32 786433, null, null, metadata !"", i32 0, i64 160, i64 32, i32 0, i32 0, metadata !50, metadata !715, i32 0, i32 0} ; [ DW_TAG_array_type ] [line 0, size 160, align 32, offset 0] [from ]
+!715 = metadata !{metadata !186}
+!716 = metadata !{i32 268, i32 0, metadata !700, null}
+!717 = metadata !{i8* @g_258}
+!718 = metadata !{i32 786688, metadata !700, metadata !"l_1074", metadata !5, i32 269, metadata !719, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_1074] [line 269]
+!719 = metadata !{i32 786447, null, null, metadata !"", i32 0, i64 32, i64 32, i64 0, i32 0, metadata !59} ; [ DW_TAG_pointer_type ] [line 0, size 32, align 32, offset 0] [from int8_t]
+!720 = metadata !{i32 269, i32 0, metadata !700, null}
+!721 = metadata !{i32* getelementptr inbounds (%struct.S3* @g_25, i32 0, i32 0)}
+!722 = metadata !{i32 786688, metadata !700, metadata !"l_1078", metadata !5, i32 270, metadata !723, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_1078] [line 270]
+!723 = metadata !{i32 786447, null, null, metadata !"", i32 0, i64 32, i64 32, i64 0, i32 0, metadata !17} ; [ DW_TAG_pointer_type ] [line 0, size 32, align 32, offset 0] [from uint32_t]
+!724 = metadata !{i32 270, i32 0, metadata !700, null}
+!725 = metadata !{i32* getelementptr inbounds ([4 x [5 x i32]]* @g_1057, i32 0, i32 2, i32 1)}
+!726 = metadata !{i32 786688, metadata !700, metadata !"l_1079", metadata !5, i32 271, metadata !723, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_1079] [line 271]
+!727 = metadata !{i32 271, i32 0, metadata !700, null}
+!728 = metadata !{i32 273, i32 0, metadata !700, null}
+!729 = metadata !{i32 274, i32 0, metadata !700, null}
+!730 = metadata !{i32 275, i32 0, metadata !700, null}
+!731 = metadata !{i32 336, i32 0, metadata !732, null}
+!732 = metadata !{i32 786443, metadata !1, metadata !733, i32 335, i32 0, i32 105} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/newfail1.c]
+!733 = metadata !{i32 786443, metadata !1, metadata !734, i32 334, i32 0, i32 104} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/newfail1.c]
+!734 = metadata !{i32 786443, metadata !1, metadata !625, i32 333, i32 0, i32 103} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/newfail1.c]
+!735 = metadata !{i32 786688, metadata !625, metadata !"j", metadata !5, i32 330, metadata !8, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [j] [line 330]
+!736 = metadata !{i32 335, i32 0, metadata !732, null}
+!737 = metadata !{i32 342, i32 0, metadata !625, null}
+!738 = metadata !{i32 344, i32 0, metadata !626, null}
+!739 = metadata !{i32 347, i32 0, metadata !586, null}
+!740 = metadata !{i32 348, i32 0, metadata !586, null}
+!741 = metadata !{i32 349, i32 0, metadata !586, null}
+!742 = metadata !{i32 786689, metadata !124, metadata !"ui1", metadata !53, i32 16777871, metadata !45, i32 0, i32 0} ; [ DW_TAG_arg_variable ] [ui1] [line 655]
+!743 = metadata !{i32 655, i32 0, metadata !124, null}
+!744 = metadata !{i32 786689, metadata !124, metadata !"ui2", metadata !53, i32 33555087, metadata !45, i32 0, i32 0} ; [ DW_TAG_arg_variable ] [ui2] [line 655]
+!745 = metadata !{i32 658, i32 0, metadata !124, null}
+!746 = metadata !{i32 786689, metadata !123, metadata !"ui1", metadata !53, i32 16777776, metadata !32, i32 0, i32 0} ; [ DW_TAG_arg_variable ] [ui1] [line 560]
+!747 = metadata !{i32 560, i32 0, metadata !123, null}
+!748 = metadata !{i32 786689, metadata !123, metadata !"ui2", metadata !53, i32 33554992, metadata !32, i32 0, i32 0} ; [ DW_TAG_arg_variable ] [ui2] [line 560]
+!749 = metadata !{i32 563, i32 0, metadata !123, null}
+!750 = metadata !{i32 786689, metadata !120, metadata !"left", metadata !53, i32 16777310, metadata !59, i32 0, i32 0} ; [ DW_TAG_arg_variable ] [left] [line 94]
+!751 = metadata !{i32 94, i32 0, metadata !120, null}
+!752 = metadata !{i32 786689, metadata !120, metadata !"right", metadata !53, i32 33554526, metadata !8, i32 0, i32 0} ; [ DW_TAG_arg_variable ] [right] [line 94]
+!753 = metadata !{i32 97, i32 0, metadata !120, null}
+!754 = metadata !{i32 786689, metadata !119, metadata !"left", metadata !53, i32 16777933, metadata !45, i32 0, i32 0} ; [ DW_TAG_arg_variable ] [left] [line 717]
+!755 = metadata !{i32 717, i32 0, metadata !119, null}
+!756 = metadata !{i32 786689, metadata !119, metadata !"right", metadata !53, i32 33555149, metadata !8, i32 0, i32 0} ; [ DW_TAG_arg_variable ] [right] [line 717]
+!757 = metadata !{i32 720, i32 0, metadata !119, null}
+!758 = metadata !{i32 786689, metadata !118, metadata !"ui1", metadata !53, i32 16777987, metadata !17, i32 0, i32 0} ; [ DW_TAG_arg_variable ] [ui1] [line 771]
+!759 = metadata !{i32 771, i32 0, metadata !118, null}
+!760 = metadata !{i32 786689, metadata !118, metadata !"ui2", metadata !53, i32 33555203, metadata !17, i32 0, i32 0} ; [ DW_TAG_arg_variable ] [ui2] [line 771]
+!761 = metadata !{i32 774, i32 0, metadata !118, null}
+!762 = metadata !{i32 786689, metadata !117, metadata !"si1", metadata !53, i32 16777518, metadata !44, i32 0, i32 0} ; [ DW_TAG_arg_variable ] [si1] [line 302]
+!763 = metadata !{i32 302, i32 0, metadata !117, null}
+!764 = metadata !{i32 786689, metadata !117, metadata !"si2", metadata !53, i32 33554734, metadata !44, i32 0, i32 0} ; [ DW_TAG_arg_variable ] [si2] [line 302]
+!765 = metadata !{i32 305, i32 0, metadata !117, null}
+!766 = metadata !{i32 786689, metadata !111, metadata !"p_27", metadata !5, i32 16777677, metadata !44, i32 0, i32 0} ; [ DW_TAG_arg_variable ] [p_27] [line 461]
+!767 = metadata !{i32 461, i32 0, metadata !111, null}
+!768 = metadata !{i32 786689, metadata !111, metadata !"p_28", metadata !5, i32 33554893, metadata !50, i32 0, i32 0} ; [ DW_TAG_arg_variable ] [p_28] [line 461]
+!769 = metadata !{i8 -9}
+!770 = metadata !{i32 786688, metadata !771, metadata !"l_483", metadata !5, i32 463, metadata !32, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_483] [line 463]
+!771 = metadata !{i32 786443, metadata !1, metadata !111} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/newfail1.c]
+!772 = metadata !{i32 463, i32 0, metadata !771, null}
+!773 = metadata !{i16* @g_332}
+!774 = metadata !{i32 786688, metadata !771, metadata !"l_484", metadata !5, i32 464, metadata !273, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_484] [line 464]
+!775 = metadata !{i32 464, i32 0, metadata !771, null}
+!776 = metadata !{i32 -1730445716}
+!777 = metadata !{i32 786688, metadata !771, metadata !"l_485", metadata !5, i32 465, metadata !44, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_485] [line 465]
+!778 = metadata !{i32 465, i32 0, metadata !771, null}
+!779 = metadata !{%union.U4* @func_26.l_486}
+!780 = metadata !{i32 786688, metadata !771, metadata !"l_486", metadata !5, i32 466, metadata !85, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_486] [line 466]
+!781 = metadata !{i32 466, i32 0, metadata !771, null}
+!782 = metadata !{%struct.S1* @func_26.l_488}
+!783 = metadata !{i32 786688, metadata !771, metadata !"l_488", metadata !5, i32 467, metadata !155, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_488] [line 467]
+!784 = metadata !{i32 467, i32 0, metadata !771, null}
+!785 = metadata !{%struct.S3* @func_26.l_489}
+!786 = metadata !{i32 786688, metadata !771, metadata !"l_489", metadata !5, i32 468, metadata !37, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_489] [line 468]
+!787 = metadata !{i32 468, i32 0, metadata !771, null}
+!788 = metadata !{[8 x [3 x [4 x i32]]]* @func_26.l_504}
+!789 = metadata !{i32 786688, metadata !771, metadata !"l_504", metadata !5, i32 469, metadata !790, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_504] [line 469]
+!790 = metadata !{i32 786433, null, null, metadata !"", i32 0, i64 3072, i64 32, i32 0, i32 0, metadata !44, metadata !791, i32 0, i32 0} ; [ DW_TAG_array_type ] [line 0, size 3072, align 32, offset 0] [from int32_t]
+!791 = metadata !{metadata !202, metadata !196, metadata !185}
+!792 = metadata !{i32 469, i32 0, metadata !771, null}
+!793 = metadata !{i32 1685967616}
+!794 = metadata !{i32 786688, metadata !771, metadata !"l_507", metadata !5, i32 470, metadata !17, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_507] [line 470]
+!795 = metadata !{i32 470, i32 0, metadata !771, null}
+!796 = metadata !{%struct.S2* undef}
+!797 = metadata !{i32 786688, metadata !771, metadata !"l_550", metadata !5, i32 471, metadata !190, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_550] [line 471]
+!798 = metadata !{i32 471, i32 0, metadata !771, null}
+!799 = metadata !{i32* @g_52}
+!800 = metadata !{i32 786688, metadata !771, metadata !"l_558", metadata !5, i32 472, metadata !50, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_558] [line 472]
+!801 = metadata !{i32 472, i32 0, metadata !771, null}
+!802 = metadata !{i32* null}
+!803 = metadata !{i32 786688, metadata !771, metadata !"l_560", metadata !5, i32 474, metadata !50, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_560] [line 474]
+!804 = metadata !{i32 474, i32 0, metadata !771, null}
+!805 = metadata !{i32 786688, metadata !771, metadata !"l_561", metadata !5, i32 475, metadata !50, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_561] [line 475]
+!806 = metadata !{i32 475, i32 0, metadata !771, null}
+!807 = metadata !{i32 786688, metadata !771, metadata !"l_562", metadata !5, i32 476, metadata !50, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_562] [line 476]
+!808 = metadata !{i32 476, i32 0, metadata !771, null}
+!809 = metadata !{i32 786688, metadata !771, metadata !"l_563", metadata !5, i32 477, metadata !50, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_563] [line 477]
+!810 = metadata !{i32 477, i32 0, metadata !771, null}
+!811 = metadata !{i32 786688, metadata !771, metadata !"l_564", metadata !5, i32 478, metadata !50, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_564] [line 478]
+!812 = metadata !{i32 478, i32 0, metadata !771, null}
+!813 = metadata !{i32 786688, metadata !771, metadata !"l_565", metadata !5, i32 479, metadata !50, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_565] [line 479]
+!814 = metadata !{i32 479, i32 0, metadata !771, null}
+!815 = metadata !{i32 786688, metadata !771, metadata !"l_566", metadata !5, i32 480, metadata !50, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_566] [line 480]
+!816 = metadata !{i32 480, i32 0, metadata !771, null}
+!817 = metadata !{i32 786688, metadata !771, metadata !"l_568", metadata !5, i32 482, metadata !50, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_568] [line 482]
+!818 = metadata !{i32 482, i32 0, metadata !771, null}
+!819 = metadata !{i32 786688, metadata !771, metadata !"l_570", metadata !5, i32 484, metadata !50, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_570] [line 484]
+!820 = metadata !{i32 484, i32 0, metadata !771, null}
+!821 = metadata !{i32 786688, metadata !771, metadata !"l_571", metadata !5, i32 485, metadata !50, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_571] [line 485]
+!822 = metadata !{i32 485, i32 0, metadata !771, null}
+!823 = metadata !{i32 786688, metadata !771, metadata !"l_573", metadata !5, i32 487, metadata !50, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_573] [line 487]
+!824 = metadata !{i32 487, i32 0, metadata !771, null}
+!825 = metadata !{i32 786688, metadata !771, metadata !"i", metadata !5, i32 489, metadata !8, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [i] [line 489]
+!826 = metadata !{i32 490, i32 0, metadata !827, null}
+!827 = metadata !{i32 786443, metadata !1, metadata !771, i32 490, i32 0, i32 55} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/newfail1.c]
+!828 = metadata !{i32 492, i32 0, metadata !829, null}
+!829 = metadata !{i32 786443, metadata !1, metadata !771, i32 492, i32 0, i32 56} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/newfail1.c]
+!830 = metadata !{i32 502, i32 0, metadata !831, null}
+!831 = metadata !{i32 786443, metadata !1, metadata !829, i32 493, i32 0, i32 57} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/newfail1.c]
+!832 = metadata !{i32 -896393958}
+!833 = metadata !{i32 786688, metadata !834, metadata !"l_487", metadata !5, i32 504, metadata !17, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_487] [line 504]
+!834 = metadata !{i32 786443, metadata !1, metadata !831, i32 503, i32 0, i32 59} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/newfail1.c]
+!835 = metadata !{i32 504, i32 0, metadata !834, null}
+!836 = metadata !{[4 x [3 x i32**]]* undef}
+!837 = metadata !{i32 786688, metadata !834, metadata !"l_491", metadata !5, i32 505, metadata !838, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_491] [line 505]
+!838 = metadata !{i32 786433, null, null, metadata !"", i32 0, i64 384, i64 32, i32 0, i32 0, metadata !267, metadata !195, i32 0, i32 0} ; [ DW_TAG_array_type ] [line 0, size 384, align 32, offset 0] [from ]
+!839 = metadata !{i32 505, i32 0, metadata !834, null}
+!840 = metadata !{i32 507, i32 0, metadata !834, null}
+!841 = metadata !{i32 596, i32 0, metadata !842, null}
+!842 = metadata !{i32 786443, metadata !1, metadata !831, i32 596, i32 0, i32 77} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/newfail1.c]
+!843 = metadata !{i32 599, i32 0, metadata !844, null}
+!844 = metadata !{i32 786443, metadata !1, metadata !842, i32 597, i32 0, i32 78} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/newfail1.c]
+!845 = metadata !{i8 -10}
+!846 = metadata !{i32 786688, metadata !847, metadata !"l_492", metadata !5, i32 511, metadata !59, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_492] [line 511]
+!847 = metadata !{i32 786443, metadata !1, metadata !831, i32 510, i32 0, i32 60} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/newfail1.c]
+!848 = metadata !{i32 511, i32 0, metadata !847, null}
+!849 = metadata !{i32 -1895868394}
+!850 = metadata !{i32 786688, metadata !847, metadata !"l_493", metadata !5, i32 512, metadata !44, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_493] [line 512]
+!851 = metadata !{i32 512, i32 0, metadata !847, null}
+!852 = metadata !{i32 -1012628145}
+!853 = metadata !{i32 786688, metadata !847, metadata !"l_502", metadata !5, i32 513, metadata !44, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_502] [line 513]
+!854 = metadata !{i32 513, i32 0, metadata !847, null}
+!855 = metadata !{i32 786688, metadata !847, metadata !"l_503", metadata !5, i32 514, metadata !44, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_503] [line 514]
+!856 = metadata !{i32 514, i32 0, metadata !847, null}
+!857 = metadata !{i32 -2}
+!858 = metadata !{i32 786688, metadata !847, metadata !"l_505", metadata !5, i32 515, metadata !44, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_505] [line 515]
+!859 = metadata !{i32 515, i32 0, metadata !847, null}
+!860 = metadata !{i32 -1827152685}
+!861 = metadata !{i32 786688, metadata !847, metadata !"l_506", metadata !5, i32 516, metadata !44, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_506] [line 516]
+!862 = metadata !{i32 516, i32 0, metadata !847, null}
+!863 = metadata !{i32 1005329122}
+!864 = metadata !{i32 786688, metadata !847, metadata !"l_530", metadata !5, i32 517, metadata !44, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_530] [line 517]
+!865 = metadata !{i32 517, i32 0, metadata !847, null}
+!866 = metadata !{i32 -958636775}
+!867 = metadata !{i32 786688, metadata !847, metadata !"l_533", metadata !5, i32 518, metadata !44, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_533] [line 518]
+!868 = metadata !{i32 518, i32 0, metadata !847, null}
+!869 = metadata !{%struct.S1* @func_26.l_555}
+!870 = metadata !{i32 786688, metadata !847, metadata !"l_555", metadata !5, i32 520, metadata !155, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_555] [line 520]
+!871 = metadata !{i32 520, i32 0, metadata !847, null}
+!872 = metadata !{%struct.S2* bitcast ({ i8, i8, [2 x i8] }* @func_26.l_556 to %struct.S2*)}
+!873 = metadata !{i32 786688, metadata !847, metadata !"l_556", metadata !5, i32 521, metadata !190, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_556] [line 521]
+!874 = metadata !{i32 521, i32 0, metadata !847, null}
+!875 = metadata !{i32 522, i32 0, metadata !876, null}
+!876 = metadata !{i32 786443, metadata !1, metadata !847, i32 522, i32 0, i32 61} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/newfail1.c]
+!877 = metadata !{i32 -9}
+!878 = metadata !{i32 786688, metadata !879, metadata !"l_496", metadata !5, i32 526, metadata !44, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_496] [line 526]
+!879 = metadata !{i32 786443, metadata !1, metadata !876, i32 523, i32 0, i32 62} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/newfail1.c]
+!880 = metadata !{i32 526, i32 0, metadata !879, null}
+!881 = metadata !{i32 786688, metadata !879, metadata !"l_497", metadata !5, i32 527, metadata !50, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_497] [line 527]
+!882 = metadata !{i32 527, i32 0, metadata !879, null}
+!883 = metadata !{i32 786688, metadata !879, metadata !"l_499", metadata !5, i32 529, metadata !50, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_499] [line 529]
+!884 = metadata !{i32 529, i32 0, metadata !879, null}
+!885 = metadata !{i32 1885145111}
+!886 = metadata !{i32 786688, metadata !879, metadata !"l_500", metadata !5, i32 530, metadata !44, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_500] [line 530]
+!887 = metadata !{i32 530, i32 0, metadata !879, null}
+!888 = metadata !{[9 x [7 x i32*]]* undef}
+!889 = metadata !{i32 786688, metadata !879, metadata !"l_501", metadata !5, i32 531, metadata !890, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_501] [line 531]
+!890 = metadata !{i32 786433, null, null, metadata !"", i32 0, i64 2016, i64 32, i32 0, i32 0, metadata !50, metadata !891, i32 0, i32 0} ; [ DW_TAG_array_type ] [line 0, size 2016, align 32, offset 0] [from ]
+!891 = metadata !{metadata !227, metadata !228}
+!892 = metadata !{i32 531, i32 0, metadata !879, null}
+!893 = metadata !{%struct.S1** null}
+!894 = metadata !{i32 786688, metadata !879, metadata !"l_523", metadata !5, i32 532, metadata !895, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_523] [line 532]
+!895 = metadata !{i32 786447, null, null, metadata !"", i32 0, i64 32, i64 32, i64 0, i32 0, metadata !276} ; [ DW_TAG_pointer_type ] [line 0, size 32, align 32, offset 0] [from ]
+!896 = metadata !{i32 532, i32 0, metadata !879, null}
+!897 = metadata !{i32 1685967615}
+!898 = metadata !{i32 534, i32 0, metadata !879, null}
+!899 = metadata !{i32 535, i32 0, metadata !900, null}
+!900 = metadata !{i32 786443, metadata !1, metadata !879, i32 535, i32 0, i32 63} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/newfail1.c]
+!901 = metadata !{i32* getelementptr inbounds ([9 x %struct.S3]* @g_49, i32 0, i32 3, i32 0)}
+!902 = metadata !{i32 786688, metadata !903, metadata !"l_514", metadata !5, i32 537, metadata !723, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_514] [line 537]
+!903 = metadata !{i32 786443, metadata !1, metadata !900, i32 536, i32 0, i32 64} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/newfail1.c]
+!904 = metadata !{i32 537, i32 0, metadata !903, null}
+!905 = metadata !{[3 x [8 x [7 x i16]]]* @func_26.l_519}
+!906 = metadata !{i32 786688, metadata !903, metadata !"l_519", metadata !5, i32 539, metadata !907, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_519] [line 539]
+!907 = metadata !{i32 786433, null, null, metadata !"", i32 0, i64 2688, i64 16, i32 0, i32 0, metadata !77, metadata !908, i32 0, i32 0} ; [ DW_TAG_array_type ] [line 0, size 2688, align 16, offset 0] [from int16_t]
+!908 = metadata !{metadata !196, metadata !202, metadata !228}
+!909 = metadata !{i32 539, i32 0, metadata !903, null}
+!910 = metadata !{%struct.S1* @func_26.l_522}
+!911 = metadata !{i32 786688, metadata !903, metadata !"l_522", metadata !5, i32 540, metadata !155, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_522] [line 540]
+!912 = metadata !{i32 540, i32 0, metadata !903, null}
+!913 = metadata !{i32 542, i32 0, metadata !903, null}
+!914 = metadata !{i32 543, i32 0, metadata !903, null}
+!915 = metadata !{i32 604, i32 0, metadata !771, null}
+!916 = metadata !{i32 786689, metadata !107, metadata !"si1", metadata !53, i32 16777272, metadata !59, i32 0, i32 0} ; [ DW_TAG_arg_variable ] [si1] [line 56]
+!917 = metadata !{i32 56, i32 0, metadata !107, null}
+!918 = metadata !{i32 786689, metadata !107, metadata !"si2", metadata !53, i32 33554488, metadata !59, i32 0, i32 0} ; [ DW_TAG_arg_variable ] [si2] [line 56]
+!919 = metadata !{i32 59, i32 0, metadata !107, null}
+!920 = metadata !{i32 786689, metadata !105, metadata !"ui1", metadata !53, i32 16777897, metadata !45, i32 0, i32 0} ; [ DW_TAG_arg_variable ] [ui1] [line 681]
+!921 = metadata !{i32 681, i32 0, metadata !105, null}
+!922 = metadata !{i32 786689, metadata !105, metadata !"ui2", metadata !53, i32 33555113, metadata !45, i32 0, i32 0} ; [ DW_TAG_arg_variable ] [ui2] [line 681]
+!923 = metadata !{i32 684, i32 0, metadata !105, null}
+!924 = metadata !{i32 786689, metadata !82, metadata !"p_35", metadata !5, i32 16777869, metadata !50, i32 0, i32 0} ; [ DW_TAG_arg_variable ] [p_35] [line 653]
+!925 = metadata !{i32 653, i32 0, metadata !82, null}
+!926 = metadata !{i32 786688, metadata !927, metadata !"l_409", metadata !5, i32 655, metadata !190, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_409] [line 655]
+!927 = metadata !{i32 786443, metadata !1, metadata !82} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/newfail1.c]
+!928 = metadata !{i32 655, i32 0, metadata !927, null}
+!929 = metadata !{i32 786688, metadata !927, metadata !"l_416", metadata !5, i32 656, metadata !723, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_416] [line 656]
+!930 = metadata !{i32 656, i32 0, metadata !927, null}
+!931 = metadata !{i32 786688, metadata !927, metadata !"l_418", metadata !5, i32 658, metadata !44, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_418] [line 658]
+!932 = metadata !{i32 658, i32 0, metadata !927, null}
+!933 = metadata !{i32 -2107753489}
+!934 = metadata !{i32 786688, metadata !927, metadata !"l_419", metadata !5, i32 659, metadata !44, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_419] [line 659]
+!935 = metadata !{i32 659, i32 0, metadata !927, null}
+!936 = metadata !{i32 85591085}
+!937 = metadata !{i32 786688, metadata !927, metadata !"l_420", metadata !5, i32 660, metadata !44, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_420] [line 660]
+!938 = metadata !{i32 660, i32 0, metadata !927, null}
+!939 = metadata !{i32 786688, metadata !927, metadata !"l_443", metadata !5, i32 661, metadata !44, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_443] [line 661]
+!940 = metadata !{i32 661, i32 0, metadata !927, null}
+!941 = metadata !{i32 786688, metadata !927, metadata !"l_445", metadata !5, i32 663, metadata !50, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_445] [line 663]
+!942 = metadata !{i32 663, i32 0, metadata !927, null}
+!943 = metadata !{i32 786688, metadata !927, metadata !"l_446", metadata !5, i32 664, metadata !50, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_446] [line 664]
+!944 = metadata !{i32 664, i32 0, metadata !927, null}
+!945 = metadata !{i32 786688, metadata !927, metadata !"l_447", metadata !5, i32 665, metadata !50, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_447] [line 665]
+!946 = metadata !{i32 665, i32 0, metadata !927, null}
+!947 = metadata !{i32 786688, metadata !927, metadata !"l_449", metadata !5, i32 667, metadata !50, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_449] [line 667]
+!948 = metadata !{i32 667, i32 0, metadata !927, null}
+!949 = metadata !{[2 x [10 x i32*]]* undef}
+!950 = metadata !{i32 786688, metadata !927, metadata !"l_451", metadata !5, i32 669, metadata !951, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_451] [line 669]
+!951 = metadata !{i32 786433, null, null, metadata !"", i32 0, i64 640, i64 32, i32 0, i32 0, metadata !50, metadata !952, i32 0, i32 0} ; [ DW_TAG_array_type ] [line 0, size 640, align 32, offset 0] [from ]
+!952 = metadata !{metadata !278, metadata !201}
+!953 = metadata !{i32 669, i32 0, metadata !927, null}
+!954 = metadata !{i8 -6}
+!955 = metadata !{i32 786688, metadata !927, metadata !"l_453", metadata !5, i32 670, metadata !59, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_453] [line 670]
+!956 = metadata !{i32 670, i32 0, metadata !927, null}
+!957 = metadata !{i32 786688, metadata !927, metadata !"i", metadata !5, i32 671, metadata !8, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [i] [line 671]
+!958 = metadata !{i32 672, i32 0, metadata !959, null}
+!959 = metadata !{i32 786443, metadata !1, metadata !927, i32 672, i32 0, i32 54} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/newfail1.c]
+!960 = metadata !{i32 674, i32 0, metadata !927, null}
+!961 = metadata !{i32 675, i32 0, metadata !927, null}
+!962 = metadata !{i32 676, i32 0, metadata !927, null}
+!963 = metadata !{i32 786689, metadata !47, metadata !"p_46", metadata !5, i32 16778149, metadata !50, i32 0, i32 0} ; [ DW_TAG_arg_variable ] [p_46] [line 933]
+!964 = metadata !{i32 933, i32 0, metadata !47, null}
+!965 = metadata !{i32 786689, metadata !47, metadata !"p_47", metadata !5, i32 33555365, metadata !37, i32 0, i32 0} ; [ DW_TAG_arg_variable ] [p_47] [line 933]
+!966 = metadata !{i32 786688, metadata !47, metadata !"l_51", metadata !5, i32 935, metadata !50, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_51] [line 935]
+!967 = metadata !{i32 935, i32 0, metadata !47, null}
+!968 = metadata !{i32 786688, metadata !47, metadata !"l_53", metadata !5, i32 936, metadata !50, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_53] [line 936]
+!969 = metadata !{i32 936, i32 0, metadata !47, null}
+!970 = metadata !{i32 786688, metadata !47, metadata !"l_54", metadata !5, i32 937, metadata !50, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_54] [line 937]
+!971 = metadata !{i32 937, i32 0, metadata !47, null}
+!972 = metadata !{i32 786688, metadata !47, metadata !"l_55", metadata !5, i32 938, metadata !50, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_55] [line 938]
+!973 = metadata !{i32 938, i32 0, metadata !47, null}
+!974 = metadata !{i32 786688, metadata !47, metadata !"l_56", metadata !5, i32 939, metadata !50, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_56] [line 939]
+!975 = metadata !{i32 939, i32 0, metadata !47, null}
+!976 = metadata !{i32 786688, metadata !47, metadata !"l_57", metadata !5, i32 940, metadata !50, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_57] [line 940]
+!977 = metadata !{i32 940, i32 0, metadata !47, null}
+!978 = metadata !{i32 786688, metadata !47, metadata !"l_58", metadata !5, i32 941, metadata !50, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_58] [line 941]
+!979 = metadata !{i32 941, i32 0, metadata !47, null}
+!980 = metadata !{i32 786688, metadata !47, metadata !"l_59", metadata !5, i32 942, metadata !50, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_59] [line 942]
+!981 = metadata !{i32 942, i32 0, metadata !47, null}
+!982 = metadata !{i32 1915037093}
+!983 = metadata !{i32 786688, metadata !47, metadata !"l_60", metadata !5, i32 943, metadata !44, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_60] [line 943]
+!984 = metadata !{i32 943, i32 0, metadata !47, null}
+!985 = metadata !{i32 786688, metadata !47, metadata !"l_61", metadata !5, i32 944, metadata !50, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_61] [line 944]
+!986 = metadata !{i32 944, i32 0, metadata !47, null}
+!987 = metadata !{i32 786688, metadata !47, metadata !"l_62", metadata !5, i32 945, metadata !50, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_62] [line 945]
+!988 = metadata !{i32 945, i32 0, metadata !47, null}
+!989 = metadata !{i32 786688, metadata !47, metadata !"l_63", metadata !5, i32 946, metadata !50, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_63] [line 946]
+!990 = metadata !{i32 946, i32 0, metadata !47, null}
+!991 = metadata !{i32 786688, metadata !47, metadata !"l_65", metadata !5, i32 948, metadata !50, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_65] [line 948]
+!992 = metadata !{i32 948, i32 0, metadata !47, null}
+!993 = metadata !{i8 93}
+!994 = metadata !{i32 786688, metadata !47, metadata !"l_66", metadata !5, i32 949, metadata !32, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_66] [line 949]
+!995 = metadata !{i32 949, i32 0, metadata !47, null}
+!996 = metadata !{%struct.S3* undef}
+!997 = metadata !{i32 786688, metadata !47, metadata !"l_76", metadata !5, i32 950, metadata !37, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_76] [line 950]
+!998 = metadata !{i32 950, i32 0, metadata !47, null}
+!999 = metadata !{i32 786688, metadata !47, metadata !"l_93", metadata !5, i32 951, metadata !44, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_93] [line 951]
+!1000 = metadata !{i32 951, i32 0, metadata !47, null}
+!1001 = metadata !{i32 -865668630}
+!1002 = metadata !{i32 786688, metadata !47, metadata !"l_95", metadata !5, i32 952, metadata !44, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_95] [line 952]
+!1003 = metadata !{i32 952, i32 0, metadata !47, null}
+!1004 = metadata !{i16* @g_103}
+!1005 = metadata !{i32 786688, metadata !47, metadata !"l_123", metadata !5, i32 953, metadata !273, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_123] [line 953]
+!1006 = metadata !{i32 953, i32 0, metadata !47, null}
+!1007 = metadata !{[7 x %struct.S2]* bitcast (<{ { i8, i8, [2 x i8] }, { i8, i8, [2 x i8] }, { i8, i8, [2 x i8] }, { i8, i8, [2 x i8] }, { i8, i8, [2 x i8] }, { i8, i8, [2 x i8] }, { i8, i8, [2 x i8] } }>* @func_45.l_152 to [7 x %struct.S2]*)}
+!1008 = metadata !{i32 786688, metadata !47, metadata !"l_152", metadata !5, i32 954, metadata !1009, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_152] [line 954]
+!1009 = metadata !{i32 786433, null, null, metadata !"", i32 0, i64 224, i64 32, i32 0, i32 0, metadata !190, metadata !1010, i32 0, i32 0} ; [ DW_TAG_array_type ] [line 0, size 224, align 32, offset 0] [from S2]
+!1010 = metadata !{metadata !228}
+!1011 = metadata !{i32 954, i32 0, metadata !47, null}
+!1012 = metadata !{%struct.S0* bitcast ({ i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }* @func_45.l_154 to %struct.S0*)}
+!1013 = metadata !{i32 786688, metadata !47, metadata !"l_154", metadata !5, i32 955, metadata !128, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_154] [line 955]
+!1014 = metadata !{i32 955, i32 0, metadata !47, null}
+!1015 = metadata !{i8 94}
+!1016 = metadata !{i32 957, i32 0, metadata !47, null}
+!1017 = metadata !{i32 990, i32 0, metadata !1018, null}
+!1018 = metadata !{i32 786443, metadata !1, metadata !47, i32 990, i32 0, i32 41} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/newfail1.c]
+!1019 = metadata !{i32 1051, i32 0, metadata !47, null}
+!1020 = metadata !{i8 -22}
+!1021 = metadata !{i32 786689, metadata !79, metadata !"ui2", metadata !53, i32 33554978, metadata !32, i32 0, i32 0} ; [ DW_TAG_arg_variable ] [ui2] [line 546]
+!1022 = metadata !{i32 546, i32 0, metadata !79, null}
+!1023 = metadata !{i32 549, i32 0, metadata !79, null}
+!1024 = metadata !{i32 786689, metadata !74, metadata !"si1", metadata !53, i32 16777374, metadata !77, i32 0, i32 0} ; [ DW_TAG_arg_variable ] [si1] [line 158]
+!1025 = metadata !{i32 158, i32 0, metadata !74, null}
+!1026 = metadata !{i32 786689, metadata !74, metadata !"si2", metadata !53, i32 33554590, metadata !77, i32 0, i32 0} ; [ DW_TAG_arg_variable ] [si2] [line 158]
+!1027 = metadata !{i32 161, i32 0, metadata !74, null}
+!1028 = metadata !{i32 4}
+!1029 = metadata !{i32 786689, metadata !71, metadata !"right", metadata !53, i32 33555125, metadata !8, i32 0, i32 0} ; [ DW_TAG_arg_variable ] [right] [line 693]
+!1030 = metadata !{i32 693, i32 0, metadata !71, null}
+!1031 = metadata !{i32 696, i32 0, metadata !71, null}
+!1032 = metadata !{i32 786689, metadata !68, metadata !"left", metadata !53, i32 16777945, metadata !45, i32 0, i32 0} ; [ DW_TAG_arg_variable ] [left] [line 729]
+!1033 = metadata !{i32 729, i32 0, metadata !68, null}
+!1034 = metadata !{i32 786689, metadata !68, metadata !"right", metadata !53, i32 33555161, metadata !19, i32 0, i32 0} ; [ DW_TAG_arg_variable ] [right] [line 729]
+!1035 = metadata !{i32 732, i32 0, metadata !68, null}
+!1036 = metadata !{i32 786689, metadata !62, metadata !"si1", metadata !53, i32 16777558, metadata !44, i32 0, i32 0} ; [ DW_TAG_arg_variable ] [si1] [line 342]
+!1037 = metadata !{i32 342, i32 0, metadata !62, null}
+!1038 = metadata !{i32 345, i32 0, metadata !62, null}
+!1039 = metadata !{i32 786689, metadata !102, metadata !"left", metadata !53, i32 16777346, metadata !59, i32 0, i32 0} ; [ DW_TAG_arg_variable ] [left] [line 130]
+!1040 = metadata !{i32 130, i32 0, metadata !102, null}
+!1041 = metadata !{i32 786689, metadata !102, metadata !"right", metadata !53, i32 33554562, metadata !19, i32 0, i32 0} ; [ DW_TAG_arg_variable ] [right] [line 130]
+!1042 = metadata !{i32 133, i32 0, metadata !102, null}
+!1043 = metadata !{i32 786689, metadata !95, metadata !"left", metadata !53, i32 16777819, metadata !32, i32 0, i32 0} ; [ DW_TAG_arg_variable ] [left] [line 603]
+!1044 = metadata !{i32 603, i32 0, metadata !95, null}
+!1045 = metadata !{i32 786689, metadata !95, metadata !"right", metadata !53, i32 33555035, metadata !19, i32 0, i32 0} ; [ DW_TAG_arg_variable ] [right] [line 603]
+!1046 = metadata !{i32 606, i32 0, metadata !95, null}
+!1047 = metadata !{i32 786689, metadata !94, metadata !"si1", metadata !53, i32 16777402, metadata !77, i32 0, i32 0} ; [ DW_TAG_arg_variable ] [si1] [line 186]
+!1048 = metadata !{i32 186, i32 0, metadata !94, null}
+!1049 = metadata !{i32 786689, metadata !94, metadata !"si2", metadata !53, i32 33554618, metadata !77, i32 0, i32 0} ; [ DW_TAG_arg_variable ] [si2] [line 186]
+!1050 = metadata !{i32 189, i32 0, metadata !94, null}
+!1051 = metadata !{i32 786689, metadata !93, metadata !"ui1", metadata !53, i32 16777885, metadata !45, i32 0, i32 0} ; [ DW_TAG_arg_variable ] [ui1] [line 669]
+!1052 = metadata !{i32 669, i32 0, metadata !93, null}
+!1053 = metadata !{i32 786689, metadata !93, metadata !"ui2", metadata !53, i32 33555101, metadata !45, i32 0, i32 0} ; [ DW_TAG_arg_variable ] [ui2] [line 669]
+!1054 = metadata !{i32 672, i32 0, metadata !93, null}
+!1055 = metadata !{i32 786689, metadata !89, metadata !"ui1", metadata !53, i32 16777864, metadata !45, i32 0, i32 0} ; [ DW_TAG_arg_variable ] [ui1] [line 648]
+!1056 = metadata !{i32 648, i32 0, metadata !89, null}
+!1057 = metadata !{i32 786689, metadata !89, metadata !"ui2", metadata !53, i32 33555080, metadata !45, i32 0, i32 0} ; [ DW_TAG_arg_variable ] [ui2] [line 648]
+!1058 = metadata !{i32 651, i32 0, metadata !1059, null}
+!1059 = metadata !{i32 786443, metadata !52, metadata !89} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/./safe_math.h]
+!1060 = metadata !{i32 786689, metadata !114, metadata !"left", metadata !53, i32 16777464, metadata !77, i32 0, i32 0} ; [ DW_TAG_arg_variable ] [left] [line 248]
+!1061 = metadata !{i32 248, i32 0, metadata !114, null}
+!1062 = metadata !{i32 786689, metadata !114, metadata !"right", metadata !53, i32 33554680, metadata !8, i32 0, i32 0} ; [ DW_TAG_arg_variable ] [right] [line 248]
+!1063 = metadata !{i32 251, i32 0, metadata !1064, null}
+!1064 = metadata !{i32 786443, metadata !52, metadata !114} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/./safe_math.h]
+!1065 = metadata !{i32 786689, metadata !169, metadata !"p_16", metadata !5, i32 16777573, metadata !167, i32 0, i32 0} ; [ DW_TAG_arg_variable ] [p_16] [line 357]
+!1066 = metadata !{i32 357, i32 0, metadata !169, null}
+!1067 = metadata !{i16 0}
+!1068 = metadata !{i32 786689, metadata !169, metadata !"p_18", metadata !5, i32 50332005, metadata !45, i32 0, i32 0} ; [ DW_TAG_arg_variable ] [p_18] [line 357]
+!1069 = metadata !{i16 1}
+!1070 = metadata !{i32 786688, metadata !1071, metadata !"l_766", metadata !5, i32 359, metadata !45, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_766] [line 359]
+!1071 = metadata !{i32 786443, metadata !1, metadata !169} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/newfail1.c]
+!1072 = metadata !{i32 359, i32 0, metadata !1071, null}
+!1073 = metadata !{i32 786688, metadata !1071, metadata !"l_771", metadata !5, i32 360, metadata !288, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_771] [line 360]
+!1074 = metadata !{i32 360, i32 0, metadata !1071, null}
+!1075 = metadata !{i32 786688, metadata !1071, metadata !"l_774", metadata !5, i32 361, metadata !44, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_774] [line 361]
+!1076 = metadata !{i32 361, i32 0, metadata !1071, null}
+!1077 = metadata !{[6 x %union.U4]* @func_15.l_789}
+!1078 = metadata !{i32 786688, metadata !1071, metadata !"l_789", metadata !5, i32 362, metadata !1079, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_789] [line 362]
+!1079 = metadata !{i32 786433, null, null, metadata !"", i32 0, i64 192, i64 32, i32 0, i32 0, metadata !85, metadata !233, i32 0, i32 0} ; [ DW_TAG_array_type ] [line 0, size 192, align 32, offset 0] [from U4]
+!1080 = metadata !{i32 362, i32 0, metadata !1071, null}
+!1081 = metadata !{i32 786688, metadata !1071, metadata !"l_795", metadata !5, i32 364, metadata !50, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_795] [line 364]
+!1082 = metadata !{i32 364, i32 0, metadata !1071, null}
+!1083 = metadata !{i16 -17499}
+!1084 = metadata !{i32 786688, metadata !1071, metadata !"l_803", metadata !5, i32 365, metadata !77, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_803] [line 365]
+!1085 = metadata !{i32 365, i32 0, metadata !1071, null}
+!1086 = metadata !{i32 -291298526}
+!1087 = metadata !{i32 786688, metadata !1071, metadata !"l_812", metadata !5, i32 366, metadata !44, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_812] [line 366]
+!1088 = metadata !{i32 366, i32 0, metadata !1071, null}
+!1089 = metadata !{i32 -1504359129}
+!1090 = metadata !{i32 786688, metadata !1071, metadata !"l_813", metadata !5, i32 367, metadata !44, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_813] [line 367]
+!1091 = metadata !{i32 367, i32 0, metadata !1071, null}
+!1092 = metadata !{[8 x [1 x [4 x i32]]]* @func_15.l_814}
+!1093 = metadata !{i32 786688, metadata !1071, metadata !"l_814", metadata !5, i32 368, metadata !1094, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_814] [line 368]
+!1094 = metadata !{i32 786433, null, null, metadata !"", i32 0, i64 1024, i64 32, i32 0, i32 0, metadata !44, metadata !1095, i32 0, i32 0} ; [ DW_TAG_array_type ] [line 0, size 1024, align 32, offset 0] [from int32_t]
+!1095 = metadata !{metadata !202, metadata !221, metadata !185}
+!1096 = metadata !{i32 368, i32 0, metadata !1071, null}
+!1097 = metadata !{i32 786688, metadata !1071, metadata !"l_816", metadata !5, i32 369, metadata !45, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_816] [line 369]
+!1098 = metadata !{i32 369, i32 0, metadata !1071, null}
+!1099 = metadata !{%union.U4* null}
+!1100 = metadata !{i32 786688, metadata !1071, metadata !"l_920", metadata !5, i32 371, metadata !515, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_920] [line 371]
+!1101 = metadata !{i32 371, i32 0, metadata !1071, null}
+!1102 = metadata !{[4 x [5 x [5 x %union.U4**]]]* undef}
+!1103 = metadata !{i32 786688, metadata !1071, metadata !"l_919", metadata !5, i32 372, metadata !1104, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_919] [line 372]
+!1104 = metadata !{i32 786433, null, null, metadata !"", i32 0, i64 3200, i64 32, i32 0, i32 0, metadata !1105, metadata !1106, i32 0, i32 0} ; [ DW_TAG_array_type ] [line 0, size 3200, align 32, offset 0] [from ]
+!1105 = metadata !{i32 786447, null, null, metadata !"", i32 0, i64 32, i64 32, i64 0, i32 0, metadata !515} ; [ DW_TAG_pointer_type ] [line 0, size 32, align 32, offset 0] [from ]
+!1106 = metadata !{metadata !185, metadata !186, metadata !186}
+!1107 = metadata !{i32 372, i32 0, metadata !1071, null}
+!1108 = metadata !{%union.U4*** undef}
+!1109 = metadata !{i32 786688, metadata !1071, metadata !"l_918", metadata !5, i32 373, metadata !1110, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_918] [line 373]
+!1110 = metadata !{i32 786447, null, null, metadata !"", i32 0, i64 32, i64 32, i64 0, i32 0, metadata !1111} ; [ DW_TAG_pointer_type ] [line 0, size 32, align 32, offset 0] [from ]
+!1111 = metadata !{i32 786470, null, null, metadata !"", i32 0, i64 0, i64 0, i64 0, i32 0, metadata !1105} ; [ DW_TAG_const_type ] [line 0, size 0, align 0, offset 0] [from ]
+!1112 = metadata !{i32 373, i32 0, metadata !1071, null}
+!1113 = metadata !{%struct.S1* @func_15.l_963}
+!1114 = metadata !{i32 786688, metadata !1071, metadata !"l_963", metadata !5, i32 374, metadata !155, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_963] [line 374]
+!1115 = metadata !{i32 374, i32 0, metadata !1071, null}
+!1116 = metadata !{i32 786688, metadata !1071, metadata !"l_1004", metadata !5, i32 375, metadata !17, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_1004] [line 375]
+!1117 = metadata !{i32 375, i32 0, metadata !1071, null}
+!1118 = metadata !{%struct.S1* @g_99}
+!1119 = metadata !{i32 786688, metadata !1071, metadata !"l_1015", metadata !5, i32 376, metadata !1120, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_1015] [line 376]
+!1120 = metadata !{i32 786447, null, null, metadata !"", i32 0, i64 32, i64 32, i64 0, i32 0, metadata !155} ; [ DW_TAG_pointer_type ] [line 0, size 32, align 32, offset 0] [from S1]
+!1121 = metadata !{i32 376, i32 0, metadata !1071, null}
+!1122 = metadata !{[1 x [10 x [10 x %struct.S1***]]]* undef}
+!1123 = metadata !{i32 786688, metadata !1071, metadata !"l_1013", metadata !5, i32 378, metadata !1124, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_1013] [line 378]
+!1124 = metadata !{i32 786433, null, null, metadata !"", i32 0, i64 3200, i64 32, i32 0, i32 0, metadata !1125, metadata !1127, i32 0, i32 0} ; [ DW_TAG_array_type ] [line 0, size 3200, align 32, offset 0] [from ]
+!1125 = metadata !{i32 786447, null, null, metadata !"", i32 0, i64 32, i64 32, i64 0, i32 0, metadata !1126} ; [ DW_TAG_pointer_type ] [line 0, size 32, align 32, offset 0] [from ]
+!1126 = metadata !{i32 786447, null, null, metadata !"", i32 0, i64 32, i64 32, i64 0, i32 0, metadata !1120} ; [ DW_TAG_pointer_type ] [line 0, size 32, align 32, offset 0] [from ]
+!1127 = metadata !{metadata !221, metadata !201, metadata !201}
+!1128 = metadata !{i32 378, i32 0, metadata !1071, null}
+!1129 = metadata !{i32 786688, metadata !1071, metadata !"i", metadata !5, i32 380, metadata !8, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [i] [line 380]
+!1130 = metadata !{i32 381, i32 0, metadata !1131, null}
+!1131 = metadata !{i32 786443, metadata !1, metadata !1071, i32 381, i32 0, i32 162} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/newfail1.c]
+!1132 = metadata !{i32 383, i32 0, metadata !1133, null}
+!1133 = metadata !{i32 786443, metadata !1, metadata !1071, i32 383, i32 0, i32 163} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/newfail1.c]
+!1134 = metadata !{i32 404, i32 0, metadata !1071, null}
+!1135 = metadata !{i16 4}
+!1136 = metadata !{i32 786689, metadata !164, metadata !"p_20", metadata !5, i32 16777630, metadata !50, i32 0, i32 0} ; [ DW_TAG_arg_variable ] [p_20] [line 414]
+!1137 = metadata !{i32 414, i32 0, metadata !164, null}
+!1138 = metadata !{i32 786689, metadata !164, metadata !"p_22", metadata !5, i32 50332062, metadata !167, i32 0, i32 0} ; [ DW_TAG_arg_variable ] [p_22] [line 414]
+!1139 = metadata !{i32 786689, metadata !164, metadata !"p_23", metadata !5, i32 67109278, metadata !50, i32 0, i32 0} ; [ DW_TAG_arg_variable ] [p_23] [line 414]
+!1140 = metadata !{%struct.S1* null}
+!1141 = metadata !{i32 786688, metadata !1142, metadata !"l_578", metadata !5, i32 416, metadata !1120, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_578] [line 416]
+!1142 = metadata !{i32 786443, metadata !1, metadata !164} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/newfail1.c]
+!1143 = metadata !{i32 416, i32 0, metadata !1142, null}
+!1144 = metadata !{i32 786688, metadata !1142, metadata !"l_580", metadata !5, i32 418, metadata !515, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_580] [line 418]
+!1145 = metadata !{i32 418, i32 0, metadata !1142, null}
+!1146 = metadata !{i32 786688, metadata !1142, metadata !"l_582", metadata !5, i32 420, metadata !50, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_582] [line 420]
+!1147 = metadata !{i32 420, i32 0, metadata !1142, null}
+!1148 = metadata !{[2 x %struct.S0]* bitcast (<{ { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }, { i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } }>* @func_19.l_603 to [2 x %struct.S0]*)}
+!1149 = metadata !{i32 786688, metadata !1142, metadata !"l_603", metadata !5, i32 421, metadata !1150, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_603] [line 421]
+!1150 = metadata !{i32 786433, null, null, metadata !"", i32 0, i64 384, i64 32, i32 0, i32 0, metadata !128, metadata !591, i32 0, i32 0} ; [ DW_TAG_array_type ] [line 0, size 384, align 32, offset 0] [from S0]
+!1151 = metadata !{i32 421, i32 0, metadata !1142, null}
+!1152 = metadata !{i32 786688, metadata !1142, metadata !"l_701", metadata !5, i32 422, metadata !44, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_701] [line 422]
+!1153 = metadata !{i32 422, i32 0, metadata !1142, null}
+!1154 = metadata !{i32 1382815450}
+!1155 = metadata !{i32 786688, metadata !1142, metadata !"l_703", metadata !5, i32 423, metadata !44, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_703] [line 423]
+!1156 = metadata !{i32 423, i32 0, metadata !1142, null}
+!1157 = metadata !{i32 -508538292}
+!1158 = metadata !{i32 786688, metadata !1142, metadata !"l_705", metadata !5, i32 424, metadata !44, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_705] [line 424]
+!1159 = metadata !{i32 424, i32 0, metadata !1142, null}
+!1160 = metadata !{i32 836959364}
+!1161 = metadata !{i32 786688, metadata !1142, metadata !"l_706", metadata !5, i32 425, metadata !44, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_706] [line 425]
+!1162 = metadata !{i32 425, i32 0, metadata !1142, null}
+!1163 = metadata !{i32 -593491597}
+!1164 = metadata !{i32 786688, metadata !1142, metadata !"l_707", metadata !5, i32 426, metadata !44, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_707] [line 426]
+!1165 = metadata !{i32 426, i32 0, metadata !1142, null}
+!1166 = metadata !{i32 428, i32 0, metadata !1142, null}
+!1167 = metadata !{i32 429, i32 0, metadata !1142, null}
+!1168 = metadata !{i32 430, i32 0, metadata !1142, null}
+!1169 = metadata !{i32 634, i32 0, metadata !1170, null}
+!1170 = metadata !{i32 786443, metadata !1, metadata !1171, i32 627, i32 0, i32 110} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/newfail1.c]
+!1171 = metadata !{i32 786443, metadata !1, metadata !1172, i32 626, i32 0, i32 109} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/newfail1.c]
+!1172 = metadata !{i32 786443, metadata !1, metadata !148} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/newfail1.c]
+!1173 = metadata !{i32 786689, metadata !148, metadata !"p_32", metadata !5, i32 16777828, metadata !50, i32 0, i32 0} ; [ DW_TAG_arg_variable ] [p_32] [line 612]
+!1174 = metadata !{i32 612, i32 0, metadata !148, null}
+!1175 = metadata !{i32 786688, metadata !1172, metadata !"l_33", metadata !5, i32 614, metadata !1176, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_33] [line 614]
+!1176 = metadata !{i32 786433, null, null, metadata !"", i32 0, i64 64, i64 32, i32 0, i32 0, metadata !17, metadata !591, i32 0, i32 0} ; [ DW_TAG_array_type ] [line 0, size 64, align 32, offset 0] [from uint32_t]
+!1177 = metadata !{i32 614, i32 0, metadata !1172, null}
+!1178 = metadata !{%struct.S3* @func_31.l_43}
+!1179 = metadata !{i32 786688, metadata !1172, metadata !"l_43", metadata !5, i32 615, metadata !37, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_43] [line 615]
+!1180 = metadata !{i32 615, i32 0, metadata !1172, null}
+!1181 = metadata !{[7 x %union.U4]* @func_31.l_406}
+!1182 = metadata !{i32 786688, metadata !1172, metadata !"l_406", metadata !5, i32 617, metadata !1183, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_406] [line 617]
+!1183 = metadata !{i32 786433, null, null, metadata !"", i32 0, i64 224, i64 32, i32 0, i32 0, metadata !85, metadata !1010, i32 0, i32 0} ; [ DW_TAG_array_type ] [line 0, size 224, align 32, offset 0] [from U4]
+!1184 = metadata !{i32 617, i32 0, metadata !1172, null}
+!1185 = metadata !{i32 786688, metadata !1172, metadata !"l_462", metadata !5, i32 618, metadata !44, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_462] [line 618]
+!1186 = metadata !{i32 618, i32 0, metadata !1172, null}
+!1187 = metadata !{i32 786688, metadata !1172, metadata !"i", metadata !5, i32 621, metadata !8, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [i] [line 621]
+!1188 = metadata !{i32 622, i32 0, metadata !1189, null}
+!1189 = metadata !{i32 786443, metadata !1, metadata !1172, i32 622, i32 0, i32 107} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/newfail1.c]
+!1190 = metadata !{i32 623, i32 0, metadata !1189, null}
+!1191 = metadata !{i32 626, i32 0, metadata !1171, null}
+!1192 = metadata !{i32 786688, metadata !1170, metadata !"l_44", metadata !5, i32 628, metadata !288, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_44] [line 628]
+!1193 = metadata !{i32 628, i32 0, metadata !1170, null}
+!1194 = metadata !{i32 786688, metadata !1170, metadata !"l_48", metadata !5, i32 629, metadata !288, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_48] [line 629]
+!1195 = metadata !{i32 629, i32 0, metadata !1170, null}
+!1196 = metadata !{i32** @g_304}
+!1197 = metadata !{i32 786688, metadata !1170, metadata !"l_458", metadata !5, i32 631, metadata !267, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_458] [line 631]
+!1198 = metadata !{i32 631, i32 0, metadata !1170, null}
+!1199 = metadata !{%struct.S0* bitcast ({ i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }* @g_108 to %struct.S0*)}
+!1200 = metadata !{i32 786688, metadata !1170, metadata !"l_461", metadata !5, i32 632, metadata !1201, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_461] [line 632]
+!1201 = metadata !{i32 786447, null, null, metadata !"", i32 0, i64 32, i64 32, i64 0, i32 0, metadata !128} ; [ DW_TAG_pointer_type ] [line 0, size 32, align 32, offset 0] [from S0]
+!1202 = metadata !{i32 632, i32 0, metadata !1170, null}
+!1203 = metadata !{i32 635, i32 0, metadata !1204, null}
+!1204 = metadata !{i32 786443, metadata !1, metadata !1170, i32 635, i32 0, i32 111} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/newfail1.c]
+!1205 = metadata !{i32 643, i32 0, metadata !1172, null}
+!1206 = metadata !{i32 644, i32 0, metadata !1172, null}
+!1207 = metadata !{i32 786689, metadata !146, metadata !"ui1", metadata !53, i32 16777878, metadata !45, i32 0, i32 0} ; [ DW_TAG_arg_variable ] [ui1] [line 662]
+!1208 = metadata !{i32 662, i32 0, metadata !146, null}
+!1209 = metadata !{i32 786689, metadata !146, metadata !"ui2", metadata !53, i32 33555094, metadata !45, i32 0, i32 0} ; [ DW_TAG_arg_variable ] [ui2] [line 662]
+!1210 = metadata !{i32 665, i32 0, metadata !146, null}
+!1211 = metadata !{i32 786689, metadata !138, metadata !"left", metadata !53, i32 16777831, metadata !32, i32 0, i32 0} ; [ DW_TAG_arg_variable ] [left] [line 615]
+!1212 = metadata !{i32 615, i32 0, metadata !138, null}
+!1213 = metadata !{i32 786689, metadata !138, metadata !"right", metadata !53, i32 33555047, metadata !8, i32 0, i32 0} ; [ DW_TAG_arg_variable ] [right] [line 615]
+!1214 = metadata !{i32 618, i32 0, metadata !138, null}
+!1215 = metadata !{i32 786689, metadata !151, metadata !"p_41", metadata !5, i32 50332333, metadata !50, i32 0, i32 0} ; [ DW_TAG_arg_variable ] [p_41] [line 685]
+!1216 = metadata !{i32 685, i32 0, metadata !151, null}
+!1217 = metadata !{i8 -1}
+!1218 = metadata !{i32 786688, metadata !151, metadata !"l_172", metadata !5, i32 687, metadata !59, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_172] [line 687]
+!1219 = metadata !{i32 687, i32 0, metadata !151, null}
+!1220 = metadata !{i32 786688, metadata !151, metadata !"l_175", metadata !5, i32 688, metadata !50, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_175] [line 688]
+!1221 = metadata !{i32 688, i32 0, metadata !151, null}
+!1222 = metadata !{i32*** undef}
+!1223 = metadata !{i32 786688, metadata !151, metadata !"l_173", metadata !5, i32 690, metadata !266, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_173] [line 690]
+!1224 = metadata !{i32 690, i32 0, metadata !151, null}
+!1225 = metadata !{%struct.S2* bitcast ({ i8, i8, [2 x i8] }* @func_38.l_176 to %struct.S2*)}
+!1226 = metadata !{i32 786688, metadata !151, metadata !"l_176", metadata !5, i32 691, metadata !190, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_176] [line 691]
+!1227 = metadata !{i32 691, i32 0, metadata !151, null}
+!1228 = metadata !{i8* getelementptr inbounds (%struct.S1* @g_99, i32 0, i32 2)}
+!1229 = metadata !{i32 786688, metadata !151, metadata !"l_177", metadata !5, i32 692, metadata !1230, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_177] [line 692]
+!1230 = metadata !{i32 786447, null, null, metadata !"", i32 0, i64 32, i64 32, i64 0, i32 0, metadata !32} ; [ DW_TAG_pointer_type ] [line 0, size 32, align 32, offset 0] [from uint8_t]
+!1231 = metadata !{i32 692, i32 0, metadata !151, null}
+!1232 = metadata !{%union.U4* @g_183}
+!1233 = metadata !{i32 786688, metadata !151, metadata !"l_182", metadata !5, i32 693, metadata !515, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_182] [line 693]
+!1234 = metadata !{i32 693, i32 0, metadata !151, null}
+!1235 = metadata !{%struct.S2* null}
+!1236 = metadata !{i32 786688, metadata !151, metadata !"l_195", metadata !5, i32 694, metadata !551, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_195] [line 694]
+!1237 = metadata !{i32 694, i32 0, metadata !151, null}
+!1238 = metadata !{i32 76507872}
+!1239 = metadata !{i32 786688, metadata !151, metadata !"l_254", metadata !5, i32 696, metadata !44, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_254] [line 696]
+!1240 = metadata !{i32 696, i32 0, metadata !151, null}
+!1241 = metadata !{i8 0}
+!1242 = metadata !{i32 786688, metadata !151, metadata !"l_255", metadata !5, i32 697, metadata !59, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_255] [line 697]
+!1243 = metadata !{i32 697, i32 0, metadata !151, null}
+!1244 = metadata !{%struct.S0* undef}
+!1245 = metadata !{i32 786688, metadata !151, metadata !"l_262", metadata !5, i32 698, metadata !128, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_262] [line 698]
+!1246 = metadata !{i32 698, i32 0, metadata !151, null}
+!1247 = metadata !{%struct.S3* @func_38.l_293}
+!1248 = metadata !{i32 786688, metadata !151, metadata !"l_293", metadata !5, i32 699, metadata !37, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_293] [line 699]
+!1249 = metadata !{i32 699, i32 0, metadata !151, null}
+!1250 = metadata !{i16 -15174}
+!1251 = metadata !{i32 786688, metadata !151, metadata !"l_350", metadata !5, i32 700, metadata !45, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_350] [line 700]
+!1252 = metadata !{i32 700, i32 0, metadata !151, null}
+!1253 = metadata !{i32 613018610}
+!1254 = metadata !{i32 786688, metadata !151, metadata !"l_365", metadata !5, i32 701, metadata !44, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_365] [line 701]
+!1255 = metadata !{i32 701, i32 0, metadata !151, null}
+!1256 = metadata !{i32 786688, metadata !151, metadata !"l_378", metadata !5, i32 702, metadata !1257, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_378] [line 702]
+!1257 = metadata !{i32 786433, null, null, metadata !"", i32 0, i64 128, i64 32, i32 0, i32 0, metadata !17, metadata !682, i32 0, i32 0} ; [ DW_TAG_array_type ] [line 0, size 128, align 32, offset 0] [from uint32_t]
+!1258 = metadata !{i32 702, i32 0, metadata !151, null}
+!1259 = metadata !{%struct.S1* getelementptr inbounds ([9 x [3 x [7 x %struct.S1]]]* @g_404, i32 0, i32 2, i32 0, i32 0)}
+!1260 = metadata !{i32 786688, metadata !151, metadata !"l_403", metadata !5, i32 703, metadata !276, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_403] [line 703]
+!1261 = metadata !{i32 703, i32 0, metadata !151, null}
+!1262 = metadata !{i32 786688, metadata !151, metadata !"i", metadata !5, i32 704, metadata !8, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [i] [line 704]
+!1263 = metadata !{i32 705, i32 0, metadata !1264, null}
+!1264 = metadata !{i32 786443, metadata !1, metadata !151, i32 705, i32 0, i32 113} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/newfail1.c]
+!1265 = metadata !{i32 707, i32 0, metadata !151, null}
+!1266 = metadata !{i32 708, i32 0, metadata !151, null}
+!1267 = metadata !{i32 1089739706}
+!1268 = metadata !{i32 786688, metadata !1269, metadata !"l_178", metadata !5, i32 710, metadata !17, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_178] [line 710]
+!1269 = metadata !{i32 786443, metadata !1, metadata !151, i32 709, i32 0, i32 114} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/newfail1.c]
+!1270 = metadata !{i32 710, i32 0, metadata !1269, null}
+!1271 = metadata !{i32 8}
+!1272 = metadata !{i32 786688, metadata !1269, metadata !"l_179", metadata !5, i32 711, metadata !44, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_179] [line 711]
+!1273 = metadata !{i32 711, i32 0, metadata !1269, null}
+!1274 = metadata !{i32 786688, metadata !1269, metadata !"l_186", metadata !5, i32 712, metadata !723, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_186] [line 712]
+!1275 = metadata !{i32 712, i32 0, metadata !1269, null}
+!1276 = metadata !{i32 786688, metadata !1269, metadata !"l_217", metadata !5, i32 713, metadata !128, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_217] [line 713]
+!1277 = metadata !{i32 713, i32 0, metadata !1269, null}
+!1278 = metadata !{[5 x [5 x [8 x i32]]]* undef}
+!1279 = metadata !{i32 786688, metadata !1269, metadata !"l_259", metadata !5, i32 714, metadata !1280, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [l_259] [line 714]
+!1280 = metadata !{i32 786433, null, null, metadata !"", i32 0, i64 6400, i64 32, i32 0, i32 0, metadata !17, metadata !1281, i32 0, i32 0} ; [ DW_TAG_array_type ] [line 0, size 6400, align 32, offset 0] [from uint32_t]
+!1281 = metadata !{metadata !186, metadata !186, metadata !202}
+!1282 = metadata !{i32 714, i32 0, metadata !1269, null}
+!1283 = metadata !{i32 715, i32 0, metadata !1269, null}
+!1284 = metadata !{i32 720, i32 0, metadata !1285, null}
+!1285 = metadata !{i32 786443, metadata !1, metadata !1269, i32 720, i32 0, i32 115} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/newfail1.c]
+!1286 = metadata !{i32 810, i32 0, metadata !1269, null}
+!1287 = metadata !{i32 786689, metadata !168, metadata !"left", metadata !53, i32 16777322, metadata !59, i32 0, i32 0} ; [ DW_TAG_arg_variable ] [left] [line 106]
+!1288 = metadata !{i32 106, i32 0, metadata !168, null}
+!1289 = metadata !{i32 786689, metadata !168, metadata !"right", metadata !53, i32 33554538, metadata !19, i32 0, i32 0} ; [ DW_TAG_arg_variable ] [right] [line 106]
+!1290 = metadata !{i32 109, i32 0, metadata !1291, null}
+!1291 = metadata !{i32 786443, metadata !52, metadata !168} ; [ DW_TAG_lexical_block ] [/home/alon/Dev/emscripten/tests/fuzz/./safe_math.h]
diff --git a/tests/cases/fuzz6_ta2.txt b/tests/cases/fuzz6_ta2.txt
new file mode 100644
index 00000000..00e8a313
--- /dev/null
+++ b/tests/cases/fuzz6_ta2.txt
@@ -0,0 +1 @@
+checksum = F4711189
diff --git a/tests/cases/i96shiftnon32_ta2.ll b/tests/cases/i96shiftnon32_ta2.ll
new file mode 100644
index 00000000..55e84575
--- /dev/null
+++ b/tests/cases/i96shiftnon32_ta2.ll
@@ -0,0 +1,44 @@
+; ModuleID = '/tmp/tmpxFUbAg/test_emcc1.bc'
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
+target triple = "le32-unknown-nacl"
+
+%struct.c_s = type { i8, float, i32 }
+
+@.str = private unnamed_addr constant [12 x i8] c"RESULT: %d\0A\00", align 1
+
+define internal fastcc void @f2(%struct.c_s* noalias nocapture sret %agg.result) nounwind {
+ %agg.result.1 = getelementptr inbounds %struct.c_s* %agg.result, i32 0, i32 1
+ store float 0.000000e+00, float* %agg.result.1, align 4
+ %agg.result.2 = getelementptr inbounds %struct.c_s* %agg.result, i32 0, i32 2
+ store i32 43110, i32* %agg.result.2, align 4
+ ret void
+}
+
+define internal fastcc void @f1(%struct.c_s* nocapture %tp) nounwind {
+ %1 = alloca %struct.c_s, align 8
+ call fastcc void @f2(%struct.c_s* sret %1)
+ %2 = bitcast %struct.c_s* %1 to i96*
+ %srcval1 = load i96* %2, align 8
+ %small = trunc i96 %srcval1 to i64
+ %large = zext i64 %small to i96
+ %return = or i96 %srcval1, %large
+ %3 = lshr i96 %return, 4
+ %4 = shl i96 %3, 2
+ %5 = bitcast %struct.c_s* %tp to i96*
+ store i96 %4, i96* %5, align 4
+ ret void
+}
+
+define i32 @main() nounwind {
+ %t = alloca %struct.c_s, align 4
+ %1 = getelementptr inbounds %struct.c_s* %t, i32 0, i32 1
+ store float 1.000000e+00, float* %1, align 4
+ call fastcc void @f1(%struct.c_s* %t)
+ %2 = getelementptr inbounds %struct.c_s* %t, i32 0, i32 2
+ %3 = load i32* %2, align 4
+ %4 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([12 x i8]* @.str, i32 0, i32 0), i32 %3) nounwind
+ ret i32 0
+}
+
+declare i32 @printf(i8* nocapture, ...) nounwind
+
diff --git a/tests/cases/i96shiftnon32_ta2.txt b/tests/cases/i96shiftnon32_ta2.txt
new file mode 100644
index 00000000..1e26a65f
--- /dev/null
+++ b/tests/cases/i96shiftnon32_ta2.txt
@@ -0,0 +1 @@
+RESULT: 10777
diff --git a/tests/cases/legalizer_b_ta2.ll b/tests/cases/legalizer_b_ta2.ll
new file mode 100644
index 00000000..a6214100
--- /dev/null
+++ b/tests/cases/legalizer_b_ta2.ll
@@ -0,0 +1,179 @@
+; ModuleID = 'tests/hello_world.bc'
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
+target triple = "le32-unknown-nacl"
+
+@globaliz = global [300 x i8] zeroinitializer
+
+define i64 @retter(i64 %x) {
+ store i128 0, i128* bitcast ([300 x i8]* @globaliz to i128*), align 4 ; wipe it out
+ store i64 %x, i64* bitcast ([300 x i8]* @globaliz to i64*), align 4
+ call i32 (i8*)* @puts(i8* bitcast ([300 x i8]* @globaliz to i8*))
+ ret i64 7017280452245743464
+}
+
+define i32 @main() {
+entry:
+ %buffer = alloca i8, i32 1000, align 4
+ %bundled = bitcast i8* %buffer to i128*
+ store i128 8583909746840200552, i128* %bundled, align 4 ; hello world in there
+ call i32 (i8*)* @puts(i8* %buffer)
+
+ %loaded = load i128* %bundled, align 4 ; save for later
+
+ %backcast = bitcast i128* %bundled to i8*
+ call i32 (i8*)* @puts(i8* %backcast)
+
+ %temp.buffer = bitcast i8* %buffer to [0 x i8]*
+ %buffer1 = getelementptr [0 x i8]* %temp.buffer, i32 0, i32 1
+ %bundled1 = bitcast i8* %buffer1 to i128*
+ store i128 9862834326869351064, i128* %bundled1, align 1 ; unaligned
+ call i32 (i8*)* @puts(i8* %buffer)
+
+; shifts
+ %shifted = lshr i128 %loaded, 16
+ store i128 %shifted, i128* %bundled, align 4
+ call i32 (i8*)* @puts(i8* %buffer)
+ %shifted2 = lshr i128 %loaded, 32
+ store i128 %shifted2, i128* %bundled, align 4
+ call i32 (i8*)* @puts(i8* %buffer)
+
+; store %loaded, make sure has not been modified
+ store i128 %loaded, i128* %bundled, align 4
+ call i32 (i8*)* @puts(i8* %buffer)
+
+ %shifted3 = shl i128 %loaded, 8
+ store i128 %shifted3, i128* %bundled, align 4
+ store i8 113, i8* %buffer ; remove initial 0 ; 'q'
+ call i32 (i8*)* @puts(i8* %buffer)
+
+; trunc
+ %shifted4 = shl i128 %loaded, 64
+ store i128 %shifted4, i128* %bundled, align 4
+ %nonzero64 = trunc i128 %loaded to i64 ; remove initial zeros
+ %bundled64 = bitcast i128* %bundled to i64*
+ store i64 %nonzero64, i64* %bundled64, align 4
+; call i32 (i8*)* @puts(i8* %buffer)
+
+ store i128 0, i128* %bundled, align 4 ; wipe it out
+ %small32 = trunc i128 %loaded to i32
+ %buffer32 = bitcast i8* %buffer to i32*
+ store i32 %small32, i32* %buffer32, align 4
+; call i32 (i8*)* @puts(i8* %buffer)
+
+ store i128 0, i128* %bundled, align 4 ; wipe it out
+ %small16 = trunc i128 %loaded to i16
+ %buffer16 = bitcast i8* %buffer to i16*
+ store i16 %small16, i16* %buffer16, align 4
+ call i32 (i8*)* @puts(i8* %buffer)
+
+ store i128 0, i128* %bundled, align 4 ; wipe it out
+ %small64 = trunc i128 %loaded to i64
+ %buffer64 = bitcast i8* %buffer to i64*
+ store i64 %small64, i64* %buffer64, align 4
+ call i32 (i8*)* @puts(i8* %buffer)
+
+; zext
+ store i128 0, i128* %bundled, align 4 ; wipe it out
+ %pre32 = or i32 6382179, 0
+ %big = zext i32 %pre32 to i128
+ store i128 %big, i128* %bundled, align 4
+ call i32 (i8*)* @puts(i8* %buffer)
+
+ store i128 0, i128* %bundled, align 4 ; wipe it out
+ %pre64 = zext i32 1684366951 to i64
+ %post64 = shl i64 %pre64, 32
+ %big64 = or i64 %pre64, %post64
+ %bigb = zext i64 %big64 to i128
+ store i128 %bigb, i128* %bundled, align 4
+ call i32 (i8*)* @puts(i8* %buffer)
+
+; or, and, xor
+ %ored = or i128 %loaded, 107752139522048 ; constant
+ store i128 %ored, i128* %bundled, align 4
+ call i32 (i8*)* @puts(i8* %buffer)
+
+ %ander = trunc i128 18402271027389267967 to i128
+ %anded = and i128 %loaded, %ander ; variable
+ store i128 %anded, i128* %bundled, align 4
+ call i32 (i8*)* @puts(i8* %buffer)
+
+ %xored = xor i128 %loaded, 0
+ store i128 %xored, i128* %bundled, align 4
+ call i32 (i8*)* @puts(i8* %buffer)
+
+; unfolding
+ store i128 %loaded, i128* bitcast ([300 x i8]* @globaliz to i128*), align 4
+ %loaded.short = load i96* bitcast ([300 x i8]* @globaliz to i96*), align 4
+ store i128 0, i128* bitcast ([300 x i8]* @globaliz to i128*), align 4
+ store i96 %loaded.short, i96* bitcast ([300 x i8]* @globaliz to i96*), align 4
+ call i32 (i8*)* @puts(i8* bitcast ([300 x i8]* @globaliz to i8*))
+
+; phi
+ %if = trunc i128 %ander to i1
+ %first = trunc i128 %xored to i96
+ br i1 %if, label %a17, label %a26
+
+a17:
+ %second = trunc i128 %loaded to i96
+ br label %a26
+
+a26:
+ %a27 = phi i96 [ %first, %entry ], [ %second, %a17 ]
+ store i128 0, i128* %bundled, align 4 ; wipe it out
+ store i96 %a27, i96* bitcast ([300 x i8]* @globaliz to i96*), align 4
+ call i32 (i8*)* @puts(i8* bitcast ([300 x i8]* @globaliz to i8*))
+
+; phi with constants
+ br i1 %if, label %a17b, label %a26b
+
+a17b:
+ br label %a26b
+
+a26b:
+ %a27b = phi i64 [ 55, %a26 ], [ 57, %a17b ]
+ store i128 0, i128* %bundled, align 4 ; wipe it out
+ store i64 %a27b, i64* bitcast ([300 x i8]* @globaliz to i64*), align 4
+ call i32 (i8*)* @puts(i8* bitcast ([300 x i8]* @globaliz to i8*))
+
+ store i128 %ored, i128* %bundled, align 4
+ %iff = zext i1 %if to i64
+ switch i64 %iff, label %a50 [
+ i64 1, label %a30
+ i64 0, label %a40
+ ]
+
+a50:
+ store i128 %xored, i128* %bundled, align 4
+ br label %a40
+
+a30:
+ store i128 %anded, i128* %bundled, align 4
+ br label %a40
+
+a40:
+ call i32 (i8*)* @puts(i8* %buffer)
+
+; invoke return value
+
+ %inv64 = invoke i64 @retter(i64 8174723217654970232)
+ to label %a100 unwind label %a111
+
+a100:
+ store i128 0, i128* bitcast ([300 x i8]* @globaliz to i128*), align 4 ; wipe it out
+ store i64 %inv64, i64* bitcast ([300 x i8]* @globaliz to i64*), align 4
+ call i32 (i8*)* @puts(i8* bitcast ([300 x i8]* @globaliz to i8*))
+ br label %done
+
+a111:
+ %aaaa79 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
+ cleanup
+ br label %done
+
+done:
+ ret i32 1
+}
+
+declare i32 @puts(i8*)
+declare i32 @__gxx_personality_v0(...)
+declare void @__cxa_throw(i32, i32, i32) ; for asm1, where exceptions are enabled but this test needs a throw to bring in lib stuff
+
diff --git a/tests/cases/legalizer_b_ta2.txt b/tests/cases/legalizer_b_ta2.txt
new file mode 100644
index 00000000..27097159
--- /dev/null
+++ b/tests/cases/legalizer_b_ta2.txt
@@ -0,0 +1,20 @@
+hello, w
+hello, w
+h𚓓𓟈
+llo, w
+o, w
+hello, w
+qhello, w
+he
+hello, w
+cba
+gfedgfed
+hellon w
+hello, w
+hello, w
+hello, w
+hello, w
+9
+hello, w
+xwvutsrq
+hgfedcba
diff --git a/tests/codemods.cpp b/tests/codemods.cpp
new file mode 100644
index 00000000..26712339
--- /dev/null
+++ b/tests/codemods.cpp
@@ -0,0 +1,21 @@
+#include <stdio.h>
+#include <math.h>
+#include <emscripten.h>
+
+int main() {
+ volatile int x = 10;
+ float y = 123456789.123456789;
+ while (x-- > 0) {
+ y = (sqrtf(y) + y)/2;
+ }
+ double d = y;
+ double diff = fabs(d - 121376.4609375000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000);
+ int ok = fabs(diff) < 0.000001;
+ printf("%.20f : %d\n", diff, ok);
+
+ int result;
+ if (ok) result = 1;
+ else result = diff+2; // add two to this >= number to avoid conflicts with 1
+ REPORT_RESULT();
+}
+
diff --git a/tests/core/test_exceptions_alias.c b/tests/core/test_exceptions_alias.c
new file mode 100644
index 00000000..0c8cc37a
--- /dev/null
+++ b/tests/core/test_exceptions_alias.c
@@ -0,0 +1,15 @@
+#define _POSIX_SOURCE
+#include <locale.h>
+#include <ctype.h>
+#include <stdio.h>
+
+int main(void) {
+ try {
+ printf("*%i*\n", isdigit('0'));
+ printf("*%i*\n", isdigit_l('0', LC_GLOBAL_LOCALE));
+ }
+ catch (...) {
+ printf("EXCEPTION!\n");
+ }
+}
+
diff --git a/tests/core/test_exceptions_alias.out b/tests/core/test_exceptions_alias.out
new file mode 100644
index 00000000..2f67e501
--- /dev/null
+++ b/tests/core/test_exceptions_alias.out
@@ -0,0 +1,2 @@
+*1*
+*1*
diff --git a/tests/core/test_exceptions_white_list_2.c b/tests/core/test_exceptions_white_list_2.c
new file mode 100644
index 00000000..40d7c56c
--- /dev/null
+++ b/tests/core/test_exceptions_white_list_2.c
@@ -0,0 +1,27 @@
+#include <stdio.h>
+
+void throwhere(void) {
+ throw(1);
+}
+
+void (*funptr)(void) = throwhere;
+
+void nocatch(void) {
+ try {
+ funptr();
+ }
+ catch (...) {
+ printf("ERROR\n");
+ }
+}
+
+int main(void) {
+ try {
+ nocatch();
+ }
+ catch (...) {
+ printf("SUCCESS\n");
+ }
+ return 0;
+}
+
diff --git a/tests/core/test_exceptions_white_list_2.out b/tests/core/test_exceptions_white_list_2.out
new file mode 100644
index 00000000..ff43ca40
--- /dev/null
+++ b/tests/core/test_exceptions_white_list_2.out
@@ -0,0 +1 @@
+SUCCESS
diff --git a/tests/core/test_memcpy3.c b/tests/core/test_memcpy3.c
new file mode 100644
index 00000000..1bf47be6
--- /dev/null
+++ b/tests/core/test_memcpy3.c
@@ -0,0 +1,51 @@
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+
+#define TOTAL 10240
+
+#define TEST(size, type) { \
+ for (int i = 0; i < TOTAL; i++) { \
+ buffer[i] = i*seed; \
+ } \
+ memcpy(buffer, buffer+size+1, size*sizeof(type)); \
+ int v = 0; \
+ for (int i = 0; i < TOTAL; i++) { \
+ v += buffer[i]; \
+ } \
+ printf("final %d:%d\n", size, v); \
+}
+
+int main() {
+ #define RUN(type) \
+ { \
+ type buffer[TOTAL]; \
+ volatile int seed = 123; \
+ TEST(1, type); \
+ TEST(2, type); \
+ TEST(3, type); \
+ TEST(4, type); \
+ TEST(5, type); \
+ TEST(6, type); \
+ TEST(7, type); \
+ TEST(8, type); \
+ TEST(9, type); \
+ TEST(10, type); \
+ TEST(16, type); \
+ TEST(32, type); \
+ TEST(64, type); \
+ TEST(128, type); \
+ TEST(256, type); \
+ TEST(512, type); \
+ TEST(1024, type); \
+ for (int x = 10; x < 100; x += 10) { TEST(x, type) }; \
+ }
+ printf("8\n");
+ RUN(unsigned char);
+ printf("16\n");
+ RUN(unsigned short);
+ printf("32\n");
+ RUN(unsigned);
+ return 1;
+}
+
diff --git a/tests/core/test_memcpy3.out b/tests/core/test_memcpy3.out
new file mode 100644
index 00000000..6f39e709
--- /dev/null
+++ b/tests/core/test_memcpy3.out
@@ -0,0 +1,81 @@
+8
+final 1:1305846
+final 2:1305826
+final 3:1305796
+final 4:1305756
+final 5:1305706
+final 6:1305646
+final 7:1305576
+final 8:1305496
+final 9:1305406
+final 10:1305306
+final 16:1305264
+final 32:1305696
+final 64:1305024
+final 128:1305728
+final 256:1305600
+final 512:1305600
+final 1024:1305600
+final 10:1305306
+final 20:1305548
+final 30:1305814
+final 40:1305336
+final 50:1305906
+final 60:1305476
+final 70:1305582
+final 80:1305712
+final 90:1304842
+16
+final 1:332555510
+final 2:332556002
+final 3:332556740
+final 4:332557724
+final 5:332558954
+final 6:332560430
+final 7:332562152
+final 8:332564120
+final 9:332566334
+final 10:332568794
+final 16:332588720
+final 32:332685152
+final 64:333066944
+final 128:334586240
+final 256:340647680
+final 512:332618240
+final 1024:332812288
+final 10:332568794
+final 20:332606924
+final 30:332669654
+final 40:332756984
+final 50:332868914
+final 60:333005444
+final 70:333166574
+final 80:333352304
+final 90:333562634
+32
+final 1:-2141821706
+final 2:-2141821214
+final 3:-2141820476
+final 4:-2141819492
+final 5:-2141818262
+final 6:-2141816786
+final 7:-2141815064
+final 8:-2141813096
+final 9:-2141810882
+final 10:-2141808422
+final 16:-2141788496
+final 32:-2141692064
+final 64:-2141310272
+final 128:-2139790976
+final 256:-2133729536
+final 512:-2109515264
+final 1024:-2012721152
+final 10:-2141808422
+final 20:-2141770292
+final 30:-2141707562
+final 40:-2141620232
+final 50:-2141508302
+final 60:-2141371772
+final 70:-2141210642
+final 80:-2141024912
+final 90:-2140814582
diff --git a/tests/core/test_memset.c b/tests/core/test_memset.c
new file mode 100644
index 00000000..747765f2
--- /dev/null
+++ b/tests/core/test_memset.c
@@ -0,0 +1,51 @@
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+
+#define TOTAL 10240
+
+#define TEST(size, type) { \
+ for (int i = 0; i < TOTAL; i++) { \
+ buffer[i] = i*seed; \
+ } \
+ memset(buffer+size%17, 0xA5, size); \
+ int v = 0; \
+ for (int i = 0; i < TOTAL; i++) { \
+ v += buffer[i]; \
+ } \
+ printf("final %d:%d\n", size, v); \
+}
+
+int main() {
+ #define RUN(type) \
+ { \
+ type buffer[TOTAL]; \
+ volatile int seed = 123; \
+ TEST(1, type); \
+ TEST(2, type); \
+ TEST(3, type); \
+ TEST(4, type); \
+ TEST(5, type); \
+ TEST(6, type); \
+ TEST(7, type); \
+ TEST(8, type); \
+ TEST(9, type); \
+ TEST(10, type); \
+ TEST(16, type); \
+ TEST(32, type); \
+ TEST(64, type); \
+ TEST(128, type); \
+ TEST(256, type); \
+ TEST(512, type); \
+ TEST(1024, type); \
+ for (int x = 10; x < 100; x += 10) { TEST(x, type) }; \
+ }
+ printf("8\n");
+ RUN(unsigned char);
+ printf("16\n");
+ RUN(unsigned short);
+ printf("32\n");
+ RUN(unsigned);
+ return 1;
+}
+
diff --git a/tests/core/test_memset.out b/tests/core/test_memset.out
new file mode 100644
index 00000000..7517e6ba
--- /dev/null
+++ b/tests/core/test_memset.out
@@ -0,0 +1,81 @@
+8
+final 1:1305642
+final 2:1305571
+final 3:1305643
+final 4:1305602
+final 5:1305704
+final 6:1305693
+final 7:1305825
+final 8:1305844
+final 9:1306006
+final 10:1306055
+final 16:1306280
+final 32:1307056
+final 64:1308384
+final 128:1310400
+final 256:1315200
+final 512:1324800
+final 1024:1344000
+final 10:1306055
+final 20:1306310
+final 30:1306867
+final 40:1307060
+final 50:1307463
+final 60:1307850
+final 70:1308037
+final 80:1308424
+final 90:1308805
+16
+final 1:332555306
+final 2:332597423
+final 3:332597229
+final 4:332638967
+final 5:332638793
+final 6:332679896
+final 7:332679486
+final 8:332720210
+final 9:332719820
+final 10:332759909
+final 16:332875316
+final 32:333189464
+final 64:333800048
+final 128:334950368
+final 256:336967616
+final 512:339333248
+final 1024:337924352
+final 10:332759909
+final 20:332970089
+final 30:333154439
+final 40:333365234
+final 50:333529289
+final 60:333740699
+final 70:333957644
+final 80:334096484
+final 90:334314044
+32
+final 1:-2141821910
+final 2:-2141779793
+final 3:-2130966476
+final 4:637274041
+final 5:637273857
+final 6:637315339
+final 7:648128533
+final 8:-878598369
+final 9:-878598523
+final 10:-878557932
+final 16:384620786
+final 32:-1383904756
+final 64:-625991496
+final 128:889823216
+final 256:-373561888
+final 512:1394178624
+final 1024:633133696
+final 10:-878557932
+final 20:-1131244490
+final 30:132010428
+final 40:-120673793
+final 50:1142572023
+final 60:889890139
+final 70:-2141802805
+final 80:1900447306
+final 90:-1131244285
diff --git a/tests/core/test_sscanf.in b/tests/core/test_sscanf.in
index d5289fe5..55a310c5 100644
--- a/tests/core/test_sscanf.in
+++ b/tests/core/test_sscanf.in
@@ -64,6 +64,7 @@ int main() {
}
char buf1[100], buf2[100], buf3[100], buf4[100];
+ memset(buf4, 0, 100);
int numItems = sscanf("level=4:ref=3", "%255[^:=]=%255[^:]:%255[^=]=%255c",
buf1, buf2, buf3, buf4);
diff --git a/tests/core/test_sscanf_6.in b/tests/core/test_sscanf_6.in
index 63ede53f..e0541670 100644
--- a/tests/core/test_sscanf_6.in
+++ b/tests/core/test_sscanf_6.in
@@ -11,4 +11,18 @@ int main() {
i = sscanf(date, "%d.%d.%3c", &d, &m, c);
printf("date: %s; day %2d, month %2d, year %4d, extra: %s, %d\n", date, d, m,
y, c, i);
+
+ {
+ char *date = "18.07.2013", c;
+ int y, m, d, i;
+ if ((i = sscanf(date, "%d.%d.%4d%c", &d, &m, &y, &c)) == 3)
+ {
+ printf("date: %s; day %2d, month %2d, year %4d \n", date, d, m, y);
+ }
+ else
+ {
+ printf("Error in sscanf: actually parsed %d", i);
+ }
+ }
}
+
diff --git a/tests/core/test_sscanf_6.out b/tests/core/test_sscanf_6.out
index 4aee073e..7256b03b 100644
--- a/tests/core/test_sscanf_6.out
+++ b/tests/core/test_sscanf_6.out
@@ -1,2 +1,3 @@
date: 18.07.2013w; day 18, month 7, year 2013, extra: w, 4
date: 18.07.2013w; day 18, month 7, year 2013, extra: 201, 3
+date: 18.07.2013; day 18, month 7, year 2013
diff --git a/tests/core/test_strcmp_uni.out b/tests/core/test_strcmp_uni.out
index 58e237d7..ebfe2c8e 100644
--- a/tests/core/test_strcmp_uni.out
+++ b/tests/core/test_strcmp_uni.out
@@ -1,3 +1,3 @@
-Compare value strncmp is -1
-Compare value strncasecmp is -1
-Compare value memcmp is -1
+Compare value strncmp is -108
+Compare value strncasecmp is -76
+Compare value memcmp is -108
diff --git a/tests/cubegeom_proc.c b/tests/cubegeom_proc.c
new file mode 100644
index 00000000..e80b9b31
--- /dev/null
+++ b/tests/cubegeom_proc.c
@@ -0,0 +1,331 @@
+/*
+THIS WORK, INCLUDING THE SOURCE CODE, DOCUMENTATION
+AND RELATED MEDIA AND DATA, IS PLACED INTO THE PUBLIC DOMAIN.
+
+THE ORIGINAL AUTHOR IS KYLE FOLEY.
+
+THIS SOFTWARE IS PROVIDED AS-IS WITHOUT WARRANTY
+OF ANY KIND, NOT EVEN THE IMPLIED WARRANTY OF
+MERCHANTABILITY. THE AUTHOR OF THIS SOFTWARE,
+ASSUMES _NO_ RESPONSIBILITY FOR ANY CONSEQUENCE
+RESULTING FROM THE USE, MODIFICATION, OR
+REDISTRIBUTION OF THIS SOFTWARE.
+*/
+
+#if !EMSCRIPTEN
+#define USE_GLEW 1
+#endif
+
+#if USE_GLEW
+#include "GL/glew.h"
+#endif
+
+#include "SDL/SDL.h"
+#if !USE_GLEW
+#include "SDL/SDL_opengl.h"
+#endif
+
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+
+extern void *getBindBuffer();
+
+void (*_glBindBuffer)(unsigned, unsigned) = NULL;
+
+int main(int argc, char *argv[])
+{
+ _glBindBuffer = (void (*)(unsigned, unsigned))getBindBuffer();
+ // testing
+ GLint tempInt;
+ GLboolean tempBool;
+ void *tempPtr;
+
+ SDL_Surface *screen;
+ if ( SDL_Init(SDL_INIT_VIDEO) != 0 ) {
+ printf("Unable to initialize SDL: %s\n", SDL_GetError());
+ return 1;
+ }
+
+ SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1 );
+ screen = SDL_SetVideoMode( 640, 480, 24, SDL_OPENGL );
+ if ( !screen ) {
+ printf("Unable to set video mode: %s\n", SDL_GetError());
+ return 1;
+ }
+
+ glClearColor( 0, 0, 0, 0 );
+ glClear( GL_COLOR_BUFFER_BIT );
+
+ // Create a texture
+
+ GLuint boundTex = 123;
+ assert(!glGetError());
+ glGetIntegerv(GL_TEXTURE_BINDING_2D, &boundTex);
+ assert(!glGetError());
+ assert(boundTex == 0);
+
+ GLuint texture;
+ glGenTextures( 1, &texture );
+ glBindTexture( GL_TEXTURE_2D, texture );
+
+ assert(!glGetError());
+ glGetIntegerv(GL_TEXTURE_BINDING_2D, &boundTex);
+ assert(!glGetError());
+ assert(boundTex == texture);
+
+ glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR );
+ glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR );
+ GLubyte textureData[16*16*4];
+ for (int x = 0; x < 16; x++) {
+ for (int y = 0; y < 16; y++) {
+ *((int*)&textureData[(x*16 + y) * 4]) = x*16 + ((y*16) << 8);
+ }
+ }
+ glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, 16, 16, 0,
+ GL_RGBA, GL_UNSIGNED_BYTE, textureData );
+
+ // Create a second texture
+
+ GLuint texture2;
+ glGenTextures( 1, &texture2 );
+ glBindTexture( GL_TEXTURE_2D, texture2 );
+ glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR );
+ glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR );
+ GLubyte texture2Data[] = { 0xff, 0, 0, 0xff,
+ 0, 0xff, 0, 0xaa,
+ 0, 0, 0xff, 0x55,
+ 0x80, 0x90, 0x70, 0 };
+ glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, 2, 2, 0,
+ GL_RGBA, GL_UNSIGNED_BYTE, texture2Data );
+
+ // BEGIN
+
+#if USE_GLEW
+ glewInit();
+#endif
+
+ glMatrixMode(GL_PROJECTION);
+ glLoadIdentity();
+ // original: glFrustum(-0.6435469817188064, 0.6435469817188064 ,-0.48266022190470925, 0.48266022190470925 ,0.5400000214576721, 2048);
+ glFrustum(-0.6435469817188064, 0.1435469817188064 ,-0.48266022190470925, 0.88266022190470925 ,0.5400000214576721, 2048);
+ glRotatef(-30, 1, 1, 1);
+ //GLfloat pm[] = { 1.372136116027832, 0, 0, 0, 0, 0.7910231351852417, 0, 0, -0.6352481842041016, 0.29297152161598206, -1.0005275011062622, -1, 0, 0, -1.080284833908081, 0 };
+ //glLoadMatrixf(pm);
+
+ glMatrixMode(GL_MODELVIEW);
+ GLfloat matrixData[] = { -1, 0, 0, 0,
+ 0, 0,-1, 0,
+ 0, 1, 0, 0,
+ 0, 0, 0, 1 };
+ glLoadMatrixf(matrixData);
+ //glTranslated(-512,-512,-527); // XXX this should be uncommented, but if it is then nothing is shown
+
+ glEnable(GL_CULL_FACE);
+ glEnable(GL_DEPTH_TEST);
+
+ glClear(GL_DEPTH_BUFFER_BIT);
+
+ glEnableClientState(GL_NORMAL_ARRAY);
+ glEnableClientState(GL_COLOR_ARRAY);
+ glEnableClientState(GL_TEXTURE_COORD_ARRAY);
+
+ glActiveTexture(GL_TEXTURE0);
+
+ glGetBooleanv(GL_VERTEX_ARRAY, &tempBool); assert(!tempBool);
+ glEnableClientState(GL_VERTEX_ARRAY);
+ glGetBooleanv(GL_VERTEX_ARRAY, &tempBool); assert(tempBool);
+
+ GLuint arrayBuffer, elementBuffer;
+ glGenBuffers(1, &arrayBuffer);
+ glGenBuffers(1, &elementBuffer);
+
+ GLubyte arrayData[] = {
+/*
+[0, 0, 0, 67] ==> 128 float
+[0, 0, 128, 67] ==> 256 float
+[0, 0, 0, 68] ==> 512 float
+[0, 0, 128, 68] ==> 1024 float
+
+[vertex x ] [vertex y ] [vertex z ] [nr] [texture u ] [texture v ] [lm u ] [lm v ] [color r,g,b,a ] */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 128, 128, // 0
+ 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 67, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 128, 128, // 1
+ 0, 0, 0, 68, 0, 0, 0, 68, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 67, 0, 0, 0, 67, 0, 0, 0, 0, 128, 128, 128, 128, // 2
+ 0, 0, 0, 0, 0, 0, 0, 68, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67, 0, 0, 0, 0, 128, 128, 128, 128, // 3
+ 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 67, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 128, 128, // 4
+ 0, 0, 128, 68, 0, 0, 0, 0, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 128, 67, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 128, 128, // 5
+ 0, 0, 128, 68, 0, 0, 0, 68, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 128, 67, 0, 0, 0, 67, 0, 0, 0, 0, 128, 128, 128, 128, // 6
+ 0, 0, 0, 68, 0, 0, 0, 68, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 67, 0, 0, 0, 67, 0, 0, 0, 0, 128, 128, 128, 128, // 7
+ 0, 0, 0, 0, 0, 0, 0, 68, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67, 0, 0, 0, 0, 128, 128, 128, 128, // 8
+ 0, 0, 0, 68, 0, 0, 0, 68, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 67, 0, 0, 0, 67, 0, 0, 0, 0, 128, 128, 128, 128, // 9
+ 0, 0, 0, 68, 0, 0, 128, 68, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 67, 0, 0, 128, 67, 0, 0, 0, 0, 128, 128, 128, 128, // 10
+ 0, 0, 0, 0, 0, 0, 128, 68, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 67, 0, 0, 0, 0, 128, 128, 128, 128, // 11
+ 0, 0, 0, 68, 0, 0, 0, 68, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 67, 0, 0, 0, 67, 0, 0, 0, 0, 128, 128, 128, 128, // 12
+ 0, 0, 128, 68, 0, 0, 0, 68, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 128, 67, 0, 0, 0, 67, 0, 0, 0, 0, 128, 128, 128, 128, // 13
+ 0, 0, 128, 68, 0, 0, 128, 68, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 128, 67, 0, 0, 128, 67, 0, 0, 0, 0, 128, 128, 128, 128, // 14
+ 0, 0, 0, 68, 0, 0, 128, 68, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 67, 0, 0, 128, 67, 0, 0, 0, 0, 128, 128, 128, 128, // 15
+
+ 0, 0, 0, 68, 0, 0, 0, 68, 0, 0, 128, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 128, 128,
+ 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 128, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 128, 128,
+ 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 128, 128,
+ 0, 0, 0, 68, 0, 0, 0, 68, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 128, 128,
+ 0, 0, 0, 0, 0, 0, 0, 68, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 128, 128,
+ 0, 0, 0, 0, 0, 0, 0, 68, 0, 0, 128, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 128, 128,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 128, 128,
+ 0, 0, 0, 68, 0, 0, 0, 68, 0, 0, 128, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 128, 128,
+ 0, 0, 0, 68, 0, 0, 0, 68, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 128, 128,
+ 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 128, 128,
+ 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 128, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 128, 128,
+ 0, 0, 128, 68, 0, 0, 0, 68, 0, 0, 128, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 128, 128,
+ 0, 0, 128, 68, 0, 0, 0, 68, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 128, 128,
+ 0, 0, 128, 68, 0, 0, 0, 0, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 128, 128,
+ 0, 0, 0, 68, 0, 0, 128, 68, 0, 0, 128, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 128, 128,
+ 0, 0, 0, 68, 0, 0, 0, 68, 0, 0, 128, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 128, 128,
+ 0, 0, 0, 68, 0, 0, 0, 68, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 128, 128,
+ 0, 0, 0, 68, 0, 0, 128, 68, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 128, 128,
+ 0, 0, 0, 0, 0, 0, 0, 68, 0, 0, 128, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 128, 128,
+ 0, 0, 0, 0, 0, 0, 0, 68, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 128, 128,
+ 0, 0, 0, 0, 0, 0, 128, 68, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 128, 128,
+ 0, 0, 0, 68, 0, 0, 128, 68, 0, 0, 128, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 128, 128,
+ 0, 0, 0, 68, 0, 0, 128, 68, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 128, 128,
+ 0, 0, 0, 68, 0, 0, 0, 68, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 128, 128,
+ 0, 0, 0, 68, 0, 0, 0, 68, 0, 0, 128, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 128, 128,
+ 0, 0, 128, 68, 0, 0, 0, 68, 0, 0, 128, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 128, 128,
+ 0, 0, 128, 68, 0, 0, 0, 68, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 128, 128,
+ 0, 0, 128, 68, 0, 0, 128, 68, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 128, 128
+ };
+ assert(sizeof(arrayData) == 1408);
+ _glBindBuffer(GL_ARRAY_BUFFER, arrayBuffer);
+ glBufferData(GL_ARRAY_BUFFER, sizeof(arrayData), arrayData, GL_STATIC_DRAW);
+ _glBindBuffer(GL_ARRAY_BUFFER, 0);
+
+ GLushort elementData[] = { 1, 2, 0, 2, 3, 0, 5, 6, 4, 6, 7, 4, 9, 10, 8, 10, 11, 8, 13, 14, 12, 14, 15, 12 };
+ assert(sizeof(elementData) == 48);
+ _glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, elementBuffer);
+ glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(elementData), elementData, GL_STATIC_DRAW);
+ _glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
+
+ _glBindBuffer(GL_ARRAY_BUFFER, arrayBuffer);
+ _glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, elementBuffer);
+
+ // sauer vertex data is apparently 0-12: V3F, 12: N1B, 16-24: T2F, 24-28: T2S, 28-32: C4B
+ glVertexPointer(3, GL_FLOAT, 32, (void*)0); // all these apply to the ARRAY_BUFFER that is bound
+ glTexCoordPointer(2, GL_FLOAT, 32, (void*)16);
+
+ glClientActiveTexture(GL_TEXTURE1); // XXX seems to be ignored in native build
+ glTexCoordPointer(2, GL_SHORT, 32, (void*)24);
+ glGetIntegerv(GL_TEXTURE_COORD_ARRAY_SIZE, &tempInt); assert(tempInt == 2);
+ glGetIntegerv(GL_TEXTURE_COORD_ARRAY_TYPE, &tempInt); assert(tempInt == GL_SHORT);
+ glGetIntegerv(GL_TEXTURE_COORD_ARRAY_STRIDE, &tempInt); assert(tempInt == 32);
+ glGetPointerv(GL_TEXTURE_COORD_ARRAY_POINTER, &tempPtr); assert(tempPtr == (void *)24);
+
+ glClientActiveTexture(GL_TEXTURE0); // likely not needed, it is a cleanup
+ glNormalPointer(GL_BYTE, 32, (void*)12);
+ glColorPointer(4, GL_UNSIGNED_BYTE, 32, (void*)28);
+
+ glGetPointerv(GL_VERTEX_ARRAY_POINTER, &tempPtr); assert(tempPtr == (void *)0);
+ glGetPointerv(GL_COLOR_ARRAY_POINTER, &tempPtr); assert(tempPtr == (void *)28);
+ glGetPointerv(GL_TEXTURE_COORD_ARRAY_POINTER, &tempPtr); assert(tempPtr == (void *)16);
+ glGetIntegerv(GL_VERTEX_ARRAY_SIZE, &tempInt); assert(tempInt == 3);
+ glGetIntegerv(GL_VERTEX_ARRAY_TYPE, &tempInt); assert(tempInt == GL_FLOAT);
+ glGetIntegerv(GL_VERTEX_ARRAY_STRIDE, &tempInt); assert(tempInt == 32);
+ glGetIntegerv(GL_COLOR_ARRAY_SIZE, &tempInt); assert(tempInt == 4);
+ glGetIntegerv(GL_COLOR_ARRAY_TYPE, &tempInt); assert(tempInt == GL_UNSIGNED_BYTE);
+ glGetIntegerv(GL_COLOR_ARRAY_STRIDE, &tempInt); assert(tempInt == 32);
+ glGetIntegerv(GL_TEXTURE_COORD_ARRAY_SIZE, &tempInt); assert(tempInt == 2);
+ glGetIntegerv(GL_TEXTURE_COORD_ARRAY_TYPE, &tempInt); assert(tempInt == GL_FLOAT);
+ glGetIntegerv(GL_TEXTURE_COORD_ARRAY_STRIDE, &tempInt); assert(tempInt == 32);
+ glGetBooleanv(GL_VERTEX_ARRAY, &tempBool); assert(tempBool);
+
+ glBindTexture(GL_TEXTURE_2D, texture); // diffuse?
+ glActiveTexture(GL_TEXTURE0);
+ glActiveTexture(GL_TEXTURE1);
+ glBindTexture(GL_TEXTURE_2D, texture2); // lightmap?
+ glActiveTexture(GL_TEXTURE0);
+
+ GLint ok;
+
+ const char *vertexShader = "uniform vec4 texgenscroll;\n"
+ "void main(void)\n"
+ "{\n"
+ " gl_Position = ftransform();\n"
+ " gl_TexCoord[0].xy = gl_MultiTexCoord0.xy/100.0 + texgenscroll.xy;\n" // added /100 here
+ " gl_TexCoord[1].xy = gl_MultiTexCoord1.xy/100.0 * 3.051851e-05;\n"
+ "}\n";
+ const char *fragmentShader = "uniform vec4 colorparams;\n"
+ "uniform sampler2D diffusemap, lightmap;\n"
+ "void main(void)\n"
+ "{\n"
+ " vec4 diffuse = texture2D(diffusemap, gl_TexCoord[0].xy);\n"
+ " vec4 lm = texture2D(lightmap, gl_TexCoord[1].xy);\n"
+ " diffuse *= colorparams;\n"
+ " gl_FragColor = diffuse * lm;\n"
+ "}\n";
+
+ GLuint vs = glCreateShader(GL_VERTEX_SHADER);
+ glShaderSource(vs, 1, &vertexShader, NULL);
+ glCompileShader(vs);
+ glGetShaderiv(vs, GL_COMPILE_STATUS, &ok);
+ assert(ok);
+
+ GLuint fs = glCreateShader(GL_FRAGMENT_SHADER);
+ glShaderSource(fs, 1, &fragmentShader, NULL);
+ glCompileShader(fs);
+ glGetShaderiv(fs, GL_COMPILE_STATUS, &ok);
+ assert(ok);
+
+ GLuint program = glCreateProgram();
+
+ glAttachShader(program, vs);
+ glAttachShader(program, fs);
+ glLinkProgram(program);
+ glGetProgramiv(program, GL_LINK_STATUS, &ok);
+ assert(ok);
+
+ glUseProgram(program);
+
+ GLint lightmapLocation = glGetUniformLocation(program, "lightmap");
+ assert(lightmapLocation >= 0);
+ assert(lightmapLocation == glGetUniformLocation(program, "lightmap")); // must get identical ids
+ glLinkProgram(program);
+ glGetProgramiv(program, GL_LINK_STATUS, &ok);
+ assert(ok);
+ assert(lightmapLocation != glGetUniformLocation(program, "lightmap")); // must NOT get identical ids, we re-linked!
+ lightmapLocation = glGetUniformLocation(program, "lightmap");
+ assert(lightmapLocation == glGetUniformLocation(program, "lightmap")); // must get identical ids
+
+ glUniform1i(lightmapLocation, 1); // sampler2D? Is it the texture unit?
+
+ GLint diffusemapLocation = glGetUniformLocation(program, "diffusemap");
+ assert(diffusemapLocation >= 0);
+ glUniform1i(diffusemapLocation, 0);
+
+ GLint texgenscrollLocation = glGetUniformLocation(program, "texgenscroll");
+ assert(texgenscrollLocation >= 0);
+
+ GLint colorparamsLocation = glGetUniformLocation(program, "colorparams");
+ assert(colorparamsLocation >= 0);
+
+ GLfloat texgenscrollData[] = { 0, 0, 0, 0 };
+ glUniform4fv(texgenscrollLocation, 1, texgenscrollData);
+
+ GLfloat colorparamsData[] = { 2, 2, 2, 1 };
+ glUniform4fv(colorparamsLocation, 1, colorparamsData);
+
+ glDrawElements(GL_TRIANGLES, 6, GL_UNSIGNED_SHORT, (void*)12);
+ glDrawElements(GL_TRIANGLES, 6, GL_UNSIGNED_SHORT, (void*) 0);
+ glDrawElements(GL_TRIANGLES, 6, GL_UNSIGNED_SHORT, (void*)24);
+ glDrawElements(GL_TRIANGLES, 6, GL_UNSIGNED_SHORT, (void*)36);
+
+ // END
+
+ SDL_GL_SwapBuffers();
+
+#if !EMSCRIPTEN
+ SDL_Delay(1500);
+#endif
+
+ SDL_Quit();
+
+ return 0;
+}
diff --git a/tests/embind/embind.test.js b/tests/embind/embind.test.js
index da81a81e..5ca972be 100644
--- a/tests/embind/embind.test.js
+++ b/tests/embind/embind.test.js
@@ -55,7 +55,7 @@ module({
});
});
});
-
+
}
BaseFixture.extend("access to base class members", function() {
@@ -609,7 +609,7 @@ module({
assert.equal("0", cm.unsigned_int_to_string(0));
assert.equal("0", cm.long_to_string(0));
assert.equal("0", cm.unsigned_long_to_string(0));
-
+
// all types should have positive values.
assert.equal("5", cm.char_to_string(5));
assert.equal("5", cm.signed_char_to_string(5));
@@ -650,7 +650,7 @@ module({
assert.equal("-32768", cm.short_to_string(-32768));
assert.equal("-2147483648", cm.int_to_string(-2147483648));
assert.equal("-2147483648", cm.long_to_string(-2147483648));
-
+
// passing out of range values should fail.
assert.throws(TypeError, function() { cm.char_to_string(-129); });
assert.throws(TypeError, function() { cm.char_to_string(128); });
@@ -733,7 +733,7 @@ module({
test("overloading of derived class member functions", function() {
var foo = new cm.MultipleOverloadsDerived();
-
+
// NOTE: In C++, default lookup rules will hide overloads from base class if derived class creates them.
// In JS, we make the base class overloads implicitly available. In C++, they would need to be explicitly
// invoked, like foo.MultipleOverloads::Func(10);
@@ -748,7 +748,7 @@ module({
assert.equal(foo.WhichFuncCalled(), 4);
foo.delete();
});
-
+
test("overloading of class static functions", function() {
assert.equal(cm.MultipleOverloads.StaticFunc(10), 1);
assert.equal(cm.MultipleOverloads.WhichStaticFuncCalled(), 1);
@@ -1441,7 +1441,7 @@ module({
test("repr includes enum value", function() {
assert.equal('<#Enum_ONE {}>', IMVU.repr(cm.Enum.ONE));
assert.equal('<#Enum_TWO {}>', IMVU.repr(cm.Enum.TWO));
- });
+ });
}
test("instanceof", function() {
@@ -1591,7 +1591,7 @@ module({
test("returning a new shared pointer from interfaces implemented in JS code does not leak", function() {
var impl = cm.AbstractClass.implement({
returnsSharedPtr: function() {
- return cm.embind_test_return_smart_derived_ptr();
+ return cm.embind_test_return_smart_derived_ptr().deleteLater();
}
});
cm.callReturnsSharedPtrMethod(impl);
@@ -1644,7 +1644,7 @@ module({
});
if (typeof INVOKED_FROM_EMSCRIPTEN_TEST_RUNNER === "undefined") { // TODO: Enable this to work in Emscripten runner as well!
-
+
BaseFixture.extend("unbound types", function() {
function assertMessage(fn, message) {
var e = assert.throws(cm.UnboundTypeError, fn);
@@ -1689,7 +1689,7 @@ module({
},
'Cannot construct HasConstructorUsingUnboundArgumentAndUnboundBase due to unbound types: 18SecondUnboundClass');
});
-
+
test('class function with unbound argument', function() {
var x = new cm.BoundClass;
assertMessage(
@@ -1719,12 +1719,12 @@ module({
}, 'Cannot access BoundClass.property due to unbound types: 12UnboundClass');
x.delete();
});
-
+
// todo: tuple elements
// todo: tuple element accessors
// todo: struct fields
});
-
+
}
BaseFixture.extend("noncopyable", function() {
@@ -1743,6 +1743,10 @@ module({
BaseFixture.extend("constants", function() {
assert.equal(10, cm.INT_CONSTANT);
+
+ assert.equal(1, cm.STATIC_CONST_INTEGER_VALUE_1);
+ assert.equal(1000, cm.STATIC_CONST_INTEGER_VALUE_1000);
+
assert.equal("some string", cm.STRING_CONSTANT);
assert.deepEqual([1, 2, 3, 4], cm.VALUE_ARRAY_CONSTANT);
assert.deepEqual({x:1,y:2,z:3,w:4}, cm.VALUE_OBJECT_CONSTANT);
@@ -1888,6 +1892,52 @@ module({
sh.delete();
});
});
+
+ BaseFixture.extend("val::as from pointer to value", function() {
+ test("calling as on pointer with value makes a copy", function() {
+ var sh1 = new cm.StringHolder("Hello world");
+ var sh2 = cm.return_StringHolder_copy(sh1);
+ assert.equal("Hello world", sh1.get());
+ assert.equal("Hello world", sh2.get());
+ assert.false(sh1.isAliasOf(sh2));
+ sh2.delete();
+ sh1.delete();
+ });
+
+ test("calling function that returns a StringHolder", function() {
+ var sh1 = new cm.StringHolder("Hello world");
+ var sh2 = cm.call_StringHolder_func(function() {
+ return sh1;
+ });
+ assert.equal("Hello world", sh1.get());
+ assert.equal("Hello world", sh2.get());
+ assert.false(sh1.isAliasOf(sh2));
+ sh2.delete();
+ sh1.delete();
+ });
+ });
+
+ BaseFixture.extend("mixin", function() {
+ test("can call mixin method", function() {
+ var a = new cm.DerivedWithMixin();
+ assert.instanceof(a, cm.Base);
+ assert.equal(10, a.get10());
+ a.delete();
+ });
+ });
+
+ test("returning a cached new shared pointer from interfaces implemented in JS code does not leak", function() {
+ var derived = cm.embind_test_return_smart_derived_ptr();
+ var impl = cm.AbstractClass.implement({
+ returnsSharedPtr: function() {
+ return derived;
+ }
+ });
+ cm.callReturnsSharedPtrMethod(impl);
+ impl.delete();
+ derived.delete();
+ // Let the memory leak test superfixture check that no leaks occurred.
+ });
});
/* global run_all_tests */
diff --git a/tests/embind/embind_test.cpp b/tests/embind/embind_test.cpp
index d6b27bce..4efc4bd8 100644
--- a/tests/embind/embind_test.cpp
+++ b/tests/embind/embind_test.cpp
@@ -1283,6 +1283,7 @@ std::shared_ptr<HeldBySmartPtr> takesHeldBySmartPtrSharedPtr(std::shared_ptr<Hel
namespace emscripten {
template<typename T>
struct smart_ptr_trait<CustomSmartPtr<T>> {
+ typedef CustomSmartPtr<T> pointer_type;
typedef T element_type;
static sharing_policy get_sharing_policy() {
@@ -1297,6 +1298,10 @@ namespace emscripten {
++ptr->refcount; // implement an adopt API?
return CustomSmartPtr<T>(ptr);
}
+
+ static pointer_type* construct_null() {
+ return new pointer_type;
+ }
};
}
@@ -2210,8 +2215,20 @@ EMSCRIPTEN_BINDINGS(read_only_properties) {
;
}
+struct StaticConstIntStruct {
+ static const int STATIC_CONST_INTEGER_VALUE_1;
+ static const int STATIC_CONST_INTEGER_VALUE_1000;
+};
+
+const int StaticConstIntStruct::STATIC_CONST_INTEGER_VALUE_1 = 1;
+const int StaticConstIntStruct::STATIC_CONST_INTEGER_VALUE_1000 = 1000;
+
EMSCRIPTEN_BINDINGS(constants) {
constant("INT_CONSTANT", 10);
+
+ constant("STATIC_CONST_INTEGER_VALUE_1", StaticConstIntStruct::STATIC_CONST_INTEGER_VALUE_1);
+ constant("STATIC_CONST_INTEGER_VALUE_1000", StaticConstIntStruct::STATIC_CONST_INTEGER_VALUE_1000);
+
constant("STRING_CONSTANT", std::string("some string"));
TupleVector tv(1, 2, 3, 4);
@@ -2243,3 +2260,47 @@ void clear_StringHolder(StringHolder& sh) {
EMSCRIPTEN_BINDINGS(references) {
function("clear_StringHolder", &clear_StringHolder);
}
+
+StringHolder return_StringHolder_copy(val func) {
+ return func.as<StringHolder>();
+}
+
+StringHolder call_StringHolder_func(val func) {
+ return func().as<StringHolder>();
+}
+
+EMSCRIPTEN_BINDINGS(return_values) {
+ function("return_StringHolder_copy", &return_StringHolder_copy);
+ function("call_StringHolder_func", &call_StringHolder_func);
+}
+
+
+struct Mixin {
+ int get10() const {
+ return 10;
+ }
+};
+
+template<typename ClassBinding>
+const ClassBinding& registerMixin(const ClassBinding& binding) {
+ // need a wrapper for implicit conversion from DerivedWithMixin to Mixin
+ struct Local {
+ static int get10(const typename ClassBinding::class_type& self) {
+ return self.get10();
+ }
+ };
+
+ return binding
+ .function("get10", &Local::get10)
+ ;
+}
+
+class DerivedWithMixin : public Base, public Mixin {
+};
+
+EMSCRIPTEN_BINDINGS(mixins) {
+ registerMixin(
+ class_<DerivedWithMixin, base<Base>>("DerivedWithMixin")
+ .constructor<>()
+ );
+}
diff --git a/tests/fs/test_mount.c b/tests/fs/test_mount.c
new file mode 100644
index 00000000..b1a337ad
--- /dev/null
+++ b/tests/fs/test_mount.c
@@ -0,0 +1,60 @@
+#include <assert.h>
+#include <stdio.h>
+#include <emscripten.h>
+
+int main() {
+ EM_ASM(
+ var ex;
+
+ // write a file that should be unaffected by this process
+ FS.writeFile('/safe.txt', 'abc');
+
+ // mount it the first time
+ FS.mkdir('/working');
+ FS.mount(MEMFS, {}, '/working');
+ FS.writeFile('/working/waka.txt', 'az');
+
+ // mount to a missing directory
+ try {
+ FS.mount(MEMFS, {}, '/missing');
+ } catch (e) {
+ ex = e;
+ }
+ assert(ex instanceof FS.ErrnoError && ex.errno === ERRNO_CODES.ENOENT);
+
+ // mount to an existing mountpoint
+ try {
+ FS.mount(MEMFS, {}, '/working');
+ } catch (e) {
+ ex = e;
+ }
+ assert(ex instanceof FS.ErrnoError && ex.errno === ERRNO_CODES.EBUSY);
+
+ // unmount
+ FS.unmount('/working');
+
+ // unmount something that's not mounted
+ try {
+ FS.unmount('/working');
+ } catch (e) {
+ ex = e;
+ }
+ assert(ex instanceof FS.ErrnoError && ex.errno === ERRNO_CODES.EINVAL);
+
+ // try to read the file from the old mount
+ try {
+ FS.readFile('/working/waka.txt', { encoding: 'utf8' });
+ } catch (e) {
+ ex = e;
+ }
+ assert(ex instanceof FS.ErrnoError && ex.errno === ERRNO_CODES.ENOENT);
+
+ // check the safe file
+ var contents = FS.readFile('/safe.txt', { encoding: 'utf8' });
+ assert(contents === 'abc');
+ );
+
+ puts("success");
+
+ return 0;
+}
diff --git a/tests/fuzz/6.c b/tests/fuzz/6.c
new file mode 100644
index 00000000..f7d003f0
--- /dev/null
+++ b/tests/fuzz/6.c
@@ -0,0 +1,1313 @@
+/*
+ * This is a RANDOMLY GENERATED PROGRAM.
+ *
+ * Generator: csmith 2.2.0
+ * Git version: bf42ffd
+ * Options: --no-volatiles --no-packed-struct --no-math64
+ * Seed: 2616503890
+ */
+
+#include "csmith.h"
+
+
+static long __undefined;
+
+/* --- Struct/Union Declarations --- */
+struct S0 {
+ int32_t f0;
+ signed f1 : 20;
+ signed f2 : 24;
+ unsigned f3 : 26;
+ int8_t f4;
+ unsigned f5 : 24;
+ unsigned f6 : 29;
+ signed : 0;
+};
+
+struct S1 {
+ const uint32_t f0;
+ const uint32_t f1;
+ uint8_t f2;
+ int16_t f3;
+};
+
+struct S2 {
+ signed f0 : 15;
+ unsigned : 0;
+};
+
+struct S3 {
+ uint32_t f0;
+ uint32_t f1;
+};
+
+union U4 {
+ const int32_t f0;
+};
+
+/* --- GLOBAL VARIABLES --- */
+static int32_t g_5 = (-1L);
+static struct S3 g_25 = {0x4D91F06EL,0x5FCB4448L};
+static struct S3 g_49[9] = {{4294967288UL,0xD28BC130L},{4294967288UL,0xD28BC130L},{4294967288UL,0xD28BC130L},{4294967288UL,0xD28BC130L},{4294967288UL,0xD28BC130L},{4294967288UL,0xD28BC130L},{4294967288UL,0xD28BC130L},{4294967288UL,0xD28BC130L},{4294967288UL,0xD28BC130L}};
+static int32_t g_52 = 0x7DC46221L;
+static int8_t g_82 = 0xC8L;
+static int32_t g_90 = 0x34F93D1DL;
+static int8_t g_92 = 0x9FL;
+static uint8_t g_96 = 0xE9L;
+static struct S1 g_99 = {0xCD962F93L,0UL,0UL,4L};
+static uint16_t g_103 = 0x5C9BL;
+static struct S0 g_108 = {-1L,-898,-748,7155,0xCCL,1045,17733};
+static const union U4 g_109 = {0x2D6F4160L};
+static struct S2 g_110 = {123};
+static uint16_t *g_165 = &g_103;
+static union U4 g_183 = {0L};
+static const struct S2 *g_192[6][10] = {{&g_110,&g_110,&g_110,&g_110,&g_110,&g_110,&g_110,&g_110,&g_110,&g_110},{&g_110,&g_110,&g_110,&g_110,&g_110,&g_110,&g_110,&g_110,&g_110,&g_110},{&g_110,&g_110,&g_110,&g_110,&g_110,&g_110,&g_110,&g_110,&g_110,&g_110},{&g_110,&g_110,&g_110,&g_110,&g_110,&g_110,&g_110,&g_110,&g_110,&g_110},{&g_110,&g_110,&g_110,&g_110,&g_110,&g_110,&g_110,&g_110,&g_110,&g_110},{&g_110,&g_110,&g_110,&g_110,&g_110,&g_110,&g_110,&g_110,&g_110,&g_110}};
+static const struct S2 **g_191 = &g_192[3][4];
+static const struct S2 g_218 = {169};
+static int8_t g_258 = 0xF5L;
+static int32_t *g_304 = &g_52;
+static uint16_t g_332 = 1UL;
+static union U4 g_345[10][1] = {{{-9L}},{{-8L}},{{-8L}},{{-9L}},{{-8L}},{{-8L}},{{-9L}},{{-8L}},{{-8L}},{{-9L}}};
+static int8_t g_393[6] = {0L,0L,0L,0L,0L,0L};
+static uint16_t g_395 = 0xE48FL;
+static uint8_t g_398 = 0x12L;
+static const struct S1 g_404[9][3][7] = {{{{4294967292UL,1UL,1UL,0x9004L},{4294967289UL,0x2D40B248L,9UL,-4L},{1UL,0x14CE5E2CL,255UL,0L},{4294967293UL,9UL,0xC3L,-1L},{9UL,0UL,0xF5L,0x8933L},{0x6EEFBF3DL,0x0697DDFDL,0x28L,-9L},{4294967289UL,0x2D40B248L,9UL,-4L}},{{0xF16E1005L,0x69DEE0BEL,254UL,1L},{0x5BF993C5L,0xAF30037DL,6UL,0x86D2L},{0x3D1AF904L,6UL,9UL,0x2382L},{0xF16E1005L,0x69DEE0BEL,254UL,1L},{0UL,8UL,0x3FL,0xC4F6L},{0xF1D13282L,0xDC13E8D4L,0x09L,0xA438L},{0UL,1UL,0xBEL,-1L}},{{0xB4FDA9A7L,0UL,253UL,0xB6B4L},{4294967292UL,0x6F35DE22L,1UL,-5L},{0xABD76823L,0x5C4094FAL,0xA7L,0x73B2L},{0xDAC922BDL,4294967294UL,0x6DL,0xD7DCL},{0x875F6C4FL,0xCA33B9B0L,255UL,1L},{0xFD8E57F7L,0x5D91100AL,250UL,0x47E3L},{0xFD8E57F7L,0x5D91100AL,250UL,0x47E3L}}},{{{4294967292UL,0xE89D2B46L,255UL,0x36E0L},{0UL,1UL,0xBEL,-1L},{0xC95419F9L,0xF1DC8401L,254UL,0L},{0UL,1UL,0xBEL,-1L},{4294967292UL,0xE89D2B46L,255UL,0x36E0L},{0UL,0xEFDC9B0EL,0xF6L,-6L},{0x31191B3CL,0xD2860BEAL,249UL,0xCA00L}},{{1UL,0x107BAB83L,0x8AL,-1L},{0x7ACE9691L,0UL,0UL,-4L},{4294967295UL,0x0399C950L,0x97L,0L},{0x92CBD4F1L,0xF902C1C3L,255UL,-1L},{4294967289UL,0x4AFC16F4L,0x01L,-1L},{0x9998859DL,0UL,0UL,0xDCE0L},{9UL,0UL,0xF5L,0x8933L}},{{0x3D1AF904L,6UL,9UL,0x2382L},{0x8B37F662L,1UL,0UL,0xDC69L},{4294967295UL,0x2E972767L,0x39L,0x5645L},{0x8441D93CL,0xB82A1ADDL,0x37L,0xF064L},{0x8B37F662L,1UL,0UL,0xDC69L},{1UL,0x4B1F371AL,0x74L,0x3354L},{4294967295UL,0xF04724DEL,0UL,1L}}},{{{1UL,0x107BAB83L,0x8AL,-1L},{0x92CBD4F1L,0xF902C1C3L,255UL,-1L},{0x6EEFBF3DL,0x0697DDFDL,0x28L,-9L},{0xFFF82B4BL,0xAB1E80A6L,0xC5L,5L},{0x46979E7AL,4294967295UL,0x4CL,1L},{0x95A17D55L,0xD9337297L,7UL,0xCBA7L},{4294967292UL,1UL,1UL,0x9004L}},{{4294967292UL,0xE89D2B46L,255UL,0x36E0L},{0UL,1UL,0xE9L,1L},{0x5BF993C5L,0xAF30037DL,6UL,0x86D2L},{4294967295UL,0xEA9EC9E5L,0UL,1L},{1UL,0x4B1F371AL,0x74L,0x3354L},{4294967286UL,0x5DAECA4EL,8UL,-9L},{4294967292UL,0xE89D2B46L,255UL,0x36E0L}},{{0xB4FDA9A7L,0UL,253UL,0xB6B4L},{4294967292UL,1UL,1UL,0x9004L},{0xDAC922BDL,4294967294UL,0x6DL,0xD7DCL},{4294967289UL,0x4AFC16F4L,0x01L,-1L},{0x69C1217CL,0x67F03E08L,0xF4L,0L},{0xB4FDA9A7L,0UL,253UL,0xB6B4L},{0xDA074F93L,0xC781FFB4L,0x04L,0xE568L}}},{{{0xF16E1005L,0x69DEE0BEL,254UL,1L},{0xF013A00DL,0x9E73816BL,7UL,0x34A3L},{0x784D76C3L,0xFBEB689CL,255UL,0xCB7DL},{0x31191B3CL,0xD2860BEAL,249UL,0xCA00L},{0x31191B3CL,0xD2860BEAL,249UL,0xCA00L},{0x784D76C3L,0xFBEB689CL,255UL,0xCB7DL},{0xF013A00DL,0x9E73816BL,7UL,0x34A3L}},{{4294967292UL,1UL,1UL,0x9004L},{0x7ACE9691L,0UL,0UL,-4L},{4294967295UL,6UL,0x39L,1L},{0xAF10A225L,8UL,0x5BL,0L},{0x5BB4543EL,0xA355F2F5L,0UL,-1L},{4294967289UL,0x4AFC16F4L,0x01L,-1L},{0x46979E7AL,4294967295UL,0x4CL,1L}},{{0x1E34A7E3L,2UL,0x35L,-3L},{0x7ED76638L,0UL,0x81L,0xCBD2L},{0x3D1AF904L,6UL,9UL,0x2382L},{0xF1D13282L,0xDC13E8D4L,0x09L,0xA438L},{0xF013A00DL,0x9E73816BL,7UL,0x34A3L},{0x4FC46E8AL,0xD6B44EB8L,251UL,0xE72EL},{0x5BF993C5L,0xAF30037DL,6UL,0x86D2L}}},{{{4294967292UL,0x6F35DE22L,1UL,-5L},{0x69C1217CL,0x67F03E08L,0xF4L,0L},{0x6EEFBF3DL,0x0697DDFDL,0x28L,-9L},{0xAF10A225L,8UL,0x5BL,0L},{0x875F6C4FL,0xCA33B9B0L,255UL,1L},{0xF899DD77L,0xA3A3B24CL,1UL,-3L},{4294967286UL,0x789C42E1L,6UL,-1L}},{{4294967295UL,0x7F701539L,0xD0L,-1L},{0x5BF993C5L,0xAF30037DL,6UL,0x86D2L},{0x8441D93CL,0xB82A1ADDL,0x37L,0xF064L},{0x31191B3CL,0xD2860BEAL,249UL,0xCA00L},{0UL,4294967295UL,0x0BL,0x685FL},{0UL,1UL,0xE9L,1L},{0x31191B3CL,0xD2860BEAL,249UL,0xCA00L}},{{0x2D3EC666L,0x823C73E7L,0x94L,0x14BDL},{9UL,0UL,0xF5L,0x8933L},{0x9998859DL,0UL,0UL,0xDCE0L},{4294967289UL,0x4AFC16F4L,0x01L,-1L},{0x92CBD4F1L,0xF902C1C3L,255UL,-1L},{4294967295UL,0x0399C950L,0x97L,0L},{0x7ACE9691L,0UL,0UL,-4L}}},{{{0x31191B3CL,0xD2860BEAL,249UL,0xCA00L},{0x8B37F662L,1UL,0UL,0xDC69L},{0xC95419F9L,0xF1DC8401L,254UL,0L},{4294967295UL,0xEA9EC9E5L,0UL,1L},{0x90D64501L,0x4A5C382BL,9UL,-1L},{0xCE0E03FCL,4294967286UL,252UL,-6L},{0x90D64501L,0x4A5C382BL,9UL,-1L}},{{0xFFF82B4BL,0xAB1E80A6L,0xC5L,5L},{0xDA074F93L,0xC781FFB4L,0x04L,0xE568L},{0xDA074F93L,0xC781FFB4L,0x04L,0xE568L},{0xFFF82B4BL,0xAB1E80A6L,0xC5L,5L},{0x5BB4543EL,0xA355F2F5L,0UL,-1L},{0x2D3EC666L,0x823C73E7L,0x94L,0x14BDL},{0x875F6C4FL,0xCA33B9B0L,255UL,1L}},{{4294967286UL,0x5DAECA4EL,8UL,-9L},{0x8D5C7EE6L,1UL,0xCEL,0x8DF8L},{1UL,0x4B1F371AL,0x74L,0x3354L},{0x8441D93CL,0xB82A1ADDL,0x37L,0xF064L},{0UL,1UL,0xBEL,-1L},{4294967286UL,0x5DAECA4EL,8UL,-9L},{0UL,1UL,0xE9L,1L}}},{{{0x69C1217CL,0x67F03E08L,0xF4L,0L},{0x875F6C4FL,0xCA33B9B0L,255UL,1L},{1UL,0x14CE5E2CL,255UL,0L},{0x92CBD4F1L,0xF902C1C3L,255UL,-1L},{4294967286UL,0x789C42E1L,6UL,-1L},{0xF899DD77L,0xA3A3B24CL,1UL,-3L},{0x875F6C4FL,0xCA33B9B0L,255UL,1L}},{{0xF16E1005L,0x69DEE0BEL,254UL,1L},{4294967295UL,0xF04724DEL,0UL,1L},{0x1E34A7E3L,2UL,0x35L,-3L},{0UL,1UL,0xBEL,-1L},{1UL,0x4B1F371AL,0x74L,0x3354L},{0xF1D13282L,0xDC13E8D4L,0x09L,0xA438L},{0x90D64501L,0x4A5C382BL,9UL,-1L}},{{0xABD76823L,0x5C4094FAL,0xA7L,0x73B2L},{4294967289UL,0x2D40B248L,9UL,-4L},{4294967295UL,6UL,0x39L,1L},{0xDAC922BDL,4294967294UL,0x6DL,0xD7DCL},{4294967289UL,0x2D40B248L,9UL,-4L},{0xDA074F93L,0xC781FFB4L,0x04L,0xE568L},{0x7ACE9691L,0UL,0UL,-4L}}},{{{0x39B853AAL,4294967292UL,0x81L,0xC7A0L},{0UL,1UL,0xBEL,-1L},{0xCE0E03FCL,4294967286UL,252UL,-6L},{0xF16E1005L,0x69DEE0BEL,254UL,1L},{0xF013A00DL,0x9E73816BL,7UL,0x34A3L},{1UL,4294967291UL,246UL,0x32EEL},{0x1E34A7E3L,2UL,0x35L,-3L}},{{0xABD76823L,0x5C4094FAL,0xA7L,0x73B2L},{0x6EEFBF3DL,0x0697DDFDL,0x28L,-9L},{4294967295UL,4294967290UL,252UL,2L},{0xC2ECAACAL,4294967295UL,0x82L,0xD801L},{4294967295UL,4294967290UL,252UL,2L},{0x6EEFBF3DL,0x0697DDFDL,0x28L,-9L},{0xABD76823L,0x5C4094FAL,0xA7L,0x73B2L}},{{0xB7131E29L,0xA1E58848L,0xEAL,1L},{0x1E34A7E3L,2UL,0x35L,-3L},{0UL,5UL,250UL,0x4C0BL},{1UL,0xC1D7F27EL,0x9FL,0xB17DL},{0x3D1AF904L,6UL,9UL,0x2382L},{0x5AE9864FL,0xA033A2BEL,1UL,0xFE78L},{0x784D76C3L,0xFBEB689CL,255UL,0xCB7DL}}},{{{4294967295UL,6UL,0x39L,1L},{0xB4FDA9A7L,0UL,253UL,0xB6B4L},{4294967293UL,9UL,0xC3L,-1L},{0x9998859DL,0UL,0UL,0xDCE0L},{4294967295UL,0x0399C950L,0x97L,0L},{4294967293UL,9UL,0xC3L,-1L},{0UL,0xCC5E76F7L,0xBFL,0x5E44L}},{{0x4FC46E8AL,0xD6B44EB8L,251UL,0xE72EL},{0UL,0xEFDC9B0EL,0xF6L,-6L},{0UL,5UL,250UL,0x4C0BL},{4294967295UL,0xF04724DEL,0UL,1L},{2UL,0xF7CF134CL,1UL,0x2E10L},{0x2A40AB47L,0x27F0A379L,0xCBL,0x2F41L},{0UL,1UL,0xE9L,1L}},{{0x512C9CC6L,4294967295UL,0x73L,7L},{4294967295UL,0x0399C950L,0x97L,0L},{4294967295UL,4294967290UL,252UL,2L},{0xC4D78A4AL,8UL,0x5AL,0xCE6CL},{0UL,0xCC5E76F7L,0xBFL,0x5E44L},{0x512C9CC6L,4294967295UL,0x73L,7L},{0x95A17D55L,0xD9337297L,7UL,0xCBA7L}}}};
+static int8_t g_452 = 7L;
+static int32_t g_454 = 0xB2827763L;
+static uint16_t g_455[1] = {0xADE9L};
+static int32_t g_465 = 0x5BA367D9L;
+static int8_t g_466 = 0x08L;
+static uint8_t g_467 = 255UL;
+static uint16_t g_518 = 0UL;
+static struct S1 g_525 = {0xC8451B01L,6UL,0x90L,1L};
+static const struct S1 *g_524[2][8][6] = {{{(void*)0,&g_404[3][1][6],&g_404[4][2][5],&g_99,&g_404[4][2][5],&g_404[3][1][6]},{(void*)0,&g_404[3][1][6],&g_404[4][2][5],&g_99,&g_404[4][2][5],&g_404[3][1][6]},{(void*)0,&g_404[3][1][6],&g_404[4][2][5],&g_99,&g_404[4][2][5],&g_404[3][1][6]},{(void*)0,&g_404[3][1][6],&g_404[4][2][5],&g_99,&g_404[4][2][5],&g_404[3][1][6]},{(void*)0,&g_404[3][1][6],&g_404[4][2][5],&g_99,&g_404[4][2][5],&g_404[3][1][6]},{(void*)0,&g_404[3][1][6],&g_404[4][2][5],&g_99,&g_404[4][2][5],&g_404[3][1][6]},{(void*)0,&g_404[3][1][6],&g_404[4][2][5],&g_99,&g_404[4][2][5],&g_404[3][1][6]},{(void*)0,&g_404[3][1][6],&g_404[4][2][5],&g_99,&g_404[4][2][5],&g_404[3][1][6]}},{{(void*)0,&g_404[3][1][6],&g_404[4][2][5],&g_99,&g_404[4][2][5],&g_404[3][1][6]},{(void*)0,&g_404[3][1][6],&g_404[4][2][5],&g_99,&g_404[4][2][5],&g_404[3][1][6]},{(void*)0,&g_404[3][1][6],&g_404[4][2][5],&g_99,&g_404[4][2][5],&g_404[3][1][6]},{(void*)0,&g_404[3][1][6],&g_404[4][2][5],&g_99,&g_404[4][2][5],&g_404[3][1][6]},{(void*)0,&g_404[3][1][6],&g_404[4][2][5],&g_99,&g_404[4][2][5],&g_404[3][1][6]},{(void*)0,&g_404[3][1][6],&g_404[4][2][5],&g_99,&g_404[4][2][5],&g_404[3][1][6]},{(void*)0,&g_404[3][1][6],&g_404[4][2][5],&g_99,&g_404[4][2][5],&g_404[3][1][6]},{(void*)0,&g_404[3][1][6],&g_404[4][2][5],&g_99,&g_404[4][2][5],&g_404[3][1][6]}}};
+static int8_t g_531 = 0x57L;
+static int32_t g_532 = (-4L);
+static int16_t g_534 = 0xCE5BL;
+static uint16_t g_535[3][6][4] = {{{1UL,65531UL,1UL,0UL},{65531UL,1UL,0xB853L,0x0C15L},{6UL,1UL,65531UL,0x9E89L},{7UL,65527UL,65535UL,0UL},{0UL,0xF306L,0UL,0x443AL},{0x6BA1L,0UL,0x0F29L,0UL}},{{0xF306L,0xA53EL,0x9E89L,0x0F29L},{1UL,6UL,65531UL,1UL},{65535UL,1UL,0UL,0x1B02L},{65535UL,0xF306L,65531UL,65535UL},{1UL,0x1B02L,0x9E89L,0UL},{0xF306L,0x89BEL,0x0F29L,0x0C15L}},{{0x6BA1L,1UL,0UL,1UL},{0UL,0xA53EL,65535UL,0UL},{1UL,0x443AL,0x443AL,1UL},{0x1B02L,65535UL,65526UL,65535UL},{0x443AL,0UL,65527UL,0x2B24L},{65531UL,0UL,1UL,0x2B24L}}};
+static uint16_t g_538 = 9UL;
+static int16_t g_557 = 0x3DB5L;
+static uint8_t g_575 = 0xFBL;
+static union U4 g_591[10][8] = {{{1L},{0x03B75086L},{1L},{0x03B75086L},{1L},{0x03B75086L},{1L},{0x03B75086L}},{{1L},{0x03B75086L},{1L},{0x03B75086L},{1L},{0x03B75086L},{1L},{0x03B75086L}},{{1L},{0x03B75086L},{1L},{0x03B75086L},{1L},{0x03B75086L},{1L},{0x03B75086L}},{{1L},{0x03B75086L},{1L},{0x03B75086L},{1L},{0x03B75086L},{1L},{0x03B75086L}},{{1L},{0x03B75086L},{1L},{0x03B75086L},{1L},{0x03B75086L},{1L},{0x03B75086L}},{{1L},{0x03B75086L},{1L},{0x03B75086L},{1L},{0x03B75086L},{1L},{0x03B75086L}},{{1L},{0x03B75086L},{1L},{0x03B75086L},{1L},{0x03B75086L},{1L},{0x03B75086L}},{{1L},{0x03B75086L},{1L},{0x03B75086L},{1L},{0x03B75086L},{1L},{0x03B75086L}},{{1L},{0x03B75086L},{1L},{0x03B75086L},{1L},{0x03B75086L},{1L},{0x03B75086L}},{{1L},{0x03B75086L},{1L},{0x03B75086L},{1L},{0x03B75086L},{1L},{0x03B75086L}}};
+static struct S0 g_623 = {0xFA23ED7BL,277,-1899,349,1L,2438,20296};
+static int32_t *g_680[3][9] = {{&g_90,&g_90,&g_90,&g_90,&g_90,&g_90,&g_90,&g_90,&g_90},{(void*)0,(void*)0,(void*)0,(void*)0,(void*)0,(void*)0,(void*)0,(void*)0,(void*)0},{&g_90,&g_90,&g_90,&g_90,&g_90,&g_90,&g_90,&g_90,&g_90}};
+static struct S0 *g_689 = (void*)0;
+static struct S0 **g_688 = &g_689;
+static int32_t *g_692 = &g_465;
+static int8_t g_815[4][3] = {{(-10L),(-10L),(-10L)},{(-10L),(-10L),(-10L)},{(-10L),(-10L),(-10L)},{(-10L),(-10L),(-10L)}};
+static struct S2 g_901 = {9};
+static struct S3 * const g_966 = (void*)0;
+static struct S3 * const *g_965 = &g_966;
+static int8_t g_1054 = 0xF3L;
+static int32_t g_1055 = 0x97667764L;
+static uint32_t g_1057[4][5] = {{1UL,0x21F81601L,0x21F81601L,1UL,1UL},{1UL,0x43F88B83L,0x43F88B83L,1UL,2UL},{1UL,0x21F81601L,0x21F81601L,1UL,1UL},{1UL,0x43F88B83L,0x43F88B83L,1UL,2UL}};
+static struct S3 *g_1170 = (void*)0;
+static int32_t ** const *g_1175 = (void*)0;
+static int32_t **g_1183 = &g_680[2][7];
+static int32_t ***g_1182 = &g_1183;
+static int32_t ***g_1184 = &g_1183;
+
+
+/* --- FORWARD DECLARATIONS --- */
+static struct S3 func_1(void);
+static int32_t func_2(uint8_t p_3, uint16_t p_4);
+static struct S0 func_10(uint8_t p_11, uint32_t p_12);
+static int32_t * func_15(const int32_t * p_16, uint32_t p_17, uint16_t p_18);
+static int32_t * func_19(int32_t * p_20, struct S3 p_21, const int32_t * p_22, int32_t * p_23);
+static struct S3 func_26(int32_t p_27, int32_t * p_28);
+static uint8_t func_31(int32_t * p_32);
+static int32_t * func_34(int32_t * p_35, union U4 p_36, int32_t * p_37);
+static int32_t * func_38(struct S3 p_39, uint32_t p_40, int32_t * p_41, const struct S1 p_42);
+static int32_t * func_45(int32_t * p_46, struct S3 p_47);
+
+
+/* --- FUNCTIONS --- */
+/* ------------------------------------------ */
+/*
+ * reads : g_5 g_25 g_52 g_96 g_99 g_103 g_108 g_109 g_110 g_109.f0 g_165 g_82 g_92 g_183.f0 g_191 g_218 g_90 g_183 g_49.f1 g_49.f0 g_258 g_49 g_332 g_345.f0 g_395 g_398 g_455 g_467 g_345 g_393 g_465 g_535 g_538 g_452 g_525.f1 g_575 g_532 g_623.f4 g_692 g_466 g_1057 g_404.f1 g_623.f0 g_454 g_815 g_623.f3 g_1175 g_404.f3 g_557 g_1055 g_525.f0 g_591
+ * writes: g_5 g_49 g_52 g_96 g_103 g_110 g_99.f3 g_108.f4 g_99.f2 g_165 g_108.f0 g_191 g_92 g_108.f2 g_108.f1 g_108.f6 g_108 g_304 g_332 g_395 g_398 g_258 g_455 g_467 g_465 g_518 g_524 g_535 g_538 g_557 g_575 g_532 g_452 g_1057 g_25.f0 g_623.f0 g_466 g_1170 g_192 g_1182 g_1184 g_534 g_1055
+ */
+static struct S3 func_1(void)
+{ /* block id: 0 */
+ uint32_t l_6 = 0x41A9C213L;
+ struct S3 l_1252 = {4294967295UL,0x7AFC605BL};
+ (*g_692) = func_2(g_5, l_6);
+ return l_1252;
+}
+
+
+/* ------------------------------------------ */
+/*
+ * reads : g_25 g_5 g_52 g_96 g_99 g_103 g_108 g_109 g_110 g_109.f0 g_165 g_82 g_92 g_183.f0 g_191 g_218 g_90 g_183 g_49.f1 g_49.f0 g_258 g_49 g_332 g_345.f0 g_395 g_398 g_455 g_467 g_345 g_393 g_465 g_535 g_538 g_452 g_525.f1 g_575 g_532 g_623.f4 g_692 g_466 g_1057 g_404.f1 g_623.f0 g_454 g_815 g_623.f3 g_1175 g_404.f3 g_557 g_1055 g_525.f0 g_591
+ * writes: g_5 g_49 g_52 g_96 g_103 g_110 g_99.f3 g_108.f4 g_99.f2 g_165 g_108.f0 g_191 g_92 g_108.f2 g_108.f1 g_108.f6 g_108 g_304 g_332 g_395 g_398 g_258 g_455 g_467 g_465 g_518 g_524 g_535 g_538 g_557 g_575 g_532 g_452 g_1057 g_25.f0 g_623.f0 g_466 g_1170 g_192 g_1182 g_1184 g_534 g_1055
+ */
+static int32_t func_2(uint8_t p_3, uint16_t p_4)
+{ /* block id: 1 */
+ uint32_t l_13 = 4294967293UL;
+ struct S1 l_1192 = {4294967295UL,9UL,255UL,1L};
+ uint32_t l_1195 = 0xCB50686CL;
+ union U4 *l_1201 = &g_345[6][0];
+ union U4 **l_1200 = &l_1201;
+ const struct S2 l_1216[6] = {{55},{55},{55},{55},{55},{55}};
+ int32_t *l_1217 = &g_1055;
+ int32_t **l_1218 = &l_1217;
+ int32_t *l_1219 = &g_532;
+ const int32_t *l_1225 = &g_90;
+ const int32_t * const *l_1224 = &l_1225;
+ const int32_t * const **l_1223 = &l_1224;
+ const int32_t * const ***l_1222 = &l_1223;
+ struct S0 l_1232 = {0L,896,3465,3852,0x4AL,3152,4727};
+ uint32_t l_1235[3][7] = {{0x1A37F656L,1UL,0UL,2UL,1UL,2UL,0UL},{1UL,1UL,0UL,0x65068BF2L,18446744073709551613UL,0UL,18446744073709551613UL},{0x65068BF2L,0UL,0UL,0x65068BF2L,2UL,0x1A37F656L,0x65068BF2L}};
+ const struct S2 **l_1242 = &g_192[3][4];
+ const int32_t l_1244 = 0xB5670868L;
+ struct S3 l_1247[10] = {{4294967295UL,4294967295UL},{4294967295UL,4294967295UL},{4294967295UL,4294967295UL},{4294967295UL,4294967295UL},{4294967295UL,4294967295UL},{4294967295UL,4294967295UL},{4294967295UL,4294967295UL},{4294967295UL,4294967295UL},{4294967295UL,4294967295UL},{4294967295UL,4294967295UL}};
+ int32_t *l_1248 = &g_623.f0;
+ int i, j;
+ (*g_692) = (safe_mod_func_int32_t_s_s(((safe_unary_minus_func_int32_t_s((func_10(l_13, p_3) , (((+(safe_sub_func_uint16_t_u_u(p_3, (((l_1192 , (safe_mul_func_uint8_t_u_u(l_1195, (l_1192.f2 ^ (!(p_3 >= 1UL)))))) >= 0xB3L) , 0xD7AAL)))) ^ p_4) , p_3)))) && g_466), p_3));
+ l_1219 = ((*l_1218) = ((safe_add_func_int32_t_s_s(((0x2BL & (l_1195 | (safe_mod_func_int16_t_s_s(p_3, ((l_1200 == &l_1201) , g_108.f2))))) < (0xD1L <= 0L)), (safe_lshift_func_int8_t_s_s((((safe_rshift_func_uint16_t_u_s((safe_mod_func_uint32_t_u_u((safe_sub_func_int32_t_s_s((safe_sub_func_int32_t_s_s(((safe_mul_func_uint8_t_u_u(((l_1216[1] , l_1192) , p_3), g_404[2][0][0].f3)) | 1L), g_96)), 4294967287UL)), l_1192.f0)), 11)) && l_1192.f1) <= 0x9DAECEF8L), l_1192.f3)))) , l_1217));
+ if ((func_26(((*g_165) & ((safe_rshift_func_int8_t_s_s((((g_557 > (5UL == (g_557 , g_96))) <= (l_1222 == &g_1182)) == (safe_sub_func_uint16_t_u_u((safe_mod_func_int32_t_s_s((safe_sub_func_int32_t_s_s(((((((l_1232 , ((*l_1217) ^= (safe_mul_func_int8_t_s_s(((+((void*)0 == &l_13)) >= 0xEEL), 1UL)))) < p_4) != (*g_165)) || g_455[0]) , p_3) ^ l_1235[1][2]), 0x9CB65C83L)), g_99.f3)), g_1057[2][2]))), g_525.f1)) , 0x48F4L)), (*l_1218)) , (**l_1218)))
+ { /* block id: 590 */
+ struct S2 **l_1243 = (void*)0;
+ union U4 *l_1245 = &g_591[3][4];
+ int32_t l_1246 = (-1L);
+ (*g_692) &= (safe_lshift_func_int8_t_s_s(((safe_mod_func_int8_t_s_s(((safe_div_func_uint16_t_u_u((((!(((l_1242 != l_1243) ^ (0x2DA6L || l_1244)) && ((*l_1219) = (l_1245 == l_1245)))) < (l_1246 , g_452)) == (((*g_165) = p_4) < 0x34C9L)), l_1246)) == g_108.f5), g_525.f0)) , p_4), 5));
+ (*l_1218) = func_34(&g_465, (*l_1245), func_34(func_45((*l_1218), l_1247[3]), g_345[5][0], l_1248));
+ (*l_1219) ^= (*l_1248);
+ }
+ else
+ { /* block id: 596 */
+ struct S3 l_1249 = {4294967295UL,1UL};
+ struct S3 *l_1250 = (void*)0;
+ struct S3 *l_1251[7][8][1] = {{{&g_25},{(void*)0},{&l_1249},{&g_25},{(void*)0},{(void*)0},{(void*)0},{&g_49[3]}},{{(void*)0},{(void*)0},{(void*)0},{&g_25},{&l_1249},{(void*)0},{&g_25},{(void*)0}},{{(void*)0},{&g_25},{(void*)0},{&l_1249},{&g_25},{(void*)0},{(void*)0},{(void*)0}},{{&g_49[3]},{(void*)0},{(void*)0},{(void*)0},{&g_25},{&l_1249},{(void*)0},{&g_25}},{{(void*)0},{(void*)0},{&g_25},{(void*)0},{&l_1249},{&g_25},{(void*)0},{(void*)0}},{{(void*)0},{&g_49[3]},{(void*)0},{(void*)0},{(void*)0},{&g_25},{&l_1249},{(void*)0}},{{&g_25},{(void*)0},{(void*)0},{&g_25},{(void*)0},{&l_1249},{&g_25},{(void*)0}}};
+ int i, j, k;
+ g_49[4] = l_1249;
+ }
+ return (*g_692);
+}
+
+
+/* ------------------------------------------ */
+/*
+ * reads : g_25 g_5 g_52 g_96 g_99 g_103 g_108 g_109 g_110 g_109.f0 g_165 g_82 g_92 g_183.f0 g_191 g_218 g_90 g_183 g_49.f1 g_49.f0 g_258 g_49 g_332 g_345.f0 g_395 g_398 g_455 g_467 g_345 g_393 g_465 g_535 g_538 g_452 g_525.f1 g_575 g_532 g_623.f4 g_692 g_466 g_1057 g_404.f1 g_623.f0 g_454 g_815 g_623.f3 g_1175
+ * writes: g_5 g_49 g_52 g_96 g_103 g_110 g_99.f3 g_108.f4 g_99.f2 g_165 g_108.f0 g_191 g_92 g_108.f2 g_108.f1 g_108.f6 g_108 g_304 g_332 g_395 g_398 g_258 g_455 g_467 g_465 g_518 g_524 g_535 g_538 g_557 g_575 g_532 g_452 g_1057 g_25.f0 g_623.f0 g_466 g_1170 g_192 g_1182 g_1184 g_534
+ */
+static struct S0 func_10(uint8_t p_11, uint32_t p_12)
+{ /* block id: 2 */
+ uint8_t l_14[2];
+ struct S3 *l_1025 = &g_49[3];
+ struct S3 **l_1024 = &l_1025;
+ union U4 l_1026 = {-10L};
+ int32_t *l_1037 = &g_108.f0;
+ int32_t l_1049 = 0x9C024423L;
+ int32_t l_1051 = 1L;
+ int32_t l_1052 = 6L;
+ int32_t l_1053 = 6L;
+ int32_t l_1056 = (-10L);
+ int32_t l_1080 = 5L;
+ int16_t l_1149 = 0x2237L;
+ int32_t ** const l_1152 = (void*)0;
+ int32_t **l_1179 = (void*)0;
+ int32_t ***l_1178 = &l_1179;
+ int32_t ***l_1181 = &l_1179;
+ int32_t ****l_1180[9] = {&l_1181,&l_1181,&l_1181,&l_1181,&l_1181,&l_1181,&l_1181,&l_1181,&l_1181};
+ int8_t l_1187 = (-8L);
+ int16_t *l_1188 = (void*)0;
+ struct S0 l_1189 = {0xED4943ABL,-763,-734,4256,0xC4L,3227,1761};
+ int i;
+ for (i = 0; i < 2; i++)
+ l_14[i] = 0UL;
+ for (p_12 = 0; (p_12 <= 1); p_12 += 1)
+ { /* block id: 5 */
+ int32_t *l_24 = (void*)0;
+ uint8_t *l_470 = &g_96;
+ int32_t **l_1021 = &l_24;
+ int i;
+ for (g_5 = 0; g_5 < 2; g_5 += 1)
+ {
+ l_14[g_5] = 0UL;
+ }
+ l_24 = func_15(func_19(l_24, g_25, (func_26(l_14[p_12], (((((safe_sub_func_uint8_t_u_u(((*l_470) = func_31(l_24)), l_14[p_12])) && 0UL) ^ (safe_mul_func_int16_t_s_s(0x458AL, ((l_14[p_12] != l_14[1]) ^ 255UL)))) || p_11) , &g_465)) , &g_52), &g_532), g_623.f4, p_11);
+ (*l_1021) = l_24;
+ if (l_14[0])
+ continue;
+ }
+ (*g_692) = (g_623.f4 < 0UL);
+ if ((+(safe_mod_func_uint16_t_u_u((*g_165), (((l_1024 == &g_966) , (5UL <= l_14[0])) , (((l_1026 , p_11) ^ ((safe_mod_func_int16_t_s_s(((p_11 ^ (safe_add_func_int8_t_s_s((((**l_1024) = (**l_1024)) , g_466), 0xC0L))) , 0x5932L), p_11)) || l_1026.f0)) , (*g_165)))))))
+ { /* block id: 537 */
+ for (g_452 = 4; (g_452 <= (-10)); --g_452)
+ { /* block id: 540 */
+ struct S0 l_1033 = {1L,698,901,1235,0xECL,371,16979};
+ return l_1033;
+ }
+ }
+ else
+ { /* block id: 543 */
+ int32_t *l_1036 = &g_108.f0;
+ int32_t l_1045 = 0xA4C54D33L;
+ int32_t l_1046 = 0x85FF5E2CL;
+ int32_t l_1047 = 0x9B98B598L;
+ int32_t l_1048 = 0L;
+ int32_t l_1050[4] = {0x17E2FF5BL,0x17E2FF5BL,0x17E2FF5BL,0x17E2FF5BL};
+ struct S2 l_1075 = {83};
+ int16_t l_1081 = 0x9246L;
+ struct S1 l_1143 = {0x454ACDE8L,0UL,0xC1L,-1L};
+ const int32_t **l_1150 = (void*)0;
+ int i;
+ for (g_108.f4 = (-8); (g_108.f4 == 1); g_108.f4 = safe_add_func_int16_t_s_s(g_108.f4, 4))
+ { /* block id: 546 */
+ l_1037 = func_34(l_1036, l_1026, l_1036);
+ }
+ if ((*l_1036))
+ { /* block id: 549 */
+ int32_t *l_1038 = &g_465;
+ int32_t *l_1039 = &g_108.f0;
+ int32_t *l_1040 = &g_623.f0;
+ int32_t *l_1041 = &g_465;
+ int32_t *l_1042 = &g_465;
+ int32_t l_1043 = 0L;
+ int32_t *l_1044[5] = {&g_465,&g_465,&g_465,&g_465,&g_465};
+ int8_t *l_1074 = &g_258;
+ uint32_t *l_1078 = &g_25.f0;
+ uint32_t *l_1079 = &g_1057[2][1];
+ int i;
+ g_1057[2][2]++;
+ (*l_1042) = ((*l_1040) &= (safe_add_func_int16_t_s_s(((((safe_rshift_func_int8_t_s_u((safe_sub_func_int8_t_s_s(((safe_rshift_func_int16_t_s_s(g_404[2][0][0].f1, (((safe_mod_func_int32_t_s_s((0xCCABL ^ (*g_165)), (safe_sub_func_int32_t_s_s(p_12, ((((((*g_692) , (((-1L) & ((*l_1079) &= ((*l_1078) = (safe_mul_func_int8_t_s_s((!((*l_1074) &= (*l_1041))), (l_1075 , (safe_mul_func_uint16_t_u_u(p_12, (*l_1036))))))))) > (*l_1036))) != p_11) , p_11) | 0x2FL) >= l_1080))))) < 0xDF08L) & 0x88C67591L))) < p_12), p_12)), 7)) >= 0x5AD2FD77L) >= l_1081) && 0x28L), p_12)));
+ }
+ else
+ { /* block id: 556 */
+ int8_t l_1082 = 0x86L;
+ int32_t l_1084 = 0x272816E1L;
+ int32_t l_1093 = (-1L);
+ int32_t l_1096 = (-1L);
+ int32_t l_1097 = 1L;
+ struct S1 *l_1171 = &l_1143;
+ if ((!l_1082))
+ { /* block id: 557 */
+ int32_t **l_1083 = &l_1036;
+ int32_t l_1085 = 1L;
+ int32_t *l_1086 = (void*)0;
+ int32_t *l_1087 = &l_1047;
+ int32_t *l_1088 = (void*)0;
+ int32_t *l_1089 = &l_1050[1];
+ int32_t *l_1090 = &g_465;
+ int32_t *l_1091 = (void*)0;
+ int32_t *l_1092 = &l_1050[1];
+ int32_t *l_1094 = &g_465;
+ int32_t *l_1095[4][6];
+ uint32_t l_1098 = 4294967295UL;
+ uint32_t *l_1134[9][1][3];
+ int8_t *l_1135 = &g_466;
+ int8_t *l_1136 = &g_258;
+ struct S3 * const l_1148 = &g_49[5];
+ int i, j, k;
+ for (i = 0; i < 4; i++)
+ {
+ for (j = 0; j < 6; j++)
+ l_1095[i][j] = (void*)0;
+ }
+ for (i = 0; i < 9; i++)
+ {
+ for (j = 0; j < 1; j++)
+ {
+ for (k = 0; k < 3; k++)
+ l_1134[i][j][k] = (void*)0;
+ }
+ }
+ (*l_1083) = &l_1047;
+ ++l_1098;
+ (*g_692) = ((safe_div_func_int16_t_s_s(((safe_mod_func_int8_t_s_s(((safe_lshift_func_int16_t_s_s((-6L), (safe_lshift_func_uint16_t_u_u(((*l_1087) ^= (*l_1092)), (!(*l_1037)))))) <= ((*g_165) = (safe_mod_func_int8_t_s_s((safe_add_func_uint32_t_u_u((*l_1037), p_11)), (safe_unary_minus_func_uint32_t_u((((*l_1136) = ((*l_1135) = (safe_mod_func_int16_t_s_s((((safe_add_func_uint16_t_u_u((((g_455[0] , (safe_div_func_uint32_t_u_u((g_49[3].f0 |= ((safe_mul_func_int8_t_s_s((((*l_1037) > ((safe_lshift_func_int8_t_s_s((((safe_rshift_func_int16_t_s_s((l_1093 ^= (safe_mod_func_uint8_t_u_u((((safe_sub_func_uint8_t_u_u(((~((safe_mul_func_int16_t_s_s((safe_add_func_uint16_t_u_u((((p_11 , ((p_11 || 0x67L) & (*g_165))) > 4L) >= 0x8DB0432BL), p_11)), g_465)) && 0xA1L)) | 65535UL), 0L)) & l_1084) != p_12), p_11))), (*l_1037))) < 0x75L) == g_218.f0), g_108.f4)) <= (*g_692))) | g_454), g_1057[2][2])) >= 0xABL)), (*l_1037)))) | 3UL) && p_11), p_11)) ^ p_11) , g_404[2][0][0].f1), l_1096)))) > 0x6CL))))))), p_12)) ^ p_12), 0xF789L)) | 0xB5CD281EL);
+ (*l_1094) = (!(safe_rshift_func_int8_t_s_u((safe_div_func_uint32_t_u_u(((((*g_165) = (p_11 || (safe_mod_func_int32_t_s_s(1L, 1UL)))) || (((((*l_1025) , ((((void*)0 == &l_1075) & (l_1143 , (safe_mul_func_int16_t_s_s((safe_div_func_uint32_t_u_u(0x48E9A67DL, ((l_1148 == (void*)0) && l_1084))), g_532)))) & p_12)) <= l_1149) & (*l_1037)) ^ (*g_692))) != l_1096), l_1096)), l_1097)));
+ }
+ else
+ { /* block id: 569 */
+ const int32_t ***l_1151[2][6] = {{(void*)0,&l_1150,(void*)0,&l_1150,(void*)0,&l_1150},{(void*)0,&l_1150,(void*)0,&l_1150,(void*)0,&l_1150}};
+ int32_t *l_1165 = (void*)0;
+ int32_t *l_1166 = (void*)0;
+ int32_t *l_1167 = (void*)0;
+ int32_t *l_1168[2];
+ uint16_t l_1169[1][2];
+ struct S1 **l_1172[3];
+ int i, j;
+ for (i = 0; i < 2; i++)
+ l_1168[i] = &l_1047;
+ for (i = 0; i < 1; i++)
+ {
+ for (j = 0; j < 2; j++)
+ l_1169[i][j] = 5UL;
+ }
+ for (i = 0; i < 3; i++)
+ l_1172[i] = &l_1171;
+ l_1169[0][0] |= (((l_1150 = l_1150) != l_1152) ^ (safe_rshift_func_uint8_t_u_s((((*l_1037) , (safe_mod_func_int32_t_s_s((safe_rshift_func_uint8_t_u_s(((safe_mul_func_int16_t_s_s((3UL < (p_12 ^ ((safe_mod_func_int16_t_s_s(((safe_sub_func_uint32_t_u_u((func_26((l_1082 & ((-6L) >= p_11)), &g_465) , p_11), g_404[2][0][0].f1)) > (-1L)), g_815[0][0])) >= p_11))), g_92)) & g_1057[1][4]), 1)), (-1L)))) , 1UL), g_623.f3)));
+ g_1170 = (void*)0;
+ g_524[1][2][3] = l_1171;
+ }
+ (*g_191) = (void*)0;
+ }
+ }
+ (*g_692) |= ((safe_add_func_int16_t_s_s((&l_1152 == g_1175), ((*l_1037) , (g_534 = (0xEFL <= ((*l_1037) |= (safe_mul_func_uint8_t_u_u((((g_1182 = (l_1178 = l_1178)) == (g_1184 = (void*)0)) , (l_1026 , (g_96 = (safe_sub_func_int16_t_s_s(0xCE65L, l_1187))))), p_11)))))))) >= p_11);
+ return l_1189;
+}
+
+
+/* ------------------------------------------ */
+/*
+ * reads : g_52 g_532 g_108.f3 g_575 g_165 g_110.f0 g_393 g_692 g_465
+ * writes: g_52 g_532 g_103
+ */
+static int32_t * func_15(const int32_t * p_16, uint32_t p_17, uint16_t p_18)
+{ /* block id: 387 */
+ uint16_t l_766 = 1UL;
+ struct S3 *l_771 = &g_49[3];
+ int32_t l_774 = 0L;
+ union U4 l_789[6] = {{0x9E74BDE0L},{0x3925C28AL},{0x9E74BDE0L},{0x9E74BDE0L},{0x3925C28AL},{0x9E74BDE0L}};
+ const int16_t *l_794 = &g_404[2][0][0].f3;
+ int32_t *l_795 = &g_532;
+ int16_t l_803 = 0xBBA5L;
+ int32_t l_812 = 0xEEA32322L;
+ int32_t l_813 = 0xA6554D27L;
+ int32_t l_814[8][1][4] = {{{(-6L),6L,0x6CA574B2L,1L}},{{(-6L),0x6CA574B2L,(-6L),0L}},{{6L,1L,0L,0L}},{{0x6CA574B2L,0x6CA574B2L,0x2134D653L,1L}},{{1L,6L,0x2134D653L,6L}},{{0x6CA574B2L,(-6L),0L,0x2134D653L}},{{6L,(-6L),(-6L),6L}},{{(-6L),6L,0x6CA574B2L,1L}}};
+ uint16_t l_816 = 0UL;
+ uint16_t ** const l_830[6] = {&g_165,&g_165,&g_165,&g_165,&g_165,&g_165};
+ union U4 *l_920 = (void*)0;
+ union U4 **l_919[4][5][5] = {{{&l_920,&l_920,&l_920,&l_920,(void*)0},{&l_920,(void*)0,(void*)0,&l_920,&l_920},{&l_920,&l_920,&l_920,&l_920,&l_920},{&l_920,&l_920,&l_920,&l_920,&l_920},{&l_920,&l_920,&l_920,&l_920,&l_920}},{{&l_920,(void*)0,(void*)0,&l_920,(void*)0},{&l_920,&l_920,&l_920,(void*)0,(void*)0},{&l_920,&l_920,&l_920,&l_920,&l_920},{&l_920,&l_920,&l_920,&l_920,&l_920},{&l_920,&l_920,&l_920,(void*)0,&l_920}},{{&l_920,&l_920,&l_920,&l_920,&l_920},{&l_920,&l_920,&l_920,(void*)0,(void*)0},{&l_920,&l_920,&l_920,&l_920,(void*)0},{&l_920,&l_920,&l_920,(void*)0,&l_920},{&l_920,&l_920,&l_920,&l_920,&l_920}},{{&l_920,&l_920,&l_920,&l_920,&l_920},{&l_920,&l_920,(void*)0,(void*)0,(void*)0},{&l_920,&l_920,&l_920,&l_920,&l_920},{&l_920,&l_920,&l_920,&l_920,&l_920},{&l_920,&l_920,&l_920,&l_920,&l_920}}};
+ union U4 ** const *l_918 = &l_919[2][4][3];
+ struct S1 l_963 = {8UL,0UL,248UL,1L};
+ uint32_t l_1004 = 4294967295UL;
+ struct S1 *l_1015 = &g_99;
+ struct S1 **l_1014 = &l_1015;
+ struct S1 ***l_1013[1][10][10] = {{{&l_1014,&l_1014,&l_1014,&l_1014,&l_1014,&l_1014,&l_1014,&l_1014,(void*)0,&l_1014},{&l_1014,&l_1014,&l_1014,(void*)0,&l_1014,&l_1014,&l_1014,&l_1014,(void*)0,&l_1014},{&l_1014,(void*)0,&l_1014,&l_1014,&l_1014,&l_1014,&l_1014,&l_1014,&l_1014,&l_1014},{(void*)0,(void*)0,&l_1014,(void*)0,&l_1014,&l_1014,&l_1014,&l_1014,&l_1014,&l_1014},{&l_1014,&l_1014,&l_1014,&l_1014,&l_1014,&l_1014,&l_1014,&l_1014,&l_1014,&l_1014},{&l_1014,&l_1014,&l_1014,&l_1014,&l_1014,(void*)0,&l_1014,(void*)0,&l_1014,&l_1014},{(void*)0,&l_1014,&l_1014,&l_1014,&l_1014,(void*)0,&l_1014,&l_1014,&l_1014,&l_1014},{&l_1014,(void*)0,&l_1014,&l_1014,(void*)0,&l_1014,&l_1014,&l_1014,&l_1014,&l_1014},{&l_1014,&l_1014,&l_1014,&l_1014,&l_1014,&l_1014,&l_1014,&l_1014,&l_1014,&l_1014},{&l_1014,&l_1014,&l_1014,&l_1014,&l_1014,&l_1014,(void*)0,&l_1014,&l_1014,&l_1014}}};
+ uint32_t l_1020[5];
+ int i, j, k;
+ for (i = 0; i < 5; i++)
+ l_1020[i] = 4294967292UL;
+ for (g_52 = 0; (g_52 == (-15)); g_52 = safe_sub_func_int8_t_s_s(g_52, 5))
+ { /* block id: 390 */
+ int32_t *l_760 = &g_532;
+ int32_t *l_761 = &g_532;
+ int32_t *l_762 = &g_623.f0;
+ int32_t *l_763 = (void*)0;
+ int32_t *l_764 = (void*)0;
+ int32_t *l_765[7] = {&g_465,&g_465,&g_532,&g_465,&g_465,&g_532,&g_465};
+ struct S3 *l_772 = &g_49[3];
+ uint8_t *l_773[10][2][1] = {{{(void*)0},{(void*)0}},{{(void*)0},{(void*)0}},{{&g_96},{(void*)0}},{{(void*)0},{(void*)0}},{{(void*)0},{&g_96}},{{(void*)0},{(void*)0}},{{(void*)0},{(void*)0}},{{&g_96},{(void*)0}},{{(void*)0},{(void*)0}},{{(void*)0},{&g_96}}};
+ int16_t *l_793 = &g_534;
+ struct S2 l_826 = {-115};
+ uint16_t l_865 = 65534UL;
+ struct S0 l_915 = {0x8466C6A7L,-203,3616,8093,0xFEL,2572,14412};
+ int32_t l_927 = (-1L);
+ struct S2 *l_941 = (void*)0;
+ union U4 l_949 = {0xA27D6C43L};
+ int i, j, k;
+ --l_766;
+ }
+ (*l_795) &= l_1004;
+ l_1020[1] = ((safe_rshift_func_uint16_t_u_s(((((g_108.f3 > ((safe_mul_func_int8_t_s_s((safe_lshift_func_uint8_t_u_u(p_17, (((safe_mul_func_int16_t_s_s(g_575, ((void*)0 == l_1013[0][9][3]))) | (safe_rshift_func_uint16_t_u_s((p_18 = (~((*g_165) = 65531UL))), 15))) | 0x251EB381L))), g_110.f0)) == ((safe_div_func_uint16_t_u_u((((6L > 7UL) , 0x3EF1C5FCL) & 0x28F2BA2DL), p_17)) != p_17))) <= p_17) | g_393[5]) && (*l_795)), p_17)) < (*g_692));
+ return &g_532;
+}
+
+
+/* ------------------------------------------ */
+/*
+ * reads : g_52 g_165 g_103 g_110 g_108.f2 g_532
+ * writes: g_532 g_52
+ */
+static int32_t * func_19(int32_t * p_20, struct S3 p_21, const int32_t * p_22, int32_t * p_23)
+{ /* block id: 301 */
+ struct S1 *l_578 = (void*)0;
+ struct S1 **l_579 = &l_578;
+ union U4 *l_580 = &g_345[6][0];
+ union U4 **l_581 = &l_580;
+ int32_t *l_582 = &g_52;
+ struct S0 l_603[2] = {{1L,-255,2999,2573,0L,1710,19812},{1L,-255,2999,2573,0L,1710,19812}};
+ int32_t l_701 = (-1L);
+ int32_t l_703 = 0x526C16DAL;
+ int32_t l_705 = 0xE1B0524CL;
+ int32_t l_706 = 0x31E2FC84L;
+ int32_t l_707 = 0xDCA00973L;
+ int i;
+ (*l_579) = l_578;
+ (*l_581) = l_580;
+ (*l_582) ^= ((*p_23) = 1L);
+ for (p_21.f0 = 2; (p_21.f0 <= 8); p_21.f0 += 1)
+ { /* block id: 308 */
+ union U4 * const **l_587 = (void*)0;
+ union U4 * const l_590 = &g_591[6][0];
+ union U4 * const *l_589 = &l_590;
+ union U4 * const **l_588 = &l_589;
+ struct S2 *l_595 = &g_110;
+ struct S2 **l_594 = &l_595;
+ uint16_t *l_598[4] = {&g_395,&g_395,&g_395,&g_395};
+ int32_t l_605 = 1L;
+ int32_t l_617[7][3] = {{1L,1L,(-1L)},{3L,2L,(-1L)},{2L,3L,(-1L)},{1L,1L,(-1L)},{3L,2L,(-1L)},{2L,3L,(-1L)},{1L,1L,1L}};
+ struct S0 l_622 = {0x8FD8D455L,470,911,1284,1L,1845,10842};
+ uint32_t l_651 = 18446744073709551612UL;
+ uint32_t l_708 = 4294967286UL;
+ int32_t *l_714[10];
+ int8_t *l_721 = &g_108.f4;
+ int i, j;
+ for (i = 0; i < 10; i++)
+ l_714[i] = &l_622.f0;
+ (*p_23) &= ((0xB43ABAF6L < ((safe_lshift_func_int8_t_s_u(((((*l_588) = &l_580) != (void*)0) ^ 0L), (((*g_165) >= ((safe_lshift_func_int8_t_s_u((((&g_192[3][4] != l_594) , (**l_594)) , 0xC4L), p_21.f1)) ^ (*l_582))) <= 0L))) && (*l_582))) >= g_108.f2);
+ }
+ return &g_465;
+}
+
+
+/* ------------------------------------------ */
+/*
+ * reads : g_395 g_258 g_165 g_103 g_49.f1 g_25.f1 g_92 g_455 g_52 g_5 g_25.f0 g_96 g_99 g_108 g_109 g_110 g_109.f0 g_345 g_332 g_393 g_398 g_465 g_49 g_535 g_538 g_452 g_467 g_525.f1 g_575 g_1055
+ * writes: g_395 g_465 g_49.f1 g_258 g_455 g_52 g_96 g_103 g_110 g_99.f3 g_49 g_108.f4 g_99.f2 g_165 g_304 g_332 g_518 g_524 g_535 g_538 g_108.f0 g_557 g_575 g_1055
+ */
+static struct S3 func_26(int32_t p_27, int32_t * p_28)
+{ /* block id: 237 */
+ uint8_t l_483 = 0xF7L;
+ uint16_t *l_484 = &g_332;
+ int32_t l_485 = 0x98DB7E6CL;
+ union U4 l_486 = {0x92E9D8B5L};
+ struct S1 l_488 = {0x97A67194L,0UL,246UL,0xC600L};
+ struct S3 l_489 = {0xEF71F2B9L,0x3456D091L};
+ int32_t l_504[8][3][4] = {{{0xA5103F6CL,(-1L),0x0FD3DB73L,(-1L)},{0xEC5AAA0EL,3L,0L,0xA5103F6CL},{0x194E9225L,0L,(-1L),0x75938D71L}},{{0L,0xEC5AAA0EL,4L,4L},{0L,0L,(-1L),0L},{0x194E9225L,4L,0L,0L}},{{0xEC5AAA0EL,0L,0x0FD3DB73L,0L},{0xA5103F6CL,0L,0xA5103F6CL,0L},{0L,4L,0x89CB0F28L,0L}},{{0L,0L,0xEC5AAA0EL,4L},{0x75938D71L,0xEC5AAA0EL,0xEC5AAA0EL,0x75938D71L},{0L,0L,0x89CB0F28L,0xA5103F6CL}},{{0L,3L,0xA5103F6CL,(-1L)},{0xA5103F6CL,(-1L),0x0FD3DB73L,(-1L)},{0xEC5AAA0EL,3L,0L,0xA5103F6CL}},{{0x194E9225L,0L,(-1L),0x75938D71L},{0L,0xEC5AAA0EL,4L,4L},{0L,0L,(-1L),0L}},{{0x194E9225L,4L,0L,0L},{0xEC5AAA0EL,0L,0x0FD3DB73L,0L},{0xA5103F6CL,0L,0xA5103F6CL,0L}},{{0L,4L,0x89CB0F28L,0L},{0L,0L,0xEC5AAA0EL,4L},{0x75938D71L,0xEC5AAA0EL,0xEC5AAA0EL,0x75938D71L}}};
+ uint32_t l_507 = 0x647DD300L;
+ struct S2 l_550 = {102};
+ int32_t *l_558 = &g_52;
+ int32_t *l_559 = &l_485;
+ int32_t *l_560 = (void*)0;
+ int32_t *l_561 = &g_532;
+ int32_t *l_562 = &g_532;
+ int32_t *l_563 = &g_465;
+ int32_t *l_564 = &g_52;
+ int32_t *l_565 = &g_52;
+ int32_t *l_566 = &g_108.f0;
+ int32_t *l_567 = &l_504[4][1][2];
+ int32_t *l_568 = &g_52;
+ int32_t *l_569 = &l_504[3][0][3];
+ int32_t *l_570 = &g_532;
+ int32_t *l_571 = &g_52;
+ int32_t *l_572 = &l_485;
+ int32_t *l_573 = &g_52;
+ int32_t *l_574[2];
+ int i, j, k;
+ for (i = 0; i < 2; i++)
+ l_574[i] = &l_504[4][1][2];
+ for (g_395 = 0; (g_395 <= 8); g_395 += 1)
+ { /* block id: 240 */
+ uint16_t *l_477 = (void*)0;
+ struct S2 l_478 = {134};
+ int32_t *l_490 = &g_108.f0;
+ int32_t l_529[9];
+ struct S0 l_546[3][5][9] = {{{{9L,-558,2164,8024,-2L,1272,4805},{9L,-558,2164,8024,-2L,1272,4805},{0x98E31EE4L,524,3745,6533,0L,809,13078},{0x6D6BAD42L,108,-3812,5229,0x1EL,1650,3238},{-7L,-918,3174,3816,0x5CL,341,15849},{0x98E31EE4L,524,3745,6533,0L,809,13078},{-7L,-918,3174,3816,0x5CL,341,15849},{0x6D6BAD42L,108,-3812,5229,0x1EL,1650,3238},{0x98E31EE4L,524,3745,6533,0L,809,13078}},{{0x04F751E2L,-810,2427,5511,0x87L,1463,7070},{0x04F751E2L,-810,2427,5511,0x87L,1463,7070},{0xB51E6FFAL,-615,2203,924,0x1CL,953,19619},{-1L,-324,671,6036,0x18L,743,22659},{6L,-198,-158,3699,0x19L,3763,2066},{0xB51E6FFAL,-615,2203,924,0x1CL,953,19619},{6L,-198,-158,3699,0x19L,3763,2066},{-1L,-324,671,6036,0x18L,743,22659},{0xB51E6FFAL,-615,2203,924,0x1CL,953,19619}},{{9L,-558,2164,8024,-2L,1272,4805},{9L,-558,2164,8024,-2L,1272,4805},{0x98E31EE4L,524,3745,6533,0L,809,13078},{0x6D6BAD42L,108,-3812,5229,0x1EL,1650,3238},{-7L,-918,3174,3816,0x5CL,341,15849},{0x98E31EE4L,524,3745,6533,0L,809,13078},{-7L,-918,3174,3816,0x5CL,341,15849},{0x6D6BAD42L,108,-3812,5229,0x1EL,1650,3238},{0x98E31EE4L,524,3745,6533,0L,809,13078}},{{0x04F751E2L,-810,2427,5511,0x87L,1463,7070},{0x04F751E2L,-810,2427,5511,0x87L,1463,7070},{0xB51E6FFAL,-615,2203,924,0x1CL,953,19619},{-1L,-324,671,6036,0x18L,743,22659},{6L,-198,-158,3699,0x19L,3763,2066},{0xB51E6FFAL,-615,2203,924,0x1CL,953,19619},{6L,-198,-158,3699,0x19L,3763,2066},{-1L,-324,671,6036,0x18L,743,22659},{0xB51E6FFAL,-615,2203,924,0x1CL,953,19619}},{{9L,-558,2164,8024,-2L,1272,4805},{9L,-558,2164,8024,-2L,1272,4805},{0x98E31EE4L,524,3745,6533,0L,809,13078},{0x6D6BAD42L,108,-3812,5229,0x1EL,1650,3238},{-7L,-918,3174,3816,0x5CL,341,15849},{0x98E31EE4L,524,3745,6533,0L,809,13078},{-7L,-918,3174,3816,0x5CL,341,15849},{0x6D6BAD42L,108,-3812,5229,0x1EL,1650,3238},{0x98E31EE4L,524,3745,6533,0L,809,13078}}},{{{0x04F751E2L,-810,2427,5511,0x87L,1463,7070},{0x04F751E2L,-810,2427,5511,0x87L,1463,7070},{0xB51E6FFAL,-615,2203,924,0x1CL,953,19619},{-1L,-324,671,6036,0x18L,743,22659},{6L,-198,-158,3699,0x19L,3763,2066},{0xB51E6FFAL,-615,2203,924,0x1CL,953,19619},{6L,-198,-158,3699,0x19L,3763,2066},{-1L,-324,671,6036,0x18L,743,22659},{0xB51E6FFAL,-615,2203,924,0x1CL,953,19619}},{{9L,-558,2164,8024,-2L,1272,4805},{9L,-558,2164,8024,-2L,1272,4805},{0x98E31EE4L,524,3745,6533,0L,809,13078},{0x6D6BAD42L,108,-3812,5229,0x1EL,1650,3238},{-7L,-918,3174,3816,0x5CL,341,15849},{0x98E31EE4L,524,3745,6533,0L,809,13078},{-7L,-918,3174,3816,0x5CL,341,15849},{0x6D6BAD42L,108,-3812,5229,0x1EL,1650,3238},{0x98E31EE4L,524,3745,6533,0L,809,13078}},{{0x04F751E2L,-810,2427,5511,0x87L,1463,7070},{0x04F751E2L,-810,2427,5511,0x87L,1463,7070},{0xB51E6FFAL,-615,2203,924,0x1CL,953,19619},{-1L,-324,671,6036,0x18L,743,22659},{6L,-198,-158,3699,0x19L,3763,2066},{0xB51E6FFAL,-615,2203,924,0x1CL,953,19619},{6L,-198,-158,3699,0x19L,3763,2066},{-1L,-324,671,6036,0x18L,743,22659},{0xB51E6FFAL,-615,2203,924,0x1CL,953,19619}},{{9L,-558,2164,8024,-2L,1272,4805},{9L,-558,2164,8024,-2L,1272,4805},{0x98E31EE4L,524,3745,6533,0L,809,13078},{0x6D6BAD42L,108,-3812,5229,0x1EL,1650,3238},{-7L,-918,3174,3816,0x5CL,341,15849},{0x98E31EE4L,524,3745,6533,0L,809,13078},{-7L,-918,3174,3816,0x5CL,341,15849},{0x6D6BAD42L,108,-3812,5229,0x1EL,1650,3238},{0x98E31EE4L,524,3745,6533,0L,809,13078}},{{0x04F751E2L,-810,2427,5511,0x87L,1463,7070},{0x04F751E2L,-810,2427,5511,0x87L,1463,7070},{0xB51E6FFAL,-615,2203,924,0x1CL,953,19619},{-1L,-324,671,6036,0x18L,743,22659},{6L,-198,-158,3699,0x19L,3763,2066},{0xB51E6FFAL,-615,2203,924,0x1CL,953,19619},{6L,-198,-158,3699,0x19L,3763,2066},{-1L,-324,671,6036,0x18L,743,22659},{0xB51E6FFAL,-615,2203,924,0x1CL,953,19619}}},{{{9L,-558,2164,8024,-2L,1272,4805},{0L,-867,-638,5318,0x30L,27,9582},{9L,-558,2164,8024,-2L,1272,4805},{0x3C8FBEA6L,-370,-2091,2733,0x6EL,3848,7328},{0xFA3EC8E2L,-191,-287,7473,0xE1L,3268,19310},{9L,-558,2164,8024,-2L,1272,4805},{0xFA3EC8E2L,-191,-287,7473,0xE1L,3268,19310},{0x3C8FBEA6L,-370,-2091,2733,0x6EL,3848,7328},{9L,-558,2164,8024,-2L,1272,4805}},{{1L,-463,3552,4737,9L,3388,5555},{1L,-463,3552,4737,9L,3388,5555},{0x04F751E2L,-810,2427,5511,0x87L,1463,7070},{0xB99A8D2DL,623,254,6652,0L,2740,6051},{0x6B0D55B9L,786,3393,3754,0x9BL,2318,16303},{0x04F751E2L,-810,2427,5511,0x87L,1463,7070},{0x6B0D55B9L,786,3393,3754,0x9BL,2318,16303},{0xB99A8D2DL,623,254,6652,0L,2740,6051},{0x04F751E2L,-810,2427,5511,0x87L,1463,7070}},{{0L,-867,-638,5318,0x30L,27,9582},{0L,-867,-638,5318,0x30L,27,9582},{9L,-558,2164,8024,-2L,1272,4805},{0x3C8FBEA6L,-370,-2091,2733,0x6EL,3848,7328},{0xFA3EC8E2L,-191,-287,7473,0xE1L,3268,19310},{9L,-558,2164,8024,-2L,1272,4805},{0xFA3EC8E2L,-191,-287,7473,0xE1L,3268,19310},{0x3C8FBEA6L,-370,-2091,2733,0x6EL,3848,7328},{9L,-558,2164,8024,-2L,1272,4805}},{{1L,-463,3552,4737,9L,3388,5555},{1L,-463,3552,4737,9L,3388,5555},{0x04F751E2L,-810,2427,5511,0x87L,1463,7070},{0xB99A8D2DL,623,254,6652,0L,2740,6051},{0x6B0D55B9L,786,3393,3754,0x9BL,2318,16303},{0x04F751E2L,-810,2427,5511,0x87L,1463,7070},{0x6B0D55B9L,786,3393,3754,0x9BL,2318,16303},{0xB99A8D2DL,623,254,6652,0L,2740,6051},{0x04F751E2L,-810,2427,5511,0x87L,1463,7070}},{{0L,-867,-638,5318,0x30L,27,9582},{0L,-867,-638,5318,0x30L,27,9582},{9L,-558,2164,8024,-2L,1272,4805},{0x3C8FBEA6L,-370,-2091,2733,0x6EL,3848,7328},{0xFA3EC8E2L,-191,-287,7473,0xE1L,3268,19310},{9L,-558,2164,8024,-2L,1272,4805},{0xFA3EC8E2L,-191,-287,7473,0xE1L,3268,19310},{0x3C8FBEA6L,-370,-2091,2733,0x6EL,3848,7328},{9L,-558,2164,8024,-2L,1272,4805}}}};
+ int i, j, k;
+ for (i = 0; i < 9; i++)
+ l_529[i] = (-6L);
+ if (((safe_sub_func_int32_t_s_s((l_485 = (safe_rshift_func_int16_t_s_s((((((l_477 != l_477) == (l_478 , (safe_sub_func_int32_t_s_s(((safe_sub_func_uint32_t_u_u((((((*p_28) = l_483) ^ ((l_484 != (void*)0) ^ 1L)) >= ((((g_258 == (*g_165)) <= p_27) , p_27) >= 0x86E9F35BL)) & 0xC2L), l_483)) || l_478.f0), p_27)))) != p_27) | p_27) , l_483), l_478.f0))), l_478.f0)) == l_483))
+ { /* block id: 243 */
+ uint32_t l_487 = 0xCA921D1AL;
+ int32_t **l_491[4][3] = {{&g_304,&g_304,&l_490},{&g_304,&g_304,&l_490},{&g_304,&g_304,&l_490},{&g_304,&g_304,&l_490}};
+ int i, j;
+ g_304 = func_34(func_45(func_34(&g_465, l_486, &g_465), ((l_487 , l_488) , l_489)), g_345[7][0], l_490);
+ }
+ else
+ { /* block id: 245 */
+ int8_t l_492 = (-10L);
+ int32_t l_493 = 0x8EFF5816L;
+ int32_t l_502 = 0xC3A4854FL;
+ int32_t l_503 = 0L;
+ int32_t l_505 = (-2L);
+ int32_t l_506 = 0x9317DCD3L;
+ int32_t l_530 = 0x3BEC1AE2L;
+ int32_t l_533 = 0xC6DC5D19L;
+ struct S2 l_545 = {59};
+ struct S1 l_555 = {0UL,0x16F39D5EL,1UL,6L};
+ struct S2 l_556 = {-140};
+ for (g_103 = 0; (g_103 <= 8); g_103 += 1)
+ { /* block id: 248 */
+ int32_t *l_494 = &l_485;
+ int32_t *l_495 = &l_485;
+ int32_t l_496 = (-9L);
+ int32_t *l_497 = &g_52;
+ int32_t *l_498 = &l_493;
+ int32_t *l_499 = &g_108.f0;
+ int32_t l_500 = 0x705D0817L;
+ int32_t *l_501[9][7] = {{&l_500,&l_500,&l_496,(void*)0,(void*)0,(void*)0,(void*)0},{&g_465,&l_500,&g_465,(void*)0,&g_465,&l_500,&g_465},{&l_500,(void*)0,(void*)0,&l_500,(void*)0,&l_496,&l_496},{&l_493,&l_500,&g_465,&l_500,&l_493,&l_500,&g_465},{(void*)0,&l_500,(void*)0,(void*)0,&l_500,(void*)0,&l_496},{&g_465,(void*)0,&g_465,&l_500,&g_465,(void*)0,&g_465},{(void*)0,(void*)0,&l_496,&l_500,&l_500,&l_496,(void*)0},{&l_493,(void*)0,&g_465,(void*)0,&l_493,(void*)0,&g_465},{&l_500,&l_500,&l_496,(void*)0,(void*)0,(void*)0,(void*)0}};
+ const struct S1 **l_523 = (void*)0;
+ int i, j;
+ --l_507;
+ for (l_485 = 1; (l_485 <= 5); l_485 += 1)
+ { /* block id: 252 */
+ uint32_t *l_514 = &g_49[3].f0;
+ uint16_t *l_517 = &g_518;
+ int16_t l_519[3][8][7] = {{{1L,0x7436L,0x0B36L,(-1L),0x1325L,(-1L),0x186EL},{0L,(-1L),0x53B9L,0x97DDL,0xD97BL,(-6L),0L},{0xBB5AL,(-5L),0x0B36L,0x9816L,(-4L),(-1L),0x0D60L},{0xEF7CL,0xB31EL,(-1L),0xD0F5L,0xA256L,0x186EL,0L},{0xD10FL,0L,0x97DDL,0xD338L,0x53B9L,9L,0xB38CL},{0L,9L,1L,0L,0L,(-1L),1L},{0x0B36L,0x6756L,0xB31EL,9L,0L,1L,0xD97BL},{0x383CL,6L,0L,0xF1EEL,4L,1L,0xBB51L}},{{(-6L),0x7197L,0x1325L,1L,0xB707L,(-1L),0x66F8L},{(-4L),(-1L),0L,1L,(-5L),9L,(-1L)},{1L,0L,0x087EL,(-1L),(-4L),0xB471L,9L},{0L,(-5L),0xA8BCL,0xA8BCL,(-5L),0L,0x1608L},{0x97DDL,0xDEE0L,9L,0xD97BL,0x087EL,(-5L),0L},{(-1L),(-1L),(-6L),1L,0x0D60L,0x2F34L,(-1L)},{6L,0xDEE0L,0xBB51L,(-3L),(-7L),9L,(-5L)},{0xF1EEL,(-5L),0L,0x186EL,(-1L),4L,0xBB5AL}},{{(-1L),0xA8BCL,(-7L),0x383CL,(-1L),0xF1EEL,1L},{0x843AL,0x2F34L,0xEF7CL,1L,0xB27FL,0xDEE0L,0L},{0L,(-1L),1L,(-3L),0xBB95L,1L,0x8043L},{(-1L),6L,(-3L),0x8043L,0xBB95L,0L,0L},{1L,(-1L),0x66F8L,0xA256L,0xB27FL,0x087EL,(-1L)},{0L,0xF1EEL,1L,(-7L),(-1L),1L,0L},{0L,0L,1L,0xB27FL,(-1L),0xD338L,0xD338L},{(-7L),0x8AC8L,0x0D60L,0x8AC8L,(-7L),0xED5EL,0x66F8L}}};
+ struct S1 l_522 = {0x646DAE79L,4294967288UL,1UL,0x99F1L};
+ int i, j, k;
+ (*p_28) &= (safe_rshift_func_int8_t_s_u(((safe_add_func_uint8_t_u_u((((((+9L) || ((*l_498) , (((*l_514) = 1UL) <= (safe_add_func_uint16_t_u_u(((*l_517) = (g_455[0] = ((*l_484) &= (0xB114L <= p_27)))), (l_505 > (((~l_519[1][0][5]) || (((0xA658L & (safe_mod_func_int8_t_s_s((l_522 , g_393[3]), p_27))) != l_522.f3) >= l_505)) <= l_519[0][7][1]))))))) <= (*g_165)) , p_27) > l_504[4][1][2]), 0xEAL)) || g_398), p_27));
+ return g_49[g_395];
+ }
+ g_524[1][2][3] = &g_404[2][0][0];
+ }
+ for (g_99.f2 = 0; (g_99.f2 <= 8); g_99.f2 += 1)
+ { /* block id: 264 */
+ int32_t *l_526 = (void*)0;
+ int32_t *l_527 = &l_505;
+ int32_t *l_528[6][3];
+ struct S1 *l_554 = &l_488;
+ struct S1 **l_553 = &l_554;
+ int i, j;
+ for (i = 0; i < 6; i++)
+ {
+ for (j = 0; j < 3; j++)
+ l_528[i][j] = &g_52;
+ }
+ ++g_535[1][4][2];
+ g_538++;
+ for (l_506 = 6; (l_506 >= 0); l_506 -= 1)
+ { /* block id: 269 */
+ uint16_t l_548[5] = {0xF940L,0xF940L,0xF940L,0xF940L,0xF940L};
+ struct S2 *l_549 = (void*)0;
+ int i;
+ if ((safe_sub_func_int32_t_s_s((*p_28), (!((*p_28) || (*l_490))))))
+ { /* block id: 270 */
+ (*l_527) ^= (*p_28);
+ if ((*p_28))
+ continue;
+ }
+ else
+ { /* block id: 273 */
+ struct S2 l_543 = {91};
+ struct S2 *l_544[1];
+ int16_t *l_547 = &g_99.f3;
+ int i;
+ for (i = 0; i < 1; i++)
+ l_544[i] = &g_110;
+ l_545 = l_543;
+ (*l_527) = ((l_546[2][3][0] = g_108) , (((*l_547) = g_452) == ((*l_484) = l_548[4])));
+ if (g_467)
+ continue;
+ }
+ (*l_490) = (((l_550 = l_478) , (g_108 , &l_486)) == &l_486);
+ for (l_492 = 7; (l_492 >= 1); l_492 -= 1)
+ { /* block id: 285 */
+ (*l_490) |= l_486.f0;
+ return g_49[0];
+ }
+ }
+ g_557 = (safe_mul_func_int16_t_s_s(((g_525.f1 & (&g_524[1][5][1] != l_553)) ^ (p_27 && ((l_555 , (l_556 , (-1L))) > g_25.f0))), 0x7A39L));
+ }
+ }
+ for (g_96 = 1; (g_96 <= 8); g_96 += 1)
+ { /* block id: 295 */
+ int i;
+ return g_49[g_96];
+ }
+ }
+ g_575--;
+ return l_489;
+}
+
+
+/* ------------------------------------------ */
+/*
+ * reads : g_5 g_25 g_52 g_96 g_99 g_103 g_108 g_109 g_110 g_109.f0 g_165 g_82 g_92 g_183.f0 g_191 g_218 g_90 g_183 g_49.f1 g_49.f0 g_258 g_49 g_332 g_345.f0 g_395 g_398 g_455 g_467
+ * writes: g_5 g_49 g_52 g_96 g_103 g_110 g_99.f3 g_108.f4 g_99.f2 g_165 g_108.f0 g_191 g_92 g_108.f2 g_108.f1 g_108.f6 g_108 g_304 g_332 g_395 g_398 g_258 g_455 g_467
+ */
+static uint8_t func_31(int32_t * p_32)
+{ /* block id: 7 */
+ uint32_t l_33[2];
+ struct S3 l_43 = {0x4F6F4846L,1UL};
+ struct S3 l_50 = {4UL,4294967289UL};
+ union U4 l_406[7] = {{-3L},{0xB7779B28L},{-3L},{-3L},{0xB7779B28L},{-3L},{-3L}};
+ int32_t l_462 = (-1L);
+ int32_t *l_463 = &l_462;
+ int32_t *l_464[3];
+ int i;
+ for (i = 0; i < 2; i++)
+ l_33[i] = 4294967286UL;
+ for (i = 0; i < 3; i++)
+ l_464[i] = &l_462;
+ for (g_5 = 1; (g_5 >= 0); g_5 -= 1)
+ { /* block id: 10 */
+ struct S3 *l_44 = &l_43;
+ struct S3 *l_48 = &g_49[3];
+ const struct S1 l_167 = {0x3CA78DFFL,0x8E3CAE63L,1UL,0L};
+ int32_t **l_458 = &g_304;
+ struct S0 *l_461 = &g_108;
+ int i;
+ (*l_458) = func_34(func_38(((*l_44) = l_43), l_33[g_5], func_45(p_32, (l_50 = ((*l_48) = g_25))), l_167), l_406[3], p_32);
+ for (g_99.f2 = 0; (g_99.f2 <= 1); g_99.f2 += 1)
+ { /* block id: 230 */
+ struct S0 *l_459 = &g_108;
+ struct S0 **l_460[6] = {&l_459,&l_459,(void*)0,&l_459,&l_459,(void*)0};
+ int i;
+ l_461 = l_459;
+ }
+ }
+ g_467++;
+ return g_467;
+}
+
+
+/* ------------------------------------------ */
+/*
+ * reads : g_49.f1 g_165 g_103 g_25.f1 g_258 g_92 g_455
+ * writes: g_49.f1 g_258 g_455
+ */
+static int32_t * func_34(int32_t * p_35, union U4 p_36, int32_t * p_37)
+{ /* block id: 221 */
+ struct S2 l_409 = {-163};
+ uint32_t *l_416 = (void*)0;
+ uint32_t *l_417[2];
+ int32_t l_418 = 0L;
+ int32_t l_419 = 0x825E3BEFL;
+ int32_t l_420 = 0x051A042DL;
+ int32_t l_443 = (-1L);
+ int32_t *l_444 = &l_418;
+ int32_t *l_445 = (void*)0;
+ int32_t *l_446 = (void*)0;
+ int32_t *l_447 = (void*)0;
+ int32_t *l_448 = &l_420;
+ int32_t *l_449 = &g_108.f0;
+ int32_t *l_450 = &l_418;
+ int32_t *l_451[2][10] = {{&g_52,&g_52,&l_419,&g_52,&g_52,&l_419,&g_52,&g_52,&l_419,&g_52},{&g_52,&l_420,&l_420,&g_52,&l_420,&l_420,&g_52,&l_420,&l_420,&g_52}};
+ int8_t l_453 = (-6L);
+ int i, j;
+ for (i = 0; i < 2; i++)
+ l_417[i] = &g_49[3].f0;
+ l_443 &= ((safe_rshift_func_int8_t_s_u((l_409 , (((p_36.f0 && ((safe_rshift_func_int16_t_s_u(((safe_mod_func_uint8_t_u_u(((safe_sub_func_uint32_t_u_u(0UL, (g_49[3].f1--))) & (safe_mul_func_int8_t_s_s((g_258 ^= (safe_lshift_func_uint8_t_u_u((safe_mul_func_int16_t_s_s(0xC9E3L, (((safe_add_func_int16_t_s_s((l_409.f0 == p_36.f0), (safe_mod_func_uint16_t_u_u(l_419, (+((safe_div_func_int8_t_s_s((safe_div_func_int32_t_s_s((((safe_lshift_func_uint16_t_u_u((*g_165), 9)) , ((safe_add_func_uint16_t_u_u(((safe_sub_func_int8_t_s_s((-3L), 0x98L)) , p_36.f0), (*g_165))) & 0x6D1BCE73L)) < l_409.f0), p_36.f0)), g_25.f1)) , p_36.f0)))))) , l_418) != 0xE3B4E678L))), l_418))), l_409.f0))), l_420)) < l_420), p_36.f0)) >= l_409.f0)) < g_92) , 0x95L)), l_418)) > (*g_165));
+ ++g_455[0];
+ return p_37;
+}
+
+
+/* ------------------------------------------ */
+/*
+ * reads : g_108 g_52 g_165 g_103 g_82 g_25.f1 g_5 g_92 g_183.f0 g_191 g_109.f0 g_25.f0 g_218 g_90 g_109 g_183 g_49.f1 g_49.f0 g_258 g_49 g_110.f0 g_99.f2 g_332 g_25 g_96 g_99.f3 g_345.f0 g_395 g_398
+ * writes: g_108.f0 g_99.f2 g_52 g_103 g_191 g_92 g_108.f2 g_108.f1 g_108.f6 g_99.f3 g_108 g_49.f0 g_304 g_332 g_395 g_398 g_49
+ */
+static int32_t * func_38(struct S3 p_39, uint32_t p_40, int32_t * p_41, const struct S1 p_42)
+{ /* block id: 71 */
+ int8_t l_172 = (-1L);
+ int32_t *l_175 = (void*)0;
+ int32_t **l_174[3];
+ int32_t ***l_173 = &l_174[0];
+ struct S2 l_176 = {-169};
+ uint8_t *l_177 = &g_99.f2;
+ union U4 *l_182 = &g_183;
+ struct S2 *l_195 = (void*)0;
+ struct S2 **l_194 = &l_195;
+ int32_t l_254 = 0x048F6AE0L;
+ int8_t l_255 = 0L;
+ struct S0 l_262 = {0xC1C6760BL,-54,2234,3520,0L,2794,348};
+ struct S3 l_293 = {0xF50D0A37L,4294967291UL};
+ uint16_t l_350 = 0xC4BAL;
+ int32_t l_365 = 0x2489EBF2L;
+ uint32_t l_378[4] = {0x9D96597DL,0x9D96597DL,0x9D96597DL,0x9D96597DL};
+ const struct S1 *l_403 = &g_404[2][0][0];
+ int i;
+ for (i = 0; i < 3; i++)
+ l_174[i] = &l_175;
+ l_172 |= (g_108.f0 = (((p_39 , g_108) , (safe_rshift_func_int8_t_s_u((safe_add_func_uint16_t_u_u(p_39.f0, (g_52 <= g_108.f2))), 5))) || (*g_165)));
+ if ((((*l_173) = &p_41) != (((g_103 <= (((((l_176 , ((&g_52 != (p_42 , p_41)) , g_82)) <= (((*l_177) = p_42.f0) | (((((l_176 , g_25.f1) && g_5) & g_92) ^ g_108.f3) && 0x9DDE6059L))) , p_42.f1) , (void*)0) == (void*)0)) != 0x06L) , &l_175)))
+ { /* block id: 76 */
+ uint32_t l_178 = 0x40F41BBAL;
+ int32_t l_179 = 8L;
+ uint32_t *l_186 = &g_49[3].f0;
+ struct S0 l_217 = {0x9CC95D81L,-985,-1516,7140,0xA9L,2285,11191};
+ uint32_t l_259[5][5][8] = {{{0x404513ECL,1UL,0x0D50F805L,18446744073709551613UL,0x0D50F805L,1UL,0x404513ECL,0x657FA000L},{18446744073709551615UL,18446744073709551608UL,1UL,0xBD5D16FAL,0xEBC21351L,0x0D50F805L,0xDC2B5266L,0xFA0CCB0CL},{1UL,0UL,0x9FFD4D6FL,18446744073709551614UL,0xEBC21351L,0x404513ECL,0x66F2389CL,18446744073709551613UL},{18446744073709551615UL,7UL,0UL,0xFA0CCB0CL,0x0D50F805L,0x1AC60CB9L,1UL,1UL},{0x404513ECL,1UL,18446744073709551608UL,0xEBC21351L,4UL,1UL,0x96F26880L,0x1AC60CB9L}},{{0x233A39EEL,0xA609B5DDL,0xFA0CCB0CL,0xD9F72379L,0xAF2F1A97L,6UL,7UL,18446744073709551615UL},{18446744073709551608UL,18446744073709551608UL,1UL,0UL,18446744073709551615UL,18446744073709551612UL,18446744073709551612UL,18446744073709551614UL},{18446744073709551612UL,18446744073709551608UL,18446744073709551608UL,18446744073709551612UL,0x1AC60CB9L,0xBD5D16FAL,0x96F26880L,0x6981C5EEL},{1UL,0x9FFD4D6FL,18446744073709551615UL,0xFA0CCB0CL,18446744073709551615UL,0x984A7A52L,0x20E4E1FBL,1UL},{18446744073709551615UL,0x9FFD4D6FL,1UL,0xA609B5DDL,18446744073709551608UL,0xBD5D16FAL,1UL,0xF087EB8CL}},{{18446744073709551613UL,18446744073709551608UL,6UL,18446744073709551615UL,18446744073709551615UL,18446744073709551612UL,0xAF2F1A97L,0UL},{0xDC2B5266L,0x47E5CDF2L,4UL,1UL,1UL,0x4B447F4BL,18446744073709551608UL,0x0D50F805L},{0xDF4C687CL,18446744073709551612UL,0x9FFD4D6FL,18446744073709551613UL,0x47E5CDF2L,0UL,18446744073709551615UL,0xFA0CCB0CL},{18446744073709551608UL,0xD9F72379L,0x233A39EEL,0xB0982D63L,0UL,0xB0982D63L,0x233A39EEL,0xD9F72379L},{0x657FA000L,0xC65D9BC6L,0x782E8E32L,0x4B447F4BL,18446744073709551615UL,18446744073709551615UL,0x6981C5EEL,18446744073709551608UL}},{{0x2A31B2FEL,0x66F2389CL,18446744073709551615UL,0x0D50F805L,0x657FA000L,0UL,0x6981C5EEL,0x782E8E32L},{0UL,0x0D50F805L,0x782E8E32L,18446744073709551615UL,0x9FFD4D6FL,1UL,0x233A39EEL,0xDF4C687CL},{0x9FFD4D6FL,1UL,0x233A39EEL,0xDF4C687CL,0xC65D9BC6L,18446744073709551615UL,18446744073709551615UL,0x657FA000L},{0x6DAE4665L,0xFA0CCB0CL,0x9FFD4D6FL,1UL,0xBD5D16FAL,18446744073709551608UL,18446744073709551608UL,1UL},{0xA609B5DDL,0UL,4UL,0xD9F72379L,0x404513ECL,1UL,0xAF2F1A97L,0xAF2F1A97L}},{{0x6981C5EEL,1UL,6UL,6UL,1UL,0x6981C5EEL,1UL,8UL},{0xC65D9BC6L,0x2A31B2FEL,1UL,1UL,0xA609B5DDL,1UL,0x20E4E1FBL,0xBD5D16FAL},{6UL,1UL,18446744073709551615UL,1UL,18446744073709551613UL,0x782E8E32L,0x96F26880L,8UL},{0UL,18446744073709551613UL,18446744073709551608UL,6UL,18446744073709551615UL,18446744073709551615UL,18446744073709551612UL,0xAF2F1A97L},{0xF087EB8CL,0UL,1UL,0xD9F72379L,0x6DAE4665L,18446744073709551615UL,0xC65D9BC6L,1UL}}};
+ int i, j, k;
+lbl_185:
+ l_178 ^= p_42.f0;
+lbl_221:
+ l_179 ^= (g_108.f3 , (-1L));
+ for (g_52 = 0; (g_52 <= (-8)); --g_52)
+ { /* block id: 81 */
+ struct S2 **l_193 = (void*)0;
+ int32_t l_220 = (-2L);
+ uint8_t *l_247 = &g_99.f2;
+ struct S3 *l_294 = &l_293;
+ int32_t l_295[1];
+ int i;
+ for (i = 0; i < 1; i++)
+ l_295[i] = 1L;
+ for (g_103 = 1; (g_103 <= 8); g_103 += 1)
+ { /* block id: 84 */
+ union U4 **l_184 = &l_182;
+ (**l_173) = &g_52;
+ (*l_184) = l_182;
+ if (g_108.f6)
+ goto lbl_185;
+ }
+ if (((l_186 != l_186) >= ((((safe_mul_func_int8_t_s_s((p_42.f0 ^ ((safe_mod_func_int32_t_s_s(g_183.f0, (((g_191 = g_191) == (l_178 , (l_194 = l_193))) & p_42.f0))) , (safe_div_func_uint16_t_u_u(((safe_div_func_int8_t_s_s((safe_mod_func_int16_t_s_s(g_108.f1, g_109.f0)), g_108.f1)) , p_40), l_178)))), l_179)) , (void*)0) != (void*)0) < 0UL)))
+ { /* block id: 91 */
+ uint8_t l_210 = 1UL;
+ int8_t *l_219 = &g_92;
+ l_179 ^= (safe_add_func_int8_t_s_s(((safe_mod_func_uint32_t_u_u(g_109.f0, ((p_42.f2 == (safe_add_func_uint16_t_u_u((safe_add_func_int8_t_s_s(l_210, ((0x20L | (safe_rshift_func_int8_t_s_s((safe_sub_func_int32_t_s_s((g_108.f2 = (((*l_219) ^= ((g_25.f0 | (safe_mod_func_uint16_t_u_u((0x9049C42DL == g_108.f6), p_39.f0))) & ((l_217 , g_218) , 0xFFL))) > (-1L))), 1UL)), g_108.f4))) < l_220))), p_42.f2))) | l_210))) , g_108.f5), p_39.f0));
+ g_108.f1 = (g_108.f0 = l_210);
+ }
+ else
+ { /* block id: 97 */
+ int16_t *l_234 = &g_99.f3;
+ struct S2 l_235 = {-27};
+ const int32_t l_242 = 0L;
+ int32_t l_256 = 0xA933B74FL;
+ uint32_t l_289 = 0x25A83FB6L;
+ if (g_108.f5)
+ goto lbl_221;
+ if ((((safe_sub_func_uint32_t_u_u(0UL, g_90)) > ((safe_rshift_func_int16_t_s_s(((safe_mul_func_int16_t_s_s(((*l_234) = (safe_mod_func_int32_t_s_s(4L, (safe_lshift_func_int8_t_s_s((g_92 >= (g_108.f6 &= 0x5E2D9ED2L)), 2))))), g_92)) >= (l_235 , g_5)), l_220)) >= g_103)) | p_40))
+ { /* block id: 101 */
+ int16_t l_248 = 1L;
+ int32_t l_249 = 0xF2B5DE02L;
+ uint16_t l_250 = 65535UL;
+ if ((l_217.f5 , (g_109 , (+((safe_lshift_func_int16_t_s_s((safe_mod_func_int16_t_s_s((p_42.f3 <= ((((*l_182) , (((safe_add_func_int8_t_s_s(8L, l_242)) >= (((((!((safe_mod_func_int32_t_s_s((0L > (((safe_div_func_uint8_t_u_u((g_49[3].f1 >= ((((l_177 != l_247) ^ 0xA5L) & 0x5FE0L) == l_220)), l_217.f3)) >= p_42.f2) == l_179)), l_242)) && p_42.f2)) ^ l_235.f0) , l_242) & g_218.f0) >= 0xBCL)) >= p_42.f2)) <= 1L) | l_220)), l_248)), 12)) , 0x01166651L)))))
+ { /* block id: 102 */
+ union U4 **l_253 = &l_182;
+ l_250++;
+ (*l_253) = &g_183;
+ if (l_217.f3)
+ break;
+ }
+ else
+ { /* block id: 106 */
+ int32_t l_257 = (-1L);
+ l_259[3][4][1]--;
+ if (g_183.f0)
+ goto lbl_185;
+ }
+ for (l_217.f4 = 5; (l_217.f4 >= 0); l_217.f4 -= 1)
+ { /* block id: 112 */
+ if (g_25.f0)
+ break;
+ (**l_173) = &g_52;
+ }
+ }
+ else
+ { /* block id: 116 */
+ struct S0 *l_263 = (void*)0;
+ struct S0 **l_276 = &l_263;
+ g_108 = l_262;
+ l_256 = (0L > (safe_div_func_uint32_t_u_u(((*l_186) &= ((*g_165) | (0x9EL <= l_178))), (safe_div_func_uint8_t_u_u(((safe_div_func_int8_t_s_s(((safe_sub_func_int16_t_s_s((l_179 ^= 2L), p_39.f1)) == (~(safe_sub_func_uint16_t_u_u((g_108.f2 & p_40), ((safe_lshift_func_int16_t_s_s((!(-1L)), g_108.f6)) , 7UL))))), l_217.f6)) || (*g_165)), g_82)))));
+ (*l_276) = &g_108;
+ }
+ l_220 = (((((((255UL ^ l_220) <= (l_259[0][4][0] == ((safe_rshift_func_int16_t_s_s(((*l_234) = ((safe_rshift_func_uint8_t_u_s(((safe_add_func_uint32_t_u_u((0L ^ 0x06EA03D3L), 0x130C64E2L)) || 7L), 0)) || ((safe_lshift_func_uint8_t_u_u((safe_rshift_func_int16_t_s_u(((safe_lshift_func_uint8_t_u_s((l_242 , (p_42.f3 , l_220)), 4)) <= (*g_165)), p_42.f1)), 4)) ^ p_39.f1))), l_289)) > l_242))) > 0UL) != l_220) ^ g_108.f6) > g_258) , l_242);
+ }
+ for (l_220 = 0; (l_220 == (-6)); l_220--)
+ { /* block id: 128 */
+ struct S3 *l_292[2][4] = {{&g_49[3],&g_49[3],&g_49[3],&g_49[3]},{&g_49[3],&g_49[3],&g_49[3],&g_49[3]}};
+ int32_t *l_297 = (void*)0;
+ int i, j;
+ l_293 = g_49[3];
+ for (p_39.f1 = 0; (p_39.f1 <= 1); p_39.f1 += 1)
+ { /* block id: 132 */
+ int32_t *l_296 = &l_179;
+ for (l_255 = 0; (l_255 <= 5); l_255 += 1)
+ { /* block id: 135 */
+ int i, j;
+ l_294 = l_292[p_39.f1][(p_39.f1 + 1)];
+ l_295[0] = 0x1705E1A6L;
+ }
+ return l_297;
+ }
+ }
+ }
+ if (g_183.f0)
+ goto lbl_185;
+ }
+ else
+ { /* block id: 144 */
+ int16_t l_311 = (-9L);
+ int32_t l_330[5];
+ union U4 *l_344 = &g_345[6][0];
+ int8_t *l_348 = &g_108.f4;
+ int32_t **l_349[3][6] = {{&g_304,&g_304,&g_304,&g_304,&g_304,&g_304},{&g_304,&g_304,&g_304,&g_304,&g_304,&g_304},{&g_304,&g_304,&g_304,&g_304,&g_304,&g_304}};
+ struct S0 *l_385 = (void*)0;
+ int i, j;
+ for (i = 0; i < 5; i++)
+ l_330[i] = 1L;
+lbl_312:
+ for (p_39.f0 = (-9); (p_39.f0 > 18); ++p_39.f0)
+ { /* block id: 147 */
+ uint32_t l_300 = 4294967294UL;
+ int32_t l_301 = 0xD9208B22L;
+ if (l_300)
+ break;
+ l_301 = 0xA4C65C70L;
+ for (l_262.f4 = (-17); (l_262.f4 <= 4); l_262.f4 = safe_add_func_int16_t_s_s(l_262.f4, 8))
+ { /* block id: 152 */
+ for (l_301 = 3; (l_301 <= 8); l_301 += 1)
+ { /* block id: 155 */
+ struct S0 *l_305 = &g_108;
+ for (l_300 = 0; (l_300 <= 8); l_300 += 1)
+ { /* block id: 158 */
+ return p_41;
+ }
+ for (g_99.f3 = 2; (g_99.f3 <= 8); g_99.f3 += 1)
+ { /* block id: 163 */
+ g_304 = p_41;
+ }
+ l_305 = (void*)0;
+ }
+ if (p_42.f1)
+ continue;
+ }
+ }
+ for (p_39.f0 = (-15); (p_39.f0 != 21); p_39.f0 = safe_add_func_uint32_t_u_u(p_39.f0, 9))
+ { /* block id: 173 */
+ for (g_52 = (-16); (g_52 != 2); g_52++)
+ { /* block id: 176 */
+ uint8_t l_310 = 0x9BL;
+ g_108.f2 &= (l_311 = (l_310 ^= g_110.f0));
+ for (p_39.f1 = 0; (p_39.f1 <= 5); p_39.f1 += 1)
+ { /* block id: 182 */
+ if (p_42.f2)
+ goto lbl_312;
+ }
+ if (g_5)
+ break;
+ }
+ }
+ if ((safe_add_func_uint16_t_u_u((l_293 , 0x3EC2L), g_99.f2)))
+ { /* block id: 188 */
+ int32_t l_321[6][7] = {{(-5L),(-5L),0xD6B91F25L,4L,(-1L),4L,0xD6B91F25L},{0xACB8014FL,0xACB8014FL,0x3ED75555L,0xBE7ED0B2L,1L,0xBE7ED0B2L,0x3ED75555L},{(-5L),(-5L),0xD6B91F25L,0xEA670ACDL,(-3L),0xEA670ACDL,(-5L)},{1L,1L,0xACB8014FL,0L,0x94A37624L,0L,0xACB8014FL},{(-1L),(-1L),(-5L),0xEA670ACDL,(-3L),0xEA670ACDL,(-5L)},{1L,1L,0xACB8014FL,0L,0x94A37624L,0L,0xACB8014FL}};
+ uint16_t *l_331 = &g_332;
+ union U4 *l_341 = &g_183;
+ union U4 **l_342 = &l_182;
+ union U4 **l_343 = (void*)0;
+ union U4 *l_347 = &g_345[6][0];
+ union U4 **l_346 = &l_347;
+ uint32_t l_351 = 3UL;
+ struct S2 * const *l_356 = &l_195;
+ int32_t l_387 = 0L;
+ int32_t l_392[1][2][8] = {{{0x972F012CL,0L,0L,0x972F012CL,0L,0L,0x972F012CL,0L},{0x972F012CL,0x972F012CL,(-8L),0x972F012CL,0x972F012CL,(-8L),0x972F012CL,0x972F012CL}}};
+ int i, j, k;
+ if ((((safe_mul_func_int16_t_s_s((safe_rshift_func_int8_t_s_u(((*l_348) &= ((safe_add_func_int8_t_s_s((0x8DL > l_321[0][1]), (((safe_div_func_uint8_t_u_u((safe_add_func_int32_t_s_s((l_351 &= (safe_div_func_int16_t_s_s(g_99.f2, ((safe_lshift_func_uint16_t_u_u((*g_165), ((*l_331)++))) | (((g_25 , (safe_rshift_func_int16_t_s_s((safe_div_func_int16_t_s_s((safe_rshift_func_int8_t_s_u(((l_344 = ((*l_342) = l_341)) != ((*l_346) = &g_345[4][0])), 7)), ((((*l_173) = ((((&g_92 != l_348) && 1UL) && 0L) , l_349[0][5])) == (void*)0) | 0L))), 10))) <= l_350) | 0x5D11L))))), g_258)), 0xB7L)) && g_82) <= p_42.f1))) | p_40)), p_42.f1)), l_321[4][2])) < g_96) <= 0x9CL))
+ { /* block id: 196 */
+ g_108.f1 = (+(((void*)0 == &g_108) & (3UL <= (p_42 , ((((0x76BACE53L ^ g_99.f3) & ((p_42.f1 | (safe_mul_func_uint8_t_u_u((&g_192[3][4] != (((*l_348) ^= (safe_div_func_int16_t_s_s((-1L), 0x3769L))) , l_356)), g_108.f3))) && g_108.f5)) >= g_49[3].f0) >= 5UL)))));
+ }
+ else
+ { /* block id: 199 */
+ const int32_t l_374 = 0x1727C7D6L;
+ int32_t l_375 = 0xA28F6C8BL;
+ int16_t *l_376 = (void*)0;
+ int16_t *l_377[3];
+ int32_t l_379 = 0L;
+ int i;
+ for (i = 0; i < 3; i++)
+ l_377[i] = &l_311;
+ l_379 = (safe_add_func_uint8_t_u_u((safe_mul_func_uint16_t_u_u(((safe_div_func_int8_t_s_s((-2L), p_42.f1)) > 0UL), (((safe_add_func_int32_t_s_s(l_365, g_258)) && (((g_99.f3 = (safe_mod_func_int8_t_s_s(g_108.f0, ((*l_348) = (l_375 = ((g_345[6][0].f0 > ((safe_sub_func_uint32_t_u_u((g_108.f3 &= ((safe_rshift_func_uint16_t_u_u((*g_165), ((safe_mod_func_uint32_t_u_u(l_351, l_374)) <= p_42.f3))) , 4294967295UL)), l_374)) != l_374)) && l_374)))))) && l_378[1]) , p_40)) < (-5L)))), p_42.f3));
+ }
+ for (l_311 = 4; (l_311 >= 25); l_311++)
+ { /* block id: 208 */
+ struct S0 *l_382 = &l_262;
+ struct S0 **l_383[9][10][1] = {{{&l_382},{&l_382},{&l_382},{&l_382},{(void*)0},{&l_382},{&l_382},{&l_382},{(void*)0},{&l_382}},{{&l_382},{&l_382},{&l_382},{&l_382},{&l_382},{(void*)0},{&l_382},{(void*)0},{&l_382},{(void*)0}},{{&l_382},{&l_382},{&l_382},{&l_382},{&l_382},{&l_382},{(void*)0},{&l_382},{(void*)0},{&l_382}},{{(void*)0},{&l_382},{&l_382},{&l_382},{&l_382},{&l_382},{&l_382},{(void*)0},{&l_382},{&l_382}},{{&l_382},{(void*)0},{&l_382},{&l_382},{&l_382},{&l_382},{&l_382},{&l_382},{(void*)0},{&l_382}},{{(void*)0},{&l_382},{(void*)0},{&l_382},{&l_382},{&l_382},{&l_382},{&l_382},{&l_382},{(void*)0}},{{&l_382},{(void*)0},{&l_382},{(void*)0},{&l_382},{&l_382},{&l_382},{&l_382},{&l_382},{&l_382}},{{(void*)0},{&l_382},{&l_382},{&l_382},{(void*)0},{&l_382},{&l_382},{&l_382},{&l_382},{&l_382}},{{&l_382},{(void*)0},{&l_382},{(void*)0},{&l_382},{(void*)0},{&l_382},{&l_382},{&l_382},{&l_382}}};
+ struct S0 *l_384 = &g_108;
+ int32_t l_386 = (-1L);
+ int32_t l_388 = 1L;
+ int32_t l_389 = 0xE1A9D191L;
+ int32_t l_390 = 0xC7A0417FL;
+ int32_t l_391 = 1L;
+ int32_t l_394 = (-8L);
+ int i, j, k;
+ l_385 = (l_384 = l_382);
+ g_395++;
+ }
+ --g_398;
+ }
+ else
+ { /* block id: 214 */
+ const struct S1 *l_402 = (void*)0;
+ const struct S1 **l_401[7][3][9] = {{{&l_402,(void*)0,&l_402,(void*)0,&l_402,(void*)0,&l_402,(void*)0,&l_402},{&l_402,&l_402,(void*)0,(void*)0,&l_402,&l_402,(void*)0,(void*)0,&l_402},{&l_402,(void*)0,&l_402,(void*)0,&l_402,(void*)0,&l_402,(void*)0,&l_402}},{{&l_402,(void*)0,(void*)0,&l_402,&l_402,(void*)0,(void*)0,&l_402,&l_402},{&l_402,(void*)0,&l_402,(void*)0,&l_402,(void*)0,&l_402,(void*)0,&l_402},{&l_402,&l_402,(void*)0,(void*)0,&l_402,&l_402,(void*)0,(void*)0,&l_402}},{{&l_402,(void*)0,&l_402,(void*)0,&l_402,(void*)0,&l_402,(void*)0,&l_402},{&l_402,(void*)0,(void*)0,&l_402,&l_402,(void*)0,(void*)0,&l_402,&l_402},{&l_402,(void*)0,&l_402,(void*)0,&l_402,(void*)0,&l_402,(void*)0,&l_402}},{{&l_402,&l_402,(void*)0,(void*)0,&l_402,&l_402,(void*)0,(void*)0,&l_402},{&l_402,(void*)0,&l_402,(void*)0,&l_402,(void*)0,&l_402,(void*)0,&l_402},{&l_402,(void*)0,(void*)0,&l_402,&l_402,(void*)0,(void*)0,&l_402,&l_402}},{{&l_402,(void*)0,&l_402,(void*)0,&l_402,(void*)0,&l_402,(void*)0,&l_402},{&l_402,&l_402,(void*)0,(void*)0,&l_402,&l_402,(void*)0,(void*)0,&l_402},{&l_402,(void*)0,&l_402,(void*)0,&l_402,(void*)0,&l_402,(void*)0,&l_402}},{{&l_402,(void*)0,(void*)0,&l_402,&l_402,(void*)0,(void*)0,&l_402,&l_402},{&l_402,(void*)0,&l_402,(void*)0,&l_402,(void*)0,&l_402,(void*)0,&l_402},{&l_402,&l_402,(void*)0,(void*)0,&l_402,&l_402,(void*)0,(void*)0,&l_402}},{{&l_402,(void*)0,&l_402,(void*)0,&l_402,(void*)0,&l_402,(void*)0,&l_402},{&l_402,(void*)0,(void*)0,&l_402,&l_402,(void*)0,(void*)0,&l_402,&l_402},{&l_402,(void*)0,&l_402,(void*)0,&l_402,(void*)0,&l_402,(void*)0,&l_402}}};
+ int32_t *l_405 = &g_52;
+ int i, j, k;
+ l_403 = &p_42;
+ g_49[3] = g_49[6];
+ l_405 = (void*)0;
+ }
+ }
+ return &g_52;
+}
+
+
+/* ------------------------------------------ */
+/*
+ * reads : g_52 g_5 g_25.f0 g_96 g_99 g_103 g_108 g_109 g_110 g_25.f1 g_109.f0
+ * writes: g_52 g_96 g_103 g_110 g_99.f3 g_49 g_108.f4 g_99.f2 g_165
+ */
+static int32_t * func_45(int32_t * p_46, struct S3 p_47)
+{ /* block id: 14 */
+ int32_t *l_51 = &g_52;
+ int32_t *l_53 = &g_52;
+ int32_t *l_54 = &g_52;
+ int32_t *l_55 = &g_52;
+ int32_t *l_56 = &g_52;
+ int32_t *l_57 = &g_52;
+ int32_t *l_58 = &g_52;
+ int32_t *l_59 = &g_52;
+ int32_t l_60 = 0x722525A5L;
+ int32_t *l_61 = (void*)0;
+ int32_t *l_62 = &g_52;
+ int32_t *l_63 = (void*)0;
+ int32_t *l_64 = &l_60;
+ int32_t *l_65 = &g_52;
+ uint8_t l_66 = 0x5DL;
+ struct S3 l_76 = {0x937BBCECL,0x3F78CAFAL};
+ int32_t l_93 = 0L;
+ int32_t l_95 = 0xCC66F1EAL;
+ uint16_t *l_123 = &g_103;
+ struct S2 l_152[7] = {{137},{137},{137},{137},{137},{137},{137}};
+ struct S0 l_154 = {0x4F983824L,-543,3055,3523,8L,612,3345};
+ int i;
+ ++l_66;
+lbl_113:
+ if (((*l_64) |= (+(safe_unary_minus_func_int32_t_s((*l_55))))))
+ { /* block id: 17 */
+ uint8_t l_75 = 3UL;
+ int32_t l_81[8][5] = {{(-7L),0xABB25A59L,0xDA4CDC86L,(-10L),(-10L)},{(-10L),0x9E1B0F05L,(-10L),(-8L),0x4CABBE7FL},{0xDA4CDC86L,0xABB25A59L,(-7L),0L,0x4CABBE7FL},{0xA845DB39L,4L,4L,0xA845DB39L,(-10L)},{0x58DE384CL,0xA845DB39L,(-7L),0x4CABBE7FL,0xABB25A59L},{0x58DE384CL,(-7L),(-10L),(-7L),0x58DE384CL},{0xA845DB39L,0L,0xDA4CDC86L,0x4CABBE7FL,4L},{0xDA4CDC86L,0L,0xA845DB39L,0xA845DB39L,0L}};
+ int32_t l_94 = (-1L);
+ int i, j;
+ for (l_66 = 0; (l_66 >= 10); ++l_66)
+ { /* block id: 20 */
+ int8_t l_74[9] = {0x4BL,0xC8L,0xC8L,0x4BL,0xC8L,0xC8L,0x4BL,0xC8L,0xC8L};
+ int32_t l_83 = 1L;
+ int32_t *l_84 = &l_81[1][3];
+ int32_t *l_85 = (void*)0;
+ int32_t *l_86 = &l_60;
+ int32_t *l_87 = (void*)0;
+ int32_t *l_88 = &g_52;
+ int32_t *l_89 = (void*)0;
+ int32_t *l_91[10] = {&l_81[0][3],&l_81[0][3],&l_81[0][3],&l_81[0][3],&l_81[0][3],&l_81[0][3],&l_81[0][3],&l_81[0][3],&l_81[0][3],&l_81[0][3]};
+ int i;
+ (*l_53) = (((safe_add_func_uint8_t_u_u(l_74[0], ((&g_49[3] == &p_47) , l_75))) == (l_76 , g_5)) , ((((255UL | g_25.f0) , (safe_add_func_int16_t_s_s(((safe_mul_func_int8_t_s_s(0x15L, g_5)) ^ 4294967294UL), (*l_58)))) , l_74[7]) && 0x05855809L));
+ --g_96;
+ }
+ }
+ else
+ { /* block id: 24 */
+ uint16_t *l_102 = &g_103;
+ struct S2 *l_111 = (void*)0;
+ struct S2 *l_112 = &g_110;
+ (*l_58) ^= (g_99 , (safe_lshift_func_uint16_t_u_s((((*l_102)++) < ((safe_rshift_func_uint16_t_u_u(p_47.f1, p_47.f1)) < ((0UL & (g_108 , ((void*)0 != p_46))) >= (0L | (+((((*l_112) = ((g_109 , p_47.f0) , g_110)) , (-1L)) , g_108.f2)))))), 4)));
+ if (l_76.f0)
+ goto lbl_113;
+ }
+ for (g_99.f3 = (-30); (g_99.f3 != 13); g_99.f3++)
+ { /* block id: 32 */
+ int32_t **l_116 = &l_56;
+ struct S0 l_126 = {-10L,818,-153,1691,1L,3770,19024};
+ (*l_116) = &l_60;
+ (*l_64) |= 0xA61E07D3L;
+ for (l_76.f0 = 19; (l_76.f0 < 18); l_76.f0--)
+ { /* block id: 37 */
+ uint32_t l_129 = 0x97477C28L;
+ uint32_t l_143 = 18446744073709551615UL;
+ if ((((safe_lshift_func_uint8_t_u_s((+g_99.f2), (safe_rshift_func_int8_t_s_s((1L & (l_123 != &g_103)), (safe_mod_func_int16_t_s_s(1L, (l_126 , 65535UL))))))) < (65530UL | (safe_div_func_int32_t_s_s(5L, l_129)))) & (-2L)))
+ { /* block id: 38 */
+ struct S3 l_130 = {0UL,4294967295UL};
+ struct S3 *l_131 = &g_49[3];
+ struct S3 *l_132 = &l_130;
+ struct S2 *l_134 = &g_110;
+ struct S2 **l_133 = &l_134;
+ (*l_132) = ((*l_131) = l_130);
+ (*l_133) = &g_110;
+ (*l_53) = (safe_mul_func_int8_t_s_s(0xEFL, 252UL));
+ }
+ else
+ { /* block id: 43 */
+ uint32_t l_137 = 1UL;
+ int32_t l_138[2];
+ struct S0 l_149 = {0x4E9E4B14L,423,871,982,0x3CL,988,6284};
+ int i;
+ for (i = 0; i < 2; i++)
+ l_138[i] = (-5L);
+ (*l_62) ^= 7L;
+ l_138[0] = (0xB4L < l_137);
+ if (l_129)
+ { /* block id: 46 */
+ struct S3 *l_140 = &l_76;
+ struct S3 **l_139 = &l_140;
+ (*l_139) = &g_49[3];
+ for (g_108.f4 = 0; (g_108.f4 == (-18)); g_108.f4 = safe_sub_func_int32_t_s_s(g_108.f4, 2))
+ { /* block id: 50 */
+ return &g_52;
+ }
+ l_143 &= g_103;
+ }
+ else
+ { /* block id: 54 */
+ uint8_t *l_148 = &l_66;
+ uint8_t *l_153 = &g_99.f2;
+ if ((((safe_add_func_uint8_t_u_u((((*l_148) &= (safe_sub_func_int8_t_s_s(p_47.f1, (0xF9L < (-9L))))) == g_99.f1), (l_149 , ((*l_153) = (safe_mod_func_uint32_t_u_u((l_152[0] , p_47.f1), g_108.f6)))))) && (((l_154 , p_47.f1) , (-1L)) < g_25.f1)) | g_108.f6))
+ { /* block id: 57 */
+ return &g_52;
+ }
+ else
+ { /* block id: 59 */
+ uint32_t *l_166 = &g_49[3].f0;
+ (*l_57) ^= g_108.f6;
+ (*l_51) ^= (((*l_166) = (safe_add_func_int16_t_s_s(g_108.f1, ((*l_123) = (p_47.f0 < (safe_div_func_int8_t_s_s(0xA3L, (safe_rshift_func_uint16_t_u_s((safe_rshift_func_uint16_t_u_u(65535UL, 5)), (safe_sub_func_uint32_t_u_u(l_143, ((((p_47.f0 ^ ((&g_96 != (void*)0) == (+(+((g_165 = &g_103) == &g_103))))) | l_129) , 0x08092664L) ^ g_109.f0)))))))))))) || l_149.f1);
+ }
+ }
+ }
+ }
+ }
+ return p_46;
+}
+
+
+
+
+/* ---------------------------------------- */
+int main (int argc, char* argv[])
+{
+ int i, j, k;
+ int print_hash_value = 0;
+ if (argc == 2 && strcmp(argv[1], "1") == 0) print_hash_value = 1;
+ platform_main_begin();
+ crc32_gentab();
+ func_1();
+ transparent_crc(g_5, "g_5", print_hash_value);
+ transparent_crc(g_25.f0, "g_25.f0", print_hash_value);
+ transparent_crc(g_25.f1, "g_25.f1", print_hash_value);
+ for (i = 0; i < 9; i++)
+ {
+ transparent_crc(g_49[i].f0, "g_49[i].f0", print_hash_value);
+ transparent_crc(g_49[i].f1, "g_49[i].f1", print_hash_value);
+ if (print_hash_value) printf("index = [%d]\n", i);
+
+ }
+ transparent_crc(g_52, "g_52", print_hash_value);
+ transparent_crc(g_82, "g_82", print_hash_value);
+ transparent_crc(g_90, "g_90", print_hash_value);
+ transparent_crc(g_92, "g_92", print_hash_value);
+ transparent_crc(g_96, "g_96", print_hash_value);
+ transparent_crc(g_99.f0, "g_99.f0", print_hash_value);
+ transparent_crc(g_99.f1, "g_99.f1", print_hash_value);
+ transparent_crc(g_99.f2, "g_99.f2", print_hash_value);
+ transparent_crc(g_99.f3, "g_99.f3", print_hash_value);
+ transparent_crc(g_103, "g_103", print_hash_value);
+ transparent_crc(g_108.f0, "g_108.f0", print_hash_value);
+ transparent_crc(g_108.f1, "g_108.f1", print_hash_value);
+ transparent_crc(g_108.f2, "g_108.f2", print_hash_value);
+ transparent_crc(g_108.f3, "g_108.f3", print_hash_value);
+ transparent_crc(g_108.f4, "g_108.f4", print_hash_value);
+ transparent_crc(g_108.f5, "g_108.f5", print_hash_value);
+ transparent_crc(g_108.f6, "g_108.f6", print_hash_value);
+ transparent_crc(g_109.f0, "g_109.f0", print_hash_value);
+ transparent_crc(g_110.f0, "g_110.f0", print_hash_value);
+ transparent_crc(g_183.f0, "g_183.f0", print_hash_value);
+ transparent_crc(g_218.f0, "g_218.f0", print_hash_value);
+ transparent_crc(g_258, "g_258", print_hash_value);
+ transparent_crc(g_332, "g_332", print_hash_value);
+ for (i = 0; i < 10; i++)
+ {
+ for (j = 0; j < 1; j++)
+ {
+ transparent_crc(g_345[i][j].f0, "g_345[i][j].f0", print_hash_value);
+ if (print_hash_value) printf("index = [%d][%d]\n", i, j);
+
+ }
+ }
+ for (i = 0; i < 6; i++)
+ {
+ transparent_crc(g_393[i], "g_393[i]", print_hash_value);
+ if (print_hash_value) printf("index = [%d]\n", i);
+
+ }
+ transparent_crc(g_395, "g_395", print_hash_value);
+ transparent_crc(g_398, "g_398", print_hash_value);
+ for (i = 0; i < 9; i++)
+ {
+ for (j = 0; j < 3; j++)
+ {
+ for (k = 0; k < 7; k++)
+ {
+ transparent_crc(g_404[i][j][k].f0, "g_404[i][j][k].f0", print_hash_value);
+ transparent_crc(g_404[i][j][k].f1, "g_404[i][j][k].f1", print_hash_value);
+ transparent_crc(g_404[i][j][k].f2, "g_404[i][j][k].f2", print_hash_value);
+ transparent_crc(g_404[i][j][k].f3, "g_404[i][j][k].f3", print_hash_value);
+ if (print_hash_value) printf("index = [%d][%d][%d]\n", i, j, k);
+
+ }
+ }
+ }
+ transparent_crc(g_452, "g_452", print_hash_value);
+ transparent_crc(g_454, "g_454", print_hash_value);
+ for (i = 0; i < 1; i++)
+ {
+ transparent_crc(g_455[i], "g_455[i]", print_hash_value);
+ if (print_hash_value) printf("index = [%d]\n", i);
+
+ }
+ transparent_crc(g_465, "g_465", print_hash_value);
+ transparent_crc(g_466, "g_466", print_hash_value);
+ transparent_crc(g_467, "g_467", print_hash_value);
+ transparent_crc(g_518, "g_518", print_hash_value);
+ transparent_crc(g_525.f0, "g_525.f0", print_hash_value);
+ transparent_crc(g_525.f1, "g_525.f1", print_hash_value);
+ transparent_crc(g_525.f2, "g_525.f2", print_hash_value);
+ transparent_crc(g_525.f3, "g_525.f3", print_hash_value);
+ transparent_crc(g_531, "g_531", print_hash_value);
+ transparent_crc(g_532, "g_532", print_hash_value);
+ transparent_crc(g_534, "g_534", print_hash_value);
+ for (i = 0; i < 3; i++)
+ {
+ for (j = 0; j < 6; j++)
+ {
+ for (k = 0; k < 4; k++)
+ {
+ transparent_crc(g_535[i][j][k], "g_535[i][j][k]", print_hash_value);
+ if (print_hash_value) printf("index = [%d][%d][%d]\n", i, j, k);
+
+ }
+ }
+ }
+ transparent_crc(g_538, "g_538", print_hash_value);
+ transparent_crc(g_557, "g_557", print_hash_value);
+ transparent_crc(g_575, "g_575", print_hash_value);
+ for (i = 0; i < 10; i++)
+ {
+ for (j = 0; j < 8; j++)
+ {
+ transparent_crc(g_591[i][j].f0, "g_591[i][j].f0", print_hash_value);
+ if (print_hash_value) printf("index = [%d][%d]\n", i, j);
+
+ }
+ }
+ transparent_crc(g_623.f0, "g_623.f0", print_hash_value);
+ transparent_crc(g_623.f1, "g_623.f1", print_hash_value);
+ transparent_crc(g_623.f2, "g_623.f2", print_hash_value);
+ transparent_crc(g_623.f3, "g_623.f3", print_hash_value);
+ transparent_crc(g_623.f4, "g_623.f4", print_hash_value);
+ transparent_crc(g_623.f5, "g_623.f5", print_hash_value);
+ transparent_crc(g_623.f6, "g_623.f6", print_hash_value);
+ for (i = 0; i < 4; i++)
+ {
+ for (j = 0; j < 3; j++)
+ {
+ transparent_crc(g_815[i][j], "g_815[i][j]", print_hash_value);
+ if (print_hash_value) printf("index = [%d][%d]\n", i, j);
+
+ }
+ }
+ transparent_crc(g_901.f0, "g_901.f0", print_hash_value);
+ transparent_crc(g_1054, "g_1054", print_hash_value);
+ transparent_crc(g_1055, "g_1055", print_hash_value);
+ for (i = 0; i < 4; i++)
+ {
+ for (j = 0; j < 5; j++)
+ {
+ transparent_crc(g_1057[i][j], "g_1057[i][j]", print_hash_value);
+ if (print_hash_value) printf("index = [%d][%d]\n", i, j);
+
+ }
+ }
+ platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value);
+ return 0;
+}
+
+/************************ statistics *************************
+XXX max struct depth: 1
+breakdown:
+ depth: 0, occurrence: 269
+ depth: 1, occurrence: 55
+XXX total union variables: 9
+
+XXX non-zero bitfields defined in structs: 8
+XXX zero bitfields defined in structs: 2
+XXX const bitfields defined in structs: 0
+XXX volatile bitfields defined in structs: 0
+XXX structs with bitfields in the program: 52
+breakdown:
+ indirect level: 0, occurrence: 35
+ indirect level: 1, occurrence: 7
+ indirect level: 2, occurrence: 10
+XXX full-bitfields structs in the program: 17
+breakdown:
+ indirect level: 0, occurrence: 17
+XXX times a bitfields struct's address is taken: 36
+XXX times a bitfields struct on LHS: 8
+XXX times a bitfields struct on RHS: 43
+XXX times a single bitfield on LHS: 10
+XXX times a single bitfield on RHS: 51
+
+XXX max expression depth: 47
+breakdown:
+ depth: 1, occurrence: 181
+ depth: 2, occurrence: 42
+ depth: 3, occurrence: 4
+ depth: 4, occurrence: 1
+ depth: 5, occurrence: 1
+ depth: 6, occurrence: 1
+ depth: 8, occurrence: 1
+ depth: 9, occurrence: 2
+ depth: 11, occurrence: 2
+ depth: 13, occurrence: 1
+ depth: 14, occurrence: 2
+ depth: 15, occurrence: 3
+ depth: 16, occurrence: 3
+ depth: 17, occurrence: 3
+ depth: 18, occurrence: 1
+ depth: 19, occurrence: 1
+ depth: 20, occurrence: 1
+ depth: 21, occurrence: 3
+ depth: 22, occurrence: 3
+ depth: 23, occurrence: 1
+ depth: 24, occurrence: 3
+ depth: 26, occurrence: 1
+ depth: 28, occurrence: 2
+ depth: 33, occurrence: 1
+ depth: 35, occurrence: 1
+ depth: 47, occurrence: 1
+
+XXX total number of pointers: 302
+
+XXX times a variable address is taken: 479
+XXX times a pointer is dereferenced on RHS: 115
+breakdown:
+ depth: 1, occurrence: 111
+ depth: 2, occurrence: 4
+XXX times a pointer is dereferenced on LHS: 145
+breakdown:
+ depth: 1, occurrence: 142
+ depth: 2, occurrence: 3
+XXX times a pointer is compared with null: 16
+XXX times a pointer is compared with address of another variable: 8
+XXX times a pointer is compared with another pointer: 7
+XXX times a pointer is qualified to be dereferenced: 2276
+
+XXX max dereference level: 3
+breakdown:
+ level: 0, occurrence: 0
+ level: 1, occurrence: 957
+ level: 2, occurrence: 39
+ level: 3, occurrence: 11
+XXX number of pointers point to pointers: 74
+XXX number of pointers point to scalars: 173
+XXX number of pointers point to structs: 46
+XXX percent of pointers has null in alias set: 32.1
+XXX average alias set size: 1.41
+
+XXX times a non-volatile is read: 962
+XXX times a non-volatile is write: 470
+XXX times a volatile is read: 0
+XXX times read thru a pointer: 0
+XXX times a volatile is write: 0
+XXX times written thru a pointer: 0
+XXX times a volatile is available for access: 0
+XXX percentage of non-volatile access: 100
+
+XXX forward jumps: 1
+XXX backward jumps: 5
+
+XXX stmts: 174
+XXX max block depth: 5
+breakdown:
+ depth: 0, occurrence: 36
+ depth: 1, occurrence: 30
+ depth: 2, occurrence: 27
+ depth: 3, occurrence: 39
+ depth: 4, occurrence: 20
+ depth: 5, occurrence: 22
+
+XXX percentage a fresh-made variable is used: 22
+XXX percentage an existing variable is used: 78
+FYI: the random generator makes assumptions about the integer size. See platform.info for more details.
+********************* end of statistics **********************/
+
diff --git a/tests/fuzz/6.c.txt b/tests/fuzz/6.c.txt
new file mode 100644
index 00000000..00e8a313
--- /dev/null
+++ b/tests/fuzz/6.c.txt
@@ -0,0 +1 @@
+checksum = F4711189
diff --git a/tests/fuzz/csmith_driver.py b/tests/fuzz/csmith_driver.py
index 90c7df2e..d7ed46e1 100755
--- a/tests/fuzz/csmith_driver.py
+++ b/tests/fuzz/csmith_driver.py
@@ -35,12 +35,15 @@ notes = { 'invalid': 0, 'unaligned': 0, 'embug': 0 }
fails = 0
while 1:
- opts = '-O' + str(random.randint(0, 2))
+ opts = '-O' + str(random.randint(0, 3))
print 'opt level:', opts
print 'Tried %d, notes: %s' % (tried, notes)
print '1) Generate C'
- check_call([CSMITH, '--no-volatiles', '--no-packed-struct'],# '--no-math64'
+ extra_args = []
+ if random.random() < 0.5: extra_args += ['--no-math64']
+ print extra_args
+ check_call([CSMITH, '--no-volatiles', '--no-packed-struct'] + extra_args,
#['--max-block-depth', '2', '--max-block-size', '2', '--max-expr-complexity', '2', '--max-funcs', '2'],
stdout=open(filename + '.c', 'w'))
#shutil.copyfile(filename + '.c', 'testcase%d.c' % tried)
diff --git a/tests/fuzz/test.sh b/tests/fuzz/test.sh
index 166d4bab..208e97e0 100755
--- a/tests/fuzz/test.sh
+++ b/tests/fuzz/test.sh
@@ -8,8 +8,9 @@ gcc $@ -I/home/alon/Dev/csmith/runtime -o n1.out &> /dev/null
/home/alon/Dev/fastcomp/build/Release/bin/clang $@ -I/home/alon/Dev/csmith/runtime -emit-llvm -c -o bc.bc &> o
~/Dev/emscripten/emcc $@ -I/home/alon/Dev/csmith/runtime -o js.out.js &> /dev/null
#~/Dev/emscripten/emcc $@ -s UNALIGNED_MEMORY=1 -I/home/alon/Dev/csmith/runtime -o ua.out.js &> /dev/null
-#~/Dev/emscripten/emcc $@ -s SAFE_HEAP=1 -I/home/alon/Dev/csmith/runtime -o sh.out.js &> /dev/null
+~/Dev/emscripten/emcc $@ -s SAFE_HEAP=1 -I/home/alon/Dev/csmith/runtime -o sh.out.js &> /dev/null
EMCC_FAST_COMPILER=1 ~/Dev/emscripten/emcc $@ -I/home/alon/Dev/csmith/runtime -o fc.out.js &> /dev/null
+EMCC_FAST_COMPILER=1 ~/Dev/emscripten/emcc $@ -s SAFE_HEAP=1 -I/home/alon/Dev/csmith/runtime -o fc-sh.out.js &> /dev/null
echo "run n1"
./n1.out &> n1
echo "run n2"
@@ -21,9 +22,11 @@ mozjs js.out.js &> js
echo "run ua"
#mozjs ua.out.js &> ua
echo "run sh"
-#mozjs sh.out.js &> sh
+mozjs sh.out.js &> sh
echo "run fc"
mozjs fc.out.js &> fc
+echo "run fc-sh"
+mozjs fc-sh.out.js &> fc-sh
echo "n/n"
diff n1 n2
echo "n/bc"
@@ -33,7 +36,9 @@ diff n1 js | grep -v warning
echo "n/js-ua"
#diff n1 ua | grep -v warning
echo "n/js-sh"
-#diff n1 sh | grep -v warning
-echo "js/js"
+diff n1 sh | grep -v warning
+echo "js/fc"
diff js fc | grep -v warning
+echo "js/fc-sh"
+diff js fc-sh | grep -v warning
diff --git a/tests/hello_world_gles_deriv.c b/tests/hello_world_gles_deriv.c
index c5354d4e..592078ed 100644
--- a/tests/hello_world_gles_deriv.c
+++ b/tests/hello_world_gles_deriv.c
@@ -645,6 +645,7 @@ static const char vertex_shader[] =
static const char fragment_shader[] =
"#ifdef GL_ES\n"
+"#extension GL_OES_standard_derivatives : enable\n"
"precision mediump float;\n"
"#endif\n"
"varying vec4 Color;\n"
diff --git a/tests/netinet/in.cpp b/tests/netinet/in.cpp
new file mode 100644
index 00000000..eaadfba2
--- /dev/null
+++ b/tests/netinet/in.cpp
@@ -0,0 +1,14 @@
+#include <netinet/in.h>
+extern "C" int puts(const char *);
+int main() {
+ struct in6_addr in6any = IN6ADDR_ANY_INIT;
+ struct in6_addr in6loopback = IN6ADDR_LOOPBACK_INIT;
+ int i;
+ for (i = 0; i < 16; ++i)
+ if (in6any.s6_addr[i] != in6addr_any.s6_addr[i])
+ return puts("in6addr_any != IN6ADDR_ANY_INIT\n");
+ for (i = 0; i < 16; ++i)
+ if (in6loopback.s6_addr[i] != in6addr_loopback.s6_addr[i])
+ return puts("in6addr_loopback != IN6ADDR_LOOPBACK_INIT\n");
+ return puts("pass");
+}
diff --git a/tests/netinet/in.out b/tests/netinet/in.out
new file mode 100644
index 00000000..2ae28399
--- /dev/null
+++ b/tests/netinet/in.out
@@ -0,0 +1 @@
+pass
diff --git a/tests/openal_playback.cpp b/tests/openal_playback.cpp
index 13d619e6..6a8dae38 100644
--- a/tests/openal_playback.cpp
+++ b/tests/openal_playback.cpp
@@ -3,11 +3,15 @@
#include <AL/al.h>
#include <AL/alc.h>
#include <assert.h>
+#include <stdint.h>
+#include <unistd.h>
+#ifdef EMSCRIPTEN
#include <emscripten.h>
+#endif
void playSource(void* arg)
{
- ALuint source = reinterpret_cast<ALuint>(arg);
+ ALuint source = static_cast<ALuint>(reinterpret_cast<intptr_t>(arg));
ALint state;
alGetSourcei(source, AL_SOURCE_STATE, &state);
assert(state == AL_PLAYING);
@@ -21,15 +25,32 @@ void playSource(void* arg)
alGetSourcei(source, AL_SOURCE_STATE, &state);
assert(state == AL_STOPPED);
+#ifdef EMSCRIPTEN
int result = 1;
REPORT_RESULT();
+#endif
}
int main() {
+ int major, minor;
+ alcGetIntegerv(NULL, ALC_MAJOR_VERSION, 1, &major);
+ alcGetIntegerv(NULL, ALC_MAJOR_VERSION, 1, &minor);
+
+ assert(major == 1);
+
+ printf("ALC version: %i.%i\n", major, minor);
+ printf("Default device: %s\n", alcGetString(NULL, ALC_DEFAULT_DEVICE_SPECIFIER));
+
ALCdevice* device = alcOpenDevice(NULL);
ALCcontext* context = alcCreateContext(device, NULL);
alcMakeContextCurrent(context);
+ assert(alGetString(AL_VERSION));
+
+ printf("OpenAL version: %s\n", alGetString(AL_VERSION));
+ printf("OpenAL vendor: %s\n", alGetString(AL_VENDOR));
+ printf("OpenAL renderer: %s\n", alGetString(AL_RENDERER));
+
ALfloat listenerPos[] = {0.0, 0.0, 0.0};
ALfloat listenerVel[] = {0.0, 0.0, 0.0};
ALfloat listenerOri[] = {0.0, 0.0, -1.0, 0.0, 1.0, 0.0};
@@ -42,7 +63,11 @@ int main() {
alGenBuffers(1, buffers);
+#ifdef EMSCRIPTEN
FILE* source = fopen("audio.wav", "rb");
+#else
+ FILE* source = fopen("sounds/audio.wav", "rb");
+#endif
fseek(source, 0, SEEK_END);
int size = ftell(source);
fseek(source, 0, SEEK_SET);
@@ -95,9 +120,21 @@ int main() {
alBufferData(buffers[0], format, &buffer[offset], size - offset, frequency);
+ ALint val;
+ alGetBufferi(buffers[0], AL_FREQUENCY, &val);
+ assert(val == frequency);
+ alGetBufferi(buffers[0], AL_SIZE, &val);
+ assert(val == size - offset);
+ alGetBufferi(buffers[0], AL_BITS, &val);
+ assert(val == bits);
+ alGetBufferi(buffers[0], AL_CHANNELS, &val);
+ assert(val == channels);
+
ALuint sources[1];
alGenSources(1, sources);
+ assert(alIsSource(sources[0]));
+
alSourcei(sources[0], AL_BUFFER, buffers[0]);
ALint state;
@@ -109,7 +146,12 @@ int main() {
alGetSourcei(sources[0], AL_SOURCE_STATE, &state);
assert(state == AL_PLAYING);
+#ifdef EMSCRIPTEN
emscripten_async_call(playSource, reinterpret_cast<void*>(sources[0]), 700);
+#else
+ usleep(700000);
+ playSource(reinterpret_cast<void*>(sources[0]));
+#endif
return 0;
}
diff --git a/tests/runner.py b/tests/runner.py
index f59d5cb9..501299c7 100755
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -36,7 +36,10 @@ except:
# Core test runner class, shared between normal tests and benchmarks
checked_sanity = False
-test_modes = ['default', 'o1', 'o2', 'asm1', 'asm2', 'asm3', 'asm2f', 'asm2g', 'asm2x86', 's_0_0', 's_0_1']
+if os.environ.get('EMCC_FAST_COMPILER') == '1':
+ test_modes = ['default', 'asm1', 'asm2', 'asm3', 'asm2f', 'asm2g']
+else:
+ test_modes = ['default', 'o1', 'o2', 'asm1', 'asm2', 'asm3', 'asm2f', 'asm2g', 'asm2x86', 's_0_0', 's_0_1']
test_index = 0
class RunnerCore(unittest.TestCase):
@@ -138,7 +141,11 @@ class RunnerCore(unittest.TestCase):
post1 = post_build
post2 = None
- if self.emcc_args is None:
+ emcc_args = self.emcc_args
+ if emcc_args is None:
+ emcc_args = []
+
+ if emcc_args is None: # legacy testing mode, no longer used
Building.emscripten(filename, append_ext=True, extra_args=extra_emscripten_args)
if post1:
exec post1 in locals()
@@ -160,7 +167,7 @@ process(sys.argv[1])
''')
transform.close()
transform_args = ['--js-transform', "%s %s" % (PYTHON, transform_filename)]
- Building.emcc(filename + '.o.ll', Settings.serialize() + self.emcc_args + transform_args + Building.COMPILER_TEST_OPTS, filename + '.o.js')
+ Building.emcc(filename + '.o.ll', Settings.serialize() + emcc_args + transform_args + Building.COMPILER_TEST_OPTS, filename + '.o.js')
if post2: post2(filename + '.o.js')
# Build JavaScript code from source code
@@ -649,7 +656,6 @@ class BrowserCore(RunnerCore):
def btest(self, filename, expected=None, reference=None, force_c=False, reference_slack=0, manual_reference=False, post_build=None,
args=[], outfile='test.html', message='.'): # TODO: use in all other tests
- if os.environ.get('EMCC_FAST_COMPILER') == '1' and 'LEGACY_GL_EMULATION=1' in args: return self.skip('no legacy gl emulation in fastcomp')
# if we are provided the source and not a path, use that
filename_is_src = '\n' in filename
src = filename if filename_is_src else ''
@@ -792,6 +798,16 @@ an individual test with
python tests/runner.py ALL.test_hello_world
+Debugging: You can run
+
+ EM_SAVE_DIR=1 python tests/runner.py ALL.test_hello_world
+
+in order to save the test runner directory, in /tmp/emscripten_temp. All files
+created by the test will be present there. You can also use EMCC_DEBUG to
+further debug the compiler itself, which works outside of the test suite as
+well: EMCC_DEBUG=1 will emit emcc-* files in that temp dir for each stage
+of the compiler, while EMCC_DEBUG=2 will emit even more files, one for each
+js optimizer phase.
==============================================================================
'''
diff --git a/tests/sdlglshader.c b/tests/sdlglshader.c
index a096ef20..9cd80097 100644
--- a/tests/sdlglshader.c
+++ b/tests/sdlglshader.c
@@ -89,6 +89,11 @@ void setShaders() {
glCompileShader_(v);
glGetObjectParameteriv_(v, GL_OBJECT_COMPILE_STATUS_ARB, &ok);
+ if (!ok) {
+ char msg[512];
+ glGetShaderInfoLog(v, sizeof msg, NULL, msg);
+ printf("shader compilation issue: %s\n", msg);
+ }
assert(ok);
glCompileShader_(f);
diff --git a/tests/sockets/test_sockets_echo_client.c b/tests/sockets/test_sockets_echo_client.c
index f6ea85cf..18cff97e 100644
--- a/tests/sockets/test_sockets_echo_client.c
+++ b/tests/sockets/test_sockets_echo_client.c
@@ -71,21 +71,25 @@ void main_loop(void *arg) {
return;
}
+#if !TEST_DGRAM
// as a test, confirm with ioctl that we have data available
// after selecting
int available;
res = ioctl(server.fd, FIONREAD, &available);
assert(res != -1);
assert(available);
+#endif
res = do_msg_read(server.fd, &server.msg, echo_read, 0, NULL, NULL);
- if (res == 0) {
+ if (res == -1) {
+ return;
+ } else if (res == 0) {
perror("server closed");
finish(EXIT_FAILURE);
- } else if (res != -1) {
- echo_read += res;
}
+ echo_read += res;
+
// once we've read the entire message, validate it
if (echo_read >= server.msg.length) {
assert(!strcmp(server.msg.buffer, MESSAGE));
@@ -97,13 +101,15 @@ void main_loop(void *arg) {
}
res = do_msg_write(server.fd, &echo_msg, echo_wrote, 0, NULL, 0);
- if (res == 0) {
+ if (res == -1) {
+ return;
+ } else if (res == 0) {
perror("server closed");
finish(EXIT_FAILURE);
- } else if (res != -1) {
- echo_wrote += res;
}
+ echo_wrote += res;
+
// once we're done writing the message, read it back
if (echo_wrote >= echo_msg.length) {
server.state = MSG_READ;
@@ -124,8 +130,11 @@ int main() {
echo_msg.buffer = malloc(echo_msg.length);
strncpy(echo_msg.buffer, MESSAGE, echo_msg.length);
+ echo_read = 0;
+ echo_wrote = 0;
+
// create the socket and set to non-blocking
-#if !USE_UDP
+#if !TEST_DGRAM
server.fd = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP);
#else
server.fd = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP);
@@ -158,4 +167,4 @@ int main() {
#endif
return EXIT_SUCCESS;
-} \ No newline at end of file
+}
diff --git a/tests/sockets/test_sockets_echo_server.c b/tests/sockets/test_sockets_echo_server.c
index 55ace660..850b7e89 100644
--- a/tests/sockets/test_sockets_echo_server.c
+++ b/tests/sockets/test_sockets_echo_server.c
@@ -59,7 +59,7 @@ void main_loop(void *arg) {
FD_ZERO(&fdw);
FD_SET(server.fd, &fdr);
FD_SET(server.fd, &fdw);
-#if !USE_UDP
+#if !TEST_DGRAM
if (client.fd) FD_SET(client.fd, &fdr);
if (client.fd) FD_SET(client.fd, &fdw);
#endif
@@ -69,7 +69,7 @@ void main_loop(void *arg) {
exit(EXIT_SUCCESS);
}
-#if !USE_UDP
+#if !TEST_DGRAM
// for TCP sockets, we may need to accept a connection
if (FD_ISSET(server.fd, &fdr)) {
#if TEST_ACCEPT_ADDR
@@ -86,7 +86,7 @@ void main_loop(void *arg) {
}
#endif
-#if !USE_UDP
+#if !TEST_DGRAM
int fd = client.fd;
#else
int fd = server.fd;
@@ -99,14 +99,16 @@ void main_loop(void *arg) {
}
res = do_msg_read(fd, &client.msg, client.read, 0, (struct sockaddr *)&client.addr, &addrlen);
- if (res == 0) {
+ if (res == -1) {
+ return;
+ } else if (res == 0) {
// client disconnected
memset(&client, 0, sizeof(client_t));
return;
- } else if (res != -1) {
- client.read += res;
}
+ client.read += res;
+
// once we've read the entire message, echo it back
if (client.read >= client.msg.length) {
client.read = 0;
@@ -118,14 +120,16 @@ void main_loop(void *arg) {
}
res = do_msg_write(fd, &client.msg, client.wrote, 0, (struct sockaddr *)&client.addr, sizeof(client.addr));
- if (res == 0) {
+ if (res == -1) {
+ return;
+ } else if (res == 0) {
// client disconnected
memset(&client, 0, sizeof(client_t));
return;
- } else if (res != -1) {
- client.wrote += res;
}
+ client.wrote += res;
+
if (client.wrote >= client.msg.length) {
client.wrote = 0;
client.state = MSG_READ;
@@ -149,7 +153,7 @@ int main() {
memset(&client, 0, sizeof(client_t));
// create the socket and set to non-blocking
-#if !USE_UDP
+#if !TEST_DGRAM
server.fd = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP);
#else
server.fd = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP);
@@ -174,7 +178,7 @@ int main() {
exit(EXIT_FAILURE);
}
-#if !USE_UDP
+#if !TEST_DGRAM
res = listen(server.fd, 50);
if (res == -1) {
perror("listen failed");
diff --git a/tests/test_browser.py b/tests/test_browser.py
index f185c211..54d42397 100644
--- a/tests/test_browser.py
+++ b/tests/test_browser.py
@@ -143,6 +143,8 @@ If manually bisecting:
os.chdir(cwd)
def test_split(self):
+ if os.environ.get('EMCC_FAST_COMPILER') == '1': return self.skip('no --split in fastcomp, deprecated')
+
# test HTML generation.
self.reftest(path_from_root('tests', 'htmltest.png'))
output = Popen([PYTHON, EMCC, path_from_root('tests', 'hello_world_sdl.cpp'), '-o', 'something.js', '--split', '100', '--pre-js', 'reftest.js']).communicate()
@@ -235,6 +237,8 @@ If manually bisecting:
self.run_browser('something.html', 'You should see "hello, world!" and a colored cube.', '/report_result?0')
def test_split_in_source_filenames(self):
+ if os.environ.get('EMCC_FAST_COMPILER') == '1': return self.skip('no --split in fastcomp, deprecated')
+
self.reftest(path_from_root('tests', 'htmltest.png'))
output = Popen([PYTHON, EMCC, path_from_root('tests', 'hello_world_sdl.cpp'), '-o', 'something.js', '-g', '--split', '100', '--pre-js', 'reftest.js']).communicate()
assert os.path.exists(os.path.join(self.get_dir(), 'something.js')), 'must be main js file'
@@ -749,7 +753,7 @@ window.close = function() {
self.btest('sdl_canvas_proxy.c', reference='sdl_canvas_proxy.png', args=['--proxy-to-worker', '--preload-file', 'data.txt'], manual_reference=True, post_build=post)
def test_sdl_canvas_alpha(self):
- self.btest('sdl_canvas_alpha.c', reference='sdl_canvas_alpha.png', reference_slack=1)
+ self.btest('sdl_canvas_alpha.c', reference='sdl_canvas_alpha.png', reference_slack=9)
def test_sdl_key(self):
open(os.path.join(self.get_dir(), 'pre.js'), 'w').write('''
@@ -1152,8 +1156,6 @@ keydown(100);keyup(100); // trigger the end
self.run_browser('page.html', '', '/report_result?1')
def test_sdl_audio_beeps(self):
- if os.environ.get('EMCC_FAST_COMPILER') == '1': return self.skip('todo c++ exceptions in fastcomp')
-
open(os.path.join(self.get_dir(), 'sdl_audio_beep.cpp'), 'w').write(self.with_report_result(open(path_from_root('tests', 'sdl_audio_beep.cpp')).read()))
# use closure to check for a possible bug with closure minifying away newer Audio() attributes
@@ -1537,6 +1539,21 @@ keydown(100);keyup(100); // trigger the end
def test_cubegeom(self):
self.btest('cubegeom.c', reference='cubegeom.png', args=['-O2', '-g', '-s', 'LEGACY_GL_EMULATION=1'])
+ def test_cubegeom_proc(self):
+ open('side.c', 'w').write(r'''
+
+extern void* SDL_GL_GetProcAddress(const char *);
+
+void *glBindBuffer = 0; // same name as the gl function, to check that the collision does not break us
+
+void *getBindBuffer() {
+ if (!glBindBuffer) glBindBuffer = SDL_GL_GetProcAddress("glBindBuffer");
+ return glBindBuffer;
+}
+''')
+ for opts in [0, 1]:
+ self.btest('cubegeom_proc.c', reference='cubegeom.png', args=['-O' + str(opts), 'side.c', '-s', 'LEGACY_GL_EMULATION=1'])
+
def test_cubegeom_glew(self):
self.btest('cubegeom_glew.c', reference='cubegeom.png', args=['-O2', '--closure', '1', '-s', 'LEGACY_GL_EMULATION=1'])
@@ -1815,3 +1832,36 @@ Module["preRun"].push(function () {
def test_html5(self):
self.btest(path_from_root('tests', 'test_html5.c'), expected='0')
+
+ def test_codemods(self):
+ for opt_level in [0, 2]:
+ print 'opt level', opt_level
+ opts = '-O' + str(opt_level)
+ # sanity checks, building with and without precise float semantics generates different results
+ self.btest(path_from_root('tests', 'codemods.cpp'), expected='2', args=[opts])
+ self.btest(path_from_root('tests', 'codemods.cpp'), expected='1', args=[opts, '-s', 'PRECISE_F32=1'])
+ self.btest(path_from_root('tests', 'codemods.cpp'), expected='1', args=[opts, '-s', 'PRECISE_F32=2']) # empty polyfill, but browser has support, so semantics are like float
+
+ # now use a shell to remove the browser's fround support
+ open(self.in_dir('shell.html'), 'w').write(open(path_from_root('src', 'shell.html')).read().replace('var Module = {', '''
+ Math.fround = null;
+ var Module = {
+ '''))
+ self.btest(path_from_root('tests', 'codemods.cpp'), expected='2', args=[opts, '--shell-file', 'shell.html'])
+ self.btest(path_from_root('tests', 'codemods.cpp'), expected='1', args=[opts, '--shell-file', 'shell.html', '-s', 'PRECISE_F32=1'])
+ self.btest(path_from_root('tests', 'codemods.cpp'), expected='2', args=[opts, '--shell-file', 'shell.html', '-s', 'PRECISE_F32=2']) # empty polyfill, no browser support, so semantics are like double
+
+ # finally, remove fround, patch up fround as the code executes (after polyfilling etc.), to verify that we got rid of it entirely on the client side
+ fixer = 'python fix.py'
+ open('fix.py', 'w').write(r'''
+import sys
+filename = sys.argv[1]
+js = open(filename).read()
+replaced = js.replace("var Math_fround = Math.fround;", "var Math_fround = Math.fround = function(x) { return 0; }")
+assert js != replaced
+open(filename, 'w').write(replaced)
+ ''')
+ self.btest(path_from_root('tests', 'codemods.cpp'), expected='2', args=[opts, '--shell-file', 'shell.html', '--js-transform', fixer]) # no fround anyhow
+ self.btest(path_from_root('tests', 'codemods.cpp'), expected='121378', args=[opts, '--shell-file', 'shell.html', '--js-transform', fixer, '-s', 'PRECISE_F32=1']) # proper polyfill was enstated, then it was replaced by the fix so 0 is returned all the time, hence a different result here
+ self.btest(path_from_root('tests', 'codemods.cpp'), expected='2', args=[opts, '--shell-file', 'shell.html', '--js-transform', fixer, '-s', 'PRECISE_F32=2']) # we should remove the calls to the polyfill ENTIRELY here, on the clientside, so we should NOT see any calls to fround here, and result should be like double
+
diff --git a/tests/test_core.py b/tests/test_core.py
index bbc6370a..70f12c7a 100644
--- a/tests/test_core.py
+++ b/tests/test_core.py
@@ -1274,6 +1274,8 @@ class T(RunnerCore): # Short name, to make it more fun to use manually on the co
def test_exceptions_2(self):
if self.emcc_args is None: return self.skip('need emcc to add in libcxx properly')
+ if self.run_name == 'asm2x86': return self.skip('TODO')
+
Settings.DISABLE_EXCEPTION_CATCHING = 0
for safe in [0,1]:
@@ -1284,19 +1286,22 @@ class T(RunnerCore): # Short name, to make it more fun to use manually on the co
self.do_run_from_file(src, output)
def test_exceptions_white_list(self):
- if os.environ.get('EMCC_FAST_COMPILER') == '1': return self.skip('todo in fastcomp')
-
Settings.DISABLE_EXCEPTION_CATCHING = 2
Settings.EXCEPTION_CATCHING_WHITELIST = ["__Z12somefunctionv"]
Settings.INLINING_LIMIT = 50 # otherwise it is inlined and not identified
test_path = path_from_root('tests', 'core', 'test_exceptions_white_list')
src, output = (test_path + s for s in ('.in', '.out'))
-
self.do_run_from_file(src, output)
- Settings.DISABLE_EXCEPTION_CATCHING = 0
- Settings.EXCEPTION_CATCHING_WHITELIST = []
+ def test_exceptions_white_list_2(self):
+ Settings.DISABLE_EXCEPTION_CATCHING = 2
+ Settings.EXCEPTION_CATCHING_WHITELIST = ["_main"]
+ Settings.INLINING_LIMIT = 50 # otherwise it is inlined and not identified
+
+ test_path = path_from_root('tests', 'core', 'test_exceptions_white_list_2')
+ src, output = (test_path + s for s in ('.c', '.out'))
+ self.do_run_from_file(src, output)
def test_exceptions_uncaught(self):
if self.emcc_args is None: return self.skip('no libcxx inclusion without emcc')
@@ -1362,6 +1367,12 @@ class T(RunnerCore): # Short name, to make it more fun to use manually on the co
self.do_run_from_file(src, output)
+ def test_exceptions_alias(self):
+ Settings.DISABLE_EXCEPTION_CATCHING = 0
+ test_path = path_from_root('tests', 'core', 'test_exceptions_alias')
+ src, output = (test_path + s for s in ('.c', '.out'))
+ self.do_run_from_file(src, output)
+
def test_async_exit(self):
open('main.c', 'w').write(r'''
#include <stdio.h>
@@ -1467,7 +1478,6 @@ class T(RunnerCore): # Short name, to make it more fun to use manually on the co
def test_segfault(self):
if self.emcc_args is None: return self.skip('SAFE_HEAP without ta2 means we check types too, which hide segfaults')
- if os.environ.get('EMCC_FAST_COMPILER') == '1' and '-O2' not in self.emcc_args: return self.skip('todo in non-jsopts-enabled fastcomp')
Settings.SAFE_HEAP = 1
@@ -1880,8 +1890,6 @@ class T(RunnerCore): # Short name, to make it more fun to use manually on the co
self.do_run_from_file(src, output, [], lambda x, err: x.replace('\n', '*'))
def test_llvm_used(self):
- if os.environ.get('EMCC_FAST_COMPILER') == '1': return self.skip('pnacl kills llvm_used')
-
Building.LLVM_OPTS = 3
test_path = path_from_root('tests', 'core', 'test_llvm_used')
@@ -1917,7 +1925,7 @@ def process(filename):
def test_inlinejs(self):
if not self.is_le32(): return self.skip('le32 needed for inline js')
- if os.environ.get('EMCC_FAST_COMPILER') == '1': return self.skip('todo in fastcomp')
+ if os.environ.get('EMCC_FAST_COMPILER') == '1': return self.skip('fastcomp only supports EM_ASM')
test_path = path_from_root('tests', 'core', 'test_inlinejs')
src, output = (test_path + s for s in ('.in', '.out'))
@@ -1930,7 +1938,7 @@ def process(filename):
def test_inlinejs2(self):
if not self.is_le32(): return self.skip('le32 needed for inline js')
- if os.environ.get('EMCC_FAST_COMPILER') == '1': return self.skip('todo in fastcomp')
+ if os.environ.get('EMCC_FAST_COMPILER') == '1': return self.skip('fastcomp only supports EM_ASM')
test_path = path_from_root('tests', 'core', 'test_inlinejs2')
src, output = (test_path + s for s in ('.in', '.out'))
@@ -2061,8 +2069,6 @@ def process(filename):
def test_bigswitch(self):
if self.run_name != 'default': return self.skip('TODO: issue #781')
- if os.environ.get('EMCC_FAST_COMPILER') == '1': return self.skip('todo in fastcomp')
-
src = open(path_from_root('tests', 'bigswitch.cpp')).read()
self.do_run(src, '''34962: GL_ARRAY_BUFFER (0x8892)
26214: what?
@@ -2527,8 +2533,6 @@ The current type of b is: 9
self.do_run_from_file(src, output)
def test_intentional_fault(self):
- if os.environ.get('EMCC_FAST_COMPILER') == '1' and self.run_name == 'default': return self.skip('todo in fastcomp in default')
-
# Some programs intentionally segfault themselves, we should compile that into a throw
src = r'''
int main () {
@@ -2582,6 +2586,18 @@ The current type of b is: 9
self.do_run_from_file(src, output)
+ def test_memcpy3(self):
+ if Settings.USE_TYPED_ARRAYS != 2: return self.skip('need ta2')
+ test_path = path_from_root('tests', 'core', 'test_memcpy3')
+ src, output = (test_path + s for s in ('.c', '.out'))
+ self.do_run_from_file(src, output)
+
+ def test_memset(self):
+ if Settings.USE_TYPED_ARRAYS != 2: return self.skip('need ta2')
+ test_path = path_from_root('tests', 'core', 'test_memset')
+ src, output = (test_path + s for s in ('.c', '.out'))
+ self.do_run_from_file(src, output)
+
def test_getopt(self):
if self.emcc_args is None: return self.skip('needs emcc for libc')
@@ -3246,6 +3262,7 @@ def process(filename):
#include <assert.h>
#include <stdio.h>
#include <dlfcn.h>
+ #include <string.h>
typedef int (*FUNCTYPE)(const char *);
@@ -3256,6 +3273,10 @@ def process(filename):
snprintf(str, sizeof(str), "foobar");
+ // HACK: Use strcmp in the main executable so that it doesn't get optimized out and the dynamic library
+ // is able to use it.
+ assert(!strcmp(str, "foobar"));
+
lib_handle = dlopen("liblib.so", RTLD_NOW);
assert(lib_handle != NULL);
@@ -3268,7 +3289,7 @@ def process(filename):
return 0;
}
'''
- Settings.EXPORTED_FUNCTIONS = ['_main', '_malloc']
+ Settings.EXPORTED_FUNCTIONS = ['_main', '_malloc', '_strcmp']
self.do_run(src, 'success', force_c=True, post_build=self.dlfcn_post_build)
def test_dlfcn_funcs(self):
@@ -3533,48 +3554,48 @@ ok
''', post_build=self.dlfcn_post_build)
def test_rand(self):
- return self.skip('rand() is now random') # FIXME
-
- src = r'''
- #include <stdio.h>
- #include <stdlib.h>
-
- int main() {
- printf("%d\n", rand());
- printf("%d\n", rand());
+ src = r'''#include <stdlib.h>
+#include <stdio.h>
+#include <assert.h>
+int main()
+{
+ // we need RAND_MAX to be a bitmask (power of 2 minus 1). this assertions guarantees
+ // if RAND_MAX changes the test failure will focus attention on that issue here.
+ assert(RAND_MAX == 0x7fffffff);
- srand(123);
- printf("%d\n", rand());
- printf("%d\n", rand());
- srand(123);
- printf("%d\n", rand());
+ srand(0xdeadbeef);
+ for(int i = 0; i < 10; ++i)
printf("%d\n", rand());
- unsigned state = 0;
- int r;
- r = rand_r(&state);
- printf("%d, %u\n", r, state);
- r = rand_r(&state);
- printf("%d, %u\n", r, state);
- state = 0;
- r = rand_r(&state);
- printf("%d, %u\n", r, state);
+ unsigned int seed = 0xdeadbeef;
+ for(int i = 0; i < 10; ++i)
+ printf("%d\n", rand_r(&seed));
- return 0;
- }
- '''
- expected = '''
- 1250496027
- 1116302336
- 440917656
- 1476150784
- 440917656
- 1476150784
- 12345, 12345
- 1406932606, 3554416254
- 12345, 12345
- '''
- self.do_run(src, re.sub(r'(^|\n)\s+', r'\1', expected))
+ return 0;
+}
+'''
+ expected = '''2073540312
+730128159
+1365227432
+1337224527
+792390264
+1952655743
+983994184
+1982845871
+1210574360
+1479617503
+2073540312
+730128159
+1365227432
+1337224527
+792390264
+1952655743
+983994184
+1982845871
+1210574360
+1479617503
+'''
+ self.do_run(src, expected)
def test_strtod(self):
if self.emcc_args is None: return self.skip('needs emcc for libc')
@@ -3841,7 +3862,6 @@ Pass: 0.000012 0.000012''')
def test_sscanf_6(self):
test_path = path_from_root('tests', 'core', 'test_sscanf_6')
src, output = (test_path + s for s in ('.in', '.out'))
-
self.do_run_from_file(src, output)
def test_sscanf_skip(self):
@@ -3946,6 +3966,10 @@ def process(filename):
'''
self.do_run(src, ('got: 35\ngot: 45\ngot: 25\ngot: 15\nisatty? 0,0,1\n', 'isatty? 0,0,1\ngot: 35\ngot: 45\ngot: 25\ngot: 15\n'), post_build=post)
+ def test_mount(self):
+ src = open(path_from_root('tests', 'fs', 'test_mount.c'), 'r').read()
+ self.do_run(src, 'success', force_c=True)
+
def test_fwrite_0(self):
test_path = path_from_root('tests', 'core', 'test_fwrite_0')
src, output = (test_path + s for s in ('.in', '.out'))
@@ -4350,6 +4374,11 @@ PORT: 3979
self.do_run_from_file(src, output)
+ def test_netinet_in(self):
+ src = open(path_from_root('tests', 'netinet', 'in.cpp'), 'r').read()
+ expected = open(path_from_root('tests', 'netinet', 'in.out'), 'r').read()
+ self.do_run(src, expected)
+
# libc++ tests
def test_iostream(self):
@@ -4632,7 +4661,16 @@ return malloc(size);
self.do_run(path_from_root('tests', 'cubescript'), '*\nTemp is 33\n9\n5\nhello, everyone\n*', main_file='command.cpp')
- if os.environ.get('EMCC_FAST_COMPILER') == '1': return self.skip('skipping extra parts in fastcomp')
+ assert 'asm1' in test_modes
+ if self.run_name == 'asm1':
+ print 'verifing postsets'
+ generated = open('src.cpp.o.js').read()
+ generated = re.sub(r'\n+[ \n]*\n+', '\n', generated)
+ main = generated[generated.find('function runPostSets'):]
+ main = main[:main.find('\n}')]
+ assert main.count('\n') <= 7, ('must not emit too many postSets: %d' % main.count('\n')) + ' : ' + main
+
+ if os.environ.get('EMCC_FAST_COMPILER') == '1': return self.skip('fastcomp always aliases pointers')
assert 'asm2g' in test_modes
if self.run_name == 'asm2g':
@@ -4651,14 +4689,6 @@ return malloc(size);
assert ' & 255]()' not in original, 'big function table does not exist'
assert ' & 255]()' in final, 'big function table exists'
- assert 'asm1' in test_modes
- if self.run_name == 'asm1':
- generated = open('src.cpp.o.js').read()
- generated = re.sub(r'\n+[ \n]*\n+', '\n', generated)
- main = generated[generated.find('function runPostSets'):]
- main = main[:main.find('\n}')]
- assert main.count('\n') == 7, 'must not emit too many postSets: %d' % main.count('\n')
-
def test_simd(self):
if Settings.USE_TYPED_ARRAYS != 2: return self.skip('needs ta2')
if Settings.ASM_JS: Settings.ASM_JS = 2 # does not validate
@@ -4688,7 +4718,7 @@ return malloc(size);
self.do_run_from_file(src, output)
def test_gcc_unmangler(self):
- if os.environ.get('EMCC_FAST_COMPILER') != '1': Settings.NAMED_GLOBALS = 1 # test coverage for this
+ if os.environ.get('EMCC_FAST_COMPILER') != '1': Settings.NAMED_GLOBALS = 1 # test coverage for this; fastcomp never names globals
Building.COMPILER_TEST_OPTS += ['-I' + path_from_root('third_party')]
@@ -5089,10 +5119,10 @@ def process(filename):
shortname = name.replace('.ll', '')
if '' not in shortname: continue
if os.environ.get('EMCC_FAST_COMPILER') == '1' and os.path.basename(shortname) in [
- 'structparam', 'uadd_overflow_ta2', 'extendedprecision', 'issue_39', 'emptystruct', 'phinonexist', 'quotedlabel', 'oob_ta2', 'phientryimplicit', 'phiself', 'invokebitcast', # invalid ir
+ 'structparam', 'extendedprecision', 'issue_39', 'emptystruct', 'phinonexist', 'quotedlabel', 'oob_ta2', 'phientryimplicit', 'phiself', 'invokebitcast', 'funcptr', # invalid ir
'structphiparam', 'callwithstructural_ta2', 'callwithstructural64_ta2', 'structinparam', # pnacl limitations in ExpandStructRegs
'2xi40', # pnacl limitations in ExpandGetElementPtr
- 'legalizer_ta2', '514_ta2', # pnacl limitation in not legalizing i104, i96, etc.
+ 'legalizer_ta2', # pnacl limitation in not legalizing i104, i96, etc.
'indirectbrphi', 'ptrtoint_blockaddr', 'quoted', # current fastcomp limitations FIXME
'sillyfuncast2', 'sillybitcast', 'atomicrmw_unaligned' # TODO XXX
]: continue
@@ -6151,7 +6181,9 @@ def process(filename):
self.build(src, dirname, os.path.join(dirname, 'src.cpp'), post_build=(None, post))
def test_emscripten_log(self):
- self.banned_js_engines = [SPIDERMONKEY_ENGINE] # XXX, emscripten_log is broken in spidermonkey currently, issue #1970
+ if Settings.ASM_JS:
+ # XXX Does not work in SpiderMonkey since callstacks cannot be captured when running in asm.js, see https://bugzilla.mozilla.org/show_bug.cgi?id=947996
+ self.banned_js_engines = [SPIDERMONKEY_ENGINE]
if self.emcc_args is None: return self.skip('This test needs libc.')
if '-g' not in Building.COMPILER_TEST_OPTS: Building.COMPILER_TEST_OPTS.append('-g')
self.do_run('#define RUN_FROM_JS_SHELL\n' + open(path_from_root('tests', 'emscripten_log', 'emscripten_log.cpp')).read(), "Success!")
@@ -6355,6 +6387,11 @@ def process(filename):
self.do_run_from_file(src, output)
+ def test_minmax(self):
+ if self.emcc_args == None: return self.skip('needs emcc')
+ if os.environ.get('EMCC_FAST_COMPILER') != '1': return self.skip('this test will not pass in the old compiler')
+ self.do_run(open(path_from_root('tests', 'test_minmax.c')).read(), 'NAN != NAN\nSuccess!')
+
# Generate tests for everything
def make_run(fullname, name=-1, compiler=-1, embetter=0, quantum_size=0,
typed_arrays=0, emcc_args=None, env=None):
diff --git a/tests/test_egl.c b/tests/test_egl.c
index d66949d0..6eef4aa5 100644
--- a/tests/test_egl.c
+++ b/tests/test_egl.c
@@ -75,7 +75,10 @@ int main(int argc, char *argv[])
ret = eglTerminate(display);
assert(eglGetError() == EGL_SUCCESS);
assert(ret == EGL_TRUE);
-
+
+ assert(eglGetProcAddress("glClear") != 0);
+ assert(eglGetProcAddress("glWakaWaka") == 0);
+
#ifdef REPORT_RESULT
REPORT_RESULT();
#endif
diff --git a/tests/test_minmax.c b/tests/test_minmax.c
new file mode 100644
index 00000000..998c60d4
--- /dev/null
+++ b/tests/test_minmax.c
@@ -0,0 +1,89 @@
+#include <math.h>
+#include <assert.h>
+#include <float.h>
+#include <stdio.h>
+
+union fi
+{
+ float f;
+ unsigned int i;
+};
+
+unsigned int Float2Int(float f)
+{
+ union fi a;
+ a.f = f;
+ return a.i;
+}
+
+float Fminf(float x, float y)
+{
+ if (x < y || !(y == y))
+ return x;
+ else if (y < x || !(x == x))
+ return y;
+ else if (x != 0.f)
+ return x;
+ else
+ return Float2Int(x) == 0 ? y : x;
+}
+
+float Fmaxf(float x, float y)
+{
+ if (x > y || !(y == y))
+ return x;
+ else if (y > x || !(x == x))
+ return y;
+ else if (x != 0.f)
+ return x;
+ else
+ return Float2Int(x) == 0 ? x : y;
+}
+
+void TestMin(float a, float b, float ret)
+{
+ float x = Fminf(a, b);
+ if (x != ret)
+ printf("min(%f, %f) returned %f, should return ret: %f\n", a, b, x, ret);
+ assert(Float2Int(x) == Float2Int(ret));
+ float y = Fminf(b, a);
+ if (y != ret)
+ printf("min(%f, %f) returned %f, should return ret: %f\n", b, a, y, ret);
+ assert(Float2Int(y) == Float2Int(ret));
+}
+
+void TestMax(float a, float b, float ret)
+{
+ float x = Fmaxf(a, b);
+ if (x != ret)
+ printf("max(%f, %f) returned %f, should return ret: %f\n", a, b, x, ret);
+ assert(Float2Int(x) == Float2Int(ret));
+ float y = Fmaxf(b, a);
+ if (y != ret)
+ printf("max(%f, %f) returned %f, should return ret: %f\n", b, a, x, ret);
+ assert(Float2Int(y) == Float2Int(ret));
+}
+
+int main()
+{
+ TestMin(-INFINITY, INFINITY, -INFINITY);
+ TestMax(-INFINITY, INFINITY, INFINITY);
+
+ TestMin(-INFINITY, 1.f, -INFINITY);
+ TestMax(-INFINITY, 1.f, 1.f);
+
+ TestMin(INFINITY, 1.f, 1.f);
+ TestMax(INFINITY, 1.f, INFINITY);
+
+ TestMin(-INFINITY, NAN, -INFINITY);
+ TestMax(-INFINITY, NAN, -INFINITY);
+ assert(Float2Int(0.0f) != Float2Int(-0.0f));
+
+ if (NAN == NAN)
+ printf("NAN == NAN\n");
+ if (NAN != NAN)
+ printf("NAN != NAN\n");
+ TestMin(-0.0f, 0.0f, -0.0f);
+ TestMax(-0.0f, 0.0f, 0.0f);
+ printf("Success!\n");
+}
diff --git a/tests/test_other.py b/tests/test_other.py
index bc05826e..c3aaa9e1 100644
--- a/tests/test_other.py
+++ b/tests/test_other.py
@@ -1779,6 +1779,8 @@ f.close()
['asm', 'registerize', 'minifyLocals']),
(path_from_root('tools', 'test-js-optimizer-asm-pre.js'), open(path_from_root('tools', 'test-js-optimizer-asm-pre-output.js')).read(),
['asm', 'simplifyExpressions']),
+ (path_from_root('tools', 'test-js-optimizer-asm-pre-f32.js'), open(path_from_root('tools', 'test-js-optimizer-asm-pre-output-f32.js')).read(),
+ ['asm', 'asmPreciseF32', 'simplifyExpressions']),
(path_from_root('tools', 'test-js-optimizer-asm-last.js'), open(path_from_root('tools', 'test-js-optimizer-asm-last-output.js')).read(),
['asm', 'last']),
(path_from_root('tools', 'test-js-optimizer-asm-relocate.js'), open(path_from_root('tools', 'test-js-optimizer-asm-relocate-output.js')).read(),
@@ -1806,6 +1808,7 @@ f.close()
assert 'error' not in err, 'Unexpected stderr: ' + err
def test_chunking(self):
+ if os.environ.get('EMCC_FAST_COMPILER') == '1': return self.skip('not relevant for fastcomp, only checks js compiler chunking')
if os.environ.get('EMCC_DEBUG'): return self.skip('cannot run in debug mode')
if os.environ.get('EMCC_CORES'): return self.skip('cannot run if cores are altered')
if multiprocessing.cpu_count() < 2: return self.skip('need multiple cores')
@@ -2351,3 +2354,24 @@ int main() {
err = Popen([PYTHON, EMCC, 'src.cpp', '-include', 'header.h', '-Xclang', '-print-stats'], stderr=PIPE).communicate()
assert '*** PCH/Modules Loaded:\nModule: header.h.gch' not in err[1], err[1]
+ def test_warn_unaligned(self):
+ if os.environ.get('EMCC_FAST_COMPILER') != '1': return self.skip('need fastcomp')
+ open('src.cpp', 'w').write(r'''
+#include <stdio.h>
+static const double grid[4][2] = {{-3 / 3., -1 / 3.},
+ {+1 / 3., -3 / 3.},
+ {-1 / 3., +3 / 3.},
+ {+3 / 3., +1 / 3.}};
+int main() {
+ for (int i = 0; i < 4; i++)
+ printf("%d:%.2f,%.2f ", i, grid[i][0], grid[i][1]);
+ printf("\n");
+ return 0;
+}
+''')
+ output = Popen([PYTHON, EMCC, 'src.cpp', '-O1', '-s', 'WARN_UNALIGNED=1'], stderr=PIPE).communicate()
+ assert 'emcc: warning: unaligned store' in output[1]
+ output = Popen([PYTHON, EMCC, 'src.cpp', '-s', 'WARN_UNALIGNED=1', '-g'], stderr=PIPE).communicate()
+ assert 'emcc: warning: unaligned store' in output[1]
+ assert '@line 9 "src.cpp"' in output[1]
+
diff --git a/tools/file_packager.py b/tools/file_packager.py
index 9699730f..448bb994 100644
--- a/tools/file_packager.py
+++ b/tools/file_packager.py
@@ -13,6 +13,9 @@ Usage:
file_packager.py TARGET [--preload A [B..]] [--embed C [D..]] [--exclude E [F..]] [--compress COMPRESSION_DATA] [--crunch[=X]] [--js-output=OUTPUT.js] [--no-force] [--use-preload-cache] [--no-heap-copy]
+ --preload ,
+ --embed See emcc --help for more details on those options.
+
--crunch=X Will compress dxt files to crn with quality level X. The crunch commandline tool must be present
and CRUNCH should be defined in ~/.emscripten that points to it. JS crunch decompressing code will
be added to convert the crn to dds in the browser.
@@ -107,7 +110,11 @@ for arg in sys.argv[2:]:
jsoutput = arg.split('=')[1] if '=' in arg else None
leading = ''
elif arg.startswith('--crunch'):
- from shared import CRUNCH
+ try:
+ from shared import CRUNCH
+ except Exception, e:
+ print >> sys.stderr, 'count not import CRUNCH (make sure it is defined properly in ~/.emscripten)'
+ raise e
crunch = arg.split('=')[1] if '=' in arg else '128'
leading = ''
elif arg.startswith('--plugin'):
diff --git a/tools/find_bigis.py b/tools/find_bigis.py
index d11c1a81..1261e7ff 100644
--- a/tools/find_bigis.py
+++ b/tools/find_bigis.py
@@ -6,7 +6,7 @@ import os, sys, re
filename = sys.argv[1]
data = open(filename).read()
-iss = re.findall('[^%]i\d+ [^=]', data)
+iss = re.findall(' i\d+ [^=]', data)
set_iss = set(iss)
bigs = []
for iss in set_iss:
diff --git a/tools/js-optimizer.js b/tools/js-optimizer.js
index 3dd4a23a..fc8b0561 100644
--- a/tools/js-optimizer.js
+++ b/tools/js-optimizer.js
@@ -724,14 +724,19 @@ function simplifyExpressions(ast) {
if (correct === 'HEAP32') {
define[3] = ['binary', '|', define[3], ['num', 0]];
} else {
- define[3] = ['unary-prefix', '+', define[3]];
+ define[3] = makeAsmCoercion(define[3], asmPreciseF32 ? ASM_FLOAT : ASM_DOUBLE);
}
// do we want a simplifybitops on the new values here?
});
info.uses.forEach(function(use) {
use[2][1][1] = correct;
});
- asmData.vars[v] = 1 - asmData.vars[v];
+ var correctType;
+ switch(asmData.vars[v]) {
+ case ASM_INT: correctType = asmPreciseF32 ? ASM_FLOAT : ASM_DOUBLE; break;
+ case ASM_FLOAT: case ASM_DOUBLE: correctType = ASM_INT; break;
+ }
+ asmData.vars[v] = correctType;
}
}
denormalizeAsm(ast, asmData);
@@ -1140,7 +1145,9 @@ function optimizeShiftsAggressive(ast) {
// or such. Simplifying these saves space and time.
function simplifyNotCompsDirect(node) {
if (node[0] === 'unary-prefix' && node[1] === '!') {
- if (node[2][0] === 'binary') {
+ // de-morgan's laws do not work on floats, due to nans >:(
+ if (node[2][0] === 'binary' && (!asm || (((node[2][2][0] === 'binary' && node[2][2][1] === '|') || node[2][2][0] === 'num') &&
+ ((node[2][3][0] === 'binary' && node[2][3][1] === '|') || node[2][3][0] === 'num')))) {
switch(node[2][1]) {
case '<': return ['binary', '>=', node[2][2], node[2][3]];
case '>': return ['binary', '<=', node[2][2], node[2][3]];
@@ -1579,7 +1586,7 @@ function makeAsmVarDef(v, type) {
case ASM_INT: return [v, ['num', 0]];
case ASM_DOUBLE: return [v, ['unary-prefix', '+', ['num', 0]]];
case ASM_FLOAT: return [v, ['call', ['name', 'Math_fround'], [['num', 0]]]];
- default: throw 'wha?';
+ default: throw 'wha? ' + JSON.stringify([node, type]) + new Error().stack;
}
}
@@ -5179,7 +5186,7 @@ function asmLastOpts(ast) {
// Passes table
-var minifyWhitespace = false, printMetadata = true, asm = false, last = false;
+var minifyWhitespace = false, printMetadata = true, asm = false, asmPreciseF32 = false, last = false;
var passes = {
// passes
@@ -5208,6 +5215,7 @@ var passes = {
minifyWhitespace: function() { minifyWhitespace = true },
noPrintMetadata: function() { printMetadata = false },
asm: function() { asm = true },
+ asmPreciseF32: function() { asmPreciseF32 = true },
last: function() { last = true },
};
diff --git a/tools/parse_unaligned.py b/tools/parse_unaligned.py
new file mode 100644
index 00000000..614ea692
--- /dev/null
+++ b/tools/parse_unaligned.py
@@ -0,0 +1,17 @@
+import os, sys
+from subprocess import Popen, PIPE, STDOUT
+
+shown = set()
+
+for line in open(sys.argv[1]).readlines():
+ try:
+ x = line.split(' in ')[1].split(':')[0]
+ #output = str([x, Popen(['c++filt', x], stdout=PIPE).communicate()])
+ output = Popen(['c++filt', x], stdout=PIPE).communicate()[0]
+ if output not in shown:
+ shown.add(output)
+ print output,
+ except:
+ pass
+
+
diff --git a/tools/shared.py b/tools/shared.py
index f88eace0..764877ba 100644
--- a/tools/shared.py
+++ b/tools/shared.py
@@ -345,7 +345,7 @@ def find_temp_directory():
# we re-check sanity when the settings are changed)
# We also re-check sanity and clear the cache when the version changes
-EMSCRIPTEN_VERSION = '1.9.5'
+EMSCRIPTEN_VERSION = '1.10.4'
def generate_sanity():
return EMSCRIPTEN_VERSION + '|' + get_llvm_target() + '|' + LLVM_ROOT + '|' + get_clang_version()
diff --git a/tools/system_libs.py b/tools/system_libs.py
new file mode 100644
index 00000000..3723a5c3
--- /dev/null
+++ b/tools/system_libs.py
@@ -0,0 +1,397 @@
+import os, json, logging
+import shared
+from tools.shared import execute
+
+def calculate(temp_files, in_temp, stdout, stderr):
+ # Check if we need to include some libraries that we compile. (We implement libc ourselves in js, but
+ # compile a malloc implementation and stdlibc++.)
+
+ def read_symbols(path, exclude=None):
+ symbols = map(lambda line: line.strip().split(' ')[1], open(path).readlines())
+ if exclude:
+ symbols = filter(lambda symbol: symbol not in exclude, symbols)
+ return set(symbols)
+
+ lib_opts = ['-O2']
+
+ # XXX We also need to add libc symbols that use malloc, for example strdup. It's very rare to use just them and not
+ # a normal malloc symbol (like free, after calling strdup), so we haven't hit this yet, but it is possible.
+ libc_symbols = read_symbols(shared.path_from_root('system', 'lib', 'libc.symbols'))
+ libcextra_symbols = read_symbols(shared.path_from_root('system', 'lib', 'libcextra.symbols'))
+ libcxx_symbols = read_symbols(shared.path_from_root('system', 'lib', 'libcxx', 'symbols'), exclude=libc_symbols)
+ libcxxabi_symbols = read_symbols(shared.path_from_root('system', 'lib', 'libcxxabi', 'symbols'), exclude=libc_symbols)
+ gl_symbols = read_symbols(shared.path_from_root('system', 'lib', 'gl.symbols'))
+
+ # XXX we should disable EMCC_DEBUG when building libs, just like in the relooper
+
+ def build_libc(lib_filename, files):
+ o_s = []
+ prev_cxx = os.environ.get('EMMAKEN_CXX')
+ if prev_cxx: os.environ['EMMAKEN_CXX'] = ''
+ musl_internal_includes = shared.path_from_root('system', 'lib', 'libc', 'musl', 'src', 'internal')
+ for src in files:
+ o = in_temp(os.path.basename(src) + '.o')
+ execute([shared.PYTHON, shared.EMCC, shared.path_from_root('system', 'lib', src), '-o', o, '-I', musl_internal_includes] + lib_opts, stdout=stdout, stderr=stderr)
+ o_s.append(o)
+ if prev_cxx: os.environ['EMMAKEN_CXX'] = prev_cxx
+ shared.Building.link(o_s, in_temp(lib_filename))
+ return in_temp(lib_filename)
+
+ def build_libcxx(src_dirname, lib_filename, files):
+ o_s = []
+ for src in files:
+ o = in_temp(src + '.o')
+ srcfile = shared.path_from_root(src_dirname, src)
+ execute([shared.PYTHON, shared.EMXX, srcfile, '-o', o, '-std=c++11'] + lib_opts, stdout=stdout, stderr=stderr)
+ o_s.append(o)
+ shared.Building.link(o_s, in_temp(lib_filename))
+ return in_temp(lib_filename)
+
+ # libc
+ def create_libc():
+ logging.debug(' building libc for cache')
+ libc_files = [
+ 'dlmalloc.c',
+ os.path.join('libcxx', 'new.cpp'),
+ ]
+ musl_files = [
+ ['internal', [
+ 'floatscan.c',
+ 'shgetc.c',
+ ]],
+ ['math', [
+ 'scalbn.c',
+ 'scalbnl.c',
+ ]],
+ ['stdio', [
+ '__overflow.c',
+ '__toread.c',
+ '__towrite.c',
+ '__uflow.c',
+ ]],
+ ['stdlib', [
+ 'atof.c',
+ 'strtod.c',
+ ]],
+ ['string', [
+ 'memcmp.c',
+ 'strcasecmp.c',
+ 'strcmp.c',
+ 'strncasecmp.c',
+ 'strncmp.c',
+ ]]
+ ]
+ for directory, sources in musl_files:
+ libc_files += [os.path.join('libc', 'musl', 'src', directory, source) for source in sources]
+ return build_libc('libc.bc', libc_files)
+
+ def apply_libc(need):
+ # libc needs some sign correction. # If we are in mode 0, switch to 2. We will add our lines
+ try:
+ if shared.Settings.CORRECT_SIGNS == 0: raise Exception('we need to change to 2')
+ except: # we fail if equal to 0 - so we need to switch to 2 - or if CORRECT_SIGNS is not even in Settings
+ shared.Settings.CORRECT_SIGNS = 2
+ if shared.Settings.CORRECT_SIGNS == 2:
+ shared.Settings.CORRECT_SIGNS_LINES = [shared.path_from_root('src', 'dlmalloc.c') + ':' + str(i+4) for i in [4816, 4191, 4246, 4199, 4205, 4235, 4227]]
+ # If we are in mode 1, we are correcting everything anyhow. If we are in mode 3, we will be corrected
+ # so all is well anyhow too.
+ return True
+
+ # libcextra
+ def create_libcextra():
+ logging.debug('building libcextra for cache')
+ musl_files = [
+ ['ctype', [
+ 'iswalnum.c',
+ 'iswalpha.c',
+ 'iswblank.c',
+ 'iswcntrl.c',
+ 'iswctype.c',
+ 'iswdigit.c',
+ 'iswgraph.c',
+ 'iswlower.c',
+ 'iswprint.c',
+ 'iswpunct.c',
+ 'iswspace.c',
+ 'iswupper.c',
+ 'iswxdigit.c',
+ 'towctrans.c',
+ 'wcswidth.c',
+ 'wctrans.c',
+ 'wcwidth.c',
+ ]],
+ ['internal', [
+ 'intscan.c',
+ ]],
+ ['legacy', [
+ 'err.c',
+ ]],
+ ['locale', [
+ 'iconv.c',
+ 'iswalnum_l.c',
+ 'iswalpha_l.c',
+ 'iswblank_l.c',
+ 'iswcntrl_l.c',
+ 'iswctype_l.c',
+ 'iswdigit_l.c',
+ 'iswgraph_l.c',
+ 'iswlower_l.c',
+ 'iswprint_l.c',
+ 'iswpunct_l.c',
+ 'iswspace_l.c',
+ 'iswupper_l.c',
+ 'iswxdigit_l.c',
+ 'strcoll.c',
+ 'strcasecmp_l.c',
+ 'strfmon.c',
+ 'strncasecmp_l.c',
+ 'strxfrm.c',
+ 'towctrans_l.c',
+ 'towlower_l.c',
+ 'towupper_l.c',
+ 'wcscoll.c',
+ 'wcscoll_l.c',
+ 'wcsxfrm.c',
+ 'wcsxfrm_l.c',
+ 'wctrans_l.c',
+ 'wctype_l.c',
+ ]],
+ ['math', [
+ '__cos.c',
+ '__cosdf.c',
+ '__sin.c',
+ '__sindf.c',
+ 'ilogb.c',
+ 'ilogbf.c',
+ 'ilogbl.c',
+ 'ldexp.c',
+ 'ldexpf.c',
+ 'ldexpl.c',
+ 'logb.c',
+ 'logbf.c',
+ 'logbl.c',
+ 'lgamma.c',
+ 'lgamma_r.c',
+ 'lgammaf.c',
+ 'lgammaf_r.c',
+ 'lgammal.c',
+ 'scalbnf.c',
+ 'signgam.c',
+ 'tgamma.c',
+ 'tgammaf.c',
+ 'tgammal.c'
+ ]],
+ ['misc', [
+ 'getopt.c',
+ 'getopt_long.c',
+ ]],
+ ['multibyte', [
+ 'btowc.c',
+ 'internal.c',
+ 'mblen.c',
+ 'mbrlen.c',
+ 'mbrtowc.c',
+ 'mbsinit.c',
+ 'mbsnrtowcs.c',
+ 'mbsrtowcs.c',
+ 'mbstowcs.c',
+ 'mbtowc.c',
+ 'wcrtomb.c',
+ 'wcsnrtombs.c',
+ 'wcsrtombs.c',
+ 'wcstombs.c',
+ 'wctob.c',
+ 'wctomb.c',
+ ]],
+ ['regex', [
+ 'fnmatch.c',
+ 'regcomp.c',
+ 'regerror.c',
+ 'regexec.c',
+ 'tre-mem.c',
+ ]],
+ ['stdio', [
+ 'fwprintf.c',
+ 'swprintf.c',
+ 'vfwprintf.c',
+ 'vswprintf.c',
+ 'vwprintf.c',
+ 'wprintf.c',
+ 'fputwc.c',
+ 'fputws.c',
+ ]],
+ ['stdlib', [
+ 'ecvt.c',
+ 'fcvt.c',
+ 'gcvt.c',
+ 'wcstod.c',
+ 'wcstol.c',
+ ]],
+ ['string', [
+ 'memccpy.c',
+ 'memmem.c',
+ 'mempcpy.c',
+ 'memrchr.c',
+ 'strcasestr.c',
+ 'strchrnul.c',
+ 'strlcat.c',
+ 'strlcpy.c',
+ 'strsep.c',
+ 'strverscmp.c',
+ 'wcpcpy.c',
+ 'wcpncpy.c',
+ 'wcscasecmp.c',
+ 'wcscasecmp_l.c',
+ 'wcscat.c',
+ 'wcschr.c',
+ 'wcscmp.c',
+ 'wcscpy.c',
+ 'wcscspn.c',
+ 'wcsdup.c',
+ 'wcslen.c',
+ 'wcsncasecmp.c',
+ 'wcsncasecmp_l.c',
+ 'wcsncat.c',
+ 'wcsncmp.c',
+ 'wcsncpy.c',
+ 'wcsnlen.c',
+ 'wcspbrk.c',
+ 'wcsrchr.c',
+ 'wcsspn.c',
+ 'wcsstr.c',
+ 'wcstok.c',
+ 'wcswcs.c',
+ 'wmemchr.c',
+ 'wmemcmp.c',
+ 'wmemcpy.c',
+ 'wmemmove.c',
+ 'wmemset.c',
+ ]]
+ ]
+ libcextra_files = []
+ for directory, sources in musl_files:
+ libcextra_files += [os.path.join('libc', 'musl', 'src', directory, source) for source in sources]
+ return build_libc('libcextra.bc', libcextra_files)
+
+ # libcxx
+ def create_libcxx():
+ logging.debug('building libcxx for cache')
+ libcxx_files = [
+ 'algorithm.cpp',
+ 'condition_variable.cpp',
+ 'future.cpp',
+ 'iostream.cpp',
+ 'memory.cpp',
+ 'random.cpp',
+ 'stdexcept.cpp',
+ 'system_error.cpp',
+ 'utility.cpp',
+ 'bind.cpp',
+ 'debug.cpp',
+ 'hash.cpp',
+ 'mutex.cpp',
+ 'string.cpp',
+ 'thread.cpp',
+ 'valarray.cpp',
+ 'chrono.cpp',
+ 'exception.cpp',
+ 'ios.cpp',
+ 'locale.cpp',
+ 'regex.cpp',
+ 'strstream.cpp'
+ ]
+ return build_libcxx(os.path.join('system', 'lib', 'libcxx'), 'libcxx.bc', libcxx_files)
+
+ def apply_libcxx(need):
+ assert shared.Settings.QUANTUM_SIZE == 4, 'We do not support libc++ with QUANTUM_SIZE == 1'
+ # libcxx might need corrections, so turn them all on. TODO: check which are actually needed
+ shared.Settings.CORRECT_SIGNS = shared.Settings.CORRECT_OVERFLOWS = shared.Settings.CORRECT_ROUNDINGS = 1
+ #logging.info('using libcxx turns on CORRECT_* options')
+ return True
+
+ # libcxxabi - just for dynamic_cast for now
+ def create_libcxxabi():
+ logging.debug('building libcxxabi for cache')
+ libcxxabi_files = [
+ 'typeinfo.cpp',
+ 'private_typeinfo.cpp'
+ ]
+ return build_libcxx(os.path.join('system', 'lib', 'libcxxabi', 'src'), 'libcxxabi.bc', libcxxabi_files)
+
+ def apply_libcxxabi(need):
+ assert shared.Settings.QUANTUM_SIZE == 4, 'We do not support libc++abi with QUANTUM_SIZE == 1'
+ #logging.info('using libcxxabi, this may need CORRECT_* options')
+ #shared.Settings.CORRECT_SIGNS = shared.Settings.CORRECT_OVERFLOWS = shared.Settings.CORRECT_ROUNDINGS = 1
+ return True
+
+ # gl
+ def create_gl():
+ prev_cxx = os.environ.get('EMMAKEN_CXX')
+ if prev_cxx: os.environ['EMMAKEN_CXX'] = ''
+ o = in_temp('gl.o')
+ execute([shared.PYTHON, shared.EMCC, shared.path_from_root('system', 'lib', 'gl.c'), '-o', o])
+ if prev_cxx: os.environ['EMMAKEN_CXX'] = prev_cxx
+ return o
+
+ # Settings this in the environment will avoid checking dependencies and make building big projects a little faster
+ # 1 means include everything; otherwise it can be the name of a lib (libcxx, etc.)
+ force = os.environ.get('EMCC_FORCE_STDLIBS')
+ force_all = force == '1'
+
+ # Scan symbols
+ symbolses = map(lambda temp_file: shared.Building.llvm_nm(temp_file), temp_files)
+
+ # Add in some hacks for js libraries. If a js lib depends on a symbol provided by a C library, it must be
+ # added to here, because our deps go only one way (each library here is checked, then we check the next
+ # in order - libcxx, libcxextra, etc. - and then we run the JS compiler and provide extra symbols from
+ # library*.js files. But we cannot then go back to the C libraries if a new dep was added!
+ # TODO: Move all __deps from src/library*.js to deps_info.json, and use that single source of info
+ # both here and in the JS compiler.
+ deps_info = json.loads(open(shared.path_from_root('src', 'deps_info.json')).read())
+ def add_back_deps(need):
+ for ident, deps in deps_info.iteritems():
+ if ident in need.undefs:
+ for dep in deps:
+ need.undefs.add(dep)
+ shared.Settings.EXPORTED_FUNCTIONS.append('_' + dep)
+ for symbols in symbolses:
+ add_back_deps(symbols)
+
+ all_needed = set()
+ for symbols in symbolses:
+ all_needed.update(symbols.undefs)
+ for symbols in symbolses:
+ all_needed.difference_update(symbols.defs)
+
+ # Go over libraries to figure out which we must include
+ # If we have libcxx, we must force inclusion of libc, since libcxx uses new internally. Note: this is kind of hacky.
+ ret = []
+ has = need = None
+ for name, create, apply_, library_symbols in [('libcxx', create_libcxx, apply_libcxx, libcxx_symbols),
+ ('libcextra', create_libcextra, lambda x: True, libcextra_symbols),
+ ('libcxxabi', create_libcxxabi, apply_libcxxabi, libcxxabi_symbols),
+ ('gl', create_gl, lambda x: True, gl_symbols),
+ ('libc', create_libc, apply_libc, libc_symbols)]:
+ force_this = force_all or force == name
+ if not force_this:
+ need = set()
+ has = set()
+ for symbols in symbolses:
+ for library_symbol in library_symbols:
+ if library_symbol in symbols.undefs:
+ need.add(library_symbol)
+ if library_symbol in symbols.defs:
+ has.add(library_symbol)
+ for haz in has: # remove symbols that are supplied by another of the inputs
+ if haz in need:
+ need.remove(haz)
+ if shared.Settings.VERBOSE: logging.debug('considering %s: we need %s and have %s' % (name, str(need), str(has)))
+ if force_this or len(need) > 0:
+ force_all = True
+ if apply_(need):
+ # We need to build and link the library in
+ logging.debug('including %s' % name)
+ libfile = shared.Cache.get(name, create)
+ ret.append(libfile)
+ return ret
+
diff --git a/tools/test-js-optimizer-asm-last-output.js b/tools/test-js-optimizer-asm-last-output.js
index f850b18f..1b9ac585 100644
--- a/tools/test-js-optimizer-asm-last-output.js
+++ b/tools/test-js-optimizer-asm-last-output.js
@@ -39,7 +39,7 @@ function looop() {
} while (!condition());
do {
do_it();
- } while (a <= b);
+ } while (!(a > b));
do {
do_it();
} while (x());
diff --git a/tools/test-js-optimizer-asm-pre-f32.js b/tools/test-js-optimizer-asm-pre-f32.js
new file mode 100644
index 00000000..a5604ef9
--- /dev/null
+++ b/tools/test-js-optimizer-asm-pre-f32.js
@@ -0,0 +1,11 @@
+function badf() {
+ var $9 = Math_fround(0);
+ $9 = (HEAP32[tempDoublePtr>>2]=$8,Math_fround(HEAPF32[tempDoublePtr>>2]));
+ HEAPF32[$gep23_asptr>>2] = $9;
+}
+function badf2() {
+ var $9 = 0;
+ $9 = (HEAPF32[tempDoublePtr>>2]=$8,HEAP32[tempDoublePtr>>2]|0);
+ HEAP32[$gep23_asptr>>2] = $9;
+}
+// EMSCRIPTEN_GENERATED_FUNCTIONS: ["a", "b", "rett", "ret2t", "retf", "i32_8", "tempDoublePtr", "boxx", "_main", "badf", "badf2"]
diff --git a/tools/test-js-optimizer-asm-pre-output-f32.js b/tools/test-js-optimizer-asm-pre-output-f32.js
new file mode 100644
index 00000000..42343f55
--- /dev/null
+++ b/tools/test-js-optimizer-asm-pre-output-f32.js
@@ -0,0 +1,11 @@
+function badf() {
+ var $9 = 0;
+ $9 = $8 | 0;
+ HEAP32[$gep23_asptr >> 2] = $9;
+}
+function badf2() {
+ var $9 = Math_fround(0);
+ $9 = Math_fround($8);
+ HEAPF32[$gep23_asptr >> 2] = $9;
+}
+
diff --git a/tools/test-js-optimizer-asm-pre-output.js b/tools/test-js-optimizer-asm-pre-output.js
index 0fa81050..c9746e78 100644
--- a/tools/test-js-optimizer-asm-pre-output.js
+++ b/tools/test-js-optimizer-asm-pre-output.js
@@ -519,4 +519,23 @@ function _main($argc, $argv) {
STACKTOP = __stackBase__;
return $_0 | 0;
}
+function badf() {
+ var $9 = 0;
+ $9 = $8 | 0;
+ HEAP32[$gep23_asptr >> 2] = $9;
+}
+function badf2() {
+ var $9 = +0;
+ $9 = +$8;
+ HEAPF32[$gep23_asptr >> 2] = $9;
+}
+function fcomp() {
+ if (!($y < $x)) return 5;
+ if (!(5 < $x)) return 5;
+ if (!($y < 5)) return 5;
+ if (($a | 0) >= ($b | 0)) return 5;
+ if (($a | 0) >= 5) return 5;
+ if (5 >= ($b | 0)) return 5;
+ if (5 >= 5) return 5;
+}
diff --git a/tools/test-js-optimizer-asm-pre.js b/tools/test-js-optimizer-asm-pre.js
index dadeef53..00ebd7d7 100644
--- a/tools/test-js-optimizer-asm-pre.js
+++ b/tools/test-js-optimizer-asm-pre.js
@@ -530,4 +530,24 @@ function _main($argc, $argv) {
STACKTOP = __stackBase__;
return $_0 | 0;
}
-// EMSCRIPTEN_GENERATED_FUNCTIONS: ["a", "b", "rett", "ret2t", "retf", "i32_8", "tempDoublePtr", "boxx", "_main"]
+function badf() {
+ var $9 = Math_fround(0);
+ $9 = (HEAP32[tempDoublePtr>>2]=$8,Math_fround(HEAPF32[tempDoublePtr>>2]));
+ HEAPF32[$gep23_asptr>>2] = $9;
+}
+function badf2() {
+ var $9 = 0;
+ $9 = (HEAPF32[tempDoublePtr>>2]=$8,HEAP32[tempDoublePtr>>2]|0);
+ HEAP32[$gep23_asptr>>2] = $9;
+}
+function fcomp() {
+ // de-morgan's laws are not valid on floats, due to NaNs >:(
+ if (!($y < $x)) return 5;
+ if (!(5 < $x)) return 5;
+ if (!($y < 5)) return 5;
+ if (!(($a|0) < ($b|0))) return 5;
+ if (!(($a|0) < 5)) return 5;
+ if (!(5 < ($b|0))) return 5;
+ if (!(5 < 5)) return 5;
+}
+// EMSCRIPTEN_GENERATED_FUNCTIONS: ["a", "b", "rett", "ret2t", "retf", "i32_8", "tempDoublePtr", "boxx", "_main", "badf", "badf2", "fcomp"]