diff --git a/emcc b/emcc index 102b7f5dd342a..b8ccbdcfe54c1 100755 --- a/emcc +++ b/emcc @@ -47,8 +47,8 @@ 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, json -from subprocess import PIPE, STDOUT +import os, sys, shutil, tempfile, subprocess, shlex, time, re, logging +from subprocess import PIPE 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 @@ -330,7 +330,7 @@ Options that are modified or new in %s include: For more docs on the options --preload-file accepts, see https://github.com/kripken/emscripten/wiki/Filesystem-Guide - --exclude-file Files and directories to be excluded from + --exclude-file Files and directories to be excluded from --embed-file and --preload-file wildcard is supported @@ -477,9 +477,9 @@ Options that are modified or new in %s include: --default-obj-ext .ext Specifies the file suffix to generate if the location of a directory name is passed to -o directive, e.g. emcc -c a.c -o dir/ - will by default generate an output name 'dir/a.o', + will by default generate an output name 'dir/a.o', but this cmdline param can be passed to generate a - file with a custom suffix 'dir/a.ext'. + file with a custom suffix 'dir/a.ext'. The target file, if specified (-o ), defines what will be generated: @@ -524,13 +524,13 @@ Copyright (C) 2014 the Emscripten authors (see AUTHORS.txt) This is free and open source software under the MIT license. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ''' % (shared.EMSCRIPTEN_VERSION, revision) - exit(0) + exit(0) elif len(sys.argv) == 2 and sys.argv[1] == '-v': # -v with no inputs print 'emcc (Emscripten GCC-like replacement + linker emulating GNU ld ) %s' % shared.EMSCRIPTEN_VERSION exit(subprocess.call([shared.CLANG, '-v'])) -def is_minus_s_for_emcc(newargs,i): +def is_minus_s_for_emcc(newargs, i): assert newargs[i] == '-s' if i+1 < len(newargs) and '=' in newargs[i+1]: # -s OPT=VALUE is for us, -s by itself is a linker option return True @@ -591,7 +591,7 @@ if CONFIGURE_CONFIG or CMAKE_CONFIG: idx += 1 cmd = [compiler] + list(filter_emscripten_options(sys.argv[1:])) - if not use_js: cmd += shared.EMSDK_OPTS + ['-DEMSCRIPTEN'] + if not use_js: cmd += shared.EMSDK_OPTS + ['-D__EMSCRIPTEN__', '-DEMSCRIPTEN'] if use_js: cmd += ['-s', 'ERROR_ON_UNDEFINED_SYMBOLS=1'] # configure tests should fail when an undefined symbol exists logging.debug('just configuring: ' + ' '.join(cmd)) @@ -729,7 +729,7 @@ log_time_last = time.time() def log_time(name): global log_time_last now = time.time() - logging.debug('emcc step "%s" took %.2f seconds' % (name, now - log_time_last)) + logging.debug('emcc step "%s" took %.2f seconds', name, now - log_time_last) log_time_last = now try: @@ -805,7 +805,7 @@ try: # optimization mode, but we disable the actual optimization passes, as we'll # run them seperately. newargs.append('-mllvm') - newargs.append('-disable-llvm-optzns'); + newargs.append('-disable-llvm-optzns') elif newargs[i].startswith('--js-opts'): check_bad_eq(newargs[i]) js_opts = eval(newargs[i+1]) @@ -930,7 +930,7 @@ try: newargs[i] = '' newargs[i+1] = '' elif newargs[i] == '--remove-duplicates': - logging.warning ('--remove-duplicates is deprecated as it is no longer needed. If you cannot link without it, file a bug with a testcase') + logging.warning('--remove-duplicates is deprecated as it is no longer needed. If you cannot link without it, file a bug with a testcase') newargs[i] = '' elif newargs[i] == '--jcache': logging.warning('jcache is deprecated') @@ -957,7 +957,7 @@ try: elif newargs[i].startswith(('-I', '-L')): path_name = newargs[i][2:] if not absolute_warning_shown and os.path.isabs(path_name): - logging.warning ('-I or -L of an absolute path "' + newargs[i] + '" encountered. If this is to a local system header/library, it may cause problems (local system files make sense for compiling natively on your system, but not necessarily to JavaScript). Pass \'-Wno-warn-absolute-paths\' to emcc to hide this warning.') # Of course an absolute path to a non-system-specific library or header is fine, and you can ignore this warning. The danger are system headers that are e.g. x86 specific and nonportable. The emscripten bundled headers are modified to be portable, local system ones are generally not + logging.warning('-I or -L of an absolute path "' + newargs[i] + '" encountered. If this is to a local system header/library, it may cause problems (local system files make sense for compiling natively on your system, but not necessarily to JavaScript). Pass \'-Wno-warn-absolute-paths\' to emcc to hide this warning.') # Of course an absolute path to a non-system-specific library or header is fine, and you can ignore this warning. The danger are system headers that are e.g. x86 specific and nonportable. The emscripten bundled headers are modified to be portable, local system ones are generally not absolute_warning_shown = True elif newargs[i] == '--emrun': emrun = True @@ -973,7 +973,7 @@ try: default_object_extension = '.' + default_object_extension newargs[i+1] = '' - newargs = [ arg for arg in newargs if arg is not '' ] + newargs = [arg for arg in newargs if arg is not ''] # If user did not specify a default -std for C++ code, specify the emscripten default. if default_cxx_std: @@ -999,7 +999,7 @@ try: if DEBUG: start_time = time.time() # done after parsing arguments, which might affect debug state if closure: - assert os.path.exists(shared.CLOSURE_COMPILER), logging.error('fatal: Closure compiler (%s) does not exist' % shared.CLOSURE_COMPILER) + assert os.path.exists(shared.CLOSURE_COMPILER), logging.error('fatal: Closure compiler (%s) does not exist', shared.CLOSURE_COMPILER) for i in range(len(newargs)): if newargs[i] == '-s': @@ -1011,7 +1011,7 @@ try: settings_changes.append('USE_TYPED_ARRAYS=' + newargs[i+1]) newargs[i] = '' newargs[i+1] = '' - newargs = [ arg for arg in newargs if arg is not '' ] + newargs = [arg for arg in newargs if arg is not ''] if split_js_file: settings_changes.append("PRINT_SPLIT_FILE_MARKER=1") @@ -1032,12 +1032,12 @@ try: prev = newargs[i-1] if prev in ['-MT', '-MF', '-MQ', '-D', '-U', '-o', '-x', '-Xpreprocessor', '-include', '-imacros', '-idirafter', '-iprefix', '-iwithprefix', '-iwithprefixbefore', '-isysroot', '-imultilib', '-A', '-isystem', '-iquote', '-install_name', '-compatibility_version', '-current_version', '-I', '-L']: continue # ignore this gcc-style argument - if (os.path.islink(arg) and os.path.realpath(arg).endswith(SOURCE_ENDINGS + BITCODE_ENDINGS + DYNAMICLIB_ENDINGS + ASSEMBLY_ENDINGS + HEADER_ENDINGS)): + if os.path.islink(arg) and os.path.realpath(arg).endswith(SOURCE_ENDINGS + BITCODE_ENDINGS + DYNAMICLIB_ENDINGS + ASSEMBLY_ENDINGS + HEADER_ENDINGS): arg = os.path.realpath(arg) if not arg.startswith('-'): if not os.path.exists(arg): - logging.error('%s: No such file or directory ("%s" was expected to be an input file, based on the commandline arguments provided)' % (arg, arg)) + logging.error('%s: No such file or directory ("%s" was expected to be an input file, based on the commandline arguments provided)', arg, arg) exit(1) arg_ending = filename_type_ending(arg) @@ -1082,7 +1082,7 @@ try: original_input_files = input_files[:] - newargs = [ arg for arg in newargs if arg is not '' ] + newargs = [arg for arg in newargs if arg is not ''] # -c means do not link in gcc, and for us, the parallel is to not go all the way to JS, but stop at bitcode has_dash_c = '-c' in newargs @@ -1093,7 +1093,7 @@ try: # Find library files for lib in libs: - logging.debug('looking for library "%s"' % lib) + logging.debug('looking for library "%s"', lib) found = False for prefix in LIB_PREFIXES: for suff in STATICLIB_ENDINGS + DYNAMICLIB_ENDINGS: @@ -1101,24 +1101,24 @@ try: for lib_dir in lib_dirs: path = os.path.join(lib_dir, name) if os.path.exists(path): - logging.debug('found library "%s" at %s' % (lib, path)) + logging.debug('found library "%s" at %s', lib, path) input_files.append(path) found = True break if found: break if found: break - if not found: logging.warning('emcc: cannot find library "%s"' % lib) + if not found: logging.warning('emcc: cannot find library "%s"', lib) # If not compiling to JS, then we are compiling to an intermediate bitcode objects or library, so # ignore dynamic linking, since multiple dynamic linkings can interfere with each other if not filename_type_suffix(target) in JS_CONTAINING_SUFFIXES or ignore_dynamic_linking: def check(input_file): if filename_type_ending(input_file) in DYNAMICLIB_ENDINGS: - if not ignore_dynamic_linking: logging.warning('ignoring dynamic library %s because not compiling to JS or HTML, remember to link it when compiling to JS or HTML at the end' % os.path.basename(input_file)) + if not ignore_dynamic_linking: logging.warning('ignoring dynamic library %s because not compiling to JS or HTML, remember to link it when compiling to JS or HTML at the end', os.path.basename(input_file)) return False else: return True - input_files = filter(lambda input_file: check(input_file), input_files) + input_files = [input_file for input_file in input_files if check(input_file)] if len(input_files) == 0: logging.error('no input files\nnote that input files without a known suffix are ignored, make sure your input files end with one of: ' + str(SOURCE_ENDINGS + BITCODE_ENDINGS + DYNAMICLIB_ENDINGS + STATICLIB_ENDINGS + ASSEMBLY_ENDINGS + HEADER_ENDINGS)) @@ -1161,7 +1161,7 @@ try: 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.TARGET_ASMJS_UNKNOWN_EMSCRIPTEN == 1, 'fastcomp requires asmjs-unknown-emscripten' 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' @@ -1214,10 +1214,12 @@ try: assert shared.LLVM_TARGET in shared.COMPILER_OPTS if shared.LLVM_TARGET == 'i386-pc-linux-gnu': shared.Settings.TARGET_X86 = 1 - shared.Settings.TARGET_LE32 = 0 - assert 'le32-unknown-nacl' not in shared.COMPILER_OPTS - elif shared.LLVM_TARGET == 'le32-unknown-nacl': - shared.Settings.TARGET_LE32 = 1 + shared.Settings.TARGET_ASMJS_UNKNOWN_EMSCRIPTEN = 0 + assert 'asmjs-unknown-emscripten' not in shared.COMPILER_OPTS + elif shared.LLVM_TARGET == 'asmjs-unknown-emscripten' or \ + shared.LLVM_TARGET == 'le32-unknown-nacl': + # For temporary compatibility, treat 'le32-unknown-nacl' as 'asmjs-unknown-emscripten'. + shared.Settings.TARGET_ASMJS_UNKNOWN_EMSCRIPTEN = 1 shared.Settings.TARGET_X86 = 0 assert 'i386-pc-linux-gnu' not in shared.COMPILER_OPTS else: @@ -1334,7 +1336,7 @@ try: file_ending = filename_type_ending(input_file) if file_ending.endswith(SOURCE_ENDINGS): temp_file = temp_files[i] - logging.debug('optimizing %s with -O%s' % (input_file, llvm_opts)) + logging.debug('optimizing %s with -O%s', input_file, llvm_opts) shared.Building.llvm_opt(temp_file, llvm_opts) # If we were just asked to generate bitcode, stop there @@ -1391,7 +1393,7 @@ try: (not LEAVE_INPUTS_RAW and not (suffix(temp_files[0]) in BITCODE_ENDINGS or suffix(temp_files[0]) in DYNAMICLIB_ENDINGS) and shared.Building.is_ar(temp_files[0])): linker_inputs = temp_files + extra_files_to_link logging.debug('linking: ' + str(linker_inputs)) - shared.Building.link(linker_inputs, in_temp(target_basename + '.bc'), force_archive_contents = len(filter(lambda temp: not temp.endswith(STATICLIB_ENDINGS), temp_files)) == 0) + shared.Building.link(linker_inputs, in_temp(target_basename + '.bc'), force_archive_contents=len([temp for temp in temp_files if not temp.endswith(STATICLIB_ENDINGS)]) == 0) final = in_temp(target_basename + '.bc') else: if not LEAVE_INPUTS_RAW: @@ -1404,7 +1406,7 @@ try: log_time('link') if DEBUG: - logging.debug('saving intermediate processing steps to %s' % shared.EMSCRIPTEN_TEMP_DIR) + logging.debug('saving intermediate processing steps to %s', shared.EMSCRIPTEN_TEMP_DIR) intermediate_counter = 0 def save_intermediate(name=None, suffix='js'): @@ -1528,7 +1530,7 @@ try: shutil.copyfile(final, final + '.tr.js') final += '.tr.js' posix = True if not shared.WINDOWS else False - logging.debug('applying transform: %s' % js_transform) + logging.debug('applying transform: %s', js_transform) subprocess.check_call(shlex.split(js_transform, posix=posix) + [os.path.abspath(final)]) if DEBUG: save_intermediate('transformed') @@ -1558,7 +1560,7 @@ try: if DEBUG: if os.path.exists(memfile): save_intermediate('meminit') - logging.debug('wrote memory initialization to %s' % memfile) + logging.debug('wrote memory initialization to %s', memfile) else: logging.debug('did not see memory initialization') elif shared.Settings.USE_TYPED_ARRAYS == 2 and not shared.Settings.MAIN_MODULE and not shared.Settings.SIDE_MODULE: @@ -1660,7 +1662,7 @@ try: if debug_level < 2 and shared.Settings.ASM_JS: js_optimizer_queue += ['minifyNames'] if debug_level == 0: js_optimizer_queue += ['minifyWhitespace'] - if closure and shared.Settings.ASM_JS: + if closure and shared.Settings.ASM_JS: js_optimizer_queue += ['closure'] if not shared.Settings.SIDE_MODULE: js_optimizer_queue += ['last'] # side modules are not finalized until after relocation @@ -1840,7 +1842,7 @@ try { log_time('final emitting') - if DEBUG: logging.debug('total time: %.2f seconds' % (time.time() - start_time)) + if DEBUG: logging.debug('total time: %.2f seconds', (time.time() - start_time)) finally: if not TEMP_DIR: diff --git a/emscripten.py b/emscripten.py index 6b49a3cc31f63..cb9eefabd5535 100755 --- a/emscripten.py +++ b/emscripten.py @@ -9,7 +9,7 @@ headers, for the libc implementation in JS). ''' -import os, sys, json, optparse, subprocess, re, time, multiprocessing, string, logging, shutil +import os, sys, json, optparse, subprocess, re, time, multiprocessing, string, logging from tools import shared from tools import jsrun, cache as cache_module, tempfiles @@ -538,7 +538,7 @@ def math_fix(g): ''.join([' var ' + g + '=+env.' + g + ';\n' for g in basic_float_vars]) # In linkable modules, we need to add some explicit globals for global variables that can be linked and used across modules if settings.get('MAIN_MODULE') or settings.get('SIDE_MODULE'): - assert settings.get('TARGET_LE32'), 'TODO: support x86 target when linking modules (needs offset of 4 and not 8 here)' + assert settings.get('TARGET_ASMJS_UNKNOWN_EMSCRIPTEN'), 'TODO: support x86 target when linking modules (needs offset of 4 and not 8 here)' for key, value in forwarded_json['Variables']['globals'].iteritems(): if value.get('linkable'): init = forwarded_json['Variables']['indexedGlobals'][key] + 8 # 8 is Runtime.GLOBAL_BASE / STATIC_BASE @@ -801,8 +801,8 @@ def fix_dot_zero(m): if DEBUG: logging.debug('emscript: js compiler glue') # Settings changes - assert settings['TARGET_LE32'] == 1 - settings['TARGET_LE32'] = 2 + assert settings['TARGET_ASMJS_UNKNOWN_EMSCRIPTEN'] == 1 + settings['TARGET_ASMJS_UNKNOWN_EMSCRIPTEN'] = 2 i64_funcs = ['i64Add', 'i64Subtract', '__muldi3', '__divdi3', '__udivdi3', '__remdi3', '__uremdi3'] for i64_func in i64_funcs: if i64_func in metadata['declares']: @@ -1087,7 +1087,7 @@ def math_fix(g): asm_global_vars = ''.join([' var ' + g + '=env.' + g + '|0;\n' for g in basic_vars + global_vars]) # In linkable modules, we need to add some explicit globals for global variables that can be linked and used across modules if settings.get('MAIN_MODULE') or settings.get('SIDE_MODULE'): - assert settings.get('TARGET_LE32'), 'TODO: support x86 target when linking modules (needs offset of 4 and not 8 here)' + assert settings.get('TARGET_ASMJS_UNKNOWN_EMSCRIPTEN'), 'TODO: support x86 target when linking modules (needs offset of 4 and not 8 here)' for key, value in forwarded_json['Variables']['globals'].iteritems(): if value.get('linkable'): init = forwarded_json['Variables']['indexedGlobals'][key] + 8 # 8 is Runtime.GLOBAL_BASE / STATIC_BASE @@ -1277,13 +1277,13 @@ def main(args, compiler_engine, cache, jcache, relooper, temp_files, DEBUG, DEBU settings.setdefault('RELOOPER', relooper) if not os.path.exists(relooper): shared.Building.ensure_relooper(relooper) - + settings.setdefault('STRUCT_INFO', cache.get_path('struct_info.compiled.json')) struct_info = settings.get('STRUCT_INFO') - + if not os.path.exists(struct_info): shared.Building.ensure_struct_info(struct_info) - + emscript(args.infile, settings, args.outfile, libraries, compiler_engine=compiler_engine, jcache=jcache, temp_files=temp_files, DEBUG=DEBUG, DEBUG_CACHE=DEBUG_CACHE) diff --git a/scons-tools/emscripten.py b/scons-tools/emscripten.py index 4c48083e9ff39..af85f1065e084 100755 --- a/scons-tools/emscripten.py +++ b/scons-tools/emscripten.py @@ -274,7 +274,7 @@ def generate(env): RANLIBCOM='', CCFLAGS=[ '-U__STRICT_ANSI__', - '-target', 'le32-unknown-nacl', + '-target', 'asmjs-unknown-emscripten', '-nostdinc', '-Wno-#warnings', '-Wno-error=unused-variable', diff --git a/src/intertyper.js b/src/intertyper.js index 10822e487c9f9..7743ce62b96bd 100644 --- a/src/intertyper.js +++ b/src/intertyper.js @@ -348,7 +348,7 @@ function intertyper(lines, sidePass, baseLineNums) { if (token1Text == 'triple') { var triple = item.tokens[3].text; triple = triple.substr(1, triple.length-2); - var expected = TARGET_LE32 ? 'le32-unknown-nacl' : 'i386-pc-linux-gnu'; + var expected = TARGET_ASMJS_UNKNOWN_EMSCRIPTEN ? 'asmjs-unknown-emscripten' : 'i386-pc-linux-gnu'; if (triple !== expected) { warn('using an unexpected LLVM triple: ' + [triple, ' !== ', expected] + ' (are you using emcc for everything and not clang?)'); } @@ -688,7 +688,7 @@ function intertyper(lines, sidePass, baseLineNums) { Types.hasInlineJS = true; warnOnce('inline JavaScript using asm() will cause the code to no longer fall in the asm.js subset of JavaScript, which can reduce performance - consider using emscripten_run_script'); } - assert(TARGET_LE32, 'inline js is only supported in le32'); + assert(TARGET_ASMJS_UNKNOWN_EMSCRIPTEN, 'inline js is only supported in asmjs-unknown-emscripten'); // Inline assembly is just JavaScript that we paste into the code item.intertype = 'value'; if (tokensLeft[0].text == 'sideeffect') tokensLeft.splice(0, 1); @@ -848,7 +848,7 @@ function intertyper(lines, sidePass, baseLineNums) { }).filter(function(param) { return param.value && param.value.ident != 'undef' }); return item; } - // 'phi' + // 'va_arg' function va_argHandler(item) { item.intertype = 'va_arg'; var segments = splitTokenList(item.tokens.slice(1)); diff --git a/src/jsifier.js b/src/jsifier.js index c1ca893b3aef5..56dc9d261beac 100644 --- a/src/jsifier.js +++ b/src/jsifier.js @@ -1413,7 +1413,7 @@ function JSify(data, functionsOnly) { } } function va_argHandler(item) { - assert(TARGET_LE32); + assert(TARGET_ASMJS_UNKNOWN_EMSCRIPTEN); var ident = item.value.ident; var move = Runtime.STACK_ALIGN; @@ -1710,7 +1710,7 @@ function JSify(data, functionsOnly) { if ((phase == 'pre' || phase == 'glue') && !Variables.generatedGlobalBase && !BUILD_AS_SHARED_LIB) { Variables.generatedGlobalBase = true; // Globals are done, here is the rest of static memory - assert((TARGET_LE32 && Runtime.GLOBAL_BASE == 8) || (TARGET_X86 && Runtime.GLOBAL_BASE == 4)); // this is assumed in e.g. relocations for linkable modules + assert((TARGET_ASMJS_UNKNOWN_EMSCRIPTEN && Runtime.GLOBAL_BASE == 8) || (TARGET_X86 && Runtime.GLOBAL_BASE == 4)); // this is assumed in e.g. relocations for linkable modules if (!SIDE_MODULE) { print('STATIC_BASE = ' + Runtime.GLOBAL_BASE + ';\n'); print('STATICTOP = STATIC_BASE + ' + Runtime.alignMemory(Variables.nextIndexedOffset) + ';\n'); diff --git a/src/library.js b/src/library.js index 5df5ff206b21d..18a794fd8878c 100644 --- a/src/library.js +++ b/src/library.js @@ -1861,14 +1861,14 @@ LibraryManager.library = { // int x = 4; printf("%c\n", (char)x); var ret; if (type === 'double') { -#if TARGET_LE32 == 2 +#if TARGET_ASMJS_UNKNOWN_EMSCRIPTEN == 2 ret = {{{ makeGetValue('varargs', 'argIndex', 'double', undefined, undefined, true, 4) }}}; #else ret = {{{ makeGetValue('varargs', 'argIndex', 'double', undefined, undefined, true) }}}; #endif #if USE_TYPED_ARRAYS == 2 } else if (type == 'i64') { -#if TARGET_LE32 == 1 +#if TARGET_ASMJS_UNKNOWN_EMSCRIPTEN == 1 ret = [{{{ makeGetValue('varargs', 'argIndex', 'i32', undefined, undefined, true) }}}, {{{ makeGetValue('varargs', 'argIndex+8', 'i32', undefined, undefined, true) }}}]; argIndex += {{{ STACK_ALIGN }}}; // each 32-bit chunk is in a 64-bit block @@ -1885,7 +1885,7 @@ LibraryManager.library = { type = 'i32'; // varargs are always i32, i64, or double ret = {{{ makeGetValue('varargs', 'argIndex', 'i32', undefined, undefined, true) }}}; } -#if TARGET_LE32 == 2 +#if TARGET_ASMJS_UNKNOWN_EMSCRIPTEN == 2 argIndex += Runtime.getNativeFieldSize(type); #else argIndex += Math.max(Runtime.getNativeFieldSize(type), Runtime.getAlignSize(type, null, true)); @@ -2859,7 +2859,7 @@ LibraryManager.library = { vsscanf: 'sscanf', #endif -#if TARGET_LE32 +#if TARGET_ASMJS_UNKNOWN_EMSCRIPTEN // convert va_arg into varargs vfprintf__deps: ['fprintf'], vfprintf: function(s, f, va_arg) { @@ -4178,7 +4178,7 @@ LibraryManager.library = { #if TARGET_X86 return makeSetValue(ptr, 0, 'varrp', 'void*'); #endif -#if TARGET_LE32 +#if TARGET_ASMJS_UNKNOWN_EMSCRIPTEN // 2-word structure: struct { void* start; void* currentOffset; } return makeSetValue(ptr, 0, 'varrp', 'void*') + ';' + makeSetValue(ptr, Runtime.QUANTUM_SIZE, 0, 'void*'); #endif diff --git a/src/parseTools.js b/src/parseTools.js index fe56580ef36fa..4fb7619698fb0 100644 --- a/src/parseTools.js +++ b/src/parseTools.js @@ -1161,7 +1161,7 @@ function getHeapOffset(offset, type, forceAsm) { if (Runtime.getNativeFieldSize(type) > 4) { if (type == 'i64' || TARGET_X86) { - type = 'i32'; // XXX we emulate 64-bit values as 32 in x86, and also in le32 but only i64, not double + type = 'i32'; // XXX we emulate 64-bit values as 32 in x86, and also in asmjs-unknown-emscripten but only i64, not double } } @@ -1287,7 +1287,7 @@ function makeGetValue(ptr, pos, type, noNeedFirst, unsigned, ignore, align, noSa return '{ ' + ret.join(', ') + ' }'; } - // In double mode 1, in x86 we always assume unaligned because we can't trust that; otherwise in le32 + // In double mode 1, in x86 we always assume unaligned because we can't trust that; otherwise in asmjs-unknown-emscripten // we need this code path if we are not fully aligned. if (DOUBLE_MODE == 1 && USE_TYPED_ARRAYS == 2 && type == 'double' && (TARGET_X86 || align < 8)) { return '(' + makeSetTempDouble(0, 'i32', makeGetValue(ptr, pos, 'i32', noNeedFirst, unsigned, ignore, align, noSafe)) + ',' + @@ -1826,7 +1826,7 @@ function makeGetSlabs(ptr, type, allowMultiple, unsigned) { case '<4 x i32>': case 'i32': case 'i64': return [unsigned ? 'HEAPU32' : 'HEAP32']; break; case 'double': { - if (TARGET_LE32) return ['HEAPF64']; // in le32, we do have the ability to assume 64-bit alignment + if (TARGET_ASMJS_UNKNOWN_EMSCRIPTEN) return ['HEAPF64']; // in asmjs-unknown-emscripten, we do have the ability to assume 64-bit alignment // otherwise, fall through to float } case '<4 x float>': diff --git a/src/relooper/Relooper.cpp b/src/relooper/Relooper.cpp index 14c203e0f3baf..c11de0999518a 100644 --- a/src/relooper/Relooper.cpp +++ b/src/relooper/Relooper.cpp @@ -17,8 +17,8 @@ typedef std::string ministring; #endif -template bool contains(const T& container, const U& contained) { - return container.find(contained) != container.end(); +template static bool contains(const T& container, const U& contained) { + return container.count(contained); } #if DEBUG @@ -650,7 +650,7 @@ void Relooper::Calculate(Block *Entry) { Block *Curr = *iter; for (BlockBranchMap::iterator iter = Curr->BranchesOut.begin(); iter != Curr->BranchesOut.end(); iter++) { Block *Target = iter->first; - if (Hoisted.find(Target) == Hoisted.end() && NextEntries.find(Target) == NextEntries.end()) { + if (!contains(Hoisted, Target) && !contains(NextEntries, Target)) // abort this hoisting abort = true; break; diff --git a/src/runtime.js b/src/runtime.js index fecd3b68f75de..97de74730e27d 100644 --- a/src/runtime.js +++ b/src/runtime.js @@ -185,10 +185,10 @@ var Runtime = { // type can be a native type or a struct (or null, for structs we only look at size here) getAlignSize: function(type, size, vararg) { // we align i64s and doubles on 64-bit boundaries, unlike x86 -#if TARGET_LE32 == 1 +#if TARGET_ASMJS_UNKNOWN_EMSCRIPTEN == 1 if (vararg) return 8; #endif -#if TARGET_LE32 +#if TARGET_ASMJS_UNKNOWN_EMSCRIPTEN if (!vararg && (type == 'i64' || type == 'double')) return 8; if (!type) return Math.min(size, 8); // align structures internally to 64 bits #endif diff --git a/src/settings.js b/src/settings.js index 1c6b998ed0648..7f9fbabf07bea 100644 --- a/src/settings.js +++ b/src/settings.js @@ -23,8 +23,8 @@ var QUANTUM_SIZE = 4; // This is the size of an individual field in a structure. // Changing this from the default of 4 is deprecated. var TARGET_X86 = 0; // For i386-pc-linux-gnu -var TARGET_LE32 = 1; // For le32-unknown-nacl. 1 is normal, 2 is for the fastcomp llvm - // backend using pnacl abi simplification +var TARGET_ASMJS_UNKNOWN_EMSCRIPTEN = 1; // For asmjs-unknown-emscripten. 1 is normal, 2 is for the fastcomp llvm + // backend using emscripten-customized abi simplification var CORRECT_SIGNS = 1; // Whether we make sure to convert unsigned values to signed values. // Decreases performance with additional runtime checks. Might not be diff --git a/system/include/EGL/eglplatform.h b/system/include/EGL/eglplatform.h index 2db2cc4794f28..77e885a83bcba 100644 --- a/system/include/EGL/eglplatform.h +++ b/system/include/EGL/eglplatform.h @@ -75,7 +75,7 @@ typedef HDC EGLNativeDisplayType; typedef HBITMAP EGLNativePixmapType; typedef HWND EGLNativeWindowType; -#elif defined(EMSCRIPTEN) +#elif defined(__EMSCRIPTEN__) typedef int EGLNativeDisplayType; typedef int EGLNativeWindowType; diff --git a/system/include/SDL/SDL_config_minimal.h b/system/include/SDL/SDL_config_minimal.h index ea0cec10d7ddc..18951f1854360 100644 --- a/system/include/SDL/SDL_config_minimal.h +++ b/system/include/SDL/SDL_config_minimal.h @@ -33,7 +33,7 @@ #include #include -#if !defined(EMSCRIPTEN) && !defined(_STDINT_H_) && (!defined(HAVE_STDINT_H) || !_HAVE_STDINT_H) +#if !defined(__EMSCRIPTEN__) && !defined(_STDINT_H_) && (!defined(HAVE_STDINT_H) || !_HAVE_STDINT_H) typedef unsigned int size_t; typedef signed char int8_t; typedef unsigned char uint8_t; diff --git a/system/include/SDL/SDL_stdinc.h b/system/include/SDL/SDL_stdinc.h index c4ce7ccd92feb..508ecdb41caf8 100644 --- a/system/include/SDL/SDL_stdinc.h +++ b/system/include/SDL/SDL_stdinc.h @@ -65,7 +65,7 @@ #endif #if defined(HAVE_INTTYPES_H) # include -#elif defined(EMSCRIPTEN) || defined(HAVE_STDINT_H) +#elif defined(__EMSCRIPTEN__) || defined(HAVE_STDINT_H) # include #endif #ifdef HAVE_CTYPE_H diff --git a/system/include/emscripten/emscripten.h b/system/include/emscripten/emscripten.h index 852a8e0d981b0..c36bec6323832 100644 --- a/system/include/emscripten/emscripten.h +++ b/system/include/emscripten/emscripten.h @@ -14,7 +14,7 @@ extern "C" { #endif -#if !EMSCRIPTEN +#if !__EMSCRIPTEN__ #include /* for SDL_Delay in async_call */ #endif @@ -141,7 +141,7 @@ extern void emscripten_async_load_script(const char *script, void (*onload)(), v * you created an object on the stack, it will be cleaned up * before the main loop will be called the first time. */ -#if EMSCRIPTEN +#if __EMSCRIPTEN__ extern void emscripten_set_main_loop(void (*func)(), int fps, int simulate_infinite_loop); extern void emscripten_set_main_loop_arg(void (*func)(void*), void *arg, int fps, int simulate_infinite_loop); extern void emscripten_pause_main_loop(); @@ -166,7 +166,7 @@ extern void emscripten_cancel_main_loop(); * are not counted, do not block the main loop, and can fire * at specific time in the future. */ -#if EMSCRIPTEN +#if __EMSCRIPTEN__ extern void _emscripten_push_main_loop_blocker(void (*func)(void *), void *arg, const char *name); extern void _emscripten_push_uncounted_main_loop_blocker(void (*func)(void *), void *arg, const char *name); #else @@ -188,7 +188,7 @@ inline void _emscripten_push_uncounted_main_loop_blocker(void (*func)(void *), v * to 10, then push 10 blockers, as they complete the user will * see x/10 and so forth. */ -#if EMSCRIPTEN +#if __EMSCRIPTEN__ extern void emscripten_set_main_loop_expected_blockers(int num); #else inline void emscripten_set_main_loop_expected_blockers(int num) {} @@ -203,7 +203,7 @@ inline void emscripten_set_main_loop_expected_blockers(int num) {} * If millis is negative, the browser's requestAnimationFrame * mechanism is used. */ -#if EMSCRIPTEN +#if __EMSCRIPTEN__ extern void emscripten_async_call(void (*func)(void *), void *arg, int millis); #else inline void emscripten_async_call(void (*func)(void *), void *arg, int millis) { @@ -247,7 +247,7 @@ void emscripten_get_canvas_size(int *width, int *height, int *isFullscreen); * absolute time, and is only meaningful in comparison to * other calls to this function. The unit is ms. */ -#if EMSCRIPTEN +#if __EMSCRIPTEN__ double emscripten_get_now(); #else #include diff --git a/system/include/jansson.h b/system/include/jansson.h index 04c345e979f82..53715fcc21e03 100644 --- a/system/include/jansson.h +++ b/system/include/jansson.h @@ -82,7 +82,7 @@ typedef long long json_int_t; typedef long json_int_t; #endif /* JSON_INTEGER_IS_LONG_LONG */ -#ifdef EMSCRIPTEN +#ifdef __EMSCRIPTEN__ extern "C" bool json_typeof(const void *object); extern "C" bool json_is_object(const void *object); extern "C" bool json_is_array(const void *object); diff --git a/system/lib/compiler-rt/int_endianness.h b/system/lib/compiler-rt/int_endianness.h index 1790535503cfb..fa294c49eb2c2 100644 --- a/system/lib/compiler-rt/int_endianness.h +++ b/system/lib/compiler-rt/int_endianness.h @@ -100,7 +100,7 @@ #endif /* Windows */ -#if defined(EMSCRIPTEN) +#if defined(__EMSCRIPTEN__) #define _YUGA_LITTLE_ENDIAN 1 #define _YUGA_BIG_ENDIAN 0 diff --git a/system/lib/dlmalloc.c b/system/lib/dlmalloc.c index ce2c25f100ac2..04e9e47b60c23 100644 --- a/system/lib/dlmalloc.c +++ b/system/lib/dlmalloc.c @@ -1,6 +1,6 @@ /* XXX Emscripten XXX */ -#if EMSCRIPTEN +#if __EMSCRIPTEN__ #define DLMALLOC_EXPORT __attribute__((__weak__, __visibility__("default"))) /* mmap uses malloc, so malloc can't use mmap */ #define HAVE_MMAP 0 diff --git a/tests/799.cpp b/tests/799.cpp index 6c4c9b184584c..aa3213af58794 100644 --- a/tests/799.cpp +++ b/tests/799.cpp @@ -6,7 +6,7 @@ #include #include -#ifdef EMSCRIPTEN +#ifdef __EMSCRIPTEN__ #include #endif diff --git a/tests/aniso.c b/tests/aniso.c index 443e50aa73bf4..b925149d3d369 100644 --- a/tests/aniso.c +++ b/tests/aniso.c @@ -208,7 +208,7 @@ int main(int argc, char *argv[]) */ SDL_GL_SwapBuffers(); -#if !EMSCRIPTEN +#ifndef __EMSCRIPTEN__ // Wait for 3 seconds to give us a chance to see the image SDL_Delay(2000); #endif diff --git a/tests/asmjs-unknown-emscripten.c b/tests/asmjs-unknown-emscripten.c new file mode 100644 index 0000000000000..36071964650b9 --- /dev/null +++ b/tests/asmjs-unknown-emscripten.c @@ -0,0 +1,98 @@ +#ifndef __EMSCRIPTEN__ +#error __EMSCRIPTEN__ is not defined +#endif +#ifndef __asmjs__ +#error __asmjs__ is not defined +#endif +#ifdef __cplusplus +#ifndef _GNU_SOURCE +#error _GNU_SOURCE is not defined in C++ +#endif +#endif +#ifndef __unix__ +#error __unix__ is not defined +#endif +#ifndef __LITTLE_ENDIAN__ +#error __LITTLE_ENDIAN__ is not defined +#endif + +#ifdef __clang__ +#if __has_feature(pnacl) +#error has feature pnacl +#endif +#endif + +#ifdef __native_client__ +#error __native_client__ is defined +#endif +#ifdef __pnacl__ +#error __pnacl__ is defined +#endif +#ifdef __ELF__ +#error __ELF__ is defined +#endif +#ifdef __i386__ +#error __i386__ is defined +#endif +#ifdef __i386 +#error __i386 is defined +#endif +#ifdef i386 +#error i386 is defined +#endif +#ifdef __SSE__ +#error __SSE__ is defined +#endif +#ifdef __SSE2__ +#error __SSE2__ is defined +#endif +#ifdef __SSE_MATH__ +#error __SSE_MATH__ is defined +#endif +#ifdef __SSE2_MATH__ +#error __SSE2_MATH__ is defined +#endif +#ifdef __MMX__ +#error __MMX__ is defined +#endif +#ifdef __APPLE__ +#error __APPLE__ is defined +#endif +#ifdef __linux__ +#error __linux__ is defined +#endif +#ifdef __BIG_ENDIAN__ +#error __BIG_ENDIAN__ is defined +#endif +#ifdef __LP64__ +#error __LP64__ is defined +#endif + +// We prefer to use __EMSCRIPTEN__, but for compatibility, we define +// EMSCRIPTEN too. +#ifndef EMSCRIPTEN +#error EMSCRIPTEN is not defined +#endif + +#include +#include +#include +#include + +#define STRINGIZE_HELPER(x) #x +#define STRINGIZE(x) STRINGIZE_HELPER(x) + +int main() { + assert(sizeof(void*) == 4); + assert(sizeof(long) == 4); + assert(sizeof(intmax_t) == 8); + assert(__alignof(double) == 8); + assert(sizeof(long double) == 8); + assert(__alignof(long double) == 8); + assert(sizeof(intptr_t) == 4); + assert(sizeof(size_t) == 4); + assert(sizeof(ptrdiff_t) == 4); + assert(__FLT_EVAL_METHOD__ == 0); + assert(strcmp(STRINGIZE(__USER_LABEL_PREFIX__), "") == 0); + return 0; +} diff --git a/tests/box2d/Benchmark.cpp b/tests/box2d/Benchmark.cpp index 4fd7965113e55..6c9b3c5ba8603 100644 --- a/tests/box2d/Benchmark.cpp +++ b/tests/box2d/Benchmark.cpp @@ -25,7 +25,7 @@ typedef struct { #include #include -#if EMSCRIPTEN +#ifdef __EMSCRIPTEN__ #include #endif @@ -131,7 +131,7 @@ int main(int argc, char **argv) { world->Step(1.0f/60.0f, 3, 3); } -#if EMSCRIPTEN +#ifdef __EMSCRIPTEN__ responsive_main_loop = argc > 2 ? argv[2][0] - '0' : 0; if (responsive_main_loop) { printf("responsive main loop\n"); @@ -141,7 +141,7 @@ int main(int argc, char **argv) { do { iter(); } while (frameCounter <= FRAMES); -#if EMSCRIPTEN +#ifdef __EMSCRIPTEN__ } #endif @@ -173,7 +173,7 @@ void iter() { printf("frame averages: %.3f +- %.3f, range: %.3f to %.3f \n", result.mean, result.stddev, float(minn)/CLOCKS_PER_SEC * 1000, float(maxx)/CLOCKS_PER_SEC * 1000); -#if EMSCRIPTEN +#ifdef __EMSCRIPTEN__ emscripten_run_script("if (Module.reportCompletion) Module.reportCompletion()"); if (responsive_main_loop) emscripten_cancel_main_loop(); #endif diff --git a/tests/cases/2xi40.ll b/tests/cases/2xi40.ll index 592f1ba49fa6b..03c918c871b86 100644 --- a/tests/cases/2xi40.ll +++ b/tests/cases/2xi40.ll @@ -1,6 +1,6 @@ ; ModuleID = '/tmp/tmpe4Pk1F/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" +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:128-n32" +target triple = "asmjs-unknown-emscripten" %struct.pair = type { [5 x i8], [5 x i8] } diff --git a/tests/cases/514_ta2.ll b/tests/cases/514_ta2.ll index ab36324258ded..d435cac14b8ca 100644 --- a/tests/cases/514_ta2.ll +++ b/tests/cases/514_ta2.ll @@ -1,6 +1,6 @@ ; 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" +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:128-n32" +target triple = "asmjs-unknown-emscripten" %struct.c_s = type { i8, float, i32 } diff --git a/tests/cases/aliasbitcast.ll b/tests/cases/aliasbitcast.ll index 5e5f13aa453d7..de46cdd41a6cc 100644 --- a/tests/cases/aliasbitcast.ll +++ b/tests/cases/aliasbitcast.ll @@ -1,6 +1,6 @@ ; ModuleID = '/tmp/emscripten/tmp/src.cpp.o' -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" +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:128-n32" +target triple = "asmjs-unknown-emscripten" @.str = private constant [14 x i8] c"hello, world!\00", align 1 ; [#uses=1] diff --git a/tests/cases/atomicrmw.ll b/tests/cases/atomicrmw.ll index 31529250c8217..abbcc7a635bcb 100644 --- a/tests/cases/atomicrmw.ll +++ b/tests/cases/atomicrmw.ll @@ -1,6 +1,6 @@ ; 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" +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:128-n32" +target triple = "asmjs-unknown-emscripten" @.str = private unnamed_addr constant [15 x i8] c"hello, %d,%d!\0A\00", align 1 ; [#uses=1 type=[15 x i8]*] diff --git a/tests/cases/atomicrmw_dec.ll b/tests/cases/atomicrmw_dec.ll index 0ff08a5dcf1e7..edb5bd8f235c9 100644 --- a/tests/cases/atomicrmw_dec.ll +++ b/tests/cases/atomicrmw_dec.ll @@ -1,6 +1,6 @@ ; 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" +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:128-n32" +target triple = "asmjs-unknown-emscripten" @.str = private unnamed_addr constant [15 x i8] c"hello, %d,%d!\0A\00", align 1 ; [#uses=1 type=[15 x i8]*] diff --git a/tests/cases/atomicrmw_unaligned.ll b/tests/cases/atomicrmw_unaligned.ll index 31529250c8217..abbcc7a635bcb 100644 --- a/tests/cases/atomicrmw_unaligned.ll +++ b/tests/cases/atomicrmw_unaligned.ll @@ -1,6 +1,6 @@ ; 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" +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:128-n32" +target triple = "asmjs-unknown-emscripten" @.str = private unnamed_addr constant [15 x i8] c"hello, %d,%d!\0A\00", align 1 ; [#uses=1 type=[15 x i8]*] diff --git a/tests/cases/bigdouble.ll b/tests/cases/bigdouble.ll index cd58c08b6ff05..e96b10af51434 100644 --- a/tests/cases/bigdouble.ll +++ b/tests/cases/bigdouble.ll @@ -1,6 +1,6 @@ ; 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" +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:128-n32" +target triple = "asmjs-unknown-emscripten" @.str = private unnamed_addr constant [4 x i8] c"%f\0A\00", align 1 diff --git a/tests/cases/boolret_fastcomp.ll b/tests/cases/boolret_fastcomp.ll index a20cd0014c805..1b968778186be 100644 --- a/tests/cases/boolret_fastcomp.ll +++ b/tests/cases/boolret_fastcomp.ll @@ -1,6 +1,6 @@ ; 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" +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:128-n32" +target triple = "asmjs-unknown-emscripten" @.str = private unnamed_addr constant [15 x i8] c"helloworld%d.\0A\00", align 1 diff --git a/tests/cases/breakinthemiddle.ll b/tests/cases/breakinthemiddle.ll index 6e05b85387f65..4c43bbd00742e 100644 --- a/tests/cases/breakinthemiddle.ll +++ b/tests/cases/breakinthemiddle.ll @@ -1,5 +1,5 @@ -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" +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:128-n32" +target triple = "asmjs-unknown-emscripten" @.str = private constant [15 x i8] c"hello, world!\0A\00", align 1 ; [#uses=1] diff --git a/tests/cases/breakinthemiddle2.ll b/tests/cases/breakinthemiddle2.ll index 2f8c1c91c35f0..301b62c3aec37 100644 --- a/tests/cases/breakinthemiddle2.ll +++ b/tests/cases/breakinthemiddle2.ll @@ -1,5 +1,5 @@ -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" +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:128-n32" +target triple = "asmjs-unknown-emscripten" @.str = private constant [15 x i8] c"hello, world!\0A\00", align 1 ; [#uses=1] diff --git a/tests/cases/caall.ll b/tests/cases/caall.ll index 2cc231ecff4a1..ffbf29d859d14 100644 --- a/tests/cases/caall.ll +++ b/tests/cases/caall.ll @@ -1,6 +1,6 @@ ; 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" +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:128-n32" +target triple = "asmjs-unknown-emscripten" @.str = private unnamed_addr constant [15 x i8] c"hello, world!\0A\00", align 1 ; [#uses=1 type=[15 x i8]*] diff --git a/tests/cases/callwithstructural64_ta2.ll b/tests/cases/callwithstructural64_ta2.ll index d16b0e87a1f8d..56b0442c1e1ef 100644 --- a/tests/cases/callwithstructural64_ta2.ll +++ b/tests/cases/callwithstructural64_ta2.ll @@ -1,6 +1,6 @@ ; ModuleID = 'foo.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" +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:128-n32" +target triple = "asmjs-unknown-emscripten" %ac = type { i8*, i64 } diff --git a/tests/cases/callwithstructural_ta2.ll b/tests/cases/callwithstructural_ta2.ll index bc6f852abcd6d..88a3d755b637d 100644 --- a/tests/cases/callwithstructural_ta2.ll +++ b/tests/cases/callwithstructural_ta2.ll @@ -1,6 +1,6 @@ ; ModuleID = 'foo.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" +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:128-n32" +target triple = "asmjs-unknown-emscripten" %ac = type { i8*, i32 } diff --git a/tests/cases/complexphi.ll b/tests/cases/complexphi.ll index e79e6f1b33574..0d1677f3edd7e 100644 --- a/tests/cases/complexphi.ll +++ b/tests/cases/complexphi.ll @@ -1,6 +1,6 @@ ; ModuleID = '/dev/shm/tmp/src.cpp.o' -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" +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:128-n32" +target triple = "asmjs-unknown-emscripten" @.str = private unnamed_addr constant [15 x i8] c"hello, world!\0A\00", align 1 ; [#uses=1 type=[15 x i8]*] @_dispatchTable = internal global i64 0 diff --git a/tests/cases/ctors_cast.ll b/tests/cases/ctors_cast.ll index d94b1d63cde28..707b552893150 100644 --- a/tests/cases/ctors_cast.ll +++ b/tests/cases/ctors_cast.ll @@ -1,6 +1,6 @@ ; ModuleID = '/tmp/tmpHcVUBJ/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" +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:128-n32" +target triple = "asmjs-unknown-emscripten" %struct.Other = type { i8 } diff --git a/tests/cases/dash.ll b/tests/cases/dash.ll index 6833a42e3304c..6f727820e350d 100644 --- a/tests/cases/dash.ll +++ b/tests/cases/dash.ll @@ -1,6 +1,6 @@ ; ModuleID = '/tmp/tmpqfApGD/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" +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:128-n32" +target triple = "asmjs-unknown-emscripten" @other-name = alias i32 ()* @main diff --git a/tests/cases/dollar.ll b/tests/cases/dollar.ll index 7d730d6ac2278..8f0c1dd718f89 100644 --- a/tests/cases/dollar.ll +++ b/tests/cases/dollar.ll @@ -1,6 +1,6 @@ ; 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" +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:128-n32" +target triple = "asmjs-unknown-emscripten" @.str = private unnamed_addr constant [15 x i8] c"hello, world!\0A\00", align 1 ; [#uses=1 type=[15 x i8]*] diff --git a/tests/cases/emptyalloca.ll b/tests/cases/emptyalloca.ll index f12a416185e9b..0c03c645ed5f3 100644 --- a/tests/cases/emptyalloca.ll +++ b/tests/cases/emptyalloca.ll @@ -1,6 +1,6 @@ ; ModuleID = '/tmp/tmpjSNiky/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" +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:128-n32" +target triple = "asmjs-unknown-emscripten" @.str = private unnamed_addr constant [30 x i8] c"Module.print('hello, world!')\00", align 1 diff --git a/tests/cases/emptyasm_le32.ll b/tests/cases/emptyasm_aue.ll similarity index 86% rename from tests/cases/emptyasm_le32.ll rename to tests/cases/emptyasm_aue.ll index 8f6b606e10a22..65d9e2133c4b1 100644 --- a/tests/cases/emptyasm_le32.ll +++ b/tests/cases/emptyasm_aue.ll @@ -1,5 +1,5 @@ -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" +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:128-n32" +target triple = "asmjs-unknown-emscripten" ; ModuleID = 'tests/hello_world.bc' diff --git a/tests/cases/entry3.ll b/tests/cases/entry3.ll index 6888d0a8f2b11..7e154e2c62f99 100644 --- a/tests/cases/entry3.ll +++ b/tests/cases/entry3.ll @@ -1,6 +1,6 @@ ; ModuleID = '/tmp/tmpKnA2D3/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" +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:128-n32" +target triple = "asmjs-unknown-emscripten" @.str = private unnamed_addr constant [11 x i8] c"getgid=%d\0A\00", align 1 @.str1 = private unnamed_addr constant [6 x i8] c"f=%d\0A\00", align 1 diff --git a/tests/cases/fptosi.ll b/tests/cases/fptosi.ll index 71bc6af8c8fe2..caf9b7544b36a 100644 --- a/tests/cases/fptosi.ll +++ b/tests/cases/fptosi.ll @@ -1,6 +1,6 @@ ; ModuleID = '/dev/shm/tmp/src.cpp.o' -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" +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:128-n32" +target triple = "asmjs-unknown-emscripten" @.str = private unnamed_addr constant [8 x i8] c"*%.3f*\0A\00", align 1 ; [#uses=1 type=[8 x i8]*] @.str2 = private unnamed_addr constant [6 x i8] c"*%d*\0A\00", align 1 ; [#uses=1 type=[6 x i8]*] diff --git a/tests/cases/funcptr.ll b/tests/cases/funcptr.ll index ef869c3324382..ffc1ad1d62559 100644 --- a/tests/cases/funcptr.ll +++ b/tests/cases/funcptr.ll @@ -1,6 +1,6 @@ ; 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" +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:128-n32" +target triple = "asmjs-unknown-emscripten" @.str = private unnamed_addr constant [17 x i8] c"hello %d world!\0A\00", align 1 ; [#uses=1 type=[17 x i8]*] diff --git a/tests/cases/fuzz6_ta2.ll b/tests/cases/fuzz6_ta2.ll index dea3a21d8fd29..225493f901b4d 100644 --- a/tests/cases/fuzz6_ta2.ll +++ b/tests/cases/fuzz6_ta2.ll @@ -1,6 +1,6 @@ ; 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" +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:128-n32" +target triple = "asmjs-unknown-emscripten" %struct.S3 = type { i32, i32 } %struct.S1 = type { i32, i32, i8, i16 } diff --git a/tests/cases/gepaddoverflow.ll b/tests/cases/gepaddoverflow.ll index 11246c1d17ce2..258e2cc5e46bd 100644 --- a/tests/cases/gepaddoverflow.ll +++ b/tests/cases/gepaddoverflow.ll @@ -1,6 +1,6 @@ ; ModuleID = 'new.o' -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" +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:128-n32" +target triple = "asmjs-unknown-emscripten" declare i32 @printf(i8* noalias, ...) nounwind diff --git a/tests/cases/i24_mem_ta2.ll b/tests/cases/i24_mem_ta2.ll index 550389fe9979f..995c9f8bbbc9f 100644 --- a/tests/cases/i24_mem_ta2.ll +++ b/tests/cases/i24_mem_ta2.ll @@ -1,6 +1,6 @@ ; 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" +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:128-n32" +target triple = "asmjs-unknown-emscripten" @.str = private unnamed_addr constant [6 x i8] c".%x.\0A\00", align 1 ; [#uses=1 type=[5 x i8]*] diff --git a/tests/cases/i96_ashr_ta2.ll b/tests/cases/i96_ashr_ta2.ll index 83966168e8260..da6410f978dfb 100644 --- a/tests/cases/i96_ashr_ta2.ll +++ b/tests/cases/i96_ashr_ta2.ll @@ -1,6 +1,6 @@ ; 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" +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:128-n32" +target triple = "asmjs-unknown-emscripten" @.str = private unnamed_addr constant [23 x i8] c"hello..world!%x,%x,%x\0A\00", align 1 diff --git a/tests/cases/i96shiftnon32_ta2.ll b/tests/cases/i96shiftnon32_ta2.ll index 55e845751244c..815d71eae511d 100644 --- a/tests/cases/i96shiftnon32_ta2.ll +++ b/tests/cases/i96shiftnon32_ta2.ll @@ -1,6 +1,6 @@ ; 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" +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:128-n32" +target triple = "asmjs-unknown-emscripten" %struct.c_s = type { i8, float, i32 } diff --git a/tests/cases/inttoptr.ll b/tests/cases/inttoptr.ll index c1b40a74e4af0..e225336c7b95d 100644 --- a/tests/cases/inttoptr.ll +++ b/tests/cases/inttoptr.ll @@ -1,6 +1,6 @@ ; ModuleID = '/tmp/emscripten/tmp/src.cpp.o' -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" +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:128-n32" +target triple = "asmjs-unknown-emscripten" @.str = private constant [14 x i8] c"hello, world!\00", align 1 ; [#uses=1] diff --git a/tests/cases/invokebitcast.ll b/tests/cases/invokebitcast.ll index ec090b0dd87a0..63239a7bf57b6 100644 --- a/tests/cases/invokebitcast.ll +++ b/tests/cases/invokebitcast.ll @@ -1,7 +1,7 @@ ; ModuleID = '/dev/shm/tmp/src.cpp.o' ; Just test for compilation here -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" +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:128-n32" +target triple = "asmjs-unknown-emscripten" %struct.CPU_Regs = type { [8 x %union.GenReg32] } %union.GenReg32 = type { [1 x i32] } diff --git a/tests/cases/invokeundef.ll b/tests/cases/invokeundef.ll index 2f13e7abea163..17b14a3f35e3c 100644 --- a/tests/cases/invokeundef.ll +++ b/tests/cases/invokeundef.ll @@ -1,7 +1,7 @@ ; ModuleID = '/dev/shm/tmp/src.cpp.o' ; Just test for compilation here -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" +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:128-n32" +target triple = "asmjs-unknown-emscripten" %struct.CPU_Regs = type { [8 x %union.GenReg32] } %union.GenReg32 = type { [1 x i32] } diff --git a/tests/cases/legalizer_b_ta2.ll b/tests/cases/legalizer_b_ta2.ll index a621410076058..fcbfda20be8ed 100644 --- a/tests/cases/legalizer_b_ta2.ll +++ b/tests/cases/legalizer_b_ta2.ll @@ -1,6 +1,6 @@ ; 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" +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:128-n32" +target triple = "asmjs-unknown-emscripten" @globaliz = global [300 x i8] zeroinitializer diff --git a/tests/cases/legalizer_ta2.ll b/tests/cases/legalizer_ta2.ll index 6f153ad2416f1..e7f71f157c649 100644 --- a/tests/cases/legalizer_ta2.ll +++ b/tests/cases/legalizer_ta2.ll @@ -1,6 +1,6 @@ ; 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" +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:128-n32" +target triple = "asmjs-unknown-emscripten" @globaliz = global [300 x i8] zeroinitializer diff --git a/tests/cases/loadbitcastgep.ll b/tests/cases/loadbitcastgep.ll index cfb88a0d97b6a..daba67c4367a3 100644 --- a/tests/cases/loadbitcastgep.ll +++ b/tests/cases/loadbitcastgep.ll @@ -1,6 +1,6 @@ ; ModuleID = '/dev/shm/tmp/src.cpp.o' -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" +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:128-n32" +target triple = "asmjs-unknown-emscripten" %struct.CPU_Regs = type { [8 x %union.GenReg32] } %union.GenReg32 = type { [1 x i32] } diff --git a/tests/cases/muli33_ta2.ll b/tests/cases/muli33_ta2.ll index b33b04f731be8..7a427731810b6 100644 --- a/tests/cases/muli33_ta2.ll +++ b/tests/cases/muli33_ta2.ll @@ -1,6 +1,6 @@ ; ModuleID = '/tmp/tmpt0JpDh/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" +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:128-n32" +target triple = "asmjs-unknown-emscripten" @.str = private unnamed_addr constant [7 x i8] c"20\0A91\0A\00", align 1 @.str1 = private unnamed_addr constant [6 x i8] c"%u %u\00", align 1 diff --git a/tests/cases/oob_ta2.ll b/tests/cases/oob_ta2.ll index b95d28dac80ea..51b622b5ad200 100644 --- a/tests/cases/oob_ta2.ll +++ b/tests/cases/oob_ta2.ll @@ -1,6 +1,6 @@ ; 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" +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:128-n32" +target triple = "asmjs-unknown-emscripten" %structy = type { [2 x [10 x i8]] } diff --git a/tests/cases/phi24_ta2.ll b/tests/cases/phi24_ta2.ll index 18577fee6cedc..17edb228118f5 100644 --- a/tests/cases/phi24_ta2.ll +++ b/tests/cases/phi24_ta2.ll @@ -1,6 +1,6 @@ -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" +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:128-n32" +target triple = "asmjs-unknown-emscripten" %union.U4 = type { i32 } %union.U3 = type { i8* } diff --git a/tests/cases/phicubed.ll b/tests/cases/phicubed.ll index 5fc3208bdbbfd..7079dc63c8347 100644 --- a/tests/cases/phicubed.ll +++ b/tests/cases/phicubed.ll @@ -1,6 +1,6 @@ ; ModuleID = '/dev/shm/tmp/src.cpp.o' -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" +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:128-n32" +target triple = "asmjs-unknown-emscripten" %struct.worker_args = type { i32, %struct.worker_args* } diff --git a/tests/cases/phientryimplicit.ll b/tests/cases/phientryimplicit.ll index c237457cc1ed5..3249bb8d30028 100644 --- a/tests/cases/phientryimplicit.ll +++ b/tests/cases/phientryimplicit.ll @@ -1,6 +1,6 @@ ; 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" +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:128-n32" +target triple = "asmjs-unknown-emscripten" ; Phi nodes can refer to the entry. And the entry might be unnamed, and doesn't even have a consistent implicit name! diff --git a/tests/cases/phientryimplicitmix.ll b/tests/cases/phientryimplicitmix.ll index 527c761f933f8..7696f5a9e3313 100644 --- a/tests/cases/phientryimplicitmix.ll +++ b/tests/cases/phientryimplicitmix.ll @@ -1,6 +1,6 @@ ; 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" +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:128-n32" +target triple = "asmjs-unknown-emscripten" ; Phi nodes can refer to the entry. And the entry might be unnamed, and doesn't even have a consistent implicit name! diff --git a/tests/cases/phientryimplicitmoar.ll b/tests/cases/phientryimplicitmoar.ll index 0f07cc4464838..eca7276e0b5df 100644 --- a/tests/cases/phientryimplicitmoar.ll +++ b/tests/cases/phientryimplicitmoar.ll @@ -1,6 +1,6 @@ ; 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" +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:128-n32" +target triple = "asmjs-unknown-emscripten" @.str = private unnamed_addr constant [15 x i8] c"hello, world!\0A\00", align 1 ; [#uses=1 type=[15 x i8]*] @.str2 = private unnamed_addr constant [15 x i8] c"hello!!world!\0A\00", align 1 ; [#uses=1 type=[15 x i8]*] diff --git a/tests/cases/philoop_ta2.ll b/tests/cases/philoop_ta2.ll index 5036c7baf13cc..1afec6106cec6 100644 --- a/tests/cases/philoop_ta2.ll +++ b/tests/cases/philoop_ta2.ll @@ -1,6 +1,6 @@ ; ModuleID = '/tmp/tmpVIBz29/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" +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:128-n32" +target triple = "asmjs-unknown-emscripten" @.str = private unnamed_addr constant [13 x i8] c"99\0A70\0A26\0A97\0A\00", align 1 @.str1 = private unnamed_addr constant [12 x i8] c"%u %u %u %u\00", align 1 diff --git a/tests/cases/phiptrtoint.ll b/tests/cases/phiptrtoint.ll index d682dc06a1e59..617ada495956a 100644 --- a/tests/cases/phiptrtoint.ll +++ b/tests/cases/phiptrtoint.ll @@ -1,7 +1,7 @@ ; ModuleID = '/tmp/tmpJctwj0/bug.bc' ; just an asm validation check, no output -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" +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:128-n32" +target triple = "asmjs-unknown-emscripten" %"class.test::Processor" = type { i32, %"class.test::StateMachine" } %"class.test::StateMachine" = type { { i32, i32 } } diff --git a/tests/cases/phiself.ll b/tests/cases/phiself.ll index 0a06fcca20a66..b61b970fc77d6 100644 --- a/tests/cases/phiself.ll +++ b/tests/cases/phiself.ll @@ -1,6 +1,6 @@ ; ModuleID = '/tmp/emscripten_temp/src.cpp.o' -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" +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:128-n32" +target triple = "asmjs-unknown-emscripten" @.str = private unnamed_addr constant [7 x i8] c"cheez\0A\00", align 1 @.str1 = private unnamed_addr constant [6 x i8] c"*%d*\0A\00", align 1 diff --git a/tests/cases/ptrtoi64.ll b/tests/cases/ptrtoi64.ll index 5898f5298b4a8..099297423bff6 100644 --- a/tests/cases/ptrtoi64.ll +++ b/tests/cases/ptrtoi64.ll @@ -1,8 +1,8 @@ ; pointer to i64, then to i32 ; ModuleID = '/tmp/emscripten/tmp/src.cpp.o' -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" +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:128-n32" +target triple = "asmjs-unknown-emscripten" @.str2 = private constant [9 x i8] c"*%d,%d*\0A\00", align 1 ; [#uses=1] diff --git a/tests/cases/ptrtoint_blockaddr.ll b/tests/cases/ptrtoint_blockaddr.ll index 6adc2c5b21c39..08370650ce452 100644 --- a/tests/cases/ptrtoint_blockaddr.ll +++ b/tests/cases/ptrtoint_blockaddr.ll @@ -1,6 +1,6 @@ ; 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" +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:128-n32" +target triple = "asmjs-unknown-emscripten" @.str = private constant [15 x i8] c"hello, world!\0A\00", align 1 ; [#uses=1] diff --git a/tests/cases/sillybitcast.ll b/tests/cases/sillybitcast.ll index 50a54da95619c..020a6e84885e4 100644 --- a/tests/cases/sillybitcast.ll +++ b/tests/cases/sillybitcast.ll @@ -1,6 +1,6 @@ ; ModuleID = '/tmp/emscripten/tmp/src.cpp.o' -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" +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:128-n32" +target triple = "asmjs-unknown-emscripten" @.str = private constant [14 x i8] c"hello, world!\00", align 1 ; [#uses=1] diff --git a/tests/cases/sillybitcast2.ll b/tests/cases/sillybitcast2.ll index 02cf861583c2d..275760c5d6342 100644 --- a/tests/cases/sillybitcast2.ll +++ b/tests/cases/sillybitcast2.ll @@ -1,6 +1,6 @@ ; ModuleID = '/tmp/emscripten/tmp/src.cpp.o' -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" +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:128-n32" +target triple = "asmjs-unknown-emscripten" @.str = private constant [14 x i8] c"hello, world!\00", align 1 ; [#uses=1] diff --git a/tests/cases/sillyfuncast.ll b/tests/cases/sillyfuncast.ll index 33598104dfcd4..2f2f7fe62342d 100644 --- a/tests/cases/sillyfuncast.ll +++ b/tests/cases/sillyfuncast.ll @@ -1,6 +1,6 @@ ; 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" +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:128-n32" +target triple = "asmjs-unknown-emscripten" @.str = private unnamed_addr constant [15 x i8] c"hello, world!\0A\00", align 1 ; [#uses=1 type=[15 x i8]*] diff --git a/tests/cases/storebigfloat.ll b/tests/cases/storebigfloat.ll index b940f5caee0b9..a7c6c2da4ad3f 100644 --- a/tests/cases/storebigfloat.ll +++ b/tests/cases/storebigfloat.ll @@ -1,5 +1,5 @@ -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" +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:128-n32" +target triple = "asmjs-unknown-emscripten" @.str = private unnamed_addr constant [15 x i8] c"hello, world!\0A\00", align 1 ; [#uses=1 type=[15 x i8]*] diff --git a/tests/cases/storestruct.ll b/tests/cases/storestruct.ll index 3e99619596a42..1bc0bffbd49eb 100644 --- a/tests/cases/storestruct.ll +++ b/tests/cases/storestruct.ll @@ -1,6 +1,6 @@ ; ModuleID = '/dev/shm/tmp/src.cpp.o' -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" +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:128-n32" +target triple = "asmjs-unknown-emscripten" ; Load and store an entire structure as a whole (and also load as a whole, extract values and save separately, etc.) diff --git a/tests/cases/structinparam.ll b/tests/cases/structinparam.ll index d81f5e672dc4a..93f486a085626 100644 --- a/tests/cases/structinparam.ll +++ b/tests/cases/structinparam.ll @@ -1,6 +1,6 @@ ; ModuleID = 'min.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" +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:128-n32" +target triple = "asmjs-unknown-emscripten" %ac = type { i8*, i32 } diff --git a/tests/cases/structphiparam.ll b/tests/cases/structphiparam.ll index fadf4d299cfcb..b5d05c17af8d8 100644 --- a/tests/cases/structphiparam.ll +++ b/tests/cases/structphiparam.ll @@ -1,6 +1,6 @@ ; ModuleID = '/dev/shm/tmp/src.cpp.o' -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" +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:128-n32" +target triple = "asmjs-unknown-emscripten" @.str = private unnamed_addr constant [15 x i8] c"hello, %d %d!\0A\00", align 1 ; [#uses=1 type=[15 x i8]*] @_dispatchTable = internal global i64 0 diff --git a/tests/cases/sub_11_0.ll b/tests/cases/sub_11_0.ll index d4094556930c0..59f70c7ff049e 100644 --- a/tests/cases/sub_11_0.ll +++ b/tests/cases/sub_11_0.ll @@ -1,6 +1,6 @@ ; 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" +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:128-n32" +target triple = "asmjs-unknown-emscripten" @.str = private unnamed_addr constant [15 x i8] c"hello, world!\0A\00", align 1 ; [#uses=1 type=[15 x i8]*] diff --git a/tests/cases/switch64_ta2.ll b/tests/cases/switch64_ta2.ll index 1a6d52f3aaa97..f30c078ffe9d9 100644 --- a/tests/cases/switch64_ta2.ll +++ b/tests/cases/switch64_ta2.ll @@ -1,5 +1,5 @@ -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" +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:128-n32" +target triple = "asmjs-unknown-emscripten" @.str = private constant [18 x i8] c"hello, world: %d\0A\00", align 1 diff --git a/tests/cases/switch64b_ta2.ll b/tests/cases/switch64b_ta2.ll index 4364725fc7839..beb644e04afb1 100644 --- a/tests/cases/switch64b_ta2.ll +++ b/tests/cases/switch64b_ta2.ll @@ -1,5 +1,5 @@ -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" +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:128-n32" +target triple = "asmjs-unknown-emscripten" @.str = private constant [18 x i8] c"hello, world: %d\0A\00", align 1 diff --git a/tests/cases/uadd_overflow_ta2.ll b/tests/cases/uadd_overflow_ta2.ll index e827cb38439e8..19c2908bb792a 100644 --- a/tests/cases/uadd_overflow_ta2.ll +++ b/tests/cases/uadd_overflow_ta2.ll @@ -1,6 +1,6 @@ ; 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" +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:128-n32" +target triple = "asmjs-unknown-emscripten" @.str2 = private constant [9 x i8] c"*%d,%d*\0A\00", align 1 ; [#uses=1] diff --git a/tests/cases/zeroembedded.ll b/tests/cases/zeroembedded.ll index 167fe278986f5..b1394893d861c 100644 --- a/tests/cases/zeroembedded.ll +++ b/tests/cases/zeroembedded.ll @@ -1,5 +1,5 @@ -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" +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:128-n32" +target triple = "asmjs-unknown-emscripten" %struct.pypy_str = type { i32, [0 x i8] } %struct.pypy_strval = type { i32, [13 x i8] } diff --git a/tests/cases/zeroextarg.ll b/tests/cases/zeroextarg.ll index a3caa74cdb03f..ff42741bdcfaf 100644 --- a/tests/cases/zeroextarg.ll +++ b/tests/cases/zeroextarg.ll @@ -1,6 +1,6 @@ ; 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" +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:128-n32" +target triple = "asmjs-unknown-emscripten" @.str = private unnamed_addr constant [15 x i8] c"hello, world!\0A\00", align 1 ; [#uses=1 type=[15 x i8]*] diff --git a/tests/cube_explosion.c b/tests/cube_explosion.c index 0c6eb674819b1..a899f068d38b9 100644 --- a/tests/cube_explosion.c +++ b/tests/cube_explosion.c @@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR REDISTRIBUTION OF THIS SOFTWARE. */ -#if !EMSCRIPTEN +#ifndef __EMSCRIPTEN__ #define USE_GLEW 1 #endif @@ -216,7 +216,7 @@ int main(int argc, char *argv[]) glDeleteTextures(1, &texture); assert(!glIsTexture(texture)); // but not anymore -#if !EMSCRIPTEN +#ifndef __EMSCRIPTEN__ SDL_Delay(1500); #endif diff --git a/tests/cubegeom.c b/tests/cubegeom.c index e749045b2ee86..950439ec5fb67 100644 --- a/tests/cubegeom.c +++ b/tests/cubegeom.c @@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR REDISTRIBUTION OF THIS SOFTWARE. */ -#if !EMSCRIPTEN +#ifndef __EMSCRIPTEN__ #define USE_GLEW 1 #endif @@ -316,7 +316,7 @@ int main(int argc, char *argv[]) SDL_GL_SwapBuffers(); -#if !EMSCRIPTEN +#ifndef __EMSCRIPTEN__ SDL_Delay(1500); #endif diff --git a/tests/cubegeom_color.c b/tests/cubegeom_color.c index ff30e1a9e7c83..0d2b6ecb4fde6 100644 --- a/tests/cubegeom_color.c +++ b/tests/cubegeom_color.c @@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR REDISTRIBUTION OF THIS SOFTWARE. */ -#if !EMSCRIPTEN +#ifndef __EMSCRIPTEN__ #define USE_GLEW 1 #endif @@ -38,7 +38,7 @@ void verify() { for (int x = 0; x < width*height*4; x++) { if (x % 4 != 3) sum += x * data[x]; } -#if EMSCRIPTEN +#ifdef __EMSCRIPTEN__ int result = sum; REPORT_RESULT(); #endif @@ -286,7 +286,7 @@ int main(int argc, char *argv[]) verify(); -#if !EMSCRIPTEN +#ifndef __EMSCRIPTEN__ SDL_Delay(1500); #endif diff --git a/tests/cubegeom_color2.c b/tests/cubegeom_color2.c index 76d71d00db90d..76bbb119ecb5b 100644 --- a/tests/cubegeom_color2.c +++ b/tests/cubegeom_color2.c @@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR REDISTRIBUTION OF THIS SOFTWARE. */ -#if !EMSCRIPTEN +#ifndef __EMSCRIPTEN__ #define USE_GLEW 1 #endif @@ -273,7 +273,7 @@ int main(int argc, char *argv[]) SDL_GL_SwapBuffers(); -#if !EMSCRIPTEN +#ifndef __EMSCRIPTEN__ SDL_Delay(1500); #endif diff --git a/tests/cubegeom_fog.c b/tests/cubegeom_fog.c index cae6ca2df19fd..50d2843be6549 100644 --- a/tests/cubegeom_fog.c +++ b/tests/cubegeom_fog.c @@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR REDISTRIBUTION OF THIS SOFTWARE. */ -#if !EMSCRIPTEN +#ifndef __EMSCRIPTEN__ #define USE_GLEW 1 #endif @@ -281,7 +281,7 @@ int main(int argc, char *argv[]) SDL_GL_SwapBuffers(); -#if !EMSCRIPTEN +#ifndef __EMSCRIPTEN__ SDL_Delay(1500); #endif diff --git a/tests/cubegeom_glew.c b/tests/cubegeom_glew.c index 210e1c60896b0..96f401c67522a 100644 --- a/tests/cubegeom_glew.c +++ b/tests/cubegeom_glew.c @@ -287,7 +287,7 @@ int main(int argc, char *argv[]) SDL_GL_SwapBuffers(); -#if !EMSCRIPTEN +#ifndef __EMSCRIPTEN__ SDL_Delay(1500); #endif diff --git a/tests/cubegeom_mt.c b/tests/cubegeom_mt.c index b4ad28a710940..cbfcbfdf27a2b 100644 --- a/tests/cubegeom_mt.c +++ b/tests/cubegeom_mt.c @@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR REDISTRIBUTION OF THIS SOFTWARE. */ -#if !EMSCRIPTEN +#ifndef __EMSCRIPTEN__ #define USE_GLEW 1 #endif @@ -274,7 +274,7 @@ int main(int argc, char *argv[]) SDL_GL_SwapBuffers(); -#if !EMSCRIPTEN +#ifndef __EMSCRIPTEN__ SDL_Delay(1500); #endif diff --git a/tests/cubegeom_normal.c b/tests/cubegeom_normal.c index 02655edff4a60..e56286fbd61c2 100644 --- a/tests/cubegeom_normal.c +++ b/tests/cubegeom_normal.c @@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR REDISTRIBUTION OF THIS SOFTWARE. */ -#if !EMSCRIPTEN +#ifndef __EMSCRIPTEN__ #define USE_GLEW 1 #endif @@ -269,7 +269,7 @@ int main(int argc, char *argv[]) SDL_GL_SwapBuffers(); -#if !EMSCRIPTEN +#ifndef __EMSCRIPTEN__ SDL_Delay(1500); #endif diff --git a/tests/cubegeom_normal_dap.c b/tests/cubegeom_normal_dap.c index 752911a8c82f0..594aec05629f2 100644 --- a/tests/cubegeom_normal_dap.c +++ b/tests/cubegeom_normal_dap.c @@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR REDISTRIBUTION OF THIS SOFTWARE. */ -#if !EMSCRIPTEN +#ifndef __EMSCRIPTEN__ #define USE_GLEW 1 #endif @@ -266,7 +266,7 @@ int main(int argc, char *argv[]) SDL_GL_SwapBuffers(); -#if !EMSCRIPTEN +#ifndef __EMSCRIPTEN__ SDL_Delay(1500); #endif diff --git a/tests/cubegeom_normal_dap_far.c b/tests/cubegeom_normal_dap_far.c index 35a068d9456c1..da28f77577732 100644 --- a/tests/cubegeom_normal_dap_far.c +++ b/tests/cubegeom_normal_dap_far.c @@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR REDISTRIBUTION OF THIS SOFTWARE. */ -#if !EMSCRIPTEN +#if !defined(__EMSCRIPTEN__) #define USE_GLEW 1 #endif @@ -263,7 +263,7 @@ int main(int argc, char *argv[]) SDL_GL_SwapBuffers(); -#if !EMSCRIPTEN +#if !defined(__EMSCRIPTEN__) SDL_Delay(1500); #endif diff --git a/tests/cubegeom_normal_dap_far_glda.c b/tests/cubegeom_normal_dap_far_glda.c index 849245b8e7ebf..ee38145876539 100644 --- a/tests/cubegeom_normal_dap_far_glda.c +++ b/tests/cubegeom_normal_dap_far_glda.c @@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR REDISTRIBUTION OF THIS SOFTWARE. */ -#if !EMSCRIPTEN +#ifndef __EMSCRIPTEN__ #define USE_GLEW 1 #endif @@ -254,7 +254,7 @@ int main(int argc, char *argv[]) SDL_GL_SwapBuffers(); -#if !EMSCRIPTEN +#ifndef __EMSCRIPTEN__ SDL_Delay(1500); #endif diff --git a/tests/cubegeom_normal_dap_far_glda_quad.c b/tests/cubegeom_normal_dap_far_glda_quad.c index 93c157a4c03ea..91f60031869a4 100644 --- a/tests/cubegeom_normal_dap_far_glda_quad.c +++ b/tests/cubegeom_normal_dap_far_glda_quad.c @@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR REDISTRIBUTION OF THIS SOFTWARE. */ -#if !EMSCRIPTEN +#ifndef __EMSCRIPTEN__ #define USE_GLEW 1 #endif @@ -254,7 +254,7 @@ int main(int argc, char *argv[]) SDL_GL_SwapBuffers(); -#if !EMSCRIPTEN +#ifndef __EMSCRIPTEN__ SDL_Delay(1500); #endif diff --git a/tests/cubegeom_normal_dap_far_range.c b/tests/cubegeom_normal_dap_far_range.c index 17691ce954f0a..3f041668eb62d 100644 --- a/tests/cubegeom_normal_dap_far_range.c +++ b/tests/cubegeom_normal_dap_far_range.c @@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR REDISTRIBUTION OF THIS SOFTWARE. */ -#if !EMSCRIPTEN +#ifndef __EMSCRIPTEN__ #define USE_GLEW 1 #endif @@ -263,7 +263,7 @@ int main(int argc, char *argv[]) SDL_GL_SwapBuffers(); -#if !EMSCRIPTEN +#ifndef __EMSCRIPTEN__ SDL_Delay(1500); #endif diff --git a/tests/cubegeom_pre.c b/tests/cubegeom_pre.c index 40b03cf72cae2..70e3435f7defc 100644 --- a/tests/cubegeom_pre.c +++ b/tests/cubegeom_pre.c @@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR REDISTRIBUTION OF THIS SOFTWARE. */ -#if !EMSCRIPTEN +#ifndef __EMSCRIPTEN__ #define USE_GLEW 1 #endif @@ -283,7 +283,7 @@ int main(int argc, char *argv[]) SDL_GL_SwapBuffers(); -#if !EMSCRIPTEN +#ifndef __EMSCRIPTEN__ SDL_Delay(1500); #endif diff --git a/tests/cubegeom_pre2.c b/tests/cubegeom_pre2.c index df04ae31044b3..88c825413278c 100644 --- a/tests/cubegeom_pre2.c +++ b/tests/cubegeom_pre2.c @@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR REDISTRIBUTION OF THIS SOFTWARE. */ -#if !EMSCRIPTEN +#ifndef __EMSCRIPTEN__ #define USE_GLEW 1 #endif @@ -322,7 +322,7 @@ int main(int argc, char *argv[]) SDL_GL_SwapBuffers(); -#if !EMSCRIPTEN +#ifndef __EMSCRIPTEN__ SDL_Delay(1500); #endif diff --git a/tests/cubegeom_pre2_vao.c b/tests/cubegeom_pre2_vao.c index 733c8fc60bba8..5abe1868e27a2 100644 --- a/tests/cubegeom_pre2_vao.c +++ b/tests/cubegeom_pre2_vao.c @@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR REDISTRIBUTION OF THIS SOFTWARE. */ -#if !EMSCRIPTEN +#ifndef __EMSCRIPTEN__ #define USE_GLEW 1 #endif @@ -354,7 +354,7 @@ int main(int argc, char *argv[]) SDL_GL_SwapBuffers(); -#if !EMSCRIPTEN +#ifndef __EMSCRIPTEN__ SDL_Delay(1500); #endif diff --git a/tests/cubegeom_pre2_vao2.c b/tests/cubegeom_pre2_vao2.c index 6909683341ea8..d2d55597583ed 100644 --- a/tests/cubegeom_pre2_vao2.c +++ b/tests/cubegeom_pre2_vao2.c @@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR REDISTRIBUTION OF THIS SOFTWARE. */ -#if !EMSCRIPTEN +#ifndef __EMSCRIPTEN__ #define USE_GLEW 1 #endif @@ -355,7 +355,7 @@ int main(int argc, char *argv[]) SDL_GL_SwapBuffers(); -#if !EMSCRIPTEN +#ifndef __EMSCRIPTEN__ SDL_Delay(1500); #endif diff --git a/tests/cubegeom_pre3.c b/tests/cubegeom_pre3.c index ceaa757e2ed51..81c8758946127 100644 --- a/tests/cubegeom_pre3.c +++ b/tests/cubegeom_pre3.c @@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR REDISTRIBUTION OF THIS SOFTWARE. */ -#if !EMSCRIPTEN +#ifndef __EMSCRIPTEN__ #define USE_GLEW 1 #endif @@ -322,7 +322,7 @@ int main(int argc, char *argv[]) SDL_GL_SwapBuffers(); -#if !EMSCRIPTEN +#ifndef __EMSCRIPTEN__ SDL_Delay(1500); #endif diff --git a/tests/cubegeom_pre_vao.c b/tests/cubegeom_pre_vao.c index 8c598143e8fa9..4f7adf9e4e4ec 100644 --- a/tests/cubegeom_pre_vao.c +++ b/tests/cubegeom_pre_vao.c @@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR REDISTRIBUTION OF THIS SOFTWARE. */ -#if !EMSCRIPTEN +#ifndef __EMSCRIPTEN__ #define USE_GLEW 1 #endif @@ -308,7 +308,7 @@ int main(int argc, char *argv[]) SDL_GL_SwapBuffers(); -#if !EMSCRIPTEN +#ifndef __EMSCRIPTEN__ SDL_Delay(1500); #endif diff --git a/tests/cubegeom_proc.c b/tests/cubegeom_proc.c index e80b9b31bd390..2dfe85ae314fc 100644 --- a/tests/cubegeom_proc.c +++ b/tests/cubegeom_proc.c @@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR REDISTRIBUTION OF THIS SOFTWARE. */ -#if !EMSCRIPTEN +#ifndef __EMSCRIPTEN__ #define USE_GLEW 1 #endif @@ -321,7 +321,7 @@ int main(int argc, char *argv[]) SDL_GL_SwapBuffers(); -#if !EMSCRIPTEN +#ifndef __EMSCRIPTEN__ SDL_Delay(1500); #endif diff --git a/tests/cubegeom_texturematrix.c b/tests/cubegeom_texturematrix.c index abb667eb258c6..218243441fa51 100644 --- a/tests/cubegeom_texturematrix.c +++ b/tests/cubegeom_texturematrix.c @@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR REDISTRIBUTION OF THIS SOFTWARE. */ -#if !EMSCRIPTEN +#ifndef __EMSCRIPTEN__ #define USE_GLEW 1 #endif @@ -287,7 +287,7 @@ int main(int argc, char *argv[]) SDL_GL_SwapBuffers(); -#if !EMSCRIPTEN +#ifndef __EMSCRIPTEN__ SDL_Delay(1500); #endif diff --git a/tests/embind/build_benchmark b/tests/embind/build_benchmark index 3d5d816b760d0..742394067a643 100644 --- a/tests/embind/build_benchmark +++ b/tests/embind/build_benchmark @@ -1,2 +1,2 @@ #!/bin/bash -EMCC_LLVM_TARGET=le32-unknown-nacl ../../emcc --minify 0 --bind --post-js embind.benchmark.js -O2 --shell-file shell.html -o embind_benchmark.html embind_benchmark.cpp +EMCC_LLVM_TARGET=asmjs-unknown-emscripten ../../emcc --minify 0 --bind --post-js embind.benchmark.js -O2 --shell-file shell.html -o embind_benchmark.html embind_benchmark.cpp diff --git a/tests/fuzz/11.c b/tests/fuzz/11.c new file mode 100644 index 0000000000000..5d5644fea119f --- /dev/null +++ b/tests/fuzz/11.c @@ -0,0 +1,1570 @@ +/* + * This is a RANDOMLY GENERATED PROGRAM. + * + * Generator: csmith 2.2.0 + * Git version: bf42ffd + * Options: --no-volatiles --no-packed-struct --no-math64 + * Seed: 3982457068 + */ + +#include "csmith.h" + + +static long __undefined; + +/* --- Struct/Union Declarations --- */ +struct S0 { + const int16_t f0; + uint16_t f1; + const uint16_t f2; + uint16_t f3; + const uint8_t f4; +}; + +struct S1 { + int8_t f0; + int32_t f1; + uint16_t f2; + struct S0 f3; + signed : 0; + uint16_t f4; +}; + +union U2 { + int32_t f0; + int8_t * f1; + uint16_t f2; +}; + +/* --- GLOBAL VARIABLES --- */ +static int8_t g_9 = 0L; +static int8_t *g_10 = &g_9; +static union U2 g_23 = {5L}; +static uint32_t g_27 = 0x763523E2L; +static int32_t g_29 = (-10L); +static int32_t *g_28[8] = {&g_29,&g_29,&g_29,&g_29,&g_29,&g_29,&g_29,&g_29}; +static int32_t g_33 = (-7L); +static int32_t g_82 = 0x6BCC6B82L; +static int16_t g_92 = 0x986BL; +static uint8_t g_94 = 0x71L; +static uint8_t g_96 = 9UL; +static const int32_t g_130[8][6] = {{0xBB608825L,0x2773D60BL,(-4L),(-1L),0x16DB7C97L,(-4L)},{0xB3C507C2L,0L,0x16DB7C97L,0x013F98BFL,0x16DB7C97L,0L},{(-1L),0x2773D60BL,1L,0x013F98BFL,0x2773D60BL,0x16DB7C97L},{0xB3C507C2L,0x16DB7C97L,1L,(-1L),0L,0L},{0xBB608825L,0x16DB7C97L,0x16DB7C97L,0xBB608825L,0x2773D60BL,(-4L)},{0xBB608825L,0x2773D60BL,(-4L),(-1L),0x16DB7C97L,(-4L)},{0xB3C507C2L,0L,8L,0x2773D60BL,8L,0x73286A6EL},{(-4L),1L,8L,0x2773D60BL,1L,8L}}; +static const int32_t g_132 = 0xBF8BA2E1L; +static const int32_t *g_131 = &g_132; +static const int32_t *g_133[1] = {&g_82}; +static int32_t g_140 = 1L; +static uint8_t g_141[6][7] = {{0x59L,0x4EL,0x2EL,0xA7L,0xDAL,247UL,0x90L},{246UL,1UL,0x97L,0x54L,247UL,0x54L,0x97L},{247UL,247UL,0xF6L,0xC5L,247UL,0x54L,0x38L},{0x0EL,0xF6L,0x38L,255UL,246UL,247UL,0x4EL},{0x54L,0x6EL,247UL,0x38L,247UL,0x6EL,0x54L},{0xDAL,0x54L,0x59L,0x38L,247UL,0x4EL,255UL}}; +static uint16_t *g_146 = &g_23.f2; +static struct S0 g_193 = {0L,0UL,65535UL,0x6792L,0xD8L}; +static struct S1 g_203 = {8L,-1L,65531UL,{-8L,0xE92DL,0x7043L,0x3039L,253UL},0xF5C3L}; +static struct S1 *g_202[5][10] = {{&g_203,(void*)0,&g_203,&g_203,&g_203,(void*)0,&g_203,&g_203,(void*)0,(void*)0},{&g_203,(void*)0,(void*)0,&g_203,&g_203,(void*)0,(void*)0,&g_203,(void*)0,&g_203},{(void*)0,(void*)0,&g_203,(void*)0,&g_203,(void*)0,&g_203,(void*)0,(void*)0,&g_203},{&g_203,(void*)0,&g_203,&g_203,(void*)0,(void*)0,&g_203,&g_203,(void*)0,&g_203},{(void*)0,(void*)0,(void*)0,&g_203,(void*)0,&g_203,(void*)0,&g_203,(void*)0,(void*)0}}; +static uint32_t g_275[6][3] = {{0xB93AAF63L,0xB93AAF63L,0xB93AAF63L},{0x949218ACL,0x949218ACL,0x949218ACL},{0xB93AAF63L,0xB93AAF63L,0xB93AAF63L},{0x949218ACL,0x949218ACL,0x949218ACL},{0xB93AAF63L,0xB93AAF63L,0xB93AAF63L},{0x949218ACL,0x949218ACL,0x949218ACL}}; +static int32_t *g_364 = &g_23.f0; +static int32_t **g_363 = &g_364; +static int32_t ***g_362[4][6] = {{(void*)0,&g_363,&g_363,&g_363,(void*)0,&g_363},{&g_363,(void*)0,&g_363,&g_363,(void*)0,&g_363},{(void*)0,&g_363,&g_363,(void*)0,&g_363,&g_363},{&g_363,(void*)0,&g_363,&g_363,&g_363,&g_363}}; +static int16_t g_367 = 0x405BL; +static int8_t g_368[9][8][3] = {{{0x36L,(-4L),0x84L},{3L,(-1L),0L},{0xADL,0x36L,0x84L},{(-1L),0x20L,3L},{8L,(-1L),8L},{1L,0x30L,(-6L)},{0L,0xE3L,0x5BL},{0x30L,0L,0xF6L}},{{(-1L),0x5BL,0xF7L},{0x30L,(-8L),1L},{0L,1L,1L},{1L,0xF6L,(-1L)},{8L,(-1L),0x6DL},{(-1L),0xE6L,0x8CL},{0xADL,(-9L),0x47L},{3L,1L,(-1L)}},{{(-1L),1L,8L},{0x8BL,0x8BL,1L},{0xADL,0x47L,0L},{0xC2L,1L,0x30L},{0L,(-8L),(-1L)},{0xFBL,0xC2L,0x30L},{0xF7L,(-9L),0L},{1L,(-1L),1L}},{{(-4L),0x5BL,8L},{0xE6L,0x0AL,(-1L)},{0x5BL,(-1L),0xADL},{(-1L),(-1L),3L},{0x5BL,0x6DL,0x36L},{0xE6L,0xF6L,0xF6L},{(-4L),0xADL,0x47L},{1L,(-1L),0L}},{{0xF7L,0xBDL,(-2L)},{0xFBL,0xCAL,0x8BL},{0L,0xBDL,(-8L)},{0xC2L,(-1L),0xE6L},{0xADL,0xADL,0xBDL},{0x8BL,0xF6L,(-6L)},{(-1L),0x6DL,(-1L)},{(-6L),(-1L),0xC2L}},{{0L,(-1L),(-1L)},{0x8CL,0x0AL,(-6L)},{0xBDL,0x5BL,0xBDL},{(-8L),(-1L),0xE6L},{8L,(-9L),(-8L)},{(-1L),0xC2L,0x8BL},{1L,(-8L),(-2L)},{(-1L),1L,0L}},{{8L,0x47L,0x47L},{(-8L),0x8BL,0xF6L},{0xBDL,1L,0x36L},{0x8CL,1L,3L},{0L,0x84L,0xADL},{(-6L),1L,(-1L)},{(-1L),1L,8L},{0x8BL,0x8BL,1L}},{{0xADL,0x47L,0L},{0xC2L,1L,0x30L},{0L,(-8L),(-1L)},{0xFBL,0xC2L,0x30L},{0xF7L,(-9L),0L},{1L,(-1L),1L},{(-4L),0x5BL,8L},{0xE6L,0x0AL,(-1L)}},{{0x5BL,(-1L),0xADL},{(-1L),(-1L),3L},{0x5BL,0x6DL,0x36L},{0xE6L,0xF6L,0xF6L},{(-4L),0xADL,0x47L},{1L,(-1L),0L},{0xF7L,0xBDL,(-2L)},{0xFBL,0xCAL,0x8BL}}}; +static struct S1 g_429[4][6][6] = {{{{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L},{0x0CL,0xF59095C9L,0x632BL,{1L,65528UL,0xAC68L,0UL,1UL},0UL},{0x0CL,0xF59095C9L,0x632BL,{1L,65528UL,0xAC68L,0UL,1UL},0UL},{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L},{-8L,0xEF94E310L,0xE17EL,{0xF561L,0xE7EFL,65535UL,0xF583L,255UL},0xF36CL},{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L}},{{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L},{-8L,0xEF94E310L,0xE17EL,{0xF561L,0xE7EFL,65535UL,0xF583L,255UL},0xF36CL},{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L},{0x0CL,0xF59095C9L,0x632BL,{1L,65528UL,0xAC68L,0UL,1UL},0UL},{0x0CL,0xF59095C9L,0x632BL,{1L,65528UL,0xAC68L,0UL,1UL},0UL},{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L}},{{0x3CL,0xDFB0633DL,65527UL,{8L,1UL,65530UL,0UL,2UL},0x7E5AL},{0x3CL,0xDFB0633DL,65527UL,{8L,1UL,65530UL,0UL,2UL},0x7E5AL},{0x0CL,0xF59095C9L,0x632BL,{1L,65528UL,0xAC68L,0UL,1UL},0UL},{7L,9L,0xCB7DL,{1L,0UL,0x1D7BL,0x4424L,0xF9L},0xC9D4L},{0x0CL,0xF59095C9L,0x632BL,{1L,65528UL,0xAC68L,0UL,1UL},0UL},{0x3CL,0xDFB0633DL,65527UL,{8L,1UL,65530UL,0UL,2UL},0x7E5AL}},{{0x0CL,0xF59095C9L,0x632BL,{1L,65528UL,0xAC68L,0UL,1UL},0UL},{-8L,0xEF94E310L,0xE17EL,{0xF561L,0xE7EFL,65535UL,0xF583L,255UL},0xF36CL},{-8L,0xEF94E310L,0xE17EL,{0xF561L,0xE7EFL,65535UL,0xF583L,255UL},0xF36CL},{-8L,0xEF94E310L,0xE17EL,{0xF561L,0xE7EFL,65535UL,0xF583L,255UL},0xF36CL},{0x3CL,0xDFB0633DL,65527UL,{8L,1UL,65530UL,0UL,2UL},0x7E5AL},{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L}},{{0x0CL,0xF59095C9L,0x632BL,{1L,65528UL,0xAC68L,0UL,1UL},0UL},{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L},{-8L,0xEF94E310L,0xE17EL,{0xF561L,0xE7EFL,65535UL,0xF583L,255UL},0xF36CL},{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L},{0x0CL,0xF59095C9L,0x632BL,{1L,65528UL,0xAC68L,0UL,1UL},0UL},{0x0CL,0xF59095C9L,0x632BL,{1L,65528UL,0xAC68L,0UL,1UL},0UL}},{{7L,9L,0xCB7DL,{1L,0UL,0x1D7BL,0x4424L,0xF9L},0xC9D4L},{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L},{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L},{7L,9L,0xCB7DL,{1L,0UL,0x1D7BL,0x4424L,0xF9L},0xC9D4L},{0x3CL,0xDFB0633DL,65527UL,{8L,1UL,65530UL,0UL,2UL},0x7E5AL},{7L,9L,0xCB7DL,{1L,0UL,0x1D7BL,0x4424L,0xF9L},0xC9D4L}}},{{{7L,9L,0xCB7DL,{1L,0UL,0x1D7BL,0x4424L,0xF9L},0xC9D4L},{0x3CL,0xDFB0633DL,65527UL,{8L,1UL,65530UL,0UL,2UL},0x7E5AL},{7L,9L,0xCB7DL,{1L,0UL,0x1D7BL,0x4424L,0xF9L},0xC9D4L},{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L},{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L},{7L,9L,0xCB7DL,{1L,0UL,0x1D7BL,0x4424L,0xF9L},0xC9D4L}},{{0x0CL,0xF59095C9L,0x632BL,{1L,65528UL,0xAC68L,0UL,1UL},0UL},{0x0CL,0xF59095C9L,0x632BL,{1L,65528UL,0xAC68L,0UL,1UL},0UL},{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L},{-8L,0xEF94E310L,0xE17EL,{0xF561L,0xE7EFL,65535UL,0xF583L,255UL},0xF36CL},{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L},{0x0CL,0xF59095C9L,0x632BL,{1L,65528UL,0xAC68L,0UL,1UL},0UL}},{{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L},{0x3CL,0xDFB0633DL,65527UL,{8L,1UL,65530UL,0UL,2UL},0x7E5AL},{-8L,0xEF94E310L,0xE17EL,{0xF561L,0xE7EFL,65535UL,0xF583L,255UL},0xF36CL},{-8L,0xEF94E310L,0xE17EL,{0xF561L,0xE7EFL,65535UL,0xF583L,255UL},0xF36CL},{0x3CL,0xDFB0633DL,65527UL,{8L,1UL,65530UL,0UL,2UL},0x7E5AL},{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L}},{{0x0CL,0xF59095C9L,0x632BL,{1L,65528UL,0xAC68L,0UL,1UL},0UL},{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L},{-8L,0xEF94E310L,0xE17EL,{0xF561L,0xE7EFL,65535UL,0xF583L,255UL},0xF36CL},{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L},{0x0CL,0xF59095C9L,0x632BL,{1L,65528UL,0xAC68L,0UL,1UL},0UL},{0x0CL,0xF59095C9L,0x632BL,{1L,65528UL,0xAC68L,0UL,1UL},0UL}},{{7L,9L,0xCB7DL,{1L,0UL,0x1D7BL,0x4424L,0xF9L},0xC9D4L},{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L},{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L},{7L,9L,0xCB7DL,{1L,0UL,0x1D7BL,0x4424L,0xF9L},0xC9D4L},{0x3CL,0xDFB0633DL,65527UL,{8L,1UL,65530UL,0UL,2UL},0x7E5AL},{7L,9L,0xCB7DL,{1L,0UL,0x1D7BL,0x4424L,0xF9L},0xC9D4L}},{{7L,9L,0xCB7DL,{1L,0UL,0x1D7BL,0x4424L,0xF9L},0xC9D4L},{0x3CL,0xDFB0633DL,65527UL,{8L,1UL,65530UL,0UL,2UL},0x7E5AL},{7L,9L,0xCB7DL,{1L,0UL,0x1D7BL,0x4424L,0xF9L},0xC9D4L},{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L},{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L},{7L,9L,0xCB7DL,{1L,0UL,0x1D7BL,0x4424L,0xF9L},0xC9D4L}}},{{{0x0CL,0xF59095C9L,0x632BL,{1L,65528UL,0xAC68L,0UL,1UL},0UL},{0x0CL,0xF59095C9L,0x632BL,{1L,65528UL,0xAC68L,0UL,1UL},0UL},{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L},{-8L,0xEF94E310L,0xE17EL,{0xF561L,0xE7EFL,65535UL,0xF583L,255UL},0xF36CL},{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L},{0x0CL,0xF59095C9L,0x632BL,{1L,65528UL,0xAC68L,0UL,1UL},0UL}},{{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L},{0x3CL,0xDFB0633DL,65527UL,{8L,1UL,65530UL,0UL,2UL},0x7E5AL},{-8L,0xEF94E310L,0xE17EL,{0xF561L,0xE7EFL,65535UL,0xF583L,255UL},0xF36CL},{-8L,0xEF94E310L,0xE17EL,{0xF561L,0xE7EFL,65535UL,0xF583L,255UL},0xF36CL},{0x3CL,0xDFB0633DL,65527UL,{8L,1UL,65530UL,0UL,2UL},0x7E5AL},{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L}},{{0x0CL,0xF59095C9L,0x632BL,{1L,65528UL,0xAC68L,0UL,1UL},0UL},{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L},{-8L,0xEF94E310L,0xE17EL,{0xF561L,0xE7EFL,65535UL,0xF583L,255UL},0xF36CL},{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L},{0x0CL,0xF59095C9L,0x632BL,{1L,65528UL,0xAC68L,0UL,1UL},0UL},{0x0CL,0xF59095C9L,0x632BL,{1L,65528UL,0xAC68L,0UL,1UL},0UL}},{{7L,9L,0xCB7DL,{1L,0UL,0x1D7BL,0x4424L,0xF9L},0xC9D4L},{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L},{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L},{7L,9L,0xCB7DL,{1L,0UL,0x1D7BL,0x4424L,0xF9L},0xC9D4L},{0x3CL,0xDFB0633DL,65527UL,{8L,1UL,65530UL,0UL,2UL},0x7E5AL},{7L,9L,0xCB7DL,{1L,0UL,0x1D7BL,0x4424L,0xF9L},0xC9D4L}},{{7L,9L,0xCB7DL,{1L,0UL,0x1D7BL,0x4424L,0xF9L},0xC9D4L},{0x3CL,0xDFB0633DL,65527UL,{8L,1UL,65530UL,0UL,2UL},0x7E5AL},{7L,9L,0xCB7DL,{1L,0UL,0x1D7BL,0x4424L,0xF9L},0xC9D4L},{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L},{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L},{7L,9L,0xCB7DL,{1L,0UL,0x1D7BL,0x4424L,0xF9L},0xC9D4L}},{{0x0CL,0xF59095C9L,0x632BL,{1L,65528UL,0xAC68L,0UL,1UL},0UL},{0x0CL,0xF59095C9L,0x632BL,{1L,65528UL,0xAC68L,0UL,1UL},0UL},{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L},{-8L,0xEF94E310L,0xE17EL,{0xF561L,0xE7EFL,65535UL,0xF583L,255UL},0xF36CL},{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L},{0x0CL,0xF59095C9L,0x632BL,{1L,65528UL,0xAC68L,0UL,1UL},0UL}}},{{{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L},{0x3CL,0xDFB0633DL,65527UL,{8L,1UL,65530UL,0UL,2UL},0x7E5AL},{-8L,0xEF94E310L,0xE17EL,{0xF561L,0xE7EFL,65535UL,0xF583L,255UL},0xF36CL},{-8L,0xEF94E310L,0xE17EL,{0xF561L,0xE7EFL,65535UL,0xF583L,255UL},0xF36CL},{0x3CL,0xDFB0633DL,65527UL,{8L,1UL,65530UL,0UL,2UL},0x7E5AL},{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L}},{{0x0CL,0xF59095C9L,0x632BL,{1L,65528UL,0xAC68L,0UL,1UL},0UL},{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L},{-8L,0xEF94E310L,0xE17EL,{0xF561L,0xE7EFL,65535UL,0xF583L,255UL},0xF36CL},{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L},{0x0CL,0xF59095C9L,0x632BL,{1L,65528UL,0xAC68L,0UL,1UL},0UL},{0x0CL,0xF59095C9L,0x632BL,{1L,65528UL,0xAC68L,0UL,1UL},0UL}},{{7L,9L,0xCB7DL,{1L,0UL,0x1D7BL,0x4424L,0xF9L},0xC9D4L},{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L},{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L},{7L,9L,0xCB7DL,{1L,0UL,0x1D7BL,0x4424L,0xF9L},0xC9D4L},{0x3CL,0xDFB0633DL,65527UL,{8L,1UL,65530UL,0UL,2UL},0x7E5AL},{7L,9L,0xCB7DL,{1L,0UL,0x1D7BL,0x4424L,0xF9L},0xC9D4L}},{{7L,9L,0xCB7DL,{1L,0UL,0x1D7BL,0x4424L,0xF9L},0xC9D4L},{0x3CL,0xDFB0633DL,65527UL,{8L,1UL,65530UL,0UL,2UL},0x7E5AL},{7L,9L,0xCB7DL,{1L,0UL,0x1D7BL,0x4424L,0xF9L},0xC9D4L},{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L},{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L},{7L,9L,0xCB7DL,{1L,0UL,0x1D7BL,0x4424L,0xF9L},0xC9D4L}},{{0x0CL,0xF59095C9L,0x632BL,{1L,65528UL,0xAC68L,0UL,1UL},0UL},{0x0CL,0xF59095C9L,0x632BL,{1L,65528UL,0xAC68L,0UL,1UL},0UL},{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L},{-8L,0xEF94E310L,0xE17EL,{0xF561L,0xE7EFL,65535UL,0xF583L,255UL},0xF36CL},{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L},{0x0CL,0xF59095C9L,0x632BL,{1L,65528UL,0xAC68L,0UL,1UL},0UL}},{{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L},{0x3CL,0xDFB0633DL,65527UL,{8L,1UL,65530UL,0UL,2UL},0x7E5AL},{-8L,0xEF94E310L,0xE17EL,{0xF561L,0xE7EFL,65535UL,0xF583L,255UL},0xF36CL},{-8L,0xEF94E310L,0xE17EL,{0xF561L,0xE7EFL,65535UL,0xF583L,255UL},0xF36CL},{0x3CL,0xDFB0633DL,65527UL,{8L,1UL,65530UL,0UL,2UL},0x7E5AL},{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L}}}}; +static int8_t g_448 = (-3L); +static uint32_t g_491 = 9UL; +static uint16_t *g_522 = &g_203.f3.f1; +static struct S0 g_663 = {0xB058L,0xD411L,0UL,0x1BCDL,4UL}; +static int32_t *g_688 = &g_82; +static uint32_t g_709[9][3] = {{0xF128B38DL,0xF128B38DL,0xF128B38DL},{1UL,1UL,1UL},{0xF128B38DL,0xF128B38DL,0xF128B38DL},{1UL,1UL,1UL},{0xF128B38DL,0xF128B38DL,0xF128B38DL},{1UL,1UL,1UL},{0xF128B38DL,0xF128B38DL,0xF128B38DL},{1UL,1UL,1UL},{0xF128B38DL,0xF128B38DL,0xF128B38DL}}; +static uint8_t * const g_713 = &g_94; +static uint8_t * const * const g_712 = &g_713; +static uint32_t **g_737 = (void*)0; +static struct S0 *g_803 = (void*)0; +static struct S0 **g_802 = &g_803; +static int8_t g_870 = 0xBAL; +static int32_t g_902 = 0L; +static uint32_t g_1001 = 0xCE9223C1L; +static const union U2 g_1007 = {-1L}; +static const union U2 *g_1006 = &g_1007; +static int8_t *g_1010 = &g_429[3][2][4].f0; +static union U2 *g_1059 = (void*)0; +static union U2 **g_1058 = &g_1059; +static uint8_t *g_1153 = &g_96; +static const int8_t ***g_1346 = (void*)0; +static uint32_t g_1359 = 6UL; +static uint32_t g_1361 = 0UL; +static uint8_t **g_1455 = &g_1153; +static int8_t g_1473[9] = {0x70L,0x70L,0x70L,0x70L,0x70L,0x70L,0x70L,0x70L,0x70L}; +static uint32_t g_1474 = 0x2827E164L; +static uint32_t g_1492 = 0x98C6FA4DL; +static uint32_t *g_1707 = (void*)0; +static uint32_t * const *g_1706 = &g_1707; +static const int32_t g_1725 = 0xA265A2AFL; +static uint32_t ****g_1766 = (void*)0; +static int16_t g_1798 = 0xD17FL; +static struct S1 ** const g_1899 = (void*)0; +static const uint32_t *g_1931[2] = {(void*)0,(void*)0}; +static const uint32_t **g_1930 = &g_1931[0]; +static const int32_t *g_1949 = &g_132; +static int32_t ****g_2039 = &g_362[0][3]; +static uint32_t g_2122 = 18446744073709551612UL; +static int16_t *g_2213[9][3][4] = {{{&g_92,&g_1798,&g_92,(void*)0},{(void*)0,&g_367,(void*)0,&g_92},{&g_92,&g_367,&g_1798,&g_1798}},{{&g_1798,&g_1798,&g_367,&g_367},{(void*)0,&g_92,&g_367,&g_92},{&g_1798,(void*)0,&g_1798,(void*)0}},{{&g_92,&g_1798,(void*)0,(void*)0},{(void*)0,&g_1798,&g_367,(void*)0},{&g_92,&g_1798,&g_1798,&g_367}},{{&g_1798,&g_1798,&g_1798,(void*)0},{&g_92,&g_367,&g_1798,&g_1798},{&g_1798,&g_1798,&g_92,&g_92}},{{(void*)0,(void*)0,(void*)0,&g_1798},{&g_92,&g_92,&g_1798,(void*)0},{&g_1798,&g_367,&g_1798,&g_1798}},{{&g_367,&g_367,&g_1798,(void*)0},{&g_367,&g_92,(void*)0,&g_1798},{&g_92,(void*)0,(void*)0,&g_92}},{{&g_367,&g_1798,&g_1798,&g_1798},{(void*)0,&g_367,&g_1798,(void*)0},{&g_1798,&g_1798,&g_92,&g_367}},{{(void*)0,&g_1798,(void*)0,(void*)0},{&g_1798,&g_1798,(void*)0,&g_1798},{&g_92,(void*)0,&g_92,&g_1798}},{{(void*)0,&g_1798,&g_92,(void*)0},{&g_1798,&g_92,&g_367,(void*)0},{&g_1798,&g_367,&g_92,&g_92}}}; +static int16_t * const *g_2212 = &g_2213[8][2][2]; +static int16_t g_2341 = 0x2E6AL; +static union U2 ***g_2562 = &g_1058; +static union U2 ****g_2561 = &g_2562; +static uint32_t g_2575 = 0xBF53EBB2L; +static struct S0 g_2686 = {1L,0UL,1UL,65529UL,0UL}; +static struct S0 *g_2718[3][2] = {{(void*)0,(void*)0},{(void*)0,(void*)0},{(void*)0,(void*)0}}; +static uint8_t ***g_2741 = &g_1455; +static const int32_t *g_2749 = &g_1007.f0; +static const int32_t **g_2748 = &g_2749; +static const int32_t ***g_2747 = &g_2748; +static uint32_t g_2898 = 18446744073709551615UL; + + +/* --- FORWARD DECLARATIONS --- */ +static uint16_t func_1(void); +static int32_t * func_2(int8_t * p_3); +static int8_t * func_4(uint32_t p_5, int8_t * p_6, int8_t * p_7); +static int8_t * func_11(uint8_t p_12, int32_t * p_13, struct S0 p_14, int32_t * p_15); +static int32_t * func_16(struct S1 p_17, uint32_t p_18, int8_t * p_19, union U2 p_20); +static int32_t func_34(int8_t * p_35, int8_t * p_36, uint16_t p_37); +static int8_t * func_38(int32_t * p_39); +static union U2 func_40(int32_t * p_41, int8_t * p_42, struct S0 p_43, int32_t p_44); +static int32_t * func_45(int8_t * const p_46, int32_t * p_47, int8_t * p_48); +static int32_t * func_50(uint32_t p_51, int8_t p_52, int8_t p_53, int8_t * p_54, const int32_t p_55); + + +/* --- FUNCTIONS --- */ +/* ------------------------------------------ */ +/* + * reads : g_10 g_23 g_27 g_28 g_29 g_33 g_688 g_82 g_1006 g_522 g_203.f3.f1 g_713 g_146 g_23.f2 g_9 g_448 g_23.f0 g_193 g_130 g_96 g_202 g_94 g_140 g_132 g_141 g_275 g_203.f3.f0 g_203.f3.f4 g_362 g_367 g_203.f1 g_368 g_802 g_803 g_491 g_1725 g_712 g_203.f3.f3 g_902 g_1359 g_1058 g_2341 g_1153 g_1059 g_663.f1 g_1455 g_1492 g_2561 g_1949 g_203.f4 g_2575 g_1010 g_429.f0 g_131 g_2562 g_870 g_92 g_2741 g_2898 g_709 + * writes: g_27 g_28 g_29 g_33 g_82 g_23 g_94 g_1010 g_202 g_203.f1 g_92 g_275 g_448 g_203.f0 g_96 g_141 g_193.f3 g_9 g_663.f1 g_803 g_491 g_367 g_2212 g_203.f3.f1 g_2039 g_203.f3.f3 g_902 g_2213 g_1359 g_1059 g_688 g_1492 g_131 g_203.f4 g_2575 g_737 g_2562 g_10 g_870 g_2898 g_429.f0 + */ +static uint16_t func_1(void) +{ /* block id: 0 */ + int8_t *l_8[3]; + struct S1 l_21 = {0xF7L,-1L,0x9D9EL,{1L,0x422DL,0xFBA2L,0UL,0xBFL},0xC2F5L}; + int32_t l_22 = 0xB6930509L; + int32_t *l_30 = &l_22; + int32_t *l_31 = &g_29; + int8_t **l_2633[1][9][5] = {{{(void*)0,(void*)0,&g_10,&g_10,&g_10},{&l_8[0],&l_8[0],&l_8[0],&l_8[2],&g_1010},{&g_10,(void*)0,(void*)0,&l_8[2],&l_8[1]},{&l_8[0],&l_8[0],&l_8[0],&l_8[0],&l_8[0]},{&l_8[0],&l_8[0],(void*)0,&l_8[1],(void*)0},{&l_8[0],&g_10,&l_8[0],&g_10,&l_8[0]},{&l_8[0],&l_8[2],&g_10,&l_8[1],&l_8[1]},{(void*)0,&g_10,&l_8[0],&l_8[0],&g_10},{&g_10,(void*)0,&l_8[0],&l_8[2],&l_8[1]}}}; + int8_t *l_2634 = &g_203.f0; + int32_t **l_2857 = &l_30; + int16_t l_2858[2][2]; + int32_t l_2861 = 0x6E8C1F75L; + int32_t l_2862 = (-1L); + int32_t l_2863 = 0x3B8928E0L; + int32_t l_2864 = 0L; + int8_t l_2865[8][9] = {{0x42L,0x42L,0x42L,0x42L,0x42L,0x42L,0x42L,0x42L,0x42L},{0x92L,0L,0x92L,0L,0x92L,0L,0x92L,0L,0x92L},{0x42L,0x42L,0x42L,0x42L,0x42L,0x42L,0x42L,0x42L,0x42L},{0x92L,0L,0x92L,0L,0x92L,0L,0x92L,0L,0x92L},{0x42L,0x42L,0x42L,0x42L,0x42L,0x42L,0x42L,0x42L,0x42L},{0x92L,0L,0x92L,0L,0x92L,0L,0x92L,0L,0x92L},{0x42L,0x42L,0x42L,0x42L,0x42L,0x42L,0x42L,0x42L,0x42L},{0x92L,0L,0x92L,0L,0x92L,0L,0x92L,0L,0x92L}}; + int32_t l_2866[7][5] = {{1L,3L,(-8L),(-1L),3L},{0L,3L,(-7L),(-7L),3L},{1L,0L,(-7L),(-1L),0L},{1L,3L,(-8L),(-1L),3L},{0L,3L,(-7L),(-7L),3L},{1L,0L,(-7L),(-1L),0L},{1L,3L,(-8L),(-1L),3L}}; + uint32_t l_2868 = 6UL; + uint32_t **l_2888[1][6][4] = {{{(void*)0,&g_1707,(void*)0,&g_1707},{&g_1707,(void*)0,&g_1707,&g_1707},{(void*)0,(void*)0,&g_1707,&g_1707},{&g_1707,&g_1707,(void*)0,(void*)0},{(void*)0,(void*)0,&g_1707,(void*)0},{&g_1707,(void*)0,(void*)0,(void*)0}}}; + int32_t l_2889 = (-8L); + int16_t l_2890 = 0x4B0FL; + uint32_t l_2893 = 0x1C1D9EF6L; + struct S0 **l_2894[8][7][1] = {{{&g_2718[2][0]},{&g_2718[2][0]},{&g_2718[2][0]},{&g_803},{&g_803},{&g_2718[2][0]},{&g_2718[2][0]}},{{&g_2718[2][0]},{&g_803},{&g_803},{&g_2718[2][0]},{&g_2718[2][0]},{&g_2718[2][0]},{&g_803}},{{&g_803},{&g_2718[2][0]},{&g_2718[2][0]},{&g_2718[2][0]},{&g_803},{&g_803},{&g_2718[2][0]}},{{&g_2718[2][0]},{&g_2718[2][0]},{&g_803},{&g_803},{&g_2718[2][0]},{&g_2718[2][0]},{&g_2718[2][0]}},{{&g_803},{&g_803},{&g_2718[2][0]},{&g_2718[2][0]},{&g_2718[2][0]},{&g_803},{&g_803}},{{&g_2718[2][0]},{&g_2718[2][0]},{&g_2718[2][0]},{&g_803},{&g_803},{&g_2718[2][0]},{&g_2718[2][0]}},{{&g_2718[2][0]},{&g_803},{&g_803},{&g_2718[2][0]},{&g_2718[2][0]},{&g_2718[2][0]},{&g_803}},{{&g_803},{&g_2718[2][0]},{&g_2718[2][0]},{&g_2718[2][0]},{&g_803},{&g_803},{&g_2718[2][0]}}}; + const int32_t **l_2916 = &g_131; + int32_t l_2917 = 0x0EA97E1BL; + int i, j, k; + for (i = 0; i < 3; i++) + l_8[i] = &g_9; + for (i = 0; i < 2; i++) + { + for (j = 0; j < 2; j++) + l_2858[i][j] = 0xD331L; + } + (*l_2857) = func_2((l_2634 = (g_10 = func_4(((l_8[0] == &g_9) & 0L), g_10, func_11((((g_28[4] = func_16(l_21, l_22, l_8[0], g_23)) != l_30) , 246UL), &g_29, l_21.f3, l_31))))); + for (g_92 = 0; (g_92 <= 2); g_92 += 1) + { /* block id: 1369 */ + int32_t *l_2859 = &g_33; + int32_t *l_2860[7]; + int8_t l_2867 = 1L; + int32_t l_2891 = 0x72B71305L; + const int32_t l_2892 = 0x51C3213CL; + struct S0 ***l_2895 = &l_2894[7][4][0]; + struct S0 l_2907 = {9L,0xF377L,0x63B9L,0x3BAFL,0UL}; + uint32_t l_2910[1][4]; + uint16_t l_2914[10] = {3UL,3UL,3UL,3UL,3UL,3UL,3UL,3UL,3UL,3UL}; + int i, j; + for (i = 0; i < 7; i++) + l_2860[i] = &g_33; + for (i = 0; i < 1; i++) + { + for (j = 0; j < 4; j++) + l_2910[i][j] = 0x60BEB07CL; + } + --l_2868; + if ((**l_2857)) + break; + l_2864 &= (safe_lshift_func_int16_t_s_s((safe_div_func_uint16_t_u_u(((l_2890 |= ((((***g_2741) ^ (((safe_rshift_func_uint8_t_u_s(((((safe_lshift_func_int8_t_s_s(0xB5L, ((safe_lshift_func_uint8_t_u_s((safe_unary_minus_func_uint8_t_u(0UL)), (safe_add_func_uint16_t_u_u((0x77B217B0L >= (*l_30)), (safe_lshift_func_uint8_t_u_s(7UL, 0)))))) > (!(*l_31))))) != (((safe_rshift_func_uint8_t_u_u(((((*l_2859) & (((*l_2859) > 0x42ED6365L) == 1L)) , &g_1707) != l_2888[0][3][2]), (*g_1153))) > (-1L)) == 0x52L)) < (*g_1153)) < (*l_2859)), 0)) == 0L) | l_2889)) , (void*)0) == l_31)) , l_2891), l_2892)), l_2893)); + (*l_2895) = l_2894[7][4][0]; + for (g_1359 = 0; (g_1359 <= 2); g_1359 += 1) + { /* block id: 1377 */ + int32_t l_2896 = 0x735C2B59L; + int32_t l_2897[2][1][5] = {{{0x220C6B73L,0x220C6B73L,0x220C6B73L,0x220C6B73L,0x220C6B73L}},{{7L,7L,7L,7L,7L}}}; + int16_t *l_2911 = &g_367; + int32_t l_2915 = 0xA181D5A4L; + int i, j, k; + g_2898--; + (*l_2859) ^= (safe_add_func_uint16_t_u_u(((g_709[(g_1359 + 4)][g_1359] < g_203.f4) >= ((safe_add_func_uint32_t_u_u(((*g_146) == (&g_1707 == (l_2907 , l_2888[0][3][2]))), (((*g_1010) = ((safe_sub_func_int16_t_s_s(((*l_2911) ^= (l_2910[0][2] != g_709[(g_1359 + 4)][g_1359])), (l_2914[5] = (safe_mod_func_int32_t_s_s(((l_2897[0][0][3] | l_2897[1][0][1]) , (*g_1949)), (-1L)))))) < 7L)) ^ l_2915))) >= 4294967293UL)), 0x562AL)); + } + } + (*l_2916) = &g_130[3][5]; + return l_2917; +} + + +/* ------------------------------------------ */ +/* + * reads : g_203.f4 g_368 g_2561 g_2562 g_1058 g_902 g_522 g_203.f3.f1 g_96 g_29 g_870 g_193.f3 + * writes: g_203.f4 g_902 g_96 g_29 g_870 g_193.f3 + */ +static int32_t * func_2(int8_t * p_3) +{ /* block id: 1266 */ + uint16_t l_2646 = 0UL; + union U2 * const *l_2680[10]; + union U2 * const **l_2679 = &l_2680[2]; + int32_t l_2717 = 0x771D7A8EL; + uint32_t ***** const l_2724 = &g_1766; + int32_t l_2787[8][5][6] = {{{(-10L),0xF9A7B154L,(-5L),0x9BBB8C36L,(-1L),0x08AF0ED7L},{(-6L),0x86CA5DE9L,1L,3L,3L,1L},{0x86CA5DE9L,0x86CA5DE9L,0x491AC390L,(-6L),(-1L),(-1L)},{1L,0xF9A7B154L,1L,0x3E0CF12FL,(-5L),0x491AC390L},{0x9BBB8C36L,1L,1L,7L,0x86CA5DE9L,(-1L)}},{{2L,7L,0x491AC390L,3L,(-10L),1L},{3L,(-10L),1L,3L,0x3E0CF12FL,0x08AF0ED7L},{2L,3L,(-5L),0x91A2E884L,0x30B718DFL,(-6L)},{0x30B718DFL,0xF241A0ADL,2L,0xF241A0ADL,0x30B718DFL,(-1L)},{0x743F44F9L,0xD802313DL,(-5L),0L,0xF241A0ADL,0x3E0CF12FL}},{{0x8A63E951L,(-7L),(-10L),0xD802313DL,(-7L),0x3E0CF12FL},{0L,0x91A2E884L,(-5L),0x30B718DFL,0x8A63E951L,(-1L)},{(-7L),0x743F44F9L,2L,0x8A63E951L,0x0F0E2B35L,(-6L)},{(-7L),(-1L),0x3E0CF12FL,0x30B718DFL,(-5L),0xF9A7B154L},{0L,0x8A63E951L,3L,0xD802313DL,0xD802313DL,3L}},{{0x8A63E951L,0x8A63E951L,1L,0L,(-5L),(-10L)},{0x743F44F9L,(-1L),3L,0xF241A0ADL,0x0F0E2B35L,1L},{0x30B718DFL,0x743F44F9L,3L,0x91A2E884L,0x8A63E951L,(-10L)},{0x1D6DE8D3L,0x91A2E884L,1L,0L,(-7L),3L},{0L,(-7L),3L,0L,0xF241A0ADL,0xF9A7B154L}},{{0x1D6DE8D3L,0xD802313DL,0x3E0CF12FL,0x91A2E884L,0x30B718DFL,(-6L)},{0x30B718DFL,0xF241A0ADL,2L,0xF241A0ADL,0x30B718DFL,(-1L)},{0x743F44F9L,0xD802313DL,(-5L),0L,0xF241A0ADL,0x3E0CF12FL},{0x8A63E951L,(-7L),(-10L),0xD802313DL,(-7L),0x3E0CF12FL},{0L,0x91A2E884L,(-5L),0x30B718DFL,0x8A63E951L,(-1L)}},{{(-7L),0x743F44F9L,2L,0x8A63E951L,0x0F0E2B35L,(-6L)},{(-7L),(-1L),0x3E0CF12FL,0x30B718DFL,(-5L),0xF9A7B154L},{0L,0x8A63E951L,3L,0xD802313DL,0xD802313DL,3L},{0x8A63E951L,0x8A63E951L,1L,0L,(-5L),(-10L)},{0x743F44F9L,(-1L),3L,0xF241A0ADL,0x0F0E2B35L,1L}},{{0x30B718DFL,0x743F44F9L,3L,0x91A2E884L,0x8A63E951L,(-10L)},{0x1D6DE8D3L,0x91A2E884L,1L,0L,(-7L),3L},{0L,(-7L),3L,0L,0xF241A0ADL,0xF9A7B154L},{0x1D6DE8D3L,0xD802313DL,0x3E0CF12FL,0x91A2E884L,0x30B718DFL,(-6L)},{0x30B718DFL,0xF241A0ADL,2L,0xF241A0ADL,0x30B718DFL,(-1L)}},{{0x743F44F9L,0xD802313DL,(-5L),0L,0xF241A0ADL,0x3E0CF12FL},{0x8A63E951L,(-7L),(-10L),0xD802313DL,(-7L),0x3E0CF12FL},{0L,0x91A2E884L,(-5L),0x30B718DFL,0x8A63E951L,(-1L)},{(-7L),0x743F44F9L,2L,0x8A63E951L,0x0F0E2B35L,(-6L)},{(-7L),0x05AD1AD2L,0xF241A0ADL,1L,(-4L),(-1L)}}}; + int16_t l_2789 = 0x673BL; + int32_t l_2841 = 0x2CD58772L; + int8_t l_2852 = 0L; + int i, j, k; + for (i = 0; i < 10; i++) + l_2680[i] = &g_1059; + for (g_203.f4 = 0; (g_203.f4 != 20); g_203.f4++) + { /* block id: 1269 */ + int32_t l_2643 = 1L; + int32_t * const l_2644 = &g_902; + union U2 l_2645 = {0x1AA6AB60L}; + (*l_2644) = (g_368[5][5][0] ^ (safe_lshift_func_uint16_t_u_u(((safe_lshift_func_uint16_t_u_s((safe_mod_func_uint8_t_u_u(((l_2643 , l_2644) != &g_130[0][5]), 0x95L)), 9)) ^ (+(((l_2645 , (**g_2561)) != (*g_2562)) != (*l_2644)))), (*g_522)))); + } + l_2646 &= 0xAF285910L; + for (g_96 = (-5); (g_96 > 36); g_96 = safe_add_func_int32_t_s_s(g_96, 3)) + { /* block id: 1275 */ + int32_t *l_2649 = &g_29; + uint32_t *l_2658 = &g_1474; + struct S0 l_2659 = {0x69D3L,0x6483L,65534UL,65535UL,0xDBL}; + union U2 l_2660[6][6] = {{{0x33AAE0C5L},{1L},{-1L},{-1L},{1L},{0x33AAE0C5L}},{{1L},{0x33AAE0C5L},{0x8D8CFE7FL},{1L},{0x8D8CFE7FL},{0x33AAE0C5L}},{{0x8D8CFE7FL},{1L},{-1L},{0xFE9A6640L},{0xFE9A6640L},{-1L}},{{0x8D8CFE7FL},{0x8D8CFE7FL},{0xFE9A6640L},{1L},{0x044F48E9L},{1L}},{{1L},{0x8D8CFE7FL},{1L},{-1L},{0xFE9A6640L},{0xFE9A6640L}},{{0x33AAE0C5L},{1L},{1L},{0x33AAE0C5L},{0x8D8CFE7FL},{1L}}}; + struct S0 *l_2685 = &g_2686; + uint8_t ** const *l_2765 = (void*)0; + uint8_t l_2822 = 0x03L; + int32_t l_2847 = 0x610288B5L; + int32_t l_2848 = 0x0907996FL; + int8_t l_2849 = 6L; + int32_t l_2850 = 0xE1502438L; + uint8_t l_2856 = 0x00L; + int i, j; + (*l_2649) ^= (l_2660[4][5] , (-2L)); + for (g_870 = 0; (g_870 >= 1); g_870 = safe_add_func_int8_t_s_s(g_870, 3)) + { /* block id: 1280 */ + union U2 ***l_2681[4]; + uint16_t l_2684 = 65534UL; + int32_t l_2733 = 0x838200D5L; + uint8_t l_2812 = 0xADL; + int32_t *l_2842 = &l_2733; + int32_t *l_2843 = &g_902; + int32_t *l_2844 = &l_2733; + int32_t *l_2845 = &l_2787[4][1][3]; + int32_t *l_2846[9]; + int16_t l_2851 = 0x13C2L; + uint32_t l_2853[1]; + int i; + for (i = 0; i < 4; i++) + l_2681[i] = &g_1058; + for (i = 0; i < 9; i++) + l_2846[i] = &l_2717; + for (i = 0; i < 1; i++) + l_2853[i] = 0xA045A241L; + for (g_193.f3 = 0; (g_193.f3 <= 0); g_193.f3 += 1) + { /* block id: 1283 */ + struct S0 *l_2664[7][10] = {{&g_193,(void*)0,&g_193,(void*)0,&g_193,(void*)0,&g_193,(void*)0,&g_193,(void*)0},{&g_193,(void*)0,&g_193,(void*)0,&g_193,(void*)0,&g_193,(void*)0,&g_193,(void*)0},{&g_193,(void*)0,&g_193,(void*)0,&g_193,(void*)0,&g_193,(void*)0,&g_193,(void*)0},{&g_193,(void*)0,&g_193,(void*)0,&g_193,(void*)0,&g_193,(void*)0,&g_193,(void*)0},{&g_193,(void*)0,&g_193,(void*)0,&g_193,(void*)0,&g_193,(void*)0,&g_193,(void*)0},{&g_193,(void*)0,&g_193,(void*)0,&g_193,(void*)0,&g_193,(void*)0,&g_193,(void*)0},{&g_193,(void*)0,&g_193,(void*)0,&g_193,(void*)0,&g_193,(void*)0,&g_193,(void*)0}}; + union U2 l_2687 = {6L}; + const union U2 **l_2699 = &g_1006; + int32_t l_2704 = (-1L); + uint32_t *** const **l_2725 = (void*)0; + int8_t *l_2755 = (void*)0; + uint8_t *l_2788 = &g_141[2][3]; + int16_t l_2790 = 0L; + int32_t l_2820 = (-8L); + int i, j; + } + ++l_2853[0]; + } + if (l_2852) + break; + l_2856 ^= l_2787[1][4][0]; + } + l_2717 ^= l_2787[1][4][0]; + return &g_902; +} + + +/* ------------------------------------------ */ +/* + * reads : + * writes: + */ +static int8_t * func_4(uint32_t p_5, int8_t * p_6, int8_t * p_7) +{ /* block id: 1262 */ + return &g_448; +} + + +/* ------------------------------------------ */ +/* + * reads : g_29 g_33 g_688 g_82 g_23 g_1006 g_522 g_203.f3.f1 g_713 g_146 g_23.f2 g_10 g_9 g_448 g_23.f0 g_193 g_27 g_130 g_96 g_202 g_94 g_140 g_132 g_141 g_275 g_203.f3.f0 g_203.f3.f4 g_362 g_367 g_203.f1 g_368 g_802 g_803 g_491 g_1725 g_712 g_203.f3.f3 g_902 g_1359 g_1058 g_2341 g_1153 g_1059 g_28 g_663.f1 g_1455 g_1492 g_2561 g_1949 g_203.f4 g_2575 g_1010 g_429.f0 g_131 + * writes: g_29 g_33 g_82 g_23 g_94 g_1010 g_202 g_203.f1 g_92 g_275 g_448 g_28 g_203.f0 g_96 g_141 g_193.f3 g_9 g_663.f1 g_803 g_491 g_367 g_2212 g_203.f3.f1 g_2039 g_203.f3.f3 g_902 g_2213 g_1359 g_1059 g_27 g_688 g_1492 g_131 g_203.f4 g_2575 g_737 g_2562 + */ +static int8_t * func_11(uint8_t p_12, int32_t * p_13, struct S0 p_14, int32_t * p_15) +{ /* block id: 9 */ + int32_t *l_32 = &g_33; + int8_t * const l_49 = (void*)0; + struct S1 l_62 = {0xA5L,0xA880E1B4L,2UL,{0xC5A9L,0x5881L,1UL,1UL,0xD0L},0xD52FL}; + struct S1 l_73 = {0xF3L,-1L,0UL,{0L,65535UL,4UL,65534UL,0x08L},0x1B1EL}; + int8_t *l_74 = &g_9; + union U2 l_980 = {1L}; + int8_t **l_1316 = &l_74; + const int32_t * const l_2258[1][3] = {{&l_62.f1,&l_62.f1,&l_62.f1}}; + const int32_t * const *l_2257[6] = {(void*)0,(void*)0,(void*)0,(void*)0,(void*)0,(void*)0}; + int16_t *l_2262 = &g_92; + int32_t l_2301 = 8L; + int32_t l_2303 = (-3L); + int32_t l_2306 = 0xEA8C3DEFL; + int32_t l_2307 = 0xEA47795FL; + int32_t l_2310 = 0x333383BBL; + int32_t l_2311 = 1L; + uint32_t l_2312 = 0x999F81ACL; + int32_t l_2386[5][8][6] = {{{0xEE22978CL,(-3L),0x7AF8184EL,0x0F0D664EL,1L,0x0C8FFBCAL},{(-1L),(-1L),0L,0x0F0D664EL,0x9FE7ED45L,0L},{0xEE22978CL,(-1L),2L,0L,0L,0x09D63F88L},{(-1L),(-1L),0xF204F565L,5L,0x3873AA4BL,0x2D1F59DCL},{0xA34C36F6L,0x724D8378L,(-1L),(-1L),0x8F1CC965L,0x8F1CC965L},{0x47C53492L,0x306D3644L,0x306D3644L,0x47C53492L,(-1L),0x0F0D664EL},{0x724D8378L,1L,0x62D68D50L,0L,0xAD839B02L,0xF204F565L},{0x9FE7ED45L,0x47C53492L,1L,0xEE22978CL,0xAD839B02L,0xA512C38CL}},{{0x8F1CC965L,1L,0x3873AA4BL,(-1L),(-1L),0x8B705FA7L},{1L,0x306D3644L,0xA34C36F6L,0xDDD7E864L,0x8F1CC965L,0L},{0xA512C38CL,0x724D8378L,5L,0x8F1CC965L,0x3873AA4BL,0x306D3644L},{0L,(-1L),0x8B705FA7L,(-1L),0L,0x18B14613L},{1L,1L,0xEE22978CL,0xF79A781AL,0xAD839B02L,1L},{2L,0x0C8FFBCAL,(-1L),1L,0x3873AA4BL,1L},{(-3L),0L,0xEE22978CL,(-1L),(-1L),0x18B14613L},{0x3873AA4BL,0x09D63F88L,(-1L),(-3L),1L,1L}},{{(-1L),0x2D1F59DCL,0xA34C36F6L,1L,1L,0x0F0D664EL},{(-1L),0x8F1CC965L,0x47C53492L,0x47C53492L,0x8F1CC965L,(-1L)},{(-1L),0x0F0D664EL,0x724D8378L,0x09D63F88L,0x8B705FA7L,0x7AF8184EL},{0L,0xF204F565L,0x9FE7ED45L,0x8F1CC965L,1L,0L},{0L,0xA512C38CL,0x8F1CC965L,0x09D63F88L,(-1L),2L},{(-1L),0x8B705FA7L,1L,0x47C53492L,0xEE22978CL,0xF204F565L},{(-1L),0L,0xA512C38CL,1L,0xDDD7E864L,(-1L)},{(-1L),0x306D3644L,0L,(-3L),0L,0x306D3644L}},{{0x3873AA4BL,0x47C53492L,(-1L),(-1L),0x18B14613L,0x62D68D50L},{(-3L),0x7AF8184EL,0x0F0D664EL,1L,0x0C8FFBCAL,1L},{2L,0x7AF8184EL,1L,0xF79A781AL,0x18B14613L,0x3873AA4BL},{1L,0x47C53492L,1L,5L,0L,0xA34C36F6L},{0x0F0D664EL,0x306D3644L,2L,0xF204F565L,0xDDD7E864L,5L},{0x7AF8184EL,0L,0x8B705FA7L,0xEE22978CL,0xEE22978CL,0x8B705FA7L},{0x8B705FA7L,0x8B705FA7L,0x2D1F59DCL,0x0C8FFBCAL,(-1L),0xDDD7E864L},{0xF204F565L,0xA512C38CL,(-3L),(-1L),1L,0x2D1F59DCL}},{{0xAD839B02L,0xF204F565L,(-3L),0x0F0D664EL,0x8B705FA7L,0xDDD7E864L},{(-1L),0x0F0D664EL,0x2D1F59DCL,0x18B14613L,0x8F1CC965L,0x8B705FA7L},{0x18B14613L,0x8F1CC965L,0x8B705FA7L,(-1L),1L,5L},{0x47C53492L,0x2D1F59DCL,2L,0xA34C36F6L,1L,0xA34C36F6L},{1L,0x09D63F88L,1L,0x62D68D50L,(-1L),0x3873AA4BL},{(-1L),0L,1L,2L,0x3873AA4BL,1L},{0xA512C38CL,0x0C8FFBCAL,0x0F0D664EL,2L,0xAD839B02L,0x62D68D50L},{(-1L),1L,(-1L),0x62D68D50L,0x0F0D664EL,0x306D3644L}}}; + int32_t l_2465 = (-2L); + int32_t l_2488 = 1L; + uint32_t **l_2543 = &g_1707; + int8_t l_2545 = 0L; + uint32_t *****l_2548[2][6][5] = {{{(void*)0,(void*)0,(void*)0,(void*)0,(void*)0},{(void*)0,(void*)0,(void*)0,(void*)0,(void*)0},{(void*)0,(void*)0,(void*)0,(void*)0,(void*)0},{(void*)0,(void*)0,(void*)0,(void*)0,(void*)0},{(void*)0,(void*)0,(void*)0,(void*)0,(void*)0},{(void*)0,(void*)0,(void*)0,(void*)0,(void*)0}},{{(void*)0,(void*)0,(void*)0,(void*)0,(void*)0},{(void*)0,(void*)0,(void*)0,(void*)0,(void*)0},{(void*)0,(void*)0,(void*)0,(void*)0,(void*)0},{(void*)0,(void*)0,(void*)0,(void*)0,(void*)0},{(void*)0,(void*)0,(void*)0,(void*)0,(void*)0},{(void*)0,(void*)0,(void*)0,(void*)0,(void*)0}}}; + const int32_t ***l_2557 = (void*)0; + union U2 **** const l_2563 = &g_2562; + uint8_t ** const l_2629 = (void*)0; + int i, j, k; + (*l_32) = ((*p_13) = (*p_13)); + (*p_13) = func_34(((*l_1316) = func_38(&g_33)), &g_368[0][7][2], p_14.f2); +lbl_2351: + (*g_688) = (*p_15); + for (g_902 = 3; (g_902 >= 0); g_902 -= 1) + { /* block id: 1101 */ + struct S1 **l_2255 = (void*)0; + struct S1 **l_2256[4]; + int32_t l_2259[9] = {0x516D507AL,0x516D507AL,0x516D507AL,0x516D507AL,0x516D507AL,0x516D507AL,0x516D507AL,0x516D507AL,0x516D507AL}; + int16_t **l_2263 = &g_2213[8][2][2]; + uint16_t l_2289 = 65529UL; + union U2 *l_2315 = &l_980; + uint32_t l_2330[9][8][1] = {{{0x6A3C0208L},{0x610F5ECBL},{0xE9A408D8L},{1UL},{2UL},{1UL},{0xE9A408D8L},{0x610F5ECBL}},{{0x6A3C0208L},{0xEE99DD9DL},{2UL},{1UL},{1UL},{0x610F5ECBL},{1UL},{1UL}},{{2UL},{0xEE99DD9DL},{0x6A3C0208L},{0x610F5ECBL},{0xE9A408D8L},{1UL},{2UL},{1UL}},{{0xE9A408D8L},{0x610F5ECBL},{0x6A3C0208L},{0xEE99DD9DL},{2UL},{1UL},{1UL},{0x610F5ECBL}},{{1UL},{1UL},{2UL},{0xEE99DD9DL},{0x6A3C0208L},{0x610F5ECBL},{0xE9A408D8L},{1UL}},{{2UL},{1UL},{0xE9A408D8L},{0x610F5ECBL},{0x6A3C0208L},{0xEE99DD9DL},{2UL},{1UL}},{{1UL},{0x610F5ECBL},{1UL},{1UL},{2UL},{0xEE99DD9DL},{0x6A3C0208L},{0x610F5ECBL}},{{0xE9A408D8L},{1UL},{2UL},{1UL},{0xE9A408D8L},{0x610F5ECBL},{0x6A3C0208L},{0xEE99DD9DL}},{{2UL},{1UL},{1UL},{0x610F5ECBL},{1UL},{1UL},{2UL},{0xEE99DD9DL}}}; + uint16_t **l_2378 = (void*)0; + uint32_t l_2423 = 4294967293UL; + int32_t l_2489 = 0x7F7BAA7EL; + int16_t l_2494 = (-2L); + uint32_t l_2522 = 0x57A978C3L; + int8_t *l_2524 = (void*)0; + int32_t *l_2527[9][10] = {{&l_62.f1,&g_203.f1,&g_429[3][2][4].f1,&g_429[3][2][4].f1,&g_203.f1,&l_62.f1,&g_203.f1,&g_140,(void*)0,&g_203.f1},{(void*)0,&g_203.f1,&l_73.f1,&l_980.f0,&g_140,&l_980.f0,&l_73.f1,&g_203.f1,(void*)0,&l_62.f1},{(void*)0,&g_429[3][2][4].f1,&l_2489,&g_203.f1,&l_980.f0,&l_62.f1,&l_62.f1,&l_980.f0,&g_203.f1,&l_2489},{&l_62.f1,&l_62.f1,&l_980.f0,&g_203.f1,&l_2489,&g_429[3][2][4].f1,(void*)0,&g_140,(void*)0,&g_429[3][2][4].f1},{&l_73.f1,&l_980.f0,&g_140,&l_980.f0,&l_73.f1,&g_203.f1,(void*)0,&l_62.f1,(void*)0,(void*)0},{&g_203.f1,&l_62.f1,&g_203.f1,&g_429[3][2][4].f1,&g_429[3][2][4].f1,&g_203.f1,&l_62.f1,&g_203.f1,&g_140,(void*)0},{&g_140,&g_429[3][2][4].f1,&l_62.f1,(void*)0,&l_73.f1,(void*)0,&l_73.f1,(void*)0,&l_62.f1,&g_429[3][2][4].f1},{&g_203.f1,&l_2489,&l_980.f0,&g_429[3][2][4].f1,&g_140,&g_203.f1,(void*)0,(void*)0,&g_203.f1,&g_140},{&l_62.f1,(void*)0,(void*)0,&l_62.f1,(void*)0,&g_203.f1,&l_73.f1,&l_980.f0,&g_140,&l_980.f0}}; + struct S0 ** const l_2546[4] = {&g_803,&g_803,&g_803,&g_803}; + uint32_t ** const l_2587 = &g_1707; + uint32_t *l_2596 = &l_2312; + uint32_t **l_2595 = &l_2596; + int8_t *l_2632[2]; + int i, j, k; + for (i = 0; i < 4; i++) + l_2256[i] = &g_202[2][4]; + for (i = 0; i < 2; i++) + l_2632[i] = &g_448; + g_202[4][9] = &l_62; + (*g_688) &= ((*p_15) = ((((l_2257[0] == &l_2258[0][0]) , l_2259[7]) , ((**g_712) = (((l_2259[3] = 0x447DL) ^ ((((void*)0 == &l_32) | (((*l_2263) = l_2262) == l_2262)) || ((void*)0 == &l_73))) , 0x29L))) >= (*l_32))); + for (l_62.f2 = 1; (l_62.f2 <= 5); l_62.f2 += 1) + { /* block id: 1110 */ + int32_t l_2264 = 1L; + int8_t *l_2280 = (void*)0; + int32_t l_2302[5]; + int32_t l_2408 = 0x81C9B156L; + union U2 l_2415 = {0L}; + uint16_t l_2448 = 0xBC8EL; + int16_t l_2466 = 0xFD66L; + const int32_t l_2521 = 0x4B7359ADL; + union U2 ***l_2624 = &g_1058; + int i, j; + for (i = 0; i < 5; i++) + l_2302[i] = 0xFE7F3AB0L; + if (g_141[g_902][l_62.f2]) + { /* block id: 1111 */ + for (g_1359 = 0; (g_1359 <= 2); g_1359 += 1) + { /* block id: 1114 */ + return &g_9; + } + } + else + { /* block id: 1117 */ + uint8_t l_2277 = 0xA1L; + int32_t l_2279 = 0xC2AC5853L; + int32_t l_2294 = 9L; + int32_t l_2308 = 0x91F0493EL; + int32_t l_2309 = (-7L); + struct S1 l_2379 = {-1L,-10L,0x3B90L,{0x3487L,8UL,1UL,65535UL,1UL},65535UL}; + uint32_t l_2380 = 1UL; + int32_t l_2384 = 0x5899C3A7L; + int32_t l_2385[10][4][6] = {{{(-1L),0x9819E421L,0x16FE54D0L,0x344D9AE6L,(-1L),0L},{0L,1L,(-1L),0L,0x4B3A9EFEL,0xE7D02930L},{0L,(-1L),0x1040F8BCL,0x344D9AE6L,0x768803A5L,0xA63F859BL},{(-1L),(-9L),0L,0x344D9AE6L,9L,0xE9596E70L}},{{0L,0xF96B3B99L,0x130F37B5L,0L,0x6EB652C0L,0L},{0L,1L,0x88DA25D8L,0x344D9AE6L,(-7L),0x78B3DEB0L},{(-1L),(-1L),0x62ACFAC9L,0x344D9AE6L,0xFAC4ED1CL,0x344D9AE6L},{0L,0L,0L,0L,(-5L),(-8L)}},{{0L,0xB281438FL,2L,0x344D9AE6L,0x38BED929L,0xA980789AL},{(-1L),0x9819E421L,0x16FE54D0L,0x344D9AE6L,(-1L),0L},{0L,1L,(-1L),0L,0x4B3A9EFEL,0xE7D02930L},{0L,(-1L),0x1040F8BCL,0x344D9AE6L,0x768803A5L,0xA63F859BL}},{{(-1L),(-9L),0L,0x344D9AE6L,9L,0xE9596E70L},{0L,0xF96B3B99L,0x130F37B5L,0L,0x6EB652C0L,0L},{0L,1L,0x88DA25D8L,0x344D9AE6L,(-7L),0x78B3DEB0L},{(-1L),(-1L),0x62ACFAC9L,0x344D9AE6L,0xFAC4ED1CL,0x344D9AE6L}},{{0L,0L,0L,0L,(-5L),(-8L)},{0L,0xB281438FL,2L,0x344D9AE6L,0x38BED929L,0xA980789AL},{(-1L),0x9819E421L,0x16FE54D0L,0x344D9AE6L,(-1L),0L},{0L,1L,(-1L),0L,0x4B3A9EFEL,0xE7D02930L}},{{0L,(-1L),0x1040F8BCL,0x344D9AE6L,0x768803A5L,0xA63F859BL},{(-1L),(-9L),0L,0x344D9AE6L,9L,0xE9596E70L},{0L,0xF96B3B99L,0x130F37B5L,0L,0x6EB652C0L,0L},{0L,1L,0x88DA25D8L,0x344D9AE6L,(-7L),0x78B3DEB0L}},{{(-1L),(-1L),0x62ACFAC9L,0x344D9AE6L,0xFAC4ED1CL,0x344D9AE6L},{0L,0L,0L,0L,(-5L),(-8L)},{0L,0xB281438FL,2L,0x344D9AE6L,0x38BED929L,0xA980789AL},{(-1L),0x9819E421L,0x16FE54D0L,0x344D9AE6L,(-1L),0L}},{{1L,0L,(-7L),(-1L),0L,0x0594ECFCL},{1L,0xE9596E70L,7L,0xB5891EFAL,2L,0x290904F0L},{(-7L),0xA63F859BL,(-1L),0xB5891EFAL,0x130F37B5L,0x06C85D14L},{1L,0xE7D02930L,(-5L),(-1L),0x16FE54D0L,0xD3FD5C8DL}},{{1L,0L,1L,0xB5891EFAL,0x88DA25D8L,1L},{(-7L),0xA980789AL,0x2A735ED7L,0xB5891EFAL,(-1L),0xB5891EFAL},{1L,(-8L),1L,(-1L),0x62ACFAC9L,0x5A705F23L},{1L,0x344D9AE6L,(-4L),0xB5891EFAL,0x1040F8BCL,0xAFA1E74CL}},{{(-7L),0x78B3DEB0L,(-4L),0xB5891EFAL,0L,(-1L)},{1L,0L,(-7L),(-1L),0L,0x0594ECFCL},{1L,0xE9596E70L,7L,0xB5891EFAL,2L,0x290904F0L},{(-7L),0xA63F859BL,(-1L),0xB5891EFAL,0x130F37B5L,0x06C85D14L}}}; + uint16_t l_2387[8][8][2] = {{{0x1F77L,0x8916L},{0x5EB1L,1UL},{0xD941L,0xD941L},{0xB4D7L,1UL},{0x156AL,0xF827L},{1UL,0UL},{0xF674L,1UL},{0xB773L,0x4CDCL}},{{0xB773L,1UL},{0xF674L,0UL},{1UL,0xF827L},{0x156AL,1UL},{0xB4D7L,0xD941L},{0xD941L,1UL},{0x5EB1L,0x8916L},{0x1F77L,0xF827L}},{{0UL,8UL},{0xDCD7L,0x9ED6L},{0xB773L,0xFBAAL},{65531UL,0xE04EL},{1UL,0UL},{0UL,0xEEC3L},{0UL,0xA55FL},{0xB4D7L,1UL}},{{0xB9FBL,0x9C21L},{8UL,0x8916L},{0x156AL,0xEEC3L},{0x9ED6L,0xB4D7L},{0xDCD7L,1UL},{65531UL,0xE953L},{0UL,0xE04EL},{0xF674L,8UL}},{{0x9ED6L,0x45EEL},{0UL,1UL},{0x5EB1L,0x9C21L},{1UL,0x9C21L},{0x5EB1L,1UL},{0UL,0x45EEL},{0x9ED6L,8UL},{0xF674L,0xE04EL}},{{0UL,0xE953L},{65531UL,1UL},{0xDCD7L,0xB4D7L},{0x9ED6L,0xEEC3L},{0x156AL,0x8916L},{8UL,0x9C21L},{0xB9FBL,1UL},{0xB4D7L,0xA55FL}},{{0UL,0xEEC3L},{0UL,0UL},{1UL,0xE04EL},{65531UL,0xFBAAL},{0xB773L,0x9ED6L},{0xDCD7L,8UL},{0UL,0xF827L},{0x1F77L,0x8916L}},{{0x5EB1L,1UL},{0xD941L,0xD941L},{0xB4D7L,1UL},{0x156AL,0xDCD7L},{65535UL,0xD941L},{0xE4A2L,65535UL},{1UL,0x77A6L},{1UL,65535UL}}}; + int i, j, k; + if ((*l_32)) + break; + if (((0x32L >= (((l_2264 = p_14.f2) , (-5L)) & (safe_lshift_func_int8_t_s_u(p_14.f1, 5)))) < p_12)) + { /* block id: 1120 */ + struct S0 *l_2278 = &l_62.f3; + if (l_2259[3]) + break; + l_2279 |= (~((*p_15) = (((*p_15) || ((*l_32) != (l_2259[7] || 9L))) > (((safe_lshift_func_int8_t_s_s(((((((safe_sub_func_int32_t_s_s(((*p_13) & 0xD5DB01E4L), (l_2277 = ((l_980 , (((*g_688) = (safe_mod_func_int32_t_s_s((safe_div_func_int8_t_s_s(0L, 8L)), 0xEA115DFCL))) < 5L)) & 0xD3L)))) > (-1L)) && (*l_32)) != p_14.f0) || l_2259[7]) <= p_14.f1), 1)) , l_2278) != &p_14)))); + return l_2280; + } + else + { /* block id: 1127 */ + int16_t *l_2295 = &g_1798; + int32_t l_2300 = 0L; + int32_t l_2304 = 0xE4A6017EL; + int32_t l_2305 = 0xBB491C39L; + for (g_94 = 0; (g_94 <= 3); g_94 += 1) + { /* block id: 1130 */ + int i, j; + (*g_688) = (((safe_add_func_uint16_t_u_u((1UL < (0xCD44D46BL != (safe_add_func_uint8_t_u_u((((p_12 , (safe_lshift_func_uint8_t_u_s((safe_mul_func_int16_t_s_s(l_2289, (safe_lshift_func_int8_t_s_u((0UL != (~((safe_add_func_uint8_t_u_u((g_141[g_94][(g_94 + 3)] = ((3UL == 0x8855L) , (0x099BL ^ l_2279))), 0x5DL)) & l_2259[5]))), l_2294)))), 7))) , 0x6B32L) >= 0x40A0L), 0x1BL)))), 65530UL)) >= 0x84L) < (*p_15)); + } + l_2264 = (*p_13); + for (g_29 = 0; (g_29 <= 3); g_29 += 1) + { /* block id: 1137 */ + const int16_t *l_2296 = &g_193.f0; + int32_t *l_2297 = (void*)0; + int32_t *l_2298 = &l_2259[2]; + int32_t *l_2299[2][7][6] = {{{&l_2259[7],&g_33,&l_2259[7],&l_2279,&l_2264,&g_82},{&g_82,(void*)0,&g_33,&g_33,(void*)0,&g_82},{&l_2279,&l_2264,&l_2259[7],&g_902,&g_82,&g_29},{(void*)0,&l_2259[7],&g_82,&g_82,&g_82,&l_2259[7]},{(void*)0,&g_29,&g_82,&g_902,&l_2259[7],&l_2264},{&l_2279,&g_82,(void*)0,&g_33,&g_33,(void*)0},{&g_82,&g_82,&l_2264,&l_2279,&l_2259[7],&g_33}},{{&l_2259[7],&g_29,&g_902,&l_2264,&g_82,&l_2264},{&g_902,&l_2259[7],&g_902,&l_2264,&g_82,&g_33},{&l_2259[7],&l_2264,&l_2264,(void*)0,(void*)0,(void*)0},{(void*)0,(void*)0,(void*)0,(void*)0,&l_2264,&l_2264},{&l_2259[7],&g_33,&g_82,&l_2264,&g_902,&l_2259[7]},{&g_902,&l_2264,&g_82,&l_2264,&g_902,&g_29},{&l_2259[7],&g_33,&l_2259[7],&l_2279,&l_2264,&g_82}}}; + int i, j, k; + (*l_32) = (l_2295 != l_2296); + --l_2312; + } + } + if (l_2308) + { /* block id: 1142 */ + int8_t l_2321 = 1L; + uint32_t l_2326 = 6UL; + int32_t l_2329[4]; + struct S1 l_2350 = {-1L,1L,0xD5C0L,{0x8AE0L,65528UL,1UL,1UL,255UL},65535UL}; + int i; + for (i = 0; i < 4; i++) + l_2329[i] = 3L; + (*g_1058) = l_2315; + (*p_13) = (*g_688); + if ((safe_lshift_func_uint16_t_u_s(p_14.f3, 15))) + { /* block id: 1145 */ + int32_t *l_2318 = &l_2294; + int32_t *l_2319 = &l_2259[4]; + int32_t *l_2320 = (void*)0; + int32_t *l_2322 = (void*)0; + int32_t *l_2323 = &l_2307; + int32_t *l_2324 = &l_2302[0]; + int32_t *l_2325[5]; + int i; + for (i = 0; i < 5; i++) + l_2325[i] = &l_2294; + (*l_32) = 8L; + --l_2326; + l_2330[1][2][0]++; + (*l_2318) = ((*p_15) = ((((0x7027L <= 3UL) , (safe_add_func_uint16_t_u_u((l_2262 != (void*)0), p_14.f2))) ^ (safe_rshift_func_uint16_t_u_u(p_14.f1, ((safe_mod_func_uint16_t_u_u((safe_div_func_uint8_t_u_u(((((g_2341 , ((safe_rshift_func_uint16_t_u_s((safe_add_func_uint16_t_u_u(((*p_15) | (*p_13)), 1L)), 15)) || p_12)) & (*p_13)) | p_12) < l_2277), (*g_713))), 0x4026L)) || (-6L))))) ^ (*l_32))); + } + else + { /* block id: 1151 */ + if ((*p_13)) + break; + } + (*p_13) = ((*g_1153) & (((0UL >= l_2330[7][3][0]) | (((*l_32) |= (safe_div_func_uint16_t_u_u((l_2264 >= (l_2259[4] || (safe_sub_func_int32_t_s_s(((!((p_15 == (g_688 = func_16(l_2350, l_2326, &l_2321, (*g_1059)))) < 0xC144L)) | p_14.f2), g_663.f1)))), p_14.f2))) < p_14.f4)) && 65532UL)); + } + else + { /* block id: 1157 */ + int8_t l_2373 = (-1L); + int32_t *l_2381 = &l_2302[3]; + int32_t *l_2382[3][1]; + int32_t l_2383 = 0xD4D53D12L; + int i, j; + for (i = 0; i < 3; i++) + { + for (j = 0; j < 1; j++) + l_2382[i][j] = &l_2309; + } + if (p_12) + goto lbl_2351; + for (g_663.f1 = 0; (g_663.f1 <= 5); g_663.f1 += 1) + { /* block id: 1161 */ + uint32_t *l_2372 = &g_1492; + int i, j; + (*g_688) = (((safe_lshift_func_uint8_t_u_s((g_141[g_663.f1][l_62.f2] = 0xA0L), 5)) , l_62) , ((safe_div_func_uint32_t_u_u((safe_rshift_func_uint16_t_u_u((p_14.f4 ^ ((((safe_div_func_int16_t_s_s(g_141[g_663.f1][l_62.f2], 0xF306L)) & ((*g_146) = p_14.f1)) == ((safe_mod_func_uint16_t_u_u((safe_mul_func_uint8_t_u_u((p_14 , (safe_sub_func_uint32_t_u_u(p_14.f1, ((*l_2372) &= ((((safe_mul_func_int16_t_s_s(((*l_2262) = (safe_mul_func_int8_t_s_s((safe_mul_func_uint8_t_u_u(((**g_1455) = (p_14.f3 != (*l_32))), 6UL)), p_12))), p_12)) > (-1L)) < (*p_13)) , p_14.f1))))), 0xC5L)), l_2309)) , 0x0BB3L)) ^ (*p_13))), l_2373)), (*p_15))) <= p_14.f4)); + (*p_13) |= (!(safe_add_func_uint8_t_u_u((p_14.f0 != (*g_1153)), 0xB4L))); + return &g_870; + } + if ((safe_rshift_func_int16_t_s_s(((void*)0 == l_2378), (l_2379 , p_14.f1)))) + { /* block id: 1171 */ + g_131 = &g_33; + return &g_1473[8]; + } + else + { /* block id: 1174 */ + if (l_2380) + break; + } + l_2387[3][1][1]++; + } + } + if ((safe_rshift_func_int8_t_s_u((*l_32), 1))) + { /* block id: 1180 */ + uint16_t l_2413 = 1UL; + union U2 l_2414[6] = {{0L},{0L},{0L},{0L},{0L},{0L}}; + int32_t **l_2440 = &g_364; + int32_t **l_2441 = &g_364; + int i; + if ((*p_13)) + break; + for (g_94 = 0; (g_94 <= 3); g_94 += 1) + { /* block id: 1184 */ + union U2 * const *l_2419 = &g_1059; + union U2 * const **l_2418 = &l_2419; + int32_t l_2420[9][1] = {{0x051709FCL},{1L},{0x051709FCL},{0x051709FCL},{1L},{0x051709FCL},{0x051709FCL},{1L},{0x051709FCL}}; + int32_t *l_2478 = &g_429[3][2][4].f1; + struct S1 l_2520 = {-2L,0L,0x57AFL,{0x21C3L,0x3511L,0x0B52L,65528UL,0xE3L},0x76F0L}; + int i, j; + } + return l_2524; + } + else + { /* block id: 1222 */ + const struct S1 l_2528 = {0x71L,0L,0UL,{0x3E7BL,2UL,0xA362L,0x52B0L,1UL},0x1C93L}; + uint32_t *l_2544 = &g_27; + struct S0 * const *l_2547[6] = {&g_803,&g_803,&g_803,&g_803,&g_803,&g_803}; + int8_t *l_2549 = (void*)0; + int32_t *l_2550 = &g_429[3][2][4].f1; + int32_t ***l_2556 = (void*)0; + const int32_t ****l_2558 = &l_2557; + uint16_t **l_2568 = &g_146; + int32_t l_2574[4] = {(-1L),(-1L),(-1L),(-1L)}; + int8_t l_2588 = 0L; + uint32_t l_2600 = 0x9044E83EL; + int i; + l_2302[3] = (safe_lshift_func_uint16_t_u_s(5UL, ((4L >= p_14.f4) & l_2302[3]))); + (*p_15) = ((((l_2527[5][4] != (l_2550 = func_16((l_2528 , l_73), (safe_mul_func_uint16_t_u_u((safe_rshift_func_int16_t_s_s(0L, ((safe_rshift_func_int8_t_s_s((p_14.f3 & 0xAEFE28DBL), 3)) & (safe_mod_func_int8_t_s_s((safe_mod_func_uint16_t_u_u((((((((l_2528 , (((safe_lshift_func_int8_t_s_s(((safe_div_func_uint8_t_u_u((((*l_2544) = (&g_1931[0] == l_2543)) != l_2545), 0x12L)) , l_2302[3]), 3)) && (*p_13)) , l_2546[0])) != l_2547[1]) || p_14.f4) == (*p_13)) , p_14.f3) , l_2548[1][3][0]) != &g_1766), (*g_522))), l_2330[1][2][0]))))), l_2415.f0)), l_2549, (*l_2315)))) < 0UL) < (*g_146)) >= 0UL); + (*l_32) = (safe_unary_minus_func_int32_t_s(((l_2528.f1 , (((p_14.f0 | ((safe_sub_func_int16_t_s_s((safe_rshift_func_int16_t_s_u(p_14.f0, 10)), (((l_2556 == ((*l_2558) = l_2557)) != (((((safe_mod_func_int16_t_s_s((g_2561 == l_2563), (((((safe_div_func_uint16_t_u_u(((safe_lshift_func_int8_t_s_s((0UL & 9UL), 7)) || p_14.f0), l_2289)) < 0x58L) >= (**g_1455)) < 0L) | 0x365904B0L))) > p_14.f2) , l_2568) != l_2378) < p_14.f2)) ^ l_2423))) != 0xE69B00F3L)) ^ (*g_1949)) || 0x2E1B5BAFL)) > p_14.f3))); + for (g_203.f4 = (-21); (g_203.f4 < 26); g_203.f4++) + { /* block id: 1231 */ + int8_t l_2594 = 9L; + int32_t * const *l_2599[2]; + union U2 ***l_2623 = (void*)0; + int32_t *l_2630 = &l_2574[3]; + int32_t *l_2631 = &l_2259[7]; + int i; + for (i = 0; i < 2; i++) + l_2599[i] = (void*)0; + for (g_1359 = 3; (g_1359 == 40); g_1359 = safe_add_func_int32_t_s_s(g_1359, 8)) + { /* block id: 1234 */ + int32_t *l_2573[6][7][6] = {{{&l_2386[3][6][3],&l_2302[4],&l_2259[4],&l_2302[4],&l_2386[3][6][3],&l_2264},{&g_82,&l_2302[3],&g_29,&l_2306,&l_2302[3],(void*)0},{&l_2259[4],&l_2264,&l_2465,&l_2302[3],&g_29,(void*)0},{&l_2259[6],(void*)0,&g_29,&l_2465,&l_2264,&l_2264},{&g_29,&l_2259[4],&l_2259[4],&g_29,&l_2259[6],&l_2307},{&l_2465,&g_29,(void*)0,&l_2259[6],&g_29,&g_29},{&l_2302[3],&l_2465,&l_2264,&l_2259[4],&g_29,&l_2465}},{{&l_2306,&g_29,&l_2302[3],&g_82,&l_2259[6],&g_82},{&l_2302[4],&l_2259[4],&l_2302[4],&l_2386[3][6][3],&l_2264,&g_29},{&g_29,(void*)0,&g_29,&l_2302[3],&g_29,&g_29},{(void*)0,&l_2264,&l_2306,&l_2302[3],&l_2302[3],&l_2386[3][6][3]},{&g_29,&l_2302[3],&l_2259[6],&l_2386[3][6][3],&l_2386[3][6][3],&l_2259[6]},{&l_2311,&l_2311,&l_2465,&l_2302[4],&g_82,&g_29},{&g_29,&l_2306,&g_82,&l_2301,&l_2259[6],&l_2465}},{{&l_2386[3][6][3],&g_29,&g_82,&l_2259[4],&l_2311,&g_29},{&g_29,&l_2259[4],&l_2465,(void*)0,&l_2465,&l_2259[4]},{(void*)0,&l_2465,&l_2259[4],&g_29,&l_2307,(void*)0},{&l_2259[4],&g_82,&g_29,&l_2386[3][6][3],&l_2301,&l_2264},{&l_2301,&g_82,&l_2306,&g_29,&l_2307,&l_2302[3]},{&l_2302[4],&l_2465,&l_2311,&l_2311,&l_2465,&l_2302[4]},{(void*)0,&l_2259[4],&l_2386[3][6][3],&l_2302[3],&l_2311,&g_29}},{{&l_2302[3],&g_29,&l_2488,&g_29,&l_2259[6],&l_2306},{&l_2302[3],&l_2306,&g_29,&l_2302[3],&g_82,&l_2259[6]},{(void*)0,&l_2311,&l_2301,&l_2311,(void*)0,&l_2488},{&l_2302[4],&l_2386[3][6][3],&l_2264,&g_29,&g_29,&g_29},{&l_2301,&l_2488,&l_2302[3],&l_2386[3][6][3],(void*)0,&g_29},{&l_2259[4],&g_29,&l_2264,&g_29,&l_2488,&l_2488},{(void*)0,&l_2301,&l_2301,(void*)0,&l_2259[4],&l_2259[6]}},{{&g_29,&l_2264,&g_29,&l_2259[4],&l_2302[3],&l_2306},{&l_2386[3][6][3],&l_2302[3],&l_2488,&l_2301,&l_2302[3],&g_29},{&g_29,&l_2264,&l_2386[3][6][3],&l_2302[4],&l_2259[4],&l_2302[4]},{&l_2311,&l_2301,&l_2311,(void*)0,&l_2488,&l_2302[3]},{&l_2302[3],&g_29,&l_2306,&l_2302[3],(void*)0,&l_2264},{&g_29,&l_2488,&g_29,&l_2302[3],&g_29,(void*)0},{&l_2302[3],&l_2386[3][6][3],&l_2259[4],(void*)0,(void*)0,&l_2259[4]}},{{&l_2311,&l_2311,&l_2465,&l_2302[4],&g_82,&g_29},{&g_29,&l_2306,&g_82,&l_2301,&l_2259[6],&l_2465},{&l_2386[3][6][3],&g_29,&g_82,&l_2259[4],&l_2311,&g_29},{&g_29,&l_2259[4],&l_2465,(void*)0,&l_2465,&l_2259[4]},{(void*)0,&l_2465,&l_2259[4],&g_29,&l_2307,(void*)0},{&l_2259[4],&g_82,&g_29,&l_2386[3][6][3],&l_2301,&l_2264},{&l_2301,&g_82,&l_2306,&g_29,&l_2307,&l_2302[3]}}}; + uint32_t **l_2586[7][2] = {{(void*)0,&g_1707},{&g_1707,(void*)0},{&g_1707,&g_1707},{(void*)0,&g_1707},{&g_1707,(void*)0},{&g_1707,(void*)0},{&g_1707,(void*)0}}; + uint32_t ***l_2597 = &g_737; + int32_t **l_2598 = &l_2550; + int i, j, k; + (*g_802) = (*g_802); + --g_2575; + (*p_15) = (l_2574[3] , (p_14.f1 , (safe_lshift_func_uint16_t_u_s((((p_14.f3 | ((-3L) < l_2528.f1)) ^ ((safe_unary_minus_func_uint8_t_u((((*g_146) ^= (~((*p_15) == p_14.f4))) != (((safe_unary_minus_func_int8_t_s(p_14.f4)) <= (((!((safe_lshift_func_int16_t_s_u((0x8ED8L > p_14.f0), 1)) , (*l_32))) , l_2586[2][0]) != l_2587)) <= (*l_32))))) != 1UL)) ^ p_12), l_2588)))); + l_2408 &= (((*l_32) <= (((safe_unary_minus_func_int16_t_s((safe_mul_func_int16_t_s_s(((*l_2262) = (((((*p_13) |= (~(p_14.f3 >= (((l_2594 = (g_193.f2 , (*g_146))) || (((*l_2597) = ((*g_522) , l_2595)) != &l_2596)) == 0x3CF58CB7L)))) || (l_2600 = ((l_2598 != l_2599[0]) , 4294967295UL))) == l_2522) | p_14.f2)), 0UL)))) != p_14.f2) & l_2521)) == l_2415.f0); + } + (*l_2631) = ((safe_sub_func_uint32_t_u_u(l_2588, ((*l_2544) |= (+(safe_add_func_uint16_t_u_u((safe_sub_func_int32_t_s_s(((*l_2630) &= ((*l_32) = (safe_unary_minus_func_int32_t_s(((*p_13) = (!((safe_rshift_func_int8_t_s_s((safe_mod_func_uint8_t_u_u((safe_unary_minus_func_uint8_t_u(((*g_1153) ^= (safe_sub_func_int8_t_s_s((((safe_div_func_uint8_t_u_u((p_14.f1 <= (safe_mul_func_uint16_t_u_u(((g_193 , (((safe_mul_func_int8_t_s_s((safe_sub_func_uint8_t_u_u(((l_2623 != ((*l_2563) = l_2624)) && ((((safe_div_func_int16_t_s_s((p_14.f0 != ((*g_713) = ((safe_rshift_func_int8_t_s_u(((((l_2629 != (void*)0) || ((0UL != (*g_1949)) , p_14.f0)) <= (*g_1010)) > l_2588), 1)) , 0UL))), 0xFB22L)) | 0xD46AL) && p_12) >= 0xF070L)), l_2594)), l_2594)) || l_2448) ^ 0UL)) ^ p_14.f4), l_2594))), l_2289)) < l_2594) , (*g_10)), 0L))))), l_2448)), 4)) >= 0x577BL))))))), p_14.f3)), p_12)))))) | p_14.f2); + if ((*g_131)) + continue; + } + } + return &g_1473[4]; + } + return l_2632[1]; + } + return &g_870; +} + + +/* ------------------------------------------ */ +/* + * reads : g_27 g_28 + * writes: g_27 + */ +static int32_t * func_16(struct S1 p_17, uint32_t p_18, int8_t * p_19, union U2 p_20) +{ /* block id: 1 */ + int32_t l_26[8][6] = {{1L,0xAF1E2CD8L,0xAF1E2CD8L,1L,1L,0xAF1E2CD8L},{1L,1L,0xAF1E2CD8L,0xAF1E2CD8L,1L,1L},{1L,0xAF1E2CD8L,0xAF1E2CD8L,1L,1L,0xAF1E2CD8L},{1L,1L,0xAF1E2CD8L,0xAF1E2CD8L,1L,1L},{1L,0xAF1E2CD8L,0xAF1E2CD8L,1L,1L,0xAF1E2CD8L},{1L,1L,0xAF1E2CD8L,0xAF1E2CD8L,1L,1L},{1L,0xAF1E2CD8L,0xAF1E2CD8L,1L,1L,0xAF1E2CD8L},{1L,1L,0xAF1E2CD8L,0xAF1E2CD8L,1L,1L}}; + int i, j; + for (p_17.f4 = 0; (p_17.f4 <= 11); p_17.f4 = safe_add_func_uint16_t_u_u(p_17.f4, 6)) + { /* block id: 4 */ + g_27 ^= l_26[5][1]; + } + return g_28[4]; +} + + +/* ------------------------------------------ */ +/* + * reads : g_1725 g_368 g_367 g_522 g_203.f3.f1 g_688 g_82 g_491 g_712 g_713 g_94 g_146 g_23.f2 g_203.f3.f3 g_33 + * writes: g_491 g_33 g_203.f0 g_367 g_82 g_2212 g_203.f3.f1 g_94 g_2039 g_203.f3.f3 + */ +static int32_t func_34(int8_t * p_35, int8_t * p_36, uint16_t p_37) +{ /* block id: 670 */ + struct S0 l_1321[7][5] = {{{-3L,0UL,0x0D39L,0x7666L,9UL},{0x7E5BL,0UL,65535UL,65534UL,255UL},{0x7E5BL,0UL,65535UL,65534UL,255UL},{-3L,0UL,0x0D39L,0x7666L,9UL},{-3L,0UL,0x0D39L,0x7666L,9UL}},{{0xBD94L,0xF8F5L,0x5D41L,0x2316L,0xF3L},{-1L,1UL,8UL,65530UL,2UL},{0xBD94L,0xF8F5L,0x5D41L,0x2316L,0xF3L},{-1L,1UL,8UL,65530UL,2UL},{0xBD94L,0xF8F5L,0x5D41L,0x2316L,0xF3L}},{{-3L,0UL,0x0D39L,0x7666L,9UL},{-3L,0UL,0x0D39L,0x7666L,9UL},{0x7E5BL,0UL,65535UL,65534UL,255UL},{0x7E5BL,0UL,65535UL,65534UL,255UL},{-3L,0UL,0x0D39L,0x7666L,9UL}},{{-4L,1UL,0x33E9L,65532UL,248UL},{-1L,1UL,8UL,65530UL,2UL},{-4L,1UL,0x33E9L,65532UL,248UL},{-1L,1UL,8UL,65530UL,2UL},{-4L,1UL,0x33E9L,65532UL,248UL}},{{-3L,0UL,0x0D39L,0x7666L,9UL},{0x7E5BL,0UL,65535UL,65534UL,255UL},{0x7E5BL,0UL,65535UL,65534UL,255UL},{-3L,0UL,0x0D39L,0x7666L,9UL},{-3L,0UL,0x0D39L,0x7666L,9UL}},{{0xBD94L,0xF8F5L,0x5D41L,0x2316L,0xF3L},{-1L,1UL,8UL,65530UL,2UL},{0xBD94L,0xF8F5L,0x5D41L,0x2316L,0xF3L},{-1L,1UL,8UL,65530UL,2UL},{0xBD94L,0xF8F5L,0x5D41L,0x2316L,0xF3L}},{{-3L,0UL,0x0D39L,0x7666L,9UL},{-3L,0UL,0x0D39L,0x7666L,9UL},{0x7E5BL,0UL,65535UL,65534UL,255UL},{0x7E5BL,0UL,65535UL,65534UL,255UL},{-3L,0UL,0x0D39L,0x7666L,9UL}}}; + int16_t l_1379 = 4L; + uint32_t *l_1406 = (void*)0; + union U2 l_1407 = {0x4EADE60BL}; + int32_t l_1421 = 0x102DBB17L; + int32_t l_1424 = 0x2B1BCA3FL; + int32_t l_1428 = 0xEA818C76L; + uint8_t **l_1453 = &g_1153; + uint32_t **l_1709 = (void*)0; + uint16_t *l_1711 = &g_203.f3.f3; + struct S1 l_1720 = {0x40L,0x6FFD7AF9L,8UL,{0x2D4DL,0xA206L,65535UL,0x7873L,5UL},0xD12CL}; + int32_t ****l_1721 = &g_362[0][2]; + const int32_t *l_1724 = &g_1725; + uint32_t ***l_1768 = (void*)0; + uint32_t ****l_1767 = &l_1768; + int8_t *l_1795 = &g_203.f0; + const int32_t *l_1817 = &g_203.f1; + const int32_t **l_1816 = &l_1817; + union U2 *** const l_1840 = &g_1058; + int32_t l_1879 = 1L; + uint16_t l_1880[3][4][4] = {{{0xEBB3L,0x28F1L,0x5A36L,0x28F1L},{0xEBB3L,0x9C2CL,1UL,0x28F1L},{1UL,0x28F1L,1UL,0x9C2CL},{0xEBB3L,0x28F1L,0x5A36L,0x28F1L}},{{0xEBB3L,0x9C2CL,1UL,0x28F1L},{1UL,0x28F1L,1UL,0x9C2CL},{0xEBB3L,0x28F1L,0x5A36L,0x28F1L},{0xEBB3L,0x9C2CL,1UL,0x28F1L}},{{1UL,0x28F1L,1UL,0x9C2CL},{0xEBB3L,0x28F1L,0x5A36L,0x28F1L},{0xEBB3L,0x9C2CL,1UL,0x28F1L},{1UL,0x28F1L,1UL,0x9C2CL}}}; + struct S0 **l_1910 = &g_803; + int16_t l_1918 = (-9L); + uint32_t l_1946[7] = {0xEE53957CL,0xEE53957CL,0x80BFCBB2L,0xEE53957CL,0xEE53957CL,0x80BFCBB2L,0xEE53957CL}; + const int8_t *l_2008 = &g_1473[4]; + const int8_t **l_2007[1][3]; + int32_t l_2058 = (-1L); + int32_t l_2060 = 1L; + int32_t l_2062 = 0L; + int32_t l_2063 = 2L; + int32_t l_2064 = 0x983A5C25L; + int32_t l_2066 = (-4L); + int32_t l_2068[10] = {0L,(-4L),(-4L),0L,(-4L),(-4L),0L,(-4L),(-4L),0L}; + int32_t l_2107 = 0xA817EE1CL; + uint16_t l_2110 = 5UL; + int32_t l_2187[2][1][6] = {{{0xDE7BFC06L,1L,0xDE7BFC06L,0xDE7BFC06L,1L,0xDE7BFC06L}},{{0xDE7BFC06L,1L,0xDE7BFC06L,0xDE7BFC06L,1L,0xDE7BFC06L}}}; + int16_t * const l_2211 = (void*)0; + int16_t * const *l_2210 = &l_2211; + uint32_t l_2251 = 1UL; + int i, j, k; + for (i = 0; i < 1; i++) + { + for (j = 0; j < 3; j++) + l_2007[i][j] = &l_2008; + } +lbl_2200: + for (g_491 = 0; (g_491 <= 2); g_491 += 1) + { /* block id: 673 */ + union U2 *** const l_1324 = &g_1058; + int32_t l_1338 = 0x5C08166EL; + struct S0 l_1356 = {-6L,0x5D1AL,2UL,4UL,255UL}; + struct S1 l_1369 = {7L,0x11B39F74L,0UL,{0x463DL,1UL,0x5561L,0UL,255UL},0UL}; + uint16_t *l_1374[2]; + int32_t l_1422 = 0x6B8C6F9AL; + int32_t l_1426[9][1] = {{0x9BCC42A8L},{1L},{0x9BCC42A8L},{1L},{0x9BCC42A8L},{1L},{0x9BCC42A8L},{1L},{0x9BCC42A8L}}; + uint32_t l_1461 = 1UL; + int8_t *l_1605 = &g_368[5][2][0]; + int32_t *l_1607 = &l_1421; + int32_t l_1684 = (-3L); + int32_t **** const l_1691 = &g_362[1][1]; + uint32_t *l_1715 = &g_1474; + uint32_t ***l_1733 = &l_1709; + uint32_t l_1760 = 0xCBADAB3CL; + int32_t **l_1761 = (void*)0; + uint8_t l_1804 = 0UL; + int16_t *l_1841 = &g_367; + int32_t l_1854[2][5] = {{0x57B5A700L,9L,0x57B5A700L,0x57B5A700L,9L},{9L,0x57B5A700L,0x57B5A700L,9L,0x57B5A700L}}; + int32_t **l_1855 = &l_1607; + const union U2 **l_1904 = &g_1006; + const union U2 ***l_1903 = &l_1904; + int16_t l_1948 = 0xC682L; + uint32_t l_2035 = 18446744073709551612UL; + int8_t l_2059 = 0x14L; + int16_t l_2072 = (-1L); + int32_t l_2099 = 1L; + struct S1 l_2115 = {0xA4L,0xBD652974L,0x549FL,{0xE04CL,65535UL,0x13F6L,2UL,0xCCL},65531UL}; + struct S1 **l_2135[6][2]; + struct S1 **l_2136 = &g_202[4][6]; + int i, j; + for (i = 0; i < 2; i++) + l_1374[i] = &g_429[3][2][4].f4; + for (i = 0; i < 6; i++) + { + for (j = 0; j < 2; j++) + l_2135[i][j] = (void*)0; + } + } + for (g_33 = (-20); (g_33 == 8); g_33++) + { /* block id: 1056 */ + const uint8_t l_2192 = 0xB9L; + int16_t *l_2197 = &g_367; + int32_t l_2206 = 0xFE778CABL; + int32_t l_2218 = (-1L); + int32_t l_2219 = (-6L); + int32_t l_2221 = 0x90AE588BL; + int32_t l_2222 = 0L; + int32_t l_2223 = 1L; + int32_t l_2225[1][3]; + int16_t l_2249[4] = {0xAF2AL,0xAF2AL,0xAF2AL,0xAF2AL}; + uint32_t l_2250[7] = {0xC3BA4CE7L,0xC3BA4CE7L,0xC3BA4CE7L,0xC3BA4CE7L,0xC3BA4CE7L,0xC3BA4CE7L,0xC3BA4CE7L}; + int32_t * const **l_2253 = (void*)0; + int32_t * const ***l_2252 = &l_2253; + int32_t *l_2254 = &l_2068[2]; + int i, j; + for (i = 0; i < 1; i++) + { + for (j = 0; j < 3; j++) + l_2225[i][j] = 0x74BA6E8EL; + } + if (l_2187[1][0][2]) + break; + if (((safe_add_func_int8_t_s_s(((((((((safe_rshift_func_int8_t_s_s(((*l_1795) = (l_2192 >= ((0xB0C3E753L || p_37) > (*l_1724)))), 6)) , ((p_37 , 4UL) < (((safe_add_func_uint16_t_u_u(2UL, ((*l_2197) |= ((*l_1724) & ((safe_sub_func_int8_t_s_s(((((l_2058 = (l_2192 , l_2192)) & (*l_1724)) > (*l_1724)) , (-9L)), 1UL)) , (*p_36)))))) , l_2192) , p_37))) != (*p_36)) , (*g_522)) & (*l_1724)) , 4294967295UL) | p_37) | p_37), (*p_35))) || p_37)) + { /* block id: 1061 */ + if (p_37) + break; + } + else + { /* block id: 1063 */ + int32_t l_2201 = 5L; + int32_t l_2205[8] = {2L,2L,2L,2L,2L,2L,2L,2L}; + int i; + (*g_688) |= p_37; + for (l_1720.f4 = 0; (l_1720.f4 != 17); ++l_1720.f4) + { /* block id: 1067 */ + uint32_t l_2207 = 4294967294UL; + int32_t l_2217 = 0x44EE3AA8L; + int32_t l_2220[6][9] = {{0xB18AA35AL,0L,0L,0xB18AA35AL,0L,(-1L),0xB18AA35AL,(-1L),0L},{0xB18AA35AL,0L,0L,0xB18AA35AL,0L,(-1L),0xB18AA35AL,(-1L),0L},{0xB18AA35AL,0L,0L,0xB18AA35AL,0L,(-1L),0xB18AA35AL,(-1L),0L},{0xB18AA35AL,0L,0L,0xB18AA35AL,0L,(-1L),0xB18AA35AL,(-1L),0L},{0xB18AA35AL,0L,0L,0xB18AA35AL,0L,(-1L),0xB18AA35AL,(-1L),0L},{0xB18AA35AL,0L,0L,0xB18AA35AL,0L,(-1L),0xB18AA35AL,(-1L),0L}}; + int8_t l_2224 = 0xF2L; + int8_t l_2229 = 8L; + int32_t l_2231[8][6][5] = {{{0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L},{(-1L),(-1L),(-1L),(-1L),(-1L)},{0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L},{(-1L),(-1L),(-1L),(-1L),(-1L)},{0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L},{(-1L),(-1L),(-1L),(-1L),(-1L)}},{{0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L},{(-1L),(-1L),(-1L),(-1L),(-1L)},{0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L},{(-1L),(-1L),(-1L),(-1L),(-1L)},{0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L},{(-1L),(-1L),(-1L),(-1L),(-1L)}},{{0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L},{(-1L),(-1L),(-1L),(-1L),(-1L)},{0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L},{(-1L),(-1L),(-1L),(-1L),(-1L)},{0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L},{(-1L),(-1L),(-1L),(-1L),(-1L)}},{{0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L},{(-1L),(-1L),(-1L),(-1L),(-1L)},{0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L},{(-1L),(-1L),(-1L),(-1L),(-1L)},{0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L},{(-1L),(-1L),(-1L),(-1L),(-1L)}},{{0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L},{(-1L),(-1L),(-1L),(-1L),(-1L)},{0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L},{(-1L),(-1L),(-1L),(-1L),(-1L)},{0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L},{(-1L),(-1L),(-1L),(-1L),(-1L)}},{{0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L},{(-1L),(-1L),(-1L),(-1L),(-1L)},{0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L},{(-1L),(-1L),(-1L),(-1L),(-1L)},{0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L},{(-1L),(-1L),(-1L),(-1L),(-1L)}},{{0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L},{(-1L),(-1L),(-1L),(-1L),(-1L)},{0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L},{(-1L),(-1L),(-1L),(-1L),(-1L)},{0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L},{(-1L),(-1L),(-1L),(-1L),(-1L)}},{{0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L},{(-1L),(-1L),(-1L),(-1L),(-1L)},{0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L},{(-1L),(-1L),(-1L),(-1L),(-1L)},{0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L},{(-1L),(-1L),(-1L),(-1L),(-1L)}}}; + int i, j, k; + if (g_491) + goto lbl_2200; + if (l_2201) + break; + for (l_1720.f0 = 0; (l_1720.f0 <= 5); l_1720.f0 += 1) + { /* block id: 1072 */ + int32_t *l_2202 = &g_902; + int32_t *l_2203 = &l_2060; + int32_t *l_2204[9][10][2] = {{{&g_33,&l_2187[1][0][0]},{(void*)0,&l_2060},{&l_2068[6],&l_2066},{&l_2187[0][0][3],&l_1879},{(void*)0,&g_82},{&l_2066,&g_902},{&l_2068[2],&l_1424},{&l_2066,&g_902},{&l_1879,&l_2060},{&l_2187[1][0][0],(void*)0}},{{&g_902,&l_2064},{&g_29,&l_2062},{&l_2062,&l_2062},{&g_29,&l_2068[2]},{&l_2060,&g_29},{&l_2064,&g_902},{&l_2060,&l_2064},{&l_2062,&g_29},{&l_2062,&l_2064},{&l_2060,&g_902}},{{&l_2064,&g_29},{&l_2060,&l_2068[2]},{&g_29,&l_2062},{&l_2062,&l_2062},{&g_29,&l_2064},{&g_902,(void*)0},{&l_2187[1][0][0],&l_2060},{&l_1879,&g_902},{&l_2066,&l_1424},{&l_2068[2],&g_902}},{{&l_2066,&g_82},{(void*)0,&l_1879},{&l_2187[0][0][3],&l_2066},{&l_2068[6],&l_2060},{(void*)0,&l_2187[1][0][0]},{&g_33,&l_2201},{&g_902,&l_2201},{&g_33,&l_2187[1][0][0]},{(void*)0,&l_2062},{&l_2201,(void*)0}},{{&g_29,&g_29},{&l_2063,&l_1424},{(void*)0,&l_2187[1][0][3]},{&g_33,&l_2062},{&l_2187[0][0][3],&g_29},{&g_29,&g_902},{&g_82,&l_2068[2]},{&l_2066,&l_2064},{&g_902,&l_2062},{&g_902,&g_902}},{{&g_902,&g_33},{&g_902,&l_2187[0][0][1]},{(void*)0,&l_2187[1][0][0]},{&l_2062,(void*)0},{&g_82,&g_902},{&g_82,(void*)0},{&l_2062,&l_2187[1][0][0]},{(void*)0,&l_2187[0][0][1]},{&g_902,&g_33},{&g_902,&g_902}},{{&g_902,&l_2062},{&g_902,&l_2064},{&l_2066,&l_2068[2]},{&g_82,&g_902},{&g_29,&g_29},{&l_2187[0][0][3],&l_2062},{&g_33,&l_2187[1][0][3]},{(void*)0,&l_1424},{&l_2063,&g_29},{&g_29,(void*)0}},{{&l_2201,&l_2062},{&l_2060,&g_82},{&l_2066,&l_2060},{&l_2187[1][0][0],&l_2060},{&l_2066,&g_82},{&l_2060,&l_2062},{&l_2201,(void*)0},{&g_29,&g_29},{&l_2063,&l_1424},{(void*)0,&l_2187[1][0][3]}},{{&g_33,&l_2062},{&l_2187[0][0][3],&g_29},{&g_29,&g_902},{&g_82,&l_2068[2]},{&l_2066,&l_2064},{&g_902,&l_2062},{&g_902,&g_902},{&g_902,&g_33},{&g_902,&l_2187[0][0][1]},{(void*)0,&l_2187[1][0][0]}}}; + int16_t l_2230 = 0xA55CL; + uint32_t l_2232 = 0xE71201CAL; + int i, j, k; + for (l_2107 = 0; (l_2107 <= 5); l_2107 += 1) + { /* block id: 1075 */ + return p_37; + } + ++l_2207; + for (l_2062 = 0; (l_2062 <= 3); l_2062 += 1) + { /* block id: 1081 */ + int8_t l_2214[9][2][1] = {{{1L},{(-1L)}},{{1L},{1L}},{{0xCDL},{1L}},{{1L},{(-1L)}},{{1L},{1L}},{{0xCDL},{1L}},{{1L},{(-1L)}},{{1L},{1L}},{{0xCDL},{1L}}}; + int32_t l_2215 = (-1L); + int32_t l_2216[8][5][6] = {{{0xFD5A2C04L,0L,5L,0x228BFD3AL,(-1L),8L},{0L,0xE3760A9BL,0x89E7159DL,0xA48B00B6L,0x89E7159DL,0xE3760A9BL},{0L,8L,(-1L),0x228BFD3AL,5L,0L},{0xFD5A2C04L,(-1L),0x533CC7D1L,0x4AD7B503L,(-1L),0x533CC7D1L},{0xA48B00B6L,(-1L),0xB16858CAL,0xFD5A2C04L,5L,(-1L)}},{{0x9AB37E89L,8L,0xE1CFE88EL,0xF47BBD48L,0x89E7159DL,0xB16858CAL},{0x228BFD3AL,0xE3760A9BL,0xE1CFE88EL,0x075C4389L,(-1L),(-1L)},{7L,0L,0xB16858CAL,(-3L),0x533CC7D1L,0x533CC7D1L},{(-3L),0x533CC7D1L,0x533CC7D1L,(-3L),0xB16858CAL,0L},{7L,(-1L),(-1L),0x075C4389L,0xE1CFE88EL,0xE3760A9BL}},{{0x228BFD3AL,0xB16858CAL,0x89E7159DL,0xF47BBD48L,0xE1CFE88EL,8L},{0x9AB37E89L,(-1L),5L,0xFD5A2C04L,0x70EF0CBEL,(-1L)},{0xB16858CAL,0xEADC0E19L,(-10L),0x533CC7D1L,0xEADC0E19L,(-1L)},{0L,(-7L),0x115524F0L,(-1L),(-1L),0L},{0L,0x8D68B320L,2L,0xB16858CAL,2L,0x8D68B320L}},{{0L,0L,(-1L),(-1L),0x115524F0L,(-7L)},{0L,(-1L),0xEADC0E19L,0x533CC7D1L,(-10L),0xEADC0E19L},{0xB16858CAL,(-1L),0x70EF0CBEL,0L,0x115524F0L,(-10L)},{0x7BCB3C11L,0L,(-1L),0xE3760A9BL,2L,0x70EF0CBEL},{(-1L),0x8D68B320L,(-1L),8L,(-1L),(-10L)}},{{0xE1CFE88EL,(-7L),0x70EF0CBEL,(-1L),0xEADC0E19L,0xEADC0E19L},{(-1L),0xEADC0E19L,0xEADC0E19L,(-1L),0x70EF0CBEL,(-7L)},{0xE1CFE88EL,(-10L),(-1L),8L,(-1L),0x8D68B320L},{(-1L),0x70EF0CBEL,2L,0xE3760A9BL,(-1L),0L},{0x7BCB3C11L,(-10L),0x115524F0L,0L,0x70EF0CBEL,(-1L)}},{{0xB16858CAL,0xEADC0E19L,(-10L),0x533CC7D1L,0xEADC0E19L,(-1L)},{0L,(-7L),0x115524F0L,(-1L),(-1L),0L},{0L,0x8D68B320L,2L,0xB16858CAL,2L,0x8D68B320L},{0L,0L,(-1L),(-1L),0x115524F0L,(-7L)},{0L,(-1L),0xEADC0E19L,0x533CC7D1L,(-10L),0xEADC0E19L}},{{0xB16858CAL,(-1L),0x70EF0CBEL,0L,0x115524F0L,(-10L)},{0x7BCB3C11L,0L,(-1L),0xE3760A9BL,2L,0x70EF0CBEL},{(-1L),0x8D68B320L,(-1L),8L,(-1L),(-10L)},{0xE1CFE88EL,(-7L),0x70EF0CBEL,(-1L),0xEADC0E19L,0xEADC0E19L},{(-1L),0xEADC0E19L,0xEADC0E19L,(-1L),0x70EF0CBEL,(-7L)}},{{0xE1CFE88EL,(-10L),(-1L),8L,(-1L),0x8D68B320L},{(-1L),0x70EF0CBEL,2L,0xE3760A9BL,(-1L),0L},{0x7BCB3C11L,(-10L),0x115524F0L,0L,0x70EF0CBEL,(-1L)},{0xB16858CAL,0xEADC0E19L,(-10L),0x533CC7D1L,0xEADC0E19L,(-1L)},{0L,(-7L),0x115524F0L,(-1L),(-1L),0L}}}; + uint16_t l_2226 = 0xF37BL; + int i, j, k; + g_2212 = l_2210; + l_2226--; + } + ++l_2232; + } + } + } + (*l_2254) &= ((((((*g_522) ^= l_2222) != (~l_2218)) & ((*l_1711) ^= (((!((**g_712)--)) < ((g_2039 = l_1721) != ((safe_mod_func_uint16_t_u_u((((safe_rshift_func_uint8_t_u_u(((safe_mod_func_int8_t_s_s((*p_35), p_37)) || (((safe_div_func_int32_t_s_s((!((*g_688) = 0L)), (safe_mul_func_uint8_t_u_u((p_37 > ((safe_sub_func_int16_t_s_s(((void*)0 == l_1453), 0x3F36L)) == p_37)), l_2206)))) && (*l_1724)) > l_2249[1])), p_37)) | l_2250[3]) & l_2251), (*g_146))) , l_2252))) & 0x16L))) & 0xDEL) , (-10L)); + } + return p_37; +} + + +/* ------------------------------------------ */ +/* + * reads : g_33 g_688 g_82 g_23 g_1006 g_522 g_203.f3.f1 g_713 g_146 g_29 g_23.f2 g_10 g_9 g_448 g_23.f0 g_193 g_27 g_130 g_96 g_202 g_94 g_140 g_132 g_141 g_275 g_203.f3.f0 g_203.f3.f4 g_362 g_367 g_203.f1 g_368 g_802 g_803 + * writes: g_82 g_23 g_94 g_1010 g_202 g_29 g_203.f1 g_92 g_275 g_448 g_28 g_203.f0 g_96 g_141 g_193.f3 g_9 g_663.f1 g_803 + */ +static int8_t * func_38(int32_t * p_39) +{ /* block id: 461 */ + union U2 l_983 = {0xA18EBFA4L}; + uint32_t *l_993[4][4][5] = {{{&g_27,&g_27,&g_491,&g_491,&g_27},{&g_491,&g_27,(void*)0,&g_27,&g_491},{&g_27,&g_491,&g_491,&g_27,&g_27},{&g_491,&g_27,&g_491,&g_491,&g_491}},{{&g_27,&g_27,&g_27,&g_491,&g_27},{&g_491,&g_491,(void*)0,&g_491,&g_491},{&g_27,&g_491,&g_27,&g_27,&g_27},{&g_491,&g_491,&g_491,&g_27,&g_491}},{{&g_27,&g_27,&g_491,&g_491,&g_27},{&g_491,&g_27,(void*)0,&g_27,&g_491},{&g_27,&g_491,&g_491,&g_27,&g_27},{&g_491,&g_27,&g_491,&g_491,&g_491}},{{&g_27,&g_27,&g_27,&g_491,&g_27},{&g_491,&g_491,(void*)0,&g_491,&g_491},{&g_27,&g_491,&g_27,&g_27,&g_27},{&g_491,&g_491,&g_491,&g_27,&g_491}}}; + uint32_t **l_992 = &l_993[1][2][2]; + uint32_t *l_994 = &g_275[5][2]; + int8_t *l_999 = &g_448; + int8_t **l_1000 = &l_999; + struct S1 l_1002 = {0x00L,1L,0x1C11L,{-1L,0xDCFBL,0UL,0x327FL,0x73L},0x0032L}; + int32_t l_1003 = 0x037EDC74L; + int8_t *l_1004 = &g_9; + union U2 *l_1005 = &g_23; + uint8_t *l_1008[3]; + uint32_t l_1020[10][5][5] = {{{0xF2AA9CB4L,0xF2AA9CB4L,0xB9798130L,1UL,0x84C3A2C5L},{9UL,6UL,0xDB4B8351L,0x79CDF276L,18446744073709551612UL},{2UL,1UL,4UL,0xCFC16537L,1UL},{0xED3C58A6L,6UL,18446744073709551615UL,0x05959D90L,0UL},{0x1FE60990L,0xF2AA9CB4L,18446744073709551611UL,2UL,1UL}},{{1UL,0xCE69CB81L,2UL,18446744073709551610UL,7UL},{0xBDDE72C4L,1UL,8UL,0x3AB83C40L,1UL},{6UL,1UL,0x412240A3L,0x38E14851L,0x56FAA21DL},{0xF174B866L,0xCFC16537L,18446744073709551613UL,0UL,0xB9798130L},{0x46E8FA96L,18446744073709551615UL,0x0979A739L,0xDB4B8351L,0x38E14851L}},{{0x23A25F20L,18446744073709551615UL,18446744073709551608UL,18446744073709551615UL,0x23A25F20L},{0xA159F13BL,0x56FAA21DL,18446744073709551610UL,0x255BB07DL,0x0979A739L},{0xA884EFE1L,9UL,0x0C1255E5L,1UL,0xBDDE72C4L},{0UL,0x79CDF276L,6UL,0x56FAA21DL,0x0979A739L},{18446744073709551612UL,1UL,18446744073709551615UL,0UL,0x23A25F20L}},{{0x0979A739L,18446744073709551615UL,0UL,6UL,0x38E14851L},{0UL,4UL,1UL,18446744073709551611UL,0xB9798130L},{1UL,0xA159F13BL,0x46E8FA96L,0x7D73904FL,0x56FAA21DL},{6UL,8UL,0UL,1UL,1UL},{0xDB4B8351L,0x31587566L,18446744073709551615UL,18446744073709551615UL,7UL}},{{3UL,0xED235A89L,0xC4ACEBD6L,1UL,1UL},{0x31587566L,9UL,0x31587566L,18446744073709551608UL,0UL},{0x8530C162L,0xC4ACEBD6L,0xA884EFE1L,0x4D4F19E2L,1UL},{0UL,1UL,18446744073709551608UL,1UL,18446744073709551612UL},{1UL,0x23A25F20L,0xA884EFE1L,1UL,0x84C3A2C5L}},{{0xF30BAE18L,7UL,0x31587566L,0x412240A3L,0xA159F13BL},{0UL,0xA884EFE1L,0xF2AA9CB4L,0xAC889584L,18446744073709551615UL},{1UL,1UL,0x412240A3L,18446744073709551608UL,0x34DC149FL},{0UL,18446744073709551615UL,0UL,0xA4772EFEL,0x2E7448B6L},{6UL,0x79CDF276L,0UL,0xCE69CB81L,18446744073709551615UL}},{{6UL,0x4007BECEL,8UL,18446744073709551613UL,4UL},{1UL,0xED3C58A6L,0x05959D90L,0x05959D90L,0xED3C58A6L},{0xCB204103L,0xC82A66DFL,0x6DA78595L,0x3AB83C40L,0x23A25F20L},{9UL,1UL,0xF30BAE18L,0x412240A3L,0xEDF2696BL},{0x9ADF3501L,0UL,18446744073709551611UL,18446744073709551612UL,1UL}},{{9UL,0x0979A739L,0UL,0x31587566L,1UL},{0xCB204103L,18446744073709551615UL,6UL,0x23A25F20L,0xB970E888L},{1UL,0x28F68007L,0x0281312AL,2UL,18446744073709551608UL},{6UL,0x8530C162L,1UL,18446744073709551607UL,18446744073709551615UL},{6UL,0x71A1A02CL,1UL,0xED3C58A6L,18446744073709551612UL}},{{0UL,0x84C3A2C5L,0xB9798130L,18446744073709551615UL,0UL},{1UL,0x38E14851L,6UL,18446744073709551610UL,0x31587566L},{1UL,1UL,1UL,1UL,18446744073709551608UL},{1UL,0xA159F13BL,0x31587566L,0x255BB07DL,1UL},{0xCFC16537L,18446744073709551612UL,18446744073709551615UL,1UL,18446744073709551615UL}},{{0x0979A739L,18446744073709551610UL,18446744073709551615UL,0x255BB07DL,1UL},{0xC82A66DFL,0xBDDE72C4L,9UL,1UL,0xA884EFE1L},{7UL,1UL,0UL,18446744073709551610UL,0x43467938L},{0xCA5F646AL,0xB970E888L,4UL,18446744073709551615UL,0xAC889584L},{18446744073709551615UL,0x412240A3L,1UL,0xED3C58A6L,18446744073709551610UL}}}; + int32_t l_1035[1]; + uint16_t l_1075[7]; + int8_t l_1104[2][6][3] = {{{(-1L),(-1L),(-1L)},{3L,0xE2L,3L},{(-1L),(-1L),(-1L)},{3L,0xE2L,3L},{(-1L),(-1L),(-1L)},{3L,0xE2L,3L}},{{(-1L),(-1L),(-1L)},{3L,0xE2L,3L},{(-1L),(-1L),(-1L)},{3L,0xE2L,3L},{(-1L),(-1L),(-1L)},{3L,0xE2L,3L}}}; + union U2 *l_1162[3][1]; + uint32_t l_1163 = 0x33E342EBL; + int8_t l_1263[4][4][5]; + const struct S0 *l_1312 = &g_663; + const struct S0 **l_1311 = &l_1312; + int i, j, k; + for (i = 0; i < 3; i++) + l_1008[i] = &g_141[1][4]; + for (i = 0; i < 1; i++) + l_1035[i] = (-4L); + for (i = 0; i < 7; i++) + l_1075[i] = 0xB9F4L; + for (i = 0; i < 3; i++) + { + for (j = 0; j < 1; j++) + l_1162[i][j] = &l_983; + } + for (i = 0; i < 4; i++) + { + for (j = 0; j < 4; j++) + { + for (k = 0; k < 5; k++) + l_1263[i][j][k] = 5L; + } + } + (*g_688) &= (*p_39); + if ((safe_rshift_func_uint8_t_u_u((l_983 , (l_1003 = ((*g_713) = ((((((*l_1005) = (l_983.f2 , g_23)) , &l_983) != g_1006) >= (*g_522)) , 0x0CL)))), 3))) + { /* block id: 469 */ + int8_t **l_1009[4][8][8] = {{{&g_10,&g_10,&l_1004,&l_999,&l_999,&g_10,&l_1004,&l_1004},{&l_999,&g_10,(void*)0,&g_10,&l_999,&g_10,&g_10,&l_1004},{&l_1004,&l_999,&g_10,&g_10,&l_1004,&l_999,&l_1004,(void*)0},{&g_10,&g_10,(void*)0,&l_1004,(void*)0,&l_1004,&l_999,&l_1004},{&l_999,&l_1004,(void*)0,&l_1004,&g_10,&g_10,&g_10,&l_999},{&l_999,(void*)0,&l_1004,&l_1004,&l_1004,(void*)0,&l_999,&l_999},{&g_10,(void*)0,&l_1004,&l_1004,&g_10,&l_999,&g_10,&l_1004},{&l_1004,&g_10,&l_1004,&l_999,(void*)0,&l_999,&g_10,&g_10}},{{(void*)0,&g_10,(void*)0,&l_1004,&g_10,(void*)0,&l_999,&g_10},{(void*)0,(void*)0,&l_1004,(void*)0,&l_999,&l_999,&l_1004,&l_999},{&l_1004,&g_10,&g_10,&g_10,(void*)0,&g_10,&l_1004,&l_999},{(void*)0,&l_999,&l_1004,&l_999,&l_1004,(void*)0,&g_10,(void*)0},{&l_999,&l_999,&l_999,&l_1004,&l_999,&g_10,&g_10,&l_1004},{&g_10,&g_10,&l_999,&g_10,&g_10,(void*)0,&l_1004,&g_10},{&l_999,&l_1004,&g_10,&g_10,&l_999,(void*)0,&l_1004,&g_10},{&l_999,(void*)0,&g_10,&l_999,&l_1004,(void*)0,(void*)0,(void*)0}},{{&g_10,&l_999,&l_1004,&l_999,&g_10,(void*)0,&l_1004,&l_1004},{(void*)0,&l_1004,&l_999,&l_999,&l_1004,(void*)0,&g_10,&l_1004},{&l_999,&l_1004,&l_999,&l_999,&g_10,(void*)0,&l_1004,(void*)0},{&l_1004,&l_1004,&g_10,&l_999,&l_999,&l_1004,&l_1004,&l_1004},{(void*)0,&l_999,&l_1004,&l_999,&g_10,&g_10,(void*)0,&l_1004},{&g_10,(void*)0,&l_1004,&l_999,&l_1004,(void*)0,&g_10,(void*)0},{&l_1004,&g_10,&l_999,&l_999,&g_10,&g_10,&g_10,&g_10},{&l_999,&g_10,(void*)0,&g_10,&l_1004,&l_999,&l_999,&g_10}},{{&l_1004,&g_10,&l_999,&g_10,(void*)0,&l_999,&g_10,&l_1004},{&g_10,&l_1004,&l_999,&l_1004,(void*)0,&g_10,&l_1004,(void*)0},{&l_999,&l_1004,&l_1004,&l_999,&g_10,(void*)0,(void*)0,&l_999},{&l_1004,&l_999,&l_999,&g_10,&g_10,&l_1004,&l_1004,&l_999},{&g_10,&g_10,(void*)0,(void*)0,&l_999,&g_10,&l_999,(void*)0},{&g_10,(void*)0,&g_10,&l_1004,(void*)0,&l_999,&l_1004,&l_1004},{&g_10,&l_1004,(void*)0,&l_1004,(void*)0,&l_1004,&g_10,&l_1004},{&l_999,(void*)0,&g_10,&g_10,(void*)0,&g_10,(void*)0,&l_999}}}; + int32_t **l_1011 = &g_28[0]; + int i, j, k; + (*l_1011) = func_45((g_1010 = &g_448), &g_29, &g_448); + } + else + { /* block id: 472 */ + const int16_t l_1021 = (-10L); + int32_t l_1032[10][2][6] = {{{1L,8L,3L,3L,8L,1L},{(-1L),1L,3L,1L,(-1L),(-1L)}},{{4L,1L,1L,4L,8L,4L},{4L,8L,4L,1L,1L,4L}},{{(-1L),(-1L),1L,3L,1L,(-1L)},{1L,8L,3L,3L,8L,1L}},{{(-1L),1L,3L,1L,(-1L),(-1L)},{4L,1L,1L,4L,8L,4L}},{{4L,8L,4L,1L,1L,4L},{(-1L),(-1L),1L,3L,1L,(-1L)}},{{1L,8L,3L,3L,8L,1L},{(-1L),1L,3L,1L,(-1L),(-1L)}},{{4L,1L,1L,4L,8L,4L},{4L,8L,4L,1L,1L,4L}},{{(-1L),(-1L),1L,3L,1L,(-1L)},{1L,8L,3L,3L,8L,1L}},{{(-1L),1L,3L,1L,(-1L),(-1L)},{4L,1L,1L,4L,8L,4L}},{{4L,8L,4L,1L,1L,4L},{(-1L),(-1L),1L,3L,1L,(-1L)}}}; + uint32_t l_1040 = 0x46C4402DL; + int32_t l_1048 = (-1L); + uint16_t l_1051 = 0xAEDFL; + int8_t ***l_1054 = &l_1000; + union U2 **l_1057[7]; + union U2 l_1091 = {0xD559D94EL}; + struct S1 l_1093 = {0x59L,-10L,0xE7A5L,{0x9AAAL,0x6F3EL,5UL,65533UL,1UL},0x1B19L}; + int32_t ***l_1137[4] = {(void*)0,(void*)0,(void*)0,(void*)0}; + int32_t ****l_1138[4]; + uint8_t **l_1144 = (void*)0; + uint8_t ***l_1143 = &l_1144; + uint32_t l_1178[3]; + const uint8_t *l_1224 = (void*)0; + const uint8_t **l_1223 = &l_1224; + uint32_t l_1264 = 18446744073709551615UL; + union U2 l_1304[5] = {{0xC351DB28L},{0xC351DB28L},{0xC351DB28L},{0xC351DB28L},{0xC351DB28L}}; + int i, j, k; + for (i = 0; i < 7; i++) + l_1057[i] = &l_1005; + for (i = 0; i < 4; i++) + l_1138[i] = &l_1137[0]; + for (i = 0; i < 3; i++) + l_1178[i] = 1UL; + for (g_193.f3 = 26; (g_193.f3 <= 11); g_193.f3 = safe_sub_func_uint8_t_u_u(g_193.f3, 1)) + { /* block id: 475 */ + int16_t l_1033 = 0L; + int32_t l_1036 = (-1L); + int32_t l_1037[8] = {2L,(-5L),2L,(-5L),2L,(-5L),2L,(-5L)}; + int i; + for (g_9 = 0; (g_9 == (-15)); g_9 = safe_sub_func_uint32_t_u_u(g_9, 4)) + { /* block id: 478 */ + int8_t l_1031 = 0x69L; + int32_t l_1034 = 0xDBC85C67L; + int32_t l_1038[1]; + int i; + for (i = 0; i < 1; i++) + l_1038[i] = 0x1432EEBAL; + if ((*p_39)) + break; + for (g_663.f1 = 0; (g_663.f1 == 24); g_663.f1 = safe_add_func_uint16_t_u_u(g_663.f1, 7)) + { /* block id: 482 */ + int8_t l_1022[10][10][2] = {{{0xA6L,0x74L},{(-3L),0x73L},{0xBAL,(-3L)},{0x73L,0x74L},{0x73L,(-3L)},{0xBAL,0x73L},{(-3L),0x74L},{0xA6L,0xA6L},{0xBAL,0xA6L},{0xA6L,0x74L}},{{(-3L),0x73L},{0xBAL,(-3L)},{0x65L,1L},{0x65L,0x74L},{0x0AL,0x65L},{0x74L,1L},{0xBAL,0xBAL},{0x0AL,0xBAL},{0xBAL,1L},{0x74L,0x65L}},{{0x0AL,0x74L},{0x65L,1L},{0x65L,0x74L},{0x0AL,0x65L},{0x74L,1L},{0xBAL,0xBAL},{0x0AL,0xBAL},{0xBAL,1L},{0x74L,0x65L},{0x0AL,0x74L}},{{0x65L,1L},{0x65L,0x74L},{0x0AL,0x65L},{0x74L,1L},{0xBAL,0xBAL},{0x0AL,0xBAL},{0xBAL,1L},{0x74L,0x65L},{0x0AL,0x74L},{0x65L,1L}},{{0x65L,0x74L},{0x0AL,0x65L},{0x74L,1L},{0xBAL,0xBAL},{0x0AL,0xBAL},{0xBAL,1L},{0x74L,0x65L},{0x0AL,0x74L},{0x65L,1L},{0x65L,0x74L}},{{0x0AL,0x65L},{0x74L,1L},{0xBAL,0xBAL},{0x0AL,0xBAL},{0xBAL,1L},{0x74L,0x65L},{0x0AL,0x74L},{0x65L,1L},{0x65L,0x74L},{0x0AL,0x65L}},{{0x74L,1L},{0xBAL,0xBAL},{0x0AL,0xBAL},{0xBAL,1L},{0x74L,0x65L},{0x0AL,0x74L},{0x65L,1L},{0x65L,0x74L},{0x0AL,0x65L},{0x74L,1L}},{{0xBAL,0xBAL},{0x0AL,0xBAL},{0xBAL,1L},{0x74L,0x65L},{0x0AL,0x74L},{0x65L,1L},{0x65L,0x74L},{0x0AL,0x65L},{0x74L,1L},{0xBAL,0xBAL}},{{0x0AL,0xBAL},{0xBAL,1L},{0x74L,0x65L},{0x0AL,0x74L},{0x65L,1L},{0x65L,0x74L},{0x0AL,0x65L},{0x74L,1L},{0xBAL,0xBAL},{0x0AL,0xBAL}},{{0xBAL,1L},{0x74L,0x65L},{0x0AL,0x74L},{0x65L,1L},{0x65L,0x74L},{0x0AL,0x65L},{0x74L,1L},{0xBAL,0xBAL},{0x0AL,0xBAL},{0xBAL,1L}}}; + int32_t l_1029 = 0xD4525DBDL; + int32_t l_1039 = (-1L); + int i, j, k; + if ((((safe_rshift_func_uint8_t_u_s(l_1020[0][2][0], 2)) & l_1021) <= l_1022[5][2][1])) + { /* block id: 483 */ + int32_t *l_1023 = &g_82; + int32_t *l_1024 = &g_82; + int32_t *l_1025 = &g_33; + int32_t *l_1026 = &g_33; + int32_t *l_1027 = &g_33; + int32_t *l_1028 = &g_902; + int32_t *l_1030[3][9][6] = {{{(void*)0,(void*)0,&l_1029,&l_1029,&l_1029,(void*)0},{(void*)0,&l_1003,&l_1003,&l_1029,&l_1003,(void*)0},{&g_902,&g_29,&g_29,&g_29,&g_29,&l_1029},{(void*)0,(void*)0,&l_1003,&g_29,(void*)0,&l_1029},{(void*)0,&g_82,&l_1003,&g_29,(void*)0,&g_29},{(void*)0,&g_29,&g_82,&g_29,(void*)0,&l_1003},{&l_1029,(void*)0,&g_902,(void*)0,&g_902,(void*)0},{(void*)0,&l_1003,&l_1029,(void*)0,&g_902,(void*)0},{&g_82,&g_29,&g_902,&g_33,&l_1003,&l_1003}},{{&g_902,(void*)0,&g_82,&g_902,&g_82,&g_29},{&g_33,&g_33,&l_1003,&g_82,&g_29,&l_1029},{(void*)0,(void*)0,&l_1003,(void*)0,&g_29,&l_1029},{(void*)0,&g_33,&g_902,&l_1029,&g_82,&l_1029},{&g_29,(void*)0,&l_1029,(void*)0,&l_1003,&l_1003},{&g_29,&g_29,&l_1029,(void*)0,&g_902,&g_902},{&g_29,&l_1003,&l_1029,(void*)0,&g_902,&g_33},{&g_29,(void*)0,(void*)0,(void*)0,(void*)0,(void*)0},{&g_29,&g_29,(void*)0,&l_1029,(void*)0,&l_1003}},{{(void*)0,&g_82,(void*)0,(void*)0,(void*)0,(void*)0},{(void*)0,(void*)0,(void*)0,&g_82,&g_29,&l_1003},{&g_33,&g_82,(void*)0,&g_902,&l_1029,(void*)0},{&g_902,&l_1029,(void*)0,&g_33,&g_33,&g_33},{&g_82,(void*)0,&l_1029,(void*)0,(void*)0,&g_902},{(void*)0,(void*)0,&l_1029,(void*)0,&g_33,&l_1003},{&l_1029,&l_1029,&l_1029,&g_29,&l_1029,&l_1029},{(void*)0,&g_82,&g_902,&g_29,&g_29,&l_1029},{(void*)0,(void*)0,&l_1003,&g_29,(void*)0,&l_1029}}}; + int i, j, k; + ++l_1040; + (*l_1023) ^= 0x1C9C1B24L; + (*g_802) = (*g_802); + } + else + { /* block id: 487 */ + return &g_368[5][5][0]; + } + } + } + } + } + return &g_368[4][0][2]; +} + + +/* ------------------------------------------ */ +/* + * reads : g_712 g_713 g_94 g_146 g_23.f2 g_10 g_9 g_522 g_203.f3.f1 g_709 g_141 g_193.f3 g_33 g_82 g_29 g_663.f1 g_275 g_27 g_663.f0 g_870 g_368 g_688 g_802 g_663.f3 g_23 g_429.f3.f2 + * writes: g_33 g_82 g_29 g_709 g_94 g_193.f3 g_663.f1 g_27 g_23.f2 g_203.f3.f1 g_203.f1 g_203.f3.f3 g_28 g_131 g_9 g_803 g_663.f3 g_275 + */ +static union U2 func_40(int32_t * p_41, int8_t * p_42, struct S0 p_43, int32_t p_44) +{ /* block id: 368 */ + int16_t *l_813 = &g_367; + int32_t l_816[2]; + int32_t **l_829 = (void*)0; + int32_t **l_830 = (void*)0; + uint32_t *l_831 = &g_709[8][1]; + struct S1 *l_834 = (void*)0; + struct S0 l_841 = {-3L,0xA66BL,0x139EL,0x6331L,0x55L}; + int32_t l_923 = 0xBFDBBFDCL; + int32_t ** const l_926[1][9][9] = {{{&g_28[4],(void*)0,&g_28[2],&g_688,&g_688,&g_28[4],&g_28[1],&g_28[4],&g_28[4]},{&g_28[0],&g_688,&g_28[2],&g_688,&g_28[2],&g_688,&g_28[0],&g_688,&g_688},{&g_28[4],&g_28[4],&g_28[5],(void*)0,&g_28[4],&g_688,&g_28[1],(void*)0,&g_28[1]},{&g_688,(void*)0,&g_28[4],&g_28[4],(void*)0,&g_688,&g_688,&g_688,&g_28[0]},{(void*)0,&g_28[2],&g_688,&g_688,&g_28[4],&g_28[1],&g_28[4],&g_28[4],&g_28[4]},{&g_688,&g_28[2],&g_688,&g_28[2],&g_688,&g_28[0],&g_688,&g_688,&g_688},{&g_28[1],(void*)0,&g_28[5],&g_28[1],&g_28[4],&g_688,&g_28[4],&g_688,&g_28[4]},{&g_688,&g_688,&g_688,&g_688,(void*)0,&g_28[0],&g_688,&g_28[4],(void*)0},{&g_28[4],&g_28[2],&g_28[4],&g_28[5],&g_688,&g_28[4],&g_28[4],&g_688,&g_28[5]}}}; + int32_t l_967 = (-1L); + uint8_t *l_974 = &g_96; + uint8_t **l_973 = &l_974; + uint32_t l_977 = 0xBFD29E8DL; + int i, j, k; + for (i = 0; i < 2; i++) + l_816[i] = 1L; + (*p_41) = ((0xD2E1L || (safe_add_func_uint8_t_u_u(((&g_92 != l_813) & (**g_712)), ((((*g_146) > 0x6A77L) > (4294967295UL > ((*g_10) >= (safe_mod_func_uint32_t_u_u(((*g_10) < 0xCCL), 0x2EF7E0E9L))))) != l_816[1])))) & (*g_522)); + if ((((65535UL != (safe_div_func_int16_t_s_s((safe_sub_func_uint8_t_u_u((safe_add_func_uint8_t_u_u((safe_mod_func_int8_t_s_s((safe_add_func_uint32_t_u_u((((&p_41 == ((safe_sub_func_int16_t_s_s(p_44, ((((((!((((**g_712) = (((l_829 = l_829) != l_830) ^ (((*l_831) |= (l_816[1] | l_816[0])) , (~(~(safe_sub_func_int16_t_s_s(p_43.f0, (l_834 == (void*)0)))))))) || 0x4FL) & p_43.f0)) < p_43.f2) == l_816[0]) < 0UL) == 0x4FL) <= 0UL))) , (void*)0)) , p_44) , 0x00332CCCL), p_44)), p_43.f1)), g_141[5][6])), l_816[0])), l_816[1]))) <= (*g_10)) <= l_816[0])) + { /* block id: 373 */ + union U2 *l_835 = &g_23; + int32_t l_844 = 0L; + int32_t l_845 = 4L; + uint32_t *l_849 = &g_709[5][2]; + int32_t l_861 = 0x2D871063L; + int32_t l_874[6][4][7] = {{{0xEBD23C63L,0x86B45C9EL,0xDBC25A38L,9L,0x7306DC66L,0xE137DD82L,0x7306DC66L},{0L,0x708144BCL,0x7DC3FFEAL,(-1L),0xD4CDFA73L,4L,0x2AEFA674L},{(-4L),0xE137DD82L,0x04C8643BL,0x86B45C9EL,0x430DC65CL,1L,1L},{(-4L),0x3D08D363L,0x2AEFA674L,0x60F55FAEL,(-1L),0x60F55FAEL,0x2AEFA674L}},{{0xDBC25A38L,0xDBC25A38L,1L,0x8300C942L,1L,0x352C77AFL,0x7306DC66L},{4L,0x90ADCA77L,0x694C6AD6L,0x708144BCL,(-4L),0x2FF8803EL,0L},{0x352C77AFL,0xA85E05AAL,1L,0x7306DC66L,1L,0xA85E05AAL,0x352C77AFL},{1L,0x60F55FAEL,0L,(-1L),(-1L),(-6L),0x7DC3FFEAL}},{{1L,0x04C8643BL,0xE2858F44L,0x7C754C8AL,0x430DC65CL,0xEBD23C63L,0xEBD23C63L},{0xD4CDFA73L,(-4L),0L,(-4L),0xD4CDFA73L,0L,0x7DD96E50L},{1L,0x8300C942L,1L,0x352C77AFL,0x7306DC66L,0x58C09AECL,0x430DC65CL},{0x8CCDD4F0L,5L,0x694C6AD6L,0xF7130A0DL,0L,(-1L),0L}},{{1L,0x352C77AFL,1L,(-4L),0xE137DD82L,0x04C8643BL,0x86B45C9EL},{0xD4CDFA73L,4L,0x2AEFA674L,0L,0L,0x90ADCA77L,1L},{1L,1L,0x04C8643BL,0xA85E05AAL,0xA85E05AAL,0x04C8643BL,1L},{1L,(-1L),0x7DC3FFEAL,0x92B23D5EL,(-5L),(-1L),(-4L)}},{{0x352C77AFL,0xE2858F44L,0xDBC25A38L,1L,0x86B45C9EL,0x58C09AECL,0x7C754C8AL},{4L,(-6L),(-9L),0x92B23D5EL,0L,0L,(-1L)},{0xDBC25A38L,0x7C754C8AL,1L,0xA85E05AAL,(-4L),0xEBD23C63L,0xE137DD82L},{(-4L),0xF7130A0DL,(-1L),0L,0x694C6AD6L,(-6L),0x694C6AD6L}},{{(-4L),0x7C754C8AL,0x7C754C8AL,(-4L),0xE2858F44L,0xA85E05AAL,0x58C09AECL},{0L,(-6L),1L,0xF7130A0DL,1L,0x2FF8803EL,0L},{0xA8F0C9FCL,0x8300C942L,0x352C77AFL,0x04C8643BL,0xEBD23C63L,0x04C8643BL,0x352C77AFL},{(-4L),0xC335D284L,1L,0x708144BCL,0xD4CDFA73L,5L,(-9L)}}}; + int8_t l_892 = 0x14L; + uint32_t l_898 = 0UL; + uint8_t **l_972[2][5][1]; + int i, j, k; + for (i = 0; i < 2; i++) + { + for (j = 0; j < 5; j++) + { + for (k = 0; k < 1; k++) + l_972[i][j][k] = (void*)0; + } + } + for (g_193.f3 = 0; (g_193.f3 <= 2); g_193.f3 += 1) + { /* block id: 376 */ + union U2 **l_836 = &l_835; + int32_t l_871 = (-4L); + int32_t l_884 = (-5L); + int32_t l_888 = 0x753BF6FFL; + int32_t l_895 = (-1L); + int32_t l_896[8] = {9L,9L,0x5C7D4CE2L,9L,9L,0x5C7D4CE2L,9L,9L}; + int32_t l_901[4] = {2L,2L,2L,2L}; + struct S1 l_930[6] = {{0x79L,1L,1UL,{2L,65535UL,9UL,0x5A57L,255UL},0UL},{0x79L,1L,1UL,{2L,65535UL,9UL,0x5A57L,255UL},0UL},{0x79L,1L,1UL,{2L,65535UL,9UL,0x5A57L,255UL},0UL},{0x79L,1L,1UL,{2L,65535UL,9UL,0x5A57L,255UL},0UL},{0x79L,1L,1UL,{2L,65535UL,9UL,0x5A57L,255UL},0UL},{0x79L,1L,1UL,{2L,65535UL,9UL,0x5A57L,255UL},0UL}}; + int i; + (*l_836) = l_835; + if ((*p_41)) + continue; + for (g_29 = 2; (g_29 >= 0); g_29 -= 1) + { /* block id: 381 */ + int8_t l_872 = 0xD6L; + int32_t l_881 = 0xC2359472L; + int32_t l_882 = 7L; + int32_t l_883 = (-1L); + int32_t l_885 = 0x0CE63601L; + int32_t l_887[6][3] = {{(-2L),(-2L),0xFF72B15AL},{0x336CEA91L,0x336CEA91L,(-10L)},{(-2L),(-2L),0xFF72B15AL},{0x336CEA91L,0x336CEA91L,(-10L)},{(-2L),(-2L),0xFF72B15AL},{0x336CEA91L,0x336CEA91L,(-10L)}}; + struct S0 *l_956 = (void*)0; + int i, j; + for (g_663.f1 = 0; (g_663.f1 <= 2); g_663.f1 += 1) + { /* block id: 384 */ + uint32_t *l_846 = &g_27; + uint32_t **l_850 = &l_831; + int32_t *l_862 = &g_203.f1; + uint32_t l_865 = 0UL; + uint32_t *l_873 = &l_865; + union U2 l_875 = {-6L}; + struct S1 *l_876[4][8] = {{(void*)0,(void*)0,&g_203,&g_429[3][2][4],(void*)0,&g_429[3][2][4],(void*)0,(void*)0},{&g_429[3][2][4],(void*)0,&g_203,&g_429[3][2][4],&g_429[0][4][4],&g_429[3][2][4],&g_203,(void*)0},{(void*)0,(void*)0,&g_429[3][2][4],&g_429[3][2][4],(void*)0,&g_203,&g_429[0][4][4],&g_429[3][2][4]},{&g_429[1][1][5],&g_429[0][4][4],&g_429[1][1][3],(void*)0,(void*)0,&g_429[1][1][3],&g_429[0][4][4],&g_429[1][1][5]}}; + int32_t l_886 = 0xC62C1A3DL; + int32_t l_889 = 1L; + int32_t l_890 = (-4L); + int32_t l_891 = 0xBBD98B66L; + int32_t l_894[6] = {9L,9L,9L,9L,9L,9L}; + int32_t l_897 = 0L; + int32_t *l_911 = &l_891; + int i, j; + if ((safe_mod_func_int32_t_s_s((safe_mul_func_int16_t_s_s((l_841 , 1L), ((((*l_873) = (((safe_lshift_func_int16_t_s_u(((l_844 ^= g_275[(g_663.f1 + 2)][g_29]) != ((*l_846)++)), (((l_849 = l_849) == ((*l_850) = &g_275[0][1])) , (safe_add_func_uint16_t_u_u((safe_rshift_func_uint16_t_u_u(((*g_146)--), ((((*g_522) = (*g_522)) <= (safe_rshift_func_uint16_t_u_u(((safe_mod_func_uint8_t_u_u((((*l_862) = (l_861 ^= l_845)) , ((safe_mul_func_int32_t_s_s(l_865, ((((safe_rshift_func_uint8_t_u_s((((((safe_lshift_func_uint8_t_u_u((p_43.f1 ^ (*g_10)), l_865)) , g_663.f0) , g_870) == p_43.f1) | (**g_712)), 6)) < l_871) | (*p_42)) != (*p_42)))) , p_43.f3)), (*g_713))) , 0x8497L), 0))) , (*g_522)))), (-6L)))))) >= 0xF1L) >= l_872)) < l_871) < p_43.f1))), l_874[4][3][3]))) + { /* block id: 394 */ + return l_875; + } + else + { /* block id: 396 */ + struct S1 **l_877 = &l_876[2][3]; + int32_t *l_878 = (void*)0; + int32_t *l_879 = (void*)0; + int32_t *l_880[5][6] = {{&l_874[2][2][5],&l_816[1],&l_845,&l_845,&l_816[1],&l_874[2][2][5]},{&l_874[2][2][5],(void*)0,&l_844,&l_845,(void*)0,&l_845},{&l_874[2][2][5],&l_871,&l_874[2][2][5],&l_845,&l_871,&l_844},{&l_874[2][2][5],&l_816[1],&l_845,&l_845,&l_816[1],&l_874[2][2][5]},{&l_874[2][2][5],(void*)0,&l_844,&l_845,(void*)0,&l_845}}; + int16_t l_893 = 0xC5C8L; + int i, j; + (*l_877) = l_876[2][5]; + l_898++; + l_816[1] |= (l_841.f3 != (l_888 = (*p_41))); + } + if (l_901[2]) + continue; + } + for (l_871 = 0; (l_871 <= 1); l_871 += 1) + { /* block id: 422 */ + uint16_t l_941[1]; + union U2 l_942[5][7] = {{{7L},{1L},{-3L},{7L},{0xD252D763L},{7L},{-3L}},{{-3L},{-3L},{-4L},{0x81C8047CL},{1L},{-7L},{-3L}},{{-3L},{-3L},{0x0CC969D1L},{1L},{-1L},{-1L},{1L}},{{7L},{0xD252D763L},{7L},{-3L},{1L},{7L},{0x1BEE06C4L}},{{1L},{0xD252D763L},{1L},{0x81C8047CL},{0xD252D763L},{-4L},{0xD252D763L}}}; + int32_t **l_951 = &g_364; + int i, j; + for (i = 0; i < 1; i++) + l_941[i] = 0x94B7L; + for (g_203.f3.f3 = 0; (g_203.f3.f3 <= 1); g_203.f3.f3 += 1) + { /* block id: 425 */ + int32_t **l_925 = (void*)0; + int8_t * const l_927 = &g_9; + int8_t *l_929 = &g_368[7][5][2]; + int8_t **l_928 = &l_929; + uint32_t *l_940 = &g_491; + int i; + (*g_688) = (l_925 != l_926[0][2][5]); + g_131 = (g_28[4] = &p_44); + if (l_881) + break; + } + p_44 = ((safe_div_func_int16_t_s_s(((((!l_883) != p_43.f3) <= ((((((*p_41) < (((*g_10) = (safe_lshift_func_int8_t_s_u((((**g_712)++) ^ (l_951 != (void*)0)), (0x1EDDL & ((safe_mod_func_int16_t_s_s(((l_884 = (safe_sub_func_uint32_t_u_u(l_861, (*p_41)))) > 4294967291UL), 0xD5B9L)) <= g_709[8][1]))))) <= 0UL)) , (*p_42)) || (*p_42)) || p_43.f2) , (*p_42))) < (*p_41)), 65535UL)) == 0L); + } + (*g_802) = l_956; + for (l_898 = 0; (l_898 <= 2); l_898 += 1) + { /* block id: 444 */ + for (g_663.f3 = 0; (g_663.f3 <= 3); g_663.f3 += 1) + { /* block id: 447 */ + int i, j; + (*g_688) &= (safe_add_func_uint16_t_u_u((1L == (-1L)), (safe_lshift_func_uint8_t_u_s(g_709[(g_29 + 4)][l_898], 1)))); + return g_23; + } + } + } + } + (*g_688) = ((g_275[3][1] = 18446744073709551612UL) , (safe_sub_func_uint16_t_u_u(p_43.f4, ((((**g_712) = (safe_mod_func_int32_t_s_s(((*g_522) && (((safe_lshift_func_int8_t_s_s(l_967, (*g_10))) & ((*l_835) , (safe_mul_func_int8_t_s_s(((void*)0 != &g_202[3][1]), (((safe_mul_func_int8_t_s_s(0xFDL, (*g_713))) , l_972[1][4][0]) == l_973))))) ^ (**g_712))), g_429[3][2][4].f3.f2))) || (*p_42)) , (*g_146))))); + } + else + { /* block id: 457 */ + int8_t l_975 = (-4L); + int32_t l_976[2]; + int i; + for (i = 0; i < 2; i++) + l_976[i] = 0xB56CD2F2L; + l_977++; + } + return g_23; +} + + +/* ------------------------------------------ */ +/* + * reads : g_146 g_33 g_82 g_23.f2 g_10 g_9 g_23.f0 g_193 g_23 g_27 g_130 g_96 g_202 g_94 g_203.f1 g_140 g_132 g_141 g_275 g_203.f3.f0 g_203.f3.f4 g_203.f0 g_362 g_367 g_368 g_29 g_448 + * writes: g_94 g_82 g_202 g_33 g_203.f1 g_92 g_275 g_9 g_23.f2 g_28 g_203.f0 g_96 g_141 g_29 g_448 + */ +static int32_t * func_45(int8_t * const p_46, int32_t * p_47, int8_t * p_48) +{ /* block id: 34 */ + int16_t l_149 = 0x2C69L; + int32_t l_158 = 1L; + uint8_t *l_159[6][2][6] = {{{(void*)0,&g_96,(void*)0,&g_96,&g_94,(void*)0},{&g_141[5][6],&g_96,&g_141[5][5],&g_141[3][4],&g_96,&g_141[5][6]}},{{(void*)0,&g_141[3][1],&g_141[0][2],&g_141[5][6],&g_141[5][6],&g_94},{&g_96,&g_141[5][5],(void*)0,(void*)0,(void*)0,(void*)0}},{{&g_96,&g_96,&g_141[3][4],&g_141[3][1],(void*)0,&g_141[0][1]},{&g_141[1][1],&g_141[0][1],&g_96,(void*)0,&g_141[5][6],&g_141[3][4]}},{{&g_141[3][4],(void*)0,&g_96,&g_141[5][6],&g_96,(void*)0},{&g_96,&g_141[5][6],&g_96,&g_96,&g_141[3][3],(void*)0}},{{&g_96,&g_141[3][3],(void*)0,(void*)0,&g_141[3][1],(void*)0},{(void*)0,&g_96,(void*)0,&g_96,&g_141[3][4],&g_94}},{{&g_141[3][4],(void*)0,&g_141[1][1],&g_141[5][6],&g_94,&g_141[5][5]},{&g_141[3][3],&g_96,&g_96,&g_141[5][6],&g_94,&g_96}}}; + int32_t l_162 = 0L; + int32_t l_163 = 0x368D4868L; + int32_t l_164 = (-1L); + int32_t l_165[5][8] = {{9L,1L,0xCF0CBDDEL,1L,9L,1L,0xCF0CBDDEL,1L},{9L,1L,0xCF0CBDDEL,1L,9L,1L,0xCF0CBDDEL,1L},{9L,1L,0xCF0CBDDEL,1L,9L,1L,0xCF0CBDDEL,1L},{9L,1L,0xCF0CBDDEL,1L,9L,1L,0xCF0CBDDEL,1L},{9L,1L,0xCF0CBDDEL,1L,9L,1L,0xCF0CBDDEL,1L}}; + uint16_t l_168 = 65531UL; + union U2 l_194 = {0x9F5D8235L}; + int8_t l_195 = (-8L); + uint32_t l_245 = 0x0D5D64FBL; + struct S1 l_261[4][9] = {{{0x1AL,0xB8D20E8FL,0xAA2CL,{0x140FL,0UL,0UL,1UL,255UL},65535UL},{0x41L,0L,65526UL,{0x72A8L,1UL,0x65E9L,0xAE67L,0x65L},0x7144L},{0x3BL,9L,0xE902L,{0x2921L,1UL,0UL,0xE230L,0UL},0x52D0L},{0x15L,0xCBFC918AL,0xD33FL,{-10L,0x77D2L,65535UL,65530UL,0xBBL},65535UL},{0x41L,0L,65526UL,{0x72A8L,1UL,0x65E9L,0xAE67L,0x65L},0x7144L},{0x15L,0xCBFC918AL,0xD33FL,{-10L,0x77D2L,65535UL,65530UL,0xBBL},65535UL},{0x3BL,9L,0xE902L,{0x2921L,1UL,0UL,0xE230L,0UL},0x52D0L},{0x41L,0L,65526UL,{0x72A8L,1UL,0x65E9L,0xAE67L,0x65L},0x7144L},{0x1AL,0xB8D20E8FL,0xAA2CL,{0x140FL,0UL,0UL,1UL,255UL},65535UL}},{{0x1AL,0xB8D20E8FL,0xAA2CL,{0x140FL,0UL,0UL,1UL,255UL},65535UL},{0x41L,0L,65526UL,{0x72A8L,1UL,0x65E9L,0xAE67L,0x65L},0x7144L},{0x3BL,9L,0xE902L,{0x2921L,1UL,0UL,0xE230L,0UL},0x52D0L},{0x15L,0xCBFC918AL,0xD33FL,{-10L,0x77D2L,65535UL,65530UL,0xBBL},65535UL},{0x41L,0L,65526UL,{0x72A8L,1UL,0x65E9L,0xAE67L,0x65L},0x7144L},{0x15L,0xCBFC918AL,0xD33FL,{-10L,0x77D2L,65535UL,65530UL,0xBBL},65535UL},{0x3BL,9L,0xE902L,{0x2921L,1UL,0UL,0xE230L,0UL},0x52D0L},{0x41L,0L,65526UL,{0x72A8L,1UL,0x65E9L,0xAE67L,0x65L},0x7144L},{0x1AL,0xB8D20E8FL,0xAA2CL,{0x140FL,0UL,0UL,1UL,255UL},65535UL}},{{0x1AL,0xB8D20E8FL,0xAA2CL,{0x140FL,0UL,0UL,1UL,255UL},65535UL},{0x41L,0L,65526UL,{0x72A8L,1UL,0x65E9L,0xAE67L,0x65L},0x7144L},{0x3BL,9L,0xE902L,{0x2921L,1UL,0UL,0xE230L,0UL},0x52D0L},{0x15L,0xCBFC918AL,0xD33FL,{-10L,0x77D2L,65535UL,65530UL,0xBBL},65535UL},{0x41L,0L,65526UL,{0x72A8L,1UL,0x65E9L,0xAE67L,0x65L},0x7144L},{0x15L,0xCBFC918AL,0xD33FL,{-10L,0x77D2L,65535UL,65530UL,0xBBL},65535UL},{0x3BL,9L,0xE902L,{0x2921L,1UL,0UL,0xE230L,0UL},0x52D0L},{0x41L,0L,65526UL,{0x72A8L,1UL,0x65E9L,0xAE67L,0x65L},0x7144L},{0x1AL,0xB8D20E8FL,0xAA2CL,{0x140FL,0UL,0UL,1UL,255UL},65535UL}},{{0x1AL,0xB8D20E8FL,0xAA2CL,{0x140FL,0UL,0UL,1UL,255UL},65535UL},{0x41L,0L,65526UL,{0x72A8L,1UL,0x65E9L,0xAE67L,0x65L},0x7144L},{0x3BL,9L,0xE902L,{0x2921L,1UL,0UL,0xE230L,0UL},0x52D0L},{0x15L,0xCBFC918AL,0xD33FL,{-10L,0x77D2L,65535UL,65530UL,0xBBL},65535UL},{0x41L,0L,65526UL,{0x72A8L,1UL,0x65E9L,0xAE67L,0x65L},0x7144L},{0x15L,0xCBFC918AL,0xD33FL,{-10L,0x77D2L,65535UL,65530UL,0xBBL},65535UL},{0x3BL,9L,0xE902L,{0x2921L,1UL,0UL,0xE230L,0UL},0x52D0L},{0x41L,0L,65526UL,{0x72A8L,1UL,0x65E9L,0xAE67L,0x65L},0x7144L},{0x1AL,0xB8D20E8FL,0xAA2CL,{0x140FL,0UL,0UL,1UL,255UL},65535UL}}}; + int32_t **l_298 = (void*)0; + int8_t l_302 = 3L; + uint32_t l_384 = 8UL; + int32_t **l_615 = &g_364; + uint16_t **l_616 = &g_146; + int32_t l_659 = 0x16F391CCL; + struct S0 *l_660 = &l_261[3][8].f3; + uint16_t l_779[5] = {0xCE19L,0xCE19L,0xCE19L,0xCE19L,0xCE19L}; + uint8_t l_784 = 0xE9L; + int i, j, k; + if ((((safe_rshift_func_int8_t_s_s(((void*)0 != g_146), 4)) <= ((safe_add_func_uint32_t_u_u(l_149, 0xCFA7979AL)) , (l_149 && (g_94 = ((safe_rshift_func_uint16_t_u_u((safe_mod_func_int16_t_s_s(((*p_47) , ((g_23.f2 && 4294967286UL) & (safe_sub_func_int16_t_s_s((safe_rshift_func_uint16_t_u_u(((((((&l_149 == (void*)0) <= (*g_10)) > 0x5FL) & l_149) | (*p_48)) && l_158), 1)), (*g_146))))), l_149)), 13)) == l_158))))) >= g_23.f0)) + { /* block id: 36 */ + int32_t *l_160 = &g_82; + int32_t *l_161[5] = {(void*)0,(void*)0,(void*)0,(void*)0,(void*)0}; + int32_t l_166 = (-1L); + int16_t l_167 = (-3L); + const struct S0 l_224 = {-1L,1UL,65535UL,1UL,0x64L}; + union U2 l_228 = {-1L}; + int32_t *l_340 = &l_164; + int32_t *l_349 = &g_140; + int32_t **l_348[5]; + struct S1 *l_353[1][8][2] = {{{&l_261[2][5],&l_261[2][5]},{&l_261[0][4],&l_261[2][5]},{&l_261[2][5],&l_261[0][4]},{&l_261[2][5],&l_261[2][5]},{&l_261[0][4],&l_261[2][5]},{&l_261[2][5],&l_261[0][4]},{&l_261[2][5],&l_261[2][5]},{&l_261[0][4],&l_261[2][5]}}}; + int i, j, k; + for (i = 0; i < 5; i++) + l_348[i] = &l_349; + --l_168; + if (l_163) + { /* block id: 38 */ + int32_t l_175 = 0x58B35087L; + int8_t *l_186 = &g_9; + int16_t *l_189[8][1][3] = {{{&l_149,&g_92,&g_92}},{{&g_92,&l_149,&l_149}},{{&l_149,&g_92,&g_92}},{{&g_92,&l_149,&l_149}},{{&l_149,&g_92,&g_92}},{{&g_92,&l_149,&l_149}},{{&l_149,&g_92,&g_92}},{{&g_92,&l_149,&l_149}}}; + int32_t l_190 = 4L; + uint8_t **l_198 = &l_159[5][1][1]; + uint8_t *l_201 = &g_94; + union U2 *l_207 = &g_23; + uint32_t *l_219[5] = {&g_27,&g_27,&g_27,&g_27,&g_27}; + uint32_t *l_263 = &g_27; + int i, j, k; + (*l_160) = (((safe_lshift_func_int16_t_s_u(l_165[1][2], (safe_lshift_func_int8_t_s_s(((l_175 == ((safe_lshift_func_uint16_t_u_s((safe_mod_func_int8_t_s_s((safe_lshift_func_int16_t_s_s(((((-2L) | (safe_sub_func_int16_t_s_s((safe_mod_func_uint16_t_u_u((l_186 == p_46), (l_190 = (4UL | ((safe_mul_func_int8_t_s_s((*l_160), 0xE7L)) != 4294967295UL))))), 1L))) < (*p_48)) | l_168), l_175)), 0x48L)), 10)) ^ (*g_10))) | (*p_48)), l_175)))) , (*g_146)) != 0x7572L); + if ((safe_mul_func_uint8_t_u_u(((((-9L) && ((((g_193 , (l_194 = g_23)) , (((l_195 ^ (safe_mod_func_int16_t_s_s(((((*l_198) = &g_96) == (l_194 , (void*)0)) & (((safe_mul_func_int8_t_s_s(((*p_48) | ((*l_201) = 1UL)), g_27)) ^ g_27) != g_130[0][5])), g_193.f3))) || 0xACL) , l_194)) , l_195) != l_175)) != g_96) < 4UL), (*p_48)))) + { /* block id: 44 */ + struct S1 **l_204 = &g_202[1][9]; + union U2 *l_208[5][1][10] = {{{&g_23,&g_23,&l_194,&g_23,(void*)0,&l_194,&g_23,&g_23,&l_194,(void*)0}},{{&l_194,&g_23,&g_23,&l_194,&l_194,&l_194,&g_23,&g_23,(void*)0,&g_23}},{{&l_194,&l_194,&g_23,&l_194,&g_23,&l_194,&g_23,&l_194,&g_23,&l_194}},{{&g_23,(void*)0,&g_23,&g_23,(void*)0,&g_23,&g_23,&l_194,&l_194,&l_194}},{{&l_194,&g_23,&l_194,&g_23,&l_194,(void*)0,(void*)0,&l_194,&g_23,&l_194}}}; + int32_t l_210 = 1L; + int32_t l_225 = 0x90807700L; + int i, j, k; + (*l_204) = g_202[4][9]; + for (g_82 = (-22); (g_82 < 17); g_82++) + { /* block id: 48 */ + uint32_t l_209 = 0x1A28751EL; + l_208[0][0][0] = l_207; + l_190 = (!(l_210 = l_209)); + } + (*l_160) &= 0xBCAB29ADL; + (*p_47) = ((l_165[1][6] &= (safe_add_func_uint32_t_u_u(((((safe_sub_func_uint8_t_u_u(((safe_div_func_int8_t_s_s((safe_lshift_func_uint8_t_u_s((*l_160), (*p_48))), g_94)) | (l_219[2] == &g_27)), (l_225 |= (((*p_47) > (safe_div_func_int8_t_s_s(l_210, l_164))) ^ (safe_mod_func_uint16_t_u_u(((l_224 , (*p_47)) | (*l_160)), g_94)))))) & g_27) == l_210) > 9UL), 0x54DDF528L))) > l_194.f0); + } + else + { /* block id: 57 */ + int16_t l_237 = 0x7730L; + uint8_t l_246 = 1UL; + int32_t l_247 = 1L; + uint16_t *l_252 = &g_203.f3.f1; + struct S1 l_264 = {-1L,0L,0UL,{0x4C04L,0UL,65535UL,0x3C41L,0x23L},1UL}; + uint32_t *l_273 = (void*)0; + uint32_t *l_274 = &g_275[5][2]; + for (g_203.f1 = 0; (g_203.f1 <= 0); g_203.f1 += 1) + { /* block id: 60 */ + return p_47; + } + if ((safe_mod_func_int8_t_s_s((l_228 , (safe_sub_func_uint8_t_u_u(((safe_lshift_func_uint8_t_u_u((safe_mul_func_int16_t_s_s((g_92 = (safe_div_func_uint8_t_u_u((&g_133[0] != ((l_237 && (l_190 && (l_247 ^= (l_246 = (!(0x5600L <= (((safe_unary_minus_func_uint32_t_u((safe_mod_func_uint16_t_u_u(((safe_lshift_func_uint8_t_u_u((safe_lshift_func_uint8_t_u_s(g_140, (*p_48))), ((*l_201) = (~(((void*)0 == &p_48) == (*p_47)))))) && 0x43L), l_245)))) > (*p_47)) >= l_237))))))) , &p_47)), (*l_160)))), 0L)), g_132)) & g_140), 0x38L))), 4UL))) + { /* block id: 67 */ + uint8_t l_262 = 0x79L; + (*p_47) = (l_262 &= (l_246 || ((safe_lshift_func_uint8_t_u_s((safe_mod_func_uint16_t_u_u(((void*)0 == l_252), (l_246 && (*g_146)))), (l_190 | (g_146 != ((safe_add_func_int8_t_s_s((safe_rshift_func_int16_t_s_s((safe_mod_func_int16_t_s_s((safe_mul_func_uint16_t_u_u((l_261[3][8] , l_149), 0x2EB2L)), (*l_160))), l_190)), l_246)) , (void*)0))))) >= g_132))); + } + else + { /* block id: 70 */ + return p_47; + } + (*l_160) = ((((l_165[1][6] = l_237) , (l_263 != (((!0xDFC7L) && ((((*l_274) = (l_264 , ((safe_add_func_int8_t_s_s(0x54L, (safe_lshift_func_uint16_t_u_u((safe_mul_func_int8_t_s_s((safe_add_func_int32_t_s_s((l_189[4][0][0] != ((l_165[1][6] , l_264.f3) , &g_92)), (*p_47))), 0L)), (*g_146))))) , 0xF01E3291L))) , (void*)0) == (void*)0)) , (void*)0))) != l_237) == (*p_47)); + } + } + else + { /* block id: 77 */ + uint32_t l_276 = 18446744073709551615UL; + int32_t **l_281 = &g_28[2]; + int8_t *l_292[9][7][4] = {{{(void*)0,&l_261[3][8].f0,&g_203.f0,&l_261[3][8].f0},{&l_261[3][8].f0,&l_261[3][8].f0,&g_203.f0,&l_261[3][8].f0},{(void*)0,&l_261[3][8].f0,&g_203.f0,&l_261[3][8].f0},{&g_203.f0,&l_261[3][8].f0,(void*)0,&g_203.f0},{&l_261[3][8].f0,&l_195,&g_203.f0,&l_195},{(void*)0,&l_261[3][8].f0,&l_195,&l_195},{&l_261[3][8].f0,&l_261[3][8].f0,&l_261[3][8].f0,&g_203.f0}},{{&l_195,(void*)0,&g_203.f0,&g_203.f0},{&l_195,&l_261[3][8].f0,&l_261[3][8].f0,&g_203.f0},{&l_261[3][8].f0,&g_203.f0,&l_195,(void*)0},{(void*)0,&g_203.f0,&g_203.f0,&g_203.f0},{&l_261[3][8].f0,&l_261[3][8].f0,(void*)0,&l_195},{&g_203.f0,&l_195,&g_203.f0,&l_261[3][8].f0},{(void*)0,(void*)0,&g_203.f0,&g_203.f0}},{{&l_261[3][8].f0,(void*)0,&g_203.f0,&l_261[3][8].f0},{(void*)0,&l_195,&l_195,&l_195},{&l_195,&l_261[3][8].f0,&l_195,&g_203.f0},{&g_203.f0,&g_203.f0,&g_203.f0,(void*)0},{&g_203.f0,&g_203.f0,&l_261[3][8].f0,&g_203.f0},{&g_203.f0,&l_261[3][8].f0,&l_261[3][8].f0,&g_203.f0},{(void*)0,(void*)0,&l_261[3][8].f0,&g_203.f0}},{{&g_203.f0,&l_261[3][8].f0,&l_261[3][8].f0,&l_195},{&g_203.f0,&l_261[3][8].f0,&g_203.f0,&l_195},{&g_203.f0,&l_195,&l_195,&g_203.f0},{&l_195,&l_261[3][8].f0,&l_195,&l_261[3][8].f0},{(void*)0,&l_261[3][8].f0,&g_203.f0,&l_261[3][8].f0},{&l_261[3][8].f0,&l_261[3][8].f0,&g_203.f0,&l_261[3][8].f0},{(void*)0,&l_261[3][8].f0,&g_203.f0,&l_261[3][8].f0}},{{&g_203.f0,&l_261[3][8].f0,(void*)0,&g_203.f0},{&l_261[3][8].f0,&l_195,&g_203.f0,&l_195},{(void*)0,&l_261[3][8].f0,&l_195,&l_195},{&l_261[3][8].f0,&l_261[3][8].f0,&l_261[3][8].f0,&g_203.f0},{&l_195,(void*)0,&g_203.f0,&g_203.f0},{&l_195,&l_261[3][8].f0,&l_261[3][8].f0,&g_203.f0},{&l_261[3][8].f0,&g_203.f0,&l_195,(void*)0}},{{(void*)0,&g_203.f0,&g_203.f0,&g_203.f0},{&l_261[3][8].f0,&l_261[3][8].f0,(void*)0,&l_195},{&g_203.f0,&l_195,&g_203.f0,&l_261[3][8].f0},{(void*)0,(void*)0,&g_203.f0,&g_203.f0},{&l_261[3][8].f0,(void*)0,&g_203.f0,&l_261[3][8].f0},{(void*)0,&l_195,&l_195,&l_195},{&l_195,(void*)0,&g_203.f0,&g_203.f0}},{{&l_261[3][8].f0,&l_261[3][8].f0,&l_261[3][8].f0,&l_195},{&l_195,&g_203.f0,(void*)0,&l_261[3][8].f0},{&g_203.f0,(void*)0,&l_261[3][8].f0,&g_203.f0},{&l_195,&l_261[3][8].f0,&l_261[3][8].f0,&l_195},{&g_203.f0,(void*)0,(void*)0,(void*)0},{&l_195,&l_195,&l_261[3][8].f0,&g_203.f0},{&l_261[3][8].f0,&g_203.f0,&g_203.f0,&l_261[3][8].f0}},{{&l_261[3][8].f0,&g_203.f0,(void*)0,(void*)0},{&l_195,&g_203.f0,&l_195,&l_261[3][8].f0},{&l_261[3][8].f0,(void*)0,&g_203.f0,&l_261[3][8].f0},{&g_203.f0,&g_203.f0,&l_261[3][8].f0,(void*)0},{&g_203.f0,&g_203.f0,&l_195,&l_261[3][8].f0},{(void*)0,&g_203.f0,&g_203.f0,&g_203.f0},{&l_195,&l_195,&l_261[3][8].f0,(void*)0}},{{&l_195,(void*)0,&g_203.f0,&l_195},{&l_195,&l_261[3][8].f0,&l_261[3][8].f0,&g_203.f0},{&l_195,(void*)0,&g_203.f0,&l_261[3][8].f0},{&l_195,&g_203.f0,&l_261[3][8].f0,&l_195},{&l_195,&l_261[3][8].f0,&g_203.f0,&g_203.f0},{(void*)0,(void*)0,&l_195,&l_261[3][8].f0},{&g_203.f0,&l_261[3][8].f0,&l_261[3][8].f0,&g_203.f0}}}; + int32_t l_293 = 0xAF17BE23L; + struct S1 l_339 = {3L,0xC6CD4D1FL,0x97B2L,{-1L,65534UL,0xDC6FL,0x8F73L,3UL},0x1D13L}; + int32_t ***l_350 = &l_348[0]; + int i, j, k; + if ((((l_293 = ((((l_276 &= (*g_146)) || (safe_sub_func_uint16_t_u_u((~(((*g_146) = ((safe_lshift_func_uint8_t_u_s(((((*p_48) = (l_281 == &p_47)) | (l_165[0][4] |= (g_96 || (safe_div_func_uint8_t_u_u(g_193.f0, (safe_sub_func_uint16_t_u_u(((safe_sub_func_int32_t_s_s((((((safe_add_func_uint32_t_u_u(((void*)0 != &g_27), (safe_div_func_int16_t_s_s(1L, (((0xFA23E02CL == l_164) >= g_141[3][0]) ^ g_275[5][2]))))) , &l_194) != &l_194) , &l_245) != p_47), (-9L))) ^ l_261[3][8].f1), g_203.f3.f0))))))) || l_158), 7)) != g_23.f2)) , 0x8DBAL)), l_261[3][8].f3.f4))) , &l_261[2][7]) == (void*)0)) , g_203.f3.f4) < l_261[3][8].f3.f2)) + { /* block id: 83 */ + union U2 l_299[9][3][7] = {{{{-6L},{0x7F560B45L},{0x7F560B45L},{-6L},{-6L},{0x7F560B45L},{0x7F560B45L}},{{0x193143B8L},{0x52F59610L},{0x193143B8L},{0x52F59610L},{0x193143B8L},{0x52F59610L},{0x193143B8L}},{{-6L},{-6L},{0x7F560B45L},{0x7F560B45L},{-6L},{-6L},{0x7F560B45L}}},{{{0L},{0x52F59610L},{0L},{0x52F59610L},{0L},{0x52F59610L},{0L}},{{-6L},{0x7F560B45L},{0x7F560B45L},{-6L},{-6L},{0x7F560B45L},{0x7F560B45L}},{{0x193143B8L},{0x52F59610L},{0x193143B8L},{0x52F59610L},{0x193143B8L},{0x52F59610L},{0x193143B8L}}},{{{-6L},{-6L},{0x7F560B45L},{0x7F560B45L},{-6L},{-6L},{0x7F560B45L}},{{0L},{0x52F59610L},{0L},{0x52F59610L},{0L},{0x52F59610L},{0L}},{{-6L},{0x7F560B45L},{0x7F560B45L},{-6L},{-6L},{0x7F560B45L},{0x7F560B45L}}},{{{0x193143B8L},{0x52F59610L},{0x193143B8L},{0x52F59610L},{0x193143B8L},{0x52F59610L},{0x193143B8L}},{{-6L},{-6L},{0x7F560B45L},{0x7F560B45L},{-6L},{-6L},{0x7F560B45L}},{{0L},{0x52F59610L},{0L},{0x52F59610L},{0L},{0x52F59610L},{0L}}},{{{-6L},{0x7F560B45L},{0x7F560B45L},{-6L},{-6L},{0x7F560B45L},{0x7F560B45L}},{{0x193143B8L},{0x52F59610L},{0x193143B8L},{0x52F59610L},{0x193143B8L},{0x52F59610L},{0x193143B8L}},{{-6L},{-6L},{0x7F560B45L},{0x7F560B45L},{-6L},{-6L},{0x7F560B45L}}},{{{0L},{0x52F59610L},{0L},{0x52F59610L},{0L},{0x52F59610L},{0L}},{{-6L},{0x7F560B45L},{0x7F560B45L},{-6L},{-6L},{0x7F560B45L},{0x7F560B45L}},{{0x193143B8L},{0x52F59610L},{0x193143B8L},{0x52F59610L},{0x193143B8L},{0x52F59610L},{0x193143B8L}}},{{{-6L},{-6L},{0x7F560B45L},{0x7F560B45L},{-6L},{-6L},{0x7F560B45L}},{{0L},{0x52F59610L},{0L},{0x52F59610L},{0L},{0x52F59610L},{0L}},{{-6L},{0x7F560B45L},{0x7F560B45L},{-6L},{-6L},{0x7F560B45L},{0x7F560B45L}}},{{{0x193143B8L},{0x52F59610L},{0x193143B8L},{0x52F59610L},{0x193143B8L},{0x52F59610L},{0x193143B8L}},{{-6L},{-6L},{0x7F560B45L},{0x7F560B45L},{-6L},{-6L},{0x7F560B45L}},{{0L},{0x52F59610L},{0L},{0x52F59610L},{0L},{0x52F59610L},{0L}}},{{{-6L},{0x7F560B45L},{0x7F560B45L},{-6L},{-6L},{0x7F560B45L},{0x7F560B45L}},{{0x193143B8L},{0x52F59610L},{0x193143B8L},{0x52F59610L},{0x193143B8L},{0x52F59610L},{0x193143B8L}},{{-6L},{-6L},{0x7F560B45L},{0x7F560B45L},{-6L},{-6L},{0x7F560B45L}}}}; + int16_t *l_303[10][2][5] = {{{&l_167,&g_92,&l_149,&l_149,&g_92},{(void*)0,(void*)0,&l_149,&l_167,&l_149}},{{(void*)0,(void*)0,&l_167,(void*)0,&l_167},{&g_92,&g_92,&l_149,&l_167,&g_92}},{{(void*)0,&l_167,(void*)0,&g_92,(void*)0},{(void*)0,(void*)0,&g_92,&g_92,&l_149}},{{&l_167,(void*)0,(void*)0,&l_167,(void*)0},{&g_92,&g_92,&l_149,(void*)0,&g_92}},{{(void*)0,(void*)0,&l_167,&l_167,&l_167},{(void*)0,(void*)0,(void*)0,&l_149,&l_167}},{{&g_92,&l_167,&l_149,&g_92,&g_92},{(void*)0,&g_92,&g_92,&g_92,(void*)0}},{{(void*)0,(void*)0,&l_149,&g_92,&l_149},{&g_92,(void*)0,(void*)0,&g_92,(void*)0}},{{&g_92,&g_92,&l_167,(void*)0,&g_92},{(void*)0,(void*)0,&l_149,&l_149,&l_167}},{{(void*)0,(void*)0,(void*)0,(void*)0,&l_149},{&g_92,&g_92,&g_92,&g_92,&g_92}},{{(void*)0,&g_92,(void*)0,&g_92,(void*)0},{(void*)0,(void*)0,&l_149,&g_92,&l_167}}}; + int32_t l_304 = (-1L); + int i, j, k; + (*p_47) |= (l_162 < ((l_304 |= (((safe_mul_func_int8_t_s_s((*p_48), (safe_mod_func_int8_t_s_s((l_298 == &g_133[0]), ((l_228 , l_299[6][2][1]) , (safe_add_func_uint16_t_u_u(l_302, (((void*)0 != &p_47) && l_299[6][2][1].f2)))))))) != (*g_146)) , g_193.f2)) <= (*g_146))); + } + else + { /* block id: 86 */ + int32_t *l_309 = &g_203.f1; + int32_t l_318 = (-1L); + int16_t *l_319 = &g_92; + if (((safe_lshift_func_int16_t_s_u((l_318 = ((safe_sub_func_uint16_t_u_u((*g_146), (((*l_309) = (g_23 , g_94)) , g_193.f3))) == ((*l_319) = (safe_sub_func_uint16_t_u_u((*g_146), ((safe_lshift_func_int8_t_s_u(5L, 4)) == (safe_rshift_func_int8_t_s_s((safe_lshift_func_int8_t_s_s(((0x4268F694L ^ l_318) <= g_96), (*p_48))), 5)))))))), 2)) != 0x143FL)) + { /* block id: 90 */ + int16_t l_335 = 1L; + int32_t l_338 = 0L; + (*l_281) = &g_29; + for (g_203.f0 = 0; (g_203.f0 >= 22); ++g_203.f0) + { /* block id: 94 */ + uint8_t l_328[2]; + int i; + for (i = 0; i < 2; i++) + l_328[i] = 0x73L; + l_338 &= ((((*g_146)++) > (0xCFFAL > ((0xDCFD5DADL != (safe_mul_func_uint8_t_u_u((~(g_96 = g_132)), ((safe_lshift_func_uint16_t_u_s((g_275[5][1] < l_328[1]), 10)) | (~((safe_sub_func_int32_t_s_s((*p_47), ((safe_mod_func_int32_t_s_s(0x7B9BFE1BL, ((safe_rshift_func_uint16_t_u_s((l_335 <= ((safe_rshift_func_uint8_t_u_u((g_141[0][1] = g_203.f3.f4), g_27)) || g_140)), g_193.f4)) && (*p_47)))) ^ 0x9CL))) == 0x78C5L)))))) || (-8L)))) == g_203.f3.f4); + return &g_82; + } + } + else + { /* block id: 101 */ + uint32_t l_344[4][4][4] = {{{4294967295UL,0x20A336BFL,0x508F9594L,0x20A336BFL},{1UL,0x4B5B738DL,1UL,0xFAAC7D03L},{0x20A336BFL,1UL,0xC65866FCL,0xFD1D0127L},{1UL,0x1FDA686FL,4294967286UL,4294967295UL}},{{1UL,0UL,0xC65866FCL,4294967286UL},{0x20A336BFL,4294967295UL,1UL,0x005F1C4FL},{0x005F1C4FL,4294967295UL,4294967295UL,4294967295UL},{1UL,1UL,0x005F1C4FL,1UL}},{{4294967295UL,4294967294UL,4294967286UL,0xC65866FCL},{0x508F9594L,0x005F1C4FL,4294967295UL,4294967286UL},{0UL,0x005F1C4FL,0xFD1D0127L,0xC65866FCL},{0x005F1C4FL,4294967294UL,0xFAAC7D03L,1UL}},{{0x05C4B03AL,1UL,0xBED9113FL,4294967295UL},{4294967286UL,4294967295UL,4294967286UL,0x005F1C4FL},{0x4687D50BL,4294967295UL,0UL,4294967286UL},{6UL,0UL,0UL,4294967295UL}}}; + int i, j, k; + if (((l_339 , (&g_33 != l_340)) != ((*p_48) = (-5L)))) + { /* block id: 103 */ + uint16_t l_341 = 0xCD7FL; + ++l_341; + } + else + { /* block id: 105 */ + int8_t **l_347[4]; + int i; + for (i = 0; i < 4; i++) + l_347[i] = &l_292[7][5][0]; + l_344[1][0][2]++; + (*p_47) &= (l_344[0][1][3] , ((g_23 , g_275[4][1]) > (&g_9 == (p_48 = (void*)0)))); + (*l_281) = p_47; + } + return &g_33; + } + } + (*l_340) = (*p_47); + (*l_350) = l_348[0]; + for (l_164 = (-28); (l_164 < (-6)); l_164 = safe_add_func_uint32_t_u_u(l_164, 6)) + { /* block id: 118 */ + struct S1 **l_354 = &g_202[4][9]; + (*l_354) = l_353[0][4][1]; + } + } + } + else + { /* block id: 122 */ + uint32_t l_355[5][5] = {{1UL,0x1EFE6392L,0x1EFE6392L,1UL,0x1EFE6392L},{1UL,1UL,1UL,1UL,1UL},{0x1EFE6392L,1UL,0x1EFE6392L,0x1EFE6392L,1UL},{1UL,0x08136386L,0x08136386L,1UL,0x08136386L},{1UL,1UL,4294967294UL,1UL,1UL}}; + int32_t l_369 = 0L; + struct S1 l_370 = {0x0FL,0x1D359E28L,0x2098L,{-1L,0UL,65535UL,0x21B8L,0x91L},0UL}; + uint8_t l_371 = 5UL; + int32_t *l_372 = &l_164; + int32_t *l_373 = &l_369; + int16_t *l_385[4]; + int32_t l_386 = 0x87316FB4L; + int32_t l_387[9] = {0x4A002CF8L,0x4A002CF8L,0x4A002CF8L,0x4A002CF8L,0x4A002CF8L,0x4A002CF8L,0x4A002CF8L,0x4A002CF8L,0x4A002CF8L}; + int8_t **l_402 = &g_10; + int8_t l_408 = (-2L); + uint32_t *l_459[7] = {&l_384,&l_384,&l_384,&l_384,&l_384,&l_384,&l_384}; + union U2 l_506 = {-1L}; + uint32_t * const l_541 = (void*)0; + uint32_t * const *l_540 = &l_541; + int8_t l_551 = (-7L); + int32_t l_562 = 0x7B63C334L; + int16_t l_572[2]; + uint32_t l_609[1][2][6] = {{{4294967295UL,4294967295UL,4294967295UL,4294967295UL,4294967295UL,4294967295UL},{4294967295UL,4294967295UL,4294967295UL,4294967295UL,4294967295UL,4294967295UL}}}; + uint32_t l_610 = 0xA2210773L; + uint16_t **l_617[5][10][2] = {{{&g_522,&g_522},{&g_522,&g_522},{&g_522,&g_522},{&g_522,&g_522},{&g_522,&g_522},{&g_522,&g_522},{&g_522,&g_522},{&g_522,&g_522},{&g_522,&g_522},{&g_522,&g_522}},{{&g_522,&g_522},{&g_522,&g_522},{&g_522,&g_522},{&g_522,&g_522},{&g_522,&g_522},{&g_522,&g_522},{&g_522,&g_522},{&g_522,&g_522},{&g_522,&g_522},{&g_522,&g_522}},{{&g_522,&g_522},{&g_522,&g_522},{&g_522,&g_522},{&g_522,&g_522},{&g_522,&g_522},{&g_522,&g_522},{&g_522,&g_522},{&g_522,&g_522},{&g_522,&g_522},{&g_522,&g_522}},{{&g_522,&g_522},{&g_522,&g_522},{&g_522,&g_522},{&g_522,&g_522},{&g_522,&g_522},{&g_522,&g_522},{&g_522,&g_522},{&g_522,&g_522},{&g_522,&g_522},{&g_522,&g_522}},{{&g_522,&g_522},{&g_522,&g_522},{&g_522,&g_522},{&g_522,&g_522},{&g_522,&g_522},{&g_522,&g_522},{&g_522,&g_522},{&g_522,&g_522},{&g_522,&g_522},{&g_522,&g_522}}}; + uint32_t l_622[8][10][3] = {{{4294967288UL,0xD980B936L,0UL},{0xCFF7DF80L,0xC6F50153L,4294967295UL},{4294967288UL,0x189C563AL,0xA0DDD608L},{0xB9019512L,5UL,1UL},{0UL,0xA209FE77L,0xF6C96FF1L},{0xF25DA586L,5UL,0xB9019512L},{0x55FB34F6L,9UL,0xA11D72F8L},{0x5C6871E7L,4294967290UL,0xB9019512L},{0UL,0xF6C96FF1L,0xF6C96FF1L},{0UL,0xE1B43826L,1UL}},{{4294967295UL,8UL,0xA0DDD608L},{0x35DA2F23L,1UL,4294967295UL},{0xA0DDD608L,0x55FB34F6L,0UL},{1UL,1UL,0x182BD3A5L},{0xD980B936L,8UL,0xD980B936L},{4294967287UL,0xE1B43826L,0xF25DA586L},{0xA209FE77L,0xF6C96FF1L,4294967288UL},{0x182BD3A5L,4294967290UL,4294967295UL},{0x29A9BD62L,9UL,0x15D08CC1L},{0x182BD3A5L,5UL,0x5C6871E7L}},{{0xA209FE77L,0xA209FE77L,8UL},{4294967287UL,5UL,1UL},{0xD980B936L,0x189C563AL,0xA209FE77L},{1UL,0xC6F50153L,0x48801177L},{0xA0DDD608L,0xD980B936L,0xA209FE77L},{0x35DA2F23L,0x2BCB943DL,1UL},{4294967295UL,0x29A9BD62L,8UL},{0UL,0xC6555B24L,0x5C6871E7L},{0UL,0UL,0x15D08CC1L},{0x5C6871E7L,7UL,4294967295UL}},{{0x55FB34F6L,0UL,4294967288UL},{0xF25DA586L,0xC6555B24L,0xF25DA586L},{0UL,0x29A9BD62L,0xD980B936L},{0xB9019512L,0x2BCB943DL,0x182BD3A5L},{4294967288UL,0xD980B936L,0UL},{0xCFF7DF80L,0xC6F50153L,4294967295UL},{4294967288UL,0x189C563AL,0xA0DDD608L},{0xB9019512L,5UL,1UL},{0UL,0xA209FE77L,0xF6C96FF1L},{0xF25DA586L,5UL,0xB9019512L}},{{0x55FB34F6L,9UL,0xA11D72F8L},{0x5C6871E7L,4294967290UL,0xB9019512L},{0UL,0xF6C96FF1L,0xF6C96FF1L},{0UL,0xE1B43826L,1UL},{4294967295UL,8UL,0xA0DDD608L},{0x35DA2F23L,1UL,4294967295UL},{0xA0DDD608L,0x55FB34F6L,0UL},{1UL,1UL,0x182BD3A5L},{0xD980B936L,8UL,0xD980B936L},{4294967287UL,0xE1B43826L,0xF25DA586L}},{{0xA209FE77L,0xF6C96FF1L,4294967288UL},{0x182BD3A5L,4294967290UL,4294967295UL},{0x29A9BD62L,9UL,0x15D08CC1L},{0x182BD3A5L,5UL,0x5C6871E7L},{0xA209FE77L,0xA209FE77L,8UL},{4294967287UL,5UL,1UL},{0xD980B936L,0x189C563AL,0xA0DDD608L},{0xDF803319L,7UL,0x182BD3A5L},{0x29A9BD62L,0x23F5EC66L,0xA0DDD608L},{0UL,6UL,4294967295UL}},{{0x15D08CC1L,0UL,9UL},{4294967295UL,0xC6F50153L,0xCFF7DF80L},{4294967295UL,0xF6C96FF1L,0UL},{0xCFF7DF80L,5UL,0x48801177L},{0x189C563AL,0xF6C96FF1L,0xD980B936L},{4294967290UL,0xC6F50153L,4294967290UL},{0xF6C96FF1L,0UL,0x23F5EC66L},{0x5C6871E7L,6UL,0xF25DA586L},{0xD980B936L,0x23F5EC66L,0xA11D72F8L},{0x35DA2F23L,7UL,4294967287UL}},{{0xD980B936L,0xA209FE77L,0x29A9BD62L},{0x5C6871E7L,4294967295UL,0x66955C2CL},{0xF6C96FF1L,0xA0DDD608L,0UL},{4294967290UL,5UL,0x5C6871E7L},{0x189C563AL,0x55FB34F6L,4294967288UL},{0xCFF7DF80L,0xC30C919DL,0x5C6871E7L},{4294967295UL,0UL,0UL},{4294967295UL,0xC0A101CBL,0x66955C2CL},{0x15D08CC1L,9UL,0x29A9BD62L},{0UL,0x2BCB943DL,4294967287UL}}}; + uint8_t l_625 = 1UL; + struct S0 **l_789 = &l_660; + int i, j, k; + for (i = 0; i < 4; i++) + l_385[i] = &l_149; + for (i = 0; i < 2; i++) + l_572[i] = 0xCE21L; + l_369 = (l_355[1][4] >= (safe_mod_func_int8_t_s_s((g_140 >= (((3UL & g_275[4][2]) | (safe_mod_func_uint32_t_u_u((safe_rshift_func_int16_t_s_u(((void*)0 == g_362[1][2]), (l_261[3][8].f3.f2 ^ ((*g_10) , ((((((*p_47) = (safe_mul_func_uint8_t_u_u((((0xA0C97CF4L < (*p_47)) >= 0xA05A7788L) < g_367), 1L))) && g_203.f1) < g_368[5][5][0]) >= l_355[2][0]) == l_355[1][4]))))), g_130[0][5]))) == l_355[3][0])), (*p_48)))); + (*l_373) &= ((l_370 , l_371) <= (((*p_47) = (*p_47)) <= ((*l_372) = (-3L)))); + } + return &g_29; +} + + +/* ------------------------------------------ */ +/* + * reads : g_9 g_82 g_33 g_92 g_23.f2 g_94 g_96 g_23 g_27 g_28 g_141 g_448 + * writes: g_82 g_92 g_96 g_9 g_27 g_131 g_133 g_141 g_448 + */ +static int32_t * func_50(uint32_t p_51, int8_t p_52, int8_t p_53, int8_t * p_54, const int32_t p_55) +{ /* block id: 13 */ + int8_t *l_81[10] = {&g_9,&g_9,&g_9,&g_9,&g_9,&g_9,&g_9,&g_9,&g_9,&g_9}; + int16_t *l_91 = &g_92; + int32_t l_93 = (-8L); + uint8_t *l_95 = &g_96; + union U2 l_107 = {0x2706CD28L}; + int32_t l_113 = (-3L); + struct S1 l_114 = {8L,0x07506916L,0x6519L,{0xCEA1L,0UL,65531UL,0x6711L,251UL},1UL}; + const uint16_t l_127 = 0UL; + int32_t *l_135 = &l_113; + int32_t *l_136 = (void*)0; + int32_t *l_137 = (void*)0; + int32_t *l_138 = &l_113; + int32_t *l_139[6] = {(void*)0,&g_82,(void*)0,(void*)0,&g_82,(void*)0}; + int i; + l_93 = (safe_add_func_uint16_t_u_u(p_52, ((((safe_lshift_func_int16_t_s_u(((safe_div_func_int8_t_s_s((g_82 &= (*p_54)), (*p_54))) >= ((safe_mod_func_int8_t_s_s(((void*)0 != &p_53), (safe_add_func_int32_t_s_s((-3L), 0x3BD055D5L)))) <= 0x5DL)), 14)) ^ ((*l_95) |= (safe_mul_func_int8_t_s_s(((safe_rshift_func_int8_t_s_u(((((((*l_91) ^= g_33) | 0xA63FL) , l_93) >= l_93) > l_93), g_23.f2)) , g_94), 0xC7L)))) != l_93) , g_96))); + if (p_51) + { /* block id: 18 */ + int8_t **l_108[6] = {&l_81[4],&l_81[9],&l_81[4],&l_81[4],&l_81[9],&l_81[4]}; + struct S1 l_109 = {-3L,0xD4E8C809L,0x47BFL,{2L,0x3CBAL,0UL,65535UL,255UL},0xD01BL}; + uint16_t *l_110 = &l_107.f2; + int32_t *l_111 = &l_93; + int32_t *l_112[8] = {(void*)0,(void*)0,(void*)0,(void*)0,(void*)0,(void*)0,(void*)0,(void*)0}; + uint32_t *l_125 = &g_27; + uint8_t *l_126 = (void*)0; + const int32_t *l_129 = &g_130[0][5]; + const int32_t **l_128[9][6][4] = {{{&l_129,(void*)0,(void*)0,&l_129},{&l_129,&l_129,(void*)0,(void*)0},{(void*)0,&l_129,&l_129,(void*)0},{(void*)0,(void*)0,(void*)0,(void*)0},{&l_129,(void*)0,(void*)0,(void*)0},{&l_129,(void*)0,&l_129,(void*)0}},{{(void*)0,(void*)0,(void*)0,(void*)0},{&l_129,&l_129,(void*)0,(void*)0},{(void*)0,&l_129,&l_129,&l_129},{&l_129,(void*)0,(void*)0,&l_129},{&l_129,&l_129,(void*)0,(void*)0},{(void*)0,&l_129,&l_129,(void*)0}},{{(void*)0,(void*)0,(void*)0,(void*)0},{&l_129,(void*)0,(void*)0,(void*)0},{&l_129,(void*)0,&l_129,(void*)0},{(void*)0,(void*)0,(void*)0,(void*)0},{&l_129,&l_129,(void*)0,(void*)0},{(void*)0,&l_129,&l_129,&l_129}},{{&l_129,(void*)0,(void*)0,&l_129},{&l_129,&l_129,(void*)0,(void*)0},{(void*)0,&l_129,&l_129,(void*)0},{(void*)0,(void*)0,(void*)0,(void*)0},{&l_129,(void*)0,(void*)0,&l_129},{(void*)0,(void*)0,&l_129,&l_129}},{{&l_129,&l_129,&l_129,&l_129},{(void*)0,(void*)0,&l_129,&l_129},{&l_129,(void*)0,&l_129,(void*)0},{(void*)0,&l_129,(void*)0,(void*)0},{(void*)0,(void*)0,&l_129,&l_129},{&l_129,(void*)0,&l_129,&l_129}},{{&l_129,&l_129,&l_129,&l_129},{(void*)0,(void*)0,(void*)0,&l_129},{(void*)0,(void*)0,&l_129,&l_129},{&l_129,&l_129,&l_129,&l_129},{(void*)0,(void*)0,&l_129,&l_129},{&l_129,(void*)0,&l_129,(void*)0}},{{(void*)0,&l_129,(void*)0,(void*)0},{(void*)0,(void*)0,&l_129,&l_129},{&l_129,(void*)0,&l_129,&l_129},{&l_129,&l_129,&l_129,&l_129},{(void*)0,(void*)0,(void*)0,&l_129},{(void*)0,(void*)0,&l_129,&l_129}},{{&l_129,&l_129,&l_129,&l_129},{(void*)0,(void*)0,&l_129,&l_129},{&l_129,(void*)0,&l_129,(void*)0},{(void*)0,&l_129,(void*)0,(void*)0},{(void*)0,(void*)0,&l_129,&l_129},{&l_129,(void*)0,&l_129,&l_129}},{{&l_129,&l_129,&l_129,&l_129},{(void*)0,(void*)0,(void*)0,&l_129},{(void*)0,(void*)0,&l_129,&l_129},{&l_129,&l_129,&l_129,&l_129},{(void*)0,(void*)0,&l_129,&l_129},{&l_129,(void*)0,&l_129,(void*)0}}}; + int i, j, k; + l_113 = ((*l_111) = (safe_mul_func_uint8_t_u_u((safe_lshift_func_uint16_t_u_u(((p_51 , ((*l_110) = (safe_rshift_func_int8_t_s_u((((*p_54) = (safe_mul_func_uint16_t_u_u(g_92, 0L))) & (safe_mul_func_int16_t_s_s(((0xF9L < (g_23 , (l_107 , ((l_81[9] = (void*)0) == &p_53)))) != ((((l_109 , &p_55) == &g_29) < 250UL) != l_109.f3.f2)), 65533UL))), l_109.f3.f0)))) & l_109.f3.f2), 5)), l_93))); + g_133[0] = (g_131 = func_16(l_114, (((void*)0 == p_54) != (((safe_mul_func_uint8_t_u_u(((safe_rshift_func_uint8_t_u_u(((safe_mul_func_uint16_t_u_u((((safe_mul_func_uint16_t_u_u(p_52, ((*p_54) == (((l_113 |= (l_109.f3 , ((*l_95) = (g_23.f2 <= (safe_add_func_int32_t_s_s(l_107.f2, (((+(((*l_125) ^= (l_91 == (void*)0)) <= p_55)) & 0x47876926L) , p_52))))))) ^ (*p_54)) ^ 0L)))) != 4294967288UL) <= p_53), l_114.f0)) & 0xEB91146BL), 2)) < p_51), 255UL)) , p_51) ^ l_127)), &g_9, g_23)); + } + else + { /* block id: 29 */ + int32_t *l_134 = &g_33; + return l_134; + } + ++g_141[5][6]; + return &g_82; +} + + + + +/* ---------------------------------------- */ +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_9, "g_9", print_hash_value); + transparent_crc(g_23.f2, "g_23.f2", print_hash_value); + transparent_crc(g_27, "g_27", print_hash_value); + transparent_crc(g_29, "g_29", print_hash_value); + transparent_crc(g_33, "g_33", print_hash_value); + transparent_crc(g_82, "g_82", print_hash_value); + transparent_crc(g_92, "g_92", print_hash_value); + transparent_crc(g_94, "g_94", print_hash_value); + transparent_crc(g_96, "g_96", print_hash_value); + for (i = 0; i < 8; i++) + { + for (j = 0; j < 6; j++) + { + transparent_crc(g_130[i][j], "g_130[i][j]", print_hash_value); + if (print_hash_value) printf("index = [%d][%d]\n", i, j); + + } + } + transparent_crc(g_132, "g_132", print_hash_value); + transparent_crc(g_140, "g_140", print_hash_value); + for (i = 0; i < 6; i++) + { + for (j = 0; j < 7; j++) + { + transparent_crc(g_141[i][j], "g_141[i][j]", print_hash_value); + if (print_hash_value) printf("index = [%d][%d]\n", i, j); + + } + } + transparent_crc(g_193.f0, "g_193.f0", print_hash_value); + transparent_crc(g_193.f1, "g_193.f1", print_hash_value); + transparent_crc(g_193.f2, "g_193.f2", print_hash_value); + transparent_crc(g_193.f3, "g_193.f3", print_hash_value); + transparent_crc(g_193.f4, "g_193.f4", print_hash_value); + transparent_crc(g_203.f0, "g_203.f0", print_hash_value); + transparent_crc(g_203.f1, "g_203.f1", print_hash_value); + transparent_crc(g_203.f2, "g_203.f2", print_hash_value); + transparent_crc(g_203.f3.f0, "g_203.f3.f0", print_hash_value); + transparent_crc(g_203.f3.f1, "g_203.f3.f1", print_hash_value); + transparent_crc(g_203.f3.f2, "g_203.f3.f2", print_hash_value); + transparent_crc(g_203.f3.f3, "g_203.f3.f3", print_hash_value); + transparent_crc(g_203.f3.f4, "g_203.f3.f4", print_hash_value); + transparent_crc(g_203.f4, "g_203.f4", print_hash_value); + for (i = 0; i < 6; i++) + { + for (j = 0; j < 3; j++) + { + transparent_crc(g_275[i][j], "g_275[i][j]", print_hash_value); + if (print_hash_value) printf("index = [%d][%d]\n", i, j); + + } + } + transparent_crc(g_367, "g_367", print_hash_value); + for (i = 0; i < 9; i++) + { + for (j = 0; j < 8; j++) + { + for (k = 0; k < 3; k++) + { + transparent_crc(g_368[i][j][k], "g_368[i][j][k]", print_hash_value); + if (print_hash_value) printf("index = [%d][%d][%d]\n", i, j, k); + + } + } + } + for (i = 0; i < 4; i++) + { + for (j = 0; j < 6; j++) + { + for (k = 0; k < 6; k++) + { + transparent_crc(g_429[i][j][k].f0, "g_429[i][j][k].f0", print_hash_value); + transparent_crc(g_429[i][j][k].f1, "g_429[i][j][k].f1", print_hash_value); + transparent_crc(g_429[i][j][k].f2, "g_429[i][j][k].f2", print_hash_value); + transparent_crc(g_429[i][j][k].f3.f0, "g_429[i][j][k].f3.f0", print_hash_value); + transparent_crc(g_429[i][j][k].f3.f1, "g_429[i][j][k].f3.f1", print_hash_value); + transparent_crc(g_429[i][j][k].f3.f2, "g_429[i][j][k].f3.f2", print_hash_value); + transparent_crc(g_429[i][j][k].f3.f3, "g_429[i][j][k].f3.f3", print_hash_value); + transparent_crc(g_429[i][j][k].f3.f4, "g_429[i][j][k].f3.f4", print_hash_value); + transparent_crc(g_429[i][j][k].f4, "g_429[i][j][k].f4", print_hash_value); + if (print_hash_value) printf("index = [%d][%d][%d]\n", i, j, k); + + } + } + } + transparent_crc(g_448, "g_448", print_hash_value); + transparent_crc(g_491, "g_491", print_hash_value); + transparent_crc(g_663.f0, "g_663.f0", print_hash_value); + transparent_crc(g_663.f1, "g_663.f1", print_hash_value); + transparent_crc(g_663.f2, "g_663.f2", print_hash_value); + transparent_crc(g_663.f3, "g_663.f3", print_hash_value); + transparent_crc(g_663.f4, "g_663.f4", print_hash_value); + for (i = 0; i < 9; i++) + { + for (j = 0; j < 3; j++) + { + transparent_crc(g_709[i][j], "g_709[i][j]", print_hash_value); + if (print_hash_value) printf("index = [%d][%d]\n", i, j); + + } + } + transparent_crc(g_870, "g_870", print_hash_value); + transparent_crc(g_902, "g_902", print_hash_value); + transparent_crc(g_1001, "g_1001", print_hash_value); + transparent_crc(g_1007.f0, "g_1007.f0", print_hash_value); + transparent_crc(g_1007.f2, "g_1007.f2", print_hash_value); + transparent_crc(g_1359, "g_1359", print_hash_value); + transparent_crc(g_1361, "g_1361", print_hash_value); + for (i = 0; i < 9; i++) + { + transparent_crc(g_1473[i], "g_1473[i]", print_hash_value); + if (print_hash_value) printf("index = [%d]\n", i); + + } + transparent_crc(g_1474, "g_1474", print_hash_value); + transparent_crc(g_1492, "g_1492", print_hash_value); + transparent_crc(g_1725, "g_1725", print_hash_value); + transparent_crc(g_1798, "g_1798", print_hash_value); + transparent_crc(g_2122, "g_2122", print_hash_value); + transparent_crc(g_2341, "g_2341", print_hash_value); + transparent_crc(g_2575, "g_2575", print_hash_value); + transparent_crc(g_2686.f0, "g_2686.f0", print_hash_value); + transparent_crc(g_2686.f1, "g_2686.f1", print_hash_value); + transparent_crc(g_2686.f2, "g_2686.f2", print_hash_value); + transparent_crc(g_2686.f3, "g_2686.f3", print_hash_value); + transparent_crc(g_2686.f4, "g_2686.f4", print_hash_value); + transparent_crc(g_2898, "g_2898", print_hash_value); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} + +/************************ statistics ************************* +XXX max struct depth: 2 +breakdown: + depth: 0, occurrence: 717 + depth: 1, occurrence: 16 + depth: 2, occurrence: 33 +XXX total union variables: 30 + +XXX non-zero bitfields defined in structs: 1 +XXX zero bitfields defined in structs: 1 +XXX const bitfields defined in structs: 0 +XXX volatile bitfields defined in structs: 0 +XXX structs with bitfields in the program: 45 +breakdown: + indirect level: 0, occurrence: 33 + indirect level: 1, occurrence: 8 + indirect level: 2, occurrence: 4 +XXX full-bitfields structs in the program: 0 +breakdown: +XXX times a bitfields struct's address is taken: 36 +XXX times a bitfields struct on LHS: 0 +XXX times a bitfields struct on RHS: 66 +XXX times a single bitfield on LHS: 0 +XXX times a single bitfield on RHS: 0 + +XXX max expression depth: 42 +breakdown: + depth: 1, occurrence: 186 + depth: 2, occurrence: 44 + depth: 3, occurrence: 2 + depth: 4, occurrence: 4 + depth: 5, occurrence: 2 + depth: 6, occurrence: 3 + depth: 7, occurrence: 1 + depth: 11, occurrence: 2 + depth: 13, occurrence: 1 + depth: 14, occurrence: 1 + depth: 16, occurrence: 2 + depth: 17, occurrence: 1 + depth: 18, occurrence: 1 + depth: 19, occurrence: 4 + depth: 20, occurrence: 4 + depth: 21, occurrence: 2 + depth: 22, occurrence: 4 + depth: 23, occurrence: 4 + depth: 25, occurrence: 1 + depth: 27, occurrence: 1 + depth: 28, occurrence: 2 + depth: 29, occurrence: 2 + depth: 30, occurrence: 1 + depth: 31, occurrence: 1 + depth: 33, occurrence: 2 + depth: 41, occurrence: 1 + depth: 42, occurrence: 1 + +XXX total number of pointers: 576 + +XXX times a variable address is taken: 1577 +XXX times a pointer is dereferenced on RHS: 578 +breakdown: + depth: 1, occurrence: 540 + depth: 2, occurrence: 36 + depth: 3, occurrence: 2 +XXX times a pointer is dereferenced on LHS: 463 +breakdown: + depth: 1, occurrence: 432 + depth: 2, occurrence: 30 + depth: 3, occurrence: 1 +XXX times a pointer is compared with null: 72 +XXX times a pointer is compared with address of another variable: 17 +XXX times a pointer is compared with another pointer: 25 +XXX times a pointer is qualified to be dereferenced: 11097 + +XXX max dereference level: 4 +breakdown: + level: 0, occurrence: 0 + level: 1, occurrence: 2473 + level: 2, occurrence: 250 + level: 3, occurrence: 21 + level: 4, occurrence: 4 +XXX number of pointers point to pointers: 214 +XXX number of pointers point to scalars: 326 +XXX number of pointers point to structs: 20 +XXX percent of pointers has null in alias set: 29 +XXX average alias set size: 1.59 + +XXX times a non-volatile is read: 2782 +XXX times a non-volatile is write: 1303 +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: 8 + +XXX stmts: 189 +XXX max block depth: 5 +breakdown: + depth: 0, occurrence: 32 + depth: 1, occurrence: 30 + depth: 2, occurrence: 20 + depth: 3, occurrence: 30 + depth: 4, occurrence: 37 + depth: 5, occurrence: 40 + +XXX percentage a fresh-made variable is used: 15.4 +XXX percentage an existing variable is used: 84.6 +FYI: the random generator makes assumptions about the integer size. See platform.info for more details. +********************* end of statistics **********************/ + diff --git a/tests/fuzz/11.c.txt b/tests/fuzz/11.c.txt new file mode 100644 index 0000000000000..d878ac9def4d9 --- /dev/null +++ b/tests/fuzz/11.c.txt @@ -0,0 +1 @@ +checksum = F3170034 diff --git a/tests/fuzz/test.sh b/tests/fuzz/test.sh index 7e6b896635b43..9099f5e9eebe2 100755 --- a/tests/fuzz/test.sh +++ b/tests/fuzz/test.sh @@ -7,11 +7,11 @@ rm *.out *.bc *.js 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 -o n2.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 -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 +EMCC_FAST_COMPILER=0 ~/Dev/emscripten/emcc $@ -I/home/alon/Dev/csmith/runtime -o js.out.js &> /dev/null +EMCC_FAST_COMPILER=0~/Dev/emscripten/emcc $@ -s UNALIGNED_MEMORY=1 -I/home/alon/Dev/csmith/runtime -o ua.out.js &> /dev/null +EMCC_FAST_COMPILER=0~/Dev/emscripten/emcc $@ -s SAFE_HEAP=1 -I/home/alon/Dev/csmith/runtime -o sh.out.js &> /dev/null +~/Dev/emscripten/emcc $@ -I/home/alon/Dev/csmith/runtime -o fc.out.js &> /dev/null +~/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" diff --git a/tests/fuzz/testpp.sh b/tests/fuzz/testpp.sh index 8e9f4185a8412..3f060693efa9a 100755 --- a/tests/fuzz/testpp.sh +++ b/tests/fuzz/testpp.sh @@ -7,11 +7,11 @@ rm *.out *.bc *.js g++ $@ -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 -o n2.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/em++ $@ -I/home/alon/Dev/csmith/runtime -o js.out.js &> /dev/null -~/Dev/emscripten/em++ $@ -s UNALIGNED_MEMORY=1 -I/home/alon/Dev/csmith/runtime -o ua.out.js &> /dev/null -~/Dev/emscripten/em++ $@ -s SAFE_HEAP=1 -I/home/alon/Dev/csmith/runtime -o sh.out.js &> /dev/null -EMCC_FAST_COMPILER=1 ~/Dev/emscripten/em++ $@ -I/home/alon/Dev/csmith/runtime -o fc.out.js &> /dev/null -EMCC_FAST_COMPILER=1 ~/Dev/emscripten/em++ $@ -s SAFE_HEAP=1 -I/home/alon/Dev/csmith/runtime -o fc-sh.out.js &> /dev/null +EMCC_FAST_COMPILER=0~/Dev/emscripten/em++ $@ -I/home/alon/Dev/csmith/runtime -o js.out.js &> /dev/null +EMCC_FAST_COMPILER=0~/Dev/emscripten/em++ $@ -s UNALIGNED_MEMORY=1 -I/home/alon/Dev/csmith/runtime -o ua.out.js &> /dev/null +EMCC_FAST_COMPILER=0~/Dev/emscripten/em++ $@ -s SAFE_HEAP=1 -I/home/alon/Dev/csmith/runtime -o sh.out.js &> /dev/null +~/Dev/emscripten/em++ $@ -I/home/alon/Dev/csmith/runtime -o fc.out.js &> /dev/null +~/Dev/emscripten/em++ $@ -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" diff --git a/tests/gl_matrix_identity.c b/tests/gl_matrix_identity.c index 9f990a778a375..8ca7d0cb70dec 100644 --- a/tests/gl_matrix_identity.c +++ b/tests/gl_matrix_identity.c @@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR REDISTRIBUTION OF THIS SOFTWARE. */ -#if !EMSCRIPTEN +#ifndef __EMSCRIPTEN__ #define USE_GLEW 1 #endif @@ -38,7 +38,7 @@ void verify() { for (int x = 0; x < width*height*4; x++) { if (x % 4 != 3) sum += x * data[x]; } -#if EMSCRIPTEN +#ifdef __EMSCRIPTEN__ int result = sum; REPORT_RESULT(); #endif @@ -120,7 +120,7 @@ int main(int argc, char *argv[]) verify(); -#if !EMSCRIPTEN +#ifndef __EMSCRIPTEN__ SDL_Delay(1500); #endif diff --git a/tests/gl_ps.c b/tests/gl_ps.c index 4fa799224a5df..d9f3b0792d964 100644 --- a/tests/gl_ps.c +++ b/tests/gl_ps.c @@ -22,7 +22,7 @@ RESULTING FROM THE USE, MODIFICATION, OR REDISTRIBUTION OF THIS SOFTWARE. */ -#if !EMSCRIPTEN +#ifndef __EMSCRIPTEN__ #define USE_GLEW 1 #endif @@ -120,7 +120,7 @@ int main(int argc, char *argv[]) glClearColor( 0, 0, 0, 0 ); -#if !EMSCRIPTEN +#ifndef __EMSCRIPTEN__ glEnable( GL_TEXTURE_2D ); // Need this to display a texture XXX unnecessary in OpenGL ES 2.0/WebGL #endif @@ -219,7 +219,7 @@ int main(int argc, char *argv[]) SDL_GL_SwapBuffers(); -#if !EMSCRIPTEN +#ifndef __EMSCRIPTEN__ // Wait for 3 seconds to give us a chance to see the image SDL_Delay(3000); #endif diff --git a/tests/gl_ps_packed.c b/tests/gl_ps_packed.c index 9ab99cb894453..be139cd943347 100644 --- a/tests/gl_ps_packed.c +++ b/tests/gl_ps_packed.c @@ -22,7 +22,7 @@ RESULTING FROM THE USE, MODIFICATION, OR REDISTRIBUTION OF THIS SOFTWARE. */ -#if !EMSCRIPTEN +#ifndef __EMSCRIPTEN__ #define USE_GLEW 1 #endif @@ -104,7 +104,7 @@ int main(int argc, char *argv[]) glClearColor( 0, 0, 0, 0 ); -#if !EMSCRIPTEN +#ifndef __EMSCRIPTEN__ glEnable( GL_TEXTURE_2D ); // Need this to display a texture XXX unnecessary in OpenGL ES 2.0/WebGL #endif @@ -216,7 +216,7 @@ int main(int argc, char *argv[]) SDL_GL_SwapBuffers(); -#if !EMSCRIPTEN +#ifndef __EMSCRIPTEN__ // Wait for 3 seconds to give us a chance to see the image SDL_Delay(3000); #endif diff --git a/tests/gl_ps_strides.c b/tests/gl_ps_strides.c index d88f5d0b31592..1ff28c9422482 100644 --- a/tests/gl_ps_strides.c +++ b/tests/gl_ps_strides.c @@ -22,7 +22,7 @@ RESULTING FROM THE USE, MODIFICATION, OR REDISTRIBUTION OF THIS SOFTWARE. */ -#if !EMSCRIPTEN +#ifndef __EMSCRIPTEN__ #define USE_GLEW 1 #endif @@ -120,7 +120,7 @@ int main(int argc, char *argv[]) glClearColor( 0, 0, 0, 0 ); -#if !EMSCRIPTEN +#ifndef __EMSCRIPTEN__ glEnable( GL_TEXTURE_2D ); // Need this to display a texture XXX unnecessary in OpenGL ES 2.0/WebGL #endif @@ -227,7 +227,7 @@ int main(int argc, char *argv[]) SDL_GL_SwapBuffers(); -#if !EMSCRIPTEN +#ifndef __EMSCRIPTEN__ // Wait for 3 seconds to give us a chance to see the image SDL_Delay(3000); #endif diff --git a/tests/gl_renderers.c b/tests/gl_renderers.c index 0a8e6e7843e5f..ca6e828e479e8 100644 --- a/tests/gl_renderers.c +++ b/tests/gl_renderers.c @@ -22,7 +22,7 @@ RESULTING FROM THE USE, MODIFICATION, OR REDISTRIBUTION OF THIS SOFTWARE. */ -#if !EMSCRIPTEN +#ifndef __EMSCRIPTEN__ #define USE_GLEW 0 #endif @@ -62,7 +62,7 @@ int main(int argc, char *argv[]) glClearColor( 0, 0, 0, 0 ); -#if !EMSCRIPTEN +#ifndef __EMSCRIPTEN__ glEnable( GL_TEXTURE_2D ); // Need this to display a texture XXX unnecessary in OpenGL ES 2.0/WebGL #endif @@ -180,7 +180,7 @@ int main(int argc, char *argv[]) SDL_GL_SwapBuffers(); -#if !EMSCRIPTEN +#ifndef __EMSCRIPTEN__ // Wait for 3 seconds to give us a chance to see the image SDL_Delay(3000); #endif diff --git a/tests/gl_stride.c b/tests/gl_stride.c index c254ad5a83015..d6cf1fd2dd04b 100644 --- a/tests/gl_stride.c +++ b/tests/gl_stride.c @@ -22,7 +22,7 @@ RESULTING FROM THE USE, MODIFICATION, OR REDISTRIBUTION OF THIS SOFTWARE. */ -#if !EMSCRIPTEN +#ifndef __EMSCRIPTEN__ #define USE_GLEW 0 #endif @@ -62,7 +62,7 @@ int main(int argc, char *argv[]) glClearColor( 0, 0, 0, 0 ); -#if !EMSCRIPTEN +#ifndef __EMSCRIPTEN__ glEnable( GL_TEXTURE_2D ); // Need this to display a texture XXX unnecessary in OpenGL ES 2.0/WebGL #endif @@ -141,7 +141,7 @@ int main(int argc, char *argv[]) SDL_GL_SwapBuffers(); -#if !EMSCRIPTEN +#ifndef __EMSCRIPTEN__ // Wait for 3 seconds to give us a chance to see the image SDL_Delay(3000); #endif diff --git a/tests/gl_vertex_buffer.c b/tests/gl_vertex_buffer.c index 6b69546208e56..73c30d482c6f1 100644 --- a/tests/gl_vertex_buffer.c +++ b/tests/gl_vertex_buffer.c @@ -22,7 +22,7 @@ REDISTRIBUTION OF THIS SOFTWARE. */ -#if !EMSCRIPTEN +#ifndef __EMSCRIPTEN__ #define USE_GLEW 0 #endif @@ -62,7 +62,7 @@ int main(int argc, char *argv[]) glClearColor( 0, 0, 0, 0 ); -#if !EMSCRIPTEN +#ifndef __EMSCRIPTEN__ glEnable( GL_TEXTURE_2D ); // Need this to display a texture XXX unnecessary in OpenGL ES 2.0/WebGL #endif @@ -184,7 +184,7 @@ int main(int argc, char *argv[]) SDL_GL_SwapBuffers(); -#if !EMSCRIPTEN +#ifndef __EMSCRIPTEN__ // Wait for 3 seconds to give us a chance to see the image SDL_Delay(3000); #endif diff --git a/tests/gl_vertex_buffer_pre.c b/tests/gl_vertex_buffer_pre.c index 84b76569c1417..fb967d11f5463 100644 --- a/tests/gl_vertex_buffer_pre.c +++ b/tests/gl_vertex_buffer_pre.c @@ -22,7 +22,7 @@ REDISTRIBUTION OF THIS SOFTWARE. */ -#if !EMSCRIPTEN +#ifndef __EMSCRIPTEN__ #define USE_GLEW 0 #endif @@ -62,7 +62,7 @@ int main(int argc, char *argv[]) glClearColor( 0, 0, 0, 0 ); -#if !EMSCRIPTEN +#ifndef __EMSCRIPTEN__ glEnable( GL_TEXTURE_2D ); // Need this to display a texture XXX unnecessary in OpenGL ES 2.0/WebGL #endif @@ -166,7 +166,7 @@ int main(int argc, char *argv[]) SDL_GL_SwapBuffers(); -#if !EMSCRIPTEN +#ifndef __EMSCRIPTEN__ // Wait for 3 seconds to give us a chance to see the image SDL_Delay(3000); #endif diff --git a/tests/glbegin_points.c b/tests/glbegin_points.c index 9128a4f5621e1..ae061bb2af51e 100644 --- a/tests/glbegin_points.c +++ b/tests/glbegin_points.c @@ -150,7 +150,7 @@ int main(int argc, char *argv[]) SDL_GL_SwapBuffers(); -#if !EMSCRIPTEN +#if !defined(__EMSCRIPTEN__) // Wait for 3 seconds to give us a chance to see the image SDL_Delay(3000); #endif diff --git a/tests/glgettexenv.c b/tests/glgettexenv.c index a051a69048646..54bf2af8e50f2 100644 --- a/tests/glgettexenv.c +++ b/tests/glgettexenv.c @@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR REDISTRIBUTION OF THIS SOFTWARE. */ -#if !EMSCRIPTEN +#ifndef __EMSCRIPTEN__ #define USE_GLEW 1 #endif diff --git a/tests/hello_world.ll b/tests/hello_world.ll index 19f848516f09e..343805a03c99a 100644 --- a/tests/hello_world.ll +++ b/tests/hello_world.ll @@ -1,6 +1,6 @@ ; 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" +target triple = "asmjs-unknown-emscripten" @.str = private unnamed_addr constant [15 x i8] c"hello, world!\0A\00", align 1 ; [#uses=1 type=[15 x i8]*] diff --git a/tests/module/test_stdin.c b/tests/module/test_stdin.c index 319c686ce8fae..2772fcf0b5477 100644 --- a/tests/module/test_stdin.c +++ b/tests/module/test_stdin.c @@ -3,7 +3,7 @@ #include #include #include -#if EMSCRIPTEN +#ifdef __EMSCRIPTEN__ #include #endif @@ -48,7 +48,7 @@ int main(int argc, char const *argv[]) // should exit out after calling main_loop once. main_loop(); -#if EMSCRIPTEN +#ifdef __EMSCRIPTEN__ emscripten_set_main_loop(main_loop, 60, 0); #else while (1) main_loop(); sleep(1); diff --git a/tests/nbody-java/native_java_lang_String.c b/tests/nbody-java/native_java_lang_String.c index 5ccf21dfa6975..c55e5412f6208 100644 --- a/tests/nbody-java/native_java_lang_String.c +++ b/tests/nbody-java/native_java_lang_String.c @@ -10,7 +10,7 @@ JAVA_INT java_lang_String_toLowerCaseImpl___int(JAVA_OBJECT me, JAVA_INT n1) { //XMLVM_BEGIN_NATIVE[java_lang_String_toLowerCaseImpl___int] -#ifdef EMSCRIPTEN +#ifdef __EMSCRIPTEN__ return tolower(n1); #else return towlower(n1); @@ -21,7 +21,7 @@ JAVA_INT java_lang_String_toLowerCaseImpl___int(JAVA_OBJECT me, JAVA_INT n1) JAVA_INT java_lang_String_toUpperCaseImpl___int(JAVA_OBJECT me, JAVA_INT n1) { //XMLVM_BEGIN_NATIVE[java_lang_String_toUpperCaseImpl___int] -#ifdef EMSCRIPTEN +#ifdef __EMSCRIPTEN__ return toupper(n1); #else return towupper(n1); diff --git a/tests/nbody-java/native_java_lang_System.c b/tests/nbody-java/native_java_lang_System.c index 861781ca4a73a..201f8beb7edf2 100644 --- a/tests/nbody-java/native_java_lang_System.c +++ b/tests/nbody-java/native_java_lang_System.c @@ -97,7 +97,7 @@ JAVA_OBJECT java_lang_System_getEncoding___int(JAVA_INT n1) { //XMLVM_BEGIN_NATIVE[java_lang_System_getEncoding___int] //Get charset from the OS -#ifdef EMSCRIPTEN +#ifdef __EMSCRIPTEN__ return xmlvm_create_java_string("UTF-8"); #else char charset[CHARSETBUFF]; diff --git a/tests/nbody-java/xmlvm.c b/tests/nbody-java/xmlvm.c index 35e04d161c82c..dedf1bc69db6c 100644 --- a/tests/nbody-java/xmlvm.c +++ b/tests/nbody-java/xmlvm.c @@ -102,7 +102,7 @@ void xmlvm_init() xmlvm_clear_constant_pool_cache(); #ifndef XMLVM_NO_GC -#ifndef EMSCRIPTEN +#ifndef __EMSCRIPTEN__ GC_finalize_on_demand = 1; GC_java_finalization = 1; java_lang_Thread* finalizerThread = (java_lang_Thread*) org_xmlvm_runtime_FinalizerNotifier_startFinalizerThread__(); @@ -115,7 +115,7 @@ void xmlvm_init() void xmlvm_destroy(java_lang_Thread* mainThread) { -#ifdef EMSCRIPTEN +#ifdef __EMSCRIPTEN__ return; // Let the JS engine handle clean up #endif diff --git a/tests/nbody-java/xmlvm.h b/tests/nbody-java/xmlvm.h index 0d931565ed666..04f645db0d428 100644 --- a/tests/nbody-java/xmlvm.h +++ b/tests/nbody-java/xmlvm.h @@ -22,7 +22,7 @@ #ifndef __XMLVM_H__ #define __XMLVM_H__ -#ifdef EMSCRIPTEN +#ifdef __EMSCRIPTEN__ // Workaround definitions for Emscripten // TODO: Determine if different solution is needed diff --git a/tests/openal_buffers.c b/tests/openal_buffers.c index 31104a33a2e87..df6d8e3f6c08c 100644 --- a/tests/openal_buffers.c +++ b/tests/openal_buffers.c @@ -1,7 +1,7 @@ #include #include #include -#ifdef EMSCRIPTEN +#ifdef __EMSCRIPTEN__ #include #include #include @@ -68,7 +68,7 @@ void iter() { // Exit once we've processed the entire clip. if (offset >= size) { -#ifdef EMSCRIPTEN +#ifdef __EMSCRIPTEN__ int result = 0; REPORT_RESULT(); #endif @@ -87,7 +87,7 @@ int main(int argc, char* argv[]) { // // Read in the audio sample. // -#ifdef EMSCRIPTEN +#ifdef __EMSCRIPTEN__ FILE* fp = fopen("the_entertainer.wav", "rb"); #else FILE* fp = fopen("sounds/the_entertainer.wav", "rb"); @@ -176,7 +176,7 @@ int main(int argc, char* argv[]) { // // Cycle and refill the buffers until we're done. // -#if EMSCRIPTEN +#ifdef __EMSCRIPTEN__ emscripten_set_main_loop(iter, 0, 0); #else while (1) { diff --git a/tests/openal_playback.cpp b/tests/openal_playback.cpp index 6a8dae389084b..880b69062717e 100644 --- a/tests/openal_playback.cpp +++ b/tests/openal_playback.cpp @@ -5,7 +5,7 @@ #include #include #include -#ifdef EMSCRIPTEN +#ifdef __EMSCRIPTEN__ #include #endif @@ -25,7 +25,7 @@ void playSource(void* arg) alGetSourcei(source, AL_SOURCE_STATE, &state); assert(state == AL_STOPPED); -#ifdef EMSCRIPTEN +#ifdef __EMSCRIPTEN__ int result = 1; REPORT_RESULT(); #endif @@ -63,7 +63,7 @@ int main() { alGenBuffers(1, buffers); -#ifdef EMSCRIPTEN +#ifdef __EMSCRIPTEN__ FILE* source = fopen("audio.wav", "rb"); #else FILE* source = fopen("sounds/audio.wav", "rb"); @@ -146,7 +146,7 @@ int main() { alGetSourcei(sources[0], AL_SOURCE_STATE, &state); assert(state == AL_PLAYING); -#ifdef EMSCRIPTEN +#ifdef __EMSCRIPTEN__ emscripten_async_call(playSource, reinterpret_cast(sources[0]), 700); #else usleep(700000); diff --git a/tests/perspective.c b/tests/perspective.c index 72f4c50f8a9ae..7799855724d7c 100644 --- a/tests/perspective.c +++ b/tests/perspective.c @@ -8,7 +8,7 @@ #include -#ifdef EMSCRIPTEN +#ifdef __EMSCRIPTEN__ #include #include #include "emscripten.h" @@ -19,7 +19,7 @@ #include #include -#ifdef EMSCRIPTEN +#ifdef __EMSCRIPTEN__ #define emColor4ubv(x) #else #define emColor4ubv(x) glColor4ubv(x) @@ -392,7 +392,7 @@ int main( int argc, char* argv[] ) */ one_iter(); // just one for testing purposes -#ifndef EMSCRIPTEN +#ifndef __EMSCRIPTEN__ SDL_Delay(2000); #endif diff --git a/tests/poppler/utils/pdftoppm.cc b/tests/poppler/utils/pdftoppm.cc index 4df0f5d8f56e2..a6865cc62eca6 100644 --- a/tests/poppler/utils/pdftoppm.cc +++ b/tests/poppler/utils/pdftoppm.cc @@ -183,7 +183,7 @@ static void savePageSlice(PDFDoc *doc, bitmap->writePNMFile(ppmFile); } } else { -#if EMSCRIPTEN // XXX EMSCRIPTEN: avoid writing to stdout, better for benchmarking +#ifdef __EMSCRIPTEN__ // XXX EMSCRIPTEN: avoid writing to stdout, better for benchmarking printf("avoiding writing to stdout\n"); #else diff --git a/tests/python/python.le32.bc b/tests/python/python.asmjs-unknown-emscripten.bc similarity index 95% rename from tests/python/python.le32.bc rename to tests/python/python.asmjs-unknown-emscripten.bc index 2a6bc77c0fee4..6c25401e91014 100644 Binary files a/tests/python/python.le32.bc and b/tests/python/python.asmjs-unknown-emscripten.bc differ diff --git a/tests/runner.py b/tests/runner.py index 32575a1afd3f6..c13a16eb8d9c8 100755 --- a/tests/runner.py +++ b/tests/runner.py @@ -254,7 +254,7 @@ def validate_asmjs(self, err): if 'uccessfully compiled asm.js code' in err and 'asm.js link error' not in err: print >> sys.stderr, "[was asm.js'ified]" elif 'asm.js' in err: # if no asm.js error, then not an odin build - raise Exception("did NOT asm.js'ify") + raise Exception("did NOT asm.js'ify: " + err) err = '\n'.join(filter(lambda line: 'uccessfully compiled asm.js code' not in line, err.split('\n'))) return err @@ -583,7 +583,7 @@ def run_browser(self, html_file, message, expectedResult=None): def with_report_result(self, code): return r''' - #if EMSCRIPTEN + #ifdef __EMSCRIPTEN__ #include #define REPORT_RESULT_INTERNAL(sync) \ char output[1000]; \ diff --git a/tests/s3tc.c b/tests/s3tc.c index 5f7bee83dbf74..ca575ffc2c42f 100644 --- a/tests/s3tc.c +++ b/tests/s3tc.c @@ -143,7 +143,7 @@ int main(int argc, char *argv[]) SDL_GL_SwapBuffers(); -#if !EMSCRIPTEN +#ifndef __EMSCRIPTEN__ // Wait for 3 seconds to give us a chance to see the image SDL_Delay(1500); #endif diff --git a/tests/s3tc_crunch.c b/tests/s3tc_crunch.c index c2606c8f9602e..ae5e1228d0e38 100644 --- a/tests/s3tc_crunch.c +++ b/tests/s3tc_crunch.c @@ -195,7 +195,7 @@ int main(int argc, char *argv[]) SDL_GL_SwapBuffers(); -#if !EMSCRIPTEN +#ifndef __EMSCRIPTEN__ // Wait for 3 seconds to give us a chance to see the image SDL_Delay(1500); #endif diff --git a/tests/sdl_alloctext.c b/tests/sdl_alloctext.c index 173be3480687d..b7e9e6cfa3a4b 100644 --- a/tests/sdl_alloctext.c +++ b/tests/sdl_alloctext.c @@ -25,7 +25,7 @@ int main() SDL_FreeSurface(text); } -#if __EMSCRIPTEN__ +#ifdef __EMSCRIPTEN__ result = 1; REPORT_RESULT(); #endif diff --git a/tests/sdl_audio_beep.cpp b/tests/sdl_audio_beep.cpp index 95a5a7e8c05f1..82001e8a5d741 100644 --- a/tests/sdl_audio_beep.cpp +++ b/tests/sdl_audio_beep.cpp @@ -9,7 +9,7 @@ #define M_PI 3.14159265358979323846f #endif -#ifdef EMSCRIPTEN +#ifdef __EMSCRIPTEN__ #include "emscripten/emscripten.h" #endif @@ -170,7 +170,7 @@ void nextTest(void *unused = 0) { ++s; if (s >= NUM_ELEMS(sdlAudioFormats)) { printf("All tests done. Quit.\n"); -#ifdef EMSCRIPTEN +#ifdef __EMSCRIPTEN__ emscripten_cancel_main_loop(); #ifdef REPORT_RESULT int result = 1; @@ -204,7 +204,7 @@ void update() { if (size == 0 && beep) { delete beep; beep = 0; -#ifdef EMSCRIPTEN +#ifdef __EMSCRIPTEN__ emscripten_async_call(nextTest, 0, 1500); #else SDL_Delay(1500); @@ -233,7 +233,7 @@ int main(int argc, char** argv) { nextTest(); -#ifdef EMSCRIPTEN +#ifdef __EMSCRIPTEN__ emscripten_set_main_loop(update, 60, 0); #else while(beep) { diff --git a/tests/sdl_audio_mix_channels.c b/tests/sdl_audio_mix_channels.c index dd91d594f8809..73d219639ed9d 100644 --- a/tests/sdl_audio_mix_channels.c +++ b/tests/sdl_audio_mix_channels.c @@ -42,7 +42,7 @@ int main(int argc, char **argv) { int lastChannel = loadAndPlay(); -#if EMSCRIPTEN +#ifdef __EMSCRIPTEN__ int result = (lastChannel == -1); REPORT_RESULT(); #endif diff --git a/tests/sdl_canvas.c b/tests/sdl_canvas.c index cab48985b11b3..4420d73ed5507 100644 --- a/tests/sdl_canvas.c +++ b/tests/sdl_canvas.c @@ -6,7 +6,7 @@ int main(int argc, char **argv) { -#if EMSCRIPTEN +#ifdef __EMSCRIPTEN__ // include GL stuff, to check that we can compile hybrid 2d/GL apps extern void glBegin(int mode); extern void glBindBuffer(int target, int buffer); diff --git a/tests/sdl_canvas_size.c b/tests/sdl_canvas_size.c index 923a90147dfb3..0d1848231deff 100644 --- a/tests/sdl_canvas_size.c +++ b/tests/sdl_canvas_size.c @@ -30,7 +30,7 @@ REDISTRIBUTION OF THIS SOFTWARE. #include #include -#ifdef EMSCRIPTEN +#ifdef __EMSCRIPTEN__ #include #endif @@ -46,7 +46,7 @@ int main(int argc, char *argv[]) SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1 ); // *new* -#ifdef EMSCRIPTEN +#ifdef __EMSCRIPTEN__ // Test 1: Check that initializing video mode with size (0,0) will use the size from the element. screen = SDL_SetVideoMode( 0, 0, 16, SDL_OPENGL ); // *changed* @@ -177,7 +177,7 @@ int main(int argc, char *argv[]) SDL_GL_SwapBuffers(); -#if !EMSCRIPTEN +#ifndef __EMSCRIPTEN__ // Wait for 3 seconds to give us a chance to see the image SDL_Delay(3000); #endif diff --git a/tests/sdl_canvas_twice.c b/tests/sdl_canvas_twice.c index 28a7a01c0f9a3..ba62846bfeb55 100644 --- a/tests/sdl_canvas_twice.c +++ b/tests/sdl_canvas_twice.c @@ -1,6 +1,6 @@ #include -#if EMSCRIPTEN +#ifdef __EMSCRIPTEN__ #include #endif diff --git a/tests/sdl_fog_density.c b/tests/sdl_fog_density.c index cab6a4d27a497..46d4a8a1288f1 100644 --- a/tests/sdl_fog_density.c +++ b/tests/sdl_fog_density.c @@ -165,7 +165,7 @@ int main(int argc, char *argv[]) SDL_GL_SwapBuffers(); -#if !EMSCRIPTEN +#ifndef __EMSCRIPTEN__ // Wait for 3 seconds to give us a chance to see the image SDL_Delay(30000); #endif diff --git a/tests/sdl_fog_exp2.c b/tests/sdl_fog_exp2.c index dba0c708bb951..f813cede5dd58 100644 --- a/tests/sdl_fog_exp2.c +++ b/tests/sdl_fog_exp2.c @@ -166,7 +166,7 @@ int main(int argc, char *argv[]) SDL_GL_SwapBuffers(); -#if !EMSCRIPTEN +#if !defined(__EMSCRIPTEN__) // Wait for 3 seconds to give us a chance to see the image SDL_Delay(30000); #endif diff --git a/tests/sdl_fog_linear.c b/tests/sdl_fog_linear.c index f0805650a6151..d7107914f1a7e 100644 --- a/tests/sdl_fog_linear.c +++ b/tests/sdl_fog_linear.c @@ -167,7 +167,7 @@ int main(int argc, char *argv[]) SDL_GL_SwapBuffers(); -#if !EMSCRIPTEN +#ifndef __EMSCRIPTEN__ // Wait for 3 seconds to give us a chance to see the image SDL_Delay(30000); #endif diff --git a/tests/sdl_fog_negative.c b/tests/sdl_fog_negative.c index 1ede63a7cf6e4..f99467bb2be66 100644 --- a/tests/sdl_fog_negative.c +++ b/tests/sdl_fog_negative.c @@ -164,7 +164,7 @@ int main(int argc, char *argv[]) SDL_GL_SwapBuffers(); -#if !EMSCRIPTEN +#ifndef __EMSCRIPTEN__ // Wait for 3 seconds to give us a chance to see the image SDL_Delay(30000); #endif diff --git a/tests/sdl_fog_simple.c b/tests/sdl_fog_simple.c index 6c052bf57922e..269b74321dd13 100644 --- a/tests/sdl_fog_simple.c +++ b/tests/sdl_fog_simple.c @@ -167,7 +167,7 @@ int main(int argc, char *argv[]) SDL_GL_SwapBuffers(); -#if !EMSCRIPTEN +#ifndef __EMSCRIPTEN__ // Wait for 3 seconds to give us a chance to see the image SDL_Delay(30000); #endif diff --git a/tests/sdl_gfx_primitives.c b/tests/sdl_gfx_primitives.c index db0c61811a53d..dbf9849c98013 100644 --- a/tests/sdl_gfx_primitives.c +++ b/tests/sdl_gfx_primitives.c @@ -1,7 +1,7 @@ #include "SDL/SDL.h" #include "SDL/SDL_gfxPrimitives.h" -#ifdef EMSCRIPTEN +#ifdef __EMSCRIPTEN__ #include "emscripten.h" #endif @@ -31,7 +31,7 @@ int main(int argc, char **argv) { SDL_UpdateRect(screen, 0, 0, 0, 0); -#ifndef EMSCRIPTEN +#ifndef __EMSCRIPTEN__ SDL_Event evt; SDL_SaveBMP(screen, "native_output.bmp"); while (1) { diff --git a/tests/sdl_headless.c b/tests/sdl_headless.c index 349c5e2699b1c..6157a46d0d01b 100644 --- a/tests/sdl_headless.c +++ b/tests/sdl_headless.c @@ -6,7 +6,7 @@ int main(int argc, char **argv) { -#if EMSCRIPTEN +#ifdef __EMSCRIPTEN__ // include GL stuff, to check that we can compile hybrid 2d/GL apps extern void glBegin(int mode); extern void glBindBuffer(int target, int buffer); diff --git a/tests/sdl_ogl.c b/tests/sdl_ogl.c index e7071dcd1f75d..78efd7e08a57c 100644 --- a/tests/sdl_ogl.c +++ b/tests/sdl_ogl.c @@ -157,7 +157,7 @@ int main(int argc, char *argv[]) SDL_GL_SwapBuffers(); -#if !EMSCRIPTEN +#ifndef __EMSCRIPTEN__ // Wait for 3 seconds to give us a chance to see the image SDL_Delay(3000); #endif diff --git a/tests/sdl_ogl_defaultMatrixMode.c b/tests/sdl_ogl_defaultMatrixMode.c index eec2a83159591..6044f1ab5adfc 100644 --- a/tests/sdl_ogl_defaultMatrixMode.c +++ b/tests/sdl_ogl_defaultMatrixMode.c @@ -158,7 +158,7 @@ int main(int argc, char *argv[]) SDL_GL_SwapBuffers(); -#if !EMSCRIPTEN +#ifndef __EMSCRIPTEN__ // Wait for 3 seconds to give us a chance to see the image SDL_Delay(3000); #endif diff --git a/tests/sdl_ogl_p.c b/tests/sdl_ogl_p.c index 1889d92640c0e..2607f35cbed7e 100644 --- a/tests/sdl_ogl_p.c +++ b/tests/sdl_ogl_p.c @@ -150,7 +150,7 @@ int main(int argc, char *argv[]) SDL_GL_SwapBuffers(); -#if !EMSCRIPTEN +#ifndef __EMSCRIPTEN__ // Wait for 3 seconds to give us a chance to see the image SDL_Delay(3000); #endif diff --git a/tests/sdl_ogl_proc_alias.c b/tests/sdl_ogl_proc_alias.c index c96da81b651ed..4c251f8353efb 100644 --- a/tests/sdl_ogl_proc_alias.c +++ b/tests/sdl_ogl_proc_alias.c @@ -166,7 +166,7 @@ int main(int argc, char *argv[]) SDL_GL_SwapBuffers(); -#if !EMSCRIPTEN +#ifndef __EMSCRIPTEN__ // Wait for 3 seconds to give us a chance to see the image SDL_Delay(3000); #endif diff --git a/tests/sdl_rotozoom.c b/tests/sdl_rotozoom.c index 2c0d35df2dc2a..cc0ee22473b79 100644 --- a/tests/sdl_rotozoom.c +++ b/tests/sdl_rotozoom.c @@ -2,7 +2,7 @@ #include "SDL/SDL_image.h" #include "SDL/SDL_rotozoom.h" -#ifdef EMSCRIPTEN +#ifdef __EMSCRIPTEN__ #include "emscripten.h" #endif @@ -45,7 +45,7 @@ int main(int argc, char **argv) { mainloop(); -#ifndef EMSCRIPTEN +#ifndef __EMSCRIPTEN__ SDL_Event evt; SDL_SaveBMP(screen, "native_output.bmp"); while (1) { diff --git a/tests/sdl_swsurface.c b/tests/sdl_swsurface.c index 93141857625ca..c859dbc749847 100644 --- a/tests/sdl_swsurface.c +++ b/tests/sdl_swsurface.c @@ -12,7 +12,7 @@ int main(int argc, char** argv) { SDL_Quit(); -#if EMSCRIPTEN +#ifdef __EMSCRIPTEN__ int result = 1; REPORT_RESULT(); #endif diff --git a/tests/sdlglshader.c b/tests/sdlglshader.c index 9cd80097e9716..d629ca942f2ec 100644 --- a/tests/sdlglshader.c +++ b/tests/sdlglshader.c @@ -148,7 +148,7 @@ int main(int argc, char *argv[]) SDL_GL_SwapBuffers(); -#if !EMSCRIPTEN +#ifndef __EMSCRIPTEN__ SDL_Delay(3000); #endif diff --git a/tests/sockets/test_enet_client.c b/tests/sockets/test_enet_client.c index afcdcae8d9170..b422e70c9b255 100644 --- a/tests/sockets/test_enet_client.c +++ b/tests/sockets/test_enet_client.c @@ -1,14 +1,14 @@ #include #include #include -#if EMSCRIPTEN +#ifdef __EMSCRIPTEN__ #include #endif ENetHost * host; void main_loop() { -#if EMSCRIPTEN +#ifdef __EMSCRIPTEN__ static int counter = 0; counter++; if (counter == 100) { @@ -34,7 +34,7 @@ void main_loop() { event.channelID); int result = strcmp("packetfoo", event.packet->data); -#if EMSCRIPTEN +#ifdef __EMSCRIPTEN__ REPORT_RESULT(); #else exit(EXIT_SUCCESS); @@ -92,7 +92,7 @@ int main (int argc, char ** argv) exit (EXIT_FAILURE); } -#if EMSCRIPTEN +#ifdef __EMSCRIPTEN__ #if USE_IFRAME emscripten_run_script("console.log('adding iframe');" "var iframe = document.createElement('iframe');" @@ -104,7 +104,7 @@ int main (int argc, char ** argv) #endif #endif -#if EMSCRIPTEN +#ifdef __EMSCRIPTEN__ emscripten_set_main_loop(main_loop, 3, 1); #else while (1) main_loop(); diff --git a/tests/sockets/test_enet_server.c b/tests/sockets/test_enet_server.c index 9a4518ac82884..30d86a9901a68 100644 --- a/tests/sockets/test_enet_server.c +++ b/tests/sockets/test_enet_server.c @@ -4,7 +4,7 @@ #include #include -#if EMSCRIPTEN +#ifdef __EMSCRIPTEN__ #include #endif @@ -29,12 +29,12 @@ void send_msg(ENetPeer *peer) { void main_loop() { static int counter = 0; -#if EMSCRIPTEN +#ifdef __EMSCRIPTEN__ counter++; #endif if (counter == 100) { printf("stop!\n"); -#if EMSCRIPTEN +#ifdef __EMSCRIPTEN__ emscripten_cancel_main_loop(); #endif return; @@ -101,7 +101,7 @@ int main (int argc, char ** argv) exit (EXIT_FAILURE); } -#if EMSCRIPTEN +#ifdef __EMSCRIPTEN__ emscripten_set_main_loop(main_loop, 3, 1); #else while (1) main_loop(); diff --git a/tests/sockets/test_getaddrinfo.c b/tests/sockets/test_getaddrinfo.c index 1f912c69b69d6..85610473f2047 100644 --- a/tests/sockets/test_getaddrinfo.c +++ b/tests/sockets/test_getaddrinfo.c @@ -6,7 +6,7 @@ #include #include #include -#if EMSCRIPTEN +#ifdef __EMSCRIPTEN__ #include #endif diff --git a/tests/sockets/test_gethostbyname.c b/tests/sockets/test_gethostbyname.c index 459c6b9840cb7..c0e11efbe79d5 100644 --- a/tests/sockets/test_gethostbyname.c +++ b/tests/sockets/test_gethostbyname.c @@ -7,7 +7,7 @@ #include #include #include -#if EMSCRIPTEN +#ifdef __EMSCRIPTEN__ #include #endif diff --git a/tests/sockets/test_getnameinfo.c b/tests/sockets/test_getnameinfo.c index c3fec6b487c63..dd4a04196cb48 100644 --- a/tests/sockets/test_getnameinfo.c +++ b/tests/sockets/test_getnameinfo.c @@ -6,7 +6,7 @@ #include #include #include -#if EMSCRIPTEN +#ifdef __EMSCRIPTEN__ #include #endif @@ -98,4 +98,4 @@ int main() { puts("success"); return EXIT_SUCCESS; -} \ No newline at end of file +} diff --git a/tests/sockets/test_sockets_echo_client.c b/tests/sockets/test_sockets_echo_client.c index 684d767f741cb..58d005c499b60 100644 --- a/tests/sockets/test_sockets_echo_client.c +++ b/tests/sockets/test_sockets_echo_client.c @@ -10,7 +10,7 @@ #include #include #include -#if EMSCRIPTEN +#ifdef __EMSCRIPTEN__ #include #endif @@ -42,7 +42,7 @@ void finish(int result) { close(server.fd); server.fd = 0; } -#if EMSCRIPTEN +#ifdef __EMSCRIPTEN__ REPORT_RESULT(); #endif exit(result); @@ -160,7 +160,7 @@ int main() { finish(EXIT_FAILURE); } -#if EMSCRIPTEN +#ifdef __EMSCRIPTEN__ emscripten_set_main_loop(main_loop, 0, 0); #else while (1) main_loop(); diff --git a/tests/sockets/test_sockets_echo_server.c b/tests/sockets/test_sockets_echo_server.c index b24472e8f4410..55898add7b069 100644 --- a/tests/sockets/test_sockets_echo_server.c +++ b/tests/sockets/test_sockets_echo_server.c @@ -11,7 +11,7 @@ #include #include #include -#if EMSCRIPTEN +#ifdef __EMSCRIPTEN__ #include #endif @@ -186,7 +186,7 @@ int main() { } #endif -#if EMSCRIPTEN +#ifdef __EMSCRIPTEN__ emscripten_set_main_loop(main_loop, 60, 0); #else while (1) main_loop(); diff --git a/tests/sockets/test_sockets_partial_client.c b/tests/sockets/test_sockets_partial_client.c index 61084b171257b..2d930516f9b36 100644 --- a/tests/sockets/test_sockets_partial_client.c +++ b/tests/sockets/test_sockets_partial_client.c @@ -10,7 +10,7 @@ #include #include #include -#if EMSCRIPTEN +#ifdef __EMSCRIPTEN__ #include #endif @@ -19,7 +19,7 @@ int sum = 0; void finish(int result) { close(sockfd); -#if EMSCRIPTEN +#ifdef __EMSCRIPTEN__ REPORT_RESULT(); #endif exit(result); @@ -108,7 +108,7 @@ int main() { finish(EXIT_FAILURE); } -#if EMSCRIPTEN +#ifdef __EMSCRIPTEN__ emscripten_set_main_loop(iter, 0, 0); #else while (1) iter(); diff --git a/tests/sockets/test_sockets_partial_server.c b/tests/sockets/test_sockets_partial_server.c index f740c307468cf..5c3621a0cc744 100644 --- a/tests/sockets/test_sockets_partial_server.c +++ b/tests/sockets/test_sockets_partial_server.c @@ -11,7 +11,7 @@ #include #include #include -#if EMSCRIPTEN +#ifdef __EMSCRIPTEN__ #include #endif @@ -124,7 +124,7 @@ int main() { exit(EXIT_FAILURE); } -#if EMSCRIPTEN +#ifdef __EMSCRIPTEN__ emscripten_set_main_loop(iter, 60, 0); #else while (1) iter(); diff --git a/tests/sockets/test_sockets_select_server_closes_connection_client_rw.c b/tests/sockets/test_sockets_select_server_closes_connection_client_rw.c index e69c3ac076574..28a81cd94ba43 100644 --- a/tests/sockets/test_sockets_select_server_closes_connection_client_rw.c +++ b/tests/sockets/test_sockets_select_server_closes_connection_client_rw.c @@ -10,7 +10,7 @@ #include #include #include -#if EMSCRIPTEN +#ifdef __EMSCRIPTEN__ #include #endif @@ -24,7 +24,7 @@ msg_t writemsg; void finish(int result) { close(sockfd); -#if EMSCRIPTEN +#ifdef __EMSCRIPTEN__ REPORT_RESULT(); #endif exit(result); @@ -216,7 +216,7 @@ int main() { finish(EXIT_FAILURE); } -#if EMSCRIPTEN +#ifdef __EMSCRIPTEN__ emscripten_set_main_loop(main_loop, 0, 0); #else while (1) main_loop(); diff --git a/tests/sockets/test_sockets_select_server_down_client.c b/tests/sockets/test_sockets_select_server_down_client.c index 2765a87979990..5b05087053e69 100644 --- a/tests/sockets/test_sockets_select_server_down_client.c +++ b/tests/sockets/test_sockets_select_server_down_client.c @@ -10,7 +10,7 @@ #include #include #include -#if EMSCRIPTEN +#ifdef __EMSCRIPTEN__ #include #endif @@ -20,7 +20,7 @@ int sockfd = -1; void finish(int result) { close(sockfd); -#if EMSCRIPTEN +#ifdef __EMSCRIPTEN__ REPORT_RESULT(); #endif exit(result); @@ -87,7 +87,7 @@ int main() { finish(EXIT_FAILURE); } -#if EMSCRIPTEN +#ifdef __EMSCRIPTEN__ emscripten_set_main_loop(iter, 0, 0); #else while (1) iter(); diff --git a/tests/sockets/test_sockets_select_server_down_server.c b/tests/sockets/test_sockets_select_server_down_server.c index 012932cf27941..07c5c84754804 100644 --- a/tests/sockets/test_sockets_select_server_down_server.c +++ b/tests/sockets/test_sockets_select_server_down_server.c @@ -10,7 +10,7 @@ #include #include #include -#if EMSCRIPTEN +#ifdef __EMSCRIPTEN__ #include #endif @@ -47,7 +47,7 @@ int main() { close(serverfd); -#if EMSCRIPTEN +#ifdef __EMSCRIPTEN__ emscripten_set_main_loop(main_loop, 60, 0); #else while (1) main_loop(); sleep(1); diff --git a/tests/sockets/webrtc_host.c b/tests/sockets/webrtc_host.c index 866c875c3029b..e482d4aec8c05 100644 --- a/tests/sockets/webrtc_host.c +++ b/tests/sockets/webrtc_host.c @@ -9,7 +9,7 @@ #include #include #include -#if EMSCRIPTEN +#ifdef __EMSCRIPTEN__ #include #endif @@ -37,7 +37,7 @@ void iter() { shutdown(sock, SHUT_RDWR); close(sock); -#if EMSCRIPTEN +#ifdef __EMSCRIPTEN__ int result = 1; REPORT_RESULT(); exit(EXIT_SUCCESS); @@ -79,7 +79,7 @@ int main(void) hdr.msg_iov = iov; hdr.msg_iovlen = 1; -#if EMSCRIPTEN +#ifdef __EMSCRIPTEN__ emscripten_set_main_loop(iter, 0, 0); #else while (!done) iter(); diff --git a/tests/sockets/webrtc_peer.c b/tests/sockets/webrtc_peer.c index dd44e93ee471f..327782d61234d 100644 --- a/tests/sockets/webrtc_peer.c +++ b/tests/sockets/webrtc_peer.c @@ -9,7 +9,7 @@ #include #include #include -#if EMSCRIPTEN +#ifdef __EMSCRIPTEN__ #include #endif @@ -71,7 +71,7 @@ int main(void) hdr.msg_iov = iov; hdr.msg_iovlen = 1; -#if EMSCRIPTEN +#ifdef __EMSCRIPTEN__ emscripten_set_main_loop(iter, 0, 0); #else while (!done) iter(); diff --git a/tests/sqlite/sqlite3.c b/tests/sqlite/sqlite3.c index bcbb7cdd1da97..d49e1887a86f3 100644 --- a/tests/sqlite/sqlite3.c +++ b/tests/sqlite/sqlite3.c @@ -38132,7 +38132,7 @@ static int writeJournalHdr(Pager *pPager){ u32 nHeader = (u32)pPager->pageSize;/* Size of buffer pointed to by zHeader */ u32 nWrite; /* Bytes of header sector written */ int ii; /* Loop counter */ -#ifdef EMSCRIPTEN +#ifdef __EMSCRIPTEN__ u8 temp[4]; #endif @@ -38185,7 +38185,7 @@ static int writeJournalHdr(Pager *pPager){ } /* The random check-hash initialiser */ -#ifdef EMSCRIPTEN +#ifdef __EMSCRIPTEN__ sqlite3_randomness(sizeof(pPager->cksumInit), temp); pPager->cksumInit = temp[0] + (((u32)temp[1]) << 8) + (((u32)temp[2]) << 16) + (((u32)temp[3]) << 24); #else @@ -52942,7 +52942,7 @@ static void dropCell(MemPage *pPage, int idx, int sz, int *pRC){ endPtr = &data[pPage->cellOffset + 2*pPage->nCell - 2]; assert( (SQLITE_PTR_TO_INT(ptr)&1)==0 ); /* ptr is always 2-byte aligned */ while( ptrendPtr ){ -#ifdef EMSCRIPTEN +#ifdef __EMSCRIPTEN__ ptr[0] = ptr[-2]; ptr[1] = ptr[-1]; #else diff --git a/tests/stat/test_mknod.c b/tests/stat/test_mknod.c index 361b23157cdb8..262c8a5f7ea36 100644 --- a/tests/stat/test_mknod.c +++ b/tests/stat/test_mknod.c @@ -32,7 +32,7 @@ void test() { // than a FIFO. so, the tests are disabled when running // natively as they'd be utterly inconsistent. // -#if EMSCRIPTEN +#ifdef __EMSCRIPTEN__ // mknod a folder err = mknod("mknod-folder", S_IFDIR | 0777, 0); diff --git a/tests/stat/test_stat.c b/tests/stat/test_stat.c index f59fb3c32cf95..e14ebdc5f1f2a 100644 --- a/tests/stat/test_stat.c +++ b/tests/stat/test_stat.c @@ -55,7 +55,7 @@ void test() { assert(s.st_atime == 1200000000); assert(s.st_mtime == 1200000000); assert(s.st_ctime); -#ifdef EMSCRIPTEN +#ifdef __EMSCRIPTEN__ assert(s.st_blksize == 4096); assert(s.st_blocks == 1); #endif @@ -73,7 +73,7 @@ void test() { assert(s.st_atime == 1200000000); assert(s.st_mtime == 1200000000); assert(s.st_ctime); -#if EMSCRIPTEN +#ifdef __EMSCRIPTEN__ assert(s.st_blksize == 4096); assert(s.st_blocks == 1); #endif @@ -91,7 +91,7 @@ void test() { assert(s.st_atime == 1200000000); assert(s.st_mtime == 1200000000); assert(s.st_ctime); -#if EMSCRIPTEN +#ifdef __EMSCRIPTEN__ assert(s.st_blksize == 4096); assert(s.st_blocks == 1); #endif @@ -112,7 +112,7 @@ void test() { assert(s.st_atime); assert(s.st_mtime); assert(s.st_ctime); -#if EMSCRIPTEN +#ifdef __EMSCRIPTEN__ assert(s.st_blksize == 4096); assert(s.st_blocks == 0); #endif @@ -130,7 +130,7 @@ void test() { assert(s.st_atime == 1200000000); assert(s.st_mtime == 1200000000); assert(s.st_ctime); -#if EMSCRIPTEN +#ifdef __EMSCRIPTEN__ assert(s.st_blksize == 4096); assert(s.st_blocks == 1); #endif @@ -148,7 +148,7 @@ void test() { assert(s.st_atime != 1200000000); // should NOT match the utime call we did for dir/file assert(s.st_mtime != 1200000000); assert(s.st_ctime); -#if EMSCRIPTEN +#ifdef __EMSCRIPTEN__ assert(s.st_blksize == 4096); assert(s.st_blocks == 1); #endif diff --git a/tests/test_core.py b/tests/test_core.py index 19bb9ca1dcdcd..7d6199ffab5bd 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -6,7 +6,7 @@ from runner import RunnerCore, path_from_root, checked_sanity, test_modes, get_bullet_library class T(RunnerCore): # Short name, to make it more fun to use manually on the commandline - def is_le32(self): + def is_emscripten_abi(self): return not ('i386-pc-linux-gnu' in COMPILER_OPTS or self.env.get('EMCC_LLVM_TARGET') == 'i386-pc-linux-gnu') def test_hello_world(self): @@ -504,9 +504,14 @@ def test_sha1(self): self.do_run(open(path_from_root('tests', 'sha1.c')).read(), 'SHA1=15dd99a1991e0b3826fede3deffc1feba42278e6') + def test_asmjs_unknown_emscripten(self): + if self.emcc_args == None: return self.skip('needs emcc') + if not self.is_emscripten_abi(): return self.skip('asmjs-unknown-emscripten needed for asmjs-unknown-emscripten target test') + self.do_run(open(path_from_root('tests', 'asmjs-unknown-emscripten.c')).read(), '') + def test_cube2md5(self): if self.emcc_args == None: return self.skip('needs emcc') - if not self.is_le32(): return self.skip('le32 needed for accurate math') + if not self.is_emscripten_abi(): return self.skip('asmjs-unknown-emscripten needed for accurate math') self.emcc_args += ['--embed-file', 'cube2md5.txt'] shutil.copyfile(path_from_root('tests', 'cube2md5.txt'), os.path.join(self.get_dir(), 'cube2md5.txt')) self.do_run(open(path_from_root('tests', 'cube2md5.cpp')).read(), open(path_from_root('tests', 'cube2md5.ok')).read()) @@ -586,7 +591,7 @@ def test_unaligned(self): # TODO: A version of this with int64s as well - if self.is_le32(): + if self.is_emscripten_abi(): return self.skip('LLVM marks the reads of s as fully aligned, making this test invalid') else: self.do_run(src, '*12 : 1 : 12\n328157500735811.0,23,416012775903557.0,99\n') @@ -666,7 +671,7 @@ def test_align64(self): } ''' - if self.is_le32(): + if self.is_emscripten_abi(): self.do_run(src, '''16,32 0,8,8,8 16,24,24,24 @@ -848,7 +853,7 @@ def test_math_hyperbolic(self): def test_math_lgamma(self): if self.emcc_args is None: return self.skip('requires emcc') - if not self.is_le32(): return self.skip('le32 needed for accurate math') + if not self.is_emscripten_abi(): return self.skip('asmjs-unknown-emscripten needed for accurate math') test_path = path_from_root('tests', 'math', 'lgamma') src, output = (test_path + s for s in ('.in', '.out')) @@ -1872,7 +1877,7 @@ def test_pystruct(self): # Compressed memory. Note that sizeof() does give the fat sizes, however! self.do_run(src, '*0,0,0,1,2,3,4,5*\n*1,0,0*\n*0*\n0:1,1\n1:1,1\n2:1,1\n*12,20,5*') else: - if self.is_le32(): + if self.is_emscripten_abi(): self.do_run(src, '*0,0,0,4,8,16,20,24*\n*1,0,0*\n*0*\n0:1,1\n1:1,1\n2:1,1\n*16,24,24*') else: self.do_run(src, '*0,0,0,4,8,12,16,20*\n*1,0,0*\n*0*\n0:1,1\n1:1,1\n2:1,1\n*12,20,20*') @@ -1941,7 +1946,7 @@ def test_emscripten_get_compiler_setting(self): self.do_run(open(src).read(), open(output).read().replace('waka', EMSCRIPTEN_VERSION)) def test_inlinejs(self): - if not self.is_le32(): return self.skip('le32 needed for inline js') + if not self.is_emscripten_abi(): return self.skip('asmjs-unknown-emscripten needed for inline js') if os.environ.get('EMCC_FAST_COMPILER') != '0': return self.skip('fastcomp only supports EM_ASM') test_path = path_from_root('tests', 'core', 'test_inlinejs') @@ -1954,7 +1959,7 @@ def test_inlinejs(self): for i in range(1, 5): assert ('comment%d' % i) in out def test_inlinejs2(self): - if not self.is_le32(): return self.skip('le32 needed for inline js') + if not self.is_emscripten_abi(): return self.skip('asmjs-unknown-emscripten needed for inline js') if os.environ.get('EMCC_FAST_COMPILER') != '0': return self.skip('fastcomp only supports EM_ASM') test_path = path_from_root('tests', 'core', 'test_inlinejs2') @@ -2143,7 +2148,7 @@ def test_pack(self): def test_varargs(self): if Settings.QUANTUM_SIZE == 1: return self.skip('FIXME: Add support for this') - if not self.is_le32(): return self.skip('we do not support all varargs stuff without le32') + if not self.is_emscripten_abi(): return self.skip('we do not support all varargs stuff without asmjs-unknown-emscripten') test_path = path_from_root('tests', 'core', 'test_varargs') src, output = (test_path + s for s in ('.in', '.out')) @@ -2152,7 +2157,7 @@ def test_varargs(self): def test_varargs_byval(self): if Settings.USE_TYPED_ARRAYS != 2: return self.skip('FIXME: Add support for this') - if self.is_le32(): return self.skip('clang cannot compile this code with that target yet') + if self.is_emscripten_abi(): return self.skip('clang cannot compile this code with that target yet') src = r''' #include @@ -2776,8 +2781,8 @@ def can_dlfcn(self): else: Settings.NAMED_GLOBALS = 1 - if not self.is_le32(): - self.skip('need le32 for dlfcn support') + if not self.is_emscripten_abi(): + self.skip('need asmjs-unknown-emscripten for dlfcn support') return False else: return True @@ -3614,7 +3619,7 @@ def test_rand(self): def test_strtod(self): if self.emcc_args is None: return self.skip('needs emcc for libc') - if not self.is_le32(): return self.skip('le32 needed for accurate math') + if not self.is_emscripten_abi(): return self.skip('asmjs-unknown-emscripten needed for accurate math') src = r''' #include @@ -3770,7 +3775,7 @@ def test_fnmatch(self): def test_sscanf(self): if self.emcc_args is None: return self.skip('needs emcc for libc') - if not self.is_le32(): return self.skip('le32 needed for accurate math') + if not self.is_emscripten_abi(): return self.skip('asmjs-unknown-emscripten needed for accurate math') test_path = path_from_root('tests', 'core', 'test_sscanf') src, output = (test_path + s for s in ('.in', '.out')) @@ -4152,7 +4157,7 @@ def test_utf(self): def test_utf32(self): if self.emcc_args is None: return self.skip('need libc for wcslen()') - if not self.is_le32(): return self.skip('this test uses inline js, which requires le32') + if not self.is_emscripten_abi(): return self.skip('this test uses inline js, which requires asmjs-unknown-emscripten') self.do_run(open(path_from_root('tests', 'utf32.cpp')).read(), 'OK.') self.do_run(open(path_from_root('tests', 'utf32.cpp')).read(), 'OK.', args=['-fshort-wchar']) @@ -4209,13 +4214,13 @@ def process(filename): def test_fs_nodefs_rw(self): if self.emcc_args is None: return self.skip('requires emcc') - if not self.is_le32(): return self.skip('le32 needed for inline js') + if not self.is_emscripten_abi(): return self.skip('asmjs-unknown-emscripten needed for inline js') src = open(path_from_root('tests', 'fs', 'test_nodefs_rw.c'), 'r').read() self.do_run(src, 'success', force_c=True, js_engines=[NODE_JS]) def test_unistd_access(self): self.clear() - if not self.is_le32(): return self.skip('le32 needed for inline js') + if not self.is_emscripten_abi(): return self.skip('asmjs-unknown-emscripten needed for inline js') for fs in ['MEMFS', 'NODEFS']: src = open(path_from_root('tests', 'unistd', 'access.c'), 'r').read() expected = open(path_from_root('tests', 'unistd', 'access.out'), 'r').read() @@ -4223,7 +4228,7 @@ def test_unistd_access(self): self.do_run(src, expected, js_engines=[NODE_JS]) def test_unistd_curdir(self): - if not self.is_le32(): return self.skip('le32 needed for inline js') + if not self.is_emscripten_abi(): return self.skip('asmjs-unknown-emscripten needed for inline js') src = open(path_from_root('tests', 'unistd', 'curdir.c'), 'r').read() expected = open(path_from_root('tests', 'unistd', 'curdir.out'), 'r').read() self.do_run(src, expected) @@ -4254,7 +4259,7 @@ def test_unistd_pathconf(self): def test_unistd_truncate(self): self.clear() - if not self.is_le32(): return self.skip('le32 needed for inline js') + if not self.is_emscripten_abi(): return self.skip('asmjs-unknown-emscripten needed for inline js') for fs in ['MEMFS', 'NODEFS']: src = open(path_from_root('tests', 'unistd', 'truncate.c'), 'r').read() expected = open(path_from_root('tests', 'unistd', 'truncate.out'), 'r').read() @@ -4283,7 +4288,7 @@ def test_unistd_login(self): def test_unistd_unlink(self): self.clear() if self.emcc_args is None: return self.skip('requires emcc') - if not self.is_le32(): return self.skip('le32 needed for inline js') + if not self.is_emscripten_abi(): return self.skip('asmjs-unknown-emscripten needed for inline js') for fs in ['MEMFS', 'NODEFS']: src = open(path_from_root('tests', 'unistd', 'unlink.c'), 'r').read() Building.COMPILER_TEST_OPTS += ['-D' + fs] @@ -4291,7 +4296,7 @@ def test_unistd_unlink(self): def test_unistd_links(self): self.clear() - if not self.is_le32(): return self.skip('le32 needed for inline js') + if not self.is_emscripten_abi(): return self.skip('asmjs-unknown-emscripten needed for inline js') for fs in ['MEMFS', 'NODEFS']: if WINDOWS and fs == 'NODEFS': print >> sys.stderr, 'Skipping NODEFS part of this test for test_unistd_links on Windows, since it would require administrative privileges.' @@ -4311,7 +4316,7 @@ def test_unistd_sleep(self): def test_unistd_io(self): self.clear() - if not self.is_le32(): return self.skip('le32 needed for inline js') + if not self.is_emscripten_abi(): return self.skip('asmjs-unknown-emscripten needed for inline js') if self.run_name == 'o2': return self.skip('non-asm optimized builds can fail with inline js') if self.emcc_args is None: return self.skip('requires emcc') for fs in ['MEMFS', 'NODEFS']: @@ -4322,7 +4327,7 @@ def test_unistd_io(self): def test_unistd_misc(self): if self.emcc_args is None: return self.skip('requires emcc') - if not self.is_le32(): return self.skip('le32 needed for inline js') + if not self.is_emscripten_abi(): return self.skip('asmjs-unknown-emscripten needed for inline js') for fs in ['MEMFS', 'NODEFS']: src = open(path_from_root('tests', 'unistd', 'misc.c'), 'r').read() expected = open(path_from_root('tests', 'unistd', 'misc.out'), 'r').read() @@ -4813,7 +4818,7 @@ def process(filename): def test_sqlite(self): # gcc -O3 -I/home/alon/Dev/emscripten/tests/sqlite -ldl src.c if self.emcc_args is None: return self.skip('Very slow without ta2, and we would also need to include dlmalloc manually without emcc') - if not self.is_le32(): return self.skip('fails on x86 due to a legalization issue on llvm 3.3') + if not self.is_emscripten_abi(): return self.skip('fails on x86 due to a legalization issue on llvm 3.3') if Settings.QUANTUM_SIZE == 1: return self.skip('TODO FIXME') self.banned_js_engines = [NODE_JS] # OOM in older node @@ -5080,12 +5085,12 @@ def clean(text): def test_python(self): if self.emcc_args is None: return self.skip('requires emcc') if Settings.QUANTUM_SIZE == 1: return self.skip('TODO: make this work') - if not self.is_le32(): return self.skip('fails on non-le32') # FIXME + if not self.is_emscripten_abi(): return self.skip('fails on not asmjs-unknown-emscripten') # FIXME #Settings.EXPORTED_FUNCTIONS += ['_PyRun_SimpleStringFlags'] # for the demo - if self.is_le32(): - bitcode = path_from_root('tests', 'python', 'python.le32.bc') + if self.is_emscripten_abi(): + bitcode = path_from_root('tests', 'python', 'python.asmjs-unknown-emscripten.bc') else: bitcode = path_from_root('tests', 'python', 'python.small.bc') @@ -5131,8 +5136,8 @@ def test_cases(self): if '_noasm' in shortname and Settings.ASM_JS: print self.skip('case "%s" not relevant for asm.js' % shortname) continue - if '_le32' in shortname and not self.is_le32(): - print self.skip('case "%s" not relevant for non-le32 target' % shortname) + if '_eua' in shortname and not self.is_emscripten_abi(): + print self.skip('case "%s" not relevant for not asmjs-unknown-emscripten target' % shortname) continue if '_fastcomp' in shortname and not os.environ.get('EMCC_FAST_COMPILER') != '0': print self.skip('case "%s" not relevant for non-fastcomp' % shortname) diff --git a/tests/test_float_literals.cpp b/tests/test_float_literals.cpp index fdae2764056a7..2920fbd14d97c 100644 --- a/tests/test_float_literals.cpp +++ b/tests/test_float_literals.cpp @@ -4,7 +4,7 @@ #include #include -#if defined(_MSC_VER) || defined(EMSCRIPTEN) +#if defined(_MSC_VER) || defined(__EMSCRIPTEN__) #define FLOAT_NAN ((float)std::numeric_limits::quiet_NaN()) #define FLOAT_INF ((float)std::numeric_limits::infinity()) #else @@ -12,7 +12,7 @@ #define FLOAT_INF ((float)INFINITY) #endif -#if defined(_MSC_VER) || defined(EMSCRIPTEN) +#if defined(_MSC_VER) || defined(__EMSCRIPTEN__) #define DOUBLE_NAN ((double)std::numeric_limits::quiet_NaN()) #define DOUBLE_INF ((double)std::numeric_limits::infinity()) #else diff --git a/tests/test_sanity.py b/tests/test_sanity.py index 5713c99ca5ae6..07582d28085f2 100644 --- a/tests/test_sanity.py +++ b/tests/test_sanity.py @@ -489,7 +489,7 @@ def test_nostdincxx(self): try: old = os.environ.get('EMCC_LLVM_TARGET') or '' for compiler in [EMCC, EMXX]: - for target in ['i386-pc-linux-gnu', 'le32-unknown-nacl']: + for target in ['i386-pc-linux-gnu', 'asmjs-unknown-emscripten']: print compiler, target os.environ['EMCC_LLVM_TARGET'] = target out, err = Popen([PYTHON, EMCC, path_from_root('tests', 'hello_world.cpp'), '-v'], stdout=PIPE, stderr=PIPE).communicate() diff --git a/tests/tex_nonbyte.c b/tests/tex_nonbyte.c index 960d0efb4cffa..ffeb9f24eef6a 100644 --- a/tests/tex_nonbyte.c +++ b/tests/tex_nonbyte.c @@ -22,7 +22,7 @@ RESULTING FROM THE USE, MODIFICATION, OR REDISTRIBUTION OF THIS SOFTWARE. */ -#if !EMSCRIPTEN +#ifndef __EMSCRIPTEN__ #define USE_GLEW 1 #endif @@ -118,7 +118,7 @@ int main(int argc, char *argv[]) glClearColor( 0, 0, 0, 0 ); -#if !EMSCRIPTEN +#ifndef __EMSCRIPTEN__ glEnable( GL_TEXTURE_2D ); // Need this to display a texture XXX unnecessary in OpenGL ES 2.0/WebGL #endif @@ -192,7 +192,7 @@ int main(int argc, char *argv[]) SDL_GL_SwapBuffers(); -#if !EMSCRIPTEN +#ifndef __EMSCRIPTEN__ // Wait for 3 seconds to give us a chance to see the image SDL_Delay(3000); #endif diff --git a/tests/unistd/unlink.c b/tests/unistd/unlink.c index 9f5323253085f..a15baab8f693b 100644 --- a/tests/unistd/unlink.c +++ b/tests/unistd/unlink.c @@ -7,7 +7,7 @@ #include #include #include -#if EMSCRIPTEN +#ifdef __EMSCRIPTEN__ #include #endif @@ -23,7 +23,7 @@ static void create_file(const char *path, const char *buffer, int mode) { void setup() { mkdir("working", 0777); -#if EMSCRIPTEN +#ifdef __EMSCRIPTEN__ EM_ASM( #if NODEFS FS.mount(NODEFS, { root: '.' }, 'working'); diff --git a/tests/uuid/test.c b/tests/uuid/test.c index dc2c6589010bd..f5f84011091d6 100644 --- a/tests/uuid/test.c +++ b/tests/uuid/test.c @@ -59,7 +59,7 @@ int main() { // The following lets the browser test exit cleanly. int result = 1; - #if EMSCRIPTEN + #if defined(__EMSCRIPTEN__) #ifdef REPORT_RESULT REPORT_RESULT(); #endif diff --git a/tools/shared.py b/tools/shared.py index 2072fec688d77..cb6c840231098 100644 --- a/tools/shared.py +++ b/tools/shared.py @@ -305,9 +305,24 @@ def check_fastcomp(): print >> sys.stderr, '===========================================================================' logging.critical('you can fall back to the older (pre-fastcomp) compiler core, although that is not recommended, see https://github.com/kripken/emscripten/wiki/LLVM-Backend') return False + + # look for a source tree under the llvm binary directory. if there is one, look for emscripten-version.txt files + d = os.path.dirname(LLVM_COMPILER) + while d != os.path.dirname(d): + if os.path.exists(os.path.join(d, 'emscripten-version.txt')): + llvm_version = open(os.path.join(d, 'emscripten-version.txt')).read().strip() + if os.path.exists(os.path.join(d, 'tools', 'clang', 'emscripten-version.txt')): + clang_version = open(os.path.join(d, 'tools', 'clang', 'emscripten-version.txt')).read().strip() + else: + clang_version = '?' + if EMSCRIPTEN_VERSION != llvm_version or EMSCRIPTEN_VERSION != clang_version: + logging.error('Emscripten, llvm and clang versions do not match, this is dangerous (%s, %s, %s)', EMSCRIPTEN_VERSION, llvm_version, clang_version) + logging.error('Make sure to use the same branch in each repo, and to be up-to-date on each. See https://github.com/kripken/emscripten/wiki/LLVM-Backend') + break + d = os.path.dirname(d) return True except Exception, e: - logging.warning('cound not check fastcomp: %s' % str(e)) + logging.warning('could not check fastcomp: %s' % str(e)) return True EXPECTED_NODE_VERSION = (0,8,0) @@ -346,7 +361,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.12.1' +EMSCRIPTEN_VERSION = '1.12.2' def generate_sanity(): return EMSCRIPTEN_VERSION + '|' + get_llvm_target() + '|' + LLVM_ROOT + '|' + get_clang_version() @@ -603,7 +618,7 @@ def clean_temp(): # Target choice. Must be synced with src/settings.js (TARGET_*) def get_llvm_target(): - return os.environ.get('EMCC_LLVM_TARGET') or 'le32-unknown-nacl' # 'i386-pc-linux-gnu' + return os.environ.get('EMCC_LLVM_TARGET') or 'asmjs-unknown-emscripten' LLVM_TARGET = get_llvm_target() # COMPILER_OPTS: options passed to clang when generating bitcode for us @@ -611,19 +626,29 @@ def get_llvm_target(): COMPILER_OPTS # Can be set in EM_CONFIG, optionally except: COMPILER_OPTS = [] -COMPILER_OPTS = COMPILER_OPTS + ['-m32', '-DEMSCRIPTEN', '-D__EMSCRIPTEN__', - '-fno-math-errno', - #'-fno-threadsafe-statics', # disabled due to issue 1289 +COMPILER_OPTS = COMPILER_OPTS + [#'-fno-threadsafe-statics', # disabled due to issue 1289 '-target', LLVM_TARGET] +# COMPILER_STANDARDIZATION_OPTS: Options to correct various predefined macro options. +COMPILER_STANDARDIZATION_OPTS = [] + +# When we're not using an appropriate target triple, use -m32 to get i386, which we +# can mostly make work. +if LLVM_TARGET != 'asmjs-unknown-emscripten' and LLVM_TARGET != 'le32-unknown-nacl': + COMPILER_OPTS += ['-m32'] + COMPILER_STANDARDIZATION_OPTS += ['-U__i386__', '-U__i386', '-Ui386', + '-U__SSE__', '-U__SSE_MATH__', '-U__SSE2__', '-U__SSE2_MATH__', '-U__MMX__', + '-U__APPLE__', '-U__linux__'] + +# With the asmjs-unknown-emscripten target triple, clang sets up language modes +# and predefined macros properly. When using the other targets, we have to set things +# up manually. +if LLVM_TARGET != 'asmjs-unknown-emscripten': + COMPILER_OPTS += ['-fno-math-errno'] + COMPILER_STANDARDIZATION_OPTS += ['-D__IEEE_LITTLE_ENDIAN'] if LLVM_TARGET == 'le32-unknown-nacl': - COMPILER_OPTS = filter(lambda opt: opt != '-m32', COMPILER_OPTS) # le32 target is 32-bit anyhow, no need for -m32 - COMPILER_OPTS += ['-U__native_client__', '-U__pnacl__', '-U__ELF__'] # The nacl target is originally used for Google Native Client. Emscripten is not NaCl, so remove the platform #define, when using their triple. - -# Remove various platform specific defines, and set little endian -COMPILER_STANDARDIZATION_OPTS = ['-U__i386__', '-U__i386', '-Ui386', '-U__STRICT_ANSI__', '-D__IEEE_LITTLE_ENDIAN', - '-U__SSE__', '-U__SSE_MATH__', '-U__SSE2__', '-U__SSE2_MATH__', '-U__MMX__', - '-U__APPLE__', '-U__linux__'] + COMPILER_OPTS += ['-DEMSCRIPTEN', '-D__EMSCRIPTEN__', '-fno-math-errno', + '-U__native_client__', '-U__pnacl__', '-U__ELF__'] USE_EMSDK = not os.environ.get('EMMAKEN_NO_SDK') @@ -643,8 +668,10 @@ def get_llvm_target(): '-Xclang', '-isystem' + path_from_root('system', 'include', 'SDL'), ] EMSDK_OPTS += COMPILER_STANDARDIZATION_OPTS - if LLVM_TARGET != 'le32-unknown-nacl': - EMSDK_CXX_OPTS = ['-nostdinc++'] # le32 target does not need -nostdinc++ + # For temporary compatibility, treat 'le32-unknown-nacl' as 'asmjs-unknown-emscripten'. + if LLVM_TARGET != 'asmjs-unknown-emscripten' and \ + LLVM_TARGET != 'le32-unknown-pnacl': + EMSDK_CXX_OPTS = ['-nostdinc++'] # asmjs-unknown-emscripten target does not need -nostdinc++ else: EMSDK_CXX_OPTS = [] COMPILER_OPTS += EMSDK_OPTS @@ -660,9 +687,12 @@ def get_llvm_target(): try: if 'gcparam' not in str(SPIDERMONKEY_ENGINE): + new_spidermonkey = SPIDERMONKEY_ENGINE if type(SPIDERMONKEY_ENGINE) is str: - SPIDERMONKEY_ENGINE = [SPIDERMONKEY_ENGINE] - SPIDERMONKEY_ENGINE += ['-e', "gcparam('maxBytes', 1024*1024*1024);"] # Our very large files need lots of gc heap + new_spidermonkey = [SPIDERMONKEY_ENGINE] + new_spidermonkey += ['-e', "gcparam('maxBytes', 1024*1024*1024);"] # Our very large files need lots of gc heap + JS_ENGINES = map(lambda x: x if x != SPIDERMONKEY_ENGINE else new_spidermonkey, JS_ENGINES) + SPIDERMONKEY_ENGINE = new_spidermonkey except NameError: pass