diff options
68 files changed, 7866 insertions, 3436 deletions
@@ -113,3 +113,4 @@ a license to everyone to use it as detailed in LICENSE.) * Heidi Pan <heidi.pan@intel.com> (copyright owned by Intel) * Vasilis Kalintiris <ehostunreach@gmail.com> * Adam C. Clifton <adam@hulkamaniac.com> +* Volo Zyko <volo.zyko@gmail.com> diff --git a/cmake/Platform/Emscripten.cmake b/cmake/Platform/Emscripten.cmake index c30632ca..ef813eb8 100644 --- a/cmake/Platform/Emscripten.cmake +++ b/cmake/Platform/Emscripten.cmake @@ -109,6 +109,8 @@ set(CMAKE_CXX_RESPONSE_FILE_LINK_FLAG "@") # Specify the program to use when building static libraries. Force Emscripten-related command line options to clang. set(CMAKE_CXX_ARCHIVE_CREATE "${CMAKE_AR} rc <TARGET> ${CMAKE_START_TEMP_FILE} <LINK_FLAGS> <OBJECTS>${CMAKE_END_TEMP_FILE}") set(CMAKE_C_ARCHIVE_CREATE "${CMAKE_AR} rc <TARGET> ${CMAKE_START_TEMP_FILE} <LINK_FLAGS> <OBJECTS>${CMAKE_END_TEMP_FILE}") +set(CMAKE_CXX_ARCHIVE_APPEND "${CMAKE_AR} r <TARGET> ${CMAKE_START_TEMP_FILE} <LINK_FLAGS> <OBJECTS>${CMAKE_END_TEMP_FILE}") +set(CMAKE_C_ARCHIVE_APPEND "${CMAKE_AR} r <TARGET> ${CMAKE_START_TEMP_FILE} <LINK_FLAGS> <OBJECTS>${CMAKE_END_TEMP_FILE}") # Set a global EMSCRIPTEN variable that can be used in client CMakeLists.txt to detect when building using Emscripten. # There seems to be some kind of bug with CMake, so you might need to define this manually on the command line with "-DEMSCRIPTEN=1". @@ -53,14 +53,17 @@ from tools import shared, jsrun from tools.shared import Compression, execute, suffix, unsuffixed, unsuffixed_basename, WINDOWS from tools.response_file import read_response_file -C_SUFFIXES = ('.c', '.C') -CXX_SUFFIXES = ('.cpp', '.cxx', '.cc', '.CPP', '.CXX', '.CC') -SOURCE_SUFFIXES = C_SUFFIXES + CXX_SUFFIXES + ('.m', '.mm') -BITCODE_SUFFIXES = ('.bc', '.o', '.obj') -DYNAMICLIB_SUFFIXES = ('.dylib', '.so', '.dll') -STATICLIB_SUFFIXES = ('.a',) -ASSEMBLY_SUFFIXES = ('.ll',) +# endings = dot + a suffix, safe to test by filename.endswith(endings) +C_ENDINGS = ('.c', '.C') +CXX_ENDINGS = ('.cpp', '.cxx', '.cc', '.CPP', '.CXX', '.CC') +SOURCE_ENDINGS = C_ENDINGS + CXX_ENDINGS + ('.m', '.mm') +BITCODE_ENDINGS = ('.bc', '.o', '.obj') +DYNAMICLIB_ENDINGS = ('.dylib', '.so', '.dll') +STATICLIB_ENDINGS = ('.a',) +ASSEMBLY_ENDINGS = ('.ll',) + LIB_PREFIXES = ('', 'lib') + JS_CONTAINING_SUFFIXES = ('js', 'html') # Mapping of emcc opt levels to llvm opt levels. We use llvm opt level 3 in emcc opt @@ -341,6 +344,10 @@ 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 <name> Files and directories to be excluded from + --embed-file and --preload-file + wildcard is supported + --compression <codec> Compress both the compiled code and embedded/ preloaded files. <codec> should be a triple, @@ -758,9 +765,13 @@ def in_temp(name): def filename_type_suffix(filename): for i in reversed(filename.split('.')[1:]): if not i.isdigit(): - return '.' + i + return i return '' +def filename_type_ending(filename): + suffix = filename_type_suffix(filename) + return '' if not suffix else ('.' + suffix) + try: call = CXX if use_cxx else CC @@ -780,6 +791,7 @@ try: split_js_file = None preload_files = [] embed_files = [] + exclude_files = [] compression = None ignore_dynamic_linking = False shell_path = shared.path_from_root('src', 'shell.html') @@ -896,6 +908,11 @@ try: preload_files.append(newargs[i+1]) newargs[i] = '' newargs[i+1] = '' + elif newargs[i].startswith('--exclude-file'): + check_bad_eq(newargs[i]) + exclude_files.append(newargs[i+1]) + newargs[i] = '' + newargs[i+1] = '' elif newargs[i].startswith('--compression'): check_bad_eq(newargs[i]) parts = newargs[i+1].split(',') @@ -990,6 +1007,7 @@ try: newargs = newargs + [default_cxx_std] if emrun: + pre_js += open(shared.path_from_root('src', 'emrun_prejs.js')).read() + '\n' post_js += open(shared.path_from_root('src', 'emrun_postjs.js')).read() + '\n' if js_opts is None: js_opts = opt_level >= 2 @@ -1042,23 +1060,23 @@ 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_SUFFIXES + BITCODE_SUFFIXES + DYNAMICLIB_SUFFIXES + ASSEMBLY_SUFFIXES)): + if (os.path.islink(arg) and os.path.realpath(arg).endswith(SOURCE_ENDINGS + BITCODE_ENDINGS + DYNAMICLIB_ENDINGS + ASSEMBLY_ENDINGS)): arg = os.path.realpath(arg) if not arg.startswith('-'): if not os.path.exists(arg): - logging.error(arg + ': No such file or directory') + 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_suffix = filename_type_suffix(arg) - if arg_suffix.endswith(SOURCE_SUFFIXES + BITCODE_SUFFIXES + DYNAMICLIB_SUFFIXES + ASSEMBLY_SUFFIXES) or shared.Building.is_ar(arg): # we already removed -o <target>, so all these should be inputs + arg_ending = filename_type_ending(arg) + if arg_ending.endswith(SOURCE_ENDINGS + BITCODE_ENDINGS + DYNAMICLIB_ENDINGS + ASSEMBLY_ENDINGS) or shared.Building.is_ar(arg): # we already removed -o <target>, so all these should be inputs newargs[i] = '' - if arg_suffix.endswith(SOURCE_SUFFIXES): + if arg_ending.endswith(SOURCE_ENDINGS): input_files.append(arg) has_source_inputs = True - elif arg_suffix.endswith(ASSEMBLY_SUFFIXES) or shared.Building.is_bitcode(arg): # this should be bitcode, make sure it is valid + elif arg_ending.endswith(ASSEMBLY_ENDINGS) or shared.Building.is_bitcode(arg): # this should be bitcode, make sure it is valid input_files.append(arg) - elif arg_suffix.endswith(STATICLIB_SUFFIXES + DYNAMICLIB_SUFFIXES): + elif arg_ending.endswith(STATICLIB_ENDINGS + DYNAMICLIB_ENDINGS): # if it's not, and it's a library, just add it to libs to find later l = unsuffixed_basename(arg) for prefix in LIB_PREFIXES: @@ -1070,10 +1088,10 @@ try: newargs[i] = '' else: logging.warning(arg + ' is not valid LLVM bitcode') - elif arg_suffix.endswith(STATICLIB_SUFFIXES): + elif arg_ending.endswith(STATICLIB_ENDINGS): if not shared.Building.is_ar(arg): if shared.Building.is_bitcode(arg): - logging.error(arg + ': File has a suffix of a static library ' + str(STATICLIB_SUFFIXES) + ', but instead is an LLVM bitcode file! When linking LLVM bitcode files, use one of the suffixes ' + str(BITCODE_SUFFIXES)) + logging.error(arg + ': File has a suffix of a static library ' + str(STATICLIB_ENDINGS) + ', but instead is an LLVM bitcode file! When linking LLVM bitcode files, use one of the suffixes ' + str(BITCODE_ENDINGS)) else: logging.error(arg + ': Unknown format, not a static library!') exit(1) @@ -1098,17 +1116,12 @@ try: target = target_basename + '.o' final_suffix = 'o' - # do not link in libs when just generating object code (not an 'executable', i.e. JS, or a library) - if ('.' + final_suffix) in BITCODE_SUFFIXES and len(libs) > 0: - logging.warning('not linking against libraries since only compiling to bitcode') - libs = [] - # Find library files for lib in libs: logging.debug('looking for library "%s"' % lib) found = False for prefix in LIB_PREFIXES: - for suff in STATICLIB_SUFFIXES + DYNAMICLIB_SUFFIXES: + for suff in STATICLIB_ENDINGS + DYNAMICLIB_ENDINGS: name = prefix + lib + suff for lib_dir in lib_dirs: path = os.path.join(lib_dir, name) @@ -1119,12 +1132,21 @@ try: break if found: break if found: break - - if ignore_dynamic_linking: - input_files = filter(lambda input_file: not input_file.endswith(DYNAMICLIB_SUFFIXES), input_files) + 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)) + return False + else: + return True + input_files = filter(lambda input_file: check(input_file), input_files) 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_SUFFIXES + BITCODE_SUFFIXES + DYNAMICLIB_SUFFIXES + STATICLIB_SUFFIXES + ASSEMBLY_SUFFIXES)) + 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)) exit(0) newargs = CC_ADDITIONAL_ARGS + newargs @@ -1153,6 +1175,23 @@ try: if os.environ.get('EMCC_FAST_COMPILER'): shared.Settings.ASM_JS = 1 + if shared.Settings.DISABLE_EXCEPTION_CATCHING == 0: + logging.warning('disabling exception catching since not supported in fastcomp yet') + shared.Settings.DISABLE_EXCEPTION_CATCHING = 1 + assert shared.Settings.ALLOW_MEMORY_GROWTH == 0, 'memory growth not supported in fastcomp yet' + assert shared.Settings.UNALIGNED_MEMORY == 0, 'forced unaligned memory not supported in fastcomp' + assert shared.Settings.SAFE_HEAP == 0, 'safe heap not supported in fastcomp yet' + assert shared.Settings.CHECK_HEAP_ALIGN == 0, 'check heap align not supported in fastcomp yet' + assert shared.Settings.SAFE_DYNCALLS == 0, 'safe dyncalls not supported in fastcomp' + assert shared.Settings.RESERVED_FUNCTION_POINTERS == 0, 'reserved function pointers not supported in fastcomp' + assert shared.Settings.ASM_HEAP_LOG == 0, 'asm heap log not supported in fastcomp' + assert shared.Settings.LABEL_DEBUG == 0, 'label debug not supported in fastcomp' + assert shared.Settings.LEGACY_GL_EMULATION == 0, 'legacy gl emulation not supported in fastcomp' + assert shared.Settings.EXECUTION_TIMEOUT == -1, 'execution timeout not supported in fastcomp' + assert shared.Settings.NAMED_GLOBALS == 0, 'named globals not supported in fastcomp' + assert shared.Settings.PGO == 0, 'pgo not supported in fastcomp' + assert shared.Settings.TARGET_LE32 == 1, 'fastcomp requires le32' + assert not bind, 'embind not supported in fastcomp yet' if shared.Settings.ASM_JS: assert opt_level >= 1 or os.environ.get('EMCC_FAST_COMPILER'), 'asm.js requires -O1 or above' @@ -1244,14 +1283,14 @@ try: # First, generate LLVM bitcode. For each input file, we get base.o with bitcode for input_file in input_files: - file_suffix = filename_type_suffix(input_file) - if file_suffix.endswith(SOURCE_SUFFIXES): + file_ending = filename_type_ending(input_file) + if file_ending.endswith(SOURCE_ENDINGS): logging.debug('compiling source file: ' + input_file) input_file = shared.Building.preprocess(input_file, in_temp(uniquename(input_file))) output_file = in_temp(unsuffixed(uniquename(input_file)) + '.o') temp_files.append(output_file) args = newargs + ['-emit-llvm', '-c', input_file, '-o', output_file] - if file_suffix.endswith(CXX_SUFFIXES): + if file_ending.endswith(CXX_ENDINGS): args += shared.EMSDK_CXX_OPTS logging.debug("running: " + call + ' ' + ' '.join(args)) execute([call] + args) # let compiler frontend print directly, so colors are saved (PIPE kills that) @@ -1259,17 +1298,17 @@ try: logging.error('compiler frontend failed to generate LLVM bitcode, halting') sys.exit(1) else: # bitcode - if file_suffix.endswith(BITCODE_SUFFIXES): + if file_ending.endswith(BITCODE_ENDINGS): logging.debug('copying bitcode file: ' + input_file) temp_file = in_temp(unsuffixed(uniquename(input_file)) + '.o') shutil.copyfile(input_file, temp_file) temp_files.append(temp_file) - elif file_suffix.endswith(DYNAMICLIB_SUFFIXES) or shared.Building.is_ar(input_file): + elif file_ending.endswith(DYNAMICLIB_ENDINGS) or shared.Building.is_ar(input_file): logging.debug('copying library file: ' + input_file) temp_file = in_temp(uniquename(input_file)) shutil.copyfile(input_file, temp_file) temp_files.append(temp_file) - elif file_suffix.endswith(ASSEMBLY_SUFFIXES): + elif file_ending.endswith(ASSEMBLY_ENDINGS): if not LEAVE_INPUTS_RAW: # Note that by assembling the .ll file, then disassembling it later, we will # remove annotations which is a good thing for compilation time @@ -1287,8 +1326,8 @@ try: # Optimize source files if llvm_opts > 0: for i, input_file in enumerate(input_files): - file_suffix = filename_type_suffix(input_file) - if file_suffix.endswith(SOURCE_SUFFIXES): + 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)) shared.Building.llvm_opt(temp_file, llvm_opts) @@ -1633,11 +1672,11 @@ try: # First, combine the bitcode files if there are several. We must also link if we have a singleton .a if len(input_files) + len(extra_files_to_link) > 1 or \ - (not LEAVE_INPUTS_RAW and not (suffix(temp_files[0]) in BITCODE_SUFFIXES or suffix(temp_files[0]) in DYNAMICLIB_SUFFIXES) and shared.Building.is_ar(temp_files[0])): + (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)) t0 = time.time() - shared.Building.link(linker_inputs, in_temp(target_basename + '.bc'), force_archive_contents = len(filter(lambda temp: not temp.endswith(STATICLIB_SUFFIXES), temp_files)) == 0) + 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) t1 = time.time() logging.debug(' linking took %.2f seconds' % (t1 - t0)) final = in_temp(target_basename + '.bc') @@ -1682,7 +1721,12 @@ try: else: # At minimum remove dead functions etc., this potentially saves a lot in the size of the generated code (and the time to compile it) link_opts += shared.Building.get_safe_internalize() + ['-globaldce'] - if not save_bc: + + # Simplify LLVM bitcode for fastcomp + if os.environ.get('EMCC_FAST_COMPILER') and not AUTODEBUG: + link_opts += ['-pnacl-abi-simplify-preopt', '-pnacl-abi-simplify-postopt'] + + if (not save_bc and not os.environ.get('EMCC_FAST_COMPILER')) or AUTODEBUG: # let llvm opt directly emit ll, to skip writing and reading all the bitcode link_opts += ['-S'] shared.Building.llvm_opt(final, link_opts, final + '.link.ll') @@ -1709,6 +1753,12 @@ try: final += '.ad.ll' if DEBUG: save_intermediate('autodebug', 'll') + # Simplify bitcode after autodebug + if os.environ.get('EMCC_FAST_COMPILER') and (AUTODEBUG or LEAVE_INPUTS_RAW): + shared.Building.llvm_opt(final, ['-pnacl-abi-simplify-preopt', '-pnacl-abi-simplify-postopt'], final + '.adsimp.bc') + final += '.adsimp.bc' + if DEBUG: save_intermediate('adsimp', 'bc') + # Emscripten logging.debug('LLVM => JS') extra_args = [] if not js_libraries else ['--libraries', ','.join(map(os.path.abspath, js_libraries))] @@ -1719,13 +1769,16 @@ try: # Embed and preload files if len(preload_files) + len(embed_files) > 0: logging.debug('setting up files') - file_args = ['--pre-run'] + file_args = [] if len(preload_files) > 0: file_args.append('--preload') file_args += preload_files if len(embed_files) > 0: file_args.append('--embed') file_args += embed_files + if len(exclude_files) > 0: + file_args.append('--exclude') + file_args += exclude_files if Compression.on: file_args += ['--compress', Compression.encoder, Compression.decoder, Compression.js_name] if use_preload_cache: @@ -8,6 +8,7 @@ import os, platform, optparse, logging, re, pprint, atexit, urlparse, subprocess from operator import itemgetter from urllib import unquote from Queue import PriorityQueue +from threading import Thread, RLock # Populated from cmdline params emrun_options = None @@ -41,6 +42,9 @@ processname_killed_atexit = "" # If user does not specify a --port parameter, this port is used to launch the server. default_webserver_port = 6931 +# Location of Android Debug Bridge executable +ADB = '' + # Host OS detection to autolocate browsers and other OS-specific support needs. WINDOWS = False LINUX = False @@ -73,7 +77,7 @@ last_message_time = time.clock() page_start_time = time.clock() # Stores the time of most recent http page serve. -page_last_served_time = time.clock() +page_last_served_time = None # Returns given log message formatted to be outputted on a HTML page. def format_html(msg): @@ -82,21 +86,14 @@ def format_html(msg): msg = cgi.escape(msg) msg = msg.replace('\r\n', '<br />').replace('\n', '<br />') return msg - + +# HTTP requests are handled from separate threads - synchronize them to avoid race conditions +http_mutex = RLock() + # Prints a log message to 'info' stdout channel. Always printed. def logi(msg): global last_message_time - if emrun_options.log_html: - sys.stdout.write(format_html(msg)) - else: - print >> sys.stdout, msg - sys.stdout.flush() - last_message_time = time.clock() - -# Prints a verbose log message to stdout channel. Only shown if run with --verbose. -def logv(msg): - global emrun_options, last_message_time - if emrun_options.verbose: + with http_mutex: if emrun_options.log_html: sys.stdout.write(format_html(msg)) else: @@ -104,15 +101,28 @@ def logv(msg): sys.stdout.flush() last_message_time = time.clock() +# Prints a verbose log message to stdout channel. Only shown if run with --verbose. +def logv(msg): + global emrun_options, last_message_time + with http_mutex: + if emrun_options.verbose: + if emrun_options.log_html: + sys.stdout.write(format_html(msg)) + else: + print >> sys.stdout, msg + sys.stdout.flush() + last_message_time = time.clock() + # Prints an error message to stderr channel. def loge(msg): global last_message_time - if emrun_options.log_html: - sys.stderr.write(format_html(msg)) - else: - print >> sys.stderr, msg - sys.stderr.flush() - last_message_time = time.clock() + with http_mutex: + if emrun_options.log_html: + sys.stderr.write(format_html(msg)) + else: + print >> sys.stderr, msg + sys.stderr.flush() + last_message_time = time.clock() def format_eol(msg): if WINDOWS: @@ -122,8 +132,6 @@ def format_eol(msg): # Prints a message to the browser stdout output stream. def browser_logi(msg): global browser_stdout_handle - if browser_stdout_handle != sys.stdout and not msg.endswith('\n'): - msg += '\n' msg = format_eol(msg) print >> browser_stdout_handle, msg browser_stdout_handle.flush() @@ -132,8 +140,6 @@ def browser_logi(msg): # Prints a message to the browser stderr output stream. def browser_loge(msg): global browser_stderr_handle - if browser_stderr_handle != sys.stderr and not msg.endswith('\n'): - msg += '\n' msg = format_eol(msg) print >> browser_stderr_handle, msg browser_stderr_handle.flush() @@ -153,7 +159,7 @@ def is_browser_process_alive(): # Kills browser_process and processname_killed_atexit. def kill_browser_process(): - global browser_process, processname_killed_atexit + global browser_process, processname_killed_atexit, emrun_options, ADB if browser_process: try: logv('Terminating browser process..') @@ -161,21 +167,25 @@ def kill_browser_process(): except: pass browser_process = None - if len(processname_killed_atexit) > 0: - logv("Terminating all processes that have string '" + processname_killed_atexit + "' in their name.") - if WINDOWS: - process_image = processname_killed_atexit if '.exe' in processname_killed_atexit else (processname_killed_atexit + '.exe') - process = subprocess.Popen(['taskkill', '/F', '/IM', process_image, '/T'], stdout=subprocess.PIPE, stderr=subprocess.PIPE) - process.communicate() + if emrun_options.android: + logv("Terminating Android app '" + processname_killed_atexit + "'.") + subprocess.call([ADB, 'shell', 'am', 'force-stop', processname_killed_atexit]) else: - try: - subprocess.call(['pkill', processname_killed_atexit]) - except OSError, e: + logv("Terminating all processes that have string '" + processname_killed_atexit + "' in their name.") + if WINDOWS: + process_image = processname_killed_atexit if '.exe' in processname_killed_atexit else (processname_killed_atexit + '.exe') + process = subprocess.Popen(['taskkill', '/F', '/IM', process_image, '/T'], stdout=subprocess.PIPE, stderr=subprocess.PIPE) + process.communicate() + else: try: - subprocess.call(['killall', processname_killed_atexit]) + subprocess.call(['pkill', processname_killed_atexit]) except OSError, e: - loge('Both commands pkill and killall failed to clean up the spawned browser process. Perhaps neither of these utilities is available on your system?') + try: + subprocess.call(['killall', processname_killed_atexit]) + except OSError, e: + loge('Both commands pkill and killall failed to clean up the spawned browser process. Perhaps neither of these utilities is available on your system?') + # Clear the process name to represent that the browser is now dead. processname_killed_atexit = '' # Our custom HTTP web server that will server the target page to run via .html. @@ -190,56 +200,60 @@ class HTTPWebServer(SocketServer.ThreadingMixIn, BaseHTTPServer.HTTPServer): def handle_incoming_message(self, seq_num, log, data): global have_received_messages - have_received_messages = True - - if self.expected_http_seq_num == -1: - self.expected_http_seq_num = seq_num+1 - log(data) - elif seq_num == -1: # Message arrived without a sequence number? Just log immediately - log(data) - elif seq_num == self.expected_http_seq_num: - log(data) - self.expected_http_seq_num += 1 - self.print_messages_due() - elif seq_num < self.expected_http_seq_num: - log(data) - else: - log(data) - self.http_message_queue += [(seq_num, data, log)] - self.http_message_queue.sort(key=itemgetter(0)) - if len(self.http_message_queue) > 16: - self.print_next_message() + with http_mutex: + have_received_messages = True + + if self.expected_http_seq_num == -1: + self.expected_http_seq_num = seq_num+1 + log(data) + elif seq_num == -1: # Message arrived without a sequence number? Just log immediately + log(data) + elif seq_num == self.expected_http_seq_num: + log(data) + self.expected_http_seq_num += 1 + self.print_messages_due() + elif seq_num < self.expected_http_seq_num: + log(data) + else: + self.http_message_queue += [(seq_num, data, log)] + self.http_message_queue.sort(key=itemgetter(0)) + if len(self.http_message_queue) > 16: + self.print_next_message() # If it's been too long since we we got a message, prints out the oldest queued message, ignoring the proper order. # This ensures that if any messages are actually lost, that the message queue will be orderly flushed. def print_timed_out_messages(self): global last_message_time - now = time.clock() - max_message_queue_time = 5 - if len(self.http_message_queue) > 0 and now - last_message_time > max_message_queue_time: - self.print_next_message() + with http_mutex: + now = time.clock() + max_message_queue_time = 5 + if len(self.http_message_queue) > 0 and now - last_message_time > max_message_queue_time: + self.print_next_message() # Skips to printing the next message in queue now, independent of whether there was missed messages in the sequence numbering. def print_next_message(self): - if len(self.http_message_queue) > 0: - self.expected_http_seq_num = self.http_message_queue[0][0] - self.print_messages_due() + with http_mutex: + if len(self.http_message_queue) > 0: + self.expected_http_seq_num = self.http_message_queue[0][0] + self.print_messages_due() # Completely flushes all out-of-order messages in the queue. def print_all_messages(self): - while len(self.http_message_queue) > 0: - self.print_next_message() + with http_mutex: + while len(self.http_message_queue) > 0: + self.print_next_message() # Prints any messages that are now due after we logged some other previous messages. def print_messages_due(self): - while len(self.http_message_queue) > 0: - msg = self.http_message_queue[0] - if msg[0] == self.expected_http_seq_num: - msg[2](msg[1]) - self.expected_http_seq_num += 1 - self.http_message_queue.pop(0) - else: - return + with http_mutex: + while len(self.http_message_queue) > 0: + msg = self.http_message_queue[0] + if msg[0] == self.expected_http_seq_num: + msg[2](msg[1]) + self.expected_http_seq_num += 1 + self.http_message_queue.pop(0) + else: + return def serve_forever(self, timeout=0.5): global emrun_options, last_message_time, page_exit_code, have_received_messages, emrun_not_enabled_nag_printed @@ -278,10 +292,11 @@ class HTTPWebServer(SocketServer.ThreadingMixIn, BaseHTTPServer.HTTPServer): page_exit_code = emrun_options.timeout_returncode # If we detect that the page is not running with emrun enabled, print a warning message. - time_since_page_serve = now - page_last_served_time - if not emrun_not_enabled_nag_printed and not have_received_messages and time_since_page_serve > 5: - logi('The html page you are running is not emrun-capable. Stdout, stderr and exit(returncode) capture will not work. Recompile the application with the --emrun linker flag to enable this, or pass --no_emrun_detect to emrun to hide this check.') - emrun_not_enabled_nag_printed = True + if not emrun_not_enabled_nag_printed and page_last_served_time is not None: + time_since_page_serve = now - page_last_served_time + if not have_received_messages and time_since_page_serve > 10: + logi('The html page you are running is not emrun-capable. Stdout, stderr and exit(returncode) capture will not work. Recompile the application with the --emrun linker flag to enable this, or pass --no_emrun_detect to emrun to hide this check.') + emrun_not_enabled_nag_printed = True # Clean up at quit, print any leftover messages in queue. self.print_all_messages() @@ -411,6 +426,19 @@ def get_cpu_infoline(): return platform.machine() + ', ' + cpu_name +def get_android_cpu_infoline(): + lines = subprocess.check_output([ADB, 'shell', 'cat', '/proc/cpuinfo']).split('\n') + processor = '' + hardware = '' + for line in lines: + if line.startswith('Processor'): + processor = line[line.find(':')+1:].strip() + elif line.startswith('Hardware'): + hardware = line[line.find(':')+1:].strip() + + freq = int(subprocess.check_output([ADB, 'shell', 'cat', '/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq']).strip())/1000 + return 'CPU: ' + processor + ', ' + hardware + ' @ ' + str(freq) + ' MHz' + def win_print_gpu_info(): gpus = [] gpu_memory = [] @@ -575,19 +603,24 @@ def get_os_version(): return 'Unknown OS' def get_system_memory(): + global emrun_options + try: - if WINDOWS: - return win32api.GlobalMemoryStatusEx()['TotalPhys'] - elif OSX: - return int(subprocess.check_output(['sysctl', '-n', 'hw.memsize']).strip()) - elif LINUX: - mem = open('/proc/meminfo', 'r') - lines = mem.readlines() - mem.close() + if LINUX or emrun_options.android: + if emrun_options.android: + lines = subprocess.check_output([ADB, 'shell', 'cat', '/proc/meminfo']).split('\n') + else: + mem = open('/proc/meminfo', 'r') + lines = mem.readlines() + mem.close() for i in lines: sline = i.split() if str(sline[0]) == 'MemTotal:': return int(sline[1]) * 1024 + elif WINDOWS: + return win32api.GlobalMemoryStatusEx()['TotalPhys'] + elif OSX: + return int(subprocess.check_output(['sysctl', '-n', 'hw.memsize']).strip()) except: return -1 @@ -698,6 +731,75 @@ def find_browser(name): return None # Could not find the browser +def get_android_model(): + global ADB + manufacturer = subprocess.check_output([ADB, 'shell', 'getprop', 'ro.product.manufacturer']).strip() + brand = subprocess.check_output([ADB, 'shell', 'getprop', 'ro.product.brand']).strip() + model = subprocess.check_output([ADB, 'shell', 'getprop', 'ro.product.model']).strip() + board = subprocess.check_output([ADB, 'shell', 'getprop', 'ro.product.board']).strip() + device = subprocess.check_output([ADB, 'shell', 'getprop', 'ro.product.device']).strip() + name = subprocess.check_output([ADB, 'shell', 'getprop', 'ro.product.name']).strip() + return manufacturer + ' ' + brand + ' ' + model + ' ' + board + ' ' + device + ' ' + name + +def get_android_os_version(): + global ADB + ver = subprocess.check_output([ADB, 'shell', 'getprop', 'ro.build.version.release']).strip() + apiLevel = subprocess.check_output([ADB, 'shell', 'getprop', 'ro.build.version.sdk']).strip() + if not apiLevel: + apiLevel = subprocess.check_output([ADB, 'shell', 'getprop', 'ro.build.version.sdk_int']).strip() + + os = '' + if ver: + os += 'Android ' + ver + ' ' + if apiLevel: + os += 'SDK API Level ' + apiLevel + ' ' + os += subprocess.check_output([ADB, 'shell', 'getprop', 'ro.build.description']).strip() + return os + +def list_android_browsers(): + global ADB + apps = subprocess.check_output([ADB, 'shell', 'pm', 'list', 'packages', '-f']).replace('\r\n', '\n') + browsers = [] + for line in apps.split('\n'): + line = line.strip() + if line.endswith('=org.mozilla.firefox'): + browsers += ['firefox'] + if line.endswith('=org.mozilla.firefox_beta'): + browsers += ['firefox_beta'] + if line.endswith('=org.mozilla.fennec_aurora'): + browsers += ['firefox_aurora'] + if line.endswith('=org.mozilla.fennec'): + browsers += ['firefox_nightly'] + if line.endswith('=com.android.chrome'): + browsers += ['chrome'] + if line.endswith('=com.chrome.beta'): + browsers += ['chrome_beta'] + if line.endswith('=com.opera.browser'): + browsers += ['opera'] + if line.endswith('=com.opera.mini.android'): + browsers += ['opera_mini'] + if line.endswith('=mobi.mgeek.TunnyBrowser'): + browsers += ['dolphin'] + + browsers.sort() + logi('emrun has automatically found the following browsers on the connected Android device:') + for browser in browsers: + logi(' - ' + browser) + +def list_pc_browsers(): + browsers = ['firefox', 'firefox_beta', 'firefox_aurora', 'firefox_nightly', 'chrome', 'chrome_canary', 'iexplore', 'safari', 'opera'] + logi('emrun has automatically found the following browsers in the default install locations on the system:') + logi('') + for browser in browsers: + browser_exe = find_browser(browser) + if type(browser_exe) == list: + browser_exe = browser_exe[0] + if browser_exe: + logi(' - ' + browser + ': ' + browser_display_name(browser_exe) + ' ' + get_executable_version(browser_exe)) + logi('') + logi('You can pass the --browser <id> option to launch with the given browser above.') + logi('Even if your browser was not detected, you can use --browser /path/to/browser/executable to launch with that browser.') + def browser_display_name(browser): b = browser.lower() if 'iexplore' in b: @@ -718,7 +820,7 @@ def browser_display_name(browser): return browser def main(): - global browser_process, processname_killed_atexit, emrun_options, emrun_not_enabled_nag_printed + global browser_process, processname_killed_atexit, emrun_options, emrun_not_enabled_nag_printed, ADB usage_str = "usage: %prog [options] [optional_portnum]" parser = optparse.OptionParser(usage=usage_str) @@ -773,6 +875,9 @@ def main(): parser.add_option('--browser', dest='browser', default='', help='Specifies the browser executable to run the web page in.') + parser.add_option('--android', dest='android', action='store_true', default=False, + help='Launches the page in a browser of an Android device connected to an USB on the local system. (via adb)') + parser.add_option('--system_info', dest='system_info', action='store_true', help='Prints information about the current system at startup.') @@ -785,7 +890,13 @@ def main(): (options, args) = parser.parse_args(sys.argv) emrun_options = options - if not options.browser: + if options.android: + ADB = which('adb') + if not ADB: + loge("Could not find the adb tool. Install Android SDK and add the directory of adb to PATH.") + return 1 + + if not options.browser and not options.android: if WINDOWS: options.browser = 'start' elif LINUX: @@ -795,19 +906,11 @@ def main(): elif OSX: options.browser = 'safari' - browsers = ['firefox', 'firefox_beta', 'firefox_aurora', 'firefox_nightly', 'chrome', 'chrome_canary', 'iexplore', 'safari', 'opera'] if options.list_browsers: - logi('emrun has automatically found the following browsers in the default install locations on the system:') - logi('') - for browser in browsers: - browser_exe = find_browser(browser) - if type(browser_exe) == list: - browser_exe = browser_exe[0] - if browser_exe: - logi(' - ' + browser + ': ' + browser_display_name(browser_exe) + ' ' + get_executable_version(browser_exe)) - logi('') - logi('You can pass the --browser <id> option to launch with the given browser above.') - logi('Even if your browser was not detected, you can use --browser /path/to/browser/executable to launch with that browser.') + if options.android: + list_android_browsers() + else: + list_pc_browsers() return if len(args) < 2 and (options.system_info or options.browser_info): @@ -827,58 +930,109 @@ def main(): url = os.path.relpath(os.path.abspath(file_to_serve), serve_dir) if len(cmdlineparams) > 0: url += '?' + '&'.join(cmdlineparams) - url = 'http://localhost:'+str(options.port)+'/'+url + server_root = 'localhost' + if options.android: + server_root = socket.gethostbyname(socket.gethostname()) + url = 'http://' + server_root + ':' + str(options.port)+'/'+url os.chdir(serve_dir) logv('Web server root directory: ' + os.path.abspath('.')) - browser = find_browser(str(options.browser)) - browser_exe = browser[0] - browser_args = [] - - if 'safari' in browser_exe.lower(): - # Safari has a bug that a command line 'Safari http://page.com' does not launch that page, - # but instead launches 'file:///http://page.com'. To remedy this, must use the open -a command - # to run Safari, but unfortunately this will end up spawning Safari process detached from emrun. - if OSX: - browser = ['open', '-a', 'Safari'] + (browser[1:] if len(browser) > 1 else []) - - processname_killed_atexit = 'Safari' - elif 'chrome' in browser_exe.lower(): - processname_killed_atexit = 'chrome' - browser_args = ['--incognito', '--enable-nacl', '--enable-pnacl', '--disable-restore-session-state', '--enable-webgl', '--no-default-browser-check', '--no-first-run', '--allow-file-access-from-files'] -# if options.no_server: -# browser_args += ['--disable-web-security'] - elif 'firefox' in browser_exe.lower(): - processname_killed_atexit = 'firefox' - elif 'iexplore' in browser_exe.lower(): - processname_killed_atexit = 'iexplore' - browser_args = ['-private'] - elif 'opera' in browser_exe.lower(): - processname_killed_atexit = 'opera' - - # In Windows cmdline, & character delimits multiple commmands, so must use ^ to escape them. - if browser_exe == 'cmd': - url = url.replace('&', '^&') - browser += browser_args + [url] + if options.android: + if not options.no_browser: + if not options.browser: + loge("Running on Android requires that you explicitly specify the browser to run with --browser <id>. Run emrun --android --list_browsers to obtain a list of installed browsers you can use.") + return 1 + elif options.browser == 'firefox': + browser_app = 'org.mozilla.firefox/.App' + elif options.browser == 'firefox_beta': + browser_app = 'org.mozilla.firefox_beta/.App' + elif options.browser == 'firefox_aurora' or options.browser == 'fennec_aurora': + browser_app = 'org.mozilla.fennec_aurora/.App' + elif options.browser == 'firefox_nightly' or options.browser == 'fennec': + browser_app = 'org.mozilla.fennec/.App' + elif options.browser == 'chrome': + browser_app = 'com.android.chrome/.Main' + elif options.browser == 'chrome_beta' or options.browser == 'chrome_canary': # There is no Chrome Canary for Android, but Play store has 'Chrome Beta' instead. + browser_app = 'com.chrome.beta/com.android.chrome.Main' + elif options.browser == 'opera': + browser_app = 'com.opera.browser/com.opera.Opera' + elif options.browser == 'opera_mini': # Launching the URL works, but page seems to never load (Fails with 'Network problem' even when other browsers work) + browser_app = 'com.opera.mini.android/.Browser' + elif options.browser =='dolphin': # Current stable Dolphin as of 12/2013 does not have WebGL support. + browser_app = 'mobi.mgeek.TunnyBrowser/.BrowserActivity' + else: + loge("Don't know how to launch browser " + options.browser + ' on Android!') + return 1 + # To add support for a new Android browser in the list above: + # 1. Install the browser to Android phone, connect it via adb to PC. + # 2. Type 'adb shell pm list packages -f' to locate the package name of that application. + # 3. Type 'adb pull <packagename>.apk' to copy the apk of that application to PC. + # 4. Type 'aapt d xmltree <packagename>.apk AndroidManifest.xml > manifest.txt' to extract the manifest from the package. + # 5. Locate the name of the main activity for the browser in manifest.txt and add an entry to above list in form 'appname/mainactivityname' + + if WINDOWS: + url = url.replace('&', '\\&') + browser = [ADB, 'shell', 'am', 'start', '-a', 'android.intent.action.VIEW', '-n', browser_app, '-d', url] + processname_killed_atexit = browser_app[:browser_app.find('/')] + else: #Launching a web page on local system. + browser = find_browser(str(options.browser)) + browser_exe = browser[0] + browser_args = [] + + if 'safari' in browser_exe.lower(): + # Safari has a bug that a command line 'Safari http://page.com' does not launch that page, + # but instead launches 'file:///http://page.com'. To remedy this, must use the open -a command + # to run Safari, but unfortunately this will end up spawning Safari process detached from emrun. + if OSX: + browser = ['open', '-a', 'Safari'] + (browser[1:] if len(browser) > 1 else []) + + processname_killed_atexit = 'Safari' + elif 'chrome' in browser_exe.lower(): + processname_killed_atexit = 'chrome' + browser_args = ['--incognito', '--enable-nacl', '--enable-pnacl', '--disable-restore-session-state', '--enable-webgl', '--no-default-browser-check', '--no-first-run', '--allow-file-access-from-files'] + # if options.no_server: + # browser_args += ['--disable-web-security'] + elif 'firefox' in browser_exe.lower(): + processname_killed_atexit = 'firefox' + elif 'iexplore' in browser_exe.lower(): + processname_killed_atexit = 'iexplore' + browser_args = ['-private'] + elif 'opera' in browser_exe.lower(): + processname_killed_atexit = 'opera' + + # In Windows cmdline, & character delimits multiple commmands, so must use ^ to escape them. + if browser_exe == 'cmd': + url = url.replace('&', '^&') + browser += browser_args + [url] if options.kill_on_start: + pname = processname_killed_atexit kill_browser_process() + processname_killed_atexit = pname if options.system_info: logi('Time of run: ' + time.strftime("%x %X")) - logi('Computer name: ' + socket.gethostname()) # http://stackoverflow.com/questions/799767/getting-name-of-windows-computer-running-python-script - logi('OS: ' + get_os_version() + ' with ' + str(get_system_memory()/1024/1024) + ' MB of System RAM') - logi('CPU: ' + get_cpu_infoline()) - print_gpu_infolines() + if options.android: + logi('Model: ' + get_android_model()) + logi('OS: ' + get_android_os_version() + ' with ' + str(get_system_memory()/1024/1024) + ' MB of System RAM') + logi('CPU: ' + get_android_cpu_infoline()) + else: + logi('Computer name: ' + socket.gethostname()) # http://stackoverflow.com/questions/799767/getting-name-of-windows-computer-running-python-script + logi('OS: ' + get_os_version() + ' with ' + str(get_system_memory()/1024/1024) + ' MB of System RAM') + logi('CPU: ' + get_cpu_infoline()) + print_gpu_infolines() if options.browser_info: - logi('Browser: ' + browser_display_name(browser[0]) + ' ' + get_executable_version(browser_exe)) + if options.android: + logi('Browser: Android ' + browser_app) + else: + logi('Browser: ' + browser_display_name(browser[0]) + ' ' + get_executable_version(browser_exe)) # Suppress run warning if requested. if options.no_emrun_detect: emrun_not_enabled_nag_printed = True - global browser_stdout_handle, browser_stderr_handle + global browser_stdout_handle, browser_stderr_handle if options.log_stdout: browser_stdout_handle = open(options.log_stdout, 'ab') if options.log_stderr: @@ -887,6 +1041,10 @@ def main(): else: browser_stderr_handle = open(options.log_stderr, 'ab') + if not options.no_server: + logv('Starting web server in port ' + str(options.port)) + httpd = HTTPWebServer(('', options.port), HTTPHandler) + if not options.no_browser: logv("Executing %s" % ' '.join(browser)) if browser[0] == 'cmd': @@ -894,10 +1052,15 @@ def main(): browser_process = subprocess.Popen(browser) if options.kill_on_exit: atexit.register(kill_browser_process) + # For Android automation, we execute adb, so this process does not represent a browser and no point killing it. + if options.android: + browser_process = None + if browser_process and browser_process.poll() == None: + options.serve_after_close = True + logv('Warning: emrun got detached from the target browser process. Cannot detect when user closes the browser. Behaving as if --serve_after_close was passed in.') + if not options.no_server: - logv('Starting web server in port ' + str(options.port)) - httpd = HTTPWebServer(('', options.port), HTTPHandler) try: httpd.serve_forever() except KeyboardInterrupt: @@ -915,4 +1078,6 @@ def main(): return page_exit_code if __name__ == '__main__': - sys.exit(main()) + returncode = main() + logv('emrun quitting with process exit code ' + str(returncode)) + sys.exit(returncode) diff --git a/emscripten.py b/emscripten.py index 111c2df4..42db0803 100755 --- a/emscripten.py +++ b/emscripten.py @@ -733,60 +733,20 @@ def emscript_fast(infile, settings, outfile, libraries=[], compiler_engine=None, # * Run compiler.js on the metadata to emit the shell js code, pre/post-ambles, # JS library dependencies, etc. - if DEBUG: logging.debug('emscript: llvm backend') - - # TODO: proper temp files - # TODO: use a single LLVM toolchain instead of normal for source, pnacl for simplification, custom for js backend - - if DEBUG: shutil.copyfile(infile, os.path.join(shared.CANONICAL_TEMP_DIR, 'temp0.ll')) - - extra_opt_args = [] - #if DEBUG: extra_opt_args.append('-time-passes') - - if DEBUG: t = time.time() - - if DEBUG: logging.debug(' ..1..') - temp1 = temp_files.get('.1.bc').name - shared.jsrun.timeout_run(subprocess.Popen([os.path.join(shared.LLVM_ROOT, 'opt'), infile, '-pnacl-abi-simplify-preopt', '-o', temp1] + extra_opt_args)) - assert os.path.exists(temp1) - if DEBUG: - shutil.copyfile(temp1, os.path.join(shared.CANONICAL_TEMP_DIR, 'temp1.bc')) - shared.jsrun.timeout_run(subprocess.Popen([os.path.join(shared.LLVM_ROOT, 'llvm-dis'), 'temp1.bc', '-o', 'temp1.ll'])) - - #if DEBUG: logging.debug(' ..2..') - #temp2 = temp_files.get('.2.bc').name - #shared.jsrun.timeout_run(subprocess.Popen([os.path.join(shared.LLVM_ROOT, 'opt'), temp1, '-O3', '-o', temp2])) - #assert os.path.exists(temp2) - #if DEBUG: - # shutil.copyfile(temp2, os.path.join(shared.CANONICAL_TEMP_DIR, 'temp2.bc')) - # shared.jsrun.timeout_run(subprocess.Popen([os.path.join(shared.LLVM_ROOT, 'llvm-dis'), 'temp2.bc', '-o', 'temp2.ll'])) - temp2 = temp1 # XXX if we optimize the bc, we remove some pnacl clutter, but it also makes varargs stores be 8-byte aligned - - if DEBUG: logging.debug(' ..3..') - temp3 = temp_files.get('.3.bc').name - shared.jsrun.timeout_run(subprocess.Popen([os.path.join(shared.LLVM_ROOT, 'opt'), temp2, '-pnacl-abi-simplify-postopt', '-o', temp3] + extra_opt_args)) - #'-print-after-all' - assert os.path.exists(temp3) - if DEBUG: - shutil.copyfile(temp3, os.path.join(shared.CANONICAL_TEMP_DIR, 'temp3.bc')) - shared.jsrun.timeout_run(subprocess.Popen([os.path.join(shared.LLVM_ROOT, 'llvm-dis'), 'temp3.bc', '-o', 'temp3.ll'])) - if DEBUG: - logging.debug(' emscript: ir simplification took %s seconds' % (time.time() - t)) + logging.debug('emscript: llvm backend') t = time.time() - if DEBUG: logging.debug(' ..4..') - temp4 = temp_files.get('.4.js').name + temp_js = temp_files.get('.4.js').name backend_compiler = os.path.join(shared.LLVM_ROOT, 'llc') - shared.jsrun.timeout_run(subprocess.Popen([backend_compiler, temp3, '-march=js', '-filetype=asm', '-o', temp4], stdout=subprocess.PIPE)) - if DEBUG: shutil.copyfile(temp4, os.path.join(shared.CANONICAL_TEMP_DIR, 'temp4.js')) + shared.jsrun.timeout_run(subprocess.Popen([backend_compiler, infile, '-march=js', '-filetype=asm', '-o', temp_js], stdout=subprocess.PIPE)) if DEBUG: logging.debug(' emscript: llvm backend took %s seconds' % (time.time() - t)) t = time.time() # Split up output - backend_output = open(temp4).read() + backend_output = open(temp_js).read() #if DEBUG: print >> sys.stderr, backend_output start_funcs_marker = '// EMSCRIPTEN_START_FUNCTIONS' @@ -825,7 +785,7 @@ def emscript_fast(infile, settings, outfile, libraries=[], compiler_engine=None, else: num = num[:e] + '.0' + num[e:] return m.group(1) + m.group(2) + num - funcs = re.sub(r'([(=,+\-*/%] *)\+(-?)((0x)?[0-9a-f]*\.?[0-9]+([eE][-+]?[0-9]+)?)', lambda m: fix_dot_zero(m), funcs) + funcs = re.sub(r'([(=,+\-*/%<>:?] *)\+(-?)((0x)?[0-9a-f]*\.?[0-9]+([eE][-+]?[0-9]+)?)', lambda m: fix_dot_zero(m), funcs) # js compiler diff --git a/src/analyzer.js b/src/analyzer.js index 17582ea3..e8ca6cf6 100644 --- a/src/analyzer.js +++ b/src/analyzer.js @@ -1570,7 +1570,17 @@ function analyzer(data, sidePass) { for (var j = 0; j < label.lines.length; j++) { var line = label.lines[j]; if ((line.intertype == 'call' || line.intertype == 'invoke') && line.ident == setjmp) { - // Add a new label + if (line.intertype == 'invoke') { + // setjmp cannot trigger unwinding, so just reduce the invoke to a call + branch + line.intertype = 'call'; + label.lines.push({ + intertype: 'branch', + label: line.toLabel, + lineNum: line.lineNum + 0.01, // XXX legalizing might confuse this + }); + line.toLabel = line.unwindLabel = -2; + } + // split this label into up to the setjmp (including), then a new label for the rest. longjmp will reach the rest var oldLabel = label.ident; var newLabel = func.labelIdCounter++; if (!func.setjmpTable) func.setjmpTable = []; diff --git a/src/compiler.js b/src/compiler.js index 7d768c3d..e4ce1c88 100644 --- a/src/compiler.js +++ b/src/compiler.js @@ -134,7 +134,7 @@ load('settings.js'); var settings_file = arguments_[0]; var ll_file = arguments_[1]; phase = arguments_[2]; -if (phase == 'pre') { +if (phase == 'pre' || phase == 'glue') { additionalLibraries = Array.prototype.slice.call(arguments_, 3); } else { var forwardedDataFile = arguments_[3]; diff --git a/src/emrun_postjs.js b/src/emrun_postjs.js index e1ef9e2d..eec203ec 100644 --- a/src/emrun_postjs.js +++ b/src/emrun_postjs.js @@ -4,8 +4,8 @@ function emrun_register_handlers() { http.open("POST", "stdio.html", true); http.send(msg); } - // If the address contains localhost, we can assume we're running the test runner and should post stdout logs. - if (document.URL.search("localhost") != -1) { + // If the address contains localhost, or we are running the page from port 6931, we can assume we're running the test runner and should post stdout logs. + if (document.URL.search("localhost") != -1 || document.URL.search(":6931/") != -1) { var emrun_http_sequence_number = 1; var prevExit = Module['exit']; var prevPrint = Module['print']; diff --git a/src/emrun_prejs.js b/src/emrun_prejs.js new file mode 100644 index 00000000..14613c5d --- /dev/null +++ b/src/emrun_prejs.js @@ -0,0 +1,5 @@ +// Route URL GET parameters to argc+argv +Module['arguments'] = window.location.search.substr(1).trim().split('&'); +// If no args were passed arguments = [''], in which case kill the single empty string. +if (!Module['arguments'][0]) + Module['arguments'] = []; diff --git a/src/emscripten-source-map.min.js b/src/emscripten-source-map.min.js new file mode 100644 index 00000000..9151400f --- /dev/null +++ b/src/emscripten-source-map.min.js @@ -0,0 +1,31 @@ +function define(e,t,n){if(typeof e!="string")throw new TypeError("Expected string, got: "+e);arguments.length==2&&(n=t);if(e in define.modules)throw new Error("Module already defined: "+e);define.modules[e]=n}function Domain(){this.modules={},this._currentModule=null}define.modules={},function(){function e(e){var t=e.split("/"),n=1;while(n<t.length)t[n]===".."?t.splice(n-1,1):t[n]==="."?t.splice(n,1):n++;return t.join("/")}function t(e,t){return e=e.trim(),t=t.trim(),/^\//.test(t)?t:e.replace(/\/*$/,"/")+t}function n(e){var t=e.split("/");return t.pop(),t.join("/")}Domain.prototype.require=function(e,t){if(Array.isArray(e)){var n=e.map(function(e){return this.lookup(e)},this);return t&&t.apply(null,n),undefined}return this.lookup(e)},Domain.prototype.lookup=function(r){/^\./.test(r)&&(r=e(t(n(this._currentModule),r)));if(r in this.modules){var i=this.modules[r];return i}if(r in define.modules){var i=define.modules[r];if(typeof i=="function"){var s={},o=this._currentModule;this._currentModule=r,i(this.require.bind(this),s,{id:r,uri:""}),this._currentModule=o,i=s}return this.modules[r]=i,i}throw new Error("Module not defined: "+r)}}(),define.Domain=Domain,define.globalDomain=new Domain;var require=define.globalDomain.require.bind(define.globalDomain);define("source-map/source-map-generator",["require","exports","module","source-map/base64-vlq","source-map/util","source-map/array-set"],function(e,t,n){function o(e){this._file=i.getArg(e,"file"),this._sourceRoot=i.getArg(e,"sourceRoot",null),this._sources=new s,this._names=new s,this._mappings=[],this._sourcesContents=null}function u(e,t){var n=(e&&e.line)-(t&&t.line);return n?n:(e&&e.column)-(t&&t.column)}function a(e,t){return e=e||"",t=t||"",(e>t)-(e<t)}function f(e,t){return u(e.generated,t.generated)||u(e.original,t.original)||a(e.source,t.source)||a(e.name,t.name)}var r=e("./base64-vlq"),i=e("./util"),s=e("./array-set").ArraySet;o.prototype._version=3,o.fromSourceMap=function(t){var n=t.sourceRoot,r=new o({file:t.file,sourceRoot:n});return t.eachMapping(function(e){var t={generated:{line:e.generatedLine,column:e.generatedColumn}};e.source&&(t.source=e.source,n&&(t.source=i.relative(n,t.source)),t.original={line:e.originalLine,column:e.originalColumn},e.name&&(t.name=e.name)),r.addMapping(t)}),t.sources.forEach(function(e){var n=t.sourceContentFor(e);n&&r.setSourceContent(e,n)}),r},o.prototype.addMapping=function(t){var n=i.getArg(t,"generated"),r=i.getArg(t,"original",null),s=i.getArg(t,"source",null),o=i.getArg(t,"name",null);this._validateMapping(n,r,s,o),s&&!this._sources.has(s)&&this._sources.add(s),o&&!this._names.has(o)&&this._names.add(o),this._mappings.push({generated:n,original:r,source:s,name:o})},o.prototype.setSourceContent=function(t,n){var r=t;this._sourceRoot&&(r=i.relative(this._sourceRoot,r)),n!==null?(this._sourcesContents||(this._sourcesContents={}),this._sourcesContents[i.toSetString(r)]=n):(delete this._sourcesContents[i.toSetString(r)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))},o.prototype.applySourceMap=function(t,n){n||(n=t.file);var r=this._sourceRoot;r&&(n=i.relative(r,n));var o=new s,u=new s;this._mappings.forEach(function(e){if(e.source===n&&e.original){var s=t.originalPositionFor({line:e.original.line,column:e.original.column});s.source!==null&&(r?e.source=i.relative(r,s.source):e.source=s.source,e.original.line=s.line,e.original.column=s.column,s.name!==null&&e.name!==null&&(e.name=s.name))}var a=e.source;a&&!o.has(a)&&o.add(a);var f=e.name;f&&!u.has(f)&&u.add(f)},this),this._sources=o,this._names=u,t.sources.forEach(function(e){var n=t.sourceContentFor(e);n&&(r&&(e=i.relative(r,e)),this.setSourceContent(e,n))},this)},o.prototype._validateMapping=function(t,n,r,i){if(t&&"line"in t&&"column"in t&&t.line>0&&t.column>=0&&!n&&!r&&!i)return;if(t&&"line"in t&&"column"in t&&n&&"line"in n&&"column"in n&&t.line>0&&t.column>=0&&n.line>0&&n.column>=0&&r)return;throw new Error("Invalid mapping.")},o.prototype._serializeMappings=function(){var t=0,n=1,i=0,s=0,o=0,u=0,a="",l;this._mappings.sort(f);for(var c=0,h=this._mappings.length;c<h;c++){l=this._mappings[c];if(l.generated.line!==n){t=0;while(l.generated.line!==n)a+=";",n++}else if(c>0){if(!f(l,this._mappings[c-1]))continue;a+=","}a+=r.encode(l.generated.column-t),t=l.generated.column,l.source&&l.original&&(a+=r.encode(this._sources.indexOf(l.source)-u),u=this._sources.indexOf(l.source),a+=r.encode(l.original.line-1-s),s=l.original.line-1,a+=r.encode(l.original.column-i),i=l.original.column,l.name&&(a+=r.encode(this._names.indexOf(l.name)-o),o=this._names.indexOf(l.name)))}return a},o.prototype.toJSON=function(){var t={version:this._version,file:this._file,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._sourceRoot&&(t.sourceRoot=this._sourceRoot),this._sourcesContents&&(t.sourcesContent=t.sources.map(function(e){return t.sourceRoot&&(e=i.relative(t.sourceRoot,e)),Object.prototype.hasOwnProperty.call(this._sourcesContents,i.toSetString(e))?this._sourcesContents[i.toSetString(e)]:null},this)),t},o.prototype.toString=function(){return JSON.stringify(this)},t.SourceMapGenerator=o}),define("source-map/base64-vlq",["require","exports","module","source-map/base64"],function(e,t,n){function a(e){return e<0?(-e<<1)+1:(e<<1)+0}function f(e){var t=(e&1)===1,n=e>>1;return t?-n:n}var r=e("./base64"),i=5,s=1<<i,o=s-1,u=s;t.encode=function(t){var n="",s,f=a(t);do s=f&o,f>>>=i,f>0&&(s|=u),n+=r.encode(s);while(f>0);return n},t.decode=function(t){var n=0,s=t.length,a=0,l=0,c,h;do{if(n>=s)throw new Error("Expected more digits in base 64 VLQ value.");h=r.decode(t.charAt(n++)),c=!!(h&u),h&=o,a+=h<<l,l+=i}while(c);return{value:f(a),rest:t.slice(n)}}}),define("source-map/base64",["require","exports","module"],function(e,t,n){var r={},i={};"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("").forEach(function(e,t){r[e]=t,i[t]=e}),t.encode=function(t){if(t in i)return i[t];throw new TypeError("Must be between 0 and 63: "+t)},t.decode=function(t){if(t in r)return r[t];throw new TypeError("Not a valid base 64 digit: "+t)}}),define("source-map/util",["require","exports","module"],function(e,t,n){function r(e,t,n){if(t in e)return e[t];if(arguments.length===3)return n;throw new Error('"'+t+'" is a required argument.')}function s(e){var t=e.match(i);return t?{scheme:t[1],auth:t[3],host:t[4],port:t[6],path:t[7]}:null}function o(e){var t=e.scheme+"://";return e.auth&&(t+=e.auth+"@"),e.host&&(t+=e.host),e.port&&(t+=":"+e.port),e.path&&(t+=e.path),t}function u(e,t){var n;return t.match(i)?t:t.charAt(0)==="/"&&(n=s(e))?(n.path=t,o(n)):e.replace(/\/$/,"")+"/"+t}function a(e){return"$"+e}function f(e){return e.substr(1)}function l(e,t){e=e.replace(/\/$/,"");var n=s(e);return t.charAt(0)=="/"&&n&&n.path=="/"?t.slice(1):t.indexOf(e+"/")===0?t.substr(e.length+1):t}t.getArg=r;var i=/([\w+\-.]+):\/\/((\w+:\w+)@)?([\w.]+)?(:(\d+))?(\S+)?/;t.urlParse=s,t.urlGenerate=o,t.join=u,t.toSetString=a,t.fromSetString=f,t.relative=l}),define("source-map/array-set",["require","exports","module","source-map/util"],function(e,t,n){function i(){this._array=[],this._set={}}var r=e("./util");i.fromArray=function(t,n){var r=new i;for(var s=0,o=t.length;s<o;s++)r.add(t[s],n);return r},i.prototype.add=function(t,n){var i=this.has(t),s=this._array.length;(!i||n)&&this._array.push(t),i||(this._set[r.toSetString(t)]=s)},i.prototype.has=function(t){return Object.prototype.hasOwnProperty.call(this._set,r.toSetString(t))},i.prototype.indexOf=function(t){if(this.has(t))return this._set[r.toSetString(t)];throw new Error('"'+t+'" is not in the set.')},i.prototype.at=function(t){if(t>=0&&t<this._array.length)return this._array[t];throw new Error("No element indexed by "+t)},i.prototype.toArray=function(){return this._array.slice()},t.ArraySet=i}),define("source-map/source-map-consumer",["require","exports","module","source-map/util","source-map/binary-search","source-map/array-set","source-map/base64-vlq"],function(e,t,n){function u(e){var t=e;typeof e=="string"&&(t=JSON.parse(e.replace(/^\)\]\}'/,"")));var n=r.getArg(t,"version"),i=r.getArg(t,"sources"),o=r.getArg(t,"names"),u=r.getArg(t,"sourceRoot",null),a=r.getArg(t,"sourcesContent",null),f=r.getArg(t,"mappings"),l=r.getArg(t,"file",null);if(n!==this._version)throw new Error("Unsupported version: "+n);this._names=s.fromArray(o,!0),this._sources=s.fromArray(i,!0),this.sourceRoot=u,this.sourcesContent=a,this.file=l,this._generatedMappings=[],this._originalMappings=[],this._parseMappings(f,u)}var r=e("./util"),i=e("./binary-search"),s=e("./array-set").ArraySet,o=e("./base64-vlq");u.prototype._version=3,Object.defineProperty(u.prototype,"sources",{get:function(){return this._sources.toArray().map(function(e){return this.sourceRoot?r.join(this.sourceRoot,e):e},this)}}),u.prototype._parseMappings=function(t,n){var r=1,i=0,s=0,u=0,a=0,f=0,l=/^[,;]/,c=t,h,p;while(c.length>0)if(c.charAt(0)===";")r++,c=c.slice(1),i=0;else if(c.charAt(0)===",")c=c.slice(1);else{h={},h.generatedLine=r,p=o.decode(c),h.generatedColumn=i+p.value,i=h.generatedColumn,c=p.rest;if(c.length>0&&!l.test(c.charAt(0))){p=o.decode(c),h.source=this._sources.at(a+p.value),a+=p.value,c=p.rest;if(c.length===0||l.test(c.charAt(0)))throw new Error("Found a source, but no line and column");p=o.decode(c),h.originalLine=s+p.value,s=h.originalLine,h.originalLine+=1,c=p.rest;if(c.length===0||l.test(c.charAt(0)))throw new Error("Found a source and line, but no column");p=o.decode(c),h.originalColumn=u+p.value,u=h.originalColumn,c=p.rest,c.length>0&&!l.test(c.charAt(0))&&(p=o.decode(c),h.name=this._names.at(f+p.value),f+=p.value,c=p.rest)}this._generatedMappings.push(h),typeof h.originalLine=="number"&&this._originalMappings.push(h)}this._originalMappings.sort(this._compareOriginalPositions)},u.prototype._compareOriginalPositions=function(t,n){if(t.source>n.source)return 1;if(t.source<n.source)return-1;var r=t.originalLine-n.originalLine;return r===0?t.originalColumn-n.originalColumn:r},u.prototype._compareGeneratedPositions=function(t,n){var r=t.generatedLine-n.generatedLine;return r===0?t.generatedColumn-n.generatedColumn:r},u.prototype._findMapping=function(t,n,r,s,o){if(t[r]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+t[r]);if(t[s]<0)throw new TypeError("Column must be greater than or equal to 0, got "+t[s]);return i.search(t,n,o)},u.prototype.originalPositionFor=function(t){var n={generatedLine:r.getArg(t,"line"),generatedColumn:r.getArg(t,"column")},i=this._findMapping(n,this._generatedMappings,"generatedLine","generatedColumn",this._compareGeneratedPositions);if(i){var s=r.getArg(i,"source",null);return s&&this.sourceRoot&&(s=r.join(this.sourceRoot,s)),{source:s,line:r.getArg(i,"originalLine",null),column:r.getArg(i,"originalColumn",null),name:r.getArg(i,"name",null)}}return{source:null,line:null,column:null,name:null}},u.prototype.sourceContentFor=function(t){if(!this.sourcesContent)return null;this.sourceRoot&&(t=r.relative(this.sourceRoot,t));if(this._sources.has(t))return this.sourcesContent[this._sources.indexOf(t)];var n;if(this.sourceRoot&&(n=r.urlParse(this.sourceRoot))){var i=t.replace(/^file:\/\//,"");if(n.scheme=="file"&&this._sources.has(i))return this.sourcesContent[this._sources.indexOf(i)];if((!n.path||n.path=="/")&&this._sources.has("/"+t))return this.sourcesContent[this._sources.indexOf("/"+t)]}throw new Error('"'+t+'" is not in the SourceMap.')},u.prototype.generatedPositionFor=function(t){var n={source:r.getArg(t,"source"),originalLine:r.getArg(t,"line"),originalColumn:r.getArg(t,"column")};this.sourceRoot&&(n.source=r.relative(this.sourceRoot,n.source));var i=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",this._compareOriginalPositions);return i?{line:r.getArg(i,"generatedLine",null),column:r.getArg(i,"generatedColumn",null)}:{line:null,column:null}},u.GENERATED_ORDER=1,u.ORIGINAL_ORDER=2,u.prototype.eachMapping=function(t,n,i){var s=n||null,o=i||u.GENERATED_ORDER,a;switch(o){case u.GENERATED_ORDER:a=this._generatedMappings;break;case u.ORIGINAL_ORDER:a=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var f=this.sourceRoot;a.map(function(e){var t=e.source;return t&&f&&(t=r.join(f,t)),{source:t,generatedLine:e.generatedLine,generatedColumn:e.generatedColumn,originalLine:e.originalLine,originalColumn:e.originalColumn,name:e.name}}).forEach(t,s)},t.SourceMapConsumer=u}),define("source-map/binary-search",["require","exports","module"],function(e,t,n){function r(e,t,n,i,s){var o=Math.floor((t-e)/2)+e,u=s(n,i[o]);return u===0?i[o]:u>0?t-o>1?r(o,t,n,i,s):i[o]:o-e>1?r(e,o,n,i,s):e<0?null:i[e]}t.search=function(t,n,i){return n.length>0?r(-1,n.length,t,n,i):null}}),define("source-map/source-node",["require","exports","module","source-map/source-map-generator","source-map/util"],function(e,t,n){function s(e,t,n,r,i){this.children=[],this.sourceContents={},this.line=e===undefined?null:e,this.column=t===undefined?null:t,this.source=n===undefined?null:n,this.name=i===undefined?null:i,r!=null&&this.add(r)}var r=e("./source-map-generator").SourceMapGenerator,i=e("./util");s.fromStringWithSourceMap=function(t,n){function f(e,t){e===null||e.source===undefined?r.add(t):r.add(new s(e.originalLine,e.originalColumn,e.source,t,e.name))}var r=new s,i=t.split("\n"),o=1,u=0,a=null;return n.eachMapping(function(e){if(a===null){while(o<e.generatedLine)r.add(i.shift()+"\n"),o++;if(u<e.generatedColumn){var t=i[0];r.add(t.substr(0,e.generatedColumn)),i[0]=t.substr(e.generatedColumn),u=e.generatedColumn}}else if(o<e.generatedLine){var n="";do n+=i.shift()+"\n",o++,u=0;while(o<e.generatedLine);if(u<e.generatedColumn){var t=i[0];n+=t.substr(0,e.generatedColumn),i[0]=t.substr(e.generatedColumn),u=e.generatedColumn}f(a,n)}else{var t=i[0],n=t.substr(0,e.generatedColumn-u);i[0]=t.substr(e.generatedColumn-u),u=e.generatedColumn,f(a,n)}a=e},this),f(a,i.join("\n")),n.sources.forEach(function(e){var t=n.sourceContentFor(e);t&&r.setSourceContent(e,t)}),r},s.prototype.add=function(t){if(Array.isArray(t))t.forEach(function(e){this.add(e)},this);else{if(!(t instanceof s||typeof t=="string"))throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+t);t&&this.children.push(t)}return this},s.prototype.prepend=function(t){if(Array.isArray(t))for(var n=t.length-1;n>=0;n--)this.prepend(t[n]);else{if(!(t instanceof s||typeof t=="string"))throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+t);this.children.unshift(t)}return this},s.prototype.walk=function(t){this.children.forEach(function(e){e instanceof s?e.walk(t):e!==""&&t(e,{source:this.source,line:this.line,column:this.column,name:this.name})},this)},s.prototype.join=function(t){var n,r,i=this.children.length;if(i>0){n=[];for(r=0;r<i-1;r++)n.push(this.children[r]),n.push(t);n.push(this.children[r]),this.children=n}return this},s.prototype.replaceRight=function(t,n){var r=this.children[this.children.length-1];return r instanceof s?r.replaceRight(t,n):typeof r=="string"?this.children[this.children.length-1]=r.replace(t,n):this.children.push("".replace(t,n)),this},s.prototype.setSourceContent=function(t,n){this.sourceContents[i.toSetString(t)]=n},s.prototype.walkSourceContents=function(t){this.children.forEach(function(e){e instanceof s&&e.walkSourceContents(t)},this),Object.keys(this.sourceContents).forEach(function(e){t(i.fromSetString(e),this.sourceContents[e])},this)},s.prototype.toString=function(){var t="";return this.walk(function(e){t+=e}),t},s.prototype.toStringWithSourceMap=function(t){var n={code:"",line:1,column:0},i=new r(t),s=!1,o=null,u=null,a=null,f=null;return this.walk(function(e,t){n.code+=e,t.source!==null&&t.line!==null&&t.column!==null?((o!==t.source||u!==t.line||a!==t.column||f!==t.name)&&i.addMapping({source:t.source,original:{line:t.line,column:t.column},generated:{line:n.line,column:n.column},name:t.name}),o=t.source,u=t.line,a=t.column,f=t.name,s=!0):s&&(i.addMapping({generated:{line:n.line,column:n.column}}),o=null,s=!1),e.split("").forEach(function(e){e==="\n"?(n.line++,n.column=0):n.column++})}),this.walkSourceContents(function(e,t){i.setSourceContent(e,t)}),{code:n.code,map:i}},t.SourceNode=s}),window.sourceMap={SourceMapConsumer:require("source-map/source-map-consumer").SourceMapConsumer,SourceMapGenerator:require("source-map/source-map-generator").SourceMapGenerator,SourceNode:require("source-map/source-node").SourceNode} + +var emscripten_sourcemap_xmlHttp = undefined; +function emscripten_sourceMapLoaded() { + if (emscripten_sourcemap_xmlHttp.readyState === 4) { + Module['removeRunDependency']('sourcemap'); + if (emscripten_sourcemap_xmlHttp.status === 200) { + emscripten_source_map = new window.sourceMap.SourceMapConsumer(emscripten_sourcemap_xmlHttp.responseText); + console.log('Source map data loaded.'); + } else { + console.warn('Source map data loading failed with status code ' + emscripten_sourcemap_xmlHttp.status + '.'); + } + emscripten_sourcemap_xmlHttp = undefined; + } +} +function emscripten_loadSourceMap() { + var url = window.location.href+'.map'; + console.log('Loading source map data from ' + url + '..'); + Module['addRunDependency']('sourcemap'); + emscripten_sourcemap_xmlHttp = new XMLHttpRequest(); + emscripten_sourcemap_xmlHttp.onreadystatechange = emscripten_sourceMapLoaded; + emscripten_sourcemap_xmlHttp.open("GET", url, true); + emscripten_sourcemap_xmlHttp.send(null); +} + +var Module; +if (Module['preRun'] instanceof Array) { + Module['preRun'].push(emscripten_loadSourceMap); +} else { + Module['preRun'] = [emscripten_loadSourceMap]; +} diff --git a/src/library.js b/src/library.js index bdc0a39e..fc731e01 100644 --- a/src/library.js +++ b/src/library.js @@ -8835,6 +8835,193 @@ LibraryManager.library = { } }, + // Returns [parentFuncArguments, functionName, paramListName] + _emscripten_traverse_stack: function(args) { + if (!args || !args.callee || !args.callee.name) { + return [null, '', '']; + } + + var funstr = args.callee.toString(); + var funcname = args.callee.name; + var str = '('; + var first = true; + for(i in args) { + var a = args[i]; + if (!first) { + str += ", "; + } + first = false; + if (typeof a === 'number' || typeof a === 'string') { + str += a; + } else { + str += '(' + typeof a + ')'; + } + } + str += ')'; + args = args.callee.caller.arguments; + if (first) + str = ''; + return [args, funcname, str]; + }, + + emscripten_get_callstack_js__deps: ['_emscripten_traverse_stack'], + emscripten_get_callstack_js: function(flags) { + var err = new Error(); + if (!err.stack) { + Runtime.warnOnce('emscripten_get_callstack_js is not supported on this browser!'); + return ''; + } + var callstack = new Error().stack.toString(); + + // Find the symbols in the callstack that corresponds to the functions that report callstack information, and remove everyhing up to these from the output. + var iThisFunc = callstack.lastIndexOf('_emscripten_log'); + var iThisFunc2 = callstack.lastIndexOf('_emscripten_get_callstack'); + var iNextLine = callstack.indexOf('\n', Math.max(iThisFunc, iThisFunc2))+1; + callstack = callstack.slice(iNextLine); + + // If user requested to see the original source stack, but no source map information is available, just fall back to showing the JS stack. + if (flags & 8/*EM_LOG_C_STACK*/ && typeof emscripten_source_map === 'undefined') { + Runtime.warnOnce('Source map information is not available, emscripten_log with EM_LOG_C_STACK will be ignored. Build with "--pre-js $EMSCRIPTEN/src/emscripten-source-map.min.js" linker flag to add source map loading to code.'); + flags ^= 8/*EM_LOG_C_STACK*/; + flags |= 16/*EM_LOG_JS_STACK*/; + } + + var stack_args = null; + if (flags & 128 /*EM_LOG_FUNC_PARAMS*/) { + // To get the actual parameters to the functions, traverse the stack via the unfortunately deprecated 'arguments.callee' method, if it works: + var stack_args = __emscripten_traverse_stack(arguments); + while (stack_args[1].indexOf('_emscripten_') >= 0) + stack_args = __emscripten_traverse_stack(stack_args[0]); + } + + // Process all lines: + lines = callstack.split('\n'); + callstack = ''; + var firefoxRe = new RegExp('\\s*(.*?)@(.*):(.*)'); // Extract components of form ' Object._main@http://server.com:4324' + var chromeRe = new RegExp('\\s*at (.*?) \\\((.*):(.*):(.*)\\\)'); // Extract components of form ' at Object._main (http://server.com/file.html:4324:12)' + + for(l in lines) { + var line = lines[l]; + + var jsSymbolName = ''; + var file = ''; + var lineno = 0; + var column = 0; + + var parts = chromeRe.exec(line); + if (parts && parts.length == 5) { + jsSymbolName = parts[1]; + file = parts[2]; + lineno = parts[3]; + column = parts[4]; + } else { + parts = firefoxRe.exec(line); + if (parts && parts.length == 4) { + jsSymbolName = parts[1]; + file = parts[2]; + lineno = parts[3]; + column = 0; // Firefox doesn't carry column information. See https://bugzilla.mozilla.org/show_bug.cgi?id=762556 + } else { + // Was not able to extract this line for demangling/sourcemapping purposes. Output it as-is. + callstack += line + '\n'; + continue; + } + } + + // Try to demangle the symbol, but fall back to showing the original JS symbol name if not available. + var cSymbolName = (flags & 32/*EM_LOG_DEMANGLE*/) ? demangle(jsSymbolName) : jsSymbolName; + if (!cSymbolName) { + cSymbolName = jsSymbolName; + } + + var haveSourceMap = false; + + if (flags & 8/*EM_LOG_C_STACK*/) { + var orig = emscripten_source_map.originalPositionFor({line: lineno, column: column}); + haveSourceMap = (orig && orig.source); + if (haveSourceMap) { + if (flags & 64/*EM_LOG_NO_PATHS*/) { + orig.source = orig.source.substring(orig.source.replace(/\\/g, "/").lastIndexOf('/')+1); + } + callstack += ' at ' + cSymbolName + ' (' + orig.source + ':' + orig.line + ':' + orig.column + ')\n'; + } + } + if ((flags & 16/*EM_LOG_JS_STACK*/) || !haveSourceMap) { + if (flags & 64/*EM_LOG_NO_PATHS*/) { + file = file.substring(file.replace(/\\/g, "/").lastIndexOf('/')+1); + } + callstack += (haveSourceMap ? (' = '+jsSymbolName) : (' at '+cSymbolName)) + ' (' + file + ':' + lineno + ':' + column + ')\n'; + } + + // If we are still keeping track with the callstack by traversing via 'arguments.callee', print the function parameters as well. + if (flags & 128 /*EM_LOG_FUNC_PARAMS*/ && stack_args[0]) { + if (stack_args[1] == jsSymbolName && stack_args[2].length > 0) { + callstack = callstack.replace(/\s+$/, ''); + callstack += ' with values: ' + stack_args[1] + stack_args[2] + '\n'; + } + stack_args = __emscripten_traverse_stack(stack_args[0]); + } + } + // Trim extra whitespace at the end of the output. + callstack = callstack.replace(/\s+$/, ''); + return callstack; + }, + + emscripten_get_callstack__deps: ['emscripten_get_callstack_js'], + emscripten_get_callstack: function(flags, str, maxbytes) { + var callstack = _emscripten_get_callstack_js(flags); + // User can query the required amount of bytes to hold the callstack. + if (!str || maxbytes <= 0) { + return callstack.length+1; + } + // Truncate output to avoid writing past bounds. + if (callstack.length > maxbytes-1) { + callstack.slice(0, maxbytes-1); + } + // Output callstack string as C string to HEAP. + writeStringToMemory(callstack, str, false); + + // Return number of bytes written. + return callstack.length+1; + }, + + emscripten_log_js__deps: ['emscripten_get_callstack_js'], + emscripten_log_js: function(flags, str) { + if (flags & 24/*EM_LOG_C_STACK | EM_LOG_JS_STACK*/) { + str = str.replace(/\s+$/, ''); // Ensure the message and the callstack are joined cleanly with exactly one newline. + str += (str.length > 0 ? '\n' : '') + _emscripten_get_callstack_js(flags); + } + + if (flags & 1 /*EM_LOG_CONSOLE*/) { + if (flags & 4 /*EM_LOG_ERROR*/) { + console.error(str); + } else if (flags & 2 /*EM_LOG_WARN*/) { + console.warn(str); + } else { + console.log(str); + } + } else if (flags & 6 /*EM_LOG_ERROR|EM_LOG_WARN*/) { + Module.printErr(str); + } else { + Module.print(str); + } + }, + + emscripten_log__deps: ['_formatString', 'emscripten_log_js'], + emscripten_log: function(flags, varargs) { + // Extract the (optionally-existing) printf format specifier field from varargs. + var format = {{{ makeGetValue('varargs', '0', 'i32', undefined, undefined, true) }}}; + varargs += Math.max(Runtime.getNativeFieldSize('i32'), Runtime.getAlignSize('i32', null, true)); + var str = ''; + if (format) { + var result = __formatString(format, varargs); + for(var i = 0 ; i < result.length; ++i) { + str += String.fromCharCode(result[i]); + } + } + _emscripten_log_js(flags, str); + }, + //============================ // emscripten vector ops //============================ diff --git a/src/library_egl.js b/src/library_egl.js index 73d5e544..11cf8951 100644 --- a/src/library_egl.js +++ b/src/library_egl.js @@ -264,6 +264,26 @@ var LibraryEGL = { return 0; } + // EGL 1.4 spec says default EGL_CONTEXT_CLIENT_VERSION is GLES1, but this is not supported by Emscripten. + // So user must pass EGL_CONTEXT_CLIENT_VERSION == 2 to initialize EGL. + var glesContextVersion = 1; + for(;;) { + var param = {{{ makeGetValue('contextAttribs', '0', 'i32') }}}; + if (!param) break; + var value = {{{ makeGetValue('contextAttribs', '4', 'i32') }}}; + if (param == 0x3098 /*EGL_CONTEXT_CLIENT_VERSION*/) { + glesContextVersion = value; + } + contextAttribs += 8; + } + if (glesContextVersion != 2) { +#if GL_ASSERTIONS + Module.printErr('When initializing GLES2/WebGL1 via EGL, one must pass EGL_CONTEXT_CLIENT_VERSION = 2 to GL context attributes! GLES version ' + glesContextVersion + ' is not supported!'); +#endif + EGL.setErrorCode(0x3005 /* EGL_BAD_CONFIG */); + return 0; /* EGL_NO_CONTEXT */ + } + _glutInitDisplayMode(0x92 /* GLUT_RGBA | GLUT_DOUBLE | GLUT_DEPTH | GLUT_MULTISAMPLE */); EGL.windowID = _glutCreateWindow(); if (EGL.windowID != 0) { diff --git a/src/library_sdl.js b/src/library_sdl.js index 2efc1271..1c1e8107 100644 --- a/src/library_sdl.js +++ b/src/library_sdl.js @@ -1220,6 +1220,7 @@ var LibrarySDL = { if (surf) SDL.freeSurface(surf); }, + SDL_UpperBlit__deps: ['SDL_LockSurface'], SDL_UpperBlit: function(src, srcrect, dst, dstrect) { var srcData = SDL.surfaces[src]; var dstData = SDL.surfaces[dst]; diff --git a/src/preamble.js b/src/preamble.js index 710b7c52..832ec2c3 100644 --- a/src/preamble.js +++ b/src/preamble.js @@ -642,6 +642,10 @@ Module['stringToUTF32'] = stringToUTF32; function demangle(func) { try { + // Special-case the entry point, since its name differs from other name mangling. + if (func == 'Object._main' || func == '_main') { + return 'main()'; + } if (typeof func === 'number') func = Pointer_stringify(func); if (func[0] !== '_') return func; if (func[1] !== '_') return func; // C function diff --git a/src/relooper/Relooper.cpp b/src/relooper/Relooper.cpp index d2a48f63..70cf844b 100644 --- a/src/relooper/Relooper.cpp +++ b/src/relooper/Relooper.cpp @@ -101,9 +101,7 @@ void Branch::Render(Block *Target, bool SetLabel) { // Block -int Block::IdCounter = 1; // 0 is reserved for clearings - -Block::Block(const char *CodeInit, const char *BranchVarInit) : Parent(NULL), Id(Block::IdCounter++), IsCheckedMultipleEntry(false) { +Block::Block(const char *CodeInit, const char *BranchVarInit) : Parent(NULL), Id(-1), IsCheckedMultipleEntry(false) { Code = strdup(CodeInit); BranchVar = BranchVarInit ? strdup(BranchVarInit) : NULL; } @@ -142,6 +140,7 @@ void Block::Render(bool InLoop) { if (!ProcessedBranchesOut.size()) return; bool SetLabel = true; // in some cases it is clear we can avoid setting label, see later + bool ForceSetLabel = Shape::IsEmulated(Parent); // A setting of the label variable (label = x) is necessary if it can // cause an impact. The main case is where we set label to x, then elsewhere @@ -210,7 +209,7 @@ void Block::Render(bool InLoop) { Target = DefaultTarget; Details = ProcessedBranchesOut[DefaultTarget]; } - bool SetCurrLabel = SetLabel && Target->IsCheckedMultipleEntry; + bool SetCurrLabel = (SetLabel && Target->IsCheckedMultipleEntry) || ForceSetLabel; bool HasFusedContent = Fused && contains(Fused->InnerMap, Target); bool HasContent = SetCurrLabel || Details->Type != Branch::Direct || HasFusedContent || Details->Code; if (iter != ProcessedBranchesOut.end()) { @@ -272,10 +271,6 @@ void Block::Render(bool InLoop) { } } -// Shape - -int Shape::IdCounter = 0; - // MultipleShape void MultipleShape::RenderLoopPrefix() { @@ -330,16 +325,19 @@ void LoopShape::Render(bool InLoop) { if (Next) Next->Render(InLoop); }; -/* // EmulatedShape void EmulatedShape::Render(bool InLoop) { + PrintIndented("label = %d;\n", Entry->Id); + if (Labeled) { + PrintIndented("L%d: ", Id); + } PrintIndented("while(1) {\n"); Indenter::Indent(); - PrintIndented("switch(label) {\n"); + PrintIndented("switch(label|0) {\n"); Indenter::Indent(); - for (int i = 0; i < Blocks.size(); i++) { - Block *Curr = Blocks[i]; + for (BlockSet::iterator iter = Blocks.begin(); iter != Blocks.end(); iter++) { + Block *Curr = *iter; PrintIndented("case %d: {\n", Curr->Id); Indenter::Indent(); Curr->Render(InLoop); @@ -353,11 +351,10 @@ void EmulatedShape::Render(bool InLoop) { PrintIndented("}\n"); if (Next) Next->Render(InLoop); }; -*/ // Relooper -Relooper::Relooper() : Root(NULL) { +Relooper::Relooper() : Root(NULL), Emulate(false), BlockIdCounter(1), ShapeIdCounter(0) { // block ID 0 is reserved for clearings } Relooper::~Relooper() { @@ -366,6 +363,7 @@ Relooper::~Relooper() { } void Relooper::AddBlock(Block *New) { + New->Id = BlockIdCounter++; Blocks.push_back(New); } @@ -461,7 +459,7 @@ void Relooper::Calculate(Block *Entry) { } } - Pre.SplitDeadEnds(); + if (!Emulate) Pre.SplitDeadEnds(); // Recursively process the graph @@ -470,6 +468,7 @@ void Relooper::Calculate(Block *Entry) { // Add a shape to the list of shapes in this Relooper calculation void Notice(Shape *New) { + New->Id = Parent->ShapeIdCounter++; Parent->Shapes.push_back(New); } @@ -526,6 +525,21 @@ void Relooper::Calculate(Block *Entry) { return Simple; } + Shape *MakeEmulated(BlockSet &Blocks, Block *Entry, BlockSet &NextEntries) { + PrintDebug("creating emulated block with entry #%d and everything it can reach, %d blocks\n", Entry->Id, Blocks.size()); + EmulatedShape *Emulated = new EmulatedShape; + Notice(Emulated); + Emulated->Entry = Entry; + for (BlockSet::iterator iter = Blocks.begin(); iter != Blocks.end(); iter++) { + Block *Curr = *iter; + Emulated->Blocks.insert(Curr); + Curr->Parent = Emulated; + Solipsize(Curr, Branch::Continue, Emulated, Blocks); + } + Blocks.clear(); + return Emulated; + } + Shape *MakeLoop(BlockSet &Blocks, BlockSet& Entries, BlockSet &NextEntries) { // Find the inner blocks in this loop. Proceed backwards from the entries until // you reach a seen block, collecting as you go. @@ -837,6 +851,9 @@ void Relooper::Calculate(Block *Entry) { if (Entries->size() == 0) return Ret; if (Entries->size() == 1) { Block *Curr = *(Entries->begin()); + if (Parent->Emulate) { + Make(MakeEmulated(Blocks, Curr, *NextEntries)); + } if (Curr->BranchesIn.size() == 0) { // One entry, no looping ==> Simple Make(MakeSimple(Blocks, Curr, *NextEntries)); @@ -844,6 +861,7 @@ void Relooper::Calculate(Block *Entry) { // One entry, looping ==> Loop Make(MakeLoop(Blocks, *Entries, *NextEntries)); } + // More than one entry, try to eliminate through a Multiple groups of // independent blocks from an entry/ies. It is important to remove through // multiples as opposed to looping since the former is more performant. diff --git a/src/relooper/Relooper.h b/src/relooper/Relooper.h index f3dedf8c..04f2ffc3 100644 --- a/src/relooper/Relooper.h +++ b/src/relooper/Relooper.h @@ -57,7 +57,7 @@ struct Block { BlockBranchMap ProcessedBranchesOut; BlockSet ProcessedBranchesIn; Shape *Parent; // The shape we are directly inside - int Id; // A unique identifier + int Id; // A unique identifier, defined when added to relooper const char *Code; // The string representation of the code in this block. Owning pointer (we copy the input) const char *BranchVar; // If we have more than one branch out, the variable whose value determines where we go bool IsCheckedMultipleEntry; // If true, we are a multiple entry, so reaching us requires setting the label variable @@ -69,9 +69,6 @@ struct Block { // Prints out the instructions code and branchings void Render(bool InLoop); - - // INTERNAL - static int IdCounter; }; // Represents a structured control flow shape, one of @@ -96,20 +93,22 @@ class SimpleShape; class LabeledShape; class MultipleShape; class LoopShape; +class EmulatedShape; struct Shape { - int Id; // A unique identifier. Used to identify loops, labels are Lx where x is the Id. + int Id; // A unique identifier. Used to identify loops, labels are Lx where x is the Id. Defined when added to relooper Shape *Next; // The shape that will appear in the code right after this one Shape *Natural; // The shape that control flow gets to naturally (if there is Next, then this is Next) enum ShapeType { Simple, Multiple, - Loop + Loop, + Emulated }; ShapeType Type; - Shape(ShapeType TypeInit) : Id(Shape::IdCounter++), Next(NULL), Type(TypeInit) {} + Shape(ShapeType TypeInit) : Id(-1), Next(NULL), Type(TypeInit) {} virtual ~Shape() {} virtual void Render(bool InLoop) = 0; @@ -118,9 +117,7 @@ struct Shape { static MultipleShape *IsMultiple(Shape *It) { return It && It->Type == Multiple ? (MultipleShape*)It : NULL; } static LoopShape *IsLoop(Shape *It) { return It && It->Type == Loop ? (LoopShape*)It : NULL; } static LabeledShape *IsLabeled(Shape *It) { return IsMultiple(It) || IsLoop(It) ? (LabeledShape*)It : NULL; } - - // INTERNAL - static int IdCounter; + static EmulatedShape *IsEmulated(Shape *It) { return It && It->Type == Emulated ? (EmulatedShape*)It : NULL; } }; struct SimpleShape : public Shape { @@ -162,12 +159,15 @@ struct LoopShape : public LabeledShape { void Render(bool InLoop); }; -/* -struct EmulatedShape : public Shape { - std::deque<Block*> Blocks; +// TODO EmulatedShape is only partially functional. Currently it can be used for the +// entire set of blocks being relooped, but not subsets. +struct EmulatedShape : public LabeledShape { + Block *Entry; + BlockSet Blocks; + + EmulatedShape() : LabeledShape(Emulated) { Labeled = true; } void Render(bool InLoop); }; -*/ // Implements the relooper algorithm for a function's blocks. // @@ -184,6 +184,9 @@ struct Relooper { std::deque<Block*> Blocks; std::deque<Shape*> Shapes; Shape *Root; + bool Emulate; + int BlockIdCounter; + int ShapeIdCounter; Relooper(); ~Relooper(); @@ -204,6 +207,9 @@ struct Relooper { // Sets asm.js mode on or off (default is off) static void SetAsmJSMode(int On); + + // Sets whether we must emulate everything with switch-loop code + void SetEmulate(int E) { Emulate = E; } }; typedef std::map<Block*, BlockSet> BlockBlockSetMap; diff --git a/src/relooper/fuzzer.py b/src/relooper/fuzzer.py index 50846d10..fa47583e 100644 --- a/src/relooper/fuzzer.py +++ b/src/relooper/fuzzer.py @@ -87,6 +87,12 @@ int main() { Relooper r; ''' + if random.random() < 0.1: + print 'emulate' + fast += ''' + r.SetEmulate(true); +''' + for i in range(num): fast += ''' r.AddBlock(b%d); ''' % i diff --git a/src/relooper/test.cpp b/src/relooper/test.cpp index fbd9c7aa..773f6ee4 100644 --- a/src/relooper/test.cpp +++ b/src/relooper/test.cpp @@ -258,5 +258,33 @@ int main() { puts(buffer); } + + if (1) { + Relooper::SetOutputBuffer(buffer, sizeof(buffer)); + + printf("\n\n-- If pattern, emulated --\n\n", "the_var"); + + Block *b_a = new Block("// block A\n", NULL); + Block *b_b = new Block("// block B\n", "b_check()"); + Block *b_c = new Block("// block C\n", NULL); + + b_a->AddBranchTo(b_b, "check == 10", "atob();"); + b_a->AddBranchTo(b_c, NULL, "atoc();"); + + b_b->AddBranchTo(b_c, "case 17:", "btoc();"); + b_b->AddBranchTo(b_a, NULL, NULL); + + Relooper r; + r.SetEmulate(true); + r.AddBlock(b_a); + r.AddBlock(b_b); + r.AddBlock(b_c); + + r.Calculate(b_a); + printf("\n\n", "the_var"); + r.Render(); + + puts(buffer); + } } diff --git a/src/relooper/test.txt b/src/relooper/test.txt index 2c530567..540f7bdb 100644 --- a/src/relooper/test.txt +++ b/src/relooper/test.txt @@ -4,23 +4,23 @@ -// block A -switch (the_var) { -check == 10 { - atob(); - // block B + // block A switch (the_var) { + check == 10 { + atob(); + // block B + switch (the_var) { + default: { + btoc(); + } + } + break; + } default: { - btoc(); + atoc(); } } - break; -} -default: { - atoc(); -} -} -// block C + // block C @@ -28,25 +28,25 @@ default: { -// block A -switch (the_var) { -check == 15 { - // block B + // block A switch (the_var) { - default: { - } + check == 15 { + // block B + switch (the_var) { + default: { + } + } + break; } - break; -} -default: { - // block C - switch (the_var) { default: { + // block C + switch (the_var) { + default: { + } + } } } -} -} -// block D + // block D @@ -54,81 +54,81 @@ default: { -L9: while(1) { - // block A - var check = maybe(); - switch (the_var) { - default: { - } - } - // block B - switch (the_var) { - check == 41 { - break; - } - default: { - break L9; - } + L0: while(1) { + // block A + var check = maybe(); + switch (the_var) { + default: { + } + } + // block B + switch (the_var) { + check == 41 { + break; + } + default: { + break L0; + } + } } -} -// block C + // block C -- Loop with phi to head -// code 1 -switch (the_var) { -default: { - var $i_0 = 0;var $x_0 = 5; -} -} -L14: while(1) { - // code 2 + // code 1 switch (the_var) { - $2 { - break; - } default: { - var $x_1 = $x_0; - label = 18; - break L14; + var $i_0 = 0;var $x_0 = 5; + } + } + L1: while(1) { + // code 2 + switch (the_var) { + $2 { + break; + } + default: { + var $x_1 = $x_0; + label = -1; + break L1; + } + } + // code 3 + switch (the_var) { + $6 { + break L1; + break; + } + default: { + var $i_0 = $7;var $x_0 = $5; + } + } } + if (label == -1) { + // code 7 } - // code 3 + // code 4 switch (the_var) { - $6 { - break L14; + $10 { + // code 5 + switch (the_var) { + default: { + } + } break; } default: { - var $i_0 = $7;var $x_0 = $5; } } -} -if (label == 18) { - // code 7 -} -// code 4 -switch (the_var) { -$10 { - // code 5 + // code 6 switch (the_var) { default: { + var $x_1 = $13; } } - break; -} -default: { -} -} -// code 6 -switch (the_var) { -default: { - var $x_1 = $13; -} -} -// code 7 + // code 7 @@ -136,30 +136,30 @@ default: { -// block A................................................................................................... -switch (the_var) { -chak() { - atob(); - // block B................................................................................................... + // block A................................................................................................... switch (the_var) { - default: { - btod(); - } + chak() { + atob(); + // block B................................................................................................... + switch (the_var) { + default: { + btod(); + } + } + // block D + break; } - // block D - break; -} -default: { - atoc(); - // block C................................................................................................... - switch (the_var) { default: { - ctod2(); + atoc(); + // block C................................................................................................... + switch (the_var) { + default: { + ctod2(); + } + } + // block D } } - // block D -} -} @@ -167,27 +167,27 @@ default: { -// block A -switch (the_var) { -check == 10 { - break; -} -default: { - return C; -} -} -while(1) { - // block B + // block A switch (the_var) { - default: { - } + check == 10 { + break; } - // block D - switch (the_var) { default: { + return C; } } -} + while(1) { + // block B + switch (the_var) { + default: { + } + } + // block D + switch (the_var) { + default: { + } + } + } @@ -195,51 +195,51 @@ while(1) { -// block A -L37: do { - switch (the_var) { - expensive() { - label = 33; - break; - } - default: { - // block B + // block A + L1: do { switch (the_var) { - expensive2() { - label = 33; - break L37; + expensive() { + label = 3; break; } default: { + // block B + switch (the_var) { + expensive2() { + label = 3; + break L1; + break; + } + default: { + } + } + // block D + switch (the_var) { + default: { + } + } } } - // block D + } while(0); + if (label == 3) { + // block C; switch (the_var) { default: { } } } + while(1) { + // block E + switch (the_var) { + default: { + } + } + // block F + switch (the_var) { + default: { + } + } } -} while(0); -if (label == 33) { - // block C; - switch (the_var) { - default: { - } - } -} -while(1) { - // block E - switch (the_var) { - default: { - } - } - // block F - switch (the_var) { - default: { - } - } -} @@ -247,26 +247,71 @@ while(1) { -// block A -L46: do { - switch (the_var) { - shouldLoop() { - while(1) { - // block B - switch (the_var) { - moarLoop() { + // block A + L1: do { + switch (the_var) { + shouldLoop() { + while(1) { + // block B + switch (the_var) { + moarLoop() { + break; + } + default: { + break L1; + } + } + } + break; + } + default: { + } + } + } while(0); + // block C + + + +-- If pattern, emulated -- + + + + label = 1; + L0: while(1) { + switch(label|0) { + case 3: { + // block C break; } - default: { - break L46; + case 1: { + // block A + if (check == 10) { + atob(); + label = 2; + continue L0; + } else { + atoc(); + label = 3; + continue L0; + } + break; } + case 2: { + // block B + switch (b_check()) { + case 17: { + btoc(); + label = 3; + continue L0; + break; + } + default: { + label = 1; + continue L0; + } + } + break; } } - break; - } - default: { - } } -} while(0); -// block C diff --git a/src/relooper/test2.txt b/src/relooper/test2.txt index a558a8b7..aba9ec1f 100644 --- a/src/relooper/test2.txt +++ b/src/relooper/test2.txt @@ -1,26 +1,26 @@ -ep -L1: do { - switch (var) { - ep -> LBB1 { - LBB1 - switch (the_var) { - LBB1 -> LBB2 { + ep + L1: do { + switch (var) { + ep -> LBB1 { + LBB1 + switch (the_var) { + LBB1 -> LBB2 { + break; + } + default: { + break L1; + } + } + LBB2 + switch (the_var) { + default: { + } + } break; } default: { - break L1; } } - LBB2 - switch (the_var) { - default: { - } - } - break; - } - default: { - } - } -} while(0); -LBB3 + } while(0); + LBB3 diff --git a/src/relooper/test3.txt b/src/relooper/test3.txt index f77e2618..33f85a7e 100644 --- a/src/relooper/test3.txt +++ b/src/relooper/test3.txt @@ -1,56 +1,56 @@ -ep -L1: do { - switch (the_var) { - ep -> LBB1 { - LBB1 + ep + L1: do { switch (the_var) { - LBB1 -> LBB2 { + ep -> LBB1 { + LBB1 + switch (the_var) { + LBB1 -> LBB2 { + break; + } + default: { + break L1; + } + } + LBB2 + switch (the_var) { + default: { + } + } break; } default: { - break L1; - } - } - LBB2 - switch (the_var) { - default: { } } - break; - } - default: { - } - } -} while(0); -LBB3 -L5: do { - switch (the_var) { - LBB3 -> LBB4 { - LBB4 + } while(0); + LBB3 + L5: do { switch (the_var) { - LBB4 -> LBB5 { - break; - } - default: { - break L5; - } - } - while(1) { - LBB5 + LBB3 -> LBB4 { + LBB4 switch (the_var) { - LBB5 -> LBB6 { - break L5; + LBB4 -> LBB5 { break; } default: { + break L5; + } } + while(1) { + LBB5 + switch (the_var) { + LBB5 -> LBB6 { + break L5; + break; + } + default: { + } + } } + break; + } + default: { + } } - break; - } - default: { - } - } -} while(0); -LBB6 + } while(0); + LBB6 diff --git a/src/relooper/test4.txt b/src/relooper/test4.txt index 1829e523..7e3fe8e1 100644 --- a/src/relooper/test4.txt +++ b/src/relooper/test4.txt @@ -1,44 +1,44 @@ -//19 -L1: do { - switch (the_var) { - 1 { - //20 + //19 + L1: do { switch (the_var) { 1 { + //20 + switch (the_var) { + 1 { + break; + } + default: { + label = 4; + break L1; + } + } + //21 + switch (the_var) { + default: { + } + } break; } default: { label = 4; - break L1; } } - //21 + } while(0); + if (label == 4) { + //22 switch (the_var) { default: { } } - break; - } - default: { - label = 4; } - } -} while(0); -if (label == 4) { - //22 + //23 switch (the_var) { + 1 { + //24 + break; + } default: { + //28 } } -} -//23 -switch (the_var) { - 1 { - //24 - break; -} -default: { - //28 -} -} diff --git a/src/relooper/test5.txt b/src/relooper/test5.txt index 82ef5edf..e3c204f6 100644 --- a/src/relooper/test5.txt +++ b/src/relooper/test5.txt @@ -1,56 +1,56 @@ -//0 -switch (the_var) { -check(0) { - L2: while(1) { - //1 - switch (the_var) { - check(1) { - break; - } - default: { - break L2; - } - } + //0 + switch (the_var) { + check(0) { + L2: while(1) { + //1 + switch (the_var) { + check(1) { + break; + } + default: { + break L2; + } + } + } + L4: while(1) { + //2 + switch (the_var) { + check(2) { + break; + } + default: { + break L4; + } + } + } + //3 + break; } - L4: while(1) { - //2 - switch (the_var) { - check(2) { - break; - } - default: { - break L4; - } - } + default: { + goingFrom0to4(); + L7: while(1) { + //4 + switch (the_var) { + check(4) { + break; + } + default: { + break L7; + } + } + } + L9: while(1) { + //5 + switch (the_var) { + check(5) { + break L9; + break; + } + default: { + } + } + } + //3 } - //3 - break; -} -default: { - goingFrom0to4(); - L7: while(1) { - //4 - switch (the_var) { - check(4) { - break; - } - default: { - break L7; - } - } - } - L9: while(1) { - //5 - switch (the_var) { - check(5) { - break L9; - break; - } - default: { - } - } } - //3 -} -} diff --git a/src/relooper/test6.txt b/src/relooper/test6.txt index f9d6e93a..837fc243 100644 --- a/src/relooper/test6.txt +++ b/src/relooper/test6.txt @@ -1,26 +1,26 @@ -//0 -L1: do { - switch (the_var) { - check(0) { - //1 + //0 + L1: do { switch (the_var) { - check(1) { + check(0) { + //1 + switch (the_var) { + check(1) { + break; + } + default: { + break L1; + } + } + //2 + switch (the_var) { + default: { + } + } break; } default: { - break L1; } } - //2 - switch (the_var) { - default: { - } - } - break; - } - default: { - } - } -} while(0); -//3 + } while(0); + //3 diff --git a/src/relooper/test_dead.txt b/src/relooper/test_dead.txt index ae54e2cd..43d557ae 100644 --- a/src/relooper/test_dead.txt +++ b/src/relooper/test_dead.txt @@ -4,6 +4,6 @@ -// block A + // block A I did not crash even though I have dead code with a branch! diff --git a/src/relooper/test_debug.txt b/src/relooper/test_debug.txt index eb33fdbc..498dee39 100644 --- a/src/relooper/test_debug.txt +++ b/src/relooper/test_debug.txt @@ -4,18 +4,18 @@ int main() { rl_set_output_buffer(buffer); void *block_map[10000]; void *rl = rl_new_relooper(); - void *b1 = rl_new_block("// code 1"); - block_map[1] = b1; - rl_relooper_add_block(rl, block_map[1]); - void *b2 = rl_new_block("// code 2"); - block_map[2] = b2; - rl_relooper_add_block(rl, block_map[2]); - void *b3 = rl_new_block("// code 3"); - block_map[3] = b3; - rl_relooper_add_block(rl, block_map[3]); - void *b4 = rl_new_block("// code 4"); - block_map[4] = b4; - rl_relooper_add_block(rl, block_map[4]); + void *b-1 = rl_new_block("// code -1"); + block_map[-1] = b-1; + rl_relooper_add_block(rl, block_map[-1]); + void *b-1 = rl_new_block("// code -1"); + block_map[-1] = b-1; + rl_relooper_add_block(rl, block_map[-1]); + void *b-1 = rl_new_block("// code -1"); + block_map[-1] = b-1; + rl_relooper_add_block(rl, block_map[-1]); + void *b-1 = rl_new_block("// code -1"); + block_map[-1] = b-1; + rl_relooper_add_block(rl, block_map[-1]); rl_block_add_branch_to(block_map[1], block_map[2], "ep -> LBB1", NULL); rl_block_add_branch_to(block_map[1], block_map[4], NULL, NULL); rl_block_add_branch_to(block_map[2], block_map[3], "LBB1 -> LBB2", NULL); @@ -114,29 +114,29 @@ int main() { // Process() returning // === Optimizing shapes === // Fusing Multiple to Simple -ep -L1: do { - switch (the_var) { - ep -> LBB1 { - LBB1 + ep + L1: do { switch (the_var) { - LBB1 -> LBB2 { + ep -> LBB1 { + LBB1 + switch (the_var) { + LBB1 -> LBB2 { + break; + } + default: { + break L1; + } + } + LBB2 + switch (the_var) { + default: { + } + } break; } default: { - break L1; } } - LBB2 - switch (the_var) { - default: { - } - } - break; - } - default: { - } - } -} while(0); -LBB3 + } while(0); + LBB3 diff --git a/src/relooper/test_fuzz1.txt b/src/relooper/test_fuzz1.txt index d887f5b8..ccd38934 100644 --- a/src/relooper/test_fuzz1.txt +++ b/src/relooper/test_fuzz1.txt @@ -1,72 +1,72 @@ -print('entry'); var label; var state; var decisions = [4, 1, 7, 2, 6, 6, 8]; var index = 0; function check() { if (index == decisions.length) throw 'HALT'; return decisions[index++] } -switch (the_var) { -default: { -} -} -print(5); state = check(); -switch (the_var) { -default: { -} -} -print(6); state = check(); -switch (the_var) { -state == 7 { - print(7); state = check(); + print('entry'); var label; var state; var decisions = [4, 1, 7, 2, 6, 6, 8]; var index = 0; function check() { if (index == decisions.length) throw 'HALT'; return decisions[index++] } switch (the_var) { default: { - label = 3; } } - break; -} -default: { -} -} -L5: while(1) { - if (label == 3) { - label = 0; - print(2); state = check(); + print(5); state = check(); + switch (the_var) { + default: { + } + } + print(6); state = check(); + switch (the_var) { + state == 7 { + print(7); state = check(); switch (the_var) { default: { + label = 3; } } + break; } - print(1); state = check(); - switch (the_var) { default: { } } - while(1) { - print(3); state = check(); - switch (the_var) { - state == 8 { - break; + L5: while(1) { + if (label == 3) { + label = 0; + print(2); state = check(); + switch (the_var) { + default: { + } + } } - default: { - continue L5; - } - } - print(8); state = check(); + print(1); state = check(); switch (the_var) { - state == 4 { - break; - } default: { - label = 3; - continue L5; } } - print(4); state = check(); - switch (the_var) { - state == 3 { - break; - } - default: { - continue L5; - } + while(1) { + print(3); state = check(); + switch (the_var) { + state == 8 { + break; + } + default: { + continue L5; + } + } + print(8); state = check(); + switch (the_var) { + state == 4 { + break; + } + default: { + label = 3; + continue L5; + } + } + print(4); state = check(); + switch (the_var) { + state == 3 { + break; + } + default: { + continue L5; + } + } } } -} diff --git a/src/relooper/test_fuzz2.txt b/src/relooper/test_fuzz2.txt index 69f4350c..a94908a1 100644 --- a/src/relooper/test_fuzz2.txt +++ b/src/relooper/test_fuzz2.txt @@ -1,30 +1,30 @@ -print('entry'); var label; var state; var decisions = [4, 1, 4, 3, 4, 1, 2, 5, 1, 3, 5, 5, 1, 5, 2, 4, 4, 3]; var index = 0; function check() { if (index == decisions.length) throw 'HALT'; return decisions[index++] } -switch (the_var) { -state == 1 { - while(1) { - print(1); state = check(); - switch (the_var) { - default: { - } + print('entry'); var label; var state; var decisions = [4, 1, 4, 3, 4, 1, 2, 5, 1, 3, 5, 5, 1, 5, 2, 4, 4, 3]; var index = 0; function check() { if (index == decisions.length) throw 'HALT'; return decisions[index++] } + switch (the_var) { + state == 1 { + while(1) { + print(1); state = check(); + switch (the_var) { + default: { + } + } } + break; } - break; -} -default: { -} -} -while(1) { - print(3); state = check(); - switch (the_var) { default: { } } - print(2); state = check(); - switch (the_var) { - default: { - } + while(1) { + print(3); state = check(); + switch (the_var) { + default: { + } + } + print(2); state = check(); + switch (the_var) { + default: { + } + } } -} diff --git a/src/relooper/test_fuzz3.txt b/src/relooper/test_fuzz3.txt index 398b4803..15037eec 100644 --- a/src/relooper/test_fuzz3.txt +++ b/src/relooper/test_fuzz3.txt @@ -1,25 +1,25 @@ -print('entry'); var label; var state; var decisions = [3, 3, 4, 1, 2, 1, 2, 4, 4, 4, 2, 3, 3, 1, 2]; var index = 0; function check() { if (index == decisions.length) throw 'HALT'; return decisions[index++] } -switch (the_var) { -default: { -} -} -print(1); state = check(); -switch (the_var) { -default: { -} -} -print(3); state = check(); -switch (the_var) { -default: { -} -} -while(1) { - print(4); state = check(); + print('entry'); var label; var state; var decisions = [3, 3, 4, 1, 2, 1, 2, 4, 4, 4, 2, 3, 3, 1, 2]; var index = 0; function check() { if (index == decisions.length) throw 'HALT'; return decisions[index++] } switch (the_var) { default: { } } -} + print(1); state = check(); + switch (the_var) { + default: { + } + } + print(3); state = check(); + switch (the_var) { + default: { + } + } + while(1) { + print(4); state = check(); + switch (the_var) { + default: { + } + } + } diff --git a/src/relooper/test_fuzz4.txt b/src/relooper/test_fuzz4.txt index 2e2f2c6f..adf879f9 100644 --- a/src/relooper/test_fuzz4.txt +++ b/src/relooper/test_fuzz4.txt @@ -1,41 +1,41 @@ -print('entry'); var label; var state; var decisions = [2, 2, 1, 3, 2, 2, 1, 3, 2, 3, 3, 1, 3, 2, 1]; var index = 0; function check() { if (index == decisions.length) throw 'HALT'; return decisions[index++] } -switch (the_var) { -state == 2 { - while(1) { - print(2); state = check(); - switch (the_var) { - default: { - } - } - } - break; -} -default: { -} -} -L4: while(1) { - print(4); state = check(); + print('entry'); var label; var state; var decisions = [2, 2, 1, 3, 2, 2, 1, 3, 2, 3, 3, 1, 3, 2, 1]; var index = 0; function check() { if (index == decisions.length) throw 'HALT'; return decisions[index++] } switch (the_var) { - state == 4 { + state == 2 { + while(1) { + print(2); state = check(); + switch (the_var) { + default: { + } + } + } break; } default: { - break L4; } } -} -print(3); state = check(); -switch (the_var) { -default: { -} -} -while(1) { - print(1); state = check(); + L4: while(1) { + print(4); state = check(); + switch (the_var) { + state == 4 { + break; + } + default: { + break L4; + } + } + } + print(3); state = check(); switch (the_var) { default: { } } -} + while(1) { + print(1); state = check(); + switch (the_var) { + default: { + } + } + } diff --git a/src/relooper/test_fuzz5.txt b/src/relooper/test_fuzz5.txt index f87e5b79..fea540ed 100644 --- a/src/relooper/test_fuzz5.txt +++ b/src/relooper/test_fuzz5.txt @@ -1,86 +1,86 @@ -print('entry'); var label; var state; var decisions = [133, 98, 134, 143, 162, 187, 130, 87, 91, 49, 102, 47, 9, 132, 179, 176, 157, 25, 64, 161, 57, 107, 16, 167, 185, 45, 191, 180, 23, 131]; var index = 0; function check() { if (index == decisions.length) throw 'HALT'; return decisions[index++] } -switch (the_var) { -default: { -} -} -L1: while(1) { - print(7); state = check(); + print('entry'); var label; var state; var decisions = [133, 98, 134, 143, 162, 187, 130, 87, 91, 49, 102, 47, 9, 132, 179, 176, 157, 25, 64, 161, 57, 107, 16, 167, 185, 45, 191, 180, 23, 131]; var index = 0; function check() { if (index == decisions.length) throw 'HALT'; return decisions[index++] } switch (the_var) { - state % 3 == 1 { - label = 3; - break; + default: { + } } - state % 3 == 0 { - print(8); state = check(); + L1: while(1) { + print(7); state = check(); switch (the_var) { - state % 2 == 0 { - label = 5; + state % 3 == 1 { + label = 3; break; } - default: { - label = 7; - } - } - break; - } - default: { - break L1; - } - } - L5: while(1) { - if (label == 3) { - label = 0; - print(2); state = check(); - switch (the_var) { - default: { - } - } - print(1); state = check(); + state % 3 == 0 { + print(8); state = check(); switch (the_var) { state % 2 == 0 { label = 5; - continue L5; break; } default: { label = 7; - continue L5; } } + break; } - else if (label == 5) { - label = 0; - print(4); state = check(); - switch (the_var) { - default: { - label = 3; - continue L5; - } - } + default: { + break L1; } - else if (label == 7) { - label = 0; - print(6); state = check(); - switch (the_var) { - state % 2 == 0 { - continue L1; - break; + } + L5: while(1) { + if (label == 3) { + label = 0; + print(2); state = check(); + switch (the_var) { + default: { + } + } + print(1); state = check(); + switch (the_var) { + state % 2 == 0 { + label = 5; + continue L5; + break; + } + default: { + label = 7; + continue L5; + } + } } - default: { - label = 7; - continue L5; + else if (label == 5) { + label = 0; + print(4); state = check(); + switch (the_var) { + default: { + label = 3; + continue L5; + } + } } + else if (label == 7) { + label = 0; + print(6); state = check(); + switch (the_var) { + state % 2 == 0 { + continue L1; + break; + } + default: { + label = 7; + continue L5; + } + } } } } -} -while(1) { - print(3); state = check(); - switch (the_var) { - default: { - } + while(1) { + print(3); state = check(); + switch (the_var) { + default: { + } + } } -} diff --git a/src/relooper/test_fuzz6.txt b/src/relooper/test_fuzz6.txt index b9c1499a..40605dfc 100644 --- a/src/relooper/test_fuzz6.txt +++ b/src/relooper/test_fuzz6.txt @@ -1,291 +1,291 @@ -print('entry'); var label; var state; var decisions = [759, 1223, 618, 1805, 277, 512, 204, 1545, 606, 734, 585, 447, 1670, 1031, 665, 1728, 353, 634, 1033, 13, 658, 589, 474, 854, 405, 1111, 1640, 697, 1156, 1357, 317, 618, 990, 1401, 405, 564, 497, 829, 653, 1194, 25, 322, 1178, 198, 1565, 1419, 1608, 486, 368, 606, 813, 22, 148, 141, 261, 375, 472, 964, 1106, 694, 205, 771, 44, 675, 545, 1027, 1528, 240, 1289, 564, 792, 744, 366, 668, 823, 210, 428, 1009, 1662, 1317, 1183, 681, 14, 1334, 712, 506, 224, 695, 401, 1035, 384, 486, 1519, 122, 1186, 1487, 1819, 1702, 463, 1706, 660, 1642, 847, 991, 976, 940, 867, 46, 23, 1449, 56, 1711, 634, 404, 1558, 168, 710, 1581, 1302, 870, 997, 1295, 1739, 769, 1005, 291, 1638, 1771, 842, 659, 1695, 713, 935, 802, 1173, 1572, 850, 607, 996, 55, 1576, 321, 1815, 662, 1044, 1612, 1680, 1050, 844, 553, 278, 1447, 1662, 1094, 1797, 774, 1013, 1204, 907, 340, 1172, 1460, 869, 1264, 111, 1176, 484, 845, 258, 417, 1246, 1017, 745, 189, 333, 1658, 1395, 1764, 1786, 165, 404, 847, 1429, 1574, 403, 718, 1118, 1756, 94, 56, 1498, 1696, 1355, 840, 50, 82, 371, 1087, 875, 1337, 267, 958, 1209, 1167, 1025, 1684, 184, 962, 1496, 201, 127, 372, 1, 1005, 402, 1387, 213, 1143, 1271, 167, 10, 12, 1060, 1390, 1366, 893, 747, 1005, 481, 876, 227, 514, 589, 250, 273, 1188, 1052, 719, 219, 1006, 38, 120, 1454, 489, 672, 149, 534, 1081, 1721, 586, 330, 25, 356, 1743, 1607, 336, 981, 419, 1036, 1293, 1026, 1300, 1453, 792, 22, 45, 420, 409, 1027, 1437, 1421, 795, 136, 1276, 1610, 1593]; var index = 0; function check() { if (index == decisions.length) throw 'HALT'; return decisions[index++] } -switch (the_var) { -default: { -} -} -L1: while(1) { - print(30); state = check();// ................................................................................................................................................................................................................. - switch (the_var) { - state % 3 == 0 { - break; - } - state % 3 == 1 { - label = 67; - break L1; - break; - } - default: { - break L1; - } - } - print(58); state = check();// ...................................................................................... - switch (the_var) { - default: { - } - } -} -if (label == 67) { - print(66); state = check();// ............................................................................................................... + print('entry'); var label; var state; var decisions = [759, 1223, 618, 1805, 277, 512, 204, 1545, 606, 734, 585, 447, 1670, 1031, 665, 1728, 353, 634, 1033, 13, 658, 589, 474, 854, 405, 1111, 1640, 697, 1156, 1357, 317, 618, 990, 1401, 405, 564, 497, 829, 653, 1194, 25, 322, 1178, 198, 1565, 1419, 1608, 486, 368, 606, 813, 22, 148, 141, 261, 375, 472, 964, 1106, 694, 205, 771, 44, 675, 545, 1027, 1528, 240, 1289, 564, 792, 744, 366, 668, 823, 210, 428, 1009, 1662, 1317, 1183, 681, 14, 1334, 712, 506, 224, 695, 401, 1035, 384, 486, 1519, 122, 1186, 1487, 1819, 1702, 463, 1706, 660, 1642, 847, 991, 976, 940, 867, 46, 23, 1449, 56, 1711, 634, 404, 1558, 168, 710, 1581, 1302, 870, 997, 1295, 1739, 769, 1005, 291, 1638, 1771, 842, 659, 1695, 713, 935, 802, 1173, 1572, 850, 607, 996, 55, 1576, 321, 1815, 662, 1044, 1612, 1680, 1050, 844, 553, 278, 1447, 1662, 1094, 1797, 774, 1013, 1204, 907, 340, 1172, 1460, 869, 1264, 111, 1176, 484, 845, 258, 417, 1246, 1017, 745, 189, 333, 1658, 1395, 1764, 1786, 165, 404, 847, 1429, 1574, 403, 718, 1118, 1756, 94, 56, 1498, 1696, 1355, 840, 50, 82, 371, 1087, 875, 1337, 267, 958, 1209, 1167, 1025, 1684, 184, 962, 1496, 201, 127, 372, 1, 1005, 402, 1387, 213, 1143, 1271, 167, 10, 12, 1060, 1390, 1366, 893, 747, 1005, 481, 876, 227, 514, 589, 250, 273, 1188, 1052, 719, 219, 1006, 38, 120, 1454, 489, 672, 149, 534, 1081, 1721, 586, 330, 25, 356, 1743, 1607, 336, 981, 419, 1036, 1293, 1026, 1300, 1453, 792, 22, 45, 420, 409, 1027, 1437, 1421, 795, 136, 1276, 1610, 1593]; var index = 0; function check() { if (index == decisions.length) throw 'HALT'; return decisions[index++] } switch (the_var) { default: { } } -} -print(6); state = check();// ......... -switch (the_var) { -default: { -} -} -while(1) { - print(88); state = check();// .................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... - switch (the_var) { - default: { + L1: while(1) { + print(30); state = check();// ................................................................................................................................................................................................................. + switch (the_var) { + state % 3 == 0 { + break; + } + state % 3 == 1 { + label = 67; + break L1; + break; + } + default: { + break L1; + } + } + print(58); state = check();// ...................................................................................... + switch (the_var) { + default: { + } + } } + if (label == 67) { + print(66); state = check();// ............................................................................................................... + switch (the_var) { + default: { + } + } } - print(70); state = check();// .......................................................................................................................... + print(6); state = check();// ......... switch (the_var) { default: { } } - L10: while(1) { - print(47); state = check();// .................................................................................................................................... + while(1) { + print(88); state = check();// .................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... switch (the_var) { default: { } } - print(28); state = check();// .............................................................................................................. + print(70); state = check();// .......................................................................................................................... switch (the_var) { default: { } } - L13: while(1) { - print(75); state = check();// ............................................. + L10: while(1) { + print(47); state = check();// .................................................................................................................................... switch (the_var) { default: { } } - print(7); state = check();// ............................................................................................................................................................................................. + print(28); state = check();// .............................................................................................................. switch (the_var) { - state % 2 == 0 { - break; - } default: { - break L13; - } } - } - print(89); state = check();// ...................................................................................................................................................................................................................................................................................................................................................... - switch (the_var) { - default: { - } - } - print(68); state = check();// ...................................................................................................................................................................................................................................................................................................................... - switch (the_var) { - default: { - } - } - L18: while(1) { - print(51); state = check();// ............................................................................................. - switch (the_var) { - default: { } - } - L20: while(1) { - print(36); state = check();// ......................... + L13: while(1) { + print(75); state = check();// ............................................. switch (the_var) { - state % 2 == 0 { - break L20; - break; - } default: { } } - print(16); state = check();// ................................................................................................................................................................................................................................................................................................................................................................ + print(7); state = check();// ............................................................................................................................................................................................. switch (the_var) { - default: { - } + state % 2 == 0 { + break; } - print(57); state = check();// ........................................................................................................................................................................................................................................................................................................................... - switch (the_var) { default: { + break L13; } } - print(39); state = check();// ................ + } + print(89); state = check();// ...................................................................................................................................................................................................................................................................................................................................................... + switch (the_var) { + default: { + } + } + print(68); state = check();// ...................................................................................................................................................................................................................................................................................................................... + switch (the_var) { + default: { + } + } + L18: while(1) { + print(51); state = check();// ............................................................................................. switch (the_var) { - state % 3 == 0 { - break; - } - state % 3 == 1 { - label = 74; - break; - } default: { - label = 32; - break L20; } } - L25: while(1) { - if (label == 74) { - label = 0; - print(73); state = check();// . + L20: while(1) { + print(36); state = check();// ......................... + switch (the_var) { + state % 2 == 0 { + break L20; + break; + } + default: { + } + } + print(16); state = check();// ................................................................................................................................................................................................................................................................................................................................................................ + switch (the_var) { + default: { + } + } + print(57); state = check();// ........................................................................................................................................................................................................................................................................................................................... + switch (the_var) { + default: { + } + } + print(39); state = check();// ................ + switch (the_var) { + state % 3 == 0 { + break; + } + state % 3 == 1 { + label = 74; + break; + } + default: { + label = 32; + break L20; + } + } + L25: while(1) { + if (label == 74) { + label = 0; + print(73); state = check();// . + switch (the_var) { + state % 3 == 1 { + label = 32; + break L20; + break; + } + state % 3 == 0 { + break L25; + break; + } + default: { + } + } + print(43); state = check();// ......... + switch (the_var) { + default: { + } + } + print(32); state = check();// ...................................................................................................... + switch (the_var) { + default: { + } + } + print(83); state = check();// ........................................................................................ + switch (the_var) { + default: { + } + } + print(77); state = check();// ........................................................................................................................................................................................................................................................................................... + switch (the_var) { + default: { + } + } + print(76); state = check();// .............................................................................................................................................................................................................................................................................................................................................................................................................................. + switch (the_var) { + default: { + } + } + print(22); state = check();// ......................................................................................................... + switch (the_var) { + default: { + } + } + } + print(72); state = check();// .......................................................................................................... switch (the_var) { - state % 3 == 1 { - label = 32; + state % 2 == 0 { + label = 92; break L20; break; } - state % 3 == 0 { - break L25; + default: { + } + } + print(80); state = check();// .................................... + switch (the_var) { + state % 2 == 0 { + continue L18; break; } default: { } } - print(43); state = check();// ......... + print(50); state = check();// ........................................ switch (the_var) { default: { } } - print(32); state = check();// ...................................................................................................... + print(29); state = check();// ............... switch (the_var) { default: { } } - print(83); state = check();// ........................................................................................ + print(8); state = check();// .................................................................................................................................................................................................................................................... switch (the_var) { + state % 2 == 0 { + continue L10; + break; + } default: { } } - print(77); state = check();// ........................................................................................................................................................................................................................................................................................... + print(19); state = check();// ...................................................................................................................................................................................................................... switch (the_var) { default: { } } - print(76); state = check();// .............................................................................................................................................................................................................................................................................................................................................................................................................................. + print(56); state = check();// .................................................................................................................................................................................................................... switch (the_var) { default: { } } - print(22); state = check();// ......................................................................................................... + print(34); state = check();// .......................................................................................................................................... switch (the_var) { default: { + label = 74; } } } - print(72); state = check();// .......................................................................................................... - switch (the_var) { - state % 2 == 0 { - label = 92; - break L20; - break; - } - default: { - } - } - print(80); state = check();// .................................... - switch (the_var) { - state % 2 == 0 { - continue L18; - break; - } - default: { - } - } - print(50); state = check();// ........................................ - switch (the_var) { - default: { - } - } - print(29); state = check();// ............... - switch (the_var) { - default: { - } - } - print(8); state = check();// .................................................................................................................................................................................................................................................... + print(62); state = check();// ....................................................................................... switch (the_var) { - state % 2 == 0 { - continue L10; - break; - } default: { } } - print(19); state = check();// ...................................................................................................................................................................................................................... + } + if (label == 32) { + label = 0; + print(31); state = check();// .......................................................................................................................................................................................................... switch (the_var) { default: { } } - print(56); state = check();// .................................................................................................................................................................................................................... + } + else if (label == 92) { + label = 0; + print(91); state = check();// .............................................. switch (the_var) { default: { } } - print(34); state = check();// .......................................................................................................................................... + print(33); state = check();// .... switch (the_var) { default: { - label = 74; } } } - print(62); state = check();// ....................................................................................... + print(60); state = check();// ...................................................................................................................................................................................................................................... switch (the_var) { default: { } } - } - if (label == 32) { - label = 0; - print(31); state = check();// .......................................................................................................................................................................................................... + print(10); state = check();// ................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... switch (the_var) { default: { } } - } - else if (label == 92) { - label = 0; - print(91); state = check();// .............................................. + print(52); state = check();// .............................................................................. switch (the_var) { + state % 2 == 0 { + break L10; + break; + } default: { } } - print(33); state = check();// .... + print(2); state = check();// ......... switch (the_var) { default: { } } } - print(60); state = check();// ...................................................................................................................................................................................................................................... - switch (the_var) { - default: { - } - } - print(10); state = check();// ................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... - switch (the_var) { - default: { - } - } - print(52); state = check();// .............................................................................. - switch (the_var) { - state % 2 == 0 { - break L10; - break; - } - default: { - } - } - print(2); state = check();// ......... - switch (the_var) { - default: { - } - } + } + print(61); state = check();// ......................................................................................................................................................... + switch (the_var) { + default: { + } } } - print(61); state = check();// ......................................................................................................................................................... - switch (the_var) { - default: { - } - } -} diff --git a/src/relooper/test_inf.txt b/src/relooper/test_inf.txt index 6db32edb..2acadbfb 100644 --- a/src/relooper/test_inf.txt +++ b/src/relooper/test_inf.txt @@ -1,1072 +1,1039 @@ -code 0 -switch (the_var) { -uint(i4) >= uint(i5) { - code 2 + code 0 switch (the_var) { - default: { - } - } - break; -} -default: { - code 1 - switch (the_var) { - default: { - } - } -} -} -code 3 -L5: do { - switch (the_var) { - i2 == 0 { + uint(i4) >= uint(i5) { + code 2 + switch (the_var) { + default: { + } + } break; } default: { - code 4 + code 1 switch (the_var) { default: { } } - while(1) { - code 5 + } + } + code 3 + L5: do { + switch (the_var) { + i2 == 0 { + break; + } + default: { + code 4 switch (the_var) { - uint(i6) >= uint(i7) { - code 7 - switch (the_var) { - default: { - } - } - break; - } default: { - code 6 - switch (the_var) { - default: { - } - } } } - code 8 - switch (the_var) { - uint(i6) >= uint(i7) { - code 10 + while(1) { + code 5 switch (the_var) { + uint(i6) >= uint(i7) { + code 7 + switch (the_var) { + default: { + } + } + break; + } default: { + code 6 + switch (the_var) { + default: { + } + } } } - break; - } - default: { - code 9 + code 8 switch (the_var) { + uint(i6) >= uint(i7) { + code 10 + switch (the_var) { + default: { + } + } + break; + } default: { + code 9 + switch (the_var) { + default: { + } + } } } - } - } - code 11 - switch (the_var) { - uint(i5) >= uint(i6) { - code 13 + code 11 switch (the_var) { + uint(i5) >= uint(i6) { + code 13 + switch (the_var) { + default: { + } + } + break; + } default: { + code 12 + switch (the_var) { + default: { + } + } } } - break; - } - default: { - code 12 + code 14 switch (the_var) { + i2 != 0 { + break; + } default: { + break L5; } } } - } - code 14 - switch (the_var) { - i2 != 0 { - break; - } - default: { - break L5; - } - } } - } - } -} while(0); -code 15 -switch (the_var) { -uint(i4) >= uint(i5) { - code 17 - switch (the_var) { - default: { - } - } - break; -} -default: { - code 16 - switch (the_var) { - default: { - } - } -} -} -code 18 -L26: do { + } + } while(0); + code 15 switch (the_var) { - i2 == 0 { + uint(i4) >= uint(i5) { + code 17 + switch (the_var) { + default: { + } + } break; } default: { - code 19 + code 16 switch (the_var) { default: { } } - while(1) { - code 20 + } + } + code 18 + L26: do { + switch (the_var) { + i2 == 0 { + break; + } + default: { + code 19 switch (the_var) { - uint(i5) >= uint(i6) { - code 22 - switch (the_var) { - default: { - } - } - break; - } default: { - code 21 - switch (the_var) { - default: { - } - } } } - code 23 - switch (the_var) { - uint(i5) >= uint(i6) { - code 25 + while(1) { + code 20 switch (the_var) { - default: { + uint(i5) >= uint(i6) { + code 22 + switch (the_var) { + default: { + } + } + break; } - } - break; - } - default: { - code 24 - switch (the_var) { default: { + code 21 + switch (the_var) { + default: { + } + } } } - } - } - code 26 - switch (the_var) { - uint(i5) >= uint(i6) { - code 28 + code 23 switch (the_var) { - default: { - } + uint(i5) >= uint(i6) { + code 25 + switch (the_var) { + default: { + } + } + break; } - break; - } - default: { - code 27 - switch (the_var) { default: { + code 24 + switch (the_var) { + default: { + } + } } } - } - } - code 29 - switch (the_var) { - uint(i5) >= uint(i6) { - code 31 + code 26 switch (the_var) { - default: { - } + uint(i5) >= uint(i6) { + code 28 + switch (the_var) { + default: { + } + } + break; } - break; - } - default: { - code 30 - switch (the_var) { default: { + code 27 + switch (the_var) { + default: { + } + } } } - } - } - code 32 - switch (the_var) { - uint(i5) >= uint(i6) { - code 34 + code 29 switch (the_var) { - default: { - } + uint(i5) >= uint(i6) { + code 31 + switch (the_var) { + default: { + } + } + break; } - break; - } - default: { - code 33 - switch (the_var) { default: { + code 30 + switch (the_var) { + default: { + } + } } } - } - } - code 35 - switch (the_var) { - uint(i5) >= uint(i6) { - code 37 + code 32 switch (the_var) { - default: { + uint(i5) >= uint(i6) { + code 34 + switch (the_var) { + default: { + } + } + break; } - } - break; - } - default: { - code 36 - switch (the_var) { default: { + code 33 + switch (the_var) { + default: { + } + } } } - } - } - code 38 - switch (the_var) { - uint(i5) >= uint(i6) { - code 40 + code 35 switch (the_var) { - default: { + uint(i5) >= uint(i6) { + code 37 + switch (the_var) { + default: { + } + } + break; } - } - break; - } - default: { - code 39 - switch (the_var) { default: { + code 36 + switch (the_var) { + default: { + } + } } } - } - } - code 41 - switch (the_var) { - uint(i5) >= uint(i6) { - code 43 + code 38 switch (the_var) { - default: { - } + uint(i5) >= uint(i6) { + code 40 + switch (the_var) { + default: { + } + } + break; } - break; - } - default: { - code 42 - switch (the_var) { default: { + code 39 + switch (the_var) { + default: { + } + } } } - } - } - code 44 - switch (the_var) { - uint(i5) >= uint(i6) { - code 46 + code 41 switch (the_var) { - default: { - } + uint(i5) >= uint(i6) { + code 43 + switch (the_var) { + default: { + } + } + break; } - break; - } - default: { - code 45 - switch (the_var) { default: { + code 42 + switch (the_var) { + default: { + } + } } } - } - } - code 47 - switch (the_var) { - uint(i5) >= uint(i6) { - code 49 + code 44 switch (the_var) { - default: { + uint(i5) >= uint(i6) { + code 46 + switch (the_var) { + default: { + } + } + break; } - } - break; - } - default: { - code 48 - switch (the_var) { default: { + code 45 + switch (the_var) { + default: { + } + } } } - } - } - code 50 - switch (the_var) { - uint(i5) >= uint(i6) { - code 52 + code 47 switch (the_var) { - default: { + uint(i5) >= uint(i6) { + code 49 + switch (the_var) { + default: { + } + } + break; } - } - break; - } - default: { - code 51 - switch (the_var) { default: { + code 48 + switch (the_var) { + default: { + } + } } } - } - } - code 53 - switch (the_var) { - uint(i5) >= uint(i6) { - code 55 + code 50 switch (the_var) { - default: { - } + uint(i5) >= uint(i6) { + code 52 + switch (the_var) { + default: { + } + } + break; } - break; - } - default: { - code 54 - switch (the_var) { default: { + code 51 + switch (the_var) { + default: { + } + } } } - } - } - code 56 - switch (the_var) { - uint(i5) >= uint(i6) { - code 58 + code 53 switch (the_var) { - default: { - } + uint(i5) >= uint(i6) { + code 55 + switch (the_var) { + default: { + } + } + break; } - break; - } - default: { - code 57 - switch (the_var) { default: { + code 54 + switch (the_var) { + default: { + } + } } } - } - } - code 59 - switch (the_var) { - uint(i5) >= uint(i6) { - code 61 + code 56 switch (the_var) { - default: { + uint(i5) >= uint(i6) { + code 58 + switch (the_var) { + default: { + } + } + break; } - } - break; - } - default: { - code 60 - switch (the_var) { default: { + code 57 + switch (the_var) { + default: { + } + } } } - } - } - code 62 - switch (the_var) { - uint(i5) >= uint(i6) { - code 64 + code 59 switch (the_var) { - default: { + uint(i5) >= uint(i6) { + code 61 + switch (the_var) { + default: { + } + } + break; } - } - break; - } - default: { - code 63 - switch (the_var) { default: { + code 60 + switch (the_var) { + default: { + } + } } } - } - } - code 65 - switch (the_var) { - uint(i5) >= uint(i6) { - code 67 + code 62 switch (the_var) { - default: { - } + uint(i5) >= uint(i6) { + code 64 + switch (the_var) { + default: { + } + } + break; } - break; - } - default: { - code 66 - switch (the_var) { default: { + code 63 + switch (the_var) { + default: { + } + } } } - } - } - code 68 - switch (the_var) { - uint(i5) >= uint(i6) { - code 70 + code 65 switch (the_var) { - default: { - } + uint(i5) >= uint(i6) { + code 67 + switch (the_var) { + default: { + } + } + break; } - break; - } - default: { - code 69 - switch (the_var) { default: { + code 66 + switch (the_var) { + default: { + } + } } } - } - } - code 71 - switch (the_var) { - uint(i5) >= uint(i6) { - code 73 + code 68 switch (the_var) { - default: { + uint(i5) >= uint(i6) { + code 70 + switch (the_var) { + default: { + } + } + break; } - } - break; - } - default: { - code 72 - switch (the_var) { default: { + code 69 + switch (the_var) { + default: { + } + } } } - } - } - code 74 - switch (the_var) { - uint(i5) >= uint(i6) { - code 76 + code 71 switch (the_var) { - default: { + uint(i5) >= uint(i6) { + code 73 + switch (the_var) { + default: { + } + } + break; } - } - break; - } - default: { - code 75 - switch (the_var) { default: { + code 72 + switch (the_var) { + default: { + } + } } } - } - } - code 77 - switch (the_var) { - uint(i5) >= uint(i6) { - code 79 + code 74 switch (the_var) { - default: { - } + uint(i5) >= uint(i6) { + code 76 + switch (the_var) { + default: { + } + } + break; } - break; - } - default: { - code 78 - switch (the_var) { default: { + code 75 + switch (the_var) { + default: { + } + } } } - } - } - code 80 - switch (the_var) { - uint(i5) >= uint(i6) { - code 82 + code 77 switch (the_var) { - default: { - } + uint(i5) >= uint(i6) { + code 79 + switch (the_var) { + default: { + } + } + break; } - break; - } - default: { - code 81 - switch (the_var) { default: { + code 78 + switch (the_var) { + default: { + } + } } } - } - } - code 83 - switch (the_var) { - uint(i5) >= uint(i6) { - code 85 + code 80 switch (the_var) { - default: { - } + uint(i5) >= uint(i6) { + code 82 + switch (the_var) { + default: { + } + } + break; } - break; - } - default: { - code 84 - switch (the_var) { default: { + code 81 + switch (the_var) { + default: { + } + } } } - } - } - code 86 - switch (the_var) { - uint(i5) >= uint(i6) { - code 88 + code 83 switch (the_var) { - default: { + uint(i5) >= uint(i6) { + code 85 + switch (the_var) { + default: { + } + } + break; } - } - break; - } - default: { - code 87 - switch (the_var) { default: { + code 84 + switch (the_var) { + default: { + } + } } } - } - } - code 89 - switch (the_var) { - uint(i5) >= uint(i6) { - code 91 + code 86 switch (the_var) { - default: { + uint(i5) >= uint(i6) { + code 88 + switch (the_var) { + default: { + } + } + break; } - } - break; - } - default: { - code 90 - switch (the_var) { default: { + code 87 + switch (the_var) { + default: { + } + } } } - } - } - code 92 - switch (the_var) { - uint(i5) >= uint(i6) { - code 94 + code 89 switch (the_var) { - default: { + uint(i5) >= uint(i6) { + code 91 + switch (the_var) { + default: { + } + } + break; } - } - break; - } - default: { - code 93 - switch (the_var) { default: { + code 90 + switch (the_var) { + default: { + } + } } } - } - } - code 95 - switch (the_var) { - uint(i5) >= uint(i6) { - code 97 + code 92 switch (the_var) { + uint(i5) >= uint(i6) { + code 94 + switch (the_var) { + default: { + } + } + break; + } default: { + code 93 + switch (the_var) { + default: { + } + } } } - break; - } - default: { - code 96 + code 95 switch (the_var) { + uint(i5) >= uint(i6) { + code 97 + switch (the_var) { + default: { + } + } + break; + } default: { + code 96 + switch (the_var) { + default: { + } + } } } - } - } - code 98 - switch (the_var) { - uint(i5) >= uint(i6) { - code 100 + code 98 switch (the_var) { + uint(i5) >= uint(i6) { + code 100 + switch (the_var) { + default: { + } + } + break; + } default: { + code 99 + switch (the_var) { + default: { + } + } } } - break; - } - default: { - code 99 + code 101 switch (the_var) { + i2 != 0 { + break; + } default: { + break L26; } } } - } - code 101 - switch (the_var) { - i2 != 0 { - break; - } - default: { - break L26; - } - } } - } - } -} while(0); -code 102 -switch (the_var) { -uint(i4) >= uint(i5) { - code 104 - switch (the_var) { - default: { - } - } - break; -} -default: { - code 103 - switch (the_var) { - default: { - } - } -} -} -code 105 -L143: do { + } + } while(0); + code 102 switch (the_var) { - i2 == 0 { + uint(i4) >= uint(i5) { + code 104 + switch (the_var) { + default: { + } + } break; } default: { - code 106 + code 103 switch (the_var) { default: { } } - while(1) { - code 107 + } + } + code 105 + L143: do { + switch (the_var) { + i2 == 0 { + break; + } + default: { + code 106 switch (the_var) { - uint(i5) >= uint(i6) { - code 109 - switch (the_var) { - default: { - } - } - break; - } default: { - code 108 - switch (the_var) { - default: { - } - } } } - code 110 - switch (the_var) { - uint(i5) >= uint(i6) { - code 112 + while(1) { + code 107 switch (the_var) { - default: { + uint(i5) >= uint(i6) { + code 109 + switch (the_var) { + default: { + } + } + break; } - } - break; - } - default: { - code 111 - switch (the_var) { default: { + code 108 + switch (the_var) { + default: { + } + } } } - } - } - code 113 - switch (the_var) { - uint(i5) >= uint(i6) { - code 115 + code 110 switch (the_var) { - default: { - } + uint(i5) >= uint(i6) { + code 112 + switch (the_var) { + default: { + } + } + break; } - break; - } - default: { - code 114 - switch (the_var) { default: { + code 111 + switch (the_var) { + default: { + } + } } } - } - } - code 116 - switch (the_var) { - uint(i5) >= uint(i6) { - code 118 + code 113 switch (the_var) { - default: { - } + uint(i5) >= uint(i6) { + code 115 + switch (the_var) { + default: { + } + } + break; } - break; - } - default: { - code 117 - switch (the_var) { default: { + code 114 + switch (the_var) { + default: { + } + } } } - } - } - code 119 - switch (the_var) { - uint(i5) >= uint(i6) { - code 121 + code 116 switch (the_var) { - default: { + uint(i5) >= uint(i6) { + code 118 + switch (the_var) { + default: { + } + } + break; } - } - break; - } - default: { - code 120 - switch (the_var) { default: { + code 117 + switch (the_var) { + default: { + } + } } } - } - } - code 122 - switch (the_var) { - uint(i5) >= uint(i6) { - code 124 + code 119 switch (the_var) { - default: { + uint(i5) >= uint(i6) { + code 121 + switch (the_var) { + default: { + } + } + break; } - } - break; - } - default: { - code 123 - switch (the_var) { default: { + code 120 + switch (the_var) { + default: { + } + } } } - } - } - code 125 - switch (the_var) { - uint(i5) >= uint(i6) { - code 127 + code 122 switch (the_var) { - default: { - } + uint(i5) >= uint(i6) { + code 124 + switch (the_var) { + default: { + } + } + break; } - break; - } - default: { - code 126 - switch (the_var) { default: { + code 123 + switch (the_var) { + default: { + } + } } } - } - } - code 128 - switch (the_var) { - uint(i5) >= uint(i6) { - code 130 + code 125 switch (the_var) { - default: { - } + uint(i5) >= uint(i6) { + code 127 + switch (the_var) { + default: { + } + } + break; } - break; - } - default: { - code 129 - switch (the_var) { default: { + code 126 + switch (the_var) { + default: { + } + } } } - } - } - code 131 - switch (the_var) { - uint(i5) >= uint(i6) { - code 133 + code 128 switch (the_var) { - default: { + uint(i5) >= uint(i6) { + code 130 + switch (the_var) { + default: { + } + } + break; } - } - break; - } - default: { - code 132 - switch (the_var) { default: { + code 129 + switch (the_var) { + default: { + } + } } } - } - } - code 134 - switch (the_var) { - uint(i5) >= uint(i6) { - code 136 + code 131 switch (the_var) { - default: { + uint(i5) >= uint(i6) { + code 133 + switch (the_var) { + default: { + } + } + break; } - } - break; - } - default: { - code 135 - switch (the_var) { default: { + code 132 + switch (the_var) { + default: { + } + } } } - } - } - code 137 - switch (the_var) { - uint(i5) >= uint(i6) { - code 139 + code 134 switch (the_var) { - default: { + uint(i5) >= uint(i6) { + code 136 + switch (the_var) { + default: { + } + } + break; } - } - break; - } - default: { - code 138 - switch (the_var) { default: { + code 135 + switch (the_var) { + default: { + } + } } } - } - } - code 140 - switch (the_var) { - uint(i5) >= uint(i6) { - code 142 + code 137 switch (the_var) { - default: { + uint(i5) >= uint(i6) { + code 139 + switch (the_var) { + default: { + } + } + break; } - } - break; - } - default: { - code 141 - switch (the_var) { default: { + code 138 + switch (the_var) { + default: { + } + } } } - } - } - code 143 - switch (the_var) { - uint(i5) >= uint(i6) { - code 145 + code 140 switch (the_var) { - default: { - } + uint(i5) >= uint(i6) { + code 142 + switch (the_var) { + default: { + } + } + break; } - break; - } - default: { - code 144 - switch (the_var) { default: { + code 141 + switch (the_var) { + default: { + } + } } } - } - } - code 146 - switch (the_var) { - uint(i5) >= uint(i6) { - code 148 + code 143 switch (the_var) { - default: { - } + uint(i5) >= uint(i6) { + code 145 + switch (the_var) { + default: { + } + } + break; } - break; - } - default: { - code 147 - switch (the_var) { default: { + code 144 + switch (the_var) { + default: { + } + } } } - } - } - code 149 - switch (the_var) { - uint(i5) >= uint(i6) { - code 151 + code 146 switch (the_var) { - default: { - } + uint(i5) >= uint(i6) { + code 148 + switch (the_var) { + default: { + } + } + break; } - break; - } - default: { - code 150 - switch (the_var) { default: { + code 147 + switch (the_var) { + default: { + } + } } } - } - } - code 152 - switch (the_var) { - uint(i5) >= uint(i6) { - code 154 + code 149 switch (the_var) { - default: { + uint(i5) >= uint(i6) { + code 151 + switch (the_var) { + default: { + } + } + break; } - } - break; - } - default: { - code 153 - switch (the_var) { default: { + code 150 + switch (the_var) { + default: { + } + } } } - } - } - code 155 - switch (the_var) { - uint(i5) >= uint(i6) { - code 157 + code 152 switch (the_var) { - default: { + uint(i5) >= uint(i6) { + code 154 + switch (the_var) { + default: { + } + } + break; } - } - break; - } - default: { - code 156 - switch (the_var) { default: { + code 153 + switch (the_var) { + default: { + } + } } } - } - } - code 158 - switch (the_var) { - uint(i5) >= uint(i6) { - code 160 + code 155 switch (the_var) { - default: { - } + uint(i5) >= uint(i6) { + code 157 + switch (the_var) { + default: { + } + } + break; } - break; - } - default: { - code 159 - switch (the_var) { default: { + code 156 + switch (the_var) { + default: { + } + } } } - } - } - code 161 - switch (the_var) { - uint(i5) >= uint(i6) { - code 163 + code 158 switch (the_var) { + uint(i5) >= uint(i6) { + code 160 + switch (the_var) { + default: { + } + } + break; + } default: { + code 159 + switch (the_var) { + default: { + } + } } } - break; - } - default: { - code 162 + code 161 switch (the_var) { + uint(i5) >= uint(i6) { + code 163 + switch (the_var) { + default: { + } + } + break; + } default: { + code 162 + switch (the_var) { + default: { + } + } } } - } - } - code 164 - switch (the_var) { - uint(i5) >= uint(i6) { - code 166 + code 164 switch (the_var) { + uint(i5) >= uint(i6) { + code 166 + switch (the_var) { + default: { + } + } + break; + } default: { + code 165 + switch (the_var) { + default: { + } + } } } - break; - } - default: { - code 165 + code 167 switch (the_var) { + i2 != 0 { + break; + } default: { + break L143; } } } - } - code 167 - switch (the_var) { - i2 != 0 { - break; - } - default: { - break L143; - } - } } - } - } -} while(0); -code 168 -switch (the_var) { -uint(i4) >= uint(i5) { - code 170 - switch (the_var) { - default: { - } - } - break; -} -default: { - code 169 - switch (the_var) { - default: { - } - } -} -} -code 171 -switch (the_var) { -i2 == 0 { - code 183 - break; -} -default: { -} -} -code 172 -switch (the_var) { -default: { -} -} -L235: while(1) { - code 173 + } + } while(0); + code 168 switch (the_var) { - uint(i5) >= uint(i6) { - code 175 + uint(i4) >= uint(i5) { + code 170 switch (the_var) { default: { } @@ -1074,58 +1041,91 @@ L235: while(1) { break; } default: { - code 174 + code 169 switch (the_var) { default: { } } } } - code 176 + code 171 + switch (the_var) { + i2 == 0 { + code 183 + break; + } + default: { + } + } + code 172 switch (the_var) { - uint(i5) >= uint(i6) { - code 178 + default: { + } + } + L235: while(1) { + code 173 switch (the_var) { + uint(i5) >= uint(i6) { + code 175 + switch (the_var) { + default: { + } + } + break; + } default: { + code 174 + switch (the_var) { + default: { + } + } } } - break; - } - default: { - code 177 + code 176 switch (the_var) { + uint(i5) >= uint(i6) { + code 178 + switch (the_var) { + default: { + } + } + break; + } default: { + code 177 + switch (the_var) { + default: { + } + } } } - } - } - code 179 - switch (the_var) { - uint(i4) >= uint(i5) { - code 181 + code 179 switch (the_var) { + uint(i4) >= uint(i5) { + code 181 + switch (the_var) { + default: { + } + } + break; + } default: { + code 180 + switch (the_var) { + default: { + } + } } } - break; - } - default: { - code 180 + code 182 switch (the_var) { + i2 != 0 { + break; + } default: { + break L235; } } } - } - code 182 - switch (the_var) { - i2 != 0 { - break; - } - default: { - break L235; - } - } -} -code 183 + code 183 diff --git a/src/relooper/testit.sh b/src/relooper/testit.sh index 88db35fb..6e984b5a 100755 --- a/src/relooper/testit.sh +++ b/src/relooper/testit.sh @@ -2,61 +2,61 @@ echo "test" ./test &> test.out -diff -U 5 test.txt test.out +diff -w -U 5 test.txt test.out echo "test 2" ./test2 &> test2.out -diff -U 5 test2.txt test2.out +diff -w -U 5 test2.txt test2.out echo "test 3" ./test3 &> test3.out -diff -U 5 test3.txt test3.out +diff -w -U 5 test3.txt test3.out echo "test debug" ./test_debug &> test_debug.out -diff -U 5 test_debug.txt test_debug.out +diff -w -U 5 test_debug.txt test_debug.out echo "test dead" ./test_dead &> test_dead.out -diff -U 5 test_dead.txt test_dead.out +diff -w -U 5 test_dead.txt test_dead.out echo "test 4" ./test4 &> test4.out -diff -U 5 test4.txt test4.out +diff -w -U 5 test4.txt test4.out echo "test 5" ./test5 &> test5.out -diff -U 5 test5.txt test5.out +diff -w -U 5 test5.txt test5.out echo "test 6" ./test6 &> test6.out -diff -U 5 test6.txt test6.out +diff -w -U 5 test6.txt test6.out echo "test inf" ./test_inf &> test_inf.out -diff -U 5 test_inf.txt test_inf.out +diff -w -U 5 test_inf.txt test_inf.out echo "test fuzz1" ./test_fuzz1 &> test_fuzz1.out -diff -U 5 test_fuzz1.txt test_fuzz1.out +diff -w -U 5 test_fuzz1.txt test_fuzz1.out echo "test fuzz2" ./test_fuzz2 &> test_fuzz2.out -diff -U 5 test_fuzz2.txt test_fuzz2.out +diff -w -U 5 test_fuzz2.txt test_fuzz2.out echo "test fuzz3" ./test_fuzz3 &> test_fuzz3.out -diff -U 5 test_fuzz3.txt test_fuzz3.out +diff -w -U 5 test_fuzz3.txt test_fuzz3.out echo "test fuzz4" ./test_fuzz4 &> test_fuzz4.out -diff -U 5 test_fuzz4.txt test_fuzz4.out +diff -w -U 5 test_fuzz4.txt test_fuzz4.out echo "test fuzz5" ./test_fuzz5 &> test_fuzz5.out -diff -U 5 test_fuzz5.txt test_fuzz5.out +diff -w -U 5 test_fuzz5.txt test_fuzz5.out echo "test fuzz6" ./test_fuzz6 &> test_fuzz6.out -diff -U 5 test_fuzz6.txt test_fuzz6.out +diff -w -U 5 test_fuzz6.txt test_fuzz6.out diff --git a/system/include/emscripten/emscripten.h b/system/include/emscripten/emscripten.h index ddcbc43a..b6e6307b 100644 --- a/system/include/emscripten/emscripten.h +++ b/system/include/emscripten/emscripten.h @@ -447,6 +447,70 @@ void emscripten_asm_const(const char *code); int emscripten_asm_const_int(const char *code, ...); double emscripten_asm_const_double(const char *code, ...); +/* If specified, logs directly to the browser console/inspector + * window. If not specified, logs via the application Module. */ +#define EM_LOG_CONSOLE 1 +/* If specified, prints a warning message. */ +#define EM_LOG_WARN 2 +/* If specified, prints an error message. If neither EM_LOG_WARN + * or EM_LOG_ERROR is specified, an info message is printed. + * EM_LOG_WARN and EM_LOG_ERROR are mutually exclusive. */ +#define EM_LOG_ERROR 4 +/* If specified, prints a callstack that contains filenames referring + * to original C sources using source map information. */ +#define EM_LOG_C_STACK 8 +/* If specified, prints a callstack that contains filenames referring + * to lines to the built .js/.html file along with the message. The + * flags EM_LOG_C_STACK and EM_LOG_JS_STACK can be combined to output + * both untranslated and translated file+line information. */ +#define EM_LOG_JS_STACK 16 +/* If specified, C/C++ function names are demangled before printing. + * Otherwise, the mangled post-compilation JS function names are + * displayed. */ +#define EM_LOG_DEMANGLE 32 +/* If specified, the pathnames of the file information in the call + * stack will be omitted. */ +#define EM_LOG_NO_PATHS 64 +/* If specified, prints out the actual values of the parameters the + * functions were invoked with. */ +#define EM_LOG_FUNC_PARAMS 128 + +/* + * Prints out a message to the console, optionally with the + * callstack information. + * @param flags A binary OR of items from the list of EM_LOG_xxx + * flags that specify printing options. + * @param '...' A printf-style "format, ..." parameter list that + * is parsed according to the printf formatting rules. + */ +void emscripten_log(int flags, ...); + +/* + * Programmatically obtains the current callstack. + * @param flags A binary OR of items from the list of EM_LOG_xxx + * flags that specify printing options. The + * items EM_LOG_CONSOLE, EM_LOG_WARN and + * EM_LOG_ERROR do not apply in this function and + * are ignored. + * @param out A pointer to a memory region where the callstack + * string will be written to. The string outputted + * by this function will always be null-terminated. + * @param maxbytes The maximum number of bytes that this function can + * write to the memory pointed to by 'out'. If + * there is no enough space, the output will be + * truncated (but always null-terminated). + * @return Returns the number of bytes written. (not number of + * characters, so this will also include the terminating zero) + + * To query the amount of bytes needed for a callstack without writing + * it, pass 0 to 'out' and 'maxbytes', in which case the function will + * return the number of bytes (including the terminating zero) that + * will be needed to hold the full callstack. Note that this might be + * fully accurate since subsequent calls will carry different line + * numbers, so it is best to allocate a few bytes extra to be safe. + */ +int emscripten_get_callstack(int flags, char *out, int maxbytes); + #ifdef __cplusplus } #endif diff --git a/tests/cases/longjmp_tiny_invoke_phi.ll b/tests/cases/longjmp_tiny_invoke_phi.ll new file mode 100644 index 00000000..30c43339 --- /dev/null +++ b/tests/cases/longjmp_tiny_invoke_phi.ll @@ -0,0 +1,46 @@ +; ModuleID = '/tmp/emscripten_temp/src.cpp.o' +target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32-n8:16:32-S128" +target triple = "i386-pc-linux-gnu" + +@_ZL3buf = internal global [20 x i16] zeroinitializer, align 2 +@.str = private unnamed_addr constant [13 x i8] c"hello world\0A\00", align 1 +@.str1 = private unnamed_addr constant [6 x i8] c"more\0A\00", align 1 +@.str2 = private unnamed_addr constant [6 x i8] c"fair\0A\00", align 1 + +define i32 @main() { +entry: + %retval = alloca i32, align 4 + store i32 0, i32* %retval + %call = invoke i32 @setjmp(i16* getelementptr inbounds ([20 x i16]* @_ZL3buf, i32 0, i32 0)) returns_twice + to label %allgood unwind label %awful + +allgood: + %p = phi i32 [0, %entry], [1, %if.else] + %calll = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([6 x i8]* @.str2, i32 0, i32 0)) + %total = add i32 %p, %call + %tobool = icmp ne i32 %total, 10 + br i1 %tobool, label %if.then, label %if.else + +if.then: ; preds = %entry + %call1 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([13 x i8]* @.str, i32 0, i32 0)) + call void @longjmp(i16* getelementptr inbounds ([20 x i16]* @_ZL3buf, i32 0, i32 0), i32 10) + br label %if.end + +if.else: ; preds = %entry + %call2 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([6 x i8]* @.str1, i32 0, i32 0)) + %chak = icmp ne i32 %call2, 1337 + br i1 %chak, label %if.end, label %allgood + +if.end: ; preds = %if.else, %if.then + ret i32 0 + +awful: + ret i32 1 +} + +declare i32 @setjmp(i16*) returns_twice + +declare i32 @printf(i8*, ...) + +declare void @longjmp(i16*, i32) + diff --git a/tests/cases/longjmp_tiny_invoke_phi.txt b/tests/cases/longjmp_tiny_invoke_phi.txt new file mode 100644 index 00000000..aaa41d11 --- /dev/null +++ b/tests/cases/longjmp_tiny_invoke_phi.txt @@ -0,0 +1,4 @@ +fair +hello world +fair +more diff --git a/tests/cases/phientryimplicit.ll b/tests/cases/phientryimplicit.ll index b7b17add..c237457c 100644 --- a/tests/cases/phientryimplicit.ll +++ b/tests/cases/phientryimplicit.ll @@ -17,7 +17,7 @@ L17: br label %L26 L26: - %a27 = phi i1 [ false, %1 ], [ %25, %L17 ] ; [#uses=1 type=i1] + %a27 = phi i1 [ false, %1 ], [ %a25, %L17 ] ; [#uses=1 type=i1] store i32 0, i32* %retval %call = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([15 x i8]* @.str, i32 0, i32 0)) ; [#uses=0 type=i32] %cal2 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([15 x i8]* @.str, i32 0, i32 0), i1 %a27) ; make sure %27 is used @@ -34,7 +34,7 @@ L17: br label %L26 L26: - %a27 = phi i1 [ false, %0 ], [ %25, %L17 ] ; [#uses=1 type=i1] + %a27 = phi i1 [ false, %0 ], [ %a25, %L17 ] ; [#uses=1 type=i1] store i32 0, i32* %retval %call = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([15 x i8]* @.str, i32 0, i32 0)) ; [#uses=0 type=i32] %cal2 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([15 x i8]* @.str, i32 0, i32 0), i1 %a27) ; make sure %27 is used diff --git a/tests/core/closebitcasts.c b/tests/core/closebitcasts.c new file mode 100644 index 00000000..2c9d5ab5 --- /dev/null +++ b/tests/core/closebitcasts.c @@ -0,0 +1,32 @@ +#include <stdio.h> + +int main(int argc, char **argv) { + float x = argc%17, y = (argc+1)*(argc+2)*(argc+3)*(argc+4)*(argc*5); + y *= 1<<30; + y *= -13; + if (argc == 17) { x++; y--; } + int *xi = (int*)&x; + int *yi = (int*)&y; + int z = *xi - *yi; + while (z % 15) { + z++; + } + printf("!%d\n", z); + + double xd = x, yd = y; + yd = yd*yd; + yd = yd*yd; + int *xl = (int*)&xd; + int *xh = &((int*)&xd)[1]; + int *yl = (int*)&yd; + int *yh = &((int*)&yd)[1]; + int l = *xl - *yl; + int h = *xh - *yh; + while (l % 15) { + l++; + h += 3; + } + printf("%d,%d!\n", l, h); + return 0; +} + diff --git a/tests/core/closebitcasts.txt b/tests/core/closebitcasts.txt new file mode 100644 index 00000000..f97366cd --- /dev/null +++ b/tests/core/closebitcasts.txt @@ -0,0 +1,2 @@ +!1787576325 +589815810,-179981561! diff --git a/tests/core/test_indirectbr_many.in b/tests/core/test_indirectbr_many.in index 769c331f..7937d197 100644 --- a/tests/core/test_indirectbr_many.in +++ b/tests/core/test_indirectbr_many.in @@ -1,1510 +1,44 @@ +#include <stdio.h> - #include <stdio.h> - int main(int argc, char **argv) { - printf("\n"); - const void *addrs[] = { &&B0, &&B1, &&B2, &&B3, &&B4, &&B5, &&B6, &&B7, &&B8, &&B9, &&B10, &&B11, &&B12, &&B13, &&B14, &&B15, &&B16, &&B17, &&B18, &&B19, &&B20, &&B21, &&B22, &&B23, &&B24, &&B25, &&B26, &&B27, &&B28, &&B29, &&B30, &&B31, &&B32, &&B33, &&B34, &&B35, &&B36, &&B37, &&B38, &&B39, &&B40, &&B41, &&B42, &&B43, &&B44, &&B45, &&B46, &&B47, &&B48, &&B49, &&B50, &&B51, &&B52, &&B53, &&B54, &&B55, &&B56, &&B57, &&B58, &&B59, &&B60, &&B61, &&B62, &&B63, &&B64, &&B65, &&B66, &&B67, &&B68, &&B69, &&B70, &&B71, &&B72, &&B73, &&B74, &&B75, &&B76, &&B77, &&B78, &&B79, &&B80, &&B81, &&B82, &&B83, &&B84, &&B85, &&B86, &&B87, &&B88, &&B89, &&B90, &&B91, &&B92, &&B93, &&B94, &&B95, &&B96, &&B97, &&B98, &&B99, &&B100, &&B101, &&B102, &&B103, &&B104, &&B105, &&B106, &&B107, &&B108, &&B109, &&B110, &&B111, &&B112, &&B113, &&B114, &&B115, &&B116, &&B117, &&B118, &&B119, &&B120, &&B121, &&B122, &&B123, &&B124, &&B125, &&B126, &&B127, &&B128, &&B129, &&B130, &&B131, &&B132, &&B133, &&B134, &&B135, &&B136, &&B137, &&B138, &&B139, &&B140, &&B141, &&B142, &&B143, &&B144, &&B145, &&B146, &&B147, &&B148, &&B149, &&B150, &&B151, &&B152, &&B153, &&B154, &&B155, &&B156, &&B157, &&B158, &&B159, &&B160, &&B161, &&B162, &&B163, &&B164, &&B165, &&B166, &&B167, &&B168, &&B169, &&B170, &&B171, &&B172, &&B173, &&B174, &&B175, &&B176, &&B177, &&B178, &&B179, &&B180, &&B181, &&B182, &&B183, &&B184, &&B185, &&B186, &&B187, &&B188, &&B189, &&B190, &&B191, &&B192, &&B193, &&B194, &&B195, &&B196, &&B197, &&B198, &&B199, &&B200, &&B201, &&B202, &&B203, &&B204, &&B205, &&B206, &&B207, &&B208, &&B209, &&B210, &&B211, &&B212, &&B213, &&B214, &&B215, &&B216, &&B217, &&B218, &&B219, &&B220, &&B221, &&B222, &&B223, &&B224, &&B225, &&B226, &&B227, &&B228, &&B229, &&B230, &&B231, &&B232, &&B233, &&B234, &&B235, &&B236, &&B237, &&B238, &&B239, &&B240, &&B241, &&B242, &&B243, &&B244, &&B245, &&B246, &&B247, &&B248, &&B249, &&B250, &&B251, &&B252, &&B253, &&B254, &&B255, &&B256, &&B257, &&B258, &&B259, &&B260, &&B261, &&B262, &&B263, &&B264, &&B265, &&B266, &&B267, &&B268, &&B269, &&B270, &&B271, &&B272, &&B273, &&B274, &&B275, &&B276, &&B277, &&B278, &&B279, &&B280, &&B281, &&B282, &&B283, &&B284, &&B285, &&B286, &&B287, &&B288, &&B289, &&B290, &&B291, &&B292, &&B293, &&B294, &&B295, &&B296, &&B297, &&B298, &&B299, &&B300, &&B301, &&B302, &&B303, &&B304, &&B305, &&B306, &&B307, &&B308, &&B309, &&B310, &&B311, &&B312, &&B313, &&B314, &&B315, &&B316, &&B317, &&B318, &&B319, &&B320, &&B321, &&B322, &&B323, &&B324, &&B325, &&B326, &&B327, &&B328, &&B329, &&B330, &&B331, &&B332, &&B333, &&B334, &&B335, &&B336, &&B337, &&B338, &&B339, &&B340, &&B341, &&B342, &&B343, &&B344, &&B345, &&B346, &&B347, &&B348, &&B349, &&B350, &&B351, &&B352, &&B353, &&B354, &&B355, &&B356, &&B357, &&B358, &&B359, &&B360, &&B361, &&B362, &&B363, &&B364, &&B365, &&B366, &&B367, &&B368, &&B369, &&B370, &&B371, &&B372, &&B373, &&B374, &&B375, &&B376, &&B377, &&B378, &&B379, &&B380, &&B381, &&B382, &&B383, &&B384, &&B385, &&B386, &&B387, &&B388, &&B389, &&B390, &&B391, &&B392, &&B393, &&B394, &&B395, &&B396, &&B397, &&B398, &&B399, &&B400, &&B401, &&B402, &&B403, &&B404, &&B405, &&B406, &&B407, &&B408, &&B409, &&B410, &&B411, &&B412, &&B413, &&B414, &&B415, &&B416, &&B417, &&B418, &&B419, &&B420, &&B421, &&B422, &&B423, &&B424, &&B425, &&B426, &&B427, &&B428, &&B429, &&B430, &&B431, &&B432, &&B433, &&B434, &&B435, &&B436, &&B437, &&B438, &&B439, &&B440, &&B441, &&B442, &&B443, &&B444, &&B445, &&B446, &&B447, &&B448, &&B449, &&B450, &&B451, &&B452, &&B453, &&B454, &&B455, &&B456, &&B457, &&B458, &&B459, &&B460, &&B461, &&B462, &&B463, &&B464, &&B465, &&B466, &&B467, &&B468, &&B469, &&B470, &&B471, &&B472, &&B473, &&B474, &&B475, &&B476, &&B477, &&B478, &&B479, &&B480, &&B481, &&B482, &&B483, &&B484, &&B485, &&B486, &&B487, &&B488, &&B489, &&B490, &&B491, &&B492, &&B493, &&B494, &&B495, &&B496, &&B497, &&B498, &&B499, &&B500, &&B501, &&B502, &&B503, &&B504, &&B505, &&B506, &&B507, &&B508, &&B509, &&B510, &&B511, &&B512, &&B513, &&B514, &&B515, &&B516, &&B517, &&B518, &&B519, &&B520, &&B521, &&B522, &&B523, &&B524, &&B525, &&B526, &&B527, &&B528, &&B529, &&B530, &&B531, &&B532, &&B533, &&B534, &&B535, &&B536, &&B537, &&B538, &&B539, &&B540, &&B541, &&B542, &&B543, &&B544, &&B545, &&B546, &&B547, &&B548, &&B549, &&B550, &&B551, &&B552, &&B553, &&B554, &&B555, &&B556, &&B557, &&B558, &&B559, &&B560, &&B561, &&B562, &&B563, &&B564, &&B565, &&B566, &&B567, &&B568, &&B569, &&B570, &&B571, &&B572, &&B573, &&B574, &&B575, &&B576, &&B577, &&B578, &&B579, &&B580, &&B581, &&B582, &&B583, &&B584, &&B585, &&B586, &&B587, &&B588, &&B589, &&B590, &&B591, &&B592, &&B593, &&B594, &&B595, &&B596, &&B597, &&B598, &&B599, &&B600, &&B601, &&B602, &&B603, &&B604, &&B605, &&B606, &&B607, &&B608, &&B609, &&B610, &&B611, &&B612, &&B613, &&B614, &&B615, &&B616, &&B617, &&B618, &&B619, &&B620, &&B621, &&B622, &&B623, &&B624, &&B625, &&B626, &&B627, &&B628, &&B629, &&B630, &&B631, &&B632, &&B633, &&B634, &&B635, &&B636, &&B637, &&B638, &&B639, &&B640, &&B641, &&B642, &&B643, &&B644, &&B645, &&B646, &&B647, &&B648, &&B649, &&B650, &&B651, &&B652, &&B653, &&B654, &&B655, &&B656, &&B657, &&B658, &&B659, &&B660, &&B661, &&B662, &&B663, &&B664, &&B665, &&B666, &&B667, &&B668, &&B669, &&B670, &&B671, &&B672, &&B673, &&B674, &&B675, &&B676, &&B677, &&B678, &&B679, &&B680, &&B681, &&B682, &&B683, &&B684, &&B685, &&B686, &&B687, &&B688, &&B689, &&B690, &&B691, &&B692, &&B693, &&B694, &&B695, &&B696, &&B697, &&B698, &&B699, &&B700, &&B701, &&B702, &&B703, &&B704, &&B705, &&B706, &&B707, &&B708, &&B709, &&B710, &&B711, &&B712, &&B713, &&B714, &&B715, &&B716, &&B717, &&B718, &&B719, &&B720, &&B721, &&B722, &&B723, &&B724, &&B725, &&B726, &&B727, &&B728, &&B729, &&B730, &&B731, &&B732, &&B733, &&B734, &&B735, &&B736, &&B737, &&B738, &&B739, &&B740, &&B741, &&B742, &&B743, &&B744, &&B745, &&B746, &&B747, &&B748, &&B749, &&B750, &&B751, &&B752, &&B753, &&B754, &&B755, &&B756, &&B757, &&B758, &&B759, &&B760, &&B761, &&B762, &&B763, &&B764, &&B765, &&B766, &&B767, &&B768, &&B769, &&B770, &&B771, &&B772, &&B773, &&B774, &&B775, &&B776, &&B777, &&B778, &&B779, &&B780, &&B781, &&B782, &&B783, &&B784, &&B785, &&B786, &&B787, &&B788, &&B789, &&B790, &&B791, &&B792, &&B793, &&B794, &&B795, &&B796, &&B797, &&B798, &&B799, &&B800, &&B801, &&B802, &&B803, &&B804, &&B805, &&B806, &&B807, &&B808, &&B809, &&B810, &&B811, &&B812, &&B813, &&B814, &&B815, &&B816, &&B817, &&B818, &&B819, &&B820, &&B821, &&B822, &&B823, &&B824, &&B825, &&B826, &&B827, &&B828, &&B829, &&B830, &&B831, &&B832, &&B833, &&B834, &&B835, &&B836, &&B837, &&B838, &&B839, &&B840, &&B841, &&B842, &&B843, &&B844, &&B845, &&B846, &&B847, &&B848, &&B849, &&B850, &&B851, &&B852, &&B853, &&B854, &&B855, &&B856, &&B857, &&B858, &&B859, &&B860, &&B861, &&B862, &&B863, &&B864, &&B865, &&B866, &&B867, &&B868, &&B869, &&B870, &&B871, &&B872, &&B873, &&B874, &&B875, &&B876, &&B877, &&B878, &&B879, &&B880, &&B881, &&B882, &&B883, &&B884, &&B885, &&B886, &&B887, &&B888, &&B889, &&B890, &&B891, &&B892, &&B893, &&B894, &&B895, &&B896, &&B897, &&B898, &&B899, &&B900, &&B901, &&B902, &&B903, &&B904, &&B905, &&B906, &&B907, &&B908, &&B909, &&B910, &&B911, &&B912, &&B913, &&B914, &&B915, &&B916, &&B917, &&B918, &&B919, &&B920, &&B921, &&B922, &&B923, &&B924, &&B925, &&B926, &&B927, &&B928, &&B929, &&B930, &&B931, &&B932, &&B933, &&B934, &&B935, &&B936, &&B937, &&B938, &&B939, &&B940, &&B941, &&B942, &&B943, &&B944, &&B945, &&B946, &&B947, &&B948, &&B949, &&B950, &&B951, &&B952, &&B953, &&B954, &&B955, &&B956, &&B957, &&B958, &&B959, &&B960, &&B961, &&B962, &&B963, &&B964, &&B965, &&B966, &&B967, &&B968, &&B969, &&B970, &&B971, &&B972, &&B973, &&B974, &&B975, &&B976, &&B977, &&B978, &&B979, &&B980, &&B981, &&B982, &&B983, &&B984, &&B985, &&B986, &&B987, &&B988, &&B989, &&B990, &&B991, &&B992, &&B993, &&B994, &&B995, &&B996, &&B997, &&B998, &&B999, &&B1000, &&B1001, &&B1002, &&B1003, &&B1004, &&B1005, &&B1006, &&B1007, &&B1008, &&B1009, &&B1010, &&B1011, &&B1012, &&B1013, &&B1014, &&B1015, &&B1016, &&B1017, &&B1018, &&B1019, &&B1020, &&B1021, &&B1022, &&B1023, &&B1024, &&B1025, &&B1026, &&B1027, &&B1028, &&B1029, &&B1030, &&B1031, &&B1032, &&B1033, &&B1034, &&B1035, &&B1036, &&B1037, &&B1038, &&B1039, &&B1040, &&B1041, &&B1042, &&B1043, &&B1044, &&B1045, &&B1046, &&B1047, &&B1048, &&B1049, &&B1050, &&B1051, &&B1052, &&B1053, &&B1054, &&B1055, &&B1056, &&B1057, &&B1058, &&B1059, &&B1060, &&B1061, &&B1062, &&B1063, &&B1064, &&B1065, &&B1066, &&B1067, &&B1068, &&B1069, &&B1070, &&B1071, &&B1072, &&B1073, &&B1074, &&B1075, &&B1076, &&B1077, &&B1078, &&B1079, &&B1080, &&B1081, &&B1082, &&B1083, &&B1084, &&B1085, &&B1086, &&B1087, &&B1088, &&B1089, &&B1090, &&B1091, &&B1092, &&B1093, &&B1094, &&B1095, &&B1096, &&B1097, &&B1098, &&B1099, &&B1100, &&B1101, &&B1102, &&B1103, &&B1104, &&B1105, &&B1106, &&B1107, &&B1108, &&B1109, &&B1110, &&B1111, &&B1112, &&B1113, &&B1114, &&B1115, &&B1116, &&B1117, &&B1118, &&B1119, &&B1120, &&B1121, &&B1122, &&B1123, &&B1124, &&B1125, &&B1126, &&B1127, &&B1128, &&B1129, &&B1130, &&B1131, &&B1132, &&B1133, &&B1134, &&B1135, &&B1136, &&B1137, &&B1138, &&B1139, &&B1140, &&B1141, &&B1142, &&B1143, &&B1144, &&B1145, &&B1146, &&B1147, &&B1148, &&B1149, &&B1150, &&B1151, &&B1152, &&B1153, &&B1154, &&B1155, &&B1156, &&B1157, &&B1158, &&B1159, &&B1160, &&B1161, &&B1162, &&B1163, &&B1164, &&B1165, &&B1166, &&B1167, &&B1168, &&B1169, &&B1170, &&B1171, &&B1172, &&B1173, &&B1174, &&B1175, &&B1176, &&B1177, &&B1178, &&B1179, &&B1180, &&B1181, &&B1182, &&B1183, &&B1184, &&B1185, &&B1186, &&B1187, &&B1188, &&B1189, &&B1190, &&B1191, &&B1192, &&B1193, &&B1194, &&B1195, &&B1196, &&B1197, &&B1198, &&B1199, &&B1200, &&B1201, &&B1202, &&B1203, &&B1204, &&B1205, &&B1206, &&B1207, &&B1208, &&B1209, &&B1210, &&B1211, &&B1212, &&B1213, &&B1214, &&B1215, &&B1216, &&B1217, &&B1218, &&B1219, &&B1220, &&B1221, &&B1222, &&B1223, &&B1224, &&B1225, &&B1226, &&B1227, &&B1228, &&B1229, &&B1230, &&B1231, &&B1232, &&B1233, &&B1234, &&B1235, &&B1236, &&B1237, &&B1238, &&B1239, &&B1240, &&B1241, &&B1242, &&B1243, &&B1244, &&B1245, &&B1246, &&B1247, &&B1248, &&B1249, &&B1250, &&B1251, &&B1252, &&B1253, &&B1254, &&B1255, &&B1256, &&B1257, &&B1258, &&B1259, &&B1260, &&B1261, &&B1262, &&B1263, &&B1264, &&B1265, &&B1266, &&B1267, &&B1268, &&B1269, &&B1270, &&B1271, &&B1272, &&B1273, &&B1274, &&B1275, &&B1276, &&B1277, &&B1278, &&B1279, &&B1280, &&B1281, &&B1282, &&B1283, &&B1284, &&B1285, &&B1286, &&B1287, &&B1288, &&B1289, &&B1290, &&B1291, &&B1292, &&B1293, &&B1294, &&B1295, &&B1296, &&B1297, &&B1298, &&B1299, &&B1300, &&B1301, &&B1302, &&B1303, &&B1304, &&B1305, &&B1306, &&B1307, &&B1308, &&B1309, &&B1310, &&B1311, &&B1312, &&B1313, &&B1314, &&B1315, &&B1316, &&B1317, &&B1318, &&B1319, &&B1320, &&B1321, &&B1322, &&B1323, &&B1324, &&B1325, &&B1326, &&B1327, &&B1328, &&B1329, &&B1330, &&B1331, &&B1332, &&B1333, &&B1334, &&B1335, &&B1336, &&B1337, &&B1338, &&B1339, &&B1340, &&B1341, &&B1342, &&B1343, &&B1344, &&B1345, &&B1346, &&B1347, &&B1348, &&B1349, &&B1350, &&B1351, &&B1352, &&B1353, &&B1354, &&B1355, &&B1356, &&B1357, &&B1358, &&B1359, &&B1360, &&B1361, &&B1362, &&B1363, &&B1364, &&B1365, &&B1366, &&B1367, &&B1368, &&B1369, &&B1370, &&B1371, &&B1372, &&B1373, &&B1374, &&B1375, &&B1376, &&B1377, &&B1378, &&B1379, &&B1380, &&B1381, &&B1382, &&B1383, &&B1384, &&B1385, &&B1386, &&B1387, &&B1388, &&B1389, &&B1390, &&B1391, &&B1392, &&B1393, &&B1394, &&B1395, &&B1396, &&B1397, &&B1398, &&B1399, &&B1400, &&B1401, &&B1402, &&B1403, &&B1404, &&B1405, &&B1406, &&B1407, &&B1408, &&B1409, &&B1410, &&B1411, &&B1412, &&B1413, &&B1414, &&B1415, &&B1416, &&B1417, &&B1418, &&B1419, &&B1420, &&B1421, &&B1422, &&B1423, &&B1424, &&B1425, &&B1426, &&B1427, &&B1428, &&B1429, &&B1430, &&B1431, &&B1432, &&B1433, &&B1434, &&B1435, &&B1436, &&B1437, &&B1438, &&B1439, &&B1440, &&B1441, &&B1442, &&B1443, &&B1444, &&B1445, &&B1446, &&B1447, &&B1448, &&B1449, &&B1450, &&B1451, &&B1452, &&B1453, &&B1454, &&B1455, &&B1456, &&B1457, &&B1458, &&B1459, &&B1460, &&B1461, &&B1462, &&B1463, &&B1464, &&B1465, &&B1466, &&B1467, &&B1468, &&B1469, &&B1470, &&B1471, &&B1472, &&B1473, &&B1474, &&B1475, &&B1476, &&B1477, &&B1478, &&B1479, &&B1480, &&B1481, &&B1482, &&B1483, &&B1484, &&B1485, &&B1486, &&B1487, &&B1488, &&B1489, &&B1490, &&B1491, &&B1492, &&B1493, &&B1494, &&B1495, &&B1496, &&B1497, &&B1498, &&B1499 }; - goto *addrs[argc*argc + 1000]; +/* Store, "declare" (but jump over) the current B_* label */ +#define IND_BLOCK(X) \ +do { \ + addrs[i] = &&B_##X; \ + i++; \ + goto JMP_##X; \ + B_##X: \ + printf(#X "\n"); \ + return 0; \ + JMP_##X: \ + ; \ +} while (0) -B0: printf("0\n"); return 0; -B1: printf("1\n"); return 0; -B2: printf("2\n"); return 0; -B3: printf("3\n"); return 0; -B4: printf("4\n"); return 0; -B5: printf("5\n"); return 0; -B6: printf("6\n"); return 0; -B7: printf("7\n"); return 0; -B8: printf("8\n"); return 0; -B9: printf("9\n"); return 0; -B10: printf("10\n"); return 0; -B11: printf("11\n"); return 0; -B12: printf("12\n"); return 0; -B13: printf("13\n"); return 0; -B14: printf("14\n"); return 0; -B15: printf("15\n"); return 0; -B16: printf("16\n"); return 0; -B17: printf("17\n"); return 0; -B18: printf("18\n"); return 0; -B19: printf("19\n"); return 0; -B20: printf("20\n"); return 0; -B21: printf("21\n"); return 0; -B22: printf("22\n"); return 0; -B23: printf("23\n"); return 0; -B24: printf("24\n"); return 0; -B25: printf("25\n"); return 0; -B26: printf("26\n"); return 0; -B27: printf("27\n"); return 0; -B28: printf("28\n"); return 0; -B29: printf("29\n"); return 0; -B30: printf("30\n"); return 0; -B31: printf("31\n"); return 0; -B32: printf("32\n"); return 0; -B33: printf("33\n"); return 0; -B34: printf("34\n"); return 0; -B35: printf("35\n"); return 0; -B36: printf("36\n"); return 0; -B37: printf("37\n"); return 0; -B38: printf("38\n"); return 0; -B39: printf("39\n"); return 0; -B40: printf("40\n"); return 0; -B41: printf("41\n"); return 0; -B42: printf("42\n"); return 0; -B43: printf("43\n"); return 0; -B44: printf("44\n"); return 0; -B45: printf("45\n"); return 0; -B46: printf("46\n"); return 0; -B47: printf("47\n"); return 0; -B48: printf("48\n"); return 0; -B49: printf("49\n"); return 0; -B50: printf("50\n"); return 0; -B51: printf("51\n"); return 0; -B52: printf("52\n"); return 0; -B53: printf("53\n"); return 0; -B54: printf("54\n"); return 0; -B55: printf("55\n"); return 0; -B56: printf("56\n"); return 0; -B57: printf("57\n"); return 0; -B58: printf("58\n"); return 0; -B59: printf("59\n"); return 0; -B60: printf("60\n"); return 0; -B61: printf("61\n"); return 0; -B62: printf("62\n"); return 0; -B63: printf("63\n"); return 0; -B64: printf("64\n"); return 0; -B65: printf("65\n"); return 0; -B66: printf("66\n"); return 0; -B67: printf("67\n"); return 0; -B68: printf("68\n"); return 0; -B69: printf("69\n"); return 0; -B70: printf("70\n"); return 0; -B71: printf("71\n"); return 0; -B72: printf("72\n"); return 0; -B73: printf("73\n"); return 0; -B74: printf("74\n"); return 0; -B75: printf("75\n"); return 0; -B76: printf("76\n"); return 0; -B77: printf("77\n"); return 0; -B78: printf("78\n"); return 0; -B79: printf("79\n"); return 0; -B80: printf("80\n"); return 0; -B81: printf("81\n"); return 0; -B82: printf("82\n"); return 0; -B83: printf("83\n"); return 0; -B84: printf("84\n"); return 0; -B85: printf("85\n"); return 0; -B86: printf("86\n"); return 0; -B87: printf("87\n"); return 0; -B88: printf("88\n"); return 0; -B89: printf("89\n"); return 0; -B90: printf("90\n"); return 0; -B91: printf("91\n"); return 0; -B92: printf("92\n"); return 0; -B93: printf("93\n"); return 0; -B94: printf("94\n"); return 0; -B95: printf("95\n"); return 0; -B96: printf("96\n"); return 0; -B97: printf("97\n"); return 0; -B98: printf("98\n"); return 0; -B99: printf("99\n"); return 0; -B100: printf("100\n"); return 0; -B101: printf("101\n"); return 0; -B102: printf("102\n"); return 0; -B103: printf("103\n"); return 0; -B104: printf("104\n"); return 0; -B105: printf("105\n"); return 0; -B106: printf("106\n"); return 0; -B107: printf("107\n"); return 0; -B108: printf("108\n"); return 0; -B109: printf("109\n"); return 0; -B110: printf("110\n"); return 0; -B111: printf("111\n"); return 0; -B112: printf("112\n"); return 0; -B113: printf("113\n"); return 0; -B114: printf("114\n"); return 0; -B115: printf("115\n"); return 0; -B116: printf("116\n"); return 0; -B117: printf("117\n"); return 0; -B118: printf("118\n"); return 0; -B119: printf("119\n"); return 0; -B120: printf("120\n"); return 0; -B121: printf("121\n"); return 0; -B122: printf("122\n"); return 0; -B123: printf("123\n"); return 0; -B124: printf("124\n"); return 0; -B125: printf("125\n"); return 0; -B126: printf("126\n"); return 0; -B127: printf("127\n"); return 0; -B128: printf("128\n"); return 0; -B129: printf("129\n"); return 0; -B130: printf("130\n"); return 0; -B131: printf("131\n"); return 0; -B132: printf("132\n"); return 0; -B133: printf("133\n"); return 0; -B134: printf("134\n"); return 0; -B135: printf("135\n"); return 0; -B136: printf("136\n"); return 0; -B137: printf("137\n"); return 0; -B138: printf("138\n"); return 0; -B139: printf("139\n"); return 0; -B140: printf("140\n"); return 0; -B141: printf("141\n"); return 0; -B142: printf("142\n"); return 0; -B143: printf("143\n"); return 0; -B144: printf("144\n"); return 0; -B145: printf("145\n"); return 0; -B146: printf("146\n"); return 0; -B147: printf("147\n"); return 0; -B148: printf("148\n"); return 0; -B149: printf("149\n"); return 0; -B150: printf("150\n"); return 0; -B151: printf("151\n"); return 0; -B152: printf("152\n"); return 0; -B153: printf("153\n"); return 0; -B154: printf("154\n"); return 0; -B155: printf("155\n"); return 0; -B156: printf("156\n"); return 0; -B157: printf("157\n"); return 0; -B158: printf("158\n"); return 0; -B159: printf("159\n"); return 0; -B160: printf("160\n"); return 0; -B161: printf("161\n"); return 0; -B162: printf("162\n"); return 0; -B163: printf("163\n"); return 0; -B164: printf("164\n"); return 0; -B165: printf("165\n"); return 0; -B166: printf("166\n"); return 0; -B167: printf("167\n"); return 0; -B168: printf("168\n"); return 0; -B169: printf("169\n"); return 0; -B170: printf("170\n"); return 0; -B171: printf("171\n"); return 0; -B172: printf("172\n"); return 0; -B173: printf("173\n"); return 0; -B174: printf("174\n"); return 0; -B175: printf("175\n"); return 0; -B176: printf("176\n"); return 0; -B177: printf("177\n"); return 0; -B178: printf("178\n"); return 0; -B179: printf("179\n"); return 0; -B180: printf("180\n"); return 0; -B181: printf("181\n"); return 0; -B182: printf("182\n"); return 0; -B183: printf("183\n"); return 0; -B184: printf("184\n"); return 0; -B185: printf("185\n"); return 0; -B186: printf("186\n"); return 0; -B187: printf("187\n"); return 0; -B188: printf("188\n"); return 0; -B189: printf("189\n"); return 0; -B190: printf("190\n"); return 0; -B191: printf("191\n"); return 0; -B192: printf("192\n"); return 0; -B193: printf("193\n"); return 0; -B194: printf("194\n"); return 0; -B195: printf("195\n"); return 0; -B196: printf("196\n"); return 0; -B197: printf("197\n"); return 0; -B198: printf("198\n"); return 0; -B199: printf("199\n"); return 0; -B200: printf("200\n"); return 0; -B201: printf("201\n"); return 0; -B202: printf("202\n"); return 0; -B203: printf("203\n"); return 0; -B204: printf("204\n"); return 0; -B205: printf("205\n"); return 0; -B206: printf("206\n"); return 0; -B207: printf("207\n"); return 0; -B208: printf("208\n"); return 0; -B209: printf("209\n"); return 0; -B210: printf("210\n"); return 0; -B211: printf("211\n"); return 0; -B212: printf("212\n"); return 0; -B213: printf("213\n"); return 0; -B214: printf("214\n"); return 0; -B215: printf("215\n"); return 0; -B216: printf("216\n"); return 0; -B217: printf("217\n"); return 0; -B218: printf("218\n"); return 0; -B219: printf("219\n"); return 0; -B220: printf("220\n"); return 0; -B221: printf("221\n"); return 0; -B222: printf("222\n"); return 0; -B223: printf("223\n"); return 0; -B224: printf("224\n"); return 0; -B225: printf("225\n"); return 0; -B226: printf("226\n"); return 0; -B227: printf("227\n"); return 0; -B228: printf("228\n"); return 0; -B229: printf("229\n"); return 0; -B230: printf("230\n"); return 0; -B231: printf("231\n"); return 0; -B232: printf("232\n"); return 0; -B233: printf("233\n"); return 0; -B234: printf("234\n"); return 0; -B235: printf("235\n"); return 0; -B236: printf("236\n"); return 0; -B237: printf("237\n"); return 0; -B238: printf("238\n"); return 0; -B239: printf("239\n"); return 0; -B240: printf("240\n"); return 0; -B241: printf("241\n"); return 0; -B242: printf("242\n"); return 0; -B243: printf("243\n"); return 0; -B244: printf("244\n"); return 0; -B245: printf("245\n"); return 0; -B246: printf("246\n"); return 0; -B247: printf("247\n"); return 0; -B248: printf("248\n"); return 0; -B249: printf("249\n"); return 0; -B250: printf("250\n"); return 0; -B251: printf("251\n"); return 0; -B252: printf("252\n"); return 0; -B253: printf("253\n"); return 0; -B254: printf("254\n"); return 0; -B255: printf("255\n"); return 0; -B256: printf("256\n"); return 0; -B257: printf("257\n"); return 0; -B258: printf("258\n"); return 0; -B259: printf("259\n"); return 0; -B260: printf("260\n"); return 0; -B261: printf("261\n"); return 0; -B262: printf("262\n"); return 0; -B263: printf("263\n"); return 0; -B264: printf("264\n"); return 0; -B265: printf("265\n"); return 0; -B266: printf("266\n"); return 0; -B267: printf("267\n"); return 0; -B268: printf("268\n"); return 0; -B269: printf("269\n"); return 0; -B270: printf("270\n"); return 0; -B271: printf("271\n"); return 0; -B272: printf("272\n"); return 0; -B273: printf("273\n"); return 0; -B274: printf("274\n"); return 0; -B275: printf("275\n"); return 0; -B276: printf("276\n"); return 0; -B277: printf("277\n"); return 0; -B278: printf("278\n"); return 0; -B279: printf("279\n"); return 0; -B280: printf("280\n"); return 0; -B281: printf("281\n"); return 0; -B282: printf("282\n"); return 0; -B283: printf("283\n"); return 0; -B284: printf("284\n"); return 0; -B285: printf("285\n"); return 0; -B286: printf("286\n"); return 0; -B287: printf("287\n"); return 0; -B288: printf("288\n"); return 0; -B289: printf("289\n"); return 0; -B290: printf("290\n"); return 0; -B291: printf("291\n"); return 0; -B292: printf("292\n"); return 0; -B293: printf("293\n"); return 0; -B294: printf("294\n"); return 0; -B295: printf("295\n"); return 0; -B296: printf("296\n"); return 0; -B297: printf("297\n"); return 0; -B298: printf("298\n"); return 0; -B299: printf("299\n"); return 0; -B300: printf("300\n"); return 0; -B301: printf("301\n"); return 0; -B302: printf("302\n"); return 0; -B303: printf("303\n"); return 0; -B304: printf("304\n"); return 0; -B305: printf("305\n"); return 0; -B306: printf("306\n"); return 0; -B307: printf("307\n"); return 0; -B308: printf("308\n"); return 0; -B309: printf("309\n"); return 0; -B310: printf("310\n"); return 0; -B311: printf("311\n"); return 0; -B312: printf("312\n"); return 0; -B313: printf("313\n"); return 0; -B314: printf("314\n"); return 0; -B315: printf("315\n"); return 0; -B316: printf("316\n"); return 0; -B317: printf("317\n"); return 0; -B318: printf("318\n"); return 0; -B319: printf("319\n"); return 0; -B320: printf("320\n"); return 0; -B321: printf("321\n"); return 0; -B322: printf("322\n"); return 0; -B323: printf("323\n"); return 0; -B324: printf("324\n"); return 0; -B325: printf("325\n"); return 0; -B326: printf("326\n"); return 0; -B327: printf("327\n"); return 0; -B328: printf("328\n"); return 0; -B329: printf("329\n"); return 0; -B330: printf("330\n"); return 0; -B331: printf("331\n"); return 0; -B332: printf("332\n"); return 0; -B333: printf("333\n"); return 0; -B334: printf("334\n"); return 0; -B335: printf("335\n"); return 0; -B336: printf("336\n"); return 0; -B337: printf("337\n"); return 0; -B338: printf("338\n"); return 0; -B339: printf("339\n"); return 0; -B340: printf("340\n"); return 0; -B341: printf("341\n"); return 0; -B342: printf("342\n"); return 0; -B343: printf("343\n"); return 0; -B344: printf("344\n"); return 0; -B345: printf("345\n"); return 0; -B346: printf("346\n"); return 0; -B347: printf("347\n"); return 0; -B348: printf("348\n"); return 0; -B349: printf("349\n"); return 0; -B350: printf("350\n"); return 0; -B351: printf("351\n"); return 0; -B352: printf("352\n"); return 0; -B353: printf("353\n"); return 0; -B354: printf("354\n"); return 0; -B355: printf("355\n"); return 0; -B356: printf("356\n"); return 0; -B357: printf("357\n"); return 0; -B358: printf("358\n"); return 0; -B359: printf("359\n"); return 0; -B360: printf("360\n"); return 0; -B361: printf("361\n"); return 0; -B362: printf("362\n"); return 0; -B363: printf("363\n"); return 0; -B364: printf("364\n"); return 0; -B365: printf("365\n"); return 0; -B366: printf("366\n"); return 0; -B367: printf("367\n"); return 0; -B368: printf("368\n"); return 0; -B369: printf("369\n"); return 0; -B370: printf("370\n"); return 0; -B371: printf("371\n"); return 0; -B372: printf("372\n"); return 0; -B373: printf("373\n"); return 0; -B374: printf("374\n"); return 0; -B375: printf("375\n"); return 0; -B376: printf("376\n"); return 0; -B377: printf("377\n"); return 0; -B378: printf("378\n"); return 0; -B379: printf("379\n"); return 0; -B380: printf("380\n"); return 0; -B381: printf("381\n"); return 0; -B382: printf("382\n"); return 0; -B383: printf("383\n"); return 0; -B384: printf("384\n"); return 0; -B385: printf("385\n"); return 0; -B386: printf("386\n"); return 0; -B387: printf("387\n"); return 0; -B388: printf("388\n"); return 0; -B389: printf("389\n"); return 0; -B390: printf("390\n"); return 0; -B391: printf("391\n"); return 0; -B392: printf("392\n"); return 0; -B393: printf("393\n"); return 0; -B394: printf("394\n"); return 0; -B395: printf("395\n"); return 0; -B396: printf("396\n"); return 0; -B397: printf("397\n"); return 0; -B398: printf("398\n"); return 0; -B399: printf("399\n"); return 0; -B400: printf("400\n"); return 0; -B401: printf("401\n"); return 0; -B402: printf("402\n"); return 0; -B403: printf("403\n"); return 0; -B404: printf("404\n"); return 0; -B405: printf("405\n"); return 0; -B406: printf("406\n"); return 0; -B407: printf("407\n"); return 0; -B408: printf("408\n"); return 0; -B409: printf("409\n"); return 0; -B410: printf("410\n"); return 0; -B411: printf("411\n"); return 0; -B412: printf("412\n"); return 0; -B413: printf("413\n"); return 0; -B414: printf("414\n"); return 0; -B415: printf("415\n"); return 0; -B416: printf("416\n"); return 0; -B417: printf("417\n"); return 0; -B418: printf("418\n"); return 0; -B419: printf("419\n"); return 0; -B420: printf("420\n"); return 0; -B421: printf("421\n"); return 0; -B422: printf("422\n"); return 0; -B423: printf("423\n"); return 0; -B424: printf("424\n"); return 0; -B425: printf("425\n"); return 0; -B426: printf("426\n"); return 0; -B427: printf("427\n"); return 0; -B428: printf("428\n"); return 0; -B429: printf("429\n"); return 0; -B430: printf("430\n"); return 0; -B431: printf("431\n"); return 0; -B432: printf("432\n"); return 0; -B433: printf("433\n"); return 0; -B434: printf("434\n"); return 0; -B435: printf("435\n"); return 0; -B436: printf("436\n"); return 0; -B437: printf("437\n"); return 0; -B438: printf("438\n"); return 0; -B439: printf("439\n"); return 0; -B440: printf("440\n"); return 0; -B441: printf("441\n"); return 0; -B442: printf("442\n"); return 0; -B443: printf("443\n"); return 0; -B444: printf("444\n"); return 0; -B445: printf("445\n"); return 0; -B446: printf("446\n"); return 0; -B447: printf("447\n"); return 0; -B448: printf("448\n"); return 0; -B449: printf("449\n"); return 0; -B450: printf("450\n"); return 0; -B451: printf("451\n"); return 0; -B452: printf("452\n"); return 0; -B453: printf("453\n"); return 0; -B454: printf("454\n"); return 0; -B455: printf("455\n"); return 0; -B456: printf("456\n"); return 0; -B457: printf("457\n"); return 0; -B458: printf("458\n"); return 0; -B459: printf("459\n"); return 0; -B460: printf("460\n"); return 0; -B461: printf("461\n"); return 0; -B462: printf("462\n"); return 0; -B463: printf("463\n"); return 0; -B464: printf("464\n"); return 0; -B465: printf("465\n"); return 0; -B466: printf("466\n"); return 0; -B467: printf("467\n"); return 0; -B468: printf("468\n"); return 0; -B469: printf("469\n"); return 0; -B470: printf("470\n"); return 0; -B471: printf("471\n"); return 0; -B472: printf("472\n"); return 0; -B473: printf("473\n"); return 0; -B474: printf("474\n"); return 0; -B475: printf("475\n"); return 0; -B476: printf("476\n"); return 0; -B477: printf("477\n"); return 0; -B478: printf("478\n"); return 0; -B479: printf("479\n"); return 0; -B480: printf("480\n"); return 0; -B481: printf("481\n"); return 0; -B482: printf("482\n"); return 0; -B483: printf("483\n"); return 0; -B484: printf("484\n"); return 0; -B485: printf("485\n"); return 0; -B486: printf("486\n"); return 0; -B487: printf("487\n"); return 0; -B488: printf("488\n"); return 0; -B489: printf("489\n"); return 0; -B490: printf("490\n"); return 0; -B491: printf("491\n"); return 0; -B492: printf("492\n"); return 0; -B493: printf("493\n"); return 0; -B494: printf("494\n"); return 0; -B495: printf("495\n"); return 0; -B496: printf("496\n"); return 0; -B497: printf("497\n"); return 0; -B498: printf("498\n"); return 0; -B499: printf("499\n"); return 0; -B500: printf("500\n"); return 0; -B501: printf("501\n"); return 0; -B502: printf("502\n"); return 0; -B503: printf("503\n"); return 0; -B504: printf("504\n"); return 0; -B505: printf("505\n"); return 0; -B506: printf("506\n"); return 0; -B507: printf("507\n"); return 0; -B508: printf("508\n"); return 0; -B509: printf("509\n"); return 0; -B510: printf("510\n"); return 0; -B511: printf("511\n"); return 0; -B512: printf("512\n"); return 0; -B513: printf("513\n"); return 0; -B514: printf("514\n"); return 0; -B515: printf("515\n"); return 0; -B516: printf("516\n"); return 0; -B517: printf("517\n"); return 0; -B518: printf("518\n"); return 0; -B519: printf("519\n"); return 0; -B520: printf("520\n"); return 0; -B521: printf("521\n"); return 0; -B522: printf("522\n"); return 0; -B523: printf("523\n"); return 0; -B524: printf("524\n"); return 0; -B525: printf("525\n"); return 0; -B526: printf("526\n"); return 0; -B527: printf("527\n"); return 0; -B528: printf("528\n"); return 0; -B529: printf("529\n"); return 0; -B530: printf("530\n"); return 0; -B531: printf("531\n"); return 0; -B532: printf("532\n"); return 0; -B533: printf("533\n"); return 0; -B534: printf("534\n"); return 0; -B535: printf("535\n"); return 0; -B536: printf("536\n"); return 0; -B537: printf("537\n"); return 0; -B538: printf("538\n"); return 0; -B539: printf("539\n"); return 0; -B540: printf("540\n"); return 0; -B541: printf("541\n"); return 0; -B542: printf("542\n"); return 0; -B543: printf("543\n"); return 0; -B544: printf("544\n"); return 0; -B545: printf("545\n"); return 0; -B546: printf("546\n"); return 0; -B547: printf("547\n"); return 0; -B548: printf("548\n"); return 0; -B549: printf("549\n"); return 0; -B550: printf("550\n"); return 0; -B551: printf("551\n"); return 0; -B552: printf("552\n"); return 0; -B553: printf("553\n"); return 0; -B554: printf("554\n"); return 0; -B555: printf("555\n"); return 0; -B556: printf("556\n"); return 0; -B557: printf("557\n"); return 0; -B558: printf("558\n"); return 0; -B559: printf("559\n"); return 0; -B560: printf("560\n"); return 0; -B561: printf("561\n"); return 0; -B562: printf("562\n"); return 0; -B563: printf("563\n"); return 0; -B564: printf("564\n"); return 0; -B565: printf("565\n"); return 0; -B566: printf("566\n"); return 0; -B567: printf("567\n"); return 0; -B568: printf("568\n"); return 0; -B569: printf("569\n"); return 0; -B570: printf("570\n"); return 0; -B571: printf("571\n"); return 0; -B572: printf("572\n"); return 0; -B573: printf("573\n"); return 0; -B574: printf("574\n"); return 0; -B575: printf("575\n"); return 0; -B576: printf("576\n"); return 0; -B577: printf("577\n"); return 0; -B578: printf("578\n"); return 0; -B579: printf("579\n"); return 0; -B580: printf("580\n"); return 0; -B581: printf("581\n"); return 0; -B582: printf("582\n"); return 0; -B583: printf("583\n"); return 0; -B584: printf("584\n"); return 0; -B585: printf("585\n"); return 0; -B586: printf("586\n"); return 0; -B587: printf("587\n"); return 0; -B588: printf("588\n"); return 0; -B589: printf("589\n"); return 0; -B590: printf("590\n"); return 0; -B591: printf("591\n"); return 0; -B592: printf("592\n"); return 0; -B593: printf("593\n"); return 0; -B594: printf("594\n"); return 0; -B595: printf("595\n"); return 0; -B596: printf("596\n"); return 0; -B597: printf("597\n"); return 0; -B598: printf("598\n"); return 0; -B599: printf("599\n"); return 0; -B600: printf("600\n"); return 0; -B601: printf("601\n"); return 0; -B602: printf("602\n"); return 0; -B603: printf("603\n"); return 0; -B604: printf("604\n"); return 0; -B605: printf("605\n"); return 0; -B606: printf("606\n"); return 0; -B607: printf("607\n"); return 0; -B608: printf("608\n"); return 0; -B609: printf("609\n"); return 0; -B610: printf("610\n"); return 0; -B611: printf("611\n"); return 0; -B612: printf("612\n"); return 0; -B613: printf("613\n"); return 0; -B614: printf("614\n"); return 0; -B615: printf("615\n"); return 0; -B616: printf("616\n"); return 0; -B617: printf("617\n"); return 0; -B618: printf("618\n"); return 0; -B619: printf("619\n"); return 0; -B620: printf("620\n"); return 0; -B621: printf("621\n"); return 0; -B622: printf("622\n"); return 0; -B623: printf("623\n"); return 0; -B624: printf("624\n"); return 0; -B625: printf("625\n"); return 0; -B626: printf("626\n"); return 0; -B627: printf("627\n"); return 0; -B628: printf("628\n"); return 0; -B629: printf("629\n"); return 0; -B630: printf("630\n"); return 0; -B631: printf("631\n"); return 0; -B632: printf("632\n"); return 0; -B633: printf("633\n"); return 0; -B634: printf("634\n"); return 0; -B635: printf("635\n"); return 0; -B636: printf("636\n"); return 0; -B637: printf("637\n"); return 0; -B638: printf("638\n"); return 0; -B639: printf("639\n"); return 0; -B640: printf("640\n"); return 0; -B641: printf("641\n"); return 0; -B642: printf("642\n"); return 0; -B643: printf("643\n"); return 0; -B644: printf("644\n"); return 0; -B645: printf("645\n"); return 0; -B646: printf("646\n"); return 0; -B647: printf("647\n"); return 0; -B648: printf("648\n"); return 0; -B649: printf("649\n"); return 0; -B650: printf("650\n"); return 0; -B651: printf("651\n"); return 0; -B652: printf("652\n"); return 0; -B653: printf("653\n"); return 0; -B654: printf("654\n"); return 0; -B655: printf("655\n"); return 0; -B656: printf("656\n"); return 0; -B657: printf("657\n"); return 0; -B658: printf("658\n"); return 0; -B659: printf("659\n"); return 0; -B660: printf("660\n"); return 0; -B661: printf("661\n"); return 0; -B662: printf("662\n"); return 0; -B663: printf("663\n"); return 0; -B664: printf("664\n"); return 0; -B665: printf("665\n"); return 0; -B666: printf("666\n"); return 0; -B667: printf("667\n"); return 0; -B668: printf("668\n"); return 0; -B669: printf("669\n"); return 0; -B670: printf("670\n"); return 0; -B671: printf("671\n"); return 0; -B672: printf("672\n"); return 0; -B673: printf("673\n"); return 0; -B674: printf("674\n"); return 0; -B675: printf("675\n"); return 0; -B676: printf("676\n"); return 0; -B677: printf("677\n"); return 0; -B678: printf("678\n"); return 0; -B679: printf("679\n"); return 0; -B680: printf("680\n"); return 0; -B681: printf("681\n"); return 0; -B682: printf("682\n"); return 0; -B683: printf("683\n"); return 0; -B684: printf("684\n"); return 0; -B685: printf("685\n"); return 0; -B686: printf("686\n"); return 0; -B687: printf("687\n"); return 0; -B688: printf("688\n"); return 0; -B689: printf("689\n"); return 0; -B690: printf("690\n"); return 0; -B691: printf("691\n"); return 0; -B692: printf("692\n"); return 0; -B693: printf("693\n"); return 0; -B694: printf("694\n"); return 0; -B695: printf("695\n"); return 0; -B696: printf("696\n"); return 0; -B697: printf("697\n"); return 0; -B698: printf("698\n"); return 0; -B699: printf("699\n"); return 0; -B700: printf("700\n"); return 0; -B701: printf("701\n"); return 0; -B702: printf("702\n"); return 0; -B703: printf("703\n"); return 0; -B704: printf("704\n"); return 0; -B705: printf("705\n"); return 0; -B706: printf("706\n"); return 0; -B707: printf("707\n"); return 0; -B708: printf("708\n"); return 0; -B709: printf("709\n"); return 0; -B710: printf("710\n"); return 0; -B711: printf("711\n"); return 0; -B712: printf("712\n"); return 0; -B713: printf("713\n"); return 0; -B714: printf("714\n"); return 0; -B715: printf("715\n"); return 0; -B716: printf("716\n"); return 0; -B717: printf("717\n"); return 0; -B718: printf("718\n"); return 0; -B719: printf("719\n"); return 0; -B720: printf("720\n"); return 0; -B721: printf("721\n"); return 0; -B722: printf("722\n"); return 0; -B723: printf("723\n"); return 0; -B724: printf("724\n"); return 0; -B725: printf("725\n"); return 0; -B726: printf("726\n"); return 0; -B727: printf("727\n"); return 0; -B728: printf("728\n"); return 0; -B729: printf("729\n"); return 0; -B730: printf("730\n"); return 0; -B731: printf("731\n"); return 0; -B732: printf("732\n"); return 0; -B733: printf("733\n"); return 0; -B734: printf("734\n"); return 0; -B735: printf("735\n"); return 0; -B736: printf("736\n"); return 0; -B737: printf("737\n"); return 0; -B738: printf("738\n"); return 0; -B739: printf("739\n"); return 0; -B740: printf("740\n"); return 0; -B741: printf("741\n"); return 0; -B742: printf("742\n"); return 0; -B743: printf("743\n"); return 0; -B744: printf("744\n"); return 0; -B745: printf("745\n"); return 0; -B746: printf("746\n"); return 0; -B747: printf("747\n"); return 0; -B748: printf("748\n"); return 0; -B749: printf("749\n"); return 0; -B750: printf("750\n"); return 0; -B751: printf("751\n"); return 0; -B752: printf("752\n"); return 0; -B753: printf("753\n"); return 0; -B754: printf("754\n"); return 0; -B755: printf("755\n"); return 0; -B756: printf("756\n"); return 0; -B757: printf("757\n"); return 0; -B758: printf("758\n"); return 0; -B759: printf("759\n"); return 0; -B760: printf("760\n"); return 0; -B761: printf("761\n"); return 0; -B762: printf("762\n"); return 0; -B763: printf("763\n"); return 0; -B764: printf("764\n"); return 0; -B765: printf("765\n"); return 0; -B766: printf("766\n"); return 0; -B767: printf("767\n"); return 0; -B768: printf("768\n"); return 0; -B769: printf("769\n"); return 0; -B770: printf("770\n"); return 0; -B771: printf("771\n"); return 0; -B772: printf("772\n"); return 0; -B773: printf("773\n"); return 0; -B774: printf("774\n"); return 0; -B775: printf("775\n"); return 0; -B776: printf("776\n"); return 0; -B777: printf("777\n"); return 0; -B778: printf("778\n"); return 0; -B779: printf("779\n"); return 0; -B780: printf("780\n"); return 0; -B781: printf("781\n"); return 0; -B782: printf("782\n"); return 0; -B783: printf("783\n"); return 0; -B784: printf("784\n"); return 0; -B785: printf("785\n"); return 0; -B786: printf("786\n"); return 0; -B787: printf("787\n"); return 0; -B788: printf("788\n"); return 0; -B789: printf("789\n"); return 0; -B790: printf("790\n"); return 0; -B791: printf("791\n"); return 0; -B792: printf("792\n"); return 0; -B793: printf("793\n"); return 0; -B794: printf("794\n"); return 0; -B795: printf("795\n"); return 0; -B796: printf("796\n"); return 0; -B797: printf("797\n"); return 0; -B798: printf("798\n"); return 0; -B799: printf("799\n"); return 0; -B800: printf("800\n"); return 0; -B801: printf("801\n"); return 0; -B802: printf("802\n"); return 0; -B803: printf("803\n"); return 0; -B804: printf("804\n"); return 0; -B805: printf("805\n"); return 0; -B806: printf("806\n"); return 0; -B807: printf("807\n"); return 0; -B808: printf("808\n"); return 0; -B809: printf("809\n"); return 0; -B810: printf("810\n"); return 0; -B811: printf("811\n"); return 0; -B812: printf("812\n"); return 0; -B813: printf("813\n"); return 0; -B814: printf("814\n"); return 0; -B815: printf("815\n"); return 0; -B816: printf("816\n"); return 0; -B817: printf("817\n"); return 0; -B818: printf("818\n"); return 0; -B819: printf("819\n"); return 0; -B820: printf("820\n"); return 0; -B821: printf("821\n"); return 0; -B822: printf("822\n"); return 0; -B823: printf("823\n"); return 0; -B824: printf("824\n"); return 0; -B825: printf("825\n"); return 0; -B826: printf("826\n"); return 0; -B827: printf("827\n"); return 0; -B828: printf("828\n"); return 0; -B829: printf("829\n"); return 0; -B830: printf("830\n"); return 0; -B831: printf("831\n"); return 0; -B832: printf("832\n"); return 0; -B833: printf("833\n"); return 0; -B834: printf("834\n"); return 0; -B835: printf("835\n"); return 0; -B836: printf("836\n"); return 0; -B837: printf("837\n"); return 0; -B838: printf("838\n"); return 0; -B839: printf("839\n"); return 0; -B840: printf("840\n"); return 0; -B841: printf("841\n"); return 0; -B842: printf("842\n"); return 0; -B843: printf("843\n"); return 0; -B844: printf("844\n"); return 0; -B845: printf("845\n"); return 0; -B846: printf("846\n"); return 0; -B847: printf("847\n"); return 0; -B848: printf("848\n"); return 0; -B849: printf("849\n"); return 0; -B850: printf("850\n"); return 0; -B851: printf("851\n"); return 0; -B852: printf("852\n"); return 0; -B853: printf("853\n"); return 0; -B854: printf("854\n"); return 0; -B855: printf("855\n"); return 0; -B856: printf("856\n"); return 0; -B857: printf("857\n"); return 0; -B858: printf("858\n"); return 0; -B859: printf("859\n"); return 0; -B860: printf("860\n"); return 0; -B861: printf("861\n"); return 0; -B862: printf("862\n"); return 0; -B863: printf("863\n"); return 0; -B864: printf("864\n"); return 0; -B865: printf("865\n"); return 0; -B866: printf("866\n"); return 0; -B867: printf("867\n"); return 0; -B868: printf("868\n"); return 0; -B869: printf("869\n"); return 0; -B870: printf("870\n"); return 0; -B871: printf("871\n"); return 0; -B872: printf("872\n"); return 0; -B873: printf("873\n"); return 0; -B874: printf("874\n"); return 0; -B875: printf("875\n"); return 0; -B876: printf("876\n"); return 0; -B877: printf("877\n"); return 0; -B878: printf("878\n"); return 0; -B879: printf("879\n"); return 0; -B880: printf("880\n"); return 0; -B881: printf("881\n"); return 0; -B882: printf("882\n"); return 0; -B883: printf("883\n"); return 0; -B884: printf("884\n"); return 0; -B885: printf("885\n"); return 0; -B886: printf("886\n"); return 0; -B887: printf("887\n"); return 0; -B888: printf("888\n"); return 0; -B889: printf("889\n"); return 0; -B890: printf("890\n"); return 0; -B891: printf("891\n"); return 0; -B892: printf("892\n"); return 0; -B893: printf("893\n"); return 0; -B894: printf("894\n"); return 0; -B895: printf("895\n"); return 0; -B896: printf("896\n"); return 0; -B897: printf("897\n"); return 0; -B898: printf("898\n"); return 0; -B899: printf("899\n"); return 0; -B900: printf("900\n"); return 0; -B901: printf("901\n"); return 0; -B902: printf("902\n"); return 0; -B903: printf("903\n"); return 0; -B904: printf("904\n"); return 0; -B905: printf("905\n"); return 0; -B906: printf("906\n"); return 0; -B907: printf("907\n"); return 0; -B908: printf("908\n"); return 0; -B909: printf("909\n"); return 0; -B910: printf("910\n"); return 0; -B911: printf("911\n"); return 0; -B912: printf("912\n"); return 0; -B913: printf("913\n"); return 0; -B914: printf("914\n"); return 0; -B915: printf("915\n"); return 0; -B916: printf("916\n"); return 0; -B917: printf("917\n"); return 0; -B918: printf("918\n"); return 0; -B919: printf("919\n"); return 0; -B920: printf("920\n"); return 0; -B921: printf("921\n"); return 0; -B922: printf("922\n"); return 0; -B923: printf("923\n"); return 0; -B924: printf("924\n"); return 0; -B925: printf("925\n"); return 0; -B926: printf("926\n"); return 0; -B927: printf("927\n"); return 0; -B928: printf("928\n"); return 0; -B929: printf("929\n"); return 0; -B930: printf("930\n"); return 0; -B931: printf("931\n"); return 0; -B932: printf("932\n"); return 0; -B933: printf("933\n"); return 0; -B934: printf("934\n"); return 0; -B935: printf("935\n"); return 0; -B936: printf("936\n"); return 0; -B937: printf("937\n"); return 0; -B938: printf("938\n"); return 0; -B939: printf("939\n"); return 0; -B940: printf("940\n"); return 0; -B941: printf("941\n"); return 0; -B942: printf("942\n"); return 0; -B943: printf("943\n"); return 0; -B944: printf("944\n"); return 0; -B945: printf("945\n"); return 0; -B946: printf("946\n"); return 0; -B947: printf("947\n"); return 0; -B948: printf("948\n"); return 0; -B949: printf("949\n"); return 0; -B950: printf("950\n"); return 0; -B951: printf("951\n"); return 0; -B952: printf("952\n"); return 0; -B953: printf("953\n"); return 0; -B954: printf("954\n"); return 0; -B955: printf("955\n"); return 0; -B956: printf("956\n"); return 0; -B957: printf("957\n"); return 0; -B958: printf("958\n"); return 0; -B959: printf("959\n"); return 0; -B960: printf("960\n"); return 0; -B961: printf("961\n"); return 0; -B962: printf("962\n"); return 0; -B963: printf("963\n"); return 0; -B964: printf("964\n"); return 0; -B965: printf("965\n"); return 0; -B966: printf("966\n"); return 0; -B967: printf("967\n"); return 0; -B968: printf("968\n"); return 0; -B969: printf("969\n"); return 0; -B970: printf("970\n"); return 0; -B971: printf("971\n"); return 0; -B972: printf("972\n"); return 0; -B973: printf("973\n"); return 0; -B974: printf("974\n"); return 0; -B975: printf("975\n"); return 0; -B976: printf("976\n"); return 0; -B977: printf("977\n"); return 0; -B978: printf("978\n"); return 0; -B979: printf("979\n"); return 0; -B980: printf("980\n"); return 0; -B981: printf("981\n"); return 0; -B982: printf("982\n"); return 0; -B983: printf("983\n"); return 0; -B984: printf("984\n"); return 0; -B985: printf("985\n"); return 0; -B986: printf("986\n"); return 0; -B987: printf("987\n"); return 0; -B988: printf("988\n"); return 0; -B989: printf("989\n"); return 0; -B990: printf("990\n"); return 0; -B991: printf("991\n"); return 0; -B992: printf("992\n"); return 0; -B993: printf("993\n"); return 0; -B994: printf("994\n"); return 0; -B995: printf("995\n"); return 0; -B996: printf("996\n"); return 0; -B997: printf("997\n"); return 0; -B998: printf("998\n"); return 0; -B999: printf("999\n"); return 0; -B1000: printf("1000\n"); return 0; -B1001: printf("1001\n"); return 0; -B1002: printf("1002\n"); return 0; -B1003: printf("1003\n"); return 0; -B1004: printf("1004\n"); return 0; -B1005: printf("1005\n"); return 0; -B1006: printf("1006\n"); return 0; -B1007: printf("1007\n"); return 0; -B1008: printf("1008\n"); return 0; -B1009: printf("1009\n"); return 0; -B1010: printf("1010\n"); return 0; -B1011: printf("1011\n"); return 0; -B1012: printf("1012\n"); return 0; -B1013: printf("1013\n"); return 0; -B1014: printf("1014\n"); return 0; -B1015: printf("1015\n"); return 0; -B1016: printf("1016\n"); return 0; -B1017: printf("1017\n"); return 0; -B1018: printf("1018\n"); return 0; -B1019: printf("1019\n"); return 0; -B1020: printf("1020\n"); return 0; -B1021: printf("1021\n"); return 0; -B1022: printf("1022\n"); return 0; -B1023: printf("1023\n"); return 0; -B1024: printf("1024\n"); return 0; -B1025: printf("1025\n"); return 0; -B1026: printf("1026\n"); return 0; -B1027: printf("1027\n"); return 0; -B1028: printf("1028\n"); return 0; -B1029: printf("1029\n"); return 0; -B1030: printf("1030\n"); return 0; -B1031: printf("1031\n"); return 0; -B1032: printf("1032\n"); return 0; -B1033: printf("1033\n"); return 0; -B1034: printf("1034\n"); return 0; -B1035: printf("1035\n"); return 0; -B1036: printf("1036\n"); return 0; -B1037: printf("1037\n"); return 0; -B1038: printf("1038\n"); return 0; -B1039: printf("1039\n"); return 0; -B1040: printf("1040\n"); return 0; -B1041: printf("1041\n"); return 0; -B1042: printf("1042\n"); return 0; -B1043: printf("1043\n"); return 0; -B1044: printf("1044\n"); return 0; -B1045: printf("1045\n"); return 0; -B1046: printf("1046\n"); return 0; -B1047: printf("1047\n"); return 0; -B1048: printf("1048\n"); return 0; -B1049: printf("1049\n"); return 0; -B1050: printf("1050\n"); return 0; -B1051: printf("1051\n"); return 0; -B1052: printf("1052\n"); return 0; -B1053: printf("1053\n"); return 0; -B1054: printf("1054\n"); return 0; -B1055: printf("1055\n"); return 0; -B1056: printf("1056\n"); return 0; -B1057: printf("1057\n"); return 0; -B1058: printf("1058\n"); return 0; -B1059: printf("1059\n"); return 0; -B1060: printf("1060\n"); return 0; -B1061: printf("1061\n"); return 0; -B1062: printf("1062\n"); return 0; -B1063: printf("1063\n"); return 0; -B1064: printf("1064\n"); return 0; -B1065: printf("1065\n"); return 0; -B1066: printf("1066\n"); return 0; -B1067: printf("1067\n"); return 0; -B1068: printf("1068\n"); return 0; -B1069: printf("1069\n"); return 0; -B1070: printf("1070\n"); return 0; -B1071: printf("1071\n"); return 0; -B1072: printf("1072\n"); return 0; -B1073: printf("1073\n"); return 0; -B1074: printf("1074\n"); return 0; -B1075: printf("1075\n"); return 0; -B1076: printf("1076\n"); return 0; -B1077: printf("1077\n"); return 0; -B1078: printf("1078\n"); return 0; -B1079: printf("1079\n"); return 0; -B1080: printf("1080\n"); return 0; -B1081: printf("1081\n"); return 0; -B1082: printf("1082\n"); return 0; -B1083: printf("1083\n"); return 0; -B1084: printf("1084\n"); return 0; -B1085: printf("1085\n"); return 0; -B1086: printf("1086\n"); return 0; -B1087: printf("1087\n"); return 0; -B1088: printf("1088\n"); return 0; -B1089: printf("1089\n"); return 0; -B1090: printf("1090\n"); return 0; -B1091: printf("1091\n"); return 0; -B1092: printf("1092\n"); return 0; -B1093: printf("1093\n"); return 0; -B1094: printf("1094\n"); return 0; -B1095: printf("1095\n"); return 0; -B1096: printf("1096\n"); return 0; -B1097: printf("1097\n"); return 0; -B1098: printf("1098\n"); return 0; -B1099: printf("1099\n"); return 0; -B1100: printf("1100\n"); return 0; -B1101: printf("1101\n"); return 0; -B1102: printf("1102\n"); return 0; -B1103: printf("1103\n"); return 0; -B1104: printf("1104\n"); return 0; -B1105: printf("1105\n"); return 0; -B1106: printf("1106\n"); return 0; -B1107: printf("1107\n"); return 0; -B1108: printf("1108\n"); return 0; -B1109: printf("1109\n"); return 0; -B1110: printf("1110\n"); return 0; -B1111: printf("1111\n"); return 0; -B1112: printf("1112\n"); return 0; -B1113: printf("1113\n"); return 0; -B1114: printf("1114\n"); return 0; -B1115: printf("1115\n"); return 0; -B1116: printf("1116\n"); return 0; -B1117: printf("1117\n"); return 0; -B1118: printf("1118\n"); return 0; -B1119: printf("1119\n"); return 0; -B1120: printf("1120\n"); return 0; -B1121: printf("1121\n"); return 0; -B1122: printf("1122\n"); return 0; -B1123: printf("1123\n"); return 0; -B1124: printf("1124\n"); return 0; -B1125: printf("1125\n"); return 0; -B1126: printf("1126\n"); return 0; -B1127: printf("1127\n"); return 0; -B1128: printf("1128\n"); return 0; -B1129: printf("1129\n"); return 0; -B1130: printf("1130\n"); return 0; -B1131: printf("1131\n"); return 0; -B1132: printf("1132\n"); return 0; -B1133: printf("1133\n"); return 0; -B1134: printf("1134\n"); return 0; -B1135: printf("1135\n"); return 0; -B1136: printf("1136\n"); return 0; -B1137: printf("1137\n"); return 0; -B1138: printf("1138\n"); return 0; -B1139: printf("1139\n"); return 0; -B1140: printf("1140\n"); return 0; -B1141: printf("1141\n"); return 0; -B1142: printf("1142\n"); return 0; -B1143: printf("1143\n"); return 0; -B1144: printf("1144\n"); return 0; -B1145: printf("1145\n"); return 0; -B1146: printf("1146\n"); return 0; -B1147: printf("1147\n"); return 0; -B1148: printf("1148\n"); return 0; -B1149: printf("1149\n"); return 0; -B1150: printf("1150\n"); return 0; -B1151: printf("1151\n"); return 0; -B1152: printf("1152\n"); return 0; -B1153: printf("1153\n"); return 0; -B1154: printf("1154\n"); return 0; -B1155: printf("1155\n"); return 0; -B1156: printf("1156\n"); return 0; -B1157: printf("1157\n"); return 0; -B1158: printf("1158\n"); return 0; -B1159: printf("1159\n"); return 0; -B1160: printf("1160\n"); return 0; -B1161: printf("1161\n"); return 0; -B1162: printf("1162\n"); return 0; -B1163: printf("1163\n"); return 0; -B1164: printf("1164\n"); return 0; -B1165: printf("1165\n"); return 0; -B1166: printf("1166\n"); return 0; -B1167: printf("1167\n"); return 0; -B1168: printf("1168\n"); return 0; -B1169: printf("1169\n"); return 0; -B1170: printf("1170\n"); return 0; -B1171: printf("1171\n"); return 0; -B1172: printf("1172\n"); return 0; -B1173: printf("1173\n"); return 0; -B1174: printf("1174\n"); return 0; -B1175: printf("1175\n"); return 0; -B1176: printf("1176\n"); return 0; -B1177: printf("1177\n"); return 0; -B1178: printf("1178\n"); return 0; -B1179: printf("1179\n"); return 0; -B1180: printf("1180\n"); return 0; -B1181: printf("1181\n"); return 0; -B1182: printf("1182\n"); return 0; -B1183: printf("1183\n"); return 0; -B1184: printf("1184\n"); return 0; -B1185: printf("1185\n"); return 0; -B1186: printf("1186\n"); return 0; -B1187: printf("1187\n"); return 0; -B1188: printf("1188\n"); return 0; -B1189: printf("1189\n"); return 0; -B1190: printf("1190\n"); return 0; -B1191: printf("1191\n"); return 0; -B1192: printf("1192\n"); return 0; -B1193: printf("1193\n"); return 0; -B1194: printf("1194\n"); return 0; -B1195: printf("1195\n"); return 0; -B1196: printf("1196\n"); return 0; -B1197: printf("1197\n"); return 0; -B1198: printf("1198\n"); return 0; -B1199: printf("1199\n"); return 0; -B1200: printf("1200\n"); return 0; -B1201: printf("1201\n"); return 0; -B1202: printf("1202\n"); return 0; -B1203: printf("1203\n"); return 0; -B1204: printf("1204\n"); return 0; -B1205: printf("1205\n"); return 0; -B1206: printf("1206\n"); return 0; -B1207: printf("1207\n"); return 0; -B1208: printf("1208\n"); return 0; -B1209: printf("1209\n"); return 0; -B1210: printf("1210\n"); return 0; -B1211: printf("1211\n"); return 0; -B1212: printf("1212\n"); return 0; -B1213: printf("1213\n"); return 0; -B1214: printf("1214\n"); return 0; -B1215: printf("1215\n"); return 0; -B1216: printf("1216\n"); return 0; -B1217: printf("1217\n"); return 0; -B1218: printf("1218\n"); return 0; -B1219: printf("1219\n"); return 0; -B1220: printf("1220\n"); return 0; -B1221: printf("1221\n"); return 0; -B1222: printf("1222\n"); return 0; -B1223: printf("1223\n"); return 0; -B1224: printf("1224\n"); return 0; -B1225: printf("1225\n"); return 0; -B1226: printf("1226\n"); return 0; -B1227: printf("1227\n"); return 0; -B1228: printf("1228\n"); return 0; -B1229: printf("1229\n"); return 0; -B1230: printf("1230\n"); return 0; -B1231: printf("1231\n"); return 0; -B1232: printf("1232\n"); return 0; -B1233: printf("1233\n"); return 0; -B1234: printf("1234\n"); return 0; -B1235: printf("1235\n"); return 0; -B1236: printf("1236\n"); return 0; -B1237: printf("1237\n"); return 0; -B1238: printf("1238\n"); return 0; -B1239: printf("1239\n"); return 0; -B1240: printf("1240\n"); return 0; -B1241: printf("1241\n"); return 0; -B1242: printf("1242\n"); return 0; -B1243: printf("1243\n"); return 0; -B1244: printf("1244\n"); return 0; -B1245: printf("1245\n"); return 0; -B1246: printf("1246\n"); return 0; -B1247: printf("1247\n"); return 0; -B1248: printf("1248\n"); return 0; -B1249: printf("1249\n"); return 0; -B1250: printf("1250\n"); return 0; -B1251: printf("1251\n"); return 0; -B1252: printf("1252\n"); return 0; -B1253: printf("1253\n"); return 0; -B1254: printf("1254\n"); return 0; -B1255: printf("1255\n"); return 0; -B1256: printf("1256\n"); return 0; -B1257: printf("1257\n"); return 0; -B1258: printf("1258\n"); return 0; -B1259: printf("1259\n"); return 0; -B1260: printf("1260\n"); return 0; -B1261: printf("1261\n"); return 0; -B1262: printf("1262\n"); return 0; -B1263: printf("1263\n"); return 0; -B1264: printf("1264\n"); return 0; -B1265: printf("1265\n"); return 0; -B1266: printf("1266\n"); return 0; -B1267: printf("1267\n"); return 0; -B1268: printf("1268\n"); return 0; -B1269: printf("1269\n"); return 0; -B1270: printf("1270\n"); return 0; -B1271: printf("1271\n"); return 0; -B1272: printf("1272\n"); return 0; -B1273: printf("1273\n"); return 0; -B1274: printf("1274\n"); return 0; -B1275: printf("1275\n"); return 0; -B1276: printf("1276\n"); return 0; -B1277: printf("1277\n"); return 0; -B1278: printf("1278\n"); return 0; -B1279: printf("1279\n"); return 0; -B1280: printf("1280\n"); return 0; -B1281: printf("1281\n"); return 0; -B1282: printf("1282\n"); return 0; -B1283: printf("1283\n"); return 0; -B1284: printf("1284\n"); return 0; -B1285: printf("1285\n"); return 0; -B1286: printf("1286\n"); return 0; -B1287: printf("1287\n"); return 0; -B1288: printf("1288\n"); return 0; -B1289: printf("1289\n"); return 0; -B1290: printf("1290\n"); return 0; -B1291: printf("1291\n"); return 0; -B1292: printf("1292\n"); return 0; -B1293: printf("1293\n"); return 0; -B1294: printf("1294\n"); return 0; -B1295: printf("1295\n"); return 0; -B1296: printf("1296\n"); return 0; -B1297: printf("1297\n"); return 0; -B1298: printf("1298\n"); return 0; -B1299: printf("1299\n"); return 0; -B1300: printf("1300\n"); return 0; -B1301: printf("1301\n"); return 0; -B1302: printf("1302\n"); return 0; -B1303: printf("1303\n"); return 0; -B1304: printf("1304\n"); return 0; -B1305: printf("1305\n"); return 0; -B1306: printf("1306\n"); return 0; -B1307: printf("1307\n"); return 0; -B1308: printf("1308\n"); return 0; -B1309: printf("1309\n"); return 0; -B1310: printf("1310\n"); return 0; -B1311: printf("1311\n"); return 0; -B1312: printf("1312\n"); return 0; -B1313: printf("1313\n"); return 0; -B1314: printf("1314\n"); return 0; -B1315: printf("1315\n"); return 0; -B1316: printf("1316\n"); return 0; -B1317: printf("1317\n"); return 0; -B1318: printf("1318\n"); return 0; -B1319: printf("1319\n"); return 0; -B1320: printf("1320\n"); return 0; -B1321: printf("1321\n"); return 0; -B1322: printf("1322\n"); return 0; -B1323: printf("1323\n"); return 0; -B1324: printf("1324\n"); return 0; -B1325: printf("1325\n"); return 0; -B1326: printf("1326\n"); return 0; -B1327: printf("1327\n"); return 0; -B1328: printf("1328\n"); return 0; -B1329: printf("1329\n"); return 0; -B1330: printf("1330\n"); return 0; -B1331: printf("1331\n"); return 0; -B1332: printf("1332\n"); return 0; -B1333: printf("1333\n"); return 0; -B1334: printf("1334\n"); return 0; -B1335: printf("1335\n"); return 0; -B1336: printf("1336\n"); return 0; -B1337: printf("1337\n"); return 0; -B1338: printf("1338\n"); return 0; -B1339: printf("1339\n"); return 0; -B1340: printf("1340\n"); return 0; -B1341: printf("1341\n"); return 0; -B1342: printf("1342\n"); return 0; -B1343: printf("1343\n"); return 0; -B1344: printf("1344\n"); return 0; -B1345: printf("1345\n"); return 0; -B1346: printf("1346\n"); return 0; -B1347: printf("1347\n"); return 0; -B1348: printf("1348\n"); return 0; -B1349: printf("1349\n"); return 0; -B1350: printf("1350\n"); return 0; -B1351: printf("1351\n"); return 0; -B1352: printf("1352\n"); return 0; -B1353: printf("1353\n"); return 0; -B1354: printf("1354\n"); return 0; -B1355: printf("1355\n"); return 0; -B1356: printf("1356\n"); return 0; -B1357: printf("1357\n"); return 0; -B1358: printf("1358\n"); return 0; -B1359: printf("1359\n"); return 0; -B1360: printf("1360\n"); return 0; -B1361: printf("1361\n"); return 0; -B1362: printf("1362\n"); return 0; -B1363: printf("1363\n"); return 0; -B1364: printf("1364\n"); return 0; -B1365: printf("1365\n"); return 0; -B1366: printf("1366\n"); return 0; -B1367: printf("1367\n"); return 0; -B1368: printf("1368\n"); return 0; -B1369: printf("1369\n"); return 0; -B1370: printf("1370\n"); return 0; -B1371: printf("1371\n"); return 0; -B1372: printf("1372\n"); return 0; -B1373: printf("1373\n"); return 0; -B1374: printf("1374\n"); return 0; -B1375: printf("1375\n"); return 0; -B1376: printf("1376\n"); return 0; -B1377: printf("1377\n"); return 0; -B1378: printf("1378\n"); return 0; -B1379: printf("1379\n"); return 0; -B1380: printf("1380\n"); return 0; -B1381: printf("1381\n"); return 0; -B1382: printf("1382\n"); return 0; -B1383: printf("1383\n"); return 0; -B1384: printf("1384\n"); return 0; -B1385: printf("1385\n"); return 0; -B1386: printf("1386\n"); return 0; -B1387: printf("1387\n"); return 0; -B1388: printf("1388\n"); return 0; -B1389: printf("1389\n"); return 0; -B1390: printf("1390\n"); return 0; -B1391: printf("1391\n"); return 0; -B1392: printf("1392\n"); return 0; -B1393: printf("1393\n"); return 0; -B1394: printf("1394\n"); return 0; -B1395: printf("1395\n"); return 0; -B1396: printf("1396\n"); return 0; -B1397: printf("1397\n"); return 0; -B1398: printf("1398\n"); return 0; -B1399: printf("1399\n"); return 0; -B1400: printf("1400\n"); return 0; -B1401: printf("1401\n"); return 0; -B1402: printf("1402\n"); return 0; -B1403: printf("1403\n"); return 0; -B1404: printf("1404\n"); return 0; -B1405: printf("1405\n"); return 0; -B1406: printf("1406\n"); return 0; -B1407: printf("1407\n"); return 0; -B1408: printf("1408\n"); return 0; -B1409: printf("1409\n"); return 0; -B1410: printf("1410\n"); return 0; -B1411: printf("1411\n"); return 0; -B1412: printf("1412\n"); return 0; -B1413: printf("1413\n"); return 0; -B1414: printf("1414\n"); return 0; -B1415: printf("1415\n"); return 0; -B1416: printf("1416\n"); return 0; -B1417: printf("1417\n"); return 0; -B1418: printf("1418\n"); return 0; -B1419: printf("1419\n"); return 0; -B1420: printf("1420\n"); return 0; -B1421: printf("1421\n"); return 0; -B1422: printf("1422\n"); return 0; -B1423: printf("1423\n"); return 0; -B1424: printf("1424\n"); return 0; -B1425: printf("1425\n"); return 0; -B1426: printf("1426\n"); return 0; -B1427: printf("1427\n"); return 0; -B1428: printf("1428\n"); return 0; -B1429: printf("1429\n"); return 0; -B1430: printf("1430\n"); return 0; -B1431: printf("1431\n"); return 0; -B1432: printf("1432\n"); return 0; -B1433: printf("1433\n"); return 0; -B1434: printf("1434\n"); return 0; -B1435: printf("1435\n"); return 0; -B1436: printf("1436\n"); return 0; -B1437: printf("1437\n"); return 0; -B1438: printf("1438\n"); return 0; -B1439: printf("1439\n"); return 0; -B1440: printf("1440\n"); return 0; -B1441: printf("1441\n"); return 0; -B1442: printf("1442\n"); return 0; -B1443: printf("1443\n"); return 0; -B1444: printf("1444\n"); return 0; -B1445: printf("1445\n"); return 0; -B1446: printf("1446\n"); return 0; -B1447: printf("1447\n"); return 0; -B1448: printf("1448\n"); return 0; -B1449: printf("1449\n"); return 0; -B1450: printf("1450\n"); return 0; -B1451: printf("1451\n"); return 0; -B1452: printf("1452\n"); return 0; -B1453: printf("1453\n"); return 0; -B1454: printf("1454\n"); return 0; -B1455: printf("1455\n"); return 0; -B1456: printf("1456\n"); return 0; -B1457: printf("1457\n"); return 0; -B1458: printf("1458\n"); return 0; -B1459: printf("1459\n"); return 0; -B1460: printf("1460\n"); return 0; -B1461: printf("1461\n"); return 0; -B1462: printf("1462\n"); return 0; -B1463: printf("1463\n"); return 0; -B1464: printf("1464\n"); return 0; -B1465: printf("1465\n"); return 0; -B1466: printf("1466\n"); return 0; -B1467: printf("1467\n"); return 0; -B1468: printf("1468\n"); return 0; -B1469: printf("1469\n"); return 0; -B1470: printf("1470\n"); return 0; -B1471: printf("1471\n"); return 0; -B1472: printf("1472\n"); return 0; -B1473: printf("1473\n"); return 0; -B1474: printf("1474\n"); return 0; -B1475: printf("1475\n"); return 0; -B1476: printf("1476\n"); return 0; -B1477: printf("1477\n"); return 0; -B1478: printf("1478\n"); return 0; -B1479: printf("1479\n"); return 0; -B1480: printf("1480\n"); return 0; -B1481: printf("1481\n"); return 0; -B1482: printf("1482\n"); return 0; -B1483: printf("1483\n"); return 0; -B1484: printf("1484\n"); return 0; -B1485: printf("1485\n"); return 0; -B1486: printf("1486\n"); return 0; -B1487: printf("1487\n"); return 0; -B1488: printf("1488\n"); return 0; -B1489: printf("1489\n"); return 0; -B1490: printf("1490\n"); return 0; -B1491: printf("1491\n"); return 0; -B1492: printf("1492\n"); return 0; -B1493: printf("1493\n"); return 0; -B1494: printf("1494\n"); return 0; -B1495: printf("1495\n"); return 0; -B1496: printf("1496\n"); return 0; -B1497: printf("1497\n"); return 0; -B1498: printf("1498\n"); return 0; -B1499: printf("1499\n"); return 0; - return 0; - } -
\ No newline at end of file +/* Add an indirection block to enable token pasting */ +#define SINGLE(X) IND_BLOCK(X); + +#define P2 SINGLE(__COUNTER__) SINGLE(__COUNTER__) +#define P4 P2 P2 +#define P8 P4 P4 +#define P16 P8 P8 +#define P32 P16 P16 +#define P64 P32 P32 +#define P128 P64 P64 +#define P256 P128 P128 +#define P512 P256 P256 +#define P1024 P512 P512 + +int main(int argc, char *argv[]) +{ + const void *addrs[1024 + 512]; + int i = 0; + + /* + * Repeat as many times as you want, but remember to update + * the labels address array's size accordingly. + */ + P1024; + P512; + + /* jump back at the correct label */ + goto *addrs[(argc * argc) + 1000]; +} diff --git a/tests/core/test_indirectbr_many.out b/tests/core/test_indirectbr_many.out index d53baec4..dd117240 100644 --- a/tests/core/test_indirectbr_many.out +++ b/tests/core/test_indirectbr_many.out @@ -1,2 +1 @@ - 1001 diff --git a/tests/emscripten_log/emscripten_log.cpp b/tests/emscripten_log/emscripten_log.cpp new file mode 100644 index 00000000..a5bb8432 --- /dev/null +++ b/tests/emscripten_log/emscripten_log.cpp @@ -0,0 +1,136 @@ +#include <emscripten.h> +#include <stdio.h> +#include <cstring> + +#define STRINGIZE_HELPER(x) #x +#define STRINGIZE(x) STRINGIZE_HELPER(x) + +#ifndef REPORT_RESULT +#define REPORT_RESULT int dummy +#endif + +int result = 1; // If 1, this test succeeded. + +// A custom assert macro to test varargs routing to emscripten_log(). +#define MYASSERT(condition, ...) \ + do { \ + if (!(condition)) { \ + emscripten_log(EM_LOG_ERROR, "%s", "Condition '" #condition "' failed in file " __FILE__ ":" STRINGIZE(__LINE__) "!"); \ + emscripten_log(EM_LOG_ERROR, ##__VA_ARGS__); \ + result = 0; \ + } \ + } while(0) + +void __attribute__((noinline)) kitten() +{ + // Log to Emscripten Module. + emscripten_log(EM_LOG_NO_PATHS, "Print a log message: int: %d, string: %s.", 42, "hello"); + emscripten_log(EM_LOG_NO_PATHS | EM_LOG_WARN, "Print a warning message"); + emscripten_log(EM_LOG_NO_PATHS | EM_LOG_ERROR, "This is an error!"); + + // Log directly to Browser web inspector/console. + emscripten_log(EM_LOG_NO_PATHS | EM_LOG_CONSOLE, "Info log to console: int: %d, string: %s", 42, "hello"); + emscripten_log(EM_LOG_NO_PATHS | EM_LOG_CONSOLE | EM_LOG_WARN, "Warning message to console."); + emscripten_log(EM_LOG_NO_PATHS | EM_LOG_CONSOLE | EM_LOG_ERROR, "Error message to console! This should appear in red!"); + + // Log to with full callstack information (both original C source and JS callstacks): + emscripten_log(EM_LOG_C_STACK | EM_LOG_JS_STACK | EM_LOG_DEMANGLE, "A message with as full call stack information as possible:"); + + // Log with just mangled JS callstacks: + emscripten_log(EM_LOG_NO_PATHS | EM_LOG_JS_STACK, "This is a message with a mangled JS callstack:"); + + // Log only clean C callstack: + emscripten_log(EM_LOG_NO_PATHS | EM_LOG_C_STACK | EM_LOG_DEMANGLE, "This message should have a clean C callstack:"); + + // We can leave out the message to just print out the callstack: + printf("The following line should show just the callstack without a message:\n"); + emscripten_log(EM_LOG_NO_PATHS | EM_LOG_ERROR | EM_LOG_C_STACK | EM_LOG_JS_STACK | EM_LOG_DEMANGLE); +} + +void __attribute__((noinline)) bar(int = 0, char * = 0, double = 0) // Arbitrary function signature to add some content to callstack. +{ + if (1 == 2) + MYASSERT(2 == 1, "World falls apart!"); + else + MYASSERT(1 == 1); + + int flags = EM_LOG_NO_PATHS | EM_LOG_JS_STACK | EM_LOG_DEMANGLE | EM_LOG_FUNC_PARAMS; +#ifndef RUN_FROM_JS_SHELL + flags |= EM_LOG_C_STACK; +#endif + + // We can programmatically get the callstack. + // 1. Ask for callstack length: + int nbytes = emscripten_get_callstack(flags, 0, 0); + // 2. Allocate temp memory to hold the callstack. + char *callstack = new char[nbytes]; + // 3. Obtain it. + // 4. Do something with the callstack string. + + emscripten_get_callstack(flags, callstack, nbytes); + + /* The callstack should be something like + at bar(int, char*, double) (src.cpp.o.js:5383:12) + at void Foo<int>() (src.cpp.o.js:5417:4) + at main() (src.cpp.o.js:5404:2) + at Object.callMain (src.cpp.o.js:71344:30) + at doRun (src.cpp.o.js:71383:25) + at run (src.cpp.o.js:71396:5) + at Object.<anonymous> (src.cpp.o.js:71439:1) + at Module._compile (module.js:456:26) + + but the line numbers will greatly vary depending on the mode we are compiling in, so cannot test with direct string comparison. */ + + if ((flags & EM_LOG_C_STACK) != 0) + { + MYASSERT(!!strstr(callstack, "at bar(int, char*, double) (src.cpp:"), "Callstack was %s!", callstack); + MYASSERT(!!strstr(callstack, "at void Foo<int>() (src.cpp:"), "Callstack was %s!", callstack); + } + else + { + MYASSERT(!!strstr(callstack, "at bar(int, char*, double) (src.cpp.o.js:"), "Callstack was %s!", callstack); + MYASSERT(!!strstr(callstack, "at void Foo<int>() (src.cpp.o.js:"), "Callstack was %s!", callstack); + } + + // 5. Clean up. + delete[] callstack; + + // Or alternatively use a fixed-size buffer for the callstack (and get a truncated output if it was too small). + char str[1024]; + emscripten_get_callstack(EM_LOG_NO_PATHS | EM_LOG_JS_STACK, str, 1024); + + /* With EM_LOG_JS_STACK, the callstack will be + at __Z3bariPcd (src.cpp.o.js:5394:12) + at __Z3FooIiEvv (src.cpp.o.js:5417:4) + at Object._main (src.cpp.o.js:5404:2) + at Object.callMain (src.cpp.o.js:71344:30) + at doRun (src.cpp.o.js:71383:25) + at run (src.cpp.o.js:71396:5) + at Object.<anonymous> (src.cpp.o.js:71439:1) + at Module._compile (module.js:456:26) */ +#ifdef RUN_FROM_JS_SHELL + MYASSERT(!!strstr(str, "at __Z3bariPcd (src.cpp"), "Callstack was %s!", str); + MYASSERT(!!strstr(str, "at __Z3FooIiEvv (src.cpp"), "Callstack was %s!", str); +#else + MYASSERT(!!strstr(str, "at __Z3bariPcd (page.js"), "Callstack was %s!", str); + MYASSERT(!!strstr(str, "at __Z3FooIiEvv (page.js"), "Callstack was %s!", str); +#endif +} + +template<typename T> +void __attribute__((noinline)) Foo() // Arbitrary function signature to add some content to callstack. +{ + bar(); +} + +int main() +{ + Foo<int>(); +#ifndef RUN_FROM_JS_SHELL + REPORT_RESULT(); + return 0; +#else + if (result) + printf("Success!\n"); +#endif +} diff --git a/tests/fuzz/13.c b/tests/fuzz/13.c new file mode 100644 index 00000000..623f0dee --- /dev/null +++ b/tests/fuzz/13.c @@ -0,0 +1,107 @@ +/* + * This is a RANDOMLY GENERATED PROGRAM. + * + * Generator: csmith 2.2.0 + * Git version: bf42ffd + * Options: --no-volatiles --no-math64 --no-packed-struct + * Seed: 4004715028 + */ + +#include "csmith.h" + + +static long __undefined; + +/* --- Struct/Union Declarations --- */ +/* --- GLOBAL VARIABLES --- */ +static uint16_t g_2[9][5] = {{1UL,65535UL,0xF90EL,1UL,65532UL},{1UL,1UL,0x4C8DL,1UL,1UL},{65532UL,65535UL,6UL,65529UL,65529UL},{0xF90EL,65532UL,0xF90EL,0x4C8DL,65529UL},{0xC891L,1UL,9UL,1UL,1UL},{65535UL,1UL,0xAA6EL,0xC891L,65532UL},{65526UL,65532UL,9UL,1UL,65535UL},{1UL,0xF90EL,0xF90EL,1UL,65526UL},{1UL,0xC891L,6UL,1UL,0xC891L}}; + + +/* --- FORWARD DECLARATIONS --- */ +static uint8_t func_1(void); + + +/* --- FUNCTIONS --- */ +/* ------------------------------------------ */ +/* + * reads : g_2 + * writes: + */ +static uint8_t func_1(void) +{ /* block id: 0 */ + return g_2[8][2]; +} + + + + +/* ---------------------------------------- */ +int main (int argc, char* argv[]) +{ + int i, j; + int print_hash_value = 0; + if (argc == 2 && strcmp(argv[1], "1") == 0) print_hash_value = 1; + platform_main_begin(); + crc32_gentab(); + func_1(); + for (i = 0; i < 9; i++) + { + for (j = 0; j < 5; j++) + { + transparent_crc(g_2[i][j], "g_2[i][j]", print_hash_value); + if (print_hash_value) printf("index = [%d][%d]\n", i, j); + + } + } + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} + +/************************ statistics ************************* +XXX max struct depth: 0 +breakdown: + depth: 0, occurrence: 1 +XXX total union variables: 0 + +XXX non-zero bitfields defined in structs: 0 +XXX zero bitfields defined in structs: 0 +XXX const bitfields defined in structs: 0 +XXX volatile bitfields defined in structs: 0 +XXX structs with bitfields in the program: 0 +breakdown: +XXX full-bitfields structs in the program: 0 +breakdown: +XXX times a bitfields struct's address is taken: 0 +XXX times a bitfields struct on LHS: 0 +XXX times a bitfields struct on RHS: 0 +XXX times a single bitfield on LHS: 0 +XXX times a single bitfield on RHS: 0 + +XXX max expression depth: 1 +breakdown: + depth: 1, occurrence: 1 + +XXX total number of pointers: 0 + +XXX times a non-volatile is read: 1 +XXX times a non-volatile is write: 0 +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: 0 +XXX backward jumps: 0 + +XXX stmts: 1 +XXX max block depth: 0 +breakdown: + depth: 0, occurrence: 1 + +XXX percentage a fresh-made variable is used: 100 +XXX percentage an existing variable is used: 0 +FYI: the random generator makes assumptions about the integer size. See platform.info for more details. +********************* end of statistics **********************/ + diff --git a/tests/fuzz/13.c.txt b/tests/fuzz/13.c.txt new file mode 100644 index 00000000..696a3908 --- /dev/null +++ b/tests/fuzz/13.c.txt @@ -0,0 +1 @@ +checksum = 3F436227 diff --git a/tests/fuzz/14.c b/tests/fuzz/14.c new file mode 100644 index 00000000..17e7ec5f --- /dev/null +++ b/tests/fuzz/14.c @@ -0,0 +1,2435 @@ +/* + * This is a RANDOMLY GENERATED PROGRAM. + * + * Generator: csmith 2.2.0 + * Git version: bf42ffd + * Options: --no-volatiles --no-math64 --no-packed-struct + * Seed: 695215668 + */ + +#include "csmith.h" + + +static long __undefined; + +/* --- Struct/Union Declarations --- */ +/* --- GLOBAL VARIABLES --- */ +static int8_t g_2 = 9L; +static uint8_t g_31[1] = {0x5BL}; +static int32_t g_36 = 0L; +static int32_t *g_37 = &g_36; +static int32_t g_59[9] = {0x5D8284A8L,0xF1AC28C4L,0x5D8284A8L,0xF1AC28C4L,0x5D8284A8L,0xF1AC28C4L,0x5D8284A8L,0xF1AC28C4L,0x5D8284A8L}; +static int32_t g_60[2][5][4] = {{{0x92628F0FL,0x92628F0FL,0x92628F0FL,0x92628F0FL},{0x92628F0FL,0x92628F0FL,0x92628F0FL,0x92628F0FL},{0x92628F0FL,0x92628F0FL,0x92628F0FL,0x92628F0FL},{0x92628F0FL,0x92628F0FL,0x92628F0FL,0x92628F0FL},{0x92628F0FL,0x92628F0FL,0x92628F0FL,0x92628F0FL}},{{0x92628F0FL,0x92628F0FL,0x92628F0FL,0x92628F0FL},{0x92628F0FL,0x92628F0FL,0x92628F0FL,0x92628F0FL},{0x92628F0FL,0x92628F0FL,0x92628F0FL,0x92628F0FL},{0x92628F0FL,0x92628F0FL,0x92628F0FL,0x92628F0FL},{0x92628F0FL,0x92628F0FL,0x92628F0FL,0x92628F0FL}}}; +static int32_t g_61 = 0xCBABA27FL; +static uint16_t g_69[9] = {0x26B3L,0x26B3L,0x26B3L,0x26B3L,0x26B3L,0x26B3L,0x26B3L,0x26B3L,0x26B3L}; +static int16_t g_124 = 1L; +static int8_t g_126 = 0x2EL; +static uint8_t g_131 = 246UL; +static uint32_t g_138[4] = {0x7CE49567L,0x7CE49567L,0x7CE49567L,0x7CE49567L}; +static uint16_t g_145 = 0xDE95L; +static int32_t * const g_146 = &g_60[0][4][3]; +static int32_t g_358 = (-1L); +static int32_t g_360 = (-1L); +static uint32_t g_408[6][10] = {{0x1EE3AD7CL,0x1EE3AD7CL,0x1EE3AD7CL,0x1EE3AD7CL,0x1EE3AD7CL,0x1EE3AD7CL,0x1EE3AD7CL,0x1EE3AD7CL,0x1EE3AD7CL,0x1EE3AD7CL},{0x1EE3AD7CL,0x1EE3AD7CL,0x1EE3AD7CL,0x1EE3AD7CL,0x1EE3AD7CL,0x1EE3AD7CL,0x1EE3AD7CL,0x1EE3AD7CL,0x1EE3AD7CL,0x1EE3AD7CL},{0x1EE3AD7CL,0x1EE3AD7CL,0x1EE3AD7CL,0x1EE3AD7CL,0x1EE3AD7CL,0x1EE3AD7CL,0x1EE3AD7CL,0x1EE3AD7CL,0x1EE3AD7CL,0x1EE3AD7CL},{0x1EE3AD7CL,0x1EE3AD7CL,0x1EE3AD7CL,0x1EE3AD7CL,0x1EE3AD7CL,0x1EE3AD7CL,0x1EE3AD7CL,0x1EE3AD7CL,0x1EE3AD7CL,0x1EE3AD7CL},{0x1EE3AD7CL,0x1EE3AD7CL,0x1EE3AD7CL,0x1EE3AD7CL,0x1EE3AD7CL,0x1EE3AD7CL,0x1EE3AD7CL,0x1EE3AD7CL,0x1EE3AD7CL,0x1EE3AD7CL},{0x1EE3AD7CL,0x1EE3AD7CL,0x1EE3AD7CL,0x1EE3AD7CL,0x1EE3AD7CL,0x1EE3AD7CL,0x1EE3AD7CL,0x1EE3AD7CL,0x1EE3AD7CL,0x1EE3AD7CL}}; +static int8_t g_415 = 0x70L; +static uint32_t *g_434 = &g_138[3]; +static int8_t **g_435 = (void*)0; +static uint32_t g_436 = 0x61B69271L; +static int32_t **g_455 = (void*)0; +static int32_t ***g_454 = &g_455; +static int8_t g_510 = 0xF4L; +static int32_t *g_514 = &g_59[1]; +static uint8_t *g_659 = (void*)0; +static uint8_t **g_658[5] = {&g_659,&g_659,&g_659,&g_659,&g_659}; +static uint16_t *g_713 = &g_69[6]; +static uint16_t **g_712 = &g_713; +static int16_t g_775 = 0x1E63L; +static const uint16_t g_961 = 0UL; +static uint16_t ** const *g_993 = &g_712; +static uint16_t ** const * const *g_992 = &g_993; +static int32_t g_1096[1] = {0x8DF1AA83L}; +static int32_t g_1202 = 0x400DAD15L; +static uint16_t g_1250 = 65535UL; +static uint32_t g_1312 = 0x3F36EED0L; +static uint16_t ***g_1324 = &g_712; +static uint32_t g_1484 = 18446744073709551612UL; +static uint32_t *g_1483 = &g_1484; +static uint16_t g_1509 = 0x40B6L; +static int32_t *g_1591[6][7] = {{&g_360,&g_360,&g_360,&g_360,&g_360,&g_360,&g_360},{&g_360,&g_360,&g_360,&g_360,&g_360,&g_360,&g_360},{&g_360,&g_360,&g_360,&g_360,&g_360,&g_360,&g_360},{&g_360,&g_360,&g_360,&g_360,&g_360,&g_360,&g_360},{&g_360,&g_360,&g_360,&g_360,&g_360,&g_360,&g_360},{&g_360,&g_360,&g_360,&g_360,&g_360,&g_360,&g_360}}; +static int32_t **g_1590 = &g_1591[5][6]; +static uint16_t g_1758[6][9][3] = {{{0UL,0xC542L,0xD8C5L},{0xC7C1L,0xC7C1L,7UL},{0xAF46L,9UL,0UL},{5UL,1UL,0x6937L},{3UL,0xCD4DL,1UL},{0x6937L,5UL,0x6937L},{0x0379L,0x9AA8L,0UL},{0UL,65535UL,7UL},{0UL,0x0FA7L,0xD8C5L}},{{0x294EL,0UL,0UL},{0UL,65526UL,3UL},{0UL,0x4878L,0xC7C1L},{0x0379L,0x8A66L,0UL},{0x6937L,7UL,65535UL},{3UL,0x8A66L,1UL},{5UL,0x4878L,65532UL},{0xAF46L,65526UL,0UL},{0xC7C1L,0UL,0x4878L}},{{0UL,0x0FA7L,0UL},{65530UL,65535UL,65532UL},{65532UL,0x9AA8L,1UL},{0UL,5UL,65535UL},{3UL,0x2348L,7UL},{0x294EL,65532UL,7UL},{0UL,0xCD4DL,1UL},{65535UL,7UL,0x294EL},{1UL,0x0FA7L,65532UL}},{{7UL,7UL,5UL},{0x0379L,0xCD4DL,0xD8C5L},{65530UL,65532UL,0x4878L},{1UL,0x2348L,0UL},{0x4878L,65530UL,0x4878L},{65535UL,65526UL,0xD8C5L},{0x6937L,1UL,5UL},{7UL,0x8290L,65532UL},{0xC7C1L,0x294EL,0x294EL}},{{7UL,0x7770L,1UL},{0x6937L,0UL,7UL},{65535UL,0xC542L,7UL},{0x4878L,5UL,0UL},{1UL,0xC542L,0xAF46L},{65530UL,0UL,65535UL},{0x0379L,0x7770L,1UL},{7UL,0x294EL,0UL},{1UL,0x8290L,1UL}},{{65535UL,1UL,65535UL},{0UL,65526UL,0xAF46L},{0x294EL,65530UL,0UL},{3UL,0x2348L,7UL},{0x294EL,65532UL,7UL},{0UL,0xCD4DL,1UL},{65535UL,7UL,0x294EL},{1UL,0x0FA7L,65532UL},{7UL,7UL,5UL}}}; +static int16_t g_1847 = 0x0129L; +static int16_t *g_1846 = &g_1847; +static const int32_t g_1959 = (-6L); +static int16_t **g_2019 = (void*)0; +static uint16_t g_2057[7][8] = {{0x80D1L,65533UL,0xF5B1L,1UL,0xF5B1L,65533UL,0x80D1L,0x80D1L},{65533UL,1UL,0x152EL,0x152EL,1UL,65533UL,0x3260L,65533UL},{1UL,65533UL,0x3260L,65533UL,1UL,0x152EL,0x152EL,1UL},{65533UL,0x80D1L,0x80D1L,65533UL,0xF5B1L,1UL,0xF5B1L,65533UL},{0x80D1L,0xF5B1L,0x80D1L,0x152EL,0x3260L,0x3260L,0x152EL,0x80D1L},{0xF5B1L,0xF5B1L,0x3260L,1UL,0UL,1UL,0x3260L,0xF5B1L},{0xF5B1L,0x80D1L,0x152EL,0x3260L,0x3260L,0x152EL,0x80D1L,0xF5B1L}}; +static int32_t **** const *g_2075 = (void*)0; +static int32_t ** const **g_2127 = (void*)0; +static int16_t g_2156 = 0xBBD0L; +static uint8_t ***g_2219 = (void*)0; +static int16_t g_2225[10] = {5L,5L,5L,5L,5L,5L,5L,5L,5L,5L}; +static int32_t g_2234 = (-1L); +static int32_t g_2236 = 0xBA7E2085L; +static int8_t g_2239 = 0xEBL; +static int8_t *g_2246 = &g_510; +static uint8_t g_2387[3][3] = {{255UL,249UL,255UL},{255UL,255UL,255UL},{255UL,249UL,255UL}}; +static const int16_t g_2451 = 0x2C58L; +static uint8_t ***** const g_2561 = (void*)0; +static const int32_t *g_2575 = &g_36; +static int8_t ** const ** const g_2675 = (void*)0; +static uint8_t * const ***g_2799 = (void*)0; +static uint32_t g_2907 = 0x8E6C6828L; +static const uint32_t g_3051 = 0UL; +static int8_t ***** const g_3152 = (void*)0; +static int8_t ***** const *g_3151 = &g_3152; +static int8_t g_3207[10] = {0xB9L,(-7L),0xB9L,0xB9L,(-7L),0xB9L,0xB9L,(-7L),0xB9L,0xB9L}; +static uint32_t g_3271 = 0UL; +static uint32_t g_3299 = 0x6396F30FL; +static int32_t ****g_3325[2] = {&g_454,&g_454}; +static uint8_t g_3397 = 0x67L; +static uint8_t g_3398 = 1UL; + + +/* --- FORWARD DECLARATIONS --- */ +static uint32_t func_1(void); +static const int32_t func_3(const uint32_t p_4, int32_t p_5, const int16_t p_6); +static uint32_t func_7(int8_t p_8, int16_t p_9, int32_t p_10, int16_t p_11, int32_t p_12); +static int32_t func_13(int32_t p_14, int32_t p_15, int16_t p_16, uint16_t p_17); +static int32_t func_19(int32_t p_20, uint32_t p_21, const int32_t p_22, int32_t p_23, int32_t p_24); +static int32_t * const func_32(int32_t * p_33); +static uint8_t func_41(int32_t ** p_42, int32_t * p_43); +static int32_t ** func_44(const int16_t p_45, uint16_t p_46, uint16_t p_47, int8_t p_48); +static uint32_t func_49(uint16_t p_50, int32_t ** const p_51, int32_t p_52, int8_t p_53, uint8_t p_54); +static uint32_t func_57(int16_t p_58); + + +/* --- FUNCTIONS --- */ +/* ------------------------------------------ */ +/* + * reads : g_2 g_37 g_145 g_1250 g_69 g_713 g_434 g_2387 g_1846 g_1847 g_993 g_712 g_1590 g_1591 g_61 g_138 g_1324 g_992 g_1758 g_2246 g_510 g_2675 g_146 g_514 g_59 g_454 g_455 g_435 g_36 g_60 g_2236 g_1509 g_3051 g_408 g_131 g_436 g_2225 g_360 g_2575 g_3151 g_124 g_3207 g_1483 g_1484 g_2239 g_3271 g_126 g_3299 g_3325 g_3397 g_3398 + * writes: g_2234 g_36 g_145 g_1250 g_138 g_69 g_1591 g_61 g_131 g_1847 g_1758 g_2225 g_31 g_60 g_59 g_2236 g_1509 g_436 g_2387 g_713 g_408 g_37 g_124 g_510 g_1312 g_2239 g_455 g_126 g_3299 g_1484 g_658 g_3398 + */ +static uint32_t func_1(void) +{ /* block id: 0 */ + int32_t l_26 = 0xF4039EE4L; + int32_t l_3026[7][3] = {{0x1A749151L,0x425EA4C2L,0x425EA4C2L},{(-1L),0x425EA4C2L,0x97D45EBDL},{0xE085E4B3L,0x425EA4C2L,(-1L)},{0x7AAD61BDL,0x7AAD61BDL,(-1L)},{0x425EA4C2L,0x97D45EBDL,(-3L)},{0xE085E4B3L,0x7AAD61BDL,0xE085E4B3L},{0xE085E4B3L,0x425EA4C2L,0x7AAD61BDL}}; + int8_t l_3266[10][5][2] = {{{0x10L,0x85L},{0x85L,0x10L},{0x85L,0x85L},{0x10L,0x85L},{0x85L,0x10L}},{{0x85L,0x85L},{0x10L,0x85L},{0x85L,0x10L},{0x85L,0x85L},{0x10L,0x85L}},{{0x85L,0x10L},{0x85L,0x85L},{0x10L,0x85L},{0x85L,0x10L},{0x85L,0x85L}},{{0x10L,0x85L},{0x85L,0x10L},{0x85L,0x85L},{0x10L,0x85L},{0x85L,0x10L}},{{0x85L,0x85L},{0x10L,0x85L},{0x85L,0x10L},{0x85L,0x85L},{0x10L,0x85L}},{{0x85L,0x10L},{0x85L,0x85L},{0x10L,0x85L},{0x85L,0x10L},{0x85L,0x85L}},{{0x10L,0x85L},{0x85L,0x10L},{0x85L,0x85L},{0x10L,0x85L},{0x85L,0x10L}},{{0x85L,0x85L},{0x10L,0x85L},{0x85L,0x10L},{0x85L,0x85L},{0x10L,0x85L}},{{0x85L,0x10L},{0x85L,0x85L},{0x10L,0x85L},{0x85L,0x10L},{0x85L,0x85L}},{{0x10L,0x85L},{0x85L,0x10L},{0x85L,0x85L},{0x10L,0x85L},{0x85L,0x10L}}}; + int32_t * const *l_3293 = &g_514; + int32_t * const **l_3292 = &l_3293; + int32_t * const ***l_3291 = &l_3292; + uint8_t *l_3327 = &g_31[0]; + uint16_t l_3340 = 0x2D69L; + uint16_t l_3380 = 0x6577L; + int8_t **l_3395[6]; + int i, j, k; + for (i = 0; i < 6; i++) + l_3395[i] = &g_2246; + if (g_2) + { /* block id: 1 */ + uint8_t l_18 = 0x0EL; + int32_t l_25 = (-5L); + l_3026[0][0] = func_3(func_7(g_2, g_2, (l_3026[1][2] |= (0x6F7FBF21L > func_13(l_18, func_19(((l_25 = (((l_18 <= g_2) && (0x0A9B27FAL && (l_18 > 0xC5A3D7F1L))) < 0x2530A9BCL)) == g_2), l_26, l_18, g_2, g_2), l_26, l_26))), l_18, l_18), l_18, l_18); + } + else + { /* block id: 1616 */ + uint32_t l_3127 = 8UL; + int32_t l_3138 = 0x0C4C8D53L; + int32_t l_3153 = 0x33A3E34BL; + int32_t **l_3155 = &g_37; + const int16_t l_3197 = 0xABAEL; + uint8_t l_3232 = 0xCDL; + const uint8_t *l_3242 = &g_2387[2][1]; + const uint8_t * const *l_3241 = &l_3242; + int32_t * const l_3286 = &g_36; + uint32_t l_3302 = 6UL; + for (g_145 = (-20); (g_145 <= 3); g_145++) + { /* block id: 1619 */ + int16_t l_3147[9] = {0L,0L,0L,0L,0L,0L,0L,0L,0L}; + int i; + (*g_146) = (l_3127 , 1L); + if ((*g_2575)) + continue; + for (g_131 = (-12); (g_131 <= 1); g_131 = safe_add_func_uint16_t_u_u(g_131, 1)) + { /* block id: 1624 */ + uint32_t *l_3148 = &g_408[2][6]; + int16_t l_3154 = 0x527AL; + (*g_514) ^= ((*g_146) = (safe_mul_func_uint16_t_u_u((safe_rshift_func_int16_t_s_s(0xD70CL, (((*g_434) , (--(*g_713))) & (safe_sub_func_uint16_t_u_u(((l_3138 &= (*g_1846)) & 0xAD6EL), (l_3127 != (((((safe_sub_func_uint8_t_u_u((0x27E1980DL < (((safe_mod_func_int16_t_s_s((l_3153 ^= (safe_add_func_int8_t_s_s((safe_mod_func_uint32_t_u_u((l_3147[5] | (-5L)), ((*l_3148)++))), (((((((void*)0 == g_3151) , 2L) , l_3147[5]) < (*g_1846)) >= l_3147[5]) | 0x77L)))), l_3154)) > l_3127) == 0L)), l_3154)) ^ (*g_434)) , l_3026[1][2]) >= l_3154) , l_3154))))))), (*g_1846)))); + } + } + (*l_3155) = &l_3153; + if ((+0xFF1AF652L)) + { /* block id: 1634 */ + int32_t *l_3156[5]; + uint8_t ***l_3173 = &g_658[2]; + int8_t **l_3181 = &g_2246; + const int16_t l_3183 = (-1L); + int32_t l_3243 = 5L; + uint32_t l_3267 = 4294967288UL; + int i; + for (i = 0; i < 5; i++) + l_3156[i] = &g_36; + (*l_3155) = &l_3026[0][0]; + for (g_124 = 0; (g_124 > (-8)); g_124--) + { /* block id: 1638 */ + uint32_t l_3178 = 0xC9609AEAL; + int8_t l_3179[1][5]; + uint32_t l_3180 = 18446744073709551612UL; + int32_t l_3182 = (-1L); + uint16_t **l_3227 = (void*)0; + int32_t *l_3260[8] = {&g_358,&g_358,&g_1096[0],&g_358,&g_358,&g_1096[0],&g_358,&g_358}; + int32_t l_3265 = (-7L); + uint16_t *l_3276[7] = {&g_1758[2][3][0],&g_1250,&g_1758[2][3][0],&g_1758[2][3][0],&g_1250,&g_1758[2][3][0],&g_1758[2][3][0]}; + int8_t *l_3277 = &g_126; + int32_t * const *l_3278 = &g_146; + int i, j; + for (i = 0; i < 1; i++) + { + for (j = 0; j < 5; j++) + l_3179[i][j] = 0x60L; + } + (*g_514) ^= ((l_26 && ((safe_sub_func_int32_t_s_s(((*g_37) != (((safe_rshift_func_uint8_t_u_s(((-1L) ^ (safe_rshift_func_uint8_t_u_s((safe_mul_func_uint16_t_u_u(l_3026[1][2], (0xE2F6L <= (((((l_3182 = (safe_sub_func_int32_t_s_s((safe_rshift_func_int16_t_s_s((**l_3155), (((*g_434) ^= ((safe_rshift_func_int8_t_s_s(((*g_2246) &= ((l_3173 == &g_658[2]) != (((((safe_div_func_uint32_t_u_u((safe_div_func_int32_t_s_s(((l_3178 ^ l_3178) | (**l_3155)), l_3179[0][0])), 4294967295UL)) == (**l_3155)) | l_3180) , l_3181) != &g_2246))), 4)) == l_3178)) != (**l_3155)))), 4294967295UL))) , (*g_454)) != &l_3156[1]) && l_3183) , 0UL)))), 4))), (**l_3155))) == 0x78F00C48L) || (**g_712))), 9L)) == 0x17DDD041L)) != 0x7496L); + for (l_3178 = 26; (l_3178 != 20); l_3178--) + { /* block id: 1645 */ + uint8_t l_3231 = 0x9BL; + int16_t l_3268 = (-1L); + for (g_1312 = (-17); (g_1312 >= 7); g_1312 = safe_add_func_int8_t_s_s(g_1312, 5)) + { /* block id: 1648 */ + uint32_t *l_3198 = &g_408[2][6]; + const uint16_t *l_3229 = &g_2057[5][1]; + const uint16_t **l_3228 = &l_3229; + int32_t l_3230 = 0x605411FEL; + int8_t *l_3233 = (void*)0; + uint8_t **l_3240 = &g_659; + l_3156[1] = (((*l_3198) |= ((safe_lshift_func_int16_t_s_s((safe_mul_func_int8_t_s_s(((l_3179[0][4] <= (0L == (*g_1846))) & (safe_lshift_func_int8_t_s_s((**l_3155), (((((l_26 , (safe_div_func_uint8_t_u_u((((*g_2246) , ((*g_514) = (safe_unary_minus_func_int32_t_s(((*g_1846) > 0x8D74L))))) || ((*g_434) ^ (*g_434))), 0x0AL))) > l_3197) & l_3179[0][0]) , 0x7BL) && 0UL)))), 0x3FL)), l_26)) != 0xFF74B1E8L)) , (*l_3155)); + (*g_146) |= (safe_mod_func_int16_t_s_s((safe_mul_func_uint16_t_u_u(((safe_mod_func_uint32_t_u_u((safe_add_func_uint16_t_u_u(g_3207[7], (safe_unary_minus_func_int16_t_s((((safe_sub_func_uint16_t_u_u((safe_mod_func_uint8_t_u_u((safe_mod_func_int32_t_s_s((safe_mod_func_int8_t_s_s((g_2239 &= ((((*g_1846) && (0xBCL && ((~(((((safe_mod_func_int16_t_s_s(((*g_1846) &= (safe_lshift_func_uint16_t_u_u((safe_rshift_func_uint8_t_u_u((((safe_sub_func_uint32_t_u_u(((safe_add_func_int16_t_s_s((((**l_3155) == (*g_2246)) != (l_3227 == l_3228)), (0xF5E6L & (0xCC5E7D7EL != l_3230)))) <= 0xD3L), (*g_2575))) == (**l_3155)) >= l_3231), l_3178)), 11))), l_3026[1][2])) < 0x6C78F6E4L) <= l_3232) , l_3179[0][0]) , (*g_1483))) , 0x5EL))) ^ 0xDC82L) < 0x6ACCL)), l_3026[1][1])), (**l_3155))), 0x50L)), (***g_993))) && (***g_1324)) , (-8L)))))), l_3179[0][2])) , 0x38A6L), (****g_992))), l_3179[0][0])); + (*g_514) |= (~((!(l_3230 > ((l_3230 , ((*g_2246) || l_3182)) , (safe_add_func_uint16_t_u_u((((safe_mul_func_uint16_t_u_u(((**l_3155) , ((***g_1324) = ((safe_rshift_func_uint16_t_u_s((((l_3240 == l_3241) , l_3243) , (safe_rshift_func_int16_t_s_s(((*g_1846) &= (l_3231 < 0xE8F6L)), l_3230))), l_3230)) , l_3230))), (**l_3155))) < l_3230) < (**l_3155)), l_3230))))) == (-1L))); + (*g_514) = ((*g_146) = ((**l_3155) = (((safe_sub_func_uint8_t_u_u((safe_mul_func_uint8_t_u_u(1UL, (*g_2246))), (((((((*l_3198) = (safe_add_func_uint16_t_u_u((safe_lshift_func_int8_t_s_u(0xDBL, 7)), ((safe_div_func_int8_t_s_s((safe_div_func_int32_t_s_s((safe_rshift_func_uint16_t_u_s((l_3173 != ((l_3156[1] == l_3260[3]) , (void*)0)), 0)), (((safe_mul_func_uint8_t_u_u((((l_3265 = ((safe_mul_func_int8_t_s_s((l_3230 | 7L), (*g_2246))) ^ l_3230)) | (*g_2575)) != l_3266[7][2][0]), l_3267)) | l_3182) , 0xC94E0367L))), l_3268)) >= 251UL)))) >= (**l_3155)) && 246UL) == l_3268) ^ 0x6F59L) | (**l_3155)))) | 0x97L) == l_3230))); + } + (*g_514) = (**l_3155); + (*g_454) = (*g_454); + if (l_3026[1][2]) + break; + } + (*g_146) = (((((safe_rshift_func_int8_t_s_u(((**l_3181) = g_3271), 3)) && (*g_434)) , (**g_712)) ^ (**l_3155)) == ((*g_454) != ((safe_lshift_func_uint8_t_u_s((safe_lshift_func_uint16_t_u_u(3UL, (l_26 | (l_3182 = l_3179[0][0])))), ((*l_3277) ^= 0xE3L))) , l_3278))); + } + } + else + { /* block id: 1673 */ + int8_t l_3279 = 0x05L; + int32_t l_3298 = 1L; + int16_t l_3328 = (-2L); + int8_t l_3378 = 0x76L; + const uint32_t l_3379 = 9UL; + int8_t l_3384 = 0xF5L; + (*g_37) = (*g_514); + l_3138 |= (~(**l_3155)); + if (((*g_146) = l_3279)) + { /* block id: 1677 */ + int32_t ****l_3294[1][4][5] = {{{&g_454,&g_454,(void*)0,&g_454,&g_454},{(void*)0,&g_454,(void*)0,(void*)0,&g_454},{&g_454,(void*)0,(void*)0,&g_454,(void*)0},{&g_454,&g_454,&g_454,&g_454,&g_454}}}; + const uint8_t * const **l_3317[9] = {&l_3241,&l_3241,&l_3241,&l_3241,&l_3241,&l_3241,&l_3241,&l_3241,&l_3241}; + const uint8_t * const ***l_3316 = &l_3317[1]; + int i, j, k; + if ((safe_unary_minus_func_int16_t_s(((*g_1846) = ((&g_3271 != (void*)0) > (*g_1846)))))) + { /* block id: 1679 */ + int32_t * const l_3281[8] = {&g_36,&g_36,&g_36,&g_36,&g_36,&g_36,&g_36,&g_36}; + int32_t **l_3282 = (void*)0; + int32_t **l_3283 = &g_37; + int i; + (*l_3283) = l_3281[5]; + (*l_3283) = ((((*g_2575) > 0xB5BFD70DL) || (safe_div_func_uint32_t_u_u(((void*)0 != l_3286), (safe_add_func_uint8_t_u_u(((safe_rshift_func_int16_t_s_s(((((l_3291 == l_3294[0][0][2]) > ((safe_add_func_int16_t_s_s(((****l_3291) >= (l_3279 <= (((safe_unary_minus_func_uint8_t_u((**l_3283))) || 0x4EL) , (-1L)))), (*g_1846))) , l_3279)) != (*g_434)) , l_3279), 0)) , 5UL), (-5L)))))) , (*l_3283)); + g_3299++; + } + else + { /* block id: 1683 */ + uint32_t l_3307[9] = {0x1754E157L,0x1754E157L,0x1754E157L,0x1754E157L,0x1754E157L,0x1754E157L,0x1754E157L,0x1754E157L,0x1754E157L}; + uint8_t ****l_3318 = &g_2219; + int i; + --l_3302; + if ((*g_146)) + { /* block id: 1685 */ + int32_t *** const **l_3319 = (void*)0; + int32_t *** const **l_3320 = (void*)0; + int32_t **l_3324 = &g_514; + int32_t *** const l_3323 = &l_3324; + int32_t *** const *l_3322[10][5] = {{&l_3323,&l_3323,&l_3323,&l_3323,&l_3323},{&l_3323,&l_3323,&l_3323,(void*)0,(void*)0},{&l_3323,&l_3323,&l_3323,&l_3323,&l_3323},{(void*)0,&l_3323,&l_3323,(void*)0,&l_3323},{(void*)0,(void*)0,&l_3323,&l_3323,&l_3323},{&l_3323,&l_3323,&l_3323,&l_3323,&l_3323},{&l_3323,&l_3323,&l_3323,&l_3323,&l_3323},{&l_3323,&l_3323,&l_3323,&l_3323,&l_3323},{&l_3323,(void*)0,&l_3323,&l_3323,(void*)0},{&l_3323,&l_3323,&l_3323,&l_3323,&l_3323}}; + int32_t *** const **l_3321 = &l_3322[9][1]; + int16_t l_3326 = 0x5EE0L; + int i, j; + (**l_3324) = (((l_3307[7] && (safe_rshift_func_int8_t_s_u(((((((((((void*)0 == &g_1846) <= ((safe_lshift_func_int16_t_s_u((safe_add_func_int8_t_s_s((((*g_1483) = (0x6558BEDCL > (*g_434))) , ((*g_2246) = (safe_lshift_func_uint16_t_u_s((l_3316 == l_3318), 11)))), (****l_3291))), ((((((*l_3321) = &g_454) == g_3325[0]) || l_3298) > (*g_434)) == l_3326))) , (-1L))) & (*g_514)) , (void*)0) != l_3327) & 0xA7L) == (***l_3292)) | (*g_434)) ^ (*g_146)), 3))) && 0L) != l_3298); + (**l_3293) |= l_3328; + } + else + { /* block id: 1691 */ + (****l_3291) = (((void*)0 != &g_124) , (safe_sub_func_uint16_t_u_u((**g_712), (*g_1846)))); + } + } + for (l_3138 = 0; (l_3138 <= (-17)); l_3138 = safe_sub_func_uint8_t_u_u(l_3138, 3)) + { /* block id: 1697 */ + (*g_514) ^= (*g_2575); + } + } + else + { /* block id: 1700 */ + uint8_t l_3339[9] = {251UL,251UL,251UL,251UL,251UL,251UL,251UL,251UL,251UL}; + int i; + (*g_514) &= ((safe_mul_func_int8_t_s_s((((safe_mul_func_uint16_t_u_u((safe_div_func_uint32_t_u_u(4294967295UL, l_3339[8])), (((l_3340 = (9L && 250UL)) & ((l_3339[5] , ((safe_sub_func_int16_t_s_s(((-10L) ^ ((*g_434)--)), 7UL)) > (((((**g_712) | (&g_454 != (void*)0)) > l_3339[8]) , l_3339[8]) < 0xF9L))) , 0x7C37L)) <= l_3339[2]))) , l_3339[0]) && (*g_2246)), 0x6CL)) && l_3339[3]); + } + for (g_2239 = (-16); (g_2239 <= (-26)); g_2239--) + { /* block id: 1707 */ + uint8_t l_3383[4][5][8] = {{{0x22L,0x97L,247UL,0xC9L,0xC9L,247UL,0x97L,0x22L},{0xE5L,250UL,0x1FL,0x75L,9UL,255UL,1UL,3UL},{0xA8L,0xE3L,0x97L,4UL,0x75L,255UL,0UL,0x09L},{1UL,250UL,0x1EL,1UL,252UL,247UL,0x1FL,247UL},{0x09L,0x97L,252UL,0x97L,0x09L,0UL,250UL,0x1FL}},{{0UL,250UL,0x88L,1UL,1UL,0x0BL,0x65L,0x97L},{0xC9L,0xA8L,0x88L,0UL,0x97L,0UL,250UL,0x1EL},{1UL,4UL,252UL,0x1FL,0x88L,0x88L,0x1FL,252UL},{9UL,9UL,0x1EL,250UL,0UL,0x97L,0UL,0x88L},{0x1EL,255UL,0x97L,0x65L,0x0BL,1UL,1UL,0x88L}},{{255UL,0x22L,0x1FL,250UL,0UL,0x09L,0x97L,252UL},{1UL,252UL,247UL,0x1FL,247UL,252UL,1UL,0x1EL},{0x1FL,0xF3L,0x09L,0UL,255UL,0x75L,4UL,0x97L},{0UL,0x09L,3UL,1UL,255UL,9UL,0x75L,0x1FL},{0x1FL,4UL,0x22L,0x97L,247UL,0xC9L,0xC9L,247UL}},{{1UL,1UL,1UL,1UL,0UL,4UL,0x88L,0x09L},{255UL,247UL,1UL,4UL,0x0BL,0x1EL,0xF3L,3UL},{0x1EL,247UL,0x65L,0x88L,1UL,0x22L,0x75L,0xF3L},{0x75L,0xC9L,0xE5L,250UL,4UL,250UL,0xE5L,0xC9L},{4UL,0x22L,9UL,4UL,0UL,0x75L,0x65L,247UL}}}; + int32_t *l_3387 = &l_3298; + int32_t ***l_3393 = &g_455; + int i, j, k; + for (g_436 = 0; (g_436 >= 58); g_436 = safe_add_func_uint8_t_u_u(g_436, 9)) + { /* block id: 1710 */ + uint8_t l_3350 = 0UL; + int16_t l_3382 = 0x906CL; + const uint8_t l_3390 = 1UL; + int32_t ** const *l_3396 = &g_455; + if (l_3279) + { /* block id: 1711 */ + uint8_t ***l_3349 = &g_658[2]; + int32_t l_3355 = 0xE58C1806L; + uint32_t l_3381 = 0x8D96A914L; + int32_t **l_3385[4]; + int32_t **l_3386 = &g_37; + int i; + for (i = 0; i < 4; i++) + l_3385[i] = &g_514; + (*l_3349) = &g_659; + l_3384 = (l_3350 || (safe_mul_func_uint16_t_u_u((((safe_div_func_int32_t_s_s(((l_3355 <= (*g_713)) , (l_3350 < (safe_rshift_func_uint8_t_u_u((((void*)0 == &g_2799) && (**l_3155)), 0)))), (safe_mul_func_int8_t_s_s(((*g_2246) = (safe_add_func_int16_t_s_s((safe_mul_func_int16_t_s_s((safe_add_func_int8_t_s_s(((safe_lshift_func_int16_t_s_s((((safe_rshift_func_uint8_t_u_u((safe_sub_func_int8_t_s_s((safe_rshift_func_uint16_t_u_s((((((*g_713) == (((((((safe_rshift_func_int16_t_s_s(((((*g_1846) = (*g_1846)) | g_2236) < 0x4AL), l_3378)) & (*g_2246)) || 0x10L) == l_3379) > 4294967289UL) && (-1L)) >= 1L)) < (**l_3155)) != (*g_434)) <= (*g_434)), 11)), (***l_3292))), 1)) == l_3380) , 0xF838L), (*l_3286))) > 1L), l_3381)), l_3382)), 0x3F1DL))), l_3383[0][1][7])))) ^ (-9L)) > (*g_434)), l_3383[3][2][6]))); + (*l_3386) = (**l_3292); + } + else + { /* block id: 1717 */ + int32_t ****l_3394 = &l_3393; + l_3387 = (void*)0; + (*g_146) = ((((**l_3293) >= (safe_mod_func_int8_t_s_s(((l_3390 ^ ((**l_3155) | ((((safe_mul_func_int16_t_s_s((((*l_3394) = l_3393) != ((l_3379 | (l_3395[4] != (void*)0)) , l_3396)), 5L)) & (*g_146)) >= (**l_3155)) & l_3298))) , (-1L)), (****l_3291)))) & 1L) ^ g_3397); + g_3398++; + } + } + } + } + } + return (****l_3291); +} + + +/* ------------------------------------------ */ +/* + * reads : g_1846 g_514 g_59 g_1509 g_434 g_138 g_3051 g_1847 g_408 g_37 g_36 g_131 g_712 g_713 g_69 g_436 g_2225 g_993 g_1590 g_1591 g_360 + * writes: g_1847 g_59 g_1509 g_138 g_131 g_36 g_436 g_2387 g_2225 g_713 + */ +static const int32_t func_3(const uint32_t p_4, int32_t p_5, const int16_t p_6) +{ /* block id: 1558 */ + int8_t l_3038[3][4][7] = {{{(-9L),(-8L),0x33L,(-1L),1L,1L,(-2L)},{1L,(-6L),(-1L),0xE3L,0x61L,0x0FL,0x58L},{(-1L),0xF9L,(-9L),1L,0x61L,(-6L),(-6L)},{1L,0x33L,1L,0x33L,1L,0x00L,0x13L}},{{1L,0x61L,0xB1L,0x31L,(-1L),0xB9L,8L},{1L,0xFEL,0L,(-4L),0xFBL,(-1L),0xB1L},{1L,0x31L,(-8L),1L,(-6L),(-1L),0xE3L},{1L,1L,(-2L),0xFBL,0x52L,(-7L),(-1L)}},{{(-1L),(-2L),0xCAL,0xFBL,1L,0xFEL,1L},{1L,0x00L,0x00L,1L,(-2L),0x58L,1L},{(-9L),1L,(-9L),(-4L),0L,0x31L,0x1AL},{0x00L,0x58L,(-6L),0x31L,0x0FL,0xE3L,1L}}}; + uint8_t *l_3071 = &g_2387[1][1]; + int32_t l_3080 = 0L; + int32_t l_3081 = 0x141AEC86L; + int32_t l_3082 = 4L; + int32_t l_3087[4] = {1L,1L,1L,1L}; + int8_t * const ***l_3105 = (void*)0; + int8_t * const ****l_3104 = &l_3105; + int8_t * const *****l_3106 = &l_3104; + uint16_t l_3107 = 0x130AL; + int16_t *l_3108 = &g_2225[6]; + uint16_t l_3122 = 65529UL; + int i, j, k; + (*g_514) ^= ((safe_lshift_func_uint16_t_u_s((safe_rshift_func_uint16_t_u_u(0x5884L, 4)), 7)) ^ (safe_mul_func_int16_t_s_s(((l_3038[1][1][5] > 249UL) <= p_4), ((*g_1846) = (0x837FL ^ 0xE54FL))))); + for (p_5 = (-20); (p_5 < (-18)); ++p_5) + { /* block id: 1563 */ + uint32_t l_3043 = 1UL; + int32_t l_3053 = 0x27A5B9B0L; + int32_t l_3079 = 0xBA3474DDL; + int32_t l_3083 = 0x0378FB79L; + int32_t l_3084 = 0x4EC607B8L; + int32_t l_3086 = 0x87B4D2E8L; + int32_t l_3088 = 5L; + int32_t l_3089 = 0xEFC3DAA0L; + int32_t l_3090 = 0xB68C8DD3L; + int32_t l_3091 = 1L; + int32_t l_3092 = (-1L); + int32_t l_3093[4][1][7] = {{{0x9167FBDEL,0x9167FBDEL,0x9167FBDEL,0x9167FBDEL,0x9167FBDEL,0x9167FBDEL,0x9167FBDEL}},{{0L,0L,0L,0L,0L,0L,0L}},{{0x9167FBDEL,0x9167FBDEL,0x9167FBDEL,0x9167FBDEL,0x9167FBDEL,0x9167FBDEL,0x9167FBDEL}},{{0L,0L,0L,0L,0L,0L,0L}}}; + uint32_t l_3094 = 18446744073709551615UL; + int i, j, k; + for (g_1509 = 0; (g_1509 <= 6); g_1509 += 1) + { /* block id: 1566 */ + uint32_t *l_3050 = &g_408[4][7]; + int32_t l_3052 = 0x71A954C8L; + uint8_t *l_3068 = &g_131; + int32_t ****l_3074 = &g_454; + int32_t *l_3075 = &g_60[0][4][3]; + int32_t *l_3076 = (void*)0; + int32_t *l_3077[2]; + int8_t l_3078 = 0x3FL; + int32_t l_3085[3][2][9] = {{{0L,0L,0L,0L,0L,0L,0L,0L,0L},{0x2A21343BL,0x2A21343BL,0x2A21343BL,0x2A21343BL,0x2A21343BL,0x2A21343BL,0x2A21343BL,0x2A21343BL,0x2A21343BL}},{{0L,0L,0L,0L,0L,0L,0L,0L,0L},{0x2A21343BL,0x2A21343BL,0x2A21343BL,0x2A21343BL,0x2A21343BL,0x2A21343BL,0x2A21343BL,0x2A21343BL,0x2A21343BL}},{{0L,0L,0L,0L,0L,0L,0L,0L,0L},{0x2A21343BL,0x2A21343BL,0x2A21343BL,0x2A21343BL,0x2A21343BL,0x2A21343BL,0x2A21343BL,0x2A21343BL,0x2A21343BL}}}; + int i, j, k; + for (i = 0; i < 2; i++) + l_3077[i] = &l_3052; + if ((safe_sub_func_int8_t_s_s(((l_3053 = (l_3043 < (safe_mod_func_int32_t_s_s(p_6, (((*g_434) = (*g_434)) ^ (l_3038[0][0][0] ^ (((1UL && (safe_sub_func_uint8_t_u_u(((((p_4 | p_5) , (safe_lshift_func_uint8_t_u_u(((void*)0 != l_3050), g_3051))) ^ l_3052) & 0x3911L), l_3038[1][1][5]))) | 0x33036F19L) , l_3052))))))) | 0x5FL), p_6))) + { /* block id: 1569 */ + for (l_3043 = 1; (l_3043 <= 5); l_3043 += 1) + { /* block id: 1572 */ + uint32_t l_3055 = 3UL; + int i, j; + for (g_1847 = 4; (g_1847 >= 0); g_1847 -= 1) + { /* block id: 1575 */ + int32_t l_3054 = 0xE1145BC8L; + int i, j; + (*g_514) = 0x27A2A679L; + if (g_408[g_1847][(g_1847 + 2)]) + continue; + --l_3055; + } + if (g_408[l_3043][(g_1509 + 3)]) + continue; + (*g_514) |= (*g_37); + } + if (l_3053) + break; + } + else + { /* block id: 1584 */ + (*g_514) ^= (-2L); + return p_5; + } + (*g_37) &= ((safe_div_func_int8_t_s_s((4L == l_3052), (safe_rshift_func_int8_t_s_s(((safe_mod_func_uint16_t_u_u((0xF60BDD11L | ((safe_rshift_func_uint8_t_u_s(((safe_lshift_func_int8_t_s_u(p_6, (++(*l_3068)))) <= ((*g_1846) ^= ((l_3071 != ((l_3068 == (void*)0) , (void*)0)) <= ((((safe_div_func_int32_t_s_s(((l_3053 = ((void*)0 != l_3074)) != p_5), 0x66F4258AL)) , 0xD0AF22D9L) , 0UL) >= 0x60F4L)))), l_3038[2][3][4])) , l_3043)), p_6)) >= p_4), 2)))) | (**g_712)); + --l_3094; + for (g_436 = 0; (g_436 <= 6); g_436 += 1) + { /* block id: 1595 */ + for (l_3092 = 6; (l_3092 >= 0); l_3092 -= 1) + { /* block id: 1598 */ + return p_4; + } + if (p_5) + break; + } + } + } + l_3087[0] = (safe_div_func_int32_t_s_s((((**g_993) = (((((*l_3108) &= ((*g_434) ^ (((safe_lshift_func_int8_t_s_s(p_4, 2)) ^ (safe_unary_minus_func_uint32_t_u(((-1L) == (safe_mul_func_uint8_t_u_u(((*l_3071) = 0x55L), ((l_3082 = ((*g_1846) = p_6)) | p_6))))))) , ((l_3080 & (((((((*l_3106) = l_3104) == (void*)0) , 0x7096EE73L) >= p_4) >= l_3107) != 0xC9CFL)) > l_3082)))) != p_4) , l_3081) , &l_3107)) != (void*)0), l_3080)); + (*g_514) &= ((((*g_37) = (safe_mod_func_uint16_t_u_u((safe_add_func_uint32_t_u_u((0xBB8BL | (p_6 <= (safe_mod_func_int8_t_s_s(p_6, ((safe_rshift_func_int16_t_s_u(0x7606L, (p_6 && l_3087[0]))) , (((((safe_div_func_int32_t_s_s((safe_rshift_func_int8_t_s_u(((safe_unary_minus_func_int32_t_s(l_3122)) , ((safe_div_func_int16_t_s_s(8L, l_3122)) != 0x444F67B9L)), l_3081)), 2L)) ^ (-1L)) > p_4) , (**g_1590)) , 0x96L)))))), l_3038[1][1][5])), p_6))) >= 0x6C7D49EBL) == 0xF40DL); + return l_3038[1][1][6]; +} + + +/* ------------------------------------------ */ +/* + * reads : g_2236 + * writes: g_2236 + */ +static uint32_t func_7(int8_t p_8, int16_t p_9, int32_t p_10, int16_t p_11, int32_t p_12) +{ /* block id: 1551 */ + uint16_t l_3029 = 0x94C3L; + for (g_2236 = (-17); (g_2236 > 22); g_2236++) + { /* block id: 1554 */ + l_3029++; + } + return l_3029; +} + + +/* ------------------------------------------ */ +/* + * reads : g_146 g_60 + * writes: + */ +static int32_t func_13(int32_t p_14, int32_t p_15, int16_t p_16, uint16_t p_17) +{ /* block id: 1548 */ + return (*g_146); +} + + +/* ------------------------------------------ */ +/* + * reads : g_37 g_145 g_1250 g_69 g_713 g_434 g_2387 g_1846 g_1847 g_993 g_712 g_1590 g_1591 g_61 g_138 g_1324 g_992 g_1758 g_2246 g_510 g_2675 g_146 g_514 g_59 g_454 g_455 g_435 g_36 + * writes: g_2234 g_36 g_145 g_1250 g_138 g_69 g_1591 g_61 g_131 g_1847 g_1758 g_2225 g_31 g_60 g_59 + */ +static int32_t func_19(int32_t p_20, uint32_t p_21, const int32_t p_22, int32_t p_23, int32_t p_24) +{ /* block id: 3 */ + uint16_t l_2271[8] = {0xDEC2L,0xDEC2L,0UL,0xDEC2L,0xDEC2L,0UL,0xDEC2L,0xDEC2L}; + int32_t l_2279 = 0x4E8C2824L; + int32_t l_2329 = 0x307D7E8CL; + int32_t l_2330 = 1L; + int32_t l_2331 = 1L; + int32_t l_2332 = 6L; + uint8_t l_2333[6][9][4] = {{{255UL,4UL,255UL,3UL},{0UL,0x56L,2UL,0UL},{246UL,3UL,0x97L,0x56L},{3UL,4UL,0x97L,0x97L},{246UL,246UL,2UL,0x5BL},{0UL,0x19L,255UL,0x56L},{255UL,0x56L,3UL,255UL},{246UL,0x56L,252UL,0x56L},{0x56L,0x19L,0x97L,0x5BL}},{{0x45L,246UL,3UL,0x97L},{0UL,4UL,5UL,0x56L},{0UL,3UL,3UL,0UL},{0x45L,0x56L,0x97L,3UL},{0x56L,4UL,252UL,0x5BL},{246UL,0x45L,3UL,0x5BL},{255UL,4UL,255UL,3UL},{0UL,0x56L,2UL,0UL},{246UL,3UL,0x97L,0x56L}},{{3UL,4UL,0x97L,0x97L},{246UL,246UL,2UL,0x5BL},{0UL,0x19L,255UL,0x56L},{255UL,0x56L,3UL,255UL},{246UL,0x56L,252UL,0x56L},{0x56L,0x19L,0x97L,0x5BL},{0x45L,246UL,3UL,0x97L},{0UL,4UL,5UL,0x56L},{0UL,3UL,3UL,0UL}},{{0x45L,0x56L,0x97L,3UL},{0x56L,4UL,252UL,0x5BL},{246UL,0x45L,3UL,0x5BL},{255UL,4UL,255UL,3UL},{0UL,0x56L,2UL,0UL},{246UL,3UL,0x97L,0x56L},{3UL,4UL,0x97L,0x97L},{246UL,246UL,2UL,0x5BL},{0UL,0x19L,255UL,0x56L}},{{255UL,0x56L,3UL,255UL},{246UL,0x56L,252UL,0x56L},{0x56L,0x19L,0x97L,0x5BL},{0x45L,246UL,3UL,0x97L},{0UL,4UL,5UL,0x56L},{0UL,3UL,3UL,0UL},{0x45L,0x56L,0x97L,3UL},{0x56L,4UL,252UL,0x5BL},{246UL,0x45L,3UL,0x5BL}},{{255UL,4UL,252UL,5UL},{0x97L,255UL,0UL,0x97L},{3UL,5UL,6UL,255UL},{5UL,0x45L,6UL,6UL},{3UL,3UL,0UL,0x19L},{0x97L,255UL,252UL,255UL},{252UL,255UL,5UL,252UL},{3UL,255UL,4UL,255UL},{255UL,255UL,6UL,0x19L}}}; + int16_t l_2338 = (-1L); + int32_t l_2339 = 0xCE9AC76DL; + int32_t l_2340 = 1L; + uint8_t **l_2352 = (void*)0; + int16_t l_2375 = 1L; + int8_t ***l_2396 = (void*)0; + int8_t ****l_2395 = &l_2396; + int32_t l_2405 = 0xE7CA1D27L; + int32_t l_2419 = 0xCAE5D46BL; + uint32_t l_2446 = 0x4AF43DC1L; + uint16_t **l_2486[2][9][10] = {{{&g_713,&g_713,&g_713,&g_713,&g_713,&g_713,&g_713,&g_713,&g_713,&g_713},{&g_713,&g_713,&g_713,&g_713,&g_713,&g_713,&g_713,&g_713,&g_713,&g_713},{&g_713,&g_713,&g_713,&g_713,&g_713,&g_713,&g_713,&g_713,&g_713,&g_713},{(void*)0,&g_713,&g_713,&g_713,&g_713,&g_713,&g_713,&g_713,&g_713,&g_713},{&g_713,&g_713,&g_713,&g_713,&g_713,&g_713,&g_713,&g_713,&g_713,&g_713},{&g_713,&g_713,&g_713,&g_713,&g_713,&g_713,&g_713,&g_713,&g_713,&g_713},{&g_713,&g_713,(void*)0,&g_713,&g_713,&g_713,&g_713,&g_713,&g_713,&g_713},{&g_713,&g_713,&g_713,&g_713,&g_713,&g_713,&g_713,&g_713,&g_713,&g_713},{(void*)0,&g_713,&g_713,(void*)0,&g_713,&g_713,&g_713,&g_713,&g_713,&g_713}},{{&g_713,&g_713,&g_713,&g_713,&g_713,&g_713,&g_713,&g_713,&g_713,&g_713},{&g_713,&g_713,&g_713,(void*)0,&g_713,&g_713,&g_713,&g_713,&g_713,&g_713},{&g_713,&g_713,&g_713,&g_713,&g_713,&g_713,&g_713,&g_713,&g_713,&g_713},{&g_713,&g_713,&g_713,&g_713,&g_713,&g_713,&g_713,&g_713,&g_713,&g_713},{&g_713,&g_713,&g_713,&g_713,&g_713,&g_713,&g_713,&g_713,&g_713,&g_713},{&g_713,&g_713,&g_713,&g_713,&g_713,(void*)0,&g_713,&g_713,&g_713,&g_713},{&g_713,&g_713,&g_713,&g_713,(void*)0,(void*)0,&g_713,&g_713,&g_713,&g_713},{&g_713,&g_713,&g_713,&g_713,&g_713,&g_713,&g_713,&g_713,&g_713,&g_713},{&g_713,&g_713,&g_713,&g_713,&g_713,&g_713,&g_713,&g_713,&g_713,&g_713}}}; + int32_t l_2528[2]; + uint8_t l_2534 = 0xC1L; + uint32_t l_2562 = 0xBBC01CAAL; + const int32_t **l_2615 = &g_2575; + const int32_t ***l_2614 = &l_2615; + int8_t l_2718 = 0x7FL; + int32_t l_2727 = 1L; + uint16_t l_2757 = 0xBD99L; + int32_t * const *l_2787[6]; + uint8_t ****l_2801 = (void*)0; + int16_t l_2802 = 0x2117L; + int16_t *l_2803 = &g_2225[9]; + const uint16_t l_2829 = 65529UL; + uint32_t * const l_2837 = (void*)0; + int32_t l_2854 = (-1L); + int16_t l_2994 = 0x4B9BL; + int32_t l_2995 = 0x159AF702L; + uint32_t l_3018 = 0x29CF6467L; + uint16_t ****l_3023 = &g_1324; + int i, j, k; + for (i = 0; i < 2; i++) + l_2528[i] = 0x408F1F41L; + for (i = 0; i < 6; i++) + l_2787[i] = &g_37; + for (p_21 = (-4); (p_21 == 4); p_21 = safe_add_func_int16_t_s_s(p_21, 3)) + { /* block id: 6 */ + const int16_t l_2281 = 0x5292L; + int32_t *l_2321 = &g_2234; + int32_t *l_2322 = (void*)0; + int32_t l_2323 = 0L; + int32_t *l_2324 = (void*)0; + int32_t *l_2325 = &g_60[0][0][2]; + int32_t *l_2326 = &l_2279; + int32_t *l_2327 = &g_60[0][4][3]; + int32_t *l_2328[1][4][10] = {{{&g_60[1][2][0],&g_61,&g_60[1][2][0],&g_60[1][2][0],&g_61,&g_60[1][2][0],&g_60[1][2][0],&g_61,&g_60[1][2][0],&g_60[1][2][0]},{&g_61,&g_61,&g_2236,&g_61,&g_61,&g_2236,&g_61,&g_61,&g_2236,&g_61},{&g_61,&g_60[1][2][0],&g_60[1][2][0],&g_61,&g_60[1][2][0],&g_60[1][2][0],&g_61,&g_60[1][2][0],&g_60[1][2][0],&g_61},{&g_60[1][2][0],&g_61,&g_60[1][2][0],&g_60[1][2][0],&g_61,&g_60[1][2][0],&g_60[1][2][0],&g_61,&g_60[1][2][0],&g_60[1][2][0]}}}; + int i, j, k; + for (p_20 = 11; (p_20 == (-22)); --p_20) + { /* block id: 9 */ + uint32_t **l_2265 = &g_434; + int32_t l_2282 = (-1L); + uint32_t l_2317 = 0UL; + int32_t *l_2320 = &l_2282; + for (p_23 = 0; (p_23 >= 0); p_23 -= 1) + { /* block id: 12 */ + int32_t *l_35[7][7] = {{&g_36,&g_36,&g_36,(void*)0,&g_36,&g_36,&g_36},{&g_36,&g_36,&g_36,&g_36,&g_36,&g_36,&g_36},{&g_36,&g_36,&g_36,&g_36,&g_36,&g_36,&g_36},{&g_36,(void*)0,&g_36,&g_36,(void*)0,&g_36,(void*)0},{&g_36,&g_36,&g_36,&g_36,&g_36,&g_36,&g_36},{&g_36,&g_36,&g_36,&g_36,&g_36,&g_36,&g_36},{&g_36,&g_36,(void*)0,&g_36,&g_36,&g_36,&g_36}}; + int32_t **l_34[9][10][2] = {{{&l_35[4][1],&l_35[1][3]},{&l_35[0][0],&l_35[1][3]},{&l_35[5][1],(void*)0},{(void*)0,&l_35[1][3]},{(void*)0,(void*)0},{&l_35[5][1],&l_35[1][3]},{&l_35[0][0],&l_35[1][3]},{&l_35[4][1],(void*)0},{&l_35[1][3],(void*)0},{(void*)0,&l_35[1][3]}},{{&l_35[4][1],&l_35[1][3]},{&l_35[1][3],&l_35[1][3]},{&l_35[4][1],&l_35[1][3]},{(void*)0,(void*)0},{&l_35[1][3],(void*)0},{&l_35[4][1],&l_35[1][3]},{&l_35[0][0],&l_35[1][3]},{&l_35[5][1],(void*)0},{(void*)0,&l_35[1][3]},{(void*)0,(void*)0}},{{&l_35[5][1],&l_35[1][3]},{&l_35[0][0],&l_35[1][3]},{&l_35[4][1],(void*)0},{&l_35[1][3],(void*)0},{(void*)0,&l_35[1][3]},{&l_35[4][1],&l_35[1][3]},{&l_35[1][3],&l_35[1][3]},{&l_35[4][1],&l_35[1][3]},{(void*)0,(void*)0},{&l_35[1][3],(void*)0}},{{&l_35[4][1],&l_35[1][3]},{&l_35[0][0],&l_35[1][3]},{&l_35[5][1],(void*)0},{(void*)0,&l_35[1][3]},{(void*)0,(void*)0},{&l_35[5][1],&l_35[1][3]},{&l_35[0][0],&l_35[1][3]},{&l_35[4][1],(void*)0},{&l_35[1][3],(void*)0},{(void*)0,&l_35[1][0]}},{{&l_35[1][3],&l_35[1][3]},{&l_35[5][6],&l_35[1][3]},{&l_35[1][3],&l_35[1][0]},{&l_35[1][3],&l_35[1][3]},{&l_35[2][1],&l_35[6][4]},{&l_35[1][3],&l_35[0][3]},{&l_35[5][1],&l_35[1][3]},{&l_35[1][3],&l_35[6][4]},{&l_35[1][3],&l_35[5][0]},{&l_35[1][3],&l_35[6][4]}},{{&l_35[1][3],&l_35[1][3]},{&l_35[5][1],&l_35[0][3]},{&l_35[1][3],&l_35[6][4]},{&l_35[2][1],&l_35[1][3]},{&l_35[1][3],&l_35[1][0]},{&l_35[1][3],&l_35[1][3]},{&l_35[5][6],&l_35[1][3]},{&l_35[1][3],&l_35[1][0]},{&l_35[1][3],&l_35[1][3]},{&l_35[2][1],&l_35[6][4]}},{{&l_35[1][3],&l_35[0][3]},{&l_35[5][1],&l_35[1][3]},{&l_35[1][3],&l_35[6][4]},{&l_35[1][3],&l_35[5][0]},{&l_35[1][3],&l_35[6][4]},{&l_35[1][3],&l_35[1][3]},{&l_35[5][1],&l_35[0][3]},{&l_35[1][3],&l_35[6][4]},{&l_35[2][1],&l_35[1][3]},{&l_35[1][3],&l_35[1][0]}},{{&l_35[1][3],&l_35[1][3]},{&l_35[5][6],&l_35[1][3]},{&l_35[1][3],&l_35[1][0]},{&l_35[1][3],&l_35[1][3]},{&l_35[2][1],&l_35[6][4]},{&l_35[1][3],&l_35[0][3]},{&l_35[5][1],&l_35[1][3]},{&l_35[1][3],&l_35[6][4]},{&l_35[1][3],&l_35[5][0]},{&l_35[1][3],&l_35[6][4]}},{{&l_35[1][3],&l_35[1][3]},{&l_35[5][1],&l_35[0][3]},{&l_35[1][3],&l_35[6][4]},{&l_35[2][1],&l_35[1][3]},{&l_35[1][3],&l_35[1][0]},{&l_35[1][3],&l_35[1][3]},{&l_35[5][6],&l_35[1][3]},{&l_35[1][3],&l_35[1][0]},{&l_35[1][3],&l_35[1][3]},{&l_35[2][1],&l_35[6][4]}}}; + int32_t **l_2264 = &l_35[1][3]; + const int16_t l_2276[8] = {0xA6A5L,0xA6A5L,0xA6A5L,0xA6A5L,0xA6A5L,0xA6A5L,0xA6A5L,0xA6A5L}; + uint8_t ****l_2288 = &g_2219; + int i, j, k; + } + return p_21; + } + l_2333[4][4][3]++; + if (((*g_37) = ((*l_2321) = (safe_mod_func_int8_t_s_s((-1L), 0xF3L))))) + { /* block id: 1225 */ + return l_2338; + } + else + { /* block id: 1227 */ + uint32_t l_2341 = 18446744073709551615UL; + l_2341++; + } + for (l_2329 = 0; (l_2329 >= 27); l_2329++) + { /* block id: 1232 */ + for (g_145 = 0; (g_145 > 23); g_145 = safe_add_func_uint16_t_u_u(g_145, 1)) + { /* block id: 1235 */ + return l_2331; + } + for (l_2330 = 0; (l_2330 > (-5)); l_2330 = safe_sub_func_int16_t_s_s(l_2330, 5)) + { /* block id: 1240 */ + return l_2333[4][3][1]; + } + (*g_37) = (safe_rshift_func_int8_t_s_s(p_23, 2)); + } + } + for (g_1250 = 0; (g_1250 <= 2); g_1250 += 1) + { /* block id: 1248 */ + const int32_t *l_2353 = &g_36; + const int32_t **l_2354 = &l_2353; + int8_t * const *l_2386 = (void*)0; + int8_t * const **l_2385[5] = {(void*)0,(void*)0,(void*)0,(void*)0,(void*)0}; + int8_t ***l_2393 = &g_435; + int8_t ****l_2392 = &l_2393; + int32_t l_2400 = 0xE45F6443L; + int8_t l_2430[4]; + const int16_t *l_2450 = &g_2451; + int16_t *l_2452 = &g_775; + const uint16_t *l_2485 = &g_145; + const uint16_t **l_2484 = &l_2485; + const uint16_t ***l_2483[8]; + const uint32_t l_2507 = 0xC6FC5E1DL; + int8_t *l_2512 = &g_126; + int32_t l_2523 = 4L; + int32_t l_2524 = 9L; + int32_t l_2525 = 0x626DBABCL; + int32_t l_2526 = 0xB725935DL; + int32_t l_2527 = (-4L); + int32_t l_2529 = 1L; + int32_t l_2530 = 1L; + uint8_t l_2531[6][3][9] = {{{0xF8L,0x49L,7UL,9UL,6UL,0x07L,254UL,255UL,2UL},{9UL,0x1EL,0xA4L,0x69L,248UL,0xBCL,1UL,0x07L,0xADL},{2UL,7UL,3UL,0xFBL,0x34L,0xFBL,3UL,7UL,2UL}},{{0xFBL,2UL,9UL,4UL,4UL,0x5FL,0xAEL,255UL,0x21L},{0xD8L,9UL,255UL,0x53L,0xBCL,0x34L,4UL,0xEEL,7UL},{0xFBL,4UL,0xAEL,0xD8L,0xEAL,0xEAL,7UL,9UL,3UL}},{{2UL,0x4AL,0xF8L,0UL,0x21L,250UL,9UL,0xDAL,255UL},{9UL,0x46L,0xDAL,9UL,249UL,0UL,0x28L,0x03L,1UL},{0xF8L,0xBCL,0xBBL,0x58L,0x56L,9UL,0xF2L,0xBCL,0x07L}},{{0x58L,0x11L,251UL,0x07L,0xB7L,252UL,4UL,0x44L,255UL},{0x03L,6UL,248UL,251UL,251UL,248UL,6UL,0x03L,0x21L},{6UL,0x0BL,0xD8L,2UL,255UL,0x56L,0UL,0x49L,255UL}},{{249UL,3UL,0x44L,255UL,0xBCL,0xFBL,0x56L,0x98L,0x21L},{0xBFL,254UL,0xEAL,3UL,0x5FL,248UL,255UL,251UL,255UL},{0xBBL,248UL,4UL,248UL,255UL,255UL,254UL,7UL,0x07L}},{{0xF2L,4UL,0x21L,0x4AL,9UL,0x11L,0xEEL,0xD6L,0xBFL},{0xCCL,255UL,0xF2L,0x4AL,7UL,4UL,0x34L,248UL,0x49L},{255UL,0xBFL,0x03L,248UL,0x98L,9UL,0xCCL,0x53L,0x53L}}}; + uint32_t l_2558 = 4294967295UL; + int16_t l_2602 = (-1L); + int i, j, k; + for (i = 0; i < 4; i++) + l_2430[i] = 0L; + for (i = 0; i < 8; i++) + l_2483[i] = &l_2484; + p_24 = (&g_659 != l_2352); + if (g_69[(g_1250 + 6)]) + continue; + (*l_2354) = l_2353; + (*l_2354) = &p_22; + for (l_2330 = 0; (l_2330 <= 2); l_2330 += 1) + { /* block id: 1255 */ + int8_t ****l_2382 = (void*)0; + int8_t ***l_2384 = &g_435; + int8_t ****l_2383 = &l_2384; + int8_t *****l_2394 = &l_2383; + int32_t l_2399[9][6][1] = {{{(-1L)},{(-1L)},{(-1L)},{0x5EEB2947L},{(-1L)},{(-1L)}},{{(-1L)},{(-1L)},{(-1L)},{0x5EEB2947L},{(-1L)},{(-1L)}},{{(-1L)},{(-1L)},{(-1L)},{0x5EEB2947L},{(-1L)},{(-1L)}},{{(-1L)},{(-1L)},{(-1L)},{0x5EEB2947L},{(-1L)},{(-1L)}},{{(-1L)},{(-1L)},{(-1L)},{0x5EEB2947L},{(-1L)},{(-1L)}},{{(-1L)},{(-1L)},{(-1L)},{0x5EEB2947L},{(-1L)},{(-1L)}},{{(-1L)},{(-1L)},{(-1L)},{0x5EEB2947L},{(-1L)},{(-1L)}},{{(-1L)},{(-1L)},{(-1L)},{0x5EEB2947L},{(-1L)},{(-1L)}},{{(-1L)},{(-1L)},{(-1L)},{0x5EEB2947L},{(-1L)},{(-1L)}}}; + uint16_t l_2418 = 65533UL; + uint32_t *l_2426 = &g_138[3]; + uint32_t l_2509 = 1UL; + uint8_t ****l_2560 = &g_2219; + uint8_t *****l_2559 = &l_2560; + uint32_t l_2573 = 18446744073709551612UL; + int i, j, k; + (*g_37) = (safe_lshift_func_int8_t_s_s(((((((*g_1590) = ((safe_mod_func_uint16_t_u_u(((*g_713) = (((((((safe_div_func_uint8_t_u_u((safe_lshift_func_int16_t_s_u(((safe_div_func_uint16_t_u_u(((((*g_434) = ((safe_mul_func_uint8_t_u_u(l_2340, (safe_mul_func_uint16_t_u_u((((safe_rshift_func_int8_t_s_u(l_2333[4][4][3], p_21)) , ((!(0x8BAFL > (((*l_2383) = ((safe_mul_func_int16_t_s_s(((safe_mod_func_int16_t_s_s(l_2375, (*g_713))) & (safe_mul_func_uint8_t_u_u(0xC5L, (safe_rshift_func_int16_t_s_u((safe_rshift_func_int8_t_s_s(p_24, 6)), 7))))), (*g_713))) , (void*)0)) != l_2385[4]))) >= 0x4190L)) >= l_2339), l_2339)))) && 6UL)) && p_24) , p_23), p_23)) || (-1L)), (*g_713))), g_2387[2][1])) | (*g_1846)) == p_21) , (***g_993)) | 1UL) > (*g_1846)) , 1UL)), p_22)) , (*g_1590))) == &p_23) == l_2333[4][4][3]) <= p_20) == 251UL), 5)); + } + } + for (l_2332 = 1; (l_2332 >= 0); l_2332 -= 1) + { /* block id: 1347 */ + const int32_t *l_2638 = &l_2339; + uint16_t ** const l_2650[10] = {&g_713,&g_713,&g_713,&g_713,&g_713,&g_713,&g_713,&g_713,&g_713,&g_713}; + int32_t l_2656 = 1L; + int32_t l_2659 = 0x8D981328L; + int16_t l_2694 = (-10L); + int16_t l_2706 = 0L; + int32_t l_2709 = 0xF0B25886L; + int32_t l_2712 = (-8L); + int32_t l_2713[10][1] = {{4L},{4L},{0x088957D1L},{4L},{4L},{0x088957D1L},{4L},{4L},{0x088957D1L},{4L}}; + uint16_t l_2730 = 0xFE70L; + uint8_t **l_2752 = &g_659; + uint32_t **l_2791 = (void*)0; + uint32_t ***l_2790 = &l_2791; + uint32_t ***l_2792 = (void*)0; + uint32_t **l_2793 = &g_434; + int8_t *** const *l_2798 = (void*)0; + uint8_t * const ****l_2800[2][10][6] = {{{&g_2799,&g_2799,&g_2799,&g_2799,&g_2799,&g_2799},{&g_2799,&g_2799,&g_2799,&g_2799,&g_2799,&g_2799},{&g_2799,&g_2799,&g_2799,&g_2799,&g_2799,&g_2799},{&g_2799,&g_2799,&g_2799,&g_2799,&g_2799,(void*)0},{&g_2799,(void*)0,&g_2799,(void*)0,&g_2799,&g_2799},{&g_2799,&g_2799,&g_2799,&g_2799,&g_2799,&g_2799},{&g_2799,&g_2799,&g_2799,&g_2799,&g_2799,&g_2799},{&g_2799,&g_2799,(void*)0,&g_2799,&g_2799,&g_2799},{&g_2799,&g_2799,&g_2799,(void*)0,&g_2799,&g_2799},{&g_2799,(void*)0,&g_2799,&g_2799,&g_2799,&g_2799}},{{&g_2799,&g_2799,&g_2799,&g_2799,&g_2799,&g_2799},{&g_2799,&g_2799,&g_2799,&g_2799,&g_2799,&g_2799},{&g_2799,&g_2799,&g_2799,&g_2799,&g_2799,&g_2799},{&g_2799,(void*)0,(void*)0,&g_2799,&g_2799,(void*)0},{&g_2799,&g_2799,&g_2799,&g_2799,&g_2799,&g_2799},{(void*)0,&g_2799,&g_2799,&g_2799,&g_2799,&g_2799},{&g_2799,&g_2799,&g_2799,&g_2799,&g_2799,&g_2799},{&g_2799,(void*)0,&g_2799,&g_2799,&g_2799,&g_2799},{&g_2799,&g_2799,&g_2799,&g_2799,&g_2799,&g_2799},{&g_2799,&g_2799,&g_2799,&g_2799,&g_2799,&g_2799}}}; + uint8_t l_2914 = 255UL; + int i, j, k; + } + for (p_24 = 1; (p_24 >= 0); p_24 -= 1) + { /* block id: 1503 */ + int32_t *l_2915 = &g_1096[0]; + int8_t ** const l_2916 = (void*)0; + int32_t l_2928 = 0xB06FF22EL; + uint16_t *l_2938[5][3]; + int32_t l_2971 = 9L; + int8_t ***l_2975 = &g_435; + uint32_t **l_2984 = (void*)0; + int32_t l_2998 = (-4L); + int32_t l_2999 = 0xB5DEAA51L; + int32_t l_3000[7]; + uint16_t *****l_3024 = (void*)0; + uint16_t *****l_3025 = &l_3023; + int i, j; + for (i = 0; i < 5; i++) + { + for (j = 0; j < 3; j++) + l_2938[i][j] = &g_1758[3][0][1]; + } + for (i = 0; i < 7; i++) + l_3000[i] = (-3L); + if (((*g_1590) != l_2915)) + { /* block id: 1504 */ + uint16_t *l_2937 = &g_1250; + int8_t **** const l_2974 = &l_2396; + int32_t l_2983 = 4L; + int32_t ****l_2993 = &g_454; + int32_t l_2996[3][1]; + uint32_t l_3015 = 0xBEECD428L; + int i, j; + for (i = 0; i < 3; i++) + { + for (j = 0; j < 1; j++) + l_2996[i][j] = 6L; + } + for (g_61 = 0; (g_61 <= 1); g_61 += 1) + { /* block id: 1507 */ + int8_t l_2929 = (-4L); + int32_t *l_2930 = &g_36; + int8_t ***l_2976[5]; + int32_t l_2997 = 0L; + int i; + for (i = 0; i < 5; i++) + l_2976[i] = &g_435; + for (l_2854 = 0; (l_2854 <= 2); l_2854 += 1) + { /* block id: 1510 */ + int8_t **l_2917 = &g_2246; + uint16_t ****l_2925 = &g_1324; + int32_t l_2977 = 1L; + uint8_t l_3001[3][3][5] = {{{0xC0L,253UL,253UL,0xC0L,253UL},{251UL,0UL,0x97L,0UL,251UL},{253UL,0xC0L,253UL,253UL,0xC0L}},{{251UL,0x17L,0xEAL,0UL,0xEAL},{0xC0L,0xC0L,0x82L,0xC0L,0xC0L},{0xEAL,0UL,0xEAL,0x17L,251UL}},{{0xC0L,253UL,253UL,0xC0L,253UL},{251UL,0UL,0x97L,0UL,251UL},{253UL,0xC0L,253UL,253UL,0xC0L}}}; + int i, j, k; + for (g_131 = 0; (g_131 <= 4); g_131 += 1) + { /* block id: 1513 */ + int8_t ***l_2918 = &l_2917; + int8_t l_2939 = 0x4DL; + int32_t l_2946 = (-7L); + uint8_t *l_2978 = &g_31[0]; + int i, j, k; + l_2930 = (((l_2916 == ((*l_2918) = l_2917)) , (safe_rshift_func_int8_t_s_u((0xA3L || ((safe_lshift_func_int8_t_s_s(((void*)0 != l_2915), 6)) >= (safe_lshift_func_int8_t_s_u(((((*g_1846) = (l_2925 != (void*)0)) < (((safe_mul_func_int16_t_s_s(l_2928, ((+((0xCEL >= 0x34L) , l_2928)) != p_22))) , (*g_434)) , (-1L))) , (-2L)), l_2929)))), p_23))) , (void*)0); + l_2930 = ((safe_add_func_int8_t_s_s((p_24 & (safe_mod_func_uint32_t_u_u(((safe_add_func_uint32_t_u_u(((**g_1324) != (l_2938[4][2] = l_2937)), ((((l_2939 | (safe_sub_func_int32_t_s_s(0x0979E7F6L, (safe_lshift_func_int16_t_s_s(p_24, 14))))) != ((p_22 >= (l_2528[p_24] = (safe_mod_func_uint8_t_u_u(0x34L, p_20)))) == p_23)) < 0xC3B9L) ^ (****g_992)))) ^ l_2939), p_24))), l_2946)) , (void*)0); + (*g_146) = (safe_div_func_int32_t_s_s((safe_mod_func_uint16_t_u_u((g_1758[(l_2854 + 3)][(l_2854 + 3)][l_2854] |= 1UL), (safe_lshift_func_uint16_t_u_u((((void*)0 != &g_434) , (safe_lshift_func_int16_t_s_u((((*l_2978) = (safe_mod_func_int32_t_s_s((((safe_mul_func_int16_t_s_s((safe_add_func_uint16_t_u_u((safe_sub_func_uint8_t_u_u(((((safe_div_func_int8_t_s_s((((**g_712) |= ((+((((safe_div_func_uint16_t_u_u((((safe_lshift_func_uint8_t_u_s(((*g_1846) != ((*l_2803) = (safe_mul_func_uint16_t_u_u((l_2971 || ((((*g_2246) == ((safe_add_func_uint32_t_u_u((g_2675 != l_2974), ((((*l_2974) = l_2975) == l_2976[0]) < p_24))) , l_2928)) <= p_20) != 0x89L)), p_20)))), (*g_2246))) ^ l_2977) ^ (*g_2246)), p_22)) ^ p_21) <= 0xE8FBL) == l_2528[p_24])) != p_22)) , 0L), 0xA7L)) , l_2528[p_24]) | (*g_434)) ^ (*g_1846)), 3L)), p_20)), 65527UL)) , 2L) & (*g_1846)), p_24))) <= p_24), l_2939))), 5)))), 0xAECA8320L)); + } + if ((((safe_mod_func_int16_t_s_s((safe_lshift_func_uint16_t_u_u((l_2971 <= p_21), 3)), ((l_2528[p_24] = l_2983) , ((((((p_22 , (l_2984 == &g_434)) >= (safe_add_func_uint8_t_u_u((l_2528[p_24] != (((safe_add_func_int16_t_s_s((safe_add_func_uint16_t_u_u((((*g_37) = ((l_2993 == (void*)0) < 0UL)) , (***g_993)), p_23)), (***g_993))) , (void*)0) == l_2993)), p_24))) & 0xEC1A434FL) , p_23) , p_21) | 0xBD554C6CL)))) && (****g_992)) & (*g_434))) + { /* block id: 1529 */ + ++l_3001[1][0][3]; + (*g_514) ^= p_21; + } + else + { /* block id: 1532 */ + int32_t l_3012 = 0L; + int i, j, k; + (*g_37) ^= (safe_mul_func_uint16_t_u_u((safe_sub_func_uint16_t_u_u(65535UL, ((safe_add_func_int8_t_s_s((safe_lshift_func_int8_t_s_u(((p_20 , &l_2930) == (*g_454)), l_3012)), ((((safe_sub_func_int16_t_s_s((((*g_434) = (p_21 = (p_22 != l_3001[1][0][3]))) < ((((g_1758[(g_61 + 3)][(p_24 + 7)][l_2854] = (&g_2246 != (*l_2975))) != p_23) , 0xEEL) > p_22)), (**g_712))) <= (*g_713)) , l_3015) >= p_24))) , p_22))), 2UL)); + } + } + } + return p_24; + } + else + { /* block id: 1541 */ + int32_t l_3016 = 0x8DB39DADL; + int32_t l_3017[3]; + int i; + for (i = 0; i < 3; i++) + l_3017[i] = 0x6AFC90CCL; + l_3018--; + } + (*g_514) |= (&g_1324 != ((safe_mul_func_uint8_t_u_u(6UL, 0x72L)) , ((*l_3025) = l_3023))); + } + return p_21; +} + + +/* ------------------------------------------ */ +/* + * reads : g_36 g_69 g_37 g_138 g_436 g_360 g_510 g_434 g_408 g_31 g_59 g_146 g_60 g_2 g_514 g_124 g_415 g_658 g_126 g_61 g_713 g_454 g_455 g_358 g_775 g_435 g_131 g_961 g_1096 g_145 g_992 g_993 g_1202 g_1250 g_712 g_1312 g_1324 g_1590 g_659 g_1509 g_1758 g_2057 g_2075 g_1846 g_1847 g_2127 g_2156 g_1591 g_2236 g_2234 + * writes: g_36 g_59 g_60 g_61 g_69 g_37 g_360 g_510 g_436 g_145 g_415 g_131 g_31 g_138 g_658 g_712 g_659 g_455 g_775 g_126 g_124 g_358 g_408 g_454 g_1324 g_1483 g_435 g_1509 g_1758 g_514 g_1590 g_1847 g_2219 g_2246 g_2236 g_2234 + */ +static int32_t * const func_32(int32_t * p_33) +{ /* block id: 14 */ + uint16_t l_40 = 0xF32AL; + int32_t *l_526 = &g_360; + int32_t **l_525 = &l_526; + int32_t ** const l_533 = &g_37; + int16_t *l_774[2]; + int16_t *l_776[5][9] = {{&g_124,&g_775,&g_775,&g_124,(void*)0,&g_124,&g_775,&g_775,&g_124},{&g_775,&g_775,&g_124,&g_775,&g_775,&g_775,&g_775,&g_124,&g_775},{&g_775,(void*)0,&g_124,&g_775,(void*)0,&g_775,(void*)0,&g_124,&g_124},{&g_775,&g_775,&g_775,&g_775,&g_775,&g_775,&g_775,&g_775,&g_124},{&g_124,(void*)0,&g_124,&g_775,&g_775,&g_124,(void*)0,&g_124,&g_775}}; + uint16_t l_777[6][1] = {{65535UL},{9UL},{65535UL},{65535UL},{9UL},{65535UL}}; + int32_t ***l_1792 = &g_455; + int32_t *l_2249 = &g_2236; + int32_t *l_2250 = &g_2234; + int i, j; + for (i = 0; i < 2; i++) + l_774[i] = &g_775; + (*l_2250) ^= ((*l_2249) |= (safe_mul_func_uint8_t_u_u(l_40, func_41(((*l_1792) = func_44((g_775 ^= ((l_40 < func_49(l_40, (((safe_lshift_func_uint16_t_u_u((((func_57(l_40) >= (l_525 == ((0UL ^ (safe_div_func_uint8_t_u_u((safe_mod_func_uint8_t_u_u((safe_mod_func_int8_t_s_s(0xA1L, l_40)), 255UL)), l_40))) , &l_526))) ^ l_40) , 0x108BL), 3)) >= 8UL) , l_533), g_138[3], l_40, g_436)) <= g_408[3][9])), l_40, l_40, l_777[4][0])), p_33)))); + (*p_33) = (((safe_div_func_uint32_t_u_u((*l_2249), (safe_unary_minus_func_int8_t_s((safe_div_func_uint16_t_u_u((~(safe_rshift_func_int8_t_s_u((((*l_2249) >= ((safe_sub_func_int32_t_s_s(((((*g_713) = (safe_mul_func_int8_t_s_s((*l_2249), (*l_2249)))) <= (*l_2250)) != ((*l_2250) & 0x31L)), ((((*l_2250) || 0x9EL) & (*l_2249)) >= (*p_33)))) ^ (*l_2249))) <= (*g_434)), 4))), (*l_2249))))))) ^ (*l_2250)) & (*l_2250)); + p_33 = ((*l_533) = p_33); + for (g_124 = 0; (g_124 < (-4)); g_124--) + { /* block id: 1175 */ + return p_33; + } + return p_33; +} + + +/* ------------------------------------------ */ +/* + * reads : g_415 g_124 g_60 g_434 g_138 g_1509 g_510 g_358 g_2057 g_61 g_146 g_31 g_2075 g_514 g_59 g_408 g_1846 g_1847 g_2127 g_1096 g_36 g_713 g_69 g_2156 g_131 g_436 g_775 g_1591 p_24 + * writes: g_415 g_124 g_1509 g_131 g_510 g_358 g_514 g_61 g_60 g_1590 g_436 g_1847 g_59 g_36 g_69 g_775 g_126 g_31 g_138 g_2219 g_2246 p_24 + */ +static uint8_t func_41(int32_t ** p_42, int32_t * p_43) +{ /* block id: 912 */ + int32_t *l_1795 = &g_60[0][3][2]; + int32_t l_1864 = 0x3228974EL; + int32_t l_1869[4] = {0xA483868DL,0xA483868DL,0xA483868DL,0xA483868DL}; + const int8_t *l_1930 = &g_126; + const int8_t **l_1929 = &l_1930; + const int8_t ***l_1928 = &l_1929; + const int8_t ****l_1927 = &l_1928; + uint32_t l_1968[8][4] = {{2UL,1UL,2UL,0xDC5C3954L},{1UL,2UL,4294967292UL,2UL},{2UL,0UL,4294967292UL,4294967292UL},{1UL,1UL,2UL,4294967292UL},{0xDC5C3954L,0UL,0xDC5C3954L,2UL},{0xDC5C3954L,2UL,2UL,0xDC5C3954L},{1UL,2UL,4294967292UL,2UL},{2UL,0UL,4294967292UL,4294967292UL}}; + int32_t l_1988 = 0x9CEC8610L; + uint32_t l_1993 = 0xC327587BL; + uint16_t *l_2036 = &g_69[4]; + int32_t l_2046 = (-6L); + int32_t l_2047 = 3L; + int32_t l_2149 = 1L; + uint32_t l_2171 = 0x43A65C1DL; + uint8_t l_2174 = 0x1AL; + const int8_t l_2220 = (-3L); + int8_t l_2223[8] = {0x4EL,0x4EL,0x4EL,0x4EL,0x4EL,0x4EL,0x4EL,0x4EL}; + int i, j; +lbl_1873: + for (g_415 = 0; (g_415 < (-25)); g_415--) + { /* block id: 915 */ + int32_t l_1813 = 0xD5715D00L; + int8_t l_1828 = 3L; + int32_t l_1831 = 0xCCA7621AL; + int32_t *l_1862 = &g_59[1]; + int32_t *l_1863 = &g_59[3]; + int32_t *l_1865 = &g_60[0][4][3]; + int32_t *l_1866 = &g_59[6]; + int32_t *l_1867 = (void*)0; + int32_t *l_1868[4][4][2] = {{{&g_61,&g_36},{&g_60[0][4][1],&g_61},{&l_1831,&g_59[1]},{&l_1831,&g_61}},{{&g_60[0][4][1],&g_36},{&g_61,&l_1831},{(void*)0,&g_59[1]},{&g_59[1],&g_60[0][1][0]}},{{&g_60[0][1][0],&g_60[0][4][1]},{&g_36,&g_60[0][4][1]},{&g_60[0][1][0],&g_60[0][1][0]},{&g_59[1],&g_59[1]}},{{(void*)0,&l_1831},{&g_61,&g_36},{&g_60[0][4][1],&g_61},{&l_1831,&g_59[1]}}}; + uint8_t l_1870 = 7UL; + int i, j, k; + for (g_124 = 2; (g_124 >= 0); g_124 -= 1) + { /* block id: 918 */ + uint8_t l_1803 = 0UL; + int32_t l_1812 = 0x0A2A1D39L; + int32_t l_1815[7][2][5] = {{{0L,0x1DDBFAEFL,0x1394708CL,(-7L),0xCF951AD2L},{9L,0x81596779L,(-7L),(-8L),0xB9144199L}},{{0x5CDB587BL,0L,0x81596779L,6L,0x08D53763L},{(-9L),0L,0L,0L,(-9L)}},{{(-1L),0x81596779L,0xB9144199L,1L,0x9F509A90L},{0xFFC6732DL,0x1DDBFAEFL,0xFAAD1AA0L,0xCF951AD2L,0xE291B965L}},{{(-7L),(-1L),0x4A8C519EL,0x81596779L,0x9F509A90L},{0xEA7A38EFL,0xCF951AD2L,6L,(-1L),(-9L)}},{{0x9F509A90L,(-9L),0xB975A64AL,0xFAAD1AA0L,0x08D53763L},{0xCF951AD2L,0xB9144199L,0xB975A64AL,0xB975A64AL,0xB9144199L}},{{0x2DAB1CE3L,8L,6L,(-1L),0xCF951AD2L},{(-1L),1L,0x4A8C519EL,0x08D53763L,0L}},{{0xB9144199L,0x4A8C519EL,0xFAAD1AA0L,0xFFC6732DL,(-1L)},{(-1L),(-1L),0xB9144199L,8L,0x4A8C519EL}}}; + int16_t *l_1843 = &g_124; + const uint8_t *l_1858 = (void*)0; + const uint8_t **l_1857[6][1]; + const uint8_t ***l_1856 = &l_1857[4][0]; + int i, j, k; + for (i = 0; i < 6; i++) + { + for (j = 0; j < 1; j++) + l_1857[i][j] = &l_1858; + } + } + l_1870--; + if (g_124) + goto lbl_1873; + } + if ((0xB1F92AABL == ((safe_lshift_func_int8_t_s_u(((*l_1795) , (*l_1795)), 4)) > (*g_434)))) + { /* block id: 956 */ + const int32_t *l_1884 = &l_1869[3]; + int8_t ***l_1901 = &g_435; + int8_t * const l_1904 = (void*)0; + int8_t * const *l_1903[1][6]; + int8_t * const **l_1902 = &l_1903[0][2]; + uint8_t l_1951 = 0xABL; + int32_t l_1966 = 0xF42C7F39L; + int32_t l_1967[3][8][6] = {{{7L,0x6AE2ACC6L,0L,0x34FDF0B3L,0x63305F13L,4L},{0x7CA956D1L,(-1L),0x63305F13L,0x6AE2ACC6L,4L,4L},{0L,0L,0L,0L,(-3L),0x6AE2ACC6L},{4L,(-1L),0xC143E02DL,0xB364E1CBL,0L,0x63305F13L},{0xC143E02DL,0x7CA956D1L,0L,(-1L),0L,(-1L)},{(-1L),(-1L),(-1L),4L,(-3L),0x7CA956D1L},{0x6AE2ACC6L,0L,0x34FDF0B3L,0x63305F13L,4L,(-3L)},{0xB364E1CBL,(-1L),4L,0x63305F13L,0x63305F13L,4L}},{{0x6AE2ACC6L,0x6AE2ACC6L,(-1L),7L,(-1L),(-3L)},{(-3L),0x6AE2ACC6L,0xC143E02DL,0x7CA956D1L,0L,(-1L)},{0xB364E1CBL,(-3L),0xC143E02DL,0L,0xC143E02DL,(-3L)},{4L,0L,(-1L),4L,0L,7L},{4L,0L,7L,0xC143E02DL,0x63305F13L,(-1L)},{0L,0L,(-1L),(-1L),0L,0L},{0L,0L,(-3L),0x6AE2ACC6L,0xC143E02DL,0x7CA956D1L},{(-1L),(-3L),0x63305F13L,0xB364E1CBL,0L,0x34FDF0B3L}},{{(-1L),0x6AE2ACC6L,0xB364E1CBL,0x6AE2ACC6L,(-1L),0xC143E02DL},{0L,0xC143E02DL,0L,(-1L),0x34FDF0B3L,4L},{0L,0x7CA956D1L,0x34FDF0B3L,0xC143E02DL,4L,4L},{4L,0L,0L,4L,(-1L),0xC143E02DL},{4L,(-1L),0xB364E1CBL,0L,0x6AE2ACC6L,0x34FDF0B3L},{0xB364E1CBL,0L,0x63305F13L,0x7CA956D1L,0x6AE2ACC6L,0x7CA956D1L},{(-3L),(-1L),(-3L),7L,(-1L),0L},{0xC143E02DL,0L,(-1L),0x34FDF0B3L,4L,(-1L)}}}; + int8_t l_2037 = 0L; + int i, j, k; + for (i = 0; i < 1; i++) + { + for (j = 0; j < 6; j++) + l_1903[i][j] = &l_1904; + } + for (g_1509 = (-16); (g_1509 != 56); ++g_1509) + { /* block id: 959 */ + int32_t *l_1880 = &g_36; + int32_t **l_1881 = &l_1795; + uint16_t **l_1896 = (void*)0; + int16_t l_1915 = 0xADC0L; + uint32_t l_1971 = 1UL; + int32_t l_1990 = 0x95171AE5L; + uint16_t ****l_2016 = &g_1324; + for (g_131 = 24; (g_131 <= 16); --g_131) + { /* block id: 962 */ + l_1880 = &l_1869[0]; + } + (*l_1881) = p_43; + for (g_510 = 0; (g_510 > (-17)); --g_510) + { /* block id: 968 */ + const int32_t **l_1885 = &l_1884; + (*l_1885) = l_1884; + } + for (g_358 = 0; (g_358 != (-19)); g_358 = safe_sub_func_uint8_t_u_u(g_358, 9)) + { /* block id: 973 */ + int8_t * const ***l_1905 = &l_1902; + int32_t l_1909 = 0x8ABB3F3DL; + int32_t l_1914[4][3]; + uint32_t l_1916 = 1UL; + int16_t l_1950 = (-1L); + uint8_t ***l_1956 = &g_658[4]; + uint8_t **l_1976 = (void*)0; + uint32_t **l_1977 = (void*)0; + int32_t l_2045 = (-1L); + int32_t *** const *l_2053 = &g_454; + int i, j; + for (i = 0; i < 4; i++) + { + for (j = 0; j < 3; j++) + l_1914[i][j] = 0x04CCC10CL; + } + } + } + } + else + { /* block id: 1063 */ + uint16_t l_2086 = 0x4952L; + int32_t **l_2087 = &g_1591[5][6]; + const int32_t *l_2094 = (void*)0; + const int32_t **l_2093[3][8]; + const int32_t ** const *l_2092 = &l_2093[0][7]; + const int32_t ** const **l_2091 = &l_2092; + const int32_t ** const ***l_2090[6][3][9] = {{{&l_2091,&l_2091,&l_2091,(void*)0,(void*)0,&l_2091,&l_2091,&l_2091,(void*)0},{&l_2091,(void*)0,&l_2091,&l_2091,&l_2091,&l_2091,&l_2091,(void*)0,&l_2091},{&l_2091,(void*)0,&l_2091,(void*)0,&l_2091,&l_2091,(void*)0,&l_2091,(void*)0}},{{&l_2091,&l_2091,&l_2091,&l_2091,&l_2091,&l_2091,&l_2091,&l_2091,&l_2091},{&l_2091,&l_2091,(void*)0,&l_2091,(void*)0,&l_2091,&l_2091,(void*)0,&l_2091},{&l_2091,&l_2091,&l_2091,(void*)0,&l_2091,&l_2091,&l_2091,&l_2091,&l_2091}},{{&l_2091,(void*)0,(void*)0,&l_2091,&l_2091,&l_2091,(void*)0,(void*)0,&l_2091},{&l_2091,(void*)0,&l_2091,(void*)0,&l_2091,&l_2091,&l_2091,&l_2091,&l_2091},{(void*)0,&l_2091,&l_2091,&l_2091,&l_2091,(void*)0,&l_2091,&l_2091,&l_2091}},{{&l_2091,(void*)0,&l_2091,&l_2091,&l_2091,&l_2091,&l_2091,(void*)0,&l_2091},{&l_2091,&l_2091,&l_2091,(void*)0,(void*)0,&l_2091,&l_2091,&l_2091,&l_2091},{&l_2091,&l_2091,&l_2091,&l_2091,&l_2091,&l_2091,&l_2091,&l_2091,&l_2091}},{{&l_2091,&l_2091,&l_2091,&l_2091,&l_2091,(void*)0,&l_2091,&l_2091,&l_2091},{&l_2091,&l_2091,&l_2091,&l_2091,&l_2091,&l_2091,&l_2091,&l_2091,&l_2091},{&l_2091,&l_2091,&l_2091,&l_2091,&l_2091,(void*)0,&l_2091,&l_2091,&l_2091}},{{&l_2091,&l_2091,&l_2091,&l_2091,&l_2091,&l_2091,&l_2091,&l_2091,&l_2091},{&l_2091,&l_2091,&l_2091,&l_2091,&l_2091,&l_2091,&l_2091,&l_2091,&l_2091},{&l_2091,&l_2091,&l_2091,&l_2091,&l_2091,(void*)0,&l_2091,&l_2091,&l_2091}}}; + int32_t l_2095 = 6L; + int32_t l_2096[7] = {(-7L),(-7L),(-1L),(-7L),(-7L),(-1L),(-7L)}; + int8_t l_2105 = 0L; + int16_t l_2140 = 0xC8C6L; + const int8_t l_2173 = 0L; + uint32_t **l_2189 = &g_434; + int32_t l_2190 = (-7L); + uint8_t ***l_2218 = &g_658[3]; + int16_t l_2235 = 0x4B03L; + int32_t l_2237 = (-9L); + int16_t l_2238 = 1L; + int i, j, k; + for (i = 0; i < 3; i++) + { + for (j = 0; j < 8; j++) + l_2093[i][j] = &l_2094; + } + for (g_358 = (-3); (g_358 == 7); g_358 = safe_add_func_uint32_t_u_u(g_358, 9)) + { /* block id: 1066 */ + int32_t **l_2056 = &g_514; + (*l_2056) = &l_1869[1]; + if (g_2057[4][3]) + break; + } + if ((*p_43)) + { /* block id: 1070 */ + int16_t l_2081 = 0xFF8CL; + int32_t l_2102 = 0xDFDFE83FL; + int32_t l_2103 = 0xA84F3B43L; + int32_t l_2106 = 0x97BF29E5L; + uint16_t *l_2132 = &g_69[6]; + int8_t *l_2138[7] = {&l_2105,&l_2105,&l_2105,&l_2105,&l_2105,&l_2105,&l_2105}; + uint16_t l_2139 = 0x7CF9L; + int32_t *l_2141[9][5][5] = {{{&l_2102,&l_1864,&l_1988,(void*)0,&g_60[1][2][3]},{&g_60[0][4][3],&l_2102,&l_2095,&l_2096[6],&l_2095},{&l_2102,&g_60[0][4][3],&l_2095,&l_1864,&l_2096[4]},{&l_2096[4],&g_36,&l_2095,&l_2102,(void*)0},{(void*)0,&l_2095,&l_2095,&g_60[0][4][3],&l_2106}},{{&l_2102,&l_2102,&l_1988,&g_60[0][4][3],(void*)0},{&l_2102,&l_2095,&l_2095,&l_1864,&l_2096[4]},{(void*)0,&l_2095,&l_2095,&g_36,&l_2095},{&g_36,&l_2102,(void*)0,(void*)0,&g_60[1][2][3]},{&g_60[0][0][2],&l_2095,&g_60[1][1][2],&g_36,&g_36}},{{&l_2095,&g_36,(void*)0,&l_1864,&l_2096[3]},{&l_2095,&g_60[0][4][3],(void*)0,&g_60[0][4][3],&l_2095},{&g_60[0][0][2],&l_2102,&l_2096[4],&g_60[0][4][3],&l_1988},{&g_36,&l_1864,(void*)0,&l_2102,(void*)0},{(void*)0,(void*)0,(void*)0,&l_1864,(void*)0}},{{&l_2102,&l_1988,&g_60[1][1][2],&l_2096[6],&l_1988},{&l_2102,&l_2103,(void*)0,(void*)0,&l_2095},{(void*)0,&l_1988,&l_2095,&g_36,&l_2096[3]},{&l_2096[4],(void*)0,&l_2095,&g_36,&g_36},{&l_2102,&l_1864,&l_1988,(void*)0,&g_60[1][2][3]}},{{&g_60[0][4][3],&l_2102,&l_2095,&l_2096[6],&l_2095},{&l_2102,&g_60[0][4][3],&l_2095,&l_1864,&l_2096[4]},{&l_2096[4],&g_36,(void*)0,&l_2106,&l_2095},{&l_2095,&l_1988,&g_60[0][1][2],(void*)0,&g_60[0][4][3]},{(void*)0,&l_1988,&l_2103,&l_2106,&l_2095}},{{(void*)0,(void*)0,&g_60[0][4][3],&g_60[1][4][3],&l_2096[3]},{&l_2106,(void*)0,(void*)0,&l_1864,(void*)0},{&g_60[1][1][2],&l_1988,&l_2095,&l_2096[4],&l_2095},{&l_2095,&l_1988,(void*)0,&l_1864,&l_2102},{&l_1988,&g_60[1][1][2],&g_36,&g_60[1][4][3],(void*)0}},{{&l_1988,&l_2095,&l_2096[0],&l_2106,&g_60[0][1][2]},{&l_2095,&l_2102,&l_2096[3],(void*)0,(void*)0},{&g_60[1][1][2],(void*)0,&l_2096[0],&l_2106,&l_2096[0]},{&l_2106,&l_2106,&g_36,&l_1864,&l_2096[0]},{(void*)0,&g_60[1][2][3],(void*)0,&g_36,(void*)0}},{{(void*)0,&l_1988,&l_2095,&l_2096[4],&g_60[0][1][2]},{&l_2095,&g_60[1][2][3],(void*)0,&g_60[0][3][0],(void*)0},{&g_36,&l_2106,&g_60[0][4][3],&g_60[0][3][0],&l_2102},{&l_1988,(void*)0,&l_2103,&l_2096[4],&l_2095},{&l_2095,&l_2102,&g_60[0][1][2],&g_36,(void*)0}},{{&l_1988,&l_2095,(void*)0,&l_1864,&l_2096[3]},{&g_36,&g_60[1][1][2],(void*)0,&l_2106,&l_2095},{&l_2095,&l_1988,&g_60[0][1][2],(void*)0,&g_60[0][4][3]},{(void*)0,&l_1988,&l_2103,&l_2106,&l_2095},{(void*)0,(void*)0,&g_60[0][4][3],&g_60[1][4][3],&l_2096[3]}}}; + int16_t l_2170 = (-5L); + int32_t *l_2175 = &g_59[1]; + uint8_t l_2240 = 0UL; + uint16_t l_2243[9] = {5UL,65529UL,5UL,65529UL,5UL,65529UL,5UL,65529UL,5UL}; + int i, j, k; + for (g_61 = 0; (g_61 <= 3); g_61 += 1) + { /* block id: 1073 */ + int8_t l_2071 = 0x1AL; + int32_t ** const *l_2078 = &g_455; + int32_t ** const **l_2077 = &l_2078; + int32_t ** const ***l_2076 = &l_2077; + int32_t l_2101[5][1] = {{0xB5C5EAD7L},{4L},{0xB5C5EAD7L},{4L},{0xB5C5EAD7L}}; + int16_t l_2104 = 1L; + int i, j; + for (g_358 = 0; (g_358 <= 0); g_358 += 1) + { /* block id: 1076 */ + uint32_t **l_2069 = &g_434; + uint32_t ***l_2068 = &l_2069; + int32_t l_2070 = 9L; + if (((*p_43) = ((*g_146) = 0xE83D4D8CL))) + { /* block id: 1079 */ + (*g_146) = 0x04E90537L; + } + else + { /* block id: 1081 */ + int i, j; + (*p_43) = ((((safe_rshift_func_uint16_t_u_s(g_31[g_358], 0)) || (safe_sub_func_int16_t_s_s((-1L), (safe_rshift_func_int16_t_s_u((g_31[g_358] != ((l_1968[g_358][g_61] || (safe_add_func_int32_t_s_s(((*g_146) = ((safe_sub_func_int32_t_s_s(((((~(!(~(+(*l_1795))))) , 0xFAC5F3D3L) , p_43) == p_43), ((void*)0 != l_2068))) , 0L)), (*g_434)))) <= (-7L))), 6))))) <= l_2070) >= l_2071); + } + } + if ((safe_div_func_uint32_t_u_u(((((*g_146) = (safe_unary_minus_func_int16_t_s((g_2075 != l_2076)))) , (safe_add_func_int32_t_s_s((*p_43), (*g_514)))) & (l_2081 != ((safe_add_func_int32_t_s_s(0xAE26118AL, (safe_mul_func_uint16_t_u_u(l_2086, (!(l_2095 = (((l_2087 == (g_1590 = ((safe_sub_func_uint32_t_u_u(0xEE70B60DL, (*g_514))) , l_2087))) , g_2075) != l_2090[1][2][6]))))))) , 0x877CL))), l_2081))) + { /* block id: 1089 */ + int32_t *l_2097 = &l_1988; + int32_t *l_2098 = &g_59[1]; + int32_t *l_2099 = &l_2096[4]; + int32_t *l_2100[3]; + uint32_t l_2107 = 0x9327F5E4L; + int i; + for (i = 0; i < 3; i++) + l_2100[i] = &l_1869[0]; + l_2107++; + for (l_2046 = 1; (l_2046 <= 5); l_2046 += 1) + { /* block id: 1093 */ + const int16_t l_2110 = 0L; + if (l_2110) + break; + } + } + else + { /* block id: 1096 */ + int16_t l_2117[4] = {0x585BL,0x585BL,0x585BL,0x585BL}; + int i; + for (l_1988 = 4; (l_1988 >= 0); l_1988 -= 1) + { /* block id: 1099 */ + uint8_t *l_2124[6][3][8] = {{{(void*)0,(void*)0,&g_31[0],&g_31[0],(void*)0,(void*)0,&g_131,(void*)0},{(void*)0,(void*)0,&g_131,(void*)0,(void*)0,&g_31[0],&g_31[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,&g_31[0],&g_131,&g_131,&g_31[0],(void*)0},{(void*)0,(void*)0,&g_131,(void*)0,(void*)0,(void*)0,&g_131,(void*)0},{(void*)0,(void*)0,&g_31[0],&g_131,&g_131,&g_31[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,&g_31[0],&g_31[0],&g_31[0],(void*)0,(void*)0,(void*)0},{&g_31[0],(void*)0,(void*)0,(void*)0,&g_31[0],&g_131,&g_131,&g_31[0]}},{{(void*)0,(void*)0,(void*)0,(void*)0,(void*)0,&g_31[0],(void*)0,(void*)0},{(void*)0,(void*)0,(void*)0,&g_131,(void*)0,(void*)0,&g_131,(void*)0},{(void*)0,(void*)0,(void*)0,&g_31[0],(void*)0,&g_31[0],(void*)0,(void*)0}},{{(void*)0,(void*)0,&g_131,(void*)0,(void*)0,&g_131,(void*)0,(void*)0},{(void*)0,(void*)0,(void*)0,&g_31[0],(void*)0,(void*)0,(void*)0,(void*)0},{(void*)0,&g_31[0],&g_131,&g_131,&g_31[0],(void*)0,(void*)0,(void*)0}},{{&g_31[0],(void*)0,(void*)0,(void*)0,&g_31[0],&g_131,&g_131,&g_31[0]},{(void*)0,(void*)0,(void*)0,(void*)0,(void*)0,&g_31[0],(void*)0,(void*)0},{(void*)0,(void*)0,(void*)0,&g_131,(void*)0,(void*)0,&g_131,(void*)0}}}; + int i, j, k; + (*p_43) |= (safe_div_func_int16_t_s_s((safe_mul_func_uint8_t_u_u(g_408[(g_61 + 2)][(g_61 + 4)], ((safe_add_func_uint8_t_u_u(((l_2103 > l_2117[0]) , ((((((*g_1846) ^ (safe_mul_func_uint8_t_u_u(((~((((safe_lshift_func_uint16_t_u_u(l_2102, (safe_lshift_func_uint8_t_u_u(((*l_1795) = g_408[(g_61 + 2)][(g_61 + 4)]), 7)))) , (safe_sub_func_int32_t_s_s((((*l_2076) = g_2127) != (void*)0), (*l_1795)))) == (-1L)) >= l_2117[2])) <= (*g_434)), 2L))) , l_2106) == g_408[(g_61 + 2)][(g_61 + 4)]) , (-7L)) >= g_1096[0])), 0UL)) == (*g_434)))), 0x2AABL)); + } + (*p_43) &= ((*l_1795) = l_2081); + } + for (g_436 = 0; (g_436 <= 5); g_436 += 1) + { /* block id: 1109 */ + (***l_2091) = p_43; + } + } + g_36 |= ((~(safe_rshift_func_uint8_t_u_u(((((safe_lshift_func_uint8_t_u_s(((*l_1795) > (((*g_514) ^= (((void*)0 == l_2132) >= (((void*)0 == &g_434) == (((*g_1846) &= (*l_1795)) || (safe_mod_func_int32_t_s_s((*p_43), (safe_add_func_int8_t_s_s((g_510 ^= (!((safe_unary_minus_func_uint8_t_u((*l_1795))) != (*g_434)))), l_2139)))))))) , 0x3B27455CL)), (*l_1795))) < (*g_146)) , (*l_1795)) > l_2140), l_2081))) != (*l_1795)); + for (l_2086 = 0; (l_2086 <= 5); l_2086 += 1) + { /* block id: 1119 */ + uint32_t l_2148 = 0x2EC0A92AL; + uint8_t *l_2167 = &g_131; + int16_t *l_2172[7][7] = {{&l_2170,&g_775,(void*)0,&l_2081,&g_775,&l_2081,(void*)0},{&g_775,&g_775,&l_2081,&g_775,&g_2156,&l_2081,&g_2156},{&g_775,(void*)0,(void*)0,&g_775,&l_2081,&l_2170,&g_775},{&l_2170,&g_2156,&l_2081,&l_2081,&g_2156,&l_2170,(void*)0},{&g_2156,&g_775,&l_2081,&g_775,&g_775,&l_2081,&g_775},{&g_2156,(void*)0,&l_2170,&g_2156,&l_2081,&l_2081,&g_2156},{&l_2170,&g_775,&l_2170,&l_2081,&g_775,(void*)0,(void*)0}}; + uint16_t l_2210 = 65530UL; + int32_t l_2221 = 0x2F3755E1L; + int32_t l_2222[3]; + int32_t l_2224 = 0x60EE7009L; + int32_t l_2226 = 2L; + int32_t l_2227 = 0xEA617DEEL; + int32_t l_2228[1]; + int i, j; + for (i = 0; i < 3; i++) + l_2222[i] = 0x6F7B8276L; + for (i = 0; i < 1; i++) + l_2228[i] = (-1L); + (***l_2091) = (**l_2092); + if ((*l_1795)) + break; + l_1795 = (((((safe_div_func_uint16_t_u_u((4294967295UL ^ (((safe_sub_func_uint16_t_u_u(((l_2095 = (*l_1795)) || (((g_775 |= (safe_mul_func_uint8_t_u_u((((l_2148 && l_2149) != (safe_sub_func_uint16_t_u_u(((*g_434) && ((((safe_sub_func_int16_t_s_s((safe_rshift_func_int16_t_s_s((l_2148 , ((*g_1846) = ((((*g_713) = (*g_713)) | ((((g_2156 , ((safe_rshift_func_int8_t_s_s((safe_div_func_int8_t_s_s(((safe_add_func_int8_t_s_s(((safe_add_func_int32_t_s_s((safe_sub_func_uint8_t_u_u(((*l_2167)--), (((4UL ^ (*g_1846)) , (*g_146)) & (*g_146)))), (*g_434))) && l_2170), 0xEFL)) < 0x9E20L), g_31[0])), (*l_1795))) <= 0xFE4DL)) == 5UL) , (*l_1795)) || l_2148)) == (*l_1795)))), (*l_1795))), l_2148)) ^ l_2171) & 253UL) & (*p_43))), 65535UL))) || (*l_1795)), g_436))) , l_2173) >= l_2148)), l_2148)) <= (*l_1795)) , 0xC481E029L)), 1L)) ^ l_2148) >= (*g_434)) <= l_2174) , l_2175); + for (l_2139 = 1; (l_2139 <= 6); l_2139 += 1) + { /* block id: 1130 */ + uint8_t *l_2176 = &g_31[0]; + uint16_t *l_2183 = &g_1758[3][0][1]; + int32_t l_2209 = 1L; + uint32_t l_2211[2][9]; + int32_t l_2229 = 0xF892FDB3L; + int32_t l_2230 = 0xD0E01647L; + int32_t l_2231 = 1L; + int32_t l_2232 = 4L; + int32_t l_2233[9] = {(-10L),(-10L),0xEFA8FB7FL,(-10L),(-10L),0xEFA8FB7FL,(-10L),(-10L),0xEFA8FB7FL}; + int i, j; + for (i = 0; i < 2; i++) + { + for (j = 0; j < 9; j++) + l_2211[i][j] = 0x465FC43EL; + } + for (g_131 = 1; (g_131 <= 4); g_131 += 1) + { /* block id: 1133 */ + const uint16_t **l_2180 = (void*)0; + const uint16_t *l_2182[6][9][4]; + const uint16_t **l_2181 = &l_2182[2][6][3]; + int32_t l_2186 = 0xE8A6026BL; + int i, j, k; + for (i = 0; i < 6; i++) + { + for (j = 0; j < 9; j++) + { + for (k = 0; k < 4; k++) + l_2182[i][j][k] = &g_961; + } + } + (*g_146) ^= (l_2176 != ((((((g_510 = (((safe_unary_minus_func_int16_t_s(((l_2036 = &l_2139) != ((safe_rshift_func_uint16_t_u_u((((*l_2181) = &l_2086) == l_2183), 2)) , (((((((safe_lshift_func_int16_t_s_u((9UL >= l_2186), 14)) , ((safe_sub_func_int8_t_s_s((((+(&g_434 == ((*g_434) , l_2189))) || (*g_1846)) , g_138[3]), l_2190)) , (*l_1795))) & (-10L)) < l_2148) <= l_2148) , 0UL) , (void*)0))))) < (*p_43)) > l_2148)) , l_2148) >= 0xB2L) , &l_1928) == &l_1928) , l_2167)); + l_2141[l_2139][g_131][g_131] = ((safe_lshift_func_int16_t_s_s(((*g_1846) = (((((safe_sub_func_int16_t_s_s(((((((5L && 0x0CL) > (0L <= (l_2186 || l_2148))) || (g_126 = l_2148)) ^ ((safe_mod_func_int8_t_s_s(((((*l_1795) = (((safe_add_func_uint32_t_u_u((((**l_2189) = (((safe_mul_func_int16_t_s_s(((safe_mul_func_uint8_t_u_u(((((((safe_rshift_func_uint8_t_u_u(((*l_2176) = (*l_1795)), 2)) | (((safe_rshift_func_uint16_t_u_u(65535UL, (((safe_rshift_func_uint8_t_u_u((*l_1795), 3)) & 0xF2244D35L) ^ l_2148))) <= 0x883EL) | 0x30L)) <= l_2186) & l_2186) != (*g_434)) != l_2186), 247UL)) && 0x03BCL), (*g_1846))) && (*l_1795)) ^ 0xB4BFL)) == l_2148), 1UL)) , 0UL) > l_2186)) && l_2209) != l_2209), 0x52L)) | (-1L))) < l_2148) < l_2209), (*g_1846))) , (void*)0) == (void*)0) | l_2210) != l_2186)), l_2211[0][5])) , g_1591[l_2086][l_2086]); + (*p_43) ^= (!(safe_add_func_int16_t_s_s((safe_lshift_func_int8_t_s_s((l_2209 , 0x98L), 2)), (((((*l_2175) |= (l_2221 = (l_2209 <= ((*l_2176) = ((+l_2186) || ((*g_146) | (!(safe_div_func_int32_t_s_s(0L, (((l_2210 , &g_658[3]) != (g_2219 = l_2218)) & l_2220)))))))))) > (*g_434)) && (*l_2175)) <= 3L)))); + } + for (l_2105 = 0; (l_2105 <= 6); l_2105 += 1) + { /* block id: 1152 */ + return (*l_1795); + } + ++l_2240; + } + } + (*g_514) ^= (l_2243[6] ^ 0x9B59B1E0L); + } + else + { /* block id: 1159 */ + int8_t *l_2247 = &g_2239; + int8_t * const l_2248[6] = {&g_2,&g_2,&g_2,&g_2,&g_2,&g_2}; + int i; + l_2096[4] ^= (safe_div_func_uint32_t_u_u(((l_2247 = (g_2246 = &l_2105)) == l_2248[4]), 6UL)); + } + } + p_43 = &l_1988; + return (*l_1795); +} + + +/* ------------------------------------------ */ +/* + * reads : g_126 g_434 g_138 g_514 g_59 g_713 g_69 g_146 g_60 g_775 g_436 g_124 g_358 g_454 g_455 g_435 g_408 g_360 g_415 g_131 g_961 g_1096 g_510 g_145 g_37 g_61 g_992 g_993 g_1202 g_36 g_1250 g_712 g_1312 g_2 g_1324 g_31 g_1590 g_658 g_659 g_1509 g_1758 + * writes: g_415 g_60 g_59 g_775 g_138 g_436 g_69 g_126 g_124 g_358 g_408 g_658 g_360 g_61 g_131 g_510 g_145 g_37 g_454 g_1324 g_712 g_31 g_1483 g_659 g_435 g_1509 g_36 g_1758 g_514 + */ +static int32_t ** func_44(const int16_t p_45, uint16_t p_46, uint16_t p_47, int8_t p_48) +{ /* block id: 453 */ + uint32_t l_789 = 3UL; + int8_t *l_790 = &g_415; + uint16_t *l_793[2][1]; + int32_t ***l_824 = &g_455; + int32_t l_825 = 8L; + uint32_t l_826 = 0xD587BD29L; + int32_t *l_827 = (void*)0; + int32_t l_851 = 0xD020B236L; + int32_t l_855 = 0x2CE1D691L; + int32_t l_856 = 0L; + int32_t l_857[10] = {(-8L),0xCA3E0D9AL,0xF01EADB4L,0xF01EADB4L,0xCA3E0D9AL,(-8L),0xCA3E0D9AL,0xF01EADB4L,0xF01EADB4L,0xCA3E0D9AL}; + int32_t l_858 = (-6L); + uint32_t l_860 = 7UL; + uint16_t **l_874 = &l_793[0][0]; + int16_t l_919 = 0xCBE8L; + const uint16_t *l_963 = (void*)0; + const uint16_t **l_962 = &l_963; + const uint16_t **l_964 = &l_963; + const uint8_t l_1041[3][8][7] = {{{0xC9L,0xE7L,0xEFL,0x0CL,0x6BL,0xC2L,0xC9L},{0x14L,1UL,250UL,0xEFL,0xC9L,247UL,0xE7L},{1UL,246UL,247UL,249UL,0UL,255UL,1UL},{0xC9L,246UL,0x09L,7UL,255UL,0x99L,0x04L},{0xE5L,7UL,0x7DL,0x7DL,3UL,0x1BL,0x82L},{255UL,246UL,1UL,0x8FL,0xE5L,255UL,0xC2L},{247UL,255UL,255UL,0xEFL,0UL,0x60L,0x7DL},{0x23L,246UL,3UL,251UL,250UL,247UL,0xCAL}},{{0x09L,3UL,0xFBL,247UL,255UL,246UL,0xE5L},{1UL,0xCAL,0UL,0xE5L,0UL,255UL,9UL},{0x6CL,1UL,0x82L,0x71L,0xABL,0x38L,0x29L},{9UL,0xE5L,246UL,255UL,247UL,0xFBL,3UL},{255UL,247UL,0x29L,255UL,0x38L,0UL,1UL},{0x23L,0xEFL,0x9AL,0x71L,0x6BL,0x5EL,0x82L},{8UL,0xC2L,255UL,0xE5L,0x8FL,1UL,246UL},{0UL,255UL,0xABL,247UL,0x71L,0x71L,247UL}},{{0x1BL,255UL,0x1BL,251UL,0xC2L,247UL,0x29L},{246UL,0UL,255UL,0xEFL,1UL,246UL,1UL},{0xABL,0x29L,0x60L,0x8FL,0xB9L,247UL,0x99L},{0x6CL,0x1AL,247UL,0xB9L,9UL,0x71L,0xCAL},{0x8FL,0x9CL,246UL,246UL,0x5FL,1UL,0xEFL},{253UL,0x29L,255UL,1UL,0x38L,0x5EL,246UL},{0xABL,0x5FL,0x38L,0UL,0UL,0UL,0x82L},{0xEFL,0x09L,0xFBL,0x14L,1UL,0xFBL,255UL}}}; + int8_t ***l_1061 = &g_435; + int8_t ***l_1064 = &g_435; + uint8_t l_1067 = 248UL; + int32_t *l_1124 = &l_825; + int32_t **l_1123 = &l_1124; + int8_t l_1173[1]; + int32_t l_1178 = (-10L); + uint32_t l_1365 = 0xC69FFE11L; + int16_t l_1432 = 0x41AEL; + uint32_t l_1561 = 8UL; + int32_t l_1572 = 0xF6720B70L; + uint8_t ***l_1593[4]; + uint8_t *l_1594 = &l_1067; + uint32_t l_1670 = 1UL; + uint32_t *l_1691 = &g_408[4][8]; + uint16_t ** const **l_1710 = &g_993; + int32_t l_1742[8][4][5] = {{{0x0F03A4D8L,1L,(-1L),5L,1L},{0xAE8F677BL,(-1L),0x2EAAF741L,0x2EAAF741L,(-1L)},{(-5L),1L,(-1L),1L,3L},{0L,2L,0x1BFB8ECBL,(-1L),0xE39D686EL}},{{8L,(-5L),(-5L),8L,0x485B1D2AL},{0L,0x2EAAF741L,0x63768321L,0x2619FB32L,(-1L)},{(-5L),0xA73697A5L,0x8F9D8BBDL,(-1L),0x8F9D8BBDL},{0xAE8F677BL,0xAE8F677BL,(-1L),0x2619FB32L,0x63768321L}},{{0x0F03A4D8L,5L,0x485B1D2AL,8L,(-5L)},{0x1BFB8ECBL,(-1L),0xE39D686EL,(-1L),0x1BFB8ECBL},{0xE1025F8AL,5L,3L,1L,(-1L)},{0xE4018007L,(-1L),0L,(-1L),(-1L)}},{{1L,0xE1025F8AL,1L,1L,0x485B1D2AL},{0x1BFB8ECBL,(-1L),(-1L),2L,0x2EAAF741L},{0x485B1D2AL,8L,(-5L),(-5L),8L},{0L,0x63768321L,(-1L),0x2EAAF741L,0xE39D686EL}},{{0xE1025F8AL,3L,1L,0xA73697A5L,0x0F03A4D8L},{0xAE8F677BL,0L,0L,0xAE8F677BL,0L},{0xE1025F8AL,(-5L),0x8F9D8BBDL,5L,0xA73697A5L},{0L,0x2619FB32L,1L,(-1L),1L}},{{0x485B1D2AL,0x485B1D2AL,0xA73697A5L,5L,0x8F9D8BBDL},{0x1BFB8ECBL,2L,0L,0xAE8F677BL,0L},{1L,0xA73697A5L,0x0F03A4D8L,0xA73697A5L,1L},{0xE4018007L,2L,0xE39D686EL,0x2EAAF741L,(-1L)}},{{5L,0x485B1D2AL,8L,(-5L),(-5L)},{0x2EAAF741L,0x2619FB32L,0x2EAAF741L,2L,(-1L)},{1L,(-5L),0x485B1D2AL,1L,1L},{(-1L),0L,(-1L),(-1L),0L}},{{8L,3L,0x485B1D2AL,1L,0x8F9D8BBDL},{0x2619FB32L,0x63768321L,0x2EAAF741L,0L,1L},{(-1L),8L,8L,(-1L),0xA73697A5L},{0x2619FB32L,(-1L),0xE39D686EL,0xE4018007L,0L}}}; + int i, j, k; + for (i = 0; i < 2; i++) + { + for (j = 0; j < 1; j++) + l_793[i][j] = &g_145; + } + for (i = 0; i < 1; i++) + l_1173[i] = (-1L); + for (i = 0; i < 4; i++) + l_1593[i] = &g_658[3]; + if ((safe_lshift_func_uint8_t_u_s((((safe_add_func_int32_t_s_s(((*g_146) = (p_45 != (((g_126 != ((&g_69[4] != ((+(safe_sub_func_uint16_t_u_u(((safe_sub_func_uint32_t_u_u((*g_434), p_46)) > ((safe_mul_func_uint8_t_u_u((0x40L ^ ((*l_790) = (safe_unary_minus_func_uint8_t_u(l_789)))), (p_48 = (safe_lshift_func_int16_t_s_u((-6L), ((((((*g_434) ^ (*g_514)) , (*g_713)) , (*g_514)) > p_46) | 0x6DC26841L)))))) ^ p_47)), 65535UL))) , l_793[0][0])) && 0x8ACC9E21L)) | p_46) || 0xBD077CC9L))), l_789)) <= p_46) != p_45), l_789))) + { /* block id: 457 */ + uint32_t * const l_796 = &g_436; + int32_t l_810 = 0x310EDFCEL; + int16_t *l_811 = &g_775; + int8_t l_844 = 0xF9L; + int32_t *l_845 = &g_59[4]; + int32_t l_846 = 0x652F5472L; + int32_t *l_847 = (void*)0; + int32_t *l_848 = (void*)0; + int32_t *l_849 = (void*)0; + int32_t *l_850 = &g_59[1]; + int32_t *l_852 = &l_846; + int32_t *l_853 = &g_61; + int32_t *l_854[3]; + int16_t l_859 = 0L; + int i; + for (i = 0; i < 3; i++) + l_854[i] = &g_60[0][4][3]; + if ((safe_sub_func_int32_t_s_s((l_796 != (((((((((safe_lshift_func_int8_t_s_u((safe_unary_minus_func_uint8_t_u((safe_rshift_func_uint8_t_u_u((((*g_434) |= (safe_div_func_int8_t_s_s((((*g_146) != (((void*)0 == &g_69[2]) > ((*l_811) ^= ((safe_mod_func_int32_t_s_s(5L, ((*g_514) = (safe_sub_func_uint8_t_u_u(((l_789 <= (safe_sub_func_int32_t_s_s((+p_45), (!l_810)))) , p_46), p_46))))) , p_47)))) > p_48), p_48))) > 0x42A497C5L), 2)))), l_810)) | l_810) & 8UL) >= p_46) <= l_789) , &l_793[0][0]) != &l_793[0][0]) && (*g_514)) , (void*)0)), 0x2E530132L))) + { /* block id: 461 */ + int32_t l_821 = 7L; + (*g_514) = (safe_div_func_int16_t_s_s((g_59[1] == (safe_sub_func_int8_t_s_s((0x3683L ^ (((safe_rshift_func_int8_t_s_s((safe_unary_minus_func_int16_t_s((((safe_mod_func_int8_t_s_s((((*l_790) = l_821) && (safe_rshift_func_int16_t_s_s((((((((((((((0x42L < (l_824 == (void*)0)) , ((*g_146) &= (((*l_796) |= l_810) , l_810))) >= 1L) , l_825) & p_46) , 1L) , 0xFEL) , (-1L)) & 0x050B61B1L) && (*g_434)) < p_45) , (void*)0) != (void*)0), 2))), p_46)) > p_48) >= g_124))), l_810)) <= g_358) < l_826)), 5UL))), 65535UL)); + l_827 = &g_60[0][4][3]; + } + else + { /* block id: 467 */ + const int16_t l_834 = 1L; + int32_t ** const l_843[8] = {&g_514,&g_514,&g_514,&g_514,&g_514,&g_514,&g_514,&g_514}; + int i; + (*g_514) ^= (0x3980058AL <= (-8L)); + (*g_146) = (safe_lshift_func_uint16_t_u_u((safe_mod_func_int32_t_s_s(((safe_mul_func_uint8_t_u_u(l_834, ((safe_div_func_uint32_t_u_u((safe_div_func_int16_t_s_s(((safe_sub_func_uint32_t_u_u(0x27FAB59DL, (++(*g_434)))) == ((((*g_454) == l_843[5]) ^ (((*g_713) != (p_46 = (*g_713))) != ((*l_811) = ((p_47 || 4294967289UL) , (l_810 = g_59[1]))))) , l_844)), 0x917AL)), p_48)) == p_45))) >= 0x45993A07L), p_47)), (*g_713))); + } + --l_860; + } + else + { /* block id: 476 */ + uint16_t ***l_873[10] = {&g_712,&g_712,&g_712,&g_712,&g_712,&g_712,&g_712,&g_712,&g_712,&g_712}; + int32_t l_879 = (-2L); + int32_t *l_880 = &g_60[0][4][1]; + uint32_t l_990[3]; + int8_t ***l_1063 = &g_435; + int8_t ***l_1065 = &g_435; + int32_t ****l_1071 = &g_454; + int32_t l_1108[2]; + int32_t l_1182 = 0xF31FF310L; + uint32_t l_1249 = 0x30B3AA77L; + uint8_t l_1382 = 1UL; + uint8_t l_1431[3]; + uint8_t ***l_1435 = &g_658[2]; + uint8_t *l_1479 = (void*)0; + uint8_t *l_1480 = &l_1431[2]; + uint32_t l_1485[2][6][9] = {{{0x001AC486L,1UL,0xD4514F8AL,0x7B4E6C99L,4294967293UL,0x43196522L,0x43196522L,4294967293UL,0x7B4E6C99L},{4294967295UL,0x0ACDEEBDL,4294967295UL,3UL,4294967290UL,0xF5ACFD47L,0x66335B3AL,4294967290UL,0x5C4275B8L},{0x001AC486L,0x972DEFA1L,0x0646B95BL,0x7B4E6C99L,1UL,1UL,0x43196522L,1UL,4294967295UL},{4294967295UL,4294967288UL,0x6102B2CFL,3UL,0x0ACDEEBDL,0x66335B3AL,0x66335B3AL,0x0ACDEEBDL,3UL},{0x001AC486L,4294967293UL,0x001AC486L,0x7B4E6C99L,0x972DEFA1L,0x4F90B9DFL,0x43196522L,0x972DEFA1L,0x05838E02L},{4294967295UL,4294967290UL,4294967295UL,3UL,4294967288UL,0x22B6C2F9L,0x66335B3AL,4294967288UL,0xBB659700L}},{{0x001AC486L,1UL,0xD4514F8AL,0x7B4E6C99L,4294967293UL,0x43196522L,0x43196522L,4294967293UL,0x7B4E6C99L},{4294967295UL,0x0ACDEEBDL,4294967295UL,3UL,4294967290UL,4294967295UL,0UL,0x66335B3AL,0x8121F976L},{4294967295UL,0x43196522L,0x55E71AF7L,0x6C626E1CL,1UL,0x2A49B2C7L,4UL,1UL,0xC95BEA71L},{0x9FBED03EL,0x22B6C2F9L,4294967295UL,0x5A1F2CF3L,0xF5ACFD47L,0UL,0UL,0xF5ACFD47L,0x5A1F2CF3L},{4294967295UL,0x4F90B9DFL,4294967295UL,0x6C626E1CL,0x43196522L,0x764EA846L,4UL,0x43196522L,8UL},{0x9FBED03EL,0x66335B3AL,0x5B65FAAEL,0x5A1F2CF3L,0x22B6C2F9L,0x4FA3FF0EL,0UL,0x22B6C2F9L,0x7F81A6ADL}}}; + uint32_t l_1538 = 18446744073709551606UL; + uint32_t l_1542 = 0x5126608CL; + const int8_t l_1564 = 0xCFL; + int16_t l_1674 = 0L; + uint32_t l_1675[4][2][6] = {{{9UL,9UL,0UL,0x1A6A88C2L,0UL,9UL},{0UL,4294967295UL,0x1A6A88C2L,0x1A6A88C2L,4294967295UL,0UL}},{{9UL,0UL,0x1A6A88C2L,0UL,9UL,9UL},{4294967295UL,0UL,0UL,4294967295UL,4294967295UL,4294967295UL}},{{4294967295UL,4294967295UL,4294967295UL,0UL,0UL,4294967295UL},{9UL,9UL,0UL,0x1A6A88C2L,0UL,9UL}},{{0UL,4294967295UL,0x1A6A88C2L,0x1A6A88C2L,4294967295UL,0UL},{9UL,0UL,0x1A6A88C2L,0UL,9UL,9UL}}}; + uint8_t l_1682 = 249UL; + int32_t l_1755 = 0L; + uint8_t l_1776 = 248UL; + int i, j, k; + for (i = 0; i < 3; i++) + l_990[i] = 4294967295UL; + for (i = 0; i < 2; i++) + l_1108[i] = 0xA99751B8L; + for (i = 0; i < 3; i++) + l_1431[i] = 0UL; + if ((safe_rshift_func_int8_t_s_s(0L, (((((safe_rshift_func_int16_t_s_s((((((safe_lshift_func_int16_t_s_s(((p_45 || (!(((*g_713)--) > p_48))) , (safe_mod_func_uint16_t_u_u((((&g_713 != (l_874 = &g_713)) , (++(*g_713))) != 0x7FDBL), (((p_45 && ((safe_sub_func_int16_t_s_s((((((&g_713 == &g_713) != 0x7EC58B7AL) , 0x7A3783A8L) == l_879) & p_47), 1UL)) != 2UL)) || 0UL) && l_879)))), g_775)) < 0xDACD2365L) == l_879) == 0UL) > p_48), 7)) == l_879) , (*g_434)) || p_47) >= p_46)))) + { /* block id: 480 */ + uint16_t l_892 = 0x8211L; + int32_t *l_941 = (void*)0; + int32_t *l_944 = &l_851; + uint16_t ****l_1005 = &l_873[3]; + l_880 = &l_879; + if (((p_47 | 0x59C7L) == ((*g_434) = ((p_45 || (*g_434)) >= (safe_lshift_func_int16_t_s_u((safe_mod_func_int32_t_s_s(((*g_434) && (safe_unary_minus_func_uint16_t_u((p_47 ^ (0x8C6AL | ((safe_lshift_func_uint8_t_u_u(((((safe_lshift_func_uint8_t_u_u(0x1BL, p_47)) != (*l_880)) != g_59[1]) , l_892), 3)) & 0xA9L)))))), (*l_880))), p_48)))))) + { /* block id: 483 */ + int32_t *l_925 = (void*)0; + int32_t **l_945 = &l_827; + uint8_t l_954 = 0xC4L; + const uint16_t *l_960 = &g_961; + const uint16_t **l_959 = &l_960; + const uint16_t ***l_958[6]; + int i; + for (i = 0; i < 6; i++) + l_958[i] = &l_959; + for (g_126 = 2; (g_126 > 7); ++g_126) + { /* block id: 486 */ + int16_t *l_913 = (void*)0; + int16_t *l_914 = (void*)0; + int16_t *l_915 = &g_124; + int32_t l_916 = 0x331B7C2BL; + uint32_t *l_917[2][9] = {{&l_826,(void*)0,(void*)0,&l_826,(void*)0,&l_826,(void*)0,(void*)0,&l_826},{(void*)0,(void*)0,&l_789,(void*)0,(void*)0,(void*)0,(void*)0,&l_789,(void*)0}}; + int32_t l_918[9]; + int32_t l_920[4]; + int16_t *l_921 = &g_775; + int i, j; + for (i = 0; i < 9; i++) + l_918[i] = 2L; + for (i = 0; i < 4; i++) + l_920[i] = 9L; + (*l_880) = (safe_add_func_uint32_t_u_u((~(safe_add_func_int32_t_s_s(0x2B42C6FBL, (((*l_921) |= (((safe_rshift_func_int16_t_s_u((safe_mul_func_uint8_t_u_u((p_48 ^ ((((safe_mul_func_uint16_t_u_u((p_45 <= (safe_lshift_func_uint8_t_u_u(((void*)0 != &g_454), 4))), ((safe_mul_func_int16_t_s_s(((safe_lshift_func_uint8_t_u_s(p_46, 6)) ^ (-1L)), ((l_918[4] = (safe_add_func_uint16_t_u_u(((((l_916 &= (p_47 , (((((((*l_915) = g_138[3]) > p_47) < p_45) < p_45) & 6UL) | 0xCCFFEDAEL))) ^ 0x8F8481BCL) | (*l_880)) , p_45), l_892))) , l_919))) == 251UL))) >= p_46) , (*l_880)) || 0xB3L)), l_920[1])), 14)) >= 0x4644L) , 1L)) != 0x0A15L)))), (*g_434))); + for (g_358 = 0; (g_358 == (-9)); g_358 = safe_sub_func_int32_t_s_s(g_358, 7)) + { /* block id: 494 */ + int32_t *l_924 = (void*)0; + uint32_t *l_940 = &g_408[2][5]; + int32_t **l_942 = &l_924; + uint8_t ***l_943 = &g_658[3]; + l_925 = l_924; + l_918[4] ^= (((safe_lshift_func_uint8_t_u_s(((safe_mod_func_uint16_t_u_u((g_435 == g_435), (((*g_514) = p_48) && ((*g_434) = (*l_880))))) > 4UL), p_47)) >= (((safe_div_func_int32_t_s_s((((*g_146) = l_892) && ((*l_940) &= (safe_lshift_func_int16_t_s_u((safe_sub_func_uint8_t_u_u((safe_mul_func_uint8_t_u_u((9UL < ((safe_add_func_uint8_t_u_u(p_48, p_47)) > l_892)), l_892)), (-1L))), 14)))), (*l_880))) || 0UL) || 255UL)) <= l_920[1]); + (*l_942) = l_941; + (*l_943) = &g_659; + } + (*g_514) = (p_48 && (-1L)); + } + (*l_945) = l_944; + for (g_775 = 0; (g_775 >= (-1)); g_775 = safe_sub_func_uint16_t_u_u(g_775, 1)) + { /* block id: 509 */ + uint16_t l_957 = 1UL; + for (g_360 = 8; (g_360 >= 0); g_360 -= 1) + { /* block id: 512 */ + int i; + (*l_827) = g_69[g_360]; + } + for (l_826 = 7; (l_826 > 57); l_826 = safe_add_func_uint8_t_u_u(l_826, 2)) + { /* block id: 517 */ + int32_t *l_950 = &g_60[0][4][3]; + int32_t *l_951 = &g_59[4]; + int32_t *l_952 = &l_851; + int32_t *l_953[6][7][6] = {{{&l_851,&l_857[1],&g_36,(void*)0,(void*)0,&g_61},{&l_851,&l_857[1],&g_36,&g_60[0][4][3],&l_857[1],&l_857[1]},{(void*)0,&l_851,&l_851,(void*)0,&l_851,(void*)0},{&g_60[0][4][3],&g_36,&l_857[1],&l_851,&g_61,&l_857[4]},{(void*)0,&g_36,&l_857[1],&l_851,&g_61,&g_60[0][4][3]},{&g_61,&g_36,(void*)0,&g_60[1][0][3],&l_851,&g_60[1][0][3]},{&g_60[1][1][0],&l_851,&g_60[1][1][0],&l_857[1],&l_857[1],&g_61}},{{&g_61,&l_857[1],&l_857[4],&l_857[1],(void*)0,&g_36},{&l_857[1],&l_857[1],&g_61,&l_857[1],&l_879,&l_857[1]},{&g_61,(void*)0,&l_851,&l_857[1],&l_857[1],&l_851},{&g_60[1][1][0],&g_60[1][1][0],&l_855,&g_60[1][0][3],&g_59[1],&l_857[1]},{&g_61,&l_857[4],&g_59[1],&l_851,(void*)0,&l_855},{(void*)0,&g_61,&g_59[1],&l_851,&g_60[1][1][0],&l_857[1]},{&g_60[0][4][3],&l_851,&l_855,(void*)0,&l_855,&l_851}},{{&g_61,&g_36,&l_851,&l_857[4],(void*)0,&l_857[1]},{&l_851,&g_60[1][0][3],&g_61,&l_857[1],&g_61,&l_857[1]},{&g_61,&g_60[1][0][3],&g_61,&g_61,(void*)0,(void*)0},{&g_60[1][1][0],&g_36,&g_59[8],&g_59[8],&g_36,&g_60[1][1][0]},{&l_857[1],&l_851,&l_857[1],(void*)0,&g_59[8],&l_857[4]},{&l_879,&g_61,&l_855,&g_36,&l_851,&g_61},{&l_879,&g_61,&g_36,(void*)0,&g_60[1][0][3],&l_851}},{{&l_857[1],&g_59[8],&g_61,&g_59[8],&l_857[1],&l_855},{&g_60[1][1][0],&l_857[1],&l_857[1],&g_61,(void*)0,&g_59[1]},{&g_61,&l_855,&l_857[1],&l_857[1],&g_61,&g_59[1]},{&l_851,&g_36,&l_857[1],&l_857[4],&l_855,&l_855},{&g_61,&g_61,&g_61,&g_61,&l_851,&l_851},{&l_857[4],&l_857[1],&g_36,&l_851,(void*)0,&g_61},{&l_857[1],&l_857[1],&l_855,&g_61,(void*)0,&l_857[4]}},{{&g_61,&l_857[1],&l_857[1],&g_60[1][1][0],&l_851,&g_60[1][1][0]},{&g_59[8],&g_61,&g_59[8],&l_857[1],&l_855,(void*)0},{(void*)0,&g_36,&g_61,&l_879,&g_61,&l_857[1]},{&g_36,&l_855,&g_61,&l_879,(void*)0,&l_857[1]},{(void*)0,&l_857[1],&l_851,&l_857[1],&l_857[1],&l_851},{&g_59[8],&g_59[8],&g_36,&g_60[1][1][0],&g_60[1][0][3],&g_36},{&g_61,&g_61,&g_60[1][0][3],&g_61,&l_851,&g_36}},{{&l_857[1],&g_61,&g_60[1][0][3],&l_851,&g_59[8],&g_36},{&l_857[4],&l_851,&g_36,&g_61,&g_36,&l_851},{&g_61,&g_36,&l_851,&l_857[4],(void*)0,&l_857[1]},{&l_851,&g_60[1][0][3],&g_61,&l_857[1],&g_61,&l_857[1]},{&g_61,&g_60[1][0][3],&g_61,&g_61,(void*)0,(void*)0},{&g_60[1][1][0],&g_36,&g_59[8],&g_59[8],&g_36,&g_60[1][1][0]},{&l_857[1],&l_851,&l_857[1],(void*)0,&g_59[8],&l_857[4]}}}; + int i, j, k; + ++l_954; + l_957 |= ((*l_952) = (((*l_790) ^= (-1L)) & (*l_944))); + } + (*g_514) = ((*l_827) |= (*l_880)); + } + l_964 = (l_962 = (void*)0); + } + else + { /* block id: 528 */ + for (g_61 = 0; g_61 < 2; g_61 += 1) + { + for (l_892 = 0; l_892 < 5; l_892 += 1) + { + for (g_358 = 0; g_358 < 4; g_358 += 1) + { + g_60[g_61][l_892][g_358] = 6L; + } + } + } + } + for (g_131 = (-5); (g_131 <= 34); g_131 = safe_add_func_int16_t_s_s(g_131, 5)) + { /* block id: 533 */ + uint16_t ***l_973 = &l_874; + int32_t l_984 = 0xDFBF9410L; + int32_t **l_1000 = &l_941; + uint8_t *l_1027 = &g_131; + for (p_47 = (-26); (p_47 < 29); p_47 = safe_add_func_int32_t_s_s(p_47, 6)) + { /* block id: 536 */ + uint16_t ****l_974 = &l_973; + uint16_t ****l_975 = &l_873[1]; + int32_t *l_985[6][2][2] = {{{&g_61,&g_59[1]},{&g_59[1],&g_61}},{{&g_59[1],&g_59[1]},{&g_61,&g_59[1]}},{{&g_59[1],&g_61},{&g_59[1],&g_59[1]}},{{&g_61,&g_59[1]},{&g_59[1],&g_61}},{{&g_59[1],&g_59[1]},{&g_61,&g_59[1]}},{{&g_59[1],&g_61},{&g_59[1],&g_61}}}; + uint16_t l_995[10][3][3] = {{{0x876CL,0xB242L,0x0660L},{65532UL,65532UL,65535UL},{65530UL,0xB242L,65535UL}},{{65535UL,4UL,65535UL},{65530UL,0xA11BL,65530UL},{65532UL,65535UL,65535UL}},{{0x876CL,1UL,65535UL},{65532UL,65535UL,65535UL},{65535UL,0xA11BL,0x0660L}},{{65532UL,4UL,65532UL},{0x876CL,0xB242L,0x0660L},{65532UL,65532UL,65535UL}},{{65530UL,0xB242L,65535UL},{65535UL,4UL,65535UL},{65530UL,0xA11BL,65530UL}},{{65532UL,65535UL,65535UL},{0x876CL,1UL,65535UL},{65532UL,65535UL,65535UL}},{{65535UL,0xA11BL,0x0660L},{65532UL,4UL,65532UL},{0x876CL,0xB242L,0x0660L}},{{65532UL,65532UL,65535UL},{65530UL,0xB242L,65535UL},{65535UL,4UL,65535UL}},{{65530UL,0xA11BL,65530UL},{65532UL,65535UL,65535UL},{0x876CL,1UL,65535UL}},{{65532UL,65535UL,65535UL},{65535UL,0xA11BL,0x0660L},{65532UL,4UL,65532UL}}}; + int i, j, k; + } + } + } + else + { /* block id: 565 */ + int8_t ****l_1062 = &l_1061; + uint8_t ***l_1066 = &g_658[3]; + int32_t *l_1068 = (void*)0; + int32_t *l_1069 = (void*)0; + int32_t l_1070 = (-1L); + int32_t l_1105 = 0x2603CE82L; + int32_t l_1109 = 0x5D5B4DEDL; + int32_t l_1110[4] = {4L,4L,4L,4L}; + uint16_t l_1112 = 0x8815L; + int i; + if ((((*g_434) < (safe_mul_func_int8_t_s_s(((safe_sub_func_int32_t_s_s(((((safe_mod_func_uint8_t_u_u(((safe_lshift_func_int16_t_s_u(((safe_add_func_uint32_t_u_u((safe_rshift_func_uint16_t_u_s(((((((((g_358 = (((safe_sub_func_uint16_t_u_u((p_47 = (safe_add_func_int16_t_s_s((((safe_sub_func_uint16_t_u_u(p_45, (((*l_1062) = l_1061) == l_1063))) , 0x4037D8D8L) <= (((*g_434) >= ((l_1064 != (l_1065 = l_1064)) != ((void*)0 == l_1066))) , l_1067)), (*l_880)))), p_45)) , (void*)0) == (void*)0)) , p_47) | 0x9FE39FA7L) , g_961) , p_47) < (*l_880)) == 0x4F7AL) || p_47), g_138[3])), p_46)) <= p_45), l_1070)) || 0x0DL), 0x71L)) < p_45) , l_1071) == &l_824), 0xDE5D4DB2L)) , l_1070), p_45))) <= p_45)) + { /* block id: 570 */ +lbl_1099: + l_880 = &l_1070; + } + else + { /* block id: 572 */ + const int8_t ****l_1085 = (void*)0; + for (g_436 = 0; (g_436 > 39); ++g_436) + { /* block id: 575 */ + uint32_t l_1076 = 1UL; + const int32_t *l_1100 = &l_857[1]; + for (g_358 = 0; (g_358 >= (-14)); g_358 = safe_sub_func_int16_t_s_s(g_358, 4)) + { /* block id: 578 */ + l_1076++; + if ((*l_880)) + break; + if (p_46) + continue; + } + (*g_514) ^= ((safe_rshift_func_uint16_t_u_s(0x7586L, ((p_45 & (((safe_lshift_func_int16_t_s_u((((safe_lshift_func_uint16_t_u_s(((void*)0 == l_1085), (safe_div_func_int16_t_s_s((safe_sub_func_int16_t_s_s(((!0xE0L) && p_46), (l_1070 == (safe_sub_func_uint16_t_u_u((safe_lshift_func_uint8_t_u_s((safe_mul_func_int8_t_s_s(0L, l_1070)), 6)), 0xCBD5L))))), p_47)))) , (void*)0) != (void*)0), g_1096[0])) >= 0xE085DD08L) > l_1076)) == (-1L)))) , 0xEB6DF802L); + l_1070 |= (-2L); + for (g_510 = (-2); (g_510 != (-29)); g_510--) + { /* block id: 587 */ + const int32_t **l_1101 = &l_1100; + if (g_360) + goto lbl_1099; + (*l_1101) = l_1100; + (*l_1101) = &l_1070; + if (p_48) + break; + } + } + } + for (g_145 = 0; (g_145 == 21); ++g_145) + { /* block id: 597 */ + int32_t *l_1104 = (void*)0; + int32_t *l_1106 = (void*)0; + int32_t *l_1107[6][5] = {{&l_1070,(void*)0,&g_36,&g_60[0][4][3],&g_60[0][4][3]},{(void*)0,(void*)0,(void*)0,&g_59[0],(void*)0},{&g_60[0][4][3],&g_59[3],&g_59[0],&g_60[0][4][3],&g_59[0]},{&g_60[0][4][3],&g_60[0][4][3],&g_36,(void*)0,&l_1070},{(void*)0,&l_1070,&g_59[0],&g_59[0],&l_1070},{&l_1070,&g_59[3],(void*)0,&l_1070,&g_59[0]}}; + int32_t l_1111 = 0xC680B001L; + int i, j; + l_1070 = 0x81C649FFL; + l_1112++; + return (*g_454); + } + } + for (p_46 = 0; (p_46 > 38); ++p_46) + { /* block id: 605 */ + uint8_t l_1129[1][5][9] = {{{255UL,255UL,0xC0L,255UL,255UL,0xC0L,255UL,255UL,0xC0L},{1UL,1UL,0x8DL,1UL,1UL,0x8DL,1UL,1UL,0x8DL},{255UL,255UL,0xC0L,255UL,255UL,0xC0L,255UL,255UL,0xC0L},{1UL,1UL,0x8DL,1UL,1UL,0x8DL,1UL,1UL,0x8DL},{255UL,255UL,0xC0L,255UL,255UL,0xC0L,255UL,255UL,0xC0L}}}; + int16_t *l_1144 = &g_124; + int32_t *l_1148[6][1][3] = {{{&l_1108[1],(void*)0,&l_851}},{{&g_36,&g_36,&l_851}},{{(void*)0,&l_1108[1],&l_851}},{{&l_1108[1],(void*)0,&l_851}},{{&g_36,&g_36,&l_851}},{{(void*)0,&l_1108[1],&l_851}}}; + uint16_t ***l_1211 = &l_874; + uint32_t l_1212[4][2] = {{1UL,1UL},{1UL,1UL},{1UL,1UL},{1UL,1UL}}; + uint32_t l_1258[3][10][8] = {{{0x0ECC242CL,2UL,0xBBA08DF3L,18446744073709551614UL,18446744073709551615UL,0x4194A657L,0xACFC1F18L,18446744073709551606UL},{1UL,0x728BE276L,18446744073709551615UL,0x4194A657L,18446744073709551613UL,0x4A4E1478L,18446744073709551614UL,2UL},{0xBBA08DF3L,0xC6AFF327L,0xEBB805F8L,18446744073709551613UL,0xEBB805F8L,0xC6AFF327L,0xBBA08DF3L,18446744073709551615UL},{18446744073709551609UL,0x073E66A2L,0x4194A657L,0x93447063L,0xC450AD13L,2UL,0xC6AFF327L,0xF001BE9DL},{0UL,0UL,2UL,0x0ECC242CL,0xC450AD13L,18446744073709551609UL,18446744073709551615UL,18446744073709551613UL},{18446744073709551609UL,0xD0026597L,0xACFC1F18L,0xF001BE9DL,0xEBB805F8L,2UL,0x93447063L,0x073E66A2L},{0xBBA08DF3L,0x71035224L,0xFAD7F9E8L,0UL,18446744073709551613UL,18446744073709551614UL,18446744073709551615UL,4UL},{1UL,1UL,0xFC2D4B21L,0xFAD7F9E8L,18446744073709551615UL,18446744073709551615UL,0xFAD7F9E8L,0xFC2D4B21L},{0x0ECC242CL,0x0ECC242CL,0xCE6368AAL,1UL,0xD0026597L,0xFC2D4B21L,0x71035224L,0UL},{0x71035224L,0xEBB805F8L,0x3A03219BL,0xC450AD13L,18446744073709551614UL,0UL,2UL,0UL}},{{0xEBB805F8L,18446744073709551615UL,18446744073709551614UL,1UL,2UL,0UL,0x834DBD27L,0xFC2D4B21L},{18446744073709551606UL,0x3A03219BL,18446744073709551614UL,0xFAD7F9E8L,0xBBA08DF3L,0x834DBD27L,1UL,4UL},{18446744073709551614UL,0xFC2D4B21L,18446744073709551615UL,0UL,0UL,0x073E66A2L,0xEBB805F8L,0x073E66A2L},{0xFAD7F9E8L,0xF001BE9DL,0xD0026597L,0xF001BE9DL,0xFAD7F9E8L,0x728BE276L,2UL,18446744073709551613UL},{2UL,4UL,1UL,0x0ECC242CL,18446744073709551615UL,18446744073709551606UL,0x073E66A2L,0xF001BE9DL},{1UL,4UL,1UL,0x93447063L,4UL,0x3A03219BL,2UL,18446744073709551615UL},{18446744073709551615UL,0x4A4E1478L,0xD0026597L,18446744073709551613UL,0x728BE276L,18446744073709551613UL,0xEBB805F8L,2UL},{18446744073709551613UL,18446744073709551615UL,18446744073709551615UL,0x4194A657L,18446744073709551609UL,0x71035224L,1UL,18446744073709551606UL},{0xC6AFF327L,0x834DBD27L,18446744073709551614UL,18446744073709551614UL,18446744073709551614UL,18446744073709551614UL,0x834DBD27L,0xC6AFF327L},{18446744073709551615UL,0xECA7B7A3L,18446744073709551614UL,0x834DBD27L,0x0ECC242CL,18446744073709551615UL,2UL,18446744073709551609UL}},{{1UL,18446744073709551609UL,0x3A03219BL,4UL,0x834DBD27L,18446744073709551615UL,0x71035224L,0UL},{18446744073709551613UL,0xECA7B7A3L,0xCE6368AAL,18446744073709551606UL,0x3A03219BL,18446744073709551614UL,0xFAD7F9E8L,0xBBA08DF3L},{0UL,0x834DBD27L,0xFC2D4B21L,18446744073709551613UL,0x073E66A2L,0x71035224L,18446744073709551615UL,0x5DC9B454L},{0x4A4E1478L,0UL,0x93447063L,0xBBA08DF3L,0x0ECC242CL,0UL,0x0ECC242CL,0xBBA08DF3L},{0xECA7B7A3L,18446744073709551606UL,0xECA7B7A3L,2UL,0xACFC1F18L,18446744073709551615UL,1UL,0xC450AD13L},{0UL,18446744073709551615UL,0xFC2D4B21L,18446744073709551614UL,0x4194A657L,0xFAD7F9E8L,0xACFC1F18L,0UL},{0UL,4UL,18446744073709551609UL,0xD0026597L,0xACFC1F18L,0xF001BE9DL,0xEBB805F8L,2UL},{0xECA7B7A3L,0x3A03219BL,0x71035224L,18446744073709551615UL,0x0ECC242CL,18446744073709551614UL,0x728BE276L,0xF001BE9DL},{18446744073709551606UL,0xD0026597L,0xCE6368AAL,18446744073709551613UL,18446744073709551614UL,4UL,0xECA7B7A3L,0xECA7B7A3L},{0x4194A657L,18446744073709551615UL,0xEBB805F8L,0xEBB805F8L,18446744073709551615UL,0x4194A657L,18446744073709551613UL,0UL}}}; + int32_t ****l_1285 = &g_454; + int32_t l_1306 = 0xD7709800L; + uint32_t l_1354 = 0UL; + int i, j, k; + if (((safe_mod_func_uint32_t_u_u((safe_add_func_int32_t_s_s((+(safe_mod_func_uint32_t_u_u(((((l_1123 != &l_1124) >= (~(safe_sub_func_int8_t_s_s((safe_lshift_func_uint16_t_u_u(l_1129[0][0][2], (safe_div_func_uint16_t_u_u((safe_rshift_func_uint8_t_u_u((safe_rshift_func_uint16_t_u_u(((g_408[2][6] ^ (safe_add_func_int8_t_s_s((safe_sub_func_uint8_t_u_u((((safe_mul_func_int16_t_s_s(((*l_1144) = (((*g_146) = ((*g_146) > p_47)) && (safe_mod_func_int16_t_s_s(2L, 0xCCE6L)))), (((*g_514) = (!(((&g_435 == (void*)0) && 0x1E7E6082L) , (*g_514)))) , p_45))) ^ p_47) , 253UL), p_46)), p_45))) ^ (*g_434)), l_1129[0][1][7])), l_1129[0][4][0])), p_46)))), p_46)))) , 0L) , p_45), 8UL))), 0x70A85053L)), (*g_434))) | 254UL)) + { /* block id: 609 */ + int32_t **l_1145 = &g_37; + (*l_1145) = &g_59[1]; + for (l_860 = 0; (l_860 < 52); l_860 = safe_add_func_int8_t_s_s(l_860, 8)) + { /* block id: 613 */ + l_1148[3][0][0] = (*l_1145); + } + } + else + { /* block id: 616 */ + uint32_t *l_1161 = (void*)0; + uint32_t *l_1162 = &g_408[4][7]; + uint32_t *l_1163[2]; + int32_t l_1164 = 0L; + int8_t l_1165 = 0x78L; + int32_t l_1175 = 0x51F4F9EEL; + int32_t l_1177 = 0x008E83A0L; + int32_t l_1180 = 0xCBB2DE62L; + int32_t l_1181 = (-1L); + int32_t l_1183 = 0x5E58F2BFL; + int32_t l_1189 = 9L; + int32_t l_1191 = 0xFD59E9D3L; + int32_t l_1192[6][5] = {{2L,1L,2L,2L,1L},{0x04104790L,(-3L),(-10L),0x1EC6F59FL,(-10L)},{1L,1L,0x167B7268L,1L,1L},{(-10L),0x1EC6F59FL,(-10L),(-3L),0x04104790L},{1L,2L,2L,1L,2L},{0x04104790L,0x1EC6F59FL,1L,0x1EC6F59FL,0x04104790L}}; + uint8_t l_1193 = 4UL; + const uint16_t ***l_1205 = &l_962; + int16_t l_1223 = 0x7D73L; + int32_t l_1251 = 2L; + int32_t l_1329[1]; + const uint32_t l_1448 = 0x7DF362DFL; + int32_t **l_1458 = (void*)0; + int i, j; + for (i = 0; i < 2; i++) + l_1163[i] = &g_436; + for (i = 0; i < 1; i++) + l_1329[i] = 1L; + if (((+(safe_mul_func_int8_t_s_s((p_46 & ((((*g_434)++) ^ (((l_1164 = (safe_sub_func_uint32_t_u_u(((g_61 ^ (+(~(+(safe_lshift_func_int8_t_s_s(0xE2L, 3)))))) , ((*l_1162) = (0L ^ ((*g_514) &= ((*g_146) = (safe_rshift_func_int16_t_s_s((9UL != ((g_358 , ((*g_992) != &l_962)) | p_48)), g_61))))))), p_48))) < 0L) <= p_46)) == l_1165)), 0x64L))) != 65535UL)) + { /* block id: 622 */ + uint16_t l_1169 = 65535UL; + int32_t **l_1172 = &l_827; + int32_t l_1174 = (-7L); + int32_t l_1176 = (-1L); + int32_t l_1179 = 0xE825BFAEL; + int32_t l_1184 = 1L; + int32_t l_1185 = (-1L); + int32_t l_1186 = 0x368B2BF9L; + int32_t l_1187 = 0x2D5947ADL; + int32_t l_1188 = 0xA351F4C8L; + int32_t l_1190[8] = {0xD6BFCEA0L,(-10L),0xD6BFCEA0L,0xD6BFCEA0L,(-10L),0xD6BFCEA0L,0xD6BFCEA0L,(-10L)}; + int i; + for (l_919 = 1; (l_919 == 1); l_919++) + { /* block id: 625 */ + int8_t l_1168 = 0x45L; + ++l_1169; + } + (*l_1172) = l_1148[3][0][0]; + ++l_1193; + } + else + { /* block id: 630 */ + int8_t l_1214[6][7][1] = {{{5L},{1L},{5L},{1L},{5L},{1L},{5L}},{{1L},{5L},{1L},{5L},{1L},{5L},{1L}},{{5L},{1L},{5L},{1L},{5L},{1L},{5L}},{{1L},{5L},{1L},{5L},{1L},{5L},{1L}},{{5L},{1L},{5L},{1L},{5L},{1L},{5L}},{{1L},{5L},{1L},{5L},{1L},{5L},{1L}}}; + uint16_t ***l_1323 = &l_874; + int32_t l_1330 = 0x3DE92DE1L; + int32_t ***l_1331 = (void*)0; + int i, j, k; + for (l_856 = 8; (l_856 >= 0); l_856 -= 1) + { /* block id: 633 */ + const uint16_t ***l_1204 = &l_962; + const uint16_t ****l_1203[9][3][9] = {{{&l_1204,&l_1204,&l_1204,&l_1204,&l_1204,&l_1204,&l_1204,&l_1204,(void*)0},{&l_1204,&l_1204,&l_1204,(void*)0,&l_1204,&l_1204,&l_1204,&l_1204,&l_1204},{&l_1204,(void*)0,(void*)0,&l_1204,&l_1204,&l_1204,&l_1204,&l_1204,&l_1204}},{{(void*)0,&l_1204,(void*)0,&l_1204,&l_1204,(void*)0,&l_1204,&l_1204,&l_1204},{&l_1204,(void*)0,&l_1204,(void*)0,&l_1204,&l_1204,&l_1204,(void*)0,&l_1204},{&l_1204,&l_1204,&l_1204,&l_1204,&l_1204,&l_1204,&l_1204,&l_1204,(void*)0}},{{(void*)0,&l_1204,&l_1204,&l_1204,&l_1204,&l_1204,&l_1204,(void*)0,&l_1204},{&l_1204,&l_1204,&l_1204,&l_1204,(void*)0,(void*)0,(void*)0,&l_1204,&l_1204},{&l_1204,(void*)0,&l_1204,&l_1204,&l_1204,(void*)0,&l_1204,&l_1204,&l_1204}},{{&l_1204,(void*)0,&l_1204,(void*)0,&l_1204,(void*)0,&l_1204,(void*)0,&l_1204},{&l_1204,&l_1204,&l_1204,&l_1204,(void*)0,&l_1204,&l_1204,&l_1204,&l_1204},{&l_1204,&l_1204,&l_1204,(void*)0,(void*)0,&l_1204,&l_1204,(void*)0,&l_1204}},{{&l_1204,&l_1204,&l_1204,&l_1204,&l_1204,(void*)0,&l_1204,&l_1204,&l_1204},{(void*)0,&l_1204,&l_1204,(void*)0,&l_1204,(void*)0,(void*)0,&l_1204,(void*)0},{&l_1204,&l_1204,&l_1204,&l_1204,&l_1204,&l_1204,&l_1204,(void*)0,&l_1204}},{{(void*)0,&l_1204,&l_1204,&l_1204,&l_1204,&l_1204,&l_1204,(void*)0,&l_1204},{&l_1204,&l_1204,(void*)0,&l_1204,&l_1204,(void*)0,&l_1204,&l_1204,&l_1204},{&l_1204,(void*)0,&l_1204,(void*)0,&l_1204,(void*)0,(void*)0,(void*)0,&l_1204}},{{&l_1204,(void*)0,(void*)0,&l_1204,&l_1204,(void*)0,(void*)0,&l_1204,&l_1204},{(void*)0,&l_1204,&l_1204,(void*)0,&l_1204,&l_1204,&l_1204,(void*)0,&l_1204},{&l_1204,&l_1204,(void*)0,&l_1204,&l_1204,(void*)0,(void*)0,&l_1204,&l_1204}},{{&l_1204,&l_1204,(void*)0,(void*)0,&l_1204,&l_1204,&l_1204,&l_1204,&l_1204},{(void*)0,&l_1204,&l_1204,&l_1204,&l_1204,&l_1204,&l_1204,&l_1204,&l_1204},{&l_1204,&l_1204,&l_1204,&l_1204,&l_1204,&l_1204,(void*)0,&l_1204,&l_1204}},{{&l_1204,&l_1204,&l_1204,&l_1204,&l_1204,&l_1204,&l_1204,&l_1204,&l_1204},{&l_1204,&l_1204,&l_1204,&l_1204,&l_1204,&l_1204,(void*)0,&l_1204,(void*)0},{&l_1204,(void*)0,&l_1204,&l_1204,&l_1204,&l_1204,(void*)0,&l_1204,&l_1204}}}; + int32_t ****l_1206 = &l_824; + uint32_t l_1213 = 0x6CD7B8E6L; + uint8_t *l_1238 = &g_131; + int i, j, k; + (*g_146) = (((((safe_mod_func_uint32_t_u_u(((safe_lshift_func_uint8_t_u_u((!(((safe_mul_func_int8_t_s_s(((*l_790) |= g_1202), (l_1177 = (!(p_45 ^ ((l_1205 = (void*)0) != (((((*l_1071) = (void*)0) == ((*l_1206) = &g_455)) , (safe_rshift_func_int8_t_s_s((((*l_1162) = 4294967295UL) >= (safe_mod_func_uint16_t_u_u(((l_1211 != ((((void*)0 != (*l_1061)) > p_46) , (void*)0)) , l_1193), g_60[0][4][3]))), 4))) , (*g_992)))))))) , l_1212[2][0]) <= 8L)), 4)) != p_46), (*g_434))) , l_1213) != 0UL) , p_47) <= l_1214[5][5][0]); + l_1251 ^= ((safe_mod_func_uint16_t_u_u(((safe_mul_func_uint16_t_u_u((safe_sub_func_int32_t_s_s((+((safe_add_func_uint16_t_u_u(l_1223, ((g_69[l_856] = (safe_rshift_func_int8_t_s_u((safe_add_func_uint8_t_u_u((safe_mod_func_uint8_t_u_u((safe_mod_func_uint16_t_u_u((safe_div_func_int8_t_s_s(((((((((((safe_add_func_uint32_t_u_u(l_1191, (((safe_rshift_func_int8_t_s_s(((((*g_146) |= ((((*l_1238) ^= p_48) , (safe_mul_func_uint16_t_u_u(((safe_mod_func_uint32_t_u_u(((*g_713) || (safe_div_func_uint32_t_u_u((((((((safe_mul_func_int8_t_s_s(p_47, p_46)) ^ (safe_sub_func_int16_t_s_s(g_69[6], (l_1214[5][5][0] | ((p_46 <= 1UL) <= g_36))))) | l_1214[5][5][0]) || (*g_713)) >= (*g_434)) , g_138[0]) && p_45), (*g_514)))), p_48)) <= p_47), p_48))) , l_1249)) <= p_45) & p_47), 3)) | (*g_514)) == p_46))) != 0x4E7AL) != p_46) < 0UL) , g_1250) , p_46) != l_1214[3][6][0]) < 0xB137L) , (*g_146)) , p_45), 1UL)), p_48)), 0xBDL)), 1UL)), l_1214[3][2][0]))) | l_1214[5][5][0]))) && 0x02L)), 0xC9004992L)), p_45)) != l_1214[5][5][0]), l_1214[5][5][0])) < p_48); + } + if ((((safe_div_func_int32_t_s_s(((*g_514) = ((p_46 >= 0x9A75L) || 0xACL)), p_47)) || (*g_713)) && (safe_lshift_func_int8_t_s_u((safe_add_func_uint32_t_u_u(((p_47 < (g_436 != (((**g_992) == ((*l_1211) = (void*)0)) ^ (*g_514)))) && p_47), 8UL)), l_1258[2][3][3])))) + { /* block id: 648 */ + uint8_t *l_1269 = &l_1193; + uint8_t *l_1279 = &l_1067; + int32_t *****l_1284 = &l_1071; + uint16_t ***l_1307 = &g_712; + (*g_146) = (safe_add_func_int32_t_s_s((safe_lshift_func_int16_t_s_s((safe_mod_func_uint8_t_u_u(p_45, (safe_lshift_func_uint16_t_u_u((((*l_1279) = (((((safe_add_func_uint8_t_u_u(((((((*l_1269) = p_47) > ((!(safe_div_func_int16_t_s_s(p_45, (((safe_unary_minus_func_int8_t_s((l_1214[5][5][0] | ((safe_div_func_uint32_t_u_u((p_48 != (p_47 , (safe_add_func_uint16_t_u_u((l_1214[5][5][0] < (!(1L != (safe_lshift_func_int16_t_s_s(((*l_1144) &= g_1202), 13))))), p_46)))), p_46)) | 0xBEL)))) <= (-7L)) ^ 9UL)))) >= p_48)) && (*g_434)) != p_46) , p_48), 5UL)) || 0x1207L) ^ l_1214[5][5][0]) && 2L) ^ p_45)) && p_45), p_46)))), l_1214[1][5][0])), 4294967295UL)); + (*g_514) ^= (((*l_790) &= (-8L)) == ((safe_mul_func_uint8_t_u_u((((*l_1284) = &g_454) == l_1285), (((safe_mul_func_uint16_t_u_u((safe_add_func_int16_t_s_s(l_1191, (l_1108[0] &= (((l_1306 = (safe_div_func_uint8_t_u_u(((*l_1279) = ((safe_sub_func_uint16_t_u_u(((safe_rshift_func_uint8_t_u_u((p_47 & (safe_rshift_func_int8_t_s_s((!((safe_sub_func_uint32_t_u_u((l_1214[1][6][0] >= l_1214[5][5][0]), ((safe_sub_func_uint16_t_u_u((((safe_div_func_uint16_t_u_u((((((*g_713) = (!(safe_mul_func_uint8_t_u_u(((*l_1269) |= 0x14L), (l_1144 == &g_775))))) ^ 0x29A5L) < p_47) != 0xCE61ED42L), p_46)) > 0x3BE5L) , (*g_713)), p_46)) | 0xC9L))) != l_1214[1][3][0])), 2))), 0)) > l_1214[2][4][0]), g_510)) , 0x2AL)), l_1214[5][5][0]))) , l_1307) != (*g_992))))), (-1L))) < g_60[0][4][3]) , p_45))) >= p_46)); + return &g_37; + } + else + { /* block id: 662 */ + uint8_t *l_1313 = &l_1129[0][2][4]; + int32_t l_1322[9] = {(-3L),(-10L),(-3L),(-10L),(-3L),(-10L),(-3L),(-10L),(-3L)}; + int i; + l_1329[0] = ((safe_sub_func_int8_t_s_s(((safe_mul_func_uint8_t_u_u(((*l_1313) |= g_1312), (p_48 <= (+(safe_rshift_func_int16_t_s_s((safe_div_func_uint32_t_u_u((safe_lshift_func_uint8_t_u_u(((safe_rshift_func_uint8_t_u_s(l_1322[4], 7)) < (l_1323 == (g_1324 = &l_874))), 5)), ((*l_1162) = (safe_rshift_func_int8_t_s_s((safe_div_func_int32_t_s_s((~p_45), (p_47 , 0x74FE25C3L))), 1))))), g_131)))))) != p_47), 0x79L)) | p_48); + l_1330 = l_1322[4]; + l_1322[4] = ((void*)0 != l_1331); + } + } + for (l_789 = (-25); (l_789 >= 52); l_789 = safe_add_func_int8_t_s_s(l_789, 8)) + { /* block id: 673 */ + uint32_t l_1350[2][1][4]; + int32_t **l_1355 = &l_1148[3][0][0]; + int i, j, k; + for (i = 0; i < 2; i++) + { + for (j = 0; j < 1; j++) + { + for (k = 0; k < 4; k++) + l_1350[i][j][k] = 18446744073709551615UL; + } + } + for (p_48 = (-2); (p_48 == (-3)); p_48 = safe_sub_func_uint32_t_u_u(p_48, 5)) + { /* block id: 676 */ + uint32_t l_1353 = 18446744073709551615UL; + (*g_146) &= ((p_47 , (safe_mul_func_uint8_t_u_u(p_45, (safe_rshift_func_uint16_t_u_s(((safe_add_func_int16_t_s_s(p_47, ((+(((safe_mod_func_uint32_t_u_u((((*l_1162) = (safe_add_func_int32_t_s_s((((g_1096[0] , ((((safe_div_func_int32_t_s_s(((safe_sub_func_uint16_t_u_u(((*g_514) | p_48), (l_1350[0][0][1] = p_46))) & (safe_mul_func_int16_t_s_s(g_358, g_2))), (*g_434))) || p_48) , 65535UL) | p_47)) && 1UL) | l_1353), 0xB364D226L))) , 0xA0A58F63L), l_1191)) && p_46) != l_1353)) != l_1354))) >= p_45), g_415))))) ^ (*g_713)); + return &g_37; + } + } + (*g_146) |= ((*g_713) && ((((((*g_1324) = (*g_1324)) == &l_793[0][0]) & (((((safe_unary_minus_func_int16_t_s(((safe_add_func_uint32_t_u_u((safe_div_func_uint16_t_u_u(0UL, ((*g_713) = p_45))), (safe_add_func_uint8_t_u_u(((safe_mod_func_int32_t_s_s(l_1365, (((safe_div_func_uint32_t_u_u((((safe_rshift_func_uint8_t_u_s(((*l_1071) == l_824), 7)) < g_1096[0]) != 0x39CA519CL), 0xF92D732FL)) , p_48) && p_46))) , 252UL), p_46)))) , p_47))) != 0x16L) != l_1180) | 1UL) | l_1192[4][4])) || 0x53A17BC8L) | 6L)); + if ((((safe_mod_func_uint16_t_u_u(l_1249, 0x29DDL)) | ((safe_div_func_uint32_t_u_u((((*l_1162) = (p_46 && (safe_rshift_func_int8_t_s_u(g_145, ((l_1251 = (p_47 = (&g_775 != ((safe_div_func_int8_t_s_s(((*l_790) = p_45), p_47)) , &p_45)))) == (+(g_775 ^= (safe_rshift_func_uint16_t_u_u(((*g_713) = ((((*l_1144) = ((safe_sub_func_uint16_t_u_u((((*g_146) = p_48) || p_48), p_45)) , (-5L))) <= 0L) != (*g_514))), 12))))))))) ^ l_1164), (*g_434))) < l_1382)) < p_45)) + { /* block id: 694 */ + uint8_t *l_1385 = &g_31[0]; + int32_t l_1414 = 7L; + uint8_t l_1447 = 0x67L; + int32_t **l_1455 = (void*)0; + l_880 = &l_1181; + if ((safe_mul_func_uint16_t_u_u(((((*l_1385)--) && 8UL) < ((((!(p_47 = (safe_sub_func_uint16_t_u_u((safe_lshift_func_int8_t_s_u(0xD6L, ((safe_sub_func_int8_t_s_s((((safe_div_func_uint16_t_u_u(((safe_mul_func_int16_t_s_s((safe_rshift_func_uint8_t_u_u(p_46, 1)), (safe_add_func_uint8_t_u_u((safe_sub_func_int16_t_s_s(g_415, ((safe_mul_func_int8_t_s_s((safe_lshift_func_uint16_t_u_u(((*g_713) = (l_1164 = ((g_408[2][6] , ((safe_sub_func_uint8_t_u_u((p_45 ^ 0x25L), (*l_880))) ^ (safe_div_func_uint8_t_u_u((safe_sub_func_int8_t_s_s((((g_36 , p_47) & p_46) , g_126), p_45)), l_1414)))) , 0xF394L))), l_1414)), (*l_880))) != 0x04DC5837L))), p_48)))) , p_48), 0x7F7CL)) & 0x8846L) && (*g_146)), p_48)) >= 4294967295UL))), p_48)))) && 0x5D09L) > 0UL) , p_46)), p_46))) + { /* block id: 700 */ + int16_t l_1430 = 0xBBD6L; + (*g_514) = (safe_add_func_int32_t_s_s((((safe_div_func_int32_t_s_s(0x9175FE28L, (~((safe_mul_func_uint8_t_u_u((safe_add_func_uint16_t_u_u(((safe_lshift_func_uint8_t_u_u((safe_mul_func_int8_t_s_s((safe_div_func_int32_t_s_s(((void*)0 == &l_1192[3][4]), (+(safe_unary_minus_func_uint8_t_u(l_1430))))), 0xBBL)), l_1414)) == p_48), (1L <= l_1431[0]))), (-10L))) , (*g_434))))) , l_1432) , (*g_146)), p_48)); + } + else + { /* block id: 702 */ + uint8_t ****l_1436 = &l_1435; + int32_t l_1445 = 9L; + int16_t *l_1446[1]; + int i; + for (i = 0; i < 1; i++) + l_1446[i] = &g_775; + l_1251 = (l_1063 != (((!(l_1447 = ((*l_1144) = ((0xEB40L ^ (safe_add_func_uint32_t_u_u((*g_434), (((*l_1436) = l_1435) == &g_658[3])))) == (((safe_lshift_func_uint8_t_u_s((safe_div_func_int8_t_s_s(p_47, 0x51L)), ((safe_add_func_int16_t_s_s((((-8L) & (safe_mul_func_int16_t_s_s(p_46, 7L))) > p_47), 1UL)) ^ g_415))) > 4294967290UL) || l_1445))))) != p_47) , (void*)0)); + (*g_146) = (((*g_146) , 0x7A77L) ^ ((0xBAD2L || (l_1448 >= (p_48 = (safe_div_func_uint16_t_u_u(2UL, ((((*l_880) = ((safe_lshift_func_uint16_t_u_s(p_47, (((*g_514) = ((~((safe_add_func_uint32_t_u_u(((((((*l_1071) != &g_455) != 0x7B6E557FL) >= (*g_514)) < l_1447) <= 0x290502A0L), 4294967295UL)) >= p_48)) , (*g_514))) && 0x6D566369L))) , p_48)) , 0x9053L) , g_60[0][4][3])))))) , (*l_880))); + return l_1455; + } + } + else + { /* block id: 713 */ + for (g_126 = 0; (g_126 != (-12)); g_126--) + { /* block id: 716 */ + return l_1458; + } + } + } + for (g_415 = 0; (g_415 != 10); g_415 = safe_add_func_int32_t_s_s(g_415, 3)) + { /* block id: 723 */ + int32_t l_1465 = 0x90C86AAFL; + int32_t **l_1466[3]; + int i; + for (i = 0; i < 3; i++) + l_1466[i] = &l_827; + } + } + if ((safe_lshift_func_uint16_t_u_u((g_360 >= (p_47 != ((safe_div_func_uint8_t_u_u((((!((*g_514) , (safe_div_func_uint16_t_u_u(((safe_rshift_func_uint16_t_u_u((safe_mul_func_uint8_t_u_u(((*l_1480) = ((void*)0 == &l_793[0][0])), ((*l_790) |= 2L))), (*g_713))) < 0xB9L), (((((g_1483 = ((safe_lshift_func_int8_t_s_u(((&g_659 == (void*)0) ^ 0x34L), p_48)) , &l_1249)) != &l_1249) ^ 0x8F060E18L) == p_48) | l_1485[1][5][1]))))) | p_45) != 0xA1L), p_46)) < g_408[2][6]))), 8))) + { /* block id: 744 */ + uint32_t l_1512 = 0x0753D77DL; + int32_t **l_1517 = &l_827; + int32_t l_1537 = 0xA118C07FL; + int32_t *l_1566 = &g_61; + int32_t *l_1567 = &l_1537; + int32_t *l_1568 = &l_856; + int32_t *l_1569 = &g_59[1]; + int32_t *l_1570 = &l_879; + int32_t *l_1571[9]; + uint8_t l_1573 = 7UL; + int i; + for (i = 0; i < 9; i++) + l_1571[i] = &l_1182; + for (g_436 = 12; (g_436 <= 55); g_436 = safe_add_func_int8_t_s_s(g_436, 9)) + { /* block id: 747 */ + int32_t * const l_1490 = &g_59[1]; + for (l_858 = (-21); (l_858 <= (-8)); l_858 = safe_add_func_int8_t_s_s(l_858, 1)) + { /* block id: 750 */ + int32_t **l_1491 = &l_880; + (*l_1491) = l_1490; + } + for (g_131 = (-22); (g_131 < 32); g_131++) + { /* block id: 755 */ + int32_t *l_1494 = &g_59[1]; + int32_t **l_1495 = &g_37; + int32_t ****l_1504 = &l_824; + uint16_t **l_1505 = &g_713; + uint16_t * const l_1508 = &g_1509; + uint16_t * const *l_1507[5][8][1] = {{{(void*)0},{&l_1508},{&l_1508},{(void*)0},{&l_1508},{&l_1508},{&l_1508},{(void*)0}},{{&l_1508},{&l_1508},{(void*)0},{&l_1508},{&l_1508},{&l_1508},{(void*)0},{&l_1508}},{{&l_1508},{(void*)0},{&l_1508},{&l_1508},{&l_1508},{(void*)0},{&l_1508},{&l_1508}},{{(void*)0},{&l_1508},{&l_1508},{&l_1508},{(void*)0},{&l_1508},{&l_1508},{(void*)0}},{{&l_1508},{&l_1508},{&l_1508},{(void*)0},{&l_1508},{&l_1508},{(void*)0},{&l_1508}}}; + uint16_t * const **l_1506 = &l_1507[3][4][0]; + int32_t ****l_1510 = (void*)0; + int32_t *****l_1511 = &l_1071; + int i, j, k; + if (p_46) + break; + (*l_1495) = l_1494; + (*l_1490) = ((safe_rshift_func_int16_t_s_s((safe_mul_func_uint8_t_u_u(247UL, (safe_div_func_uint16_t_u_u(((*g_434) && (*l_1490)), (safe_div_func_uint32_t_u_u(((((*l_1490) || (l_1504 == ((*l_1511) = (l_1510 = ((l_1505 != ((*l_1506) = l_1505)) , &g_454))))) , l_1061) == (void*)0), (*g_434))))))), (*l_1490))) , p_48); + } + l_1512--; + } + if (((*g_146) |= l_1512)) + { /* block id: 766 */ + for (p_48 = (-8); (p_48 >= 24); p_48 = safe_add_func_int32_t_s_s(p_48, 5)) + { /* block id: 769 */ + return (*l_824); + } + } + else + { /* block id: 772 */ + int32_t l_1520 = (-1L); + for (l_1382 = 0; (l_1382 != 48); l_1382 = safe_add_func_uint32_t_u_u(l_1382, 3)) + { /* block id: 775 */ + int8_t l_1522 = 1L; + int32_t l_1523 = 1L; + int32_t l_1536 = (-10L); + int32_t l_1541 = 0x1F61027AL; + if ((l_1520 = ((*g_146) = (-1L)))) + { /* block id: 778 */ + int8_t l_1521 = (-4L); + if (p_47) + break; + l_1522 = l_1521; + } + else + { /* block id: 781 */ + int32_t *l_1524 = &l_855; + int32_t *l_1525 = &g_36; + int32_t *l_1526 = &l_1108[0]; + int32_t *l_1527 = &g_60[0][4][3]; + int32_t *l_1528 = &l_879; + int32_t *l_1529 = (void*)0; + int32_t *l_1530 = &g_60[0][2][2]; + int32_t *l_1531 = &g_36; + int32_t *l_1532 = (void*)0; + int32_t *l_1533 = &l_855; + int32_t *l_1534 = &g_36; + int32_t *l_1535[2]; + int i; + for (i = 0; i < 2; i++) + l_1535[i] = (void*)0; + ++l_1538; + l_1542--; + } + return &g_514; + } + } + for (l_851 = 21; (l_851 <= 10); l_851 = safe_sub_func_int8_t_s_s(l_851, 1)) + { /* block id: 790 */ + int32_t l_1565 = (-1L); + (*g_514) |= (((safe_sub_func_uint16_t_u_u((safe_div_func_int8_t_s_s((safe_mod_func_uint32_t_u_u(p_46, 4L)), (safe_mod_func_uint8_t_u_u(p_45, (((safe_lshift_func_uint16_t_u_s(((safe_mul_func_int16_t_s_s((0xC1L <= ((safe_rshift_func_uint8_t_u_s(((((l_1561 < (safe_add_func_uint16_t_u_u(l_1564, ((~p_45) && ((*l_1480) = (l_1565 < 1L)))))) , &g_454) != &g_454) <= p_45), 1)) > 0x8D0979DCL)), l_1565)) != p_47), 6)) , p_46) || p_48))))), p_46)) , g_69[6]) != 0x8BL); + } + l_1573--; + } + else + { /* block id: 795 */ + uint8_t *l_1579 = &g_131; + uint8_t ** const l_1578 = &l_1579; + uint8_t ** const *l_1577 = &l_1578; + uint8_t ** const **l_1576 = &l_1577; + int32_t l_1605 = 0x9D3CEF20L; + uint32_t l_1635 = 0xA0B6A9DBL; + int8_t **l_1656 = (void*)0; + int32_t l_1663 = (-1L); + int32_t **l_1673[5] = {&g_514,&g_514,&g_514,&g_514,&g_514}; + int16_t l_1711 = 0x11BEL; + int32_t l_1714 = 4L; + int32_t *l_1744 = &l_855; + uint8_t l_1765 = 0xB3L; + uint32_t l_1790 = 5UL; + uint32_t l_1791 = 0x09D0C495L; + int i; + if (((((*l_1480) &= 250UL) & ((((((*l_1576) = l_1435) == (((*g_514) = (+(safe_lshift_func_uint8_t_u_s(p_46, (g_435 == g_435))))) , &g_658[3])) , ((safe_div_func_int32_t_s_s(0x3603FE2EL, (safe_rshift_func_uint8_t_u_s((++(*l_1579)), 4)))) ^ p_47)) ^ 0UL) < p_47)) && 0xA1D3L)) + { /* block id: 800 */ + int8_t l_1607 = 0xDBL; + for (g_775 = (-4); (g_775 >= 1); ++g_775) + { /* block id: 803 */ + uint8_t ****l_1592[8]; + int32_t l_1606 = (-1L); + int i; + for (i = 0; i < 8; i++) + l_1592[i] = &l_1435; + (*g_146) = ((*g_713) < (g_1590 == &g_1591[5][6])); + l_1607 &= ((((l_1593[1] = l_1435) != &g_658[2]) || (+(((((***l_1576) = (**l_1435)) == ((*l_1578) = l_1594)) && (4294967290UL != (((safe_mul_func_int8_t_s_s((safe_add_func_uint8_t_u_u((l_1606 ^= (safe_mul_func_int16_t_s_s(((((((&p_48 == &p_48) , ((*l_790) = ((safe_rshift_func_uint16_t_u_s(((*g_713) = (+0xDA44L)), (safe_rshift_func_int8_t_s_s(8L, p_46)))) == 1L))) < l_1605) >= 0x4746L) == p_48) > 3L), g_131))), p_48)), 1L)) && p_48) < p_48))) || l_1605))) , (*g_146)); + if (l_1607) + continue; + (*g_514) ^= (safe_mod_func_int16_t_s_s(((*g_434) , (255UL <= l_1606)), p_48)); + } + return (*l_824); + } + else + { /* block id: 816 */ + int16_t l_1625[5][7]; + int8_t **l_1626 = &l_790; + uint32_t l_1629 = 0xA3E6BA5DL; + int8_t *l_1630 = &l_1173[0]; + int i, j; + for (i = 0; i < 5; i++) + { + for (j = 0; j < 7; j++) + l_1625[i][j] = 0x8253L; + } + (*g_146) = ((safe_mod_func_uint32_t_u_u((safe_add_func_int8_t_s_s(p_45, (safe_mod_func_int16_t_s_s(((safe_mul_func_int16_t_s_s((safe_unary_minus_func_int8_t_s((p_45 != ((safe_sub_func_uint8_t_u_u((safe_add_func_uint16_t_u_u(((((*l_790) = (l_1625[2][5] , l_1605)) || (p_48 = ((*l_1630) = ((l_1626 == ((*l_1064) = (void*)0)) < ((safe_div_func_int32_t_s_s((((l_1629 && (&g_658[2] != l_1435)) | 0xD91DL) , 0xD5441AC9L), 0x10740426L)) , p_48))))) ^ p_46), l_1605)), g_59[7])) , p_46)))), 0x547DL)) && (*g_434)), p_46)))), p_46)) ^ g_1509); + } + for (g_1509 = 0; (g_1509 < 38); g_1509 = safe_add_func_uint16_t_u_u(g_1509, 1)) + { /* block id: 825 */ + uint8_t l_1647 = 0x58L; + uint16_t *l_1661[8] = {&g_69[0],&g_69[5],&g_69[0],&g_69[5],&g_69[0],&g_69[5],&g_69[0],&g_69[5]}; + int32_t l_1662[8][3] = {{(-1L),0xF23F40CAL,0xA058F09DL},{0x60BB2647L,(-1L),0xF23F40CAL},{0x60BB2647L,3L,0xB82B7CEFL},{(-1L),0xFA4AA8CDL,(-1L)},{0xB82B7CEFL,3L,0x60BB2647L},{0xF23F40CAL,(-1L),0x60BB2647L},{0xA058F09DL,0xF23F40CAL,(-1L)},{1L,1L,0xB82B7CEFL}}; + int i, j; + for (l_789 = (-9); (l_789 == 15); ++l_789) + { /* block id: 828 */ + --l_1635; + } + for (g_36 = 0; (g_36 == (-18)); g_36 = safe_sub_func_uint16_t_u_u(g_36, 5)) + { /* block id: 833 */ + uint32_t l_1640[1]; + int32_t l_1669 = 0x1BDB15C6L; + int i; + for (i = 0; i < 1; i++) + l_1640[i] = 0xAFBC8874L; + if (p_48) + { /* block id: 834 */ + int8_t l_1643 = (-1L); + int32_t *l_1644 = (void*)0; + int32_t *l_1645 = &l_1182; + int32_t *l_1646[4][1][6] = {{{&l_1182,&g_36,(void*)0,(void*)0,&g_36,&l_1182}},{{&l_1605,&l_1182,(void*)0,&l_1182,&l_1605,&l_1605}},{{&l_855,&l_1182,&l_1182,&l_855,&g_36,&l_855}},{{&l_855,&g_36,&l_855,&l_1182,&l_1182,&l_855}}}; + int i, j, k; + --l_1640[0]; + if (l_1640[0]) + continue; + l_1647++; + (*g_146) &= (safe_sub_func_uint32_t_u_u((l_1640[0] , (safe_lshift_func_int8_t_s_s((g_510 &= (safe_mul_func_int8_t_s_s((((l_1656 == ((*l_1061) = l_1656)) < g_1509) | ((p_47++) ^ (0x42L != (((!(p_45 | (l_1661[0] != &p_46))) , &g_510) == &g_510)))), (-1L)))), g_408[2][6]))), p_45)); + } + else + { /* block id: 842 */ + int32_t *l_1664 = &l_855; + int32_t *l_1665 = (void*)0; + int32_t *l_1666 = &l_1663; + int32_t *l_1667 = &l_1662[2][0]; + int32_t *l_1668[7][2] = {{&g_59[8],&l_1662[2][0]},{&g_59[8],&l_1662[2][0]},{&g_59[8],&l_1662[2][0]},{&g_59[8],&l_1662[2][0]},{&g_59[8],&l_1662[2][0]},{&g_59[8],&l_1662[2][0]},{&g_59[8],&l_1662[2][0]}}; + int i, j; + (*g_146) = p_48; + ++l_1670; + l_1662[1][0] = ((*g_146) = 0x32BC2857L); + } + return l_1673[2]; + } + --l_1675[3][1][0]; + for (g_360 = 0; (g_360 >= 25); g_360 = safe_add_func_uint16_t_u_u(g_360, 2)) + { /* block id: 853 */ + uint32_t *l_1689[8] = {&l_1542,&l_1542,&l_1542,&l_1542,&l_1542,&l_1542,&l_1542,&l_1542}; + uint32_t **l_1690 = (void*)0; + int32_t l_1703 = 0x9EF797C4L; + int i; + (*g_514) &= (*g_146); + if (((safe_rshift_func_int8_t_s_u(p_48, 2)) > (((*l_1579) = (--l_1682)) == (safe_mod_func_int8_t_s_s((safe_mul_func_int16_t_s_s(0L, p_47)), (((l_1691 = l_1689[1]) != ((safe_div_func_int8_t_s_s(0L, (p_48 || ((safe_div_func_int16_t_s_s((safe_mod_func_int8_t_s_s(((*l_790) = (safe_mul_func_uint8_t_u_u(((*l_1594) = ((void*)0 != l_873[7])), (safe_unary_minus_func_uint16_t_u(((safe_mod_func_int8_t_s_s((l_1662[1][2] ^= l_1703), 0x88L)) , 1UL)))))), l_1703)), p_46)) || g_145)))) , &l_1670)) & l_1647)))))) + { /* block id: 861 */ + return (*l_824); + } + else + { /* block id: 863 */ + return (*l_824); + } + } + } + if (((((safe_lshift_func_uint8_t_u_u(p_47, ((((*g_146) = ((((*g_514) = ((((void*)0 == &g_408[5][0]) && p_45) <= ((*g_434)++))) | p_47) | (1L <= (((void*)0 == l_1710) & (((g_124 &= ((0x09BA0DEDL > (-1L)) , 0L)) && p_47) != 0UL))))) , (*g_434)) != 0x6663A05DL))) || p_47) > p_46) , 0x9E8BC888L)) + { /* block id: 872 */ + int32_t l_1712[1]; + int32_t l_1713[8][2][3] = {{{0xE0DAFB5FL,(-7L),(-7L)},{0x6966D37CL,(-7L),0xDF1FC2D9L}},{{(-1L),(-7L),0L},{0xE0DAFB5FL,(-7L),(-7L)}},{{0x6966D37CL,(-7L),0xDF1FC2D9L},{(-1L),(-7L),0L}},{{0xE0DAFB5FL,(-7L),(-7L)},{0x6966D37CL,(-7L),0xDF1FC2D9L}},{{(-1L),(-7L),0L},{0xE0DAFB5FL,(-7L),(-7L)}},{{0x6966D37CL,(-7L),0xDF1FC2D9L},{(-1L),(-7L),0L}},{{0xE0DAFB5FL,(-7L),(-7L)},{0x6966D37CL,(-7L),0xDF1FC2D9L}},{{(-1L),(-7L),0L},{0xE0DAFB5FL,(-7L),(-7L)}}}; + int16_t l_1715 = 9L; + int32_t l_1716 = (-1L); + uint32_t l_1717 = 1UL; + int32_t *l_1720[4] = {&l_1714,&l_1714,&l_1714,&l_1714}; + int i, j, k; + for (i = 0; i < 1; i++) + l_1712[i] = 0x31D00C21L; + for (g_775 = 0; g_775 < 9; g_775 += 1) + { + g_69[g_775] = 0xA232L; + } + ++l_1717; + l_1720[1] = &l_1713[7][0][1]; + for (l_1715 = 9; (l_1715 <= 15); l_1715++) + { /* block id: 878 */ + uint32_t l_1725[1][2][1]; + int32_t *l_1743 = (void*)0; + int32_t l_1757[2][8][6] = {{{0x49E5A31AL,0xA31FA484L,2L,0L,0x8FADFB52L,0xC791BA3CL},{0xC791BA3CL,0L,0xFCCBC020L,0L,2L,0x49E5A31AL},{2L,0x8FADFB52L,0xA71F3D56L,1L,0xC791BA3CL,0xC791BA3CL},{0x8FADFB52L,0x46E5F6F7L,0x46E5F6F7L,0x8FADFB52L,0xA31FA484L,0xC791BA3CL},{0xFCCBC020L,0xC791BA3CL,0xA71F3D56L,0x49E5A31AL,1L,0x49E5A31AL},{0xA31FA484L,0L,0xA31FA484L,0L,1L,2L},{0xA71F3D56L,0xC791BA3CL,0xFCCBC020L,0xA31FA484L,0xA31FA484L,0xFCCBC020L},{0x46E5F6F7L,0x46E5F6F7L,0x8FADFB52L,0xA31FA484L,0xC791BA3CL,0L}},{{0xA71F3D56L,0x8FADFB52L,2L,0L,2L,0x8FADFB52L},{0xA31FA484L,0xA71F3D56L,2L,0x49E5A31AL,0x46E5F6F7L,0L},{0xFCCBC020L,0x49E5A31AL,0x8FADFB52L,0x8FADFB52L,0x49E5A31AL,0xFCCBC020L},{0x8FADFB52L,0x49E5A31AL,0xFCCBC020L,1L,0x46E5F6F7L,2L},{2L,0xA71F3D56L,0xA31FA484L,0xA71F3D56L,2L,0x49E5A31AL},{2L,0x8FADFB52L,0xA71F3D56L,1L,0xC791BA3CL,0xC791BA3CL},{0x8FADFB52L,0x46E5F6F7L,0x46E5F6F7L,0x8FADFB52L,0xA31FA484L,0xC791BA3CL},{0xFCCBC020L,0xC791BA3CL,0xA71F3D56L,0x49E5A31AL,1L,0x49E5A31AL}}}; + int i, j, k; + for (i = 0; i < 1; i++) + { + for (j = 0; j < 2; j++) + { + for (k = 0; k < 1; k++) + l_1725[i][j][k] = 9UL; + } + } + (*g_514) |= p_47; + if ((((!(((((!(*g_434)) & (g_59[1] & p_46)) & (l_1725[0][0][0] > (safe_mul_func_int16_t_s_s((safe_mod_func_uint16_t_u_u(0x764CL, (safe_mul_func_int16_t_s_s(((g_1250 == (safe_mul_func_int8_t_s_s(p_45, (((((safe_div_func_int32_t_s_s((safe_lshift_func_uint16_t_u_u(1UL, (~(safe_add_func_uint32_t_u_u((&g_455 == &g_455), p_46))))), p_48)) , 0x19E31692L) ^ 0L) != 0L) || (*g_434))))) && p_47), 65529UL)))), l_1742[6][3][3])))) & p_45) == g_360)) , 1UL) < 0x0FL)) + { /* block id: 880 */ + int32_t ***l_1751 = &l_1673[0]; + int16_t *l_1754 = &l_1432; + int16_t *l_1756 = &g_775; + l_1744 = l_1743; + (*g_146) ^= (safe_lshift_func_int16_t_s_s((safe_mul_func_int16_t_s_s(p_46, (safe_sub_func_int8_t_s_s((((*l_1071) != l_1751) <= (&g_435 != (void*)0)), 0UL)))), (safe_lshift_func_int16_t_s_u(((((*l_1754) = ((void*)0 == &g_658[0])) | ((*l_1756) ^= ((p_45 , p_45) | l_1755))) < (***l_1751)), p_45)))); + } + else + { /* block id: 885 */ + l_827 = &l_857[1]; + g_1758[3][0][1]++; + g_514 = &g_61; + } + for (p_47 = 2; (p_47 > 57); p_47 = safe_add_func_int32_t_s_s(p_47, 2)) + { /* block id: 892 */ + int8_t l_1763 = (-7L); + int32_t l_1764 = 1L; + (*g_146) &= 1L; + --l_1765; + if (p_47) + break; + return &g_514; + } + } + } + else + { /* block id: 899 */ + int8_t l_1789 = (-1L); + for (l_1249 = 18; (l_1249 <= 9); l_1249 = safe_sub_func_int8_t_s_s(l_1249, 1)) + { /* block id: 902 */ + (*g_514) |= ((safe_mod_func_int16_t_s_s(p_45, 0xDE63L)) > (safe_mod_func_uint8_t_u_u(((g_775 , (safe_sub_func_uint16_t_u_u(l_1776, (!((safe_mul_func_int8_t_s_s(p_46, ((safe_mod_func_int16_t_s_s((((p_45 <= ((safe_mod_func_int8_t_s_s((safe_mod_func_int16_t_s_s((((g_145 | p_45) & ((safe_sub_func_uint8_t_u_u(((*l_1579) ^= ((safe_sub_func_int16_t_s_s((l_1789 ^ 0L), p_47)) , p_46)), 0xA2L)) > 0xD456L)) && l_1790), 0x2067L)), 0xCDL)) ^ p_47)) | p_46) == l_1789), (*g_713))) || 0xB4L))) < 3L))))) ^ 0xD0L), l_1791))); + } + } + for (l_858 = 0; l_858 < 8; l_858 += 1) + { + for (l_1790 = 0; l_1790 < 4; l_1790 += 1) + { + for (g_775 = 0; g_775 < 5; g_775 += 1) + { + l_1742[l_858][l_1790][g_775] = 0x47264078L; + } + } + } + } + } + return (*l_824); +} + + +/* ------------------------------------------ */ +/* + * reads : g_434 g_138 g_436 g_408 g_31 g_59 g_146 g_60 g_69 g_2 g_360 g_36 g_514 g_37 g_124 g_415 g_658 g_126 g_61 g_713 g_454 g_455 g_358 g_510 + * writes: g_360 g_37 g_510 g_436 g_145 g_415 g_69 g_59 g_60 g_131 g_31 g_138 g_658 g_712 g_659 g_455 + */ +static uint32_t func_49(uint16_t p_50, int32_t ** const p_51, int32_t p_52, int8_t p_53, uint8_t p_54) +{ /* block id: 265 */ + int32_t *l_540 = (void*)0; + int32_t l_551 = 0x82C03D9FL; + int32_t l_555 = (-1L); + int32_t l_557 = 0xD8A38C6FL; + int32_t ***l_583[5] = {&g_455,&g_455,&g_455,&g_455,&g_455}; + uint32_t l_633 = 18446744073709551609UL; + const uint32_t l_656 = 0x411EFF5AL; + uint16_t *l_710 = &g_69[4]; + uint16_t **l_709 = &l_710; + int i; +lbl_539: + for (g_360 = 1; (g_360 >= 0); g_360 -= 1) + { /* block id: 268 */ + int32_t *l_534 = &g_59[5]; + (*p_51) = l_534; + for (g_510 = 0; (g_510 <= 1); g_510 += 1) + { /* block id: 272 */ + return (*g_434); + } + } + for (g_436 = 25; (g_436 > 44); g_436 = safe_add_func_uint8_t_u_u(g_436, 5)) + { /* block id: 278 */ + const uint16_t *l_541 = &g_69[7]; + int32_t l_546 = 6L; + int8_t *l_547 = &g_415; + int32_t l_552 = 0xFCB77EC7L; + int32_t l_553 = 0x0A279ABBL; + int32_t l_554 = 0x31D6845EL; + int32_t l_556 = 0xC2775E94L; + int32_t l_558 = 2L; + int32_t l_559 = 0xB7C1040AL; + int32_t ***l_581[10] = {&g_455,&g_455,&g_455,&g_455,&g_455,&g_455,&g_455,&g_455,&g_455,&g_455}; + uint32_t l_616 = 0x0D85AE67L; + int32_t l_635[10] = {0x7AF0BAD7L,0x7AF0BAD7L,0x7AF0BAD7L,0x7AF0BAD7L,0x7AF0BAD7L,0x7AF0BAD7L,0x7AF0BAD7L,0x7AF0BAD7L,0x7AF0BAD7L,0x7AF0BAD7L}; + uint16_t l_664 = 1UL; + int16_t l_734 = 0xCC65L; + uint32_t l_735 = 0x14DBAF86L; + int i; + for (g_145 = 0; (g_145 > 47); g_145 = safe_add_func_uint16_t_u_u(g_145, 4)) + { /* block id: 281 */ + if (g_436) + goto lbl_539; + } + (*p_51) = l_540; + if ((((void*)0 != l_541) != (safe_rshift_func_int16_t_s_u((((!(safe_lshift_func_int8_t_s_s(((*l_547) = l_546), 7))) ^ g_408[4][8]) ^ 0x8BL), 4)))) + { /* block id: 286 */ + int32_t *l_550[10] = {&g_60[0][4][3],&g_60[0][4][3],&g_60[0][4][3],&g_60[0][4][3],&g_60[0][4][3],&g_60[0][4][3],&g_60[0][4][3],&g_60[0][4][3],&g_60[0][4][3],&g_60[0][4][3]}; + uint8_t l_560 = 0UL; + uint16_t *l_567 = &g_145; + uint16_t *l_576 = &g_69[7]; + int32_t ****l_582[10][1]; + uint32_t l_615 = 0x6C53EE8BL; + int32_t l_638 = (-8L); + int i, j; + for (i = 0; i < 10; i++) + { + for (j = 0; j < 1; j++) + l_582[i][j] = (void*)0; + } + for (g_360 = 0; (g_360 != (-29)); g_360 = safe_sub_func_uint16_t_u_u(g_360, 8)) + { /* block id: 289 */ + return (*g_434); + } + --l_560; + if ((safe_sub_func_uint8_t_u_u((safe_lshift_func_uint16_t_u_u((((*l_567) = g_138[3]) <= (l_552 ^ (safe_mod_func_uint16_t_u_u(((*l_576) = (safe_mul_func_uint8_t_u_u((safe_add_func_int8_t_s_s(g_31[0], 8L)), (l_546 = (safe_add_func_uint32_t_u_u(p_50, (*g_434))))))), ((((safe_add_func_int16_t_s_s((p_54 , (safe_sub_func_int8_t_s_s(((l_583[4] = l_581[2]) != l_581[2]), p_52))), g_59[1])) | (*g_146)) & p_54) & (-6L)))))), g_408[2][6])), (-5L)))) + { /* block id: 297 */ + uint32_t l_603[3]; + int32_t *l_617 = (void*)0; + int i; + for (i = 0; i < 3; i++) + l_603[i] = 0x9414E551L; + for (g_510 = 9; (g_510 >= 0); g_510 -= 1) + { /* block id: 300 */ + const uint8_t l_602 = 0UL; + uint8_t l_604 = 255UL; + int32_t l_605 = (-1L); + for (l_560 = 0; (l_560 <= 9); l_560 += 1) + { /* block id: 303 */ + int i; + l_605 = (((((((((safe_div_func_uint8_t_u_u((safe_sub_func_uint16_t_u_u(p_50, ((*g_146) && (l_603[2] ^= ((((((((p_53 , (safe_mod_func_uint32_t_u_u((&l_541 == (void*)0), (+((p_54 || ((safe_lshift_func_int8_t_s_u((safe_add_func_uint32_t_u_u((g_69[5] | ((*l_547) = 0x37L)), (safe_rshift_func_uint16_t_u_u((safe_rshift_func_int16_t_s_s((((safe_mod_func_uint8_t_u_u((safe_div_func_int8_t_s_s((((!((((4294967287UL > p_53) | g_59[1]) & 8UL) <= 0L)) ^ p_54) == p_53), p_52)), p_54)) | p_54) && (-1L)), 9)), g_138[3])))), g_2)) ^ 255UL)) >= l_602))))) & (*g_146)) > (*g_146)) , g_436) && 0xCBL) == p_50) == (-2L)) >= 65533UL))))), (-10L))) & g_60[0][4][3]) , l_602) || l_603[2]) || l_603[2]) >= l_604) > g_360) >= g_436) >= g_36); + (*g_146) = ((0x1D37402DL || (*g_514)) , ((*g_514) = p_54)); + (*g_514) = (*g_514); + } + (*p_51) = (*p_51); + } + if (p_50) + { /* block id: 313 */ + return (*g_434); + } + else + { /* block id: 315 */ + uint32_t l_608 = 0x2C838B9FL; + uint8_t l_612 = 0xA6L; + for (l_546 = 22; (l_546 <= 12); l_546 = safe_sub_func_int8_t_s_s(l_546, 8)) + { /* block id: 318 */ + uint8_t l_609 = 0UL; + if (l_608) + break; + --l_609; + } + p_52 |= l_608; + (*g_514) ^= l_612; + for (l_559 = 0; (l_559 < (-28)); l_559 = safe_sub_func_uint16_t_u_u(l_559, 7)) + { /* block id: 326 */ + (*g_146) &= l_615; + (*g_514) &= (p_52 , l_616); + if (l_603[2]) + continue; + (*p_51) = l_617; + } + } + if ((*g_514)) + break; + } + else + { /* block id: 334 */ + uint32_t l_637 = 0UL; + uint32_t l_657 = 0x8AE57ECFL; + (*g_146) &= (&g_436 == (void*)0); + for (g_131 = 0; (g_131 < 17); g_131 = safe_add_func_uint32_t_u_u(g_131, 4)) + { /* block id: 338 */ + uint32_t l_623 = 0x5CA092ADL; + for (l_554 = (-7); (l_554 == (-20)); l_554--) + { /* block id: 341 */ + int16_t l_622 = 0L; + l_623++; + if ((*g_146)) + continue; + } + for (l_559 = 0; (l_559 <= 8); l_559 += 1) + { /* block id: 347 */ + const int32_t *l_632 = &g_61; + int32_t *l_634[7]; + int32_t **** const l_636 = &l_583[4]; + int i; + for (i = 0; i < 7; i++) + l_634[i] = (void*)0; + l_638 |= (((safe_div_func_int32_t_s_s((((safe_sub_func_uint32_t_u_u((safe_mul_func_int16_t_s_s((g_59[l_559] <= ((*l_567) = ((*l_576) &= (l_632 != ((l_633 &= (*g_146)) , l_634[4]))))), 7UL)), (*g_434))) , ((g_124 , l_635[4]) , l_636)) != l_582[7][0]), (*g_434))) == 0x07D52D4DL) > l_637); + p_52 &= 0xA782E568L; + } + } + for (l_616 = 0; (l_616 == 29); ++l_616) + { /* block id: 357 */ + uint32_t l_653 = 18446744073709551615UL; + int32_t *l_654[7][5] = {{&l_546,(void*)0,&l_557,&g_61,&l_555},{&g_60[0][0][2],(void*)0,&l_558,&l_559,&g_59[1]},{(void*)0,&l_559,&l_556,&g_60[1][0][2],&g_60[1][0][2]},{&g_60[0][0][2],&l_557,&g_60[0][0][2],&l_556,&l_551},{&l_546,&l_557,&g_59[1],(void*)0,(void*)0},{(void*)0,&l_559,&g_60[1][0][2],&l_558,&l_546},{&l_555,(void*)0,&g_59[1],(void*)0,&l_555}}; + uint8_t *l_655 = &g_31[0]; + uint8_t ***l_660 = (void*)0; + uint8_t ***l_661 = &g_658[3]; + int i, j; + p_52 = (((*l_661) = ((safe_div_func_uint32_t_u_u((l_657 = ((*g_434) = (((*g_514) = (l_637 | 0UL)) || (safe_mul_func_int16_t_s_s((g_408[4][2] ^ p_53), (safe_mod_func_uint32_t_u_u(((safe_mul_func_int8_t_s_s((!(safe_sub_func_uint8_t_u_u(g_415, (((*l_655) = ((safe_mul_func_uint16_t_u_u(((0xE3L != ((((0UL & ((l_653 ^ (((*g_434) & (*g_514)) , 0xDF15A246L)) ^ 0x1573C95DL)) > 0L) , l_654[2][0]) != (void*)0)) , 0x53B7L), p_53)) >= 0xAB7CL)) & g_59[7])))), 248UL)) , p_53), l_656))))))), l_637)) , g_658[3])) != (void*)0); + (*p_51) = (*p_51); + if (p_53) + continue; + for (l_553 = (-15); (l_553 < 21); l_553++) + { /* block id: 368 */ + (*g_514) = ((*g_146) |= (*g_514)); + l_664--; + return (*g_434); + } + } + } + for (g_145 = 24; (g_145 != 26); ++g_145) + { /* block id: 378 */ + int32_t l_671 = (-3L); + for (p_50 = 1; (p_50 <= 5); p_50 += 1) + { /* block id: 381 */ + int16_t *l_682[10] = {&g_124,&g_124,&g_124,&g_124,&g_124,&g_124,&g_124,&g_124,&g_124,&g_124}; + int32_t l_683 = 6L; + uint8_t *l_696[3][10] = {{&g_131,&g_131,&l_560,&g_31[0],&g_31[0],&g_31[0],&l_560,&g_131,&g_131,&l_560},{&l_560,&g_31[0],&g_31[0],&g_31[0],&g_31[0],&l_560,&l_560,&l_560,&g_31[0],&g_31[0]},{&g_31[0],&g_131,&g_31[0],&g_31[0],&l_560,&g_131,&l_560,&g_31[0],&g_31[0],&g_31[0]}}; + int32_t l_705 = 0x94593FD2L; + int i, j; + if ((*g_514)) + break; + (*g_514) = ((((+(safe_add_func_uint8_t_u_u(p_50, l_671))) , ((((g_408[2][6] , (safe_div_func_uint16_t_u_u(0UL, ((((safe_rshift_func_int8_t_s_u(((safe_rshift_func_uint8_t_u_s((2L > (((((safe_rshift_func_int8_t_s_s((((safe_div_func_uint16_t_u_u(p_53, (l_683 = g_124))) && (safe_mod_func_uint16_t_u_u((safe_mul_func_int8_t_s_s((safe_lshift_func_uint16_t_u_u((safe_lshift_func_int16_t_s_u((safe_sub_func_uint8_t_u_u((safe_add_func_int8_t_s_s(((p_52 > (++p_54)) > ((safe_sub_func_int8_t_s_s((((safe_mul_func_uint16_t_u_u((safe_lshift_func_int16_t_s_u((&g_659 == &l_696[1][4]), p_52)), 0x415CL)) , (void*)0) != &l_560), (-1L))) , g_126)), p_52)), 0x83L)), 9)), 1)), p_50)), g_415))) == 4L), p_50)) , (-1L)) , 4294967289UL) >= (*g_434)) & 0x9D18L)), l_671)) > p_53), 7)) == 0x15L) != l_705) || (*g_434))))) >= l_671) & p_50) | g_61)) != p_50) == p_50); + if (l_671) + break; + } + } + } + else + { /* block id: 389 */ + uint16_t **l_711 = (void*)0; + int32_t l_714 = (-2L); + int32_t l_718[1][4]; + int32_t l_733 = (-1L); + const int16_t *l_768 = &g_124; + int i, j; + for (i = 0; i < 1; i++) + { + for (j = 0; j < 4; j++) + l_718[i][j] = 0xE11A78C6L; + } + for (l_556 = 0; (l_556 >= (-25)); --l_556) + { /* block id: 392 */ + uint8_t l_708 = 254UL; + for (g_510 = 0; (g_510 <= 4); g_510 += 1) + { /* block id: 395 */ + int i; + if (l_708) + break; + (*g_514) = l_708; + } + l_718[0][1] &= (l_708 >= (((g_126 < (l_709 == (g_712 = l_711))) && (((*g_434) = (l_714 != (safe_unary_minus_func_int32_t_s(((*g_514) = (((*g_514) >= (safe_mod_func_int16_t_s_s(g_59[1], g_60[0][0][1]))) != ((((p_53 < (*g_434)) ^ p_50) >= 0xE6L) == 0x38L))))))) , p_50)) == (*g_146))); + if (l_718[0][1]) + break; + if ((*g_146)) + break; + } + for (l_558 = 25; (l_558 != 20); l_558 = safe_sub_func_uint32_t_u_u(l_558, 9)) + { /* block id: 408 */ + int8_t ***l_725 = &g_435; + int32_t l_738 = 9L; + uint32_t l_746 = 1UL; + if ((*g_146)) + { /* block id: 409 */ + uint32_t l_745[5] = {0UL,0UL,0UL,0UL,0UL}; + int i; + for (l_664 = 3; (l_664 <= 9); l_664 += 1) + { /* block id: 412 */ + int8_t ***l_726 = &g_435; + int32_t l_727[7][7][5] = {{{1L,1L,(-8L),0L,0xAC6AC439L},{0xE288136EL,0x1BA38A8AL,1L,(-1L),(-1L)},{1L,0xB996CF60L,0xBC9EBEC7L,0L,0xBC9EBEC7L},{0x1BA38A8AL,0x1BA38A8AL,0L,0x47413CE9L,(-1L)},{0xB996CF60L,1L,0xBC9EBEC7L,0xA7A60C50L,0xAC6AC439L},{0x1BA38A8AL,0xE288136EL,1L,0x47413CE9L,1L},{1L,1L,(-8L),0L,0xAC6AC439L}},{{0xE288136EL,0x1BA38A8AL,1L,(-1L),(-1L)},{1L,0xB996CF60L,0xBC9EBEC7L,0L,0xBC9EBEC7L},{0x1BA38A8AL,0x1BA38A8AL,0L,0x47413CE9L,(-1L)},{0xB996CF60L,1L,0xBC9EBEC7L,0xA7A60C50L,0xAC6AC439L},{0x1BA38A8AL,0xE288136EL,1L,0x47413CE9L,1L},{1L,1L,(-8L),0L,0xAC6AC439L},{0xE288136EL,0x1BA38A8AL,1L,(-1L),(-1L)}},{{1L,0xB996CF60L,0xBC9EBEC7L,0L,0xBC9EBEC7L},{0x1BA38A8AL,0x1BA38A8AL,0L,0x47413CE9L,(-1L)},{0xB996CF60L,1L,0xBC9EBEC7L,0xA7A60C50L,0xAC6AC439L},{0x1BA38A8AL,0xE288136EL,1L,0x47413CE9L,1L},{1L,1L,(-8L),0L,0xAC6AC439L},{0xE288136EL,0x1BA38A8AL,1L,(-1L),(-1L)},{1L,0xB996CF60L,0xBC9EBEC7L,0L,0xBC9EBEC7L}},{{0x1BA38A8AL,0x1BA38A8AL,0L,0x47413CE9L,(-1L)},{0xB996CF60L,1L,0xBC9EBEC7L,0xA7A60C50L,0xAC6AC439L},{0x1BA38A8AL,0xE288136EL,1L,0x47413CE9L,1L},{1L,1L,(-8L),0L,0xAC6AC439L},{0xE288136EL,0x1BA38A8AL,1L,(-1L),(-1L)},{1L,0xB996CF60L,0xBC9EBEC7L,0L,0xBC9EBEC7L},{0x1BA38A8AL,0x1BA38A8AL,0L,0x47413CE9L,(-1L)}},{{0xB996CF60L,1L,0xBC9EBEC7L,0xA7A60C50L,0xAC6AC439L},{0x1BA38A8AL,0xE288136EL,1L,0x47413CE9L,1L},{1L,1L,(-8L),0L,0xAC6AC439L},{0xE288136EL,0x1BA38A8AL,1L,(-1L),(-1L)},{1L,0xB996CF60L,0xBC9EBEC7L,0L,0xBC9EBEC7L},{0x1BA38A8AL,0x1BA38A8AL,0L,0x47413CE9L,(-1L)},{0xB996CF60L,1L,0xBC9EBEC7L,0xA7A60C50L,0xAC6AC439L}},{{0x1BA38A8AL,0xE288136EL,1L,0x47413CE9L,1L},{0xBC9EBEC7L,0xBC9EBEC7L,0xBF005C69L,1L,2L},{0L,1L,0L,1L,0L},{0xBC9EBEC7L,(-8L),0L,1L,0L},{1L,1L,0x29987E69L,(-2L),0L},{(-8L),0xBC9EBEC7L,0L,0xAA4F085EL,2L},{1L,0L,0L,(-2L),0L}},{{0xBC9EBEC7L,0xBC9EBEC7L,0xBF005C69L,1L,2L},{0L,1L,0L,1L,0L},{0xBC9EBEC7L,(-8L),0L,1L,0L},{1L,1L,0x29987E69L,(-2L),0L},{(-8L),0xBC9EBEC7L,0L,0xAA4F085EL,2L},{1L,0L,0L,(-2L),0L},{0xBC9EBEC7L,0xBC9EBEC7L,0xBF005C69L,1L,2L}}}; + uint8_t **l_732 = &g_659; + uint8_t *l_736 = &g_31[0]; + int16_t *l_737[7][10][3] = {{{&g_124,(void*)0,&l_734},{(void*)0,&g_124,(void*)0},{&g_124,&g_124,&l_734},{&g_124,&g_124,&l_734},{&g_124,&g_124,&l_734},{&g_124,&g_124,&l_734},{&l_734,(void*)0,(void*)0},{&g_124,(void*)0,&l_734},{&g_124,&g_124,&g_124},{&g_124,&l_734,&g_124}},{{(void*)0,(void*)0,&g_124},{&l_734,&g_124,(void*)0},{&l_734,&l_734,(void*)0},{&g_124,&l_734,&l_734},{&l_734,&g_124,&g_124},{&l_734,&l_734,&g_124},{(void*)0,(void*)0,&g_124},{&g_124,&g_124,(void*)0},{&g_124,&l_734,(void*)0},{&g_124,&l_734,&g_124}},{{&l_734,(void*)0,&l_734},{&g_124,&l_734,&g_124},{&g_124,&l_734,&g_124},{&g_124,(void*)0,&g_124},{&g_124,&l_734,(void*)0},{(void*)0,&l_734,&g_124},{&g_124,&g_124,&g_124},{(void*)0,(void*)0,&g_124},{&l_734,&l_734,&g_124},{&l_734,&g_124,&g_124}},{{&g_124,&l_734,&l_734},{&g_124,&l_734,&g_124},{&g_124,&g_124,&g_124},{&g_124,(void*)0,&g_124},{&g_124,&l_734,&g_124},{&l_734,&g_124,&g_124},{&l_734,(void*)0,(void*)0},{&l_734,(void*)0,&g_124},{(void*)0,&g_124,&g_124},{&g_124,&g_124,&g_124}},{{&g_124,&g_124,&l_734},{(void*)0,&g_124,&g_124},{&g_124,&g_124,&l_734},{&g_124,(void*)0,&g_124},{&l_734,&l_734,&l_734},{&g_124,(void*)0,&g_124},{(void*)0,(void*)0,&g_124},{&g_124,&l_734,&g_124},{&l_734,(void*)0,&g_124},{(void*)0,&l_734,(void*)0}},{{&l_734,(void*)0,&l_734},{&l_734,(void*)0,&g_124},{&l_734,&l_734,&l_734},{&l_734,(void*)0,&g_124},{&l_734,&g_124,(void*)0},{&g_124,&g_124,&l_734},{&l_734,&l_734,&l_734},{&l_734,&g_124,&l_734},{&g_124,&g_124,&l_734},{(void*)0,&g_124,(void*)0}},{{&l_734,&g_124,&g_124},{(void*)0,&g_124,&l_734},{&g_124,&g_124,&g_124},{&g_124,&l_734,&l_734},{&g_124,&g_124,(void*)0},{&g_124,&l_734,&g_124},{&l_734,&l_734,&g_124},{&g_124,&l_734,&g_124},{&g_124,(void*)0,&g_124},{&g_124,&l_734,&l_734}}}; + int i, j, k; + (*p_51) = &l_718[0][1]; + l_635[l_664] |= (safe_sub_func_int8_t_s_s(((+(*g_713)) <= (safe_rshift_func_uint16_t_u_s(((**p_51) ^ (l_725 == l_726)), (((*l_547) = p_53) != l_727[4][5][3])))), ((*l_736) = (safe_lshift_func_uint8_t_u_u(((p_54 ^ (safe_mod_func_uint16_t_u_u((((0x77L > (((*l_732) = ((l_718[0][3] , p_52) , (void*)0)) == &p_54)) || l_733) > l_727[4][5][3]), 0x2525L))) <= l_734), l_735))))); + l_746 ^= ((*g_146) = ((l_718[0][1] = 0x564EL) , ((l_738 || ((**l_709) |= 0xC3CCL)) < (safe_sub_func_uint16_t_u_u(p_50, (safe_add_func_uint16_t_u_u(((safe_add_func_int8_t_s_s(((*l_547) = p_53), (l_718[0][3] || ((l_745[0] < (((*g_454) = (*g_454)) != (void*)0)) & p_50)))) & l_745[3]), g_61))))))); + (**p_51) &= (0x54A292B6L > (p_54 & (g_358 , ((*l_736) = (~(safe_mul_func_uint16_t_u_u(p_50, 9UL))))))); + } + (*g_146) |= (safe_add_func_int32_t_s_s(((safe_add_func_int16_t_s_s(((void*)0 != &g_2), p_53)) | (safe_div_func_int16_t_s_s((safe_lshift_func_int8_t_s_u((p_54 , ((0x7874L == (safe_div_func_int16_t_s_s((((((p_50 >= ((safe_unary_minus_func_int16_t_s((safe_lshift_func_int8_t_s_u(((*l_547) = g_2), 5)))) | ((l_714 = (((safe_mod_func_int32_t_s_s((safe_add_func_int8_t_s_s(p_50, p_53)), (*g_514))) ^ 0UL) || p_54)) | 4294967295UL))) ^ (-1L)) != l_745[3]) , (*g_434)) , 0xF7FBL), 1L))) >= 1UL)), 6)), 0x7B0EL))), l_738)); + } + else + { /* block id: 430 */ + for (l_559 = 0; (l_559 < 25); l_559++) + { /* block id: 433 */ + (*g_146) ^= ((g_126 , &l_734) != l_768); + (*p_51) = (*p_51); + } + } + for (p_54 = 0; (p_54 <= 24); p_54 = safe_add_func_int16_t_s_s(p_54, 4)) + { /* block id: 440 */ + uint16_t l_773[8][2] = {{0x9B95L,0x9F13L},{0xE64DL,0x9F13L},{0x9B95L,0x9F13L},{0xE64DL,0x9F13L},{0x9B95L,0x9F13L},{0xE64DL,0x9F13L},{0x9B95L,0x9F13L},{0xE64DL,0x9F13L}}; + int i, j; + for (l_664 = 0; (l_664 >= 19); l_664 = safe_add_func_int16_t_s_s(l_664, 1)) + { /* block id: 443 */ + (*g_146) |= l_718[0][1]; + } + (*g_146) = l_773[3][0]; + } + } + } + } + return p_54; +} + + +/* ------------------------------------------ */ +/* + * reads : g_36 g_69 g_37 p_24 l_3153 + * writes: g_36 g_59 g_60 g_61 g_69 g_37 p_24 l_3153 + */ +static uint32_t func_57(int16_t p_58) +{ /* block id: 15 */ + int32_t *l_62 = &g_59[1]; + int32_t l_67 = 3L; + int32_t l_91 = 0xC7F14991L; + int32_t l_92[8][8] = {{1L,0x1594A516L,6L,6L,0x1594A516L,1L,0x1594A516L,6L},{0x03B84D85L,0x1594A516L,0x03B84D85L,1L,1L,0x03B84D85L,0x1594A516L,0x03B84D85L},{0xC4F7295DL,1L,6L,1L,0xC4F7295DL,0xC4F7295DL,1L,6L},{0xC4F7295DL,0xC4F7295DL,1L,6L,1L,0xC4F7295DL,0xC4F7295DL,1L},{0x03B84D85L,1L,1L,0x03B84D85L,0x1594A516L,0x03B84D85L,1L,1L},{1L,0x1594A516L,6L,6L,0x1594A516L,1L,0x1594A516L,6L},{0x03B84D85L,0x1594A516L,0x03B84D85L,1L,1L,0x03B84D85L,0x1594A516L,0x03B84D85L},{0xC4F7295DL,1L,6L,1L,0xC4F7295DL,0xC4F7295DL,1L,6L}}; + int32_t l_94 = (-7L); + uint8_t l_95 = 0x96L; + int32_t **l_100 = (void*)0; + uint8_t *l_177 = &g_31[0]; + const int32_t l_181 = 0xD7EB5230L; + uint16_t l_218 = 0x8B7BL; + int8_t l_219 = 0xA8L; + const uint8_t l_274 = 3UL; + int32_t **l_302 = &g_37; + uint8_t l_356 = 1UL; + const int8_t l_406 = 1L; + int32_t *l_438[5] = {&l_94,&l_94,&l_94,&l_94,&l_94}; + uint16_t *l_457 = &l_218; + const int8_t *l_484[6] = {&l_406,&l_406,&l_406,&l_406,&l_406,&l_406}; + const int8_t **l_483 = &l_484[2]; + uint8_t l_492 = 0x16L; + int32_t l_513 = 0L; + uint32_t l_523 = 0x8A4C21B0L; + int i, j; + for (g_36 = 0; (g_36 <= 0); g_36 += 1) + { /* block id: 18 */ + int32_t l_68 = 2L; + int32_t l_89 = 0x7EEACC20L; + int32_t l_93 = (-5L); + for (p_58 = 0; (p_58 <= 0); p_58 += 1) + { /* block id: 21 */ + uint8_t l_72 = 255UL; + int32_t l_87 = 0x6EE5324EL; + int32_t l_88 = (-2L); + int32_t l_90 = 2L; + int32_t **l_98 = &g_37; + int32_t ***l_99[1][3]; + int i, j; + for (i = 0; i < 1; i++) + { + for (j = 0; j < 3; j++) + l_99[i][j] = &l_98; + } + for (g_59[1] = 0; (g_59[1] <= 0); g_59[1] += 1) + { /* block id: 24 */ + int8_t l_65 = 0xA8L; + int32_t l_66[10] = {0L,0L,0x855F075FL,0L,0L,0x855F075FL,0L,0L,0x855F075FL,0L}; + int i; + for (g_60[0][4][3] = 0; (g_60[0][4][3] <= 0); g_60[0][4][3] += 1) + { /* block id: 27 */ + int32_t *l_64[7]; + int i; + for (i = 0; i < 7; i++) + l_64[i] = &g_61; + for (g_61 = 0; (g_61 >= 0); g_61 -= 1) + { /* block id: 30 */ + int32_t **l_63 = &l_62; + (*l_63) = l_62; + } + ++g_69[6]; + } + ++l_72; + for (l_68 = 0; (l_68 <= 0); l_68 += 1) + { /* block id: 38 */ + int32_t *l_79 = &l_67; + int32_t *l_80 = &g_61; + int32_t *l_81 = &g_60[0][4][3]; + int32_t *l_82 = &l_66[5]; + int32_t *l_83 = (void*)0; + int32_t *l_84 = &l_67; + int32_t *l_85 = &g_60[0][4][3]; + int32_t *l_86[2]; + int i; + for (i = 0; i < 2; i++) + l_86[i] = &g_61; + (*l_79) |= (safe_sub_func_int32_t_s_s((safe_sub_func_int8_t_s_s(0xBDL, g_36)), ((*g_37) ^= ((p_58 > p_58) >= g_36)))); + (*l_79) = 9L; + ++l_95; + } + } + l_100 = l_98; + for (l_94 = 0; (l_94 >= 0); l_94 -= 1) + { /* block id: 48 */ + for (l_67 = 0; (l_67 <= 0); l_67 += 1) + { /* block id: 51 */ + for (g_61 = 0; (g_61 <= 7); g_61 += 1) + { /* block id: 54 */ + int i, j; + (*l_100) = &l_92[(l_94 + 3)][(g_36 + 5)]; + } + } + if (p_58) + break; + } + } + } + for (l_95 = 0; (l_95 < 13); l_95 = safe_add_func_int8_t_s_s(l_95, 6)) + { /* block id: 64 */ + const int32_t l_122 = 0xE33F915BL; + int32_t * const l_132 = &g_60[0][4][3]; + int32_t *l_133[9][4][6] = {{{(void*)0,&g_36,(void*)0,&l_92[2][7],(void*)0,&g_59[0]},{&g_36,&g_59[0],(void*)0,&l_92[6][7],&l_92[6][7],(void*)0},{&l_92[2][7],&l_92[2][7],&g_60[1][2][2],&l_92[6][7],&g_59[0],(void*)0},{&g_36,&g_60[1][2][2],&l_92[4][2],(void*)0,&l_92[4][2],&g_60[1][2][2]}},{{&l_92[6][7],&g_36,&l_92[4][2],(void*)0,&l_92[2][7],(void*)0},{(void*)0,(void*)0,&g_60[1][2][2],&g_60[1][2][2],(void*)0,(void*)0},{&g_60[1][2][2],(void*)0,(void*)0,&g_60[0][0][1],&l_92[2][7],&l_92[4][2]},{&l_92[4][2],&g_36,&l_92[6][7],&g_36,&l_92[4][2],(void*)0}},{{&l_92[4][2],&g_60[1][2][2],&g_36,&g_60[0][0][1],&g_59[0],&g_59[0]},{&g_60[1][2][2],&l_92[2][7],&l_92[2][7],&g_60[1][2][2],&l_92[6][7],&g_59[0]},{(void*)0,&g_59[0],&g_36,(void*)0,&g_60[0][0][1],(void*)0},{&l_92[6][7],(void*)0,&l_92[6][7],(void*)0,&g_60[0][0][1],&l_92[4][2]}},{{&g_36,&g_59[0],(void*)0,&l_92[6][7],&l_92[6][7],(void*)0},{&l_92[2][7],&l_92[2][7],&g_60[1][2][2],&l_92[6][7],&g_59[0],(void*)0},{&g_36,&g_60[1][2][2],&l_92[4][2],(void*)0,&l_92[4][2],&g_60[1][2][2]},{&l_92[6][7],&g_36,&l_92[4][2],(void*)0,&l_92[2][7],(void*)0}},{{(void*)0,(void*)0,&g_60[1][2][2],&g_60[1][2][2],(void*)0,(void*)0},{&g_60[1][2][2],(void*)0,(void*)0,&g_60[0][0][1],&l_92[2][7],&l_92[4][2]},{&l_92[4][2],&g_36,&l_92[6][7],&g_36,&l_92[4][2],(void*)0},{&l_92[4][2],&g_60[1][2][2],&g_36,&g_60[0][0][1],&g_59[0],&g_59[0]}},{{&g_60[1][2][2],&l_92[2][7],&l_92[2][7],&g_60[1][2][2],&l_92[6][7],&g_59[0]},{(void*)0,&g_59[0],&g_36,(void*)0,&g_60[0][0][1],(void*)0},{&l_92[6][7],(void*)0,&l_92[6][7],(void*)0,&g_60[0][0][1],&l_92[4][2]},{&g_36,&g_59[0],(void*)0,&l_92[6][7],&l_92[6][7],(void*)0}},{{&l_92[2][7],&l_92[2][7],&g_60[1][2][2],&l_92[6][7],&g_59[0],(void*)0},{&g_36,&g_60[1][2][2],&l_92[4][2],(void*)0,&l_92[4][2],&g_60[1][2][2]},{&l_92[6][7],&g_36,&l_92[4][2],(void*)0,&l_92[2][7],(void*)0},{(void*)0,(void*)0,&g_60[1][2][2],&g_60[1][2][2],(void*)0,(void*)0}},{{&g_60[1][2][2],(void*)0,(void*)0,&g_60[0][0][1],&l_92[2][7],&l_92[4][2]},{&l_92[4][2],&g_36,&l_92[6][7],&g_36,&l_92[4][2],(void*)0},{&l_92[4][2],&g_60[1][2][2],&g_36,&g_60[0][0][1],&g_59[0],&g_59[0]},{&g_60[1][2][2],&l_92[2][7],&l_92[2][7],&g_60[1][2][2],&l_92[6][7],&g_59[0]}},{{(void*)0,&g_59[0],&g_36,(void*)0,&g_59[0],&g_60[1][2][2]},{(void*)0,&g_60[0][0][1],(void*)0,&g_36,&g_59[0],(void*)0},{(void*)0,&l_92[4][2],&l_92[6][7],(void*)0,(void*)0,&l_92[6][7]},{(void*)0,(void*)0,&l_92[2][7],(void*)0,&l_92[4][2],&g_36}}}; + int8_t *l_175[1][4]; + int16_t l_217 = 0x3422L; + uint16_t *l_255 = &g_69[6]; + int32_t * const **l_303[1]; + uint32_t *l_407 = &g_408[2][6]; + const int32_t *l_475 = (void*)0; + int8_t * const *l_511 = (void*)0; + int i, j, k; + for (i = 0; i < 1; i++) + { + for (j = 0; j < 4; j++) + l_175[i][j] = &g_126; + } + for (i = 0; i < 1; i++) + l_303[i] = (void*)0; + } + return p_58; +} + + + + +/* ---------------------------------------- */ +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_2, "g_2", print_hash_value); + for (i = 0; i < 1; i++) + { + transparent_crc(g_31[i], "g_31[i]", print_hash_value); + if (print_hash_value) printf("index = [%d]\n", i); + + } + transparent_crc(g_36, "g_36", print_hash_value); + for (i = 0; i < 9; i++) + { + transparent_crc(g_59[i], "g_59[i]", print_hash_value); + if (print_hash_value) printf("index = [%d]\n", i); + + } + for (i = 0; i < 2; i++) + { + for (j = 0; j < 5; j++) + { + for (k = 0; k < 4; k++) + { + transparent_crc(g_60[i][j][k], "g_60[i][j][k]", print_hash_value); + if (print_hash_value) printf("index = [%d][%d][%d]\n", i, j, k); + + } + } + } + transparent_crc(g_61, "g_61", print_hash_value); + for (i = 0; i < 9; i++) + { + transparent_crc(g_69[i], "g_69[i]", print_hash_value); + if (print_hash_value) printf("index = [%d]\n", i); + + } + transparent_crc(g_124, "g_124", print_hash_value); + transparent_crc(g_126, "g_126", print_hash_value); + transparent_crc(g_131, "g_131", print_hash_value); + for (i = 0; i < 4; i++) + { + transparent_crc(g_138[i], "g_138[i]", print_hash_value); + if (print_hash_value) printf("index = [%d]\n", i); + + } + transparent_crc(g_145, "g_145", print_hash_value); + transparent_crc(g_358, "g_358", print_hash_value); + transparent_crc(g_360, "g_360", print_hash_value); + for (i = 0; i < 6; i++) + { + for (j = 0; j < 10; j++) + { + transparent_crc(g_408[i][j], "g_408[i][j]", print_hash_value); + if (print_hash_value) printf("index = [%d][%d]\n", i, j); + + } + } + transparent_crc(g_415, "g_415", print_hash_value); + transparent_crc(g_436, "g_436", print_hash_value); + transparent_crc(g_510, "g_510", print_hash_value); + transparent_crc(g_775, "g_775", print_hash_value); + transparent_crc(g_961, "g_961", print_hash_value); + for (i = 0; i < 1; i++) + { + transparent_crc(g_1096[i], "g_1096[i]", print_hash_value); + if (print_hash_value) printf("index = [%d]\n", i); + + } + transparent_crc(g_1202, "g_1202", print_hash_value); + transparent_crc(g_1250, "g_1250", print_hash_value); + transparent_crc(g_1312, "g_1312", print_hash_value); + transparent_crc(g_1484, "g_1484", print_hash_value); + transparent_crc(g_1509, "g_1509", print_hash_value); + for (i = 0; i < 6; i++) + { + for (j = 0; j < 9; j++) + { + for (k = 0; k < 3; k++) + { + transparent_crc(g_1758[i][j][k], "g_1758[i][j][k]", print_hash_value); + if (print_hash_value) printf("index = [%d][%d][%d]\n", i, j, k); + + } + } + } + transparent_crc(g_1847, "g_1847", print_hash_value); + transparent_crc(g_1959, "g_1959", print_hash_value); + for (i = 0; i < 7; i++) + { + for (j = 0; j < 8; j++) + { + transparent_crc(g_2057[i][j], "g_2057[i][j]", print_hash_value); + if (print_hash_value) printf("index = [%d][%d]\n", i, j); + + } + } + transparent_crc(g_2156, "g_2156", print_hash_value); + for (i = 0; i < 10; i++) + { + transparent_crc(g_2225[i], "g_2225[i]", print_hash_value); + if (print_hash_value) printf("index = [%d]\n", i); + + } + transparent_crc(g_2234, "g_2234", print_hash_value); + transparent_crc(g_2236, "g_2236", print_hash_value); + transparent_crc(g_2239, "g_2239", print_hash_value); + for (i = 0; i < 3; i++) + { + for (j = 0; j < 3; j++) + { + transparent_crc(g_2387[i][j], "g_2387[i][j]", print_hash_value); + if (print_hash_value) printf("index = [%d][%d]\n", i, j); + + } + } + transparent_crc(g_2451, "g_2451", print_hash_value); + transparent_crc(g_2907, "g_2907", print_hash_value); + transparent_crc(g_3051, "g_3051", print_hash_value); + for (i = 0; i < 10; i++) + { + transparent_crc(g_3207[i], "g_3207[i]", print_hash_value); + if (print_hash_value) printf("index = [%d]\n", i); + + } + transparent_crc(g_3271, "g_3271", print_hash_value); + transparent_crc(g_3299, "g_3299", print_hash_value); + transparent_crc(g_3397, "g_3397", print_hash_value); + transparent_crc(g_3398, "g_3398", print_hash_value); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} + +/************************ statistics ************************* +XXX max struct depth: 0 +breakdown: + depth: 0, occurrence: 805 +XXX total union variables: 0 + +XXX non-zero bitfields defined in structs: 0 +XXX zero bitfields defined in structs: 0 +XXX const bitfields defined in structs: 0 +XXX volatile bitfields defined in structs: 0 +XXX structs with bitfields in the program: 0 +breakdown: +XXX full-bitfields structs in the program: 0 +breakdown: +XXX times a bitfields struct's address is taken: 0 +XXX times a bitfields struct on LHS: 0 +XXX times a bitfields struct on RHS: 0 +XXX times a single bitfield on LHS: 0 +XXX times a single bitfield on RHS: 0 + +XXX max expression depth: 50 +breakdown: + depth: 1, occurrence: 386 + depth: 2, occurrence: 129 + depth: 3, occurrence: 4 + depth: 4, occurrence: 6 + depth: 5, occurrence: 3 + depth: 6, occurrence: 2 + depth: 8, occurrence: 1 + depth: 9, occurrence: 1 + depth: 14, occurrence: 2 + depth: 15, occurrence: 2 + depth: 16, occurrence: 2 + depth: 17, occurrence: 5 + depth: 18, occurrence: 6 + depth: 19, occurrence: 4 + depth: 20, occurrence: 5 + depth: 21, occurrence: 5 + depth: 22, occurrence: 2 + depth: 23, occurrence: 6 + depth: 24, occurrence: 1 + depth: 25, occurrence: 5 + depth: 26, occurrence: 4 + depth: 27, occurrence: 3 + depth: 28, occurrence: 3 + depth: 30, occurrence: 3 + depth: 31, occurrence: 6 + depth: 32, occurrence: 1 + depth: 35, occurrence: 2 + depth: 36, occurrence: 2 + depth: 38, occurrence: 2 + depth: 39, occurrence: 1 + depth: 40, occurrence: 1 + depth: 42, occurrence: 2 + depth: 43, occurrence: 1 + depth: 46, occurrence: 1 + depth: 47, occurrence: 1 + depth: 50, occurrence: 1 + +XXX total number of pointers: 604 + +XXX times a variable address is taken: 1521 +XXX times a pointer is dereferenced on RHS: 568 +breakdown: + depth: 1, occurrence: 463 + depth: 2, occurrence: 78 + depth: 3, occurrence: 18 + depth: 4, occurrence: 9 +XXX times a pointer is dereferenced on LHS: 494 +breakdown: + depth: 1, occurrence: 467 + depth: 2, occurrence: 18 + depth: 3, occurrence: 5 + depth: 4, occurrence: 4 +XXX times a pointer is compared with null: 72 +XXX times a pointer is compared with address of another variable: 24 +XXX times a pointer is compared with another pointer: 23 +XXX times a pointer is qualified to be dereferenced: 11166 + +XXX max dereference level: 6 +breakdown: + level: 0, occurrence: 0 + level: 1, occurrence: 2371 + level: 2, occurrence: 300 + level: 3, occurrence: 264 + level: 4, occurrence: 115 + level: 5, occurrence: 8 + level: 6, occurrence: 3 +XXX number of pointers point to pointers: 292 +XXX number of pointers point to scalars: 312 +XXX number of pointers point to structs: 0 +XXX percent of pointers has null in alias set: 29.3 +XXX average alias set size: 1.49 + +XXX times a non-volatile is read: 3202 +XXX times a non-volatile is write: 1494 +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: 9 + +XXX stmts: 414 +XXX max block depth: 5 +breakdown: + depth: 0, occurrence: 32 + depth: 1, occurrence: 35 + depth: 2, occurrence: 65 + depth: 3, occurrence: 80 + depth: 4, occurrence: 95 + depth: 5, occurrence: 107 + +XXX percentage a fresh-made variable is used: 14.8 +XXX percentage an existing variable is used: 85.2 +********************* end of statistics **********************/ + diff --git a/tests/fuzz/14.c.txt b/tests/fuzz/14.c.txt new file mode 100644 index 00000000..118ce7dd --- /dev/null +++ b/tests/fuzz/14.c.txt @@ -0,0 +1 @@ +523D07B9 diff --git a/tests/fuzz/16.c b/tests/fuzz/16.c new file mode 100644 index 00000000..187a6c64 --- /dev/null +++ b/tests/fuzz/16.c @@ -0,0 +1,1317 @@ +/* + * This is a RANDOMLY GENERATED PROGRAM. + * + * Generator: csmith 2.2.0 + * Git version: bf42ffd + * Options: --no-volatiles --no-math64 --no-packed-struct + * Seed: 599346178 + */ + +#include "csmith.h" + + +static long __undefined; + +/* --- Struct/Union Declarations --- */ +struct S0 { + signed f0 : 15; + unsigned f1 : 8; + unsigned f2 : 10; + unsigned f3 : 14; +}; + +struct S1 { + uint16_t f0; + uint16_t f1; +}; + +struct S2 { + signed f0 : 3; + unsigned f1 : 27; + unsigned f2 : 29; + const unsigned f3 : 5; + unsigned f4 : 31; + int32_t f5; + unsigned f6 : 24; + signed f7 : 15; + signed f8 : 15; +}; + +struct S3 { + const signed f0 : 30; + const signed f1 : 5; + unsigned f2 : 21; + signed f3 : 8; + unsigned f4 : 7; + unsigned f5 : 30; + unsigned f6 : 14; + signed f7 : 11; + const signed f8 : 14; + unsigned f9 : 26; +}; + +struct S4 { + struct S3 f0; + const signed f1 : 26; +}; + +struct S5 { + uint16_t f0; + uint16_t f1; + const struct S3 f2; + int32_t f3; +}; + +/* --- GLOBAL VARIABLES --- */ +static struct S1 g_22 = {0x9E5FL,0xF1BEL}; +static uint8_t g_23 = 0xDFL; +static struct S1 g_43[8][10][3] = {{{{65530UL,1UL},{1UL,0xEB2EL},{0x7628L,1UL}},{{0x3094L,0xC7A5L},{0x2614L,65527UL},{0xCBE0L,0x4EC4L}},{{65530UL,1UL},{0UL,0x894BL},{65530UL,0xE41CL}},{{0xA3A0L,0xB06FL},{1UL,0x7DC5L},{7UL,65535UL}},{{65530UL,0x5790L},{0xEF29L,65535UL},{65530UL,1UL}},{{65535UL,65535UL},{0x4FDBL,65535UL},{65534UL,0xCDD4L}},{{65530UL,0xE41CL},{0xEF29L,65535UL},{4UL,0xDB38L}},{{0xC793L,0x51EAL},{1UL,0x7DC5L},{65535UL,2UL}},{{0x2801L,1UL},{0UL,0x894BL},{0xEBE4L,1UL}},{{7UL,65535UL},{0x2614L,65527UL},{0xED68L,0xD092L}}},{{{0xEBE4L,1UL},{1UL,0xEB2EL},{0xEBE4L,1UL}},{{0x9622L,0UL},{0UL,0xFB19L},{65535UL,2UL}},{{0x4927L,8UL},{0x1B31L,1UL},{4UL,0xDB38L}},{{0xCBE0L,0x4EC4L},{0x980DL,0x298BL},{65534UL,0xCDD4L}},{{0xCC22L,0xCDAAL},{0x64E9L,3UL},{65530UL,1UL}},{{0xCBE0L,0x4EC4L},{65535UL,2UL},{1UL,6UL}},{{65528UL,65532UL},{65530UL,1UL},{4UL,0x44EEL}},{{0xFCBCL,1UL},{65527UL,0x159EL},{1UL,0x5F07L}},{{0UL,0xE035L},{0x2801L,1UL},{0x7F1FL,1UL}},{{1UL,6UL},{65527UL,0x159EL},{0xF3A5L,0x7C9EL}}},{{{0xDF6EL,0x0FB7L},{65530UL,1UL},{0x6A5CL,5UL}},{{0xB7CFL,65535UL},{65535UL,2UL},{65526UL,0xC961L}},{{4UL,0x44EEL},{0xCC22L,0xCDAAL},{0UL,0x5C63L}},{{65526UL,0xC961L},{0x9622L,0UL},{65526UL,0xC961L}},{{0x9A5AL,0xFD0BL},{0x459FL,0x79DDL},{0x6A5CL,5UL}},{{0x6F24L,1UL},{0xBE1DL,0UL},{0xF3A5L,0x7C9EL}},{{0xB77DL,0xD86EL},{65530UL,0x5790L},{0x7F1FL,1UL}},{{0x2E96L,65531UL},{0x3094L,0xC7A5L},{1UL,0x5F07L}},{{0xB77DL,0xD86EL},{0x167AL,65530UL},{4UL,0x44EEL}},{{0x6F24L,1UL},{0xCBE0L,0x4EC4L},{1UL,6UL}}},{{{0x9A5AL,0xFD0BL},{4UL,0xDB38L},{0xB77DL,0xD86EL}},{{65526UL,0xC961L},{0xC793L,0x51EAL},{0x0DAEL,65535UL}},{{4UL,0x44EEL},{4UL,0xDB38L},{65533UL,0xBBCAL}},{{0xB7CFL,65535UL},{0xCBE0L,0x4EC4L},{65535UL,65535UL}},{{0xDF6EL,0x0FB7L},{0x167AL,65530UL},{0UL,0xE035L}},{{1UL,6UL},{0x3094L,0xC7A5L},{0UL,0xF9ADL}},{{0UL,0xE035L},{65530UL,0x5790L},{0UL,0xE035L}},{{0xFCBCL,1UL},{0xBE1DL,0UL},{65535UL,65535UL}},{{65528UL,65532UL},{0x459FL,0x79DDL},{65533UL,0xBBCAL}},{{1UL,0x5F07L},{0x9622L,0UL},{0x0DAEL,65535UL}}},{{{65530UL,9UL},{0xCC22L,0xCDAAL},{0xB77DL,0xD86EL}},{{1UL,0x5F07L},{65535UL,2UL},{1UL,6UL}},{{65528UL,65532UL},{65530UL,1UL},{4UL,0x44EEL}},{{0xFCBCL,1UL},{65527UL,0x159EL},{1UL,0x5F07L}},{{0UL,0xE035L},{0x2801L,1UL},{0x7F1FL,1UL}},{{1UL,6UL},{65527UL,0x159EL},{0xF3A5L,0x7C9EL}},{{0xDF6EL,0x0FB7L},{65530UL,1UL},{0x6A5CL,5UL}},{{0xB7CFL,65535UL},{65535UL,2UL},{65526UL,0xC961L}},{{4UL,0x44EEL},{0xCC22L,0xCDAAL},{0UL,0x5C63L}},{{65526UL,0xC961L},{0x9622L,0UL},{65526UL,0xC961L}}},{{{0x9A5AL,0xFD0BL},{0x459FL,0x79DDL},{0x6A5CL,5UL}},{{0x6F24L,1UL},{0xBE1DL,0UL},{0xF3A5L,0x7C9EL}},{{0xB77DL,0xD86EL},{65530UL,0x5790L},{0x7F1FL,1UL}},{{0x2E96L,65531UL},{0x3094L,0xC7A5L},{1UL,0x5F07L}},{{0xB77DL,0xD86EL},{0x167AL,65530UL},{4UL,0x44EEL}},{{0x6F24L,1UL},{0xCBE0L,0x4EC4L},{1UL,6UL}},{{0x9A5AL,0xFD0BL},{4UL,0xDB38L},{0xB77DL,0xD86EL}},{{65526UL,0xC961L},{0xC793L,0x51EAL},{0x0DAEL,65535UL}},{{4UL,0x44EEL},{4UL,0xDB38L},{65533UL,0xBBCAL}},{{0xB7CFL,65535UL},{0xCBE0L,0x4EC4L},{65535UL,65535UL}}},{{{0xDF6EL,0x0FB7L},{0x167AL,65530UL},{0UL,0xE035L}},{{1UL,6UL},{0x3094L,0xC7A5L},{0UL,0xF9ADL}},{{0UL,0xE035L},{65530UL,0x5790L},{0UL,0xE035L}},{{0xFCBCL,1UL},{0xBE1DL,0UL},{65535UL,65535UL}},{{65528UL,65532UL},{0x459FL,0x79DDL},{65533UL,0xBBCAL}},{{1UL,0x5F07L},{0x9622L,0UL},{0x0DAEL,65535UL}},{{65530UL,9UL},{0xCC22L,0xCDAAL},{0xB77DL,0xD86EL}},{{1UL,0x5F07L},{65535UL,2UL},{1UL,6UL}},{{65528UL,65532UL},{65530UL,1UL},{4UL,0x44EEL}},{{0xFCBCL,1UL},{65527UL,0x159EL},{1UL,0x5F07L}}},{{{0UL,0xE035L},{0x2801L,1UL},{0x7F1FL,1UL}},{{1UL,6UL},{65527UL,0x159EL},{0xF3A5L,0x7C9EL}},{{0xDF6EL,0x0FB7L},{65530UL,1UL},{0x6A5CL,5UL}},{{0xB7CFL,65535UL},{65535UL,2UL},{65526UL,0xC961L}},{{4UL,0x44EEL},{0xCC22L,0xCDAAL},{0UL,0x5C63L}},{{65526UL,0xC961L},{0x9622L,0UL},{65526UL,0xC961L}},{{0x9A5AL,0xFD0BL},{0x459FL,0x79DDL},{0x6A5CL,5UL}},{{0x6F24L,1UL},{0xBE1DL,0UL},{0xF3A5L,0x7C9EL}},{{0xB77DL,0xD86EL},{65530UL,0x5790L},{0x7F1FL,1UL}},{{0x4FDBL,65535UL},{0x2E96L,65531UL},{0x1FCFL,65528UL}}}}; +static struct S1 *g_42 = &g_43[6][6][2]; +static struct S5 g_69 = {1UL,0x0ACFL,{8641,1,66,-9,5,16167,108,18,97,2292},-1L}; +static struct S5 *g_76 = (void*)0; +static struct S5 **g_75 = &g_76; +static int32_t g_84 = 1L; +static uint32_t g_85 = 0xA7E1DD48L; +static uint8_t g_94 = 0xAFL; +static int16_t g_109 = 0x89DBL; +static struct S3 g_111 = {25828,3,536,-9,6,32740,94,43,-66,805}; +static struct S3 g_113 = {19961,-2,968,11,6,26254,93,-34,-102,7793}; +static struct S3 *g_112 = &g_113; +static uint32_t g_131 = 4294967295UL; +static struct S4 g_138 = {{-26187,-2,1070,5,2,15692,110,-5,66,322},7315}; +static int32_t *g_151[9] = {(void*)0,(void*)0,(void*)0,(void*)0,(void*)0,(void*)0,(void*)0,(void*)0,(void*)0}; +static struct S0 g_153 = {-53,3,7,82}; +static struct S3 g_182 = {-615,-4,889,-1,1,13978,113,20,74,1261}; +static int32_t g_214 = (-10L); +static int8_t g_253 = 0xD8L; +static const int8_t *g_252 = &g_253; +static int16_t g_274 = 0xB1F5L; +static uint32_t *g_346[10][3][5] = {{{&g_131,&g_131,&g_131,&g_131,(void*)0},{&g_131,&g_131,&g_131,&g_131,&g_131},{&g_131,&g_131,&g_131,&g_131,&g_131}},{{&g_131,&g_131,&g_131,&g_131,&g_131},{(void*)0,&g_131,&g_131,&g_131,&g_131},{&g_131,&g_131,&g_131,&g_131,&g_131}},{{&g_131,&g_131,&g_131,&g_131,&g_131},{&g_131,(void*)0,(void*)0,&g_131,&g_131},{(void*)0,&g_131,&g_131,&g_131,(void*)0}},{{&g_131,&g_131,&g_131,(void*)0,&g_131},{&g_131,&g_131,&g_131,&g_131,&g_131},{&g_131,&g_131,&g_131,&g_131,&g_131}},{{&g_131,&g_131,&g_131,&g_131,(void*)0},{&g_131,&g_131,(void*)0,&g_131,&g_131},{&g_131,&g_131,&g_131,&g_131,&g_131}},{{&g_131,&g_131,(void*)0,&g_131,&g_131},{(void*)0,&g_131,&g_131,&g_131,&g_131},{&g_131,&g_131,&g_131,&g_131,&g_131}},{{&g_131,&g_131,&g_131,&g_131,&g_131},{&g_131,(void*)0,&g_131,&g_131,&g_131},{(void*)0,&g_131,&g_131,&g_131,(void*)0}},{{&g_131,&g_131,(void*)0,(void*)0,&g_131},{&g_131,&g_131,&g_131,&g_131,&g_131},{&g_131,&g_131,&g_131,&g_131,&g_131}},{{&g_131,&g_131,&g_131,&g_131,(void*)0},{&g_131,&g_131,&g_131,&g_131,&g_131},{&g_131,&g_131,&g_131,&g_131,&g_131}},{{&g_131,&g_131,&g_131,&g_131,&g_131},{(void*)0,&g_131,&g_131,&g_131,&g_131},{&g_131,&g_131,&g_131,&g_131,&g_131}}}; +static uint32_t **g_345 = &g_346[0][2][2]; +static struct S2 g_349 = {-0,10399,13744,1,23366,0x73A13C76L,2460,-117,-63}; +static struct S2 *g_348 = &g_349; +static struct S3 *g_352 = (void*)0; +static struct S3 *g_355 = (void*)0; +static struct S3 g_357 = {21505,3,625,-0,1,22557,91,-24,91,4258}; +static struct S3 *g_356 = &g_357; +static uint32_t **g_401 = (void*)0; +static uint32_t g_494[4] = {0xF410F1BCL,0xF410F1BCL,0xF410F1BCL,0xF410F1BCL}; +static struct S4 g_518[8] = {{{-7073,-1,1273,-8,2,4384,85,5,12,2244},-5776},{{-7073,-1,1273,-8,2,4384,85,5,12,2244},-5776},{{-7073,-1,1273,-8,2,4384,85,5,12,2244},-5776},{{-7073,-1,1273,-8,2,4384,85,5,12,2244},-5776},{{-7073,-1,1273,-8,2,4384,85,5,12,2244},-5776},{{-7073,-1,1273,-8,2,4384,85,5,12,2244},-5776},{{-7073,-1,1273,-8,2,4384,85,5,12,2244},-5776},{{-7073,-1,1273,-8,2,4384,85,5,12,2244},-5776}}; +static struct S4 *g_517 = &g_518[1]; +static struct S4 g_521[5][2][4] = {{{{{11267,4,50,0,0,23117,4,21,-42,449},-4258},{{11267,4,50,0,0,23117,4,21,-42,449},-4258},{{9750,-2,1241,6,5,3993,72,-4,66,4292},-6475},{{-32497,-1,427,1,10,16937,126,28,46,2174},3226}},{{{-17361,-1,25,8,3,23008,28,17,26,6153},2330},{{9750,-2,1241,6,5,3993,72,-4,66,4292},-6475},{{-22579,4,416,8,10,18216,1,12,11,5405},-4220},{{26283,3,971,4,9,10669,69,-23,-39,3125},6498}}},{{{{16235,0,21,-9,0,24889,42,-32,104,5527},-1564},{{16645,-0,330,-13,7,14218,38,36,88,1244},-5752},{{11050,-0,1023,-12,5,13403,121,-44,-26,7622},-3567},{{-22579,4,416,8,10,18216,1,12,11,5405},-4220}},{{{-22579,4,416,8,10,18216,1,12,11,5405},-4220},{{16645,-0,330,-13,7,14218,38,36,88,1244},-5752},{{11267,4,50,0,0,23117,4,21,-42,449},-4258},{{26283,3,971,4,9,10669,69,-23,-39,3125},6498}}},{{{{-27039,0,1347,9,7,17637,27,0,-93,8164},-4957},{{21599,1,11,15,10,12835,80,-43,-115,622},1327},{{-27039,0,1347,9,7,17637,27,0,-93,8164},-4957},{{30649,1,566,-14,4,26449,55,-3,38,555},-4627}},{{{-2727,2,211,13,7,2544,112,-36,83,238},-7275},{{-22579,4,416,8,10,18216,1,12,11,5405},-4220},{{11050,-0,1023,-12,5,13403,121,-44,-26,7622},-3567},{{16645,-0,330,-13,7,14218,38,36,88,1244},-5752}}},{{{{-17361,-1,25,8,3,23008,28,17,26,6153},2330},{{-2727,2,211,13,7,2544,112,-36,83,238},-7275},{{30649,1,566,-14,4,26449,55,-3,38,555},-4627},{{-22579,4,416,8,10,18216,1,12,11,5405},-4220}},{{{18460,-2,1432,5,10,14352,80,32,86,7371},4860},{{-10379,4,1045,-7,10,6983,94,-28,-104,1529},2147},{{30649,1,566,-14,4,26449,55,-3,38,555},-4627},{{16235,0,21,-9,0,24889,42,-32,104,5527},-1564}}},{{{{-17361,-1,25,8,3,23008,28,17,26,6153},2330},{{11050,-0,1023,-12,5,13403,121,-44,-26,7622},-3567},{{11050,-0,1023,-12,5,13403,121,-44,-26,7622},-3567},{{-17361,-1,25,8,3,23008,28,17,26,6153},2330}},{{{-2727,2,211,13,7,2544,112,-36,83,238},-7275},{{18460,-2,1432,5,10,14352,80,32,86,7371},4860},{{-27039,0,1347,9,7,17637,27,0,-93,8164},-4957},{{11267,4,50,0,0,23117,4,21,-42,449},-4258}}}}; +static uint16_t g_599 = 0x3677L; +static int32_t g_601[2][3] = {{(-3L),(-3L),(-3L)},{(-3L),(-3L),(-3L)}}; +static uint8_t g_745 = 0x79L; +static struct S0 *g_750 = (void*)0; +static struct S0 **g_749 = &g_750; +static const int32_t g_763 = 0x2FF78294L; +static const int32_t *g_762 = &g_763; +static int8_t g_798 = 9L; +static int8_t g_809 = 7L; +static struct S4 g_903 = {{1711,1,1044,15,3,21405,47,3,-94,3477},1019}; +static uint16_t g_922[6] = {0xC1F3L,0xC1F3L,0xC1F3L,0xC1F3L,0xC1F3L,0xC1F3L}; +static const struct S4 g_1001 = {{-16006,-3,1349,8,5,30049,50,-3,125,3359},4405}; +static struct S5 g_1017 = {0x37CCL,0x3778L,{-20731,-3,745,-15,3,27561,18,-35,-28,3640},0x8265F5ECL}; + + +/* --- FORWARD DECLARATIONS --- */ +static int32_t func_1(void); +static struct S1 func_2(struct S1 p_3, struct S4 p_4, struct S3 p_5, const struct S3 p_6, struct S5 p_7); +static struct S1 func_8(uint32_t p_9, struct S0 p_10); +static uint32_t func_11(const struct S2 p_12, const struct S5 p_13, uint8_t p_14, uint8_t p_15, struct S0 p_16); +static const struct S2 func_17(struct S1 p_18, int32_t p_19); +static uint32_t func_26(uint8_t p_27, uint8_t p_28, struct S1 * p_29, struct S1 * p_30, const struct S1 * p_31); +static struct S0 func_47(struct S0 p_48, struct S1 * p_49, const uint16_t p_50, struct S2 p_51); +static struct S0 func_52(struct S0 p_53, struct S1 * p_54, struct S1 * p_55, struct S1 * p_56, struct S1 p_57); +static struct S0 func_58(int16_t p_59, int32_t p_60, struct S1 * p_61, uint16_t p_62, struct S1 * p_63); +static struct S1 * func_64(struct S1 * const p_65, struct S1 * p_66, struct S1 * p_67); + + +/* --- FUNCTIONS --- */ +/* ------------------------------------------ */ +/* + * reads : g_23 g_42 g_43.f0 g_75 g_94 g_85 g_69.f2.f7 g_84 g_69.f1 g_131 g_138 g_111.f5 g_111.f6 g_111.f3 g_153 g_113.f9 g_69.f2.f3 g_69.f2.f2 g_69.f2.f0 g_111.f1 g_43 g_113.f8 g_214 g_113.f3 g_252 g_253 g_69.f0 g_109 g_182.f9 g_113.f0 g_69.f3 g_345 g_113.f6 g_348 g_182.f0 g_113.f5 g_349.f0 g_111.f4 g_346 g_357.f9 g_111.f7 g_349 g_69.f2.f4 g_494 g_517 g_518 g_182.f8 g_274 g_599 g_69 g_1017 g_601 g_762 g_763 g_903.f0.f7 g_903.f0 g_22.f1 g_22.f0 + * writes: g_22 g_43 g_69.f0 g_84 g_85 g_69.f1 g_94 g_109 g_112 g_131 g_151 g_214 g_274 g_348 g_352 g_355 g_356 g_345 g_401 g_253 g_76 g_349.f5 g_494 g_517 g_599 g_69.f3 g_153 + */ +static int32_t func_1(void) +{ /* block id: 0 */ + struct S1 l_20[8] = {{0x097EL,0UL},{0x097EL,0UL},{1UL,1UL},{0x097EL,0UL},{0x097EL,0UL},{1UL,1UL},{0x097EL,0UL},{0x097EL,0UL}}; + struct S1 *l_21[4] = {(void*)0,(void*)0,(void*)0,(void*)0}; + const struct S5 l_25 = {65529UL,6UL,{15351,-3,1209,-9,2,27860,14,-8,-117,4412},4L}; + struct S0 l_1069 = {-51,6,31,68}; + struct S4 l_1075[1] = {{{-2640,-0,453,-5,8,18251,94,17,-33,5958},-3807}}; + int i; + (*g_42) = func_2(((*g_42) = func_8((func_11(func_17((g_22 = l_20[5]), g_23), l_25, (func_26(g_23, ((safe_rshift_func_uint16_t_u_u((safe_lshift_func_int16_t_s_u(0xBB1EL, (((safe_rshift_func_uint16_t_u_s((safe_mod_func_uint8_t_u_u(l_25.f2.f6, (safe_add_func_uint8_t_u_u(l_25.f2.f0, (l_25.f2.f4 < g_23))))), g_23)) , g_23) , 6UL))), l_25.f2.f9)) | g_23), g_42, &g_43[3][5][0], &l_20[1]) >= 0UL), g_903.f0.f7, l_1069) >= 4294967295UL), l_1069)), l_1075[0], g_903.f0, g_1017.f2, g_1017); + return l_25.f2.f9; +} + + +/* ------------------------------------------ */ +/* + * reads : g_84 g_22.f1 g_94 g_22.f0 g_494 g_42 g_43 + * writes: g_84 g_22.f1 g_94 g_22.f0 + */ +static struct S1 func_2(struct S1 p_3, struct S4 p_4, struct S3 p_5, const struct S3 p_6, struct S5 p_7) +{ /* block id: 578 */ + const int8_t **l_1080 = &g_252; + for (g_84 = 8; (g_84 != (-5)); g_84 = safe_sub_func_int8_t_s_s(g_84, 7)) + { /* block id: 581 */ + for (g_22.f1 = 0; (g_22.f1 <= 22); g_22.f1 = safe_add_func_uint32_t_u_u(g_22.f1, 1)) + { /* block id: 584 */ + for (g_94 = 0; (g_94 <= 2); g_94 += 1) + { /* block id: 587 */ + for (g_22.f0 = 2; (g_22.f0 <= 8); g_22.f0 += 1) + { /* block id: 590 */ + int i; + if (g_494[(g_94 + 1)]) + break; + } + for (p_3.f1 = 0; (p_3.f1 <= 2); p_3.f1 += 1) + { /* block id: 595 */ + int i; + if (g_494[p_3.f1]) + break; + } + return (*g_42); + } + return p_3; + } + } + l_1080 = l_1080; + return (*g_42); +} + + +/* ------------------------------------------ */ +/* + * reads : + * writes: g_84 + */ +static struct S1 func_8(uint32_t p_9, struct S0 p_10) +{ /* block id: 574 */ + uint16_t l_1072 = 0xD8F4L; + int32_t *l_1073 = &g_84; + struct S1 l_1074 = {1UL,1UL}; + (*l_1073) = (safe_lshift_func_uint16_t_u_u(l_1072, 8)); + return l_1074; +} + + +/* ------------------------------------------ */ +/* + * reads : + * writes: + */ +static uint32_t func_11(const struct S2 p_12, const struct S5 p_13, uint8_t p_14, uint8_t p_15, struct S0 p_16) +{ /* block id: 572 */ + return p_12.f0; +} + + +/* ------------------------------------------ */ +/* + * reads : + * writes: + */ +static const struct S2 func_17(struct S1 p_18, int32_t p_19) +{ /* block id: 2 */ + const struct S2 l_24 = {0,9374,5952,0,29241,1L,2915,-142,113}; + return l_24; +} + + +/* ------------------------------------------ */ +/* + * reads : g_42 g_43.f0 g_75 g_94 g_85 g_69.f2.f7 g_84 g_23 g_69.f1 g_131 g_138 g_111.f5 g_111.f6 g_111.f3 g_153 g_113.f9 g_69.f2.f3 g_69.f2.f2 g_69.f2.f0 g_111.f1 g_43 g_113.f8 g_214 g_113.f3 g_252 g_253 g_69.f0 g_109 g_182.f9 g_113.f0 g_69.f3 g_345 g_113.f6 g_348 g_182.f0 g_113.f5 g_349.f0 g_111.f4 g_346 g_357.f9 g_111.f7 g_349 g_69.f2.f4 g_494 g_517 g_518 g_182.f8 g_274 g_599 g_69 g_1017 g_601 g_762 g_763 + * writes: g_43 g_69.f0 g_84 g_85 g_69.f1 g_94 g_109 g_112 g_131 g_151 g_214 g_274 g_348 g_352 g_355 g_356 g_345 g_401 g_253 g_76 g_349.f5 g_494 g_517 g_599 g_69.f3 g_153 + */ +static uint32_t func_26(uint8_t p_27, uint8_t p_28, struct S1 * p_29, struct S1 * p_30, const struct S1 * p_31) +{ /* block id: 4 */ + struct S1 l_46[5] = {{0UL,0xDF2DL},{0UL,0xDF2DL},{0UL,0xDF2DL},{0UL,0xDF2DL},{0UL,0xDF2DL}}; + struct S5 **l_74 = (void*)0; + struct S1 *l_226 = &l_46[1]; + struct S2 l_656 = {1,4806,1292,0,44121,0x66CCED79L,1233,93,31}; + struct S0 l_659[3][5] = {{{51,2,31,109},{29,0,5,118},{-168,3,28,54},{-168,3,28,54},{29,0,5,118}},{{-179,5,22,23},{85,9,13,127},{-168,3,28,54},{126,4,25,11},{126,4,25,11}},{{85,9,13,127},{-179,5,22,23},{85,9,13,127},{-168,3,28,54},{126,4,25,11}}}; + int32_t *l_660 = (void*)0; + int32_t **l_661 = (void*)0; + int32_t **l_662 = &l_660; + struct S4 l_726 = {{23764,4,181,9,6,19678,94,29,2,2307},-943}; + uint32_t * const *l_784[2]; + uint32_t * const **l_783[10]; + uint32_t l_805 = 4294967295UL; + uint8_t *l_819[3]; + int32_t l_904 = 0x227435A8L; + int32_t l_905 = 0x908C76C9L; + int32_t l_907 = 0L; + int32_t l_908[5][10][2] = {{{4L,0xDBBACBE8L},{0x1EB7CE3BL,6L},{6L,(-1L)},{0x373DBA5FL,0xDBBACBE8L},{9L,0xE060BC82L},{0xB21D5BCAL,0x1EB7CE3BL},{0xA2DA418AL,0xB21D5BCAL},{0L,0x5DAABF8FL},{0xF99A1A17L,(-1L)},{0xA2DA418AL,0x373DBA5FL}},{{(-1L),0xE060BC82L},{4L,1L},{0x373DBA5FL,6L},{(-1L),6L},{0x373DBA5FL,1L},{4L,0xE060BC82L},{(-1L),0x373DBA5FL},{0xA2DA418AL,(-1L)},{0xF99A1A17L,0x5DAABF8FL},{0L,0xB21D5BCAL}},{{0xA2DA418AL,0x1EB7CE3BL},{0xB21D5BCAL,0xE060BC82L},{9L,0xDBBACBE8L},{0x373DBA5FL,(-1L)},{6L,6L},{0x1EB7CE3BL,0xDBBACBE8L},{4L,3L},{0xB21D5BCAL,0x373DBA5FL},{0L,0xB21D5BCAL},{0xF99A1A17L,0xF88AD893L}},{{0xF99A1A17L,0xB21D5BCAL},{0L,0x373DBA5FL},{0xB21D5BCAL,3L},{4L,0xDBBACBE8L},{0x1EB7CE3BL,6L},{6L,(-1L)},{0x373DBA5FL,0xDBBACBE8L},{9L,0xE060BC82L},{0xB21D5BCAL,0x1EB7CE3BL},{0xA2DA418AL,0xB21D5BCAL}},{{0L,0x5DAABF8FL},{0xF99A1A17L,(-1L)},{0xA2DA418AL,0x373DBA5FL},{(-1L),0xE060BC82L},{4L,1L},{0x373DBA5FL,6L},{(-1L),6L},{0x373DBA5FL,1L},{4L,0xE060BC82L},{(-1L),0x373DBA5FL}}}; + int32_t l_919 = 0x8475D920L; + uint8_t l_945 = 0x96L; + struct S3 *l_962 = (void*)0; + const int32_t *l_995 = &l_905; + struct S0 **l_1045 = &g_750; + uint32_t l_1063 = 0xC92B0175L; + int32_t *l_1068 = &g_214; + int i, j, k; + for (i = 0; i < 2; i++) + l_784[i] = &g_346[0][2][2]; + for (i = 0; i < 10; i++) + l_783[i] = &l_784[1]; + for (i = 0; i < 3; i++) + l_819[i] = &g_745; + for (p_28 = 0; (p_28 < 43); p_28 = safe_add_func_int32_t_s_s(p_28, 4)) + { /* block id: 7 */ + uint16_t *l_81 = (void*)0; + struct S1 *l_82[6][2][3] = {{{&l_46[3],&g_43[4][7][2],&l_46[3]},{(void*)0,&g_43[4][7][2],&l_46[1]}},{{&g_43[0][8][0],&g_43[4][7][2],&g_43[4][7][2]},{&l_46[3],&g_43[4][7][2],&l_46[3]}},{{(void*)0,&g_43[4][7][2],&l_46[1]},{&g_43[0][8][0],&g_43[4][7][2],&g_43[4][7][2]}},{{&l_46[3],&g_43[4][7][2],&l_46[3]},{(void*)0,&g_43[3][2][2],&l_46[1]}},{{&g_43[4][7][2],&g_43[3][2][2],&g_43[3][2][2]},{&l_46[1],&g_43[3][2][2],(void*)0}},{{&l_46[3],&g_43[3][2][2],&l_46[1]},{&g_43[4][7][2],&g_43[3][2][2],&g_43[3][2][2]}}}; + const int32_t l_655 = 0L; + struct S0 *l_658[6] = {(void*)0,(void*)0,(void*)0,(void*)0,(void*)0,(void*)0}; + int i, j, k; + (*g_42) = l_46[1]; + g_153 = (l_659[2][4] = func_47(func_52(func_58(l_46[1].f1, g_43[6][6][2].f0, func_64(p_29, &g_43[0][2][1], p_30), (g_69.f0 = (safe_add_func_int16_t_s_s((l_74 != g_75), (safe_mul_func_uint8_t_u_u((safe_add_func_uint16_t_u_u((p_27 != p_27), 0xC976L)), 0xA7L))))), l_82[4][0][2]), p_30, &g_43[6][6][2], l_226, (*g_42)), g_42, l_655, l_656)); + } + (*l_662) = l_660; + for (g_349.f5 = 0; (g_349.f5 > (-23)); g_349.f5 = safe_sub_func_uint8_t_u_u(g_349.f5, 8)) + { /* block id: 352 */ + int32_t l_688 = 0x3816D0D3L; + int32_t l_713 = 0L; + int32_t l_716[9][8][3] = {{{0x3BCCE3A3L,0xFE70B519L,1L},{0x3CD82101L,0L,(-1L)},{0x7C325AC9L,(-7L),(-8L)},{0xC7B04A55L,0x4A0176CCL,1L},{0xFE70B519L,0x0DD4E228L,0x0DD4E228L},{0x5542C803L,0xF31E4DAEL,0xBF445B9AL},{0x0F15FBADL,(-9L),0xCE133DEBL},{(-1L),(-1L),0x3BBD2679L}},{{0xBF445B9AL,0x6C83F1EEL,(-8L)},{0x6CAF9D30L,(-1L),0x04ADB9DFL},{1L,(-9L),0xD0FFF10AL},{8L,0xF31E4DAEL,0L},{0L,0x0DD4E228L,9L},{0x9B75BFF6L,0x4A0176CCL,0xD9072743L},{(-10L),(-7L),(-1L)},{0xF742CD06L,0L,0x5542C803L}},{{0x6A7C68C7L,0xFE70B519L,2L},{0L,0xBF445B9AL,0xF742CD06L},{1L,0L,0xC7B04A55L},{0x20F5AD6DL,0x7C325AC9L,8L},{0x3BBD2679L,0xF8CFA606L,(-8L)},{0x46A37A33L,0x827C1ED6L,0L},{0xBD005C73L,0xB6E969FCL,0xE3047B84L},{0x5DD129CFL,(-5L),1L}},{{0xCE133DEBL,0x9DB6C7FFL,0xE3277720L},{0L,1L,0xB6E969FCL},{2L,0x3BBD2679L,0xB6E969FCL},{0xF8CFA606L,0x04ADB9DFL,0xE3277720L},{(-9L),0x3BCCE3A3L,1L},{0xF00157DCL,1L,0xE3047B84L},{1L,0xEDBC2C95L,0L},{8L,0xE3047B84L,(-8L)}},{{(-8L),0xCE133DEBL,8L},{(-6L),0L,0xC7B04A55L},{0x827C1ED6L,0L,0xF742CD06L},{0L,0x8430A39AL,2L},{0x1D9E6B75L,0x745CECD1L,0x5542C803L},{(-5L),0x5542C803L,(-1L)},{(-1L),0x57658509L,0xD9072743L},{0x24009C27L,(-1L),9L}},{{0L,1L,0L},{1L,0xD7884624L,0xD0FFF10AL},{0xB3DD4A61L,1L,0x04ADB9DFL},{0xBAF9344DL,1L,(-8L)},{4L,(-8L),0x3BBD2679L},{0xBAF9344DL,0L,0xCE133DEBL},{0xB3DD4A61L,(-7L),0xBF445B9AL},{1L,0L,0x0DD4E228L}},{{0L,(-1L),1L},{0x24009C27L,0xF730B445L,(-8L)},{(-1L),0x20F5AD6DL,(-1L)},{(-5L),0x9B8547DBL,1L},{0x1D9E6B75L,0x6CAF9D30L,0x9DB6C7FFL},{0L,0x3CD82101L,0xB6095228L},{0x827C1ED6L,(-6L),0x4F266C63L},{(-6L),4L,1L}},{{(-8L),9L,0xEDBC2C95L},{0x6A7C68C7L,0L,0xE3277720L},{8L,(-8L),1L},{(-7L),(-10L),(-1L)},{(-10L),0L,1L},{0x6CAF9D30L,0x6C83F1EEL,0xC7B04A55L},{0x4F266C63L,0x6C83F1EEL,0x3BBD2679L},{0x5DD129CFL,0L,0xC92C255AL}},{{0x7C325AC9L,(-10L),0x3E2BF1D1L},{0L,(-8L),(-1L)},{(-1L),0L,1L},{(-7L),0x9B8547DBL,2L},{(-6L),0x9DB6C7FFL,0L},{0x4A0176CCL,0xEDBC2C95L,0xB5E31D23L},{0xF730B445L,2L,0xF31E4DAEL},{0x1B78B7DEL,0L,0x3CD82101L}}}; + int32_t *l_731[10] = {&g_84,&g_84,&g_84,&g_84,&g_84,&g_84,&g_84,&g_84,&g_84,&g_84}; + int32_t l_748 = 0xB46690BEL; + const struct S0 l_787 = {-75,4,1,63}; + struct S1 *l_812[4]; + const uint32_t *l_817 = &g_494[1]; + const uint32_t **l_816[10]; + struct S4 l_821 = {{22752,2,1164,1,7,29048,25,-24,82,6268},-1323}; + int8_t l_834 = 0xB9L; + int16_t *l_849 = &g_274; + int16_t **l_848 = &l_849; + int16_t *** const l_847[9] = {&l_848,&l_848,&l_848,&l_848,&l_848,&l_848,&l_848,&l_848,&l_848}; + struct S4 *l_902 = &g_903; + struct S5 l_938[6] = {{1UL,2UL,{-12957,3,1222,8,1,6685,24,-39,-99,7802},1L},{0x099DL,0x20E4L,{-1296,3,899,-1,9,6177,108,3,14,1101},-1L},{1UL,2UL,{-12957,3,1222,8,1,6685,24,-39,-99,7802},1L},{1UL,2UL,{-12957,3,1222,8,1,6685,24,-39,-99,7802},1L},{0x099DL,0x20E4L,{-1296,3,899,-1,9,6177,108,3,14,1101},-1L},{1UL,2UL,{-12957,3,1222,8,1,6685,24,-39,-99,7802},1L}}; + int32_t l_1023 = 0x8D8FD03DL; + uint32_t l_1058 = 0x051FCD20L; + uint32_t ***l_1060 = &g_345; + uint32_t ****l_1059 = &l_1060; + uint16_t *l_1066 = &l_46[1].f0; + uint16_t *l_1067 = &g_43[6][6][2].f0; + int i, j, k; + for (i = 0; i < 4; i++) + l_812[i] = &g_43[5][3][2]; + for (i = 0; i < 10; i++) + l_816[i] = &l_817; + for (g_94 = 0; (g_94 > 18); ++g_94) + { /* block id: 355 */ + uint16_t l_669 = 8UL; + for (g_69.f1 = 0; (g_69.f1 < 46); g_69.f1 = safe_add_func_int8_t_s_s(g_69.f1, 2)) + { /* block id: 358 */ + uint32_t l_670 = 0xA45EC3F1L; + for (g_253 = 0; (g_253 <= 2); g_253 += 1) + { /* block id: 361 */ + int i, j, k; + l_669 = p_27; + (*l_662) = (g_151[(g_253 + 3)] = g_346[(g_253 + 7)][g_253][g_253]); + return p_27; + } + ++l_670; + } + } + if (p_27) + break; + for (p_27 = (-2); (p_27 <= 11); ++p_27) + { /* block id: 373 */ + struct S1 l_677 = {4UL,1UL}; + uint16_t *l_678 = &l_46[1].f0; + uint16_t *l_679 = &l_46[1].f1; + int32_t l_686 = 3L; + int32_t l_687 = 0x1F991E30L; + int32_t l_712 = (-3L); + int32_t l_715 = (-7L); + int32_t l_717 = 1L; + int32_t l_718 = 0L; + int32_t l_719 = 5L; + int32_t l_720 = 0L; + int32_t l_722 = (-1L); + uint32_t l_723 = 18446744073709551607UL; + struct S4 l_794[9] = {{{-24595,-1,930,-9,8,18801,42,8,-108,1131},820},{{-22623,-3,856,14,10,3217,36,-26,-92,2350},-7770},{{-24595,-1,930,-9,8,18801,42,8,-108,1131},820},{{-22623,-3,856,14,10,3217,36,-26,-92,2350},-7770},{{-24595,-1,930,-9,8,18801,42,8,-108,1131},820},{{-22623,-3,856,14,10,3217,36,-26,-92,2350},-7770},{{-24595,-1,930,-9,8,18801,42,8,-108,1131},820},{{-22623,-3,856,14,10,3217,36,-26,-92,2350},-7770},{{-24595,-1,930,-9,8,18801,42,8,-108,1131},820}}; + struct S0 l_815[4][10] = {{{-124,2,22,31},{-88,15,5,17},{-27,11,7,35},{57,6,26,49},{57,6,26,49},{-27,11,7,35},{-88,15,5,17},{-124,2,22,31},{-124,2,22,31},{-88,15,5,17}},{{-124,2,22,31},{57,6,26,49},{-88,15,5,17},{-88,15,5,17},{57,6,26,49},{-124,2,22,31},{-27,11,7,35},{-27,11,7,35},{-124,2,22,31},{57,6,26,49}},{{57,6,26,49},{-88,15,5,17},{-88,15,5,17},{57,6,26,49},{-124,2,22,31},{-27,11,7,35},{-27,11,7,35},{-124,2,22,31},{57,6,26,49},{-88,15,5,17}},{{57,6,26,49},{57,6,26,49},{-27,11,7,35},{-88,15,5,17},{-124,2,22,31},{-124,2,22,31},{-88,15,5,17},{-27,11,7,35},{57,6,26,49},{57,6,26,49}}}; + const struct S0 *l_857 = &l_815[2][5]; + int32_t l_906 = 0x6DAA9DF0L; + int32_t l_914 = 0xEF2044C3L; + int32_t l_915 = (-1L); + int32_t l_916 = 0xB33D429DL; + int32_t l_920 = 0xCD43F33BL; + int32_t l_921[6][5][7] = {{{(-1L),0x91634774L,0x68746CC2L,5L,5L,0x68746CC2L,0x91634774L},{0x171B7552L,0L,(-1L),0xCDAAB82EL,0x171B7552L,0xCDAAB82EL,(-1L)},{5L,9L,0x68746CC2L,0x64AF7050L,(-1L),(-1L),0x64AF7050L},{0x88DB7A49L,0xD9E1FA8EL,0x88DB7A49L,0xCDAAB82EL,0x45C4CF09L,0xD9E1FA8EL,0x45C4CF09L},{9L,0x64AF7050L,0x91634774L,5L,(-1L),0x28F9752DL,0x28F9752DL}},{{0x171B7552L,(-7L),0x4C84DF75L,(-7L),0x171B7552L,0xD9E1FA8EL,0x4C84DF75L},{1L,9L,0x64AF7050L,0x91634774L,5L,(-1L),0x28F9752DL},{0x45C4CF09L,0xCDAAB82EL,0x88DB7A49L,0xD9E1FA8EL,0x88DB7A49L,0xCDAAB82EL,0x45C4CF09L},{1L,0x91634774L,0x28F9752DL,5L,9L,0x68746CC2L,0x64AF7050L},{0x171B7552L,0xCDAAB82EL,(-1L),0L,0x171B7552L,0L,(-1L)}},{{9L,9L,0x28F9752DL,0x64AF7050L,1L,(-1L),0x91634774L},{0x88DB7A49L,(-7L),0x88DB7A49L,0L,0x45C4CF09L,(-7L),0x45C4CF09L},{5L,0x64AF7050L,0x64AF7050L,5L,1L,0x28F9752DL,0x68746CC2L},{0x171B7552L,0xD9E1FA8EL,0x4C84DF75L,0xD9E1FA8EL,0x171B7552L,(-7L),0x4C84DF75L},{(-1L),9L,0x91634774L,0x91634774L,9L,(-1L),0x68746CC2L}},{{0x45C4CF09L,0L,0x88DB7A49L,(-7L),0x88DB7A49L,0L,0x45C4CF09L},{(-1L),0x91634774L,0x68746CC2L,5L,5L,0x68746CC2L,0x91634774L},{0x171B7552L,0L,(-1L),0xCDAAB82EL,0x171B7552L,0xCDAAB82EL,(-1L)},{5L,9L,0x68746CC2L,0x64AF7050L,(-1L),(-1L),0x64AF7050L},{0x88DB7A49L,0xD9E1FA8EL,0x88DB7A49L,0xCDAAB82EL,0x45C4CF09L,0xD9E1FA8EL,0x45C4CF09L}},{{9L,0x64AF7050L,0x91634774L,5L,(-1L),0x28F9752DL,0x28F9752DL},{0x171B7552L,(-7L),0x4C84DF75L,(-7L),0x171B7552L,0xD9E1FA8EL,0x4C84DF75L},{1L,9L,0x64AF7050L,0x91634774L,5L,(-1L),0x28F9752DL},{0x45C4CF09L,0xCDAAB82EL,0x88DB7A49L,0xD9E1FA8EL,0x88DB7A49L,0xCDAAB82EL,0x45C4CF09L},{1L,0x91634774L,0x28F9752DL,5L,9L,0x68746CC2L,0x64AF7050L}},{{0x171B7552L,0xCDAAB82EL,(-1L),0L,0x171B7552L,0L,(-1L)},{9L,9L,0x28F9752DL,0x64AF7050L,1L,(-1L),0x91634774L},{0x88DB7A49L,(-7L),0x88DB7A49L,0L,0x45C4CF09L,(-7L),0x45C4CF09L},{5L,0x64AF7050L,0x64AF7050L,5L,1L,0x28F9752DL,0x68746CC2L},{0x171B7552L,0xD9E1FA8EL,0x4C84DF75L,0xD9E1FA8EL,0x171B7552L,(-7L),0x4C84DF75L}}}; + int8_t l_937 = 1L; + int32_t l_946 = 0xF1A2D0D4L; + struct S1 l_975 = {0x427BL,65527UL}; + const struct S3 l_984 = {-14746,-2,662,-4,10,30454,114,16,-56,7335}; + uint32_t l_994 = 7UL; + const int32_t *l_1029 = &l_946; + int i, j, k; + } + l_908[1][1][1] ^= (+(safe_div_func_uint32_t_u_u(((g_1017 , ((*l_1067) = (((safe_lshift_func_uint16_t_u_u((safe_lshift_func_uint8_t_u_u((g_94 |= (safe_add_func_int32_t_s_s(p_28, (safe_mod_func_uint8_t_u_u((l_1058 = g_182.f8), ((((*l_1059) = &g_345) != &g_345) && ((-10L) <= (((safe_mod_func_uint16_t_u_u(((*l_1066) = (l_1063 != (safe_mod_func_uint16_t_u_u(((*g_252) >= p_27), g_138.f0.f4)))), g_109)) != (*g_252)) <= 6L)))))))), p_27)), g_601[0][2])) | 0UL) <= (*l_995)))) | (*l_995)), p_27))); + } + (*l_1068) &= ((p_28 < (1L & (*g_762))) , p_28); + return p_27; +} + + +/* ------------------------------------------ */ +/* + * reads : + * writes: + */ +static struct S0 func_47(struct S0 p_48, struct S1 * p_49, const uint16_t p_50, struct S2 p_51) +{ /* block id: 343 */ + struct S3 *l_657 = &g_138.f0; + l_657 = l_657; + return p_48; +} + + +/* ------------------------------------------ */ +/* + * reads : g_94 g_113.f8 g_214 g_113.f3 g_252 g_253 g_69.f0 g_109 g_182.f9 g_113.f0 g_69.f3 g_153 g_345 g_113.f6 g_69.f2.f3 g_138.f0.f2 g_348 g_69.f1 g_84 g_182.f0 g_75 g_113.f5 g_349.f0 g_111.f4 g_42 g_43 g_346 g_357.f9 g_349.f5 g_111.f6 g_111.f7 g_111.f5 g_138 g_349 g_113.f9 g_69.f2.f4 g_85 g_494 g_517 g_518 g_182.f8 g_274 g_131 g_599 g_69 + * writes: g_214 g_94 g_69.f0 g_109 g_43.f1 g_274 g_348 g_112 g_352 g_355 g_356 g_84 g_151 g_345 g_401 g_253 g_76 g_349.f5 g_43 g_494 g_517 g_85 g_131 g_599 g_69.f3 + */ +static struct S0 func_52(struct S0 p_53, struct S1 * p_54, struct S1 * p_55, struct S1 * p_56, struct S1 p_57) +{ /* block id: 101 */ + uint8_t l_227 = 3UL; + int32_t *l_228 = &g_214; + const struct S3 l_229 = {-12834,3,624,-6,8,31570,34,35,4,446}; + struct S1 l_234 = {0x7CBEL,65531UL}; + int8_t *l_255 = &g_253; + int32_t l_280 = 0xE149A9F4L; + int32_t l_281 = 3L; + int32_t l_318 = (-2L); + int32_t l_320 = 0xFA7069FDL; + int32_t l_322[1][1]; + int32_t l_383[6] = {1L,1L,1L,1L,1L,1L}; + struct S5 *l_427 = &g_69; + int16_t **l_492 = (void*)0; + uint16_t l_548 = 1UL; + int8_t l_581 = 0x33L; + int16_t ***l_597 = &l_492; + uint32_t l_646 = 0UL; + int i, j; + for (i = 0; i < 1; i++) + { + for (j = 0; j < 1; j++) + l_322[i][j] = 0L; + } + if ((((*l_228) = l_227) <= ((l_229 , (&p_57 != (void*)0)) == p_53.f2))) + { /* block id: 103 */ + for (g_94 = 8; (g_94 > 31); g_94 = safe_add_func_uint16_t_u_u(g_94, 2)) + { /* block id: 106 */ + if (p_57.f1) + break; + } + } + else + { /* block id: 109 */ + int16_t *l_247 = &g_109; + int16_t * const l_249 = (void*)0; + int32_t l_250 = (-1L); + int32_t l_272 = 0L; + int32_t l_275 = 0L; + int32_t l_329 = 0x121242E4L; + struct S0 l_363 = {175,9,31,37}; + int32_t l_374 = 0x9A027F3BL; + uint32_t l_391 = 0xCD74C835L; + uint32_t ***l_400 = &g_345; + uint32_t *l_409 = (void*)0; + int32_t *l_410 = &l_280; + const uint16_t l_411 = 0x43A9L; + int32_t *l_412 = &l_250; + struct S5 l_415[5][8] = {{{1UL,0x3AC6L,{-12171,2,112,-9,2,32314,79,-30,68,750},-6L},{65534UL,65532UL,{5369,2,486,12,0,13875,95,41,123,1543},0xC4F27E92L},{65534UL,65532UL,{5369,2,486,12,0,13875,95,41,123,1543},0xC4F27E92L},{1UL,0x3AC6L,{-12171,2,112,-9,2,32314,79,-30,68,750},-6L},{1UL,0x3AC6L,{-12171,2,112,-9,2,32314,79,-30,68,750},-6L},{65534UL,65532UL,{5369,2,486,12,0,13875,95,41,123,1543},0xC4F27E92L},{65534UL,65532UL,{5369,2,486,12,0,13875,95,41,123,1543},0xC4F27E92L},{1UL,0x3AC6L,{-12171,2,112,-9,2,32314,79,-30,68,750},-6L}},{{1UL,0x3AC6L,{-12171,2,112,-9,2,32314,79,-30,68,750},-6L},{65534UL,65532UL,{5369,2,486,12,0,13875,95,41,123,1543},0xC4F27E92L},{65534UL,65532UL,{5369,2,486,12,0,13875,95,41,123,1543},0xC4F27E92L},{1UL,0x3AC6L,{-12171,2,112,-9,2,32314,79,-30,68,750},-6L},{1UL,0x3AC6L,{-12171,2,112,-9,2,32314,79,-30,68,750},-6L},{65534UL,65532UL,{5369,2,486,12,0,13875,95,41,123,1543},0xC4F27E92L},{65534UL,65532UL,{5369,2,486,12,0,13875,95,41,123,1543},0xC4F27E92L},{1UL,0x3AC6L,{-12171,2,112,-9,2,32314,79,-30,68,750},-6L}},{{1UL,0x3AC6L,{-12171,2,112,-9,2,32314,79,-30,68,750},-6L},{65534UL,65532UL,{5369,2,486,12,0,13875,95,41,123,1543},0xC4F27E92L},{65534UL,65532UL,{5369,2,486,12,0,13875,95,41,123,1543},0xC4F27E92L},{1UL,0x3AC6L,{-12171,2,112,-9,2,32314,79,-30,68,750},-6L},{1UL,0x3AC6L,{-12171,2,112,-9,2,32314,79,-30,68,750},-6L},{65534UL,65532UL,{5369,2,486,12,0,13875,95,41,123,1543},0xC4F27E92L},{65534UL,65532UL,{5369,2,486,12,0,13875,95,41,123,1543},0xC4F27E92L},{1UL,0x3AC6L,{-12171,2,112,-9,2,32314,79,-30,68,750},-6L}},{{1UL,0x3AC6L,{-12171,2,112,-9,2,32314,79,-30,68,750},-6L},{65534UL,65532UL,{5369,2,486,12,0,13875,95,41,123,1543},0xC4F27E92L},{65534UL,65532UL,{5369,2,486,12,0,13875,95,41,123,1543},0xC4F27E92L},{1UL,0x3AC6L,{-12171,2,112,-9,2,32314,79,-30,68,750},-6L},{1UL,0x3AC6L,{-12171,2,112,-9,2,32314,79,-30,68,750},-6L},{65534UL,65532UL,{5369,2,486,12,0,13875,95,41,123,1543},0xC4F27E92L},{65534UL,65532UL,{5369,2,486,12,0,13875,95,41,123,1543},0xC4F27E92L},{1UL,0x3AC6L,{-12171,2,112,-9,2,32314,79,-30,68,750},-6L}},{{1UL,0x3AC6L,{-12171,2,112,-9,2,32314,79,-30,68,750},-6L},{65534UL,65532UL,{5369,2,486,12,0,13875,95,41,123,1543},0xC4F27E92L},{65534UL,65532UL,{5369,2,486,12,0,13875,95,41,123,1543},0xC4F27E92L},{1UL,0x3AC6L,{-12171,2,112,-9,2,32314,79,-30,68,750},-6L},{1UL,0x3AC6L,{-12171,2,112,-9,2,32314,79,-30,68,750},-6L},{65534UL,65532UL,{5369,2,486,12,0,13875,95,41,123,1543},0xC4F27E92L},{65534UL,65532UL,{5369,2,486,12,0,13875,95,41,123,1543},0xC4F27E92L},{1UL,0x3AC6L,{-12171,2,112,-9,2,32314,79,-30,68,750},-6L}}}; + uint32_t l_544 = 4294967293UL; + uint32_t l_582 = 0xA0A9C2C1L; + int32_t l_621[4] = {0xC353EE67L,0xC353EE67L,0xC353EE67L,0xC353EE67L}; + int16_t ***l_630 = &l_492; + struct S3 l_639 = {-32711,-2,123,13,10,14313,101,-44,-66,6352}; + struct S1 *l_645 = &l_234; + int i, j; + for (l_227 = (-14); (l_227 <= 46); l_227++) + { /* block id: 112 */ + struct S0 *l_236 = &g_153; + struct S0 **l_235 = &l_236; + struct S0 **l_237 = (void*)0; + struct S0 *l_239[4][5] = {{&g_153,(void*)0,&g_153,&g_153,&g_153},{(void*)0,&g_153,(void*)0,&g_153,&g_153},{&g_153,(void*)0,&g_153,&g_153,&g_153},{(void*)0,&g_153,(void*)0,&g_153,&g_153}}; + struct S0 **l_238 = &l_239[2][1]; + int32_t l_244 = 3L; + int16_t **l_248 = &l_247; + int32_t l_305 = 0xFBD691C8L; + int32_t l_323 = (-5L); + int32_t l_326[3][3][10] = {{{0x1F4B9C93L,8L,8L,0x1F4B9C93L,0x349389C5L,5L,0x73619E2BL,(-1L),(-1L),1L},{0xFDE84D4DL,(-1L),(-1L),0x73619E2BL,8L,0x7A2AB3D7L,8L,0x73619E2BL,(-1L),(-1L)},{(-1L),1L,(-1L),0x1F4B9C93L,0x71D502BBL,0xDEF5D37AL,5L,(-1L),0x349389C5L,0x349389C5L}},{{1L,1L,0xDEF5D37AL,0x7A2AB3D7L,0x7A2AB3D7L,0xDEF5D37AL,1L,1L,0x1F4B9C93L,5L},{(-1L),(-1L),0x73619E2BL,1L,0L,0x7A2AB3D7L,(-1L),5L,(-1L),0x7A2AB3D7L},{0xFDE84D4DL,0L,0x73619E2BL,0L,0xFDE84D4DL,5L,0x1F4B9C93L,1L,1L,0xDEF5D37AL}},{{0x1F4B9C93L,0x71D502BBL,0xDEF5D37AL,5L,(-1L),0x349389C5L,0x349389C5L,(-1L),5L,0xDEF5D37AL},{5L,5L,(-1L),0xDEF5D37AL,0xFDE84D4DL,(-1L),(-1L),0x73619E2BL,8L,0x7A2AB3D7L},{0x73619E2BL,(-1L),(-1L),1L,0L,1L,(-1L),(-1L),0x73619E2BL,5L}}}; + int32_t *l_373 = &l_329; + int32_t *l_378 = &l_323; + int32_t *l_379 = &l_275; + int32_t *l_380 = &l_280; + int32_t *l_381[8] = {(void*)0,(void*)0,(void*)0,(void*)0,(void*)0,(void*)0,(void*)0,(void*)0}; + int32_t l_382 = 0x5FE0C3B8L; + uint16_t l_384 = 1UL; + uint8_t l_388[10][1][2] = {{{0x82L,0xB0L}},{{0xB0L,0x5FL}},{{0xB0L,0x5FL}},{{0xB0L,0xB0L}},{{0x82L,0x82L}},{{0x82L,0xB0L}},{{0xB0L,0x5FL}},{{0xB0L,0x5FL}},{{0xB0L,0xB0L}},{{0x82L,0x82L}}}; + int i, j, k; + if ((((p_53.f0 == (func_17(l_234, (((*l_238) = ((*l_235) = &p_53)) != &p_53)) , g_113.f8)) < (safe_rshift_func_uint16_t_u_s((((((safe_add_func_uint8_t_u_u(l_244, ((safe_mul_func_int8_t_s_s((250UL != (+((((*l_248) = l_247) != l_249) ^ p_53.f2))), (*l_228))) || p_53.f2))) , (*l_228)) , 0xC7L) || l_250) | p_53.f3), g_113.f3))) == l_250)) + { /* block id: 116 */ + int32_t l_251 = 0xAE49ED9AL; + int8_t *l_254 = &g_253; + for (g_69.f0 = 0; (g_69.f0 <= 8); g_69.f0 += 1) + { /* block id: 119 */ + uint16_t *l_262 = (void*)0; + uint16_t *l_263 = &l_234.f0; + int16_t *l_273[5]; + int i; + for (i = 0; i < 5; i++) + l_273[i] = &g_274; + if (l_251) + break; + (*l_228) |= ((0x2AL | (g_252 == (l_255 = l_254))) , (p_53 , (safe_add_func_uint16_t_u_u((safe_div_func_int16_t_s_s((l_275 ^= (p_53 , ((safe_div_func_int32_t_s_s((((*l_263) = 0x18A4L) | ((((g_109 = (l_272 &= (safe_mul_func_uint16_t_u_u(((safe_sub_func_uint8_t_u_u(((-1L) || (!((safe_mul_func_uint8_t_u_u((safe_mod_func_int16_t_s_s((-7L), (5UL && 251UL))), l_250)) ^ l_244))), 7UL)) || l_251), 0L)))) != 0UL) , (void*)0) != &l_229)), p_57.f1)) > (*g_252)))), p_57.f1)), 0x5575L)))); + if (l_251) + break; + p_53.f0 = ((safe_rshift_func_int8_t_s_s((*g_252), p_53.f2)) , (0UL || (*l_228))); + } + } + else + { /* block id: 130 */ + int32_t *l_278 = &l_250; + int32_t *l_279[8][4] = {{&l_244,(void*)0,(void*)0,(void*)0},{(void*)0,&l_272,&l_275,&l_244},{(void*)0,&l_250,&l_250,(void*)0},{(void*)0,(void*)0,&l_275,&g_214},{(void*)0,(void*)0,(void*)0,&l_244},{&l_244,&l_250,&l_244,&l_244},{(void*)0,(void*)0,(void*)0,&g_214},{&l_275,(void*)0,(void*)0,(void*)0}}; + uint8_t l_282 = 253UL; + uint16_t *l_289[6] = {&g_43[6][6][2].f0,&g_43[6][6][2].f0,&g_43[6][6][2].f0,&g_43[6][6][2].f0,&g_43[6][6][2].f0,&g_43[6][6][2].f0}; + struct S0 *l_300[7] = {&g_153,&g_153,&g_153,&g_153,&g_153,&g_153,&g_153}; + uint8_t *l_303 = &g_94; + uint32_t l_304 = 0x5DECD937L; + int32_t l_328 = 0L; + uint32_t **l_333 = (void*)0; + struct S5 l_358 = {65526UL,65535UL,{-17020,-3,129,6,9,5641,116,6,16,3716},0x87A08BDBL}; + int i, j; + ++l_282; + if ((((((safe_mul_func_int16_t_s_s((l_244 = (safe_add_func_int8_t_s_s(((((--g_69.f0) || l_244) & (g_43[6][6][2].f1 = p_53.f2)) ^ ((**l_248) |= (g_274 = p_57.f1))), (*g_252)))), (safe_div_func_int8_t_s_s((safe_rshift_func_uint8_t_u_u(g_182.f9, 0)), ((*l_303) = ((p_53.f1 && ((safe_lshift_func_uint8_t_u_s((safe_sub_func_uint32_t_u_u((l_300[0] == (*l_235)), ((*l_228) = ((safe_sub_func_int8_t_s_s(0x3CL, 1L)) | p_57.f1)))), 5)) <= l_250)) | g_113.f0)))))) | g_69.f3) || p_53.f0) , l_304) != l_305)) + { /* block id: 139 */ + struct S4 *l_308 = &g_138; + int32_t l_315 = 1L; + int32_t l_316 = 0xC4D5F313L; + int32_t l_317 = 0x579CAB94L; + int32_t l_325 = 0L; + int32_t l_327[4][3][8] = {{{0x030C2675L,3L,0xE8FD32BEL,0xFF4CD6DDL,(-1L),1L,1L,1L},{3L,(-10L),0x51BD3FEEL,1L,(-10L),0x8A8F9135L,0x3ADFECCFL,0xDE5CFD58L},{0x51BD3FEEL,(-1L),0x57BA0327L,1L,0xFDD9E36FL,3L,0x3D1CCB86L,1L}},{{0x3D1CCB86L,0x3ADFECCFL,0x57BA0327L,0xFF4CD6DDL,0xFF4CD6DDL,0x57BA0327L,0x3ADFECCFL,0x3D1CCB86L},{0xFDD9E36FL,0x5D09D952L,0x51BD3FEEL,0xDE5CFD58L,(-1L),(-1L),0xE8FD32BEL,0x57BA0327L},{0L,1L,(-1L),0x8A8F9135L,0xDE5CFD58L,(-1L),0xDE5CFD58L,0x8A8F9135L}},{{0x3ADFECCFL,0x5D09D952L,0x3ADFECCFL,0x51BD3FEEL,(-1L),0x57BA0327L,1L,0xFDD9E36FL},{0x8A8F9135L,0x3ADFECCFL,0xDE5CFD58L,0xE8FD32BEL,0L,3L,(-1L),(-1L)},{0x8A8F9135L,(-1L),0x3D1CCB86L,0x3D1CCB86L,(-1L),0x8A8F9135L,0x5D09D952L,(-10L)}},{{0x3ADFECCFL,1L,3L,0x5D09D952L,0xDE5CFD58L,0x030C2675L,0xFDD9E36FL,0xFF4CD6DDL},{0L,(-10L),0x030C2675L,0x5D09D952L,(-1L),0x5D09D952L,0x030C2675L,(-10L)},{0xFDD9E36FL,(-1L),0xE8FD32BEL,0x3D1CCB86L,0xFF4CD6DDL,0x51BD3FEEL,0L,(-1L)}}}; + int i, j, k; + for (p_57.f0 = (-21); (p_57.f0 < 48); ++p_57.f0) + { /* block id: 142 */ + struct S4 **l_309 = &l_308; + (*l_309) = l_308; + return g_153; + } + if (l_305) + break; + for (l_305 = (-25); (l_305 < 11); l_305 = safe_add_func_int16_t_s_s(l_305, 1)) + { /* block id: 149 */ + int8_t l_312 = 0xE5L; + int32_t l_313 = 1L; + int32_t l_314 = 0xB566A646L; + int32_t l_319 = 1L; + int32_t l_321 = 3L; + int32_t l_324[4]; + uint16_t l_330 = 0xFA7FL; + int i; + for (i = 0; i < 4; i++) + l_324[i] = 0x82E92E31L; + l_330--; + } + for (l_244 = 0; (l_244 <= 3); l_244 += 1) + { /* block id: 154 */ + uint32_t ***l_334 = &l_333; + int32_t l_347 = 0xF0677D09L; + struct S2 **l_350 = &g_348; + int i, j; + (*l_334) = l_333; + p_53.f0 = (247UL & (safe_lshift_func_uint16_t_u_u((safe_mod_func_uint16_t_u_u((safe_lshift_func_int16_t_s_s((safe_add_func_uint16_t_u_u((p_57.f1 = ((&l_239[l_244][(l_244 + 1)] == &l_239[l_244][l_244]) < (~(((((*l_228) && p_57.f0) ^ (safe_lshift_func_int16_t_s_s((+(*l_278)), (((((((((((l_315 > ((g_345 == (void*)0) , g_113.f6)) < g_69.f2.f3) >= p_53.f0) , l_326[1][0][2]) || 1UL) != (*g_252)) && (*g_252)) >= p_57.f0) >= 65532UL) , 0x41F066B9L) || p_57.f1)))) ^ l_347) < l_305)))), p_53.f2)), p_53.f3)), g_138.f0.f2)), 15))); + (*l_350) = g_348; + } + } + else + { /* block id: 160 */ + struct S3 **l_351 = &g_112; + struct S3 *l_354 = &g_138.f0; + struct S3 **l_353[1]; + int i; + for (i = 0; i < 1; i++) + l_353[i] = &l_354; + g_356 = (g_355 = (g_352 = ((*l_351) = (void*)0))); + if (l_329) + continue; + } + (*l_228) = (l_358 , ((*l_278) = p_53.f0)); + (*l_228) ^= (g_69.f1 <= (p_57.f1 || (*g_252))); + } + for (l_318 = 0; (l_318 <= (-8)); --l_318) + { /* block id: 173 */ + uint16_t l_367[3]; + int32_t *l_372 = &g_214; + int i; + for (i = 0; i < 3; i++) + l_367[i] = 65527UL; + for (l_234.f1 = (-8); (l_234.f1 >= 26); ++l_234.f1) + { /* block id: 176 */ + (*l_228) = (l_275 > (*g_252)); + return l_363; + } + l_244 = (*l_228); + for (l_234.f1 = 3; (l_234.f1 <= 8); l_234.f1 += 1) + { /* block id: 183 */ + uint16_t l_375 = 0x71EFL; + for (l_244 = 0; (l_244 <= 8); l_244 += 1) + { /* block id: 186 */ + return g_153; + } + for (g_84 = 8; (g_84 >= 0); g_84 -= 1) + { /* block id: 191 */ + int32_t *l_364 = &l_329; + int32_t *l_365 = (void*)0; + int32_t *l_366[1]; + int32_t **l_370 = &l_366[0]; + int32_t **l_371 = (void*)0; + int i; + for (i = 0; i < 1; i++) + l_366[i] = (void*)0; + l_367[1]++; + g_151[4] = (l_373 = (l_372 = ((*l_370) = &g_214))); + --l_375; + } + } + } + l_384++; + for (g_94 = 2; (g_94 <= 7); g_94 += 1) + { /* block id: 204 */ + int16_t l_387[1][8]; + int i, j; + for (i = 0; i < 1; i++) + { + for (j = 0; j < 8; j++) + l_387[i][j] = 1L; + } + l_388[6][0][1]--; + (*l_380) = l_387[0][0]; + } + } + if (((*l_412) = ((((p_53.f3 = ((*l_228) = (p_53.f1 = l_391))) || ((*l_410) ^= (safe_rshift_func_int16_t_s_u((((p_53.f3 <= (((safe_sub_func_uint8_t_u_u((safe_mul_func_int16_t_s_s((-2L), (safe_lshift_func_uint16_t_u_u((l_374 != 65530UL), 13)))), ((*l_255) = ((((*l_400) = &g_346[3][1][3]) != (g_401 = &g_346[0][2][2])) <= (l_272 ^= (safe_sub_func_uint8_t_u_u((((safe_sub_func_uint32_t_u_u((((safe_unary_minus_func_uint16_t_u(((safe_lshift_func_int16_t_s_u(((((*l_228) && ((*g_252) | 2UL)) , p_53.f1) != g_69.f0), 9)) > (-5L)))) >= p_53.f0) > (*l_228)), (*l_228))) >= (*l_228)) , (*l_228)), 1UL))))))) | 65528UL) | p_57.f1)) <= 1L) < g_182.f0), l_275)))) > l_411) , p_53.f3))) + { /* block id: 218 */ + uint8_t l_443[8] = {0x1DL,0x1DL,0x1DL,0x1DL,0x1DL,0x1DL,0x1DL,0x1DL}; + uint32_t *l_451 = &g_131; + int32_t l_504[3][5] = {{(-1L),(-1L),1L,1L,(-1L)},{(-1L),(-1L),1L,1L,(-1L)},{(-1L),(-1L),1L,1L,(-1L)}}; + struct S4 *l_574 = &g_518[1]; + int16_t ***l_595 = &l_492; + int16_t l_620 = (-6L); + uint8_t l_622 = 0x8BL; + uint32_t *l_636 = &g_494[2]; + uint16_t l_644 = 0x655EL; + int i, j; + if ((((safe_mul_func_uint8_t_u_u(p_53.f2, ((l_415[1][6] , ((*l_228) = (((safe_mod_func_uint8_t_u_u((safe_unary_minus_func_int8_t_s(p_53.f2)), 0xEFL)) >= ((safe_sub_func_uint8_t_u_u((safe_div_func_int16_t_s_s((safe_lshift_func_uint16_t_u_s((safe_add_func_uint32_t_u_u((7UL < (((*g_75) = l_427) == (void*)0)), ((safe_div_func_uint8_t_u_u(((safe_div_func_uint32_t_u_u((((safe_lshift_func_uint8_t_u_u((safe_mod_func_int32_t_s_s(p_53.f2, (g_113.f5 && 255UL))), g_94)) >= 0x48L) , 0x0A836DACL), p_53.f1)) | g_349.f0), (*l_228))) , 4L))), g_111.f4)), p_53.f1)), (*g_252))) || p_53.f1)) , 0xA8E3F1E3L))) ^ 0x4A00F90DL))) ^ 0x7BL) < 0x4F381AB7L)) + { /* block id: 221 */ + struct S1 l_450 = {0x958CL,0UL}; + int8_t l_468[8][4][2] = {{{0x38L,1L},{0x38L,0x38L},{1L,0x38L},{0x38L,1L}},{{0x38L,0x38L},{1L,0x38L},{0x38L,1L},{0x38L,0x38L}},{{1L,0x38L},{0x38L,1L},{0x38L,0x38L},{1L,0x38L}},{{0x38L,1L},{0x38L,0x38L},{1L,0x38L},{0x38L,1L}},{{0x38L,0x38L},{1L,0x38L},{0x38L,1L},{0x38L,0x38L}},{{1L,0x38L},{0x38L,1L},{0x38L,0x38L},{1L,0x38L}},{{0x38L,1L},{0x38L,0x38L},{1L,0x38L},{0x38L,1L}},{{0x38L,0x38L},{1L,0x38L},{0x38L,1L},{0x38L,0x38L}}}; + int32_t l_476 = (-1L); + int16_t ***l_493 = &l_492; + int32_t l_503 = (-3L); + struct S4 *l_520 = &g_521[4][0][0]; + const struct S3 l_529 = {2366,0,1008,2,10,12108,126,-23,-15,1054}; + int32_t *l_575 = &l_476; + int32_t *l_576 = &l_503; + int32_t *l_577 = &l_374; + int32_t *l_578 = &l_281; + int32_t *l_579 = &l_476; + int32_t *l_580[7]; + int i, j, k; + for (i = 0; i < 7; i++) + l_580[i] = &l_250; + if ((safe_unary_minus_func_int8_t_s((safe_div_func_int16_t_s_s((((safe_rshift_func_uint16_t_u_s((safe_div_func_int8_t_s_s(p_53.f3, l_443[6])), ((((*l_247) = ((*g_42) , (p_53.f3 && (*l_412)))) >= (safe_div_func_uint8_t_u_u(9UL, 1UL))) <= p_57.f0))) > (safe_sub_func_int32_t_s_s((safe_add_func_uint8_t_u_u((((l_451 = (func_17(l_450, l_450.f0) , (*g_345))) != (**l_400)) == (*l_410)), (*l_228))), (*l_228)))) < l_443[6]), g_357.f9))))) + { /* block id: 224 */ + int8_t l_457[7]; + int i; + for (i = 0; i < 7; i++) + l_457[i] = 0xE6L; + for (g_349.f5 = 15; (g_349.f5 == (-25)); --g_349.f5) + { /* block id: 227 */ + uint16_t l_460[9] = {0x13E5L,1UL,0x13E5L,0x13E5L,1UL,0x13E5L,0x13E5L,1UL,0x13E5L}; + uint16_t *l_463 = &l_450.f1; + int i; + (*l_412) |= ((p_53.f3 & ((*l_247) = 0xA57DL)) & (*l_228)); + if (p_53.f0) + break; + p_53.f0 = ((!((safe_unary_minus_func_uint32_t_u(((safe_mod_func_int32_t_s_s(((*l_410) = (-2L)), ((*l_228) &= p_53.f3))) ^ l_457[0]))) || (((g_153.f0 >= (+(safe_div_func_uint32_t_u_u(p_53.f2, (((l_460[8] , (safe_lshift_func_uint16_t_u_u(p_53.f2, 15))) ^ (((*l_463) = g_111.f6) , (((0x2BB8L < p_53.f2) ^ p_53.f0) > 4294967295UL))) , p_53.f0))))) && l_457[0]) <= 0x1EL))) == p_53.f3); + (*g_42) = (*p_54); + } + } + else + { /* block id: 237 */ + uint8_t l_477 = 0x96L; + for (l_450.f0 = 0; (l_450.f0 != 42); l_450.f0 = safe_add_func_int16_t_s_s(l_450.f0, 2)) + { /* block id: 240 */ + int32_t l_466[6] = {0x1655F412L,0x1655F412L,0x1655F412L,0x1655F412L,0x1655F412L,0x1655F412L}; + int32_t *l_467 = (void*)0; + int32_t *l_469 = (void*)0; + int32_t *l_470 = &l_466[5]; + int32_t *l_471 = &l_322[0][0]; + int32_t *l_472 = &l_320; + int32_t *l_473 = &l_272; + int32_t *l_474 = &l_374; + int32_t *l_475[8][1] = {{&l_320},{&l_281},{&l_281},{&l_322[0][0]},{&l_320},{&l_320},{&l_322[0][0]},{&l_320}}; + int i, j; + l_477--; + return g_153; + } + } + if (((*l_228) |= (((g_494[2] = (!((safe_rshift_func_int16_t_s_s(((*l_247) = ((void*)0 == &g_23)), 6)) == (safe_add_func_int32_t_s_s(((safe_rshift_func_int16_t_s_u((((p_53.f1 = (*l_412)) > (*l_410)) && (safe_add_func_uint8_t_u_u(((safe_rshift_func_int8_t_s_u((safe_rshift_func_int16_t_s_u((g_274 = (&g_76 != (((*g_252) , (((*l_493) = l_492) != (void*)0)) , &g_76))), p_53.f1)), g_111.f7)) | l_450.f0), p_57.f0))), g_111.f5)) , 1L), p_53.f0))))) > l_468[7][3][0]) || 1L))) + { /* block id: 251 */ + struct S3 *l_497[9][10][2] = {{{&g_111,&g_182},{&g_111,&g_113},{(void*)0,&g_113},{&g_111,&g_182},{&g_111,(void*)0},{&g_138.f0,&g_111},{&g_138.f0,(void*)0},{&g_111,&g_182},{&g_111,&g_113},{(void*)0,&g_113}},{{&g_111,&g_182},{&g_111,(void*)0},{&g_138.f0,&g_111},{&g_138.f0,(void*)0},{&g_111,&g_182},{&g_111,&g_113},{(void*)0,&g_113},{&g_111,&g_182},{&g_111,(void*)0},{&g_138.f0,&g_111}},{{&g_138.f0,(void*)0},{&g_111,&g_182},{&g_111,&g_113},{(void*)0,&g_113},{&g_111,&g_182},{&g_111,(void*)0},{&g_138.f0,&g_111},{&g_138.f0,(void*)0},{&g_111,&g_182},{&g_111,&g_113}},{{(void*)0,&g_113},{&g_111,&g_182},{&g_111,(void*)0},{&g_138.f0,&g_111},{&g_138.f0,(void*)0},{&g_111,&g_182},{&g_111,&g_113},{(void*)0,&g_113},{&g_111,&g_182},{&g_111,(void*)0}},{{&g_138.f0,&g_111},{&g_138.f0,(void*)0},{&g_111,&g_182},{&g_111,&g_113},{(void*)0,&g_113},{&g_111,&g_182},{&g_111,(void*)0},{&g_138.f0,&g_111},{&g_138.f0,(void*)0},{&g_111,&g_182}},{{&g_111,&g_113},{(void*)0,&g_113},{&g_111,&g_182},{&g_111,(void*)0},{&g_138.f0,&g_111},{&g_138.f0,(void*)0},{&g_111,&g_182},{&g_111,&g_113},{(void*)0,&g_113},{&g_111,&g_182}},{{&g_111,(void*)0},{&g_138.f0,&g_111},{&g_138.f0,(void*)0},{&g_111,&g_182},{&g_111,&g_113},{(void*)0,&g_113},{&g_111,&g_182},{&g_111,(void*)0},{&g_138.f0,&g_111},{&g_138.f0,(void*)0}},{{&g_111,&g_182},{&g_111,&g_113},{(void*)0,&g_113},{&g_111,&g_182},{&g_111,(void*)0},{&g_138.f0,&g_111},{&g_138.f0,(void*)0},{&g_111,&g_182},{&g_111,&g_113},{(void*)0,&g_113}},{{&g_111,&g_182},{&g_111,(void*)0},{&g_138.f0,&g_111},{&g_138.f0,(void*)0},{&g_111,&g_182},{&g_111,&g_113},{(void*)0,&g_113},{&g_111,&g_182},{&g_111,(void*)0},{&g_138.f0,&g_111}}}; + int32_t l_505 = 0x3BBE76C4L; + uint8_t l_506 = 6UL; + int i, j, k; + (*l_410) |= ((*l_412) = p_53.f0); + for (l_374 = (-26); (l_374 == 16); l_374 = safe_add_func_int16_t_s_s(l_374, 4)) + { /* block id: 256 */ + struct S3 **l_498 = &l_497[8][7][0]; + (*l_498) = l_497[8][9][0]; + } + for (p_57.f0 = 0; (p_57.f0 != 45); p_57.f0 = safe_add_func_uint8_t_u_u(p_57.f0, 7)) + { /* block id: 261 */ + int32_t **l_501 = &l_412; + int32_t *l_502[1]; + int i; + for (i = 0; i < 1; i++) + l_502[i] = &l_281; + (*l_501) = &l_281; + l_506++; + } + } + else + { /* block id: 265 */ + struct S4 *l_516 = &g_138; + struct S4 **l_515 = &l_516; + struct S4 **l_519 = (void*)0; + uint16_t *l_523 = (void*)0; + uint16_t *l_524 = &l_450.f0; + int32_t l_547 = 2L; + struct S5 *l_566 = (void*)0; + p_53.f0 = (((safe_div_func_int32_t_s_s((safe_mul_func_uint16_t_u_u(((*l_524) = (+(l_504[1][2] || (g_138 , (((*l_410) = (safe_add_func_int8_t_s_s((*g_252), ((l_520 = (g_517 = ((*l_515) = &g_138))) == ((*g_348) , &g_521[4][0][0]))))) >= (safe_unary_minus_func_int16_t_s((g_113.f9 < ((g_69.f2.f4 ^ (~p_57.f0)) <= p_53.f3))))))))), 0x3F82L)), 1L)) || 8L) != p_53.f1); + for (g_85 = 0; (g_85 <= 2); g_85 += 1) + { /* block id: 274 */ + uint32_t *l_532 = &g_494[3]; + int32_t l_535 = (-6L); + uint16_t *l_545 = &g_43[6][6][2].f1; + uint16_t l_546 = 65532UL; + struct S2 **l_551 = &g_348; + int32_t *l_567 = &l_503; + (*l_412) = ((safe_lshift_func_uint8_t_u_s((safe_mod_func_uint32_t_u_u(((g_153 , ((l_529 , (((*l_545) = (safe_sub_func_int8_t_s_s(((((+(--(*l_532))) , ((*g_517) , (l_535 | ((g_182.f8 , (((((safe_add_func_uint8_t_u_u((safe_div_func_int32_t_s_s((safe_sub_func_int32_t_s_s(l_504[0][1], p_53.f3)), (safe_lshift_func_uint8_t_u_u((((*l_524) = p_57.f0) <= (*l_228)), 1)))), 0x9CL)) > 0x6DCC9F64L) || l_544) >= (*g_252)) > 4UL)) >= 4294967295UL)))) <= g_138.f0.f6) < 5UL), 0xB6L))) == l_546)) | 0xC305L)) , l_529.f8), l_547)), (*g_252))) || l_548); + (*l_412) &= (safe_add_func_int32_t_s_s(p_53.f3, (0xFA528CD4L <= ((((*p_56) = (*g_42)) , &l_228) == (void*)0)))); + (*l_551) = &g_349; + (*l_567) ^= ((*l_228) > (safe_lshift_func_uint16_t_u_s(((safe_add_func_int32_t_s_s(p_57.f1, (((((g_153 , ((((*l_410) &= p_53.f3) ^ 4294967295UL) > (safe_mul_func_int16_t_s_s(p_57.f1, 5UL)))) <= ((safe_mul_func_uint16_t_u_u((safe_mul_func_uint8_t_u_u((safe_add_func_int16_t_s_s((((((255UL != (~(4294967294UL == 0UL))) , (void*)0) == l_566) , g_69.f3) ^ l_504[2][3]), g_274)), 0x5DL)), g_111.f6)) == l_535)) & 8UL) && p_53.f2) | (*l_412)))) || p_53.f0), 3))); + } + (*l_412) = (((g_274 |= 0L) == g_349.f1) && (safe_lshift_func_int8_t_s_s(0L, (safe_rshift_func_int16_t_s_s((safe_add_func_uint16_t_u_u(((void*)0 != l_574), (l_234 , l_529.f8))), 12))))); + } + l_582++; + } + else + { /* block id: 289 */ + uint32_t l_606[6]; + int32_t l_609 = 0x40AE2A13L; + int32_t *l_610 = &l_504[1][3]; + int32_t *l_611 = &l_318; + int32_t *l_612 = &g_84; + int32_t *l_613 = &l_609; + int32_t *l_614 = (void*)0; + int32_t *l_615 = &l_504[1][2]; + int32_t l_616 = 0x99467C25L; + int32_t *l_617 = &l_322[0][0]; + int32_t *l_618[5]; + int16_t l_619 = 8L; + int i; + for (i = 0; i < 6; i++) + l_606[i] = 0x997170ADL; + for (i = 0; i < 5; i++) + l_618[i] = &l_616; + for (g_131 = (-27); (g_131 == 22); g_131++) + { /* block id: 292 */ + for (l_318 = 2; (l_318 >= 0); l_318 -= 1) + { /* block id: 295 */ + (*l_410) = ((*l_228) = p_57.f1); + } + } + for (p_57.f0 = 3; (p_57.f0 <= 8); p_57.f0 += 1) + { /* block id: 302 */ + int32_t *l_600 = (void*)0; + int32_t *l_602 = &l_504[2][0]; + int32_t *l_603 = &l_320; + int32_t *l_604 = &l_281; + int32_t *l_605[9][2] = {{(void*)0,&l_329},{(void*)0,(void*)0},{&l_329,&l_329},{&l_329,&l_280},{&l_329,&l_329},{&l_280,&l_329},{&l_329,&l_280},{&l_329,&l_329},{&l_280,&l_329}}; + int i, j; + for (l_250 = 0; (l_250 <= 8); l_250 += 1) + { /* block id: 305 */ + struct S3 l_594[7] = {{-9867,4,834,0,10,12828,54,32,17,4899},{-9867,4,834,0,10,12828,54,32,17,4899},{-9867,4,834,0,10,12828,54,32,17,4899},{-9867,4,834,0,10,12828,54,32,17,4899},{-9867,4,834,0,10,12828,54,32,17,4899},{-9867,4,834,0,10,12828,54,32,17,4899},{-9867,4,834,0,10,12828,54,32,17,4899}}; + int16_t ****l_596[10] = {&l_595,&l_595,&l_595,&l_595,&l_595,&l_595,&l_595,&l_595,&l_595,&l_595}; + uint16_t *l_598 = &l_415[1][6].f0; + int i; + (*l_410) |= ((safe_add_func_int8_t_s_s((safe_mod_func_uint16_t_u_u((((safe_unary_minus_func_int8_t_s((((&g_356 == &g_112) & (safe_mod_func_uint8_t_u_u((249UL >= (l_594[6] , (p_53.f1 != ((*l_598) = ((l_597 = l_595) == (void*)0))))), (*g_252)))) <= ((void*)0 == l_451)))) != g_599) != p_57.f0), 2UL)), (-1L))) != (*l_228)); + } + l_606[2]--; + } + l_622++; + } + for (l_582 = 0; (l_582 > 11); l_582 = safe_add_func_int16_t_s_s(l_582, 7)) + { /* block id: 316 */ + struct S3 **l_627 = &g_356; + (*l_627) = &g_113; + } + (*l_410) |= (safe_sub_func_uint32_t_u_u(p_53.f1, (l_630 != ((g_599 = (safe_add_func_int32_t_s_s((*l_228), (safe_div_func_int16_t_s_s((safe_unary_minus_func_uint32_t_u(((*l_636) |= 1UL))), (safe_add_func_int8_t_s_s((*g_252), (g_153 , 0x7DL)))))))) , l_595)))); + g_151[2] = &l_374; + } + else + { /* block id: 323 */ + if (l_646) + { /* block id: 324 */ + return p_53; + } + else + { /* block id: 326 */ + struct S0 l_647[3][6][8] = {{{{-136,13,28,56},{145,13,26,9},{25,0,13,51},{-81,8,14,33},{-140,15,5,35},{-129,10,27,47},{124,4,0,104},{121,11,4,41}},{{30,12,15,71},{-136,13,28,56},{-55,14,13,73},{-148,11,29,18},{25,0,13,51},{-61,5,20,10},{66,11,28,12},{174,14,3,98}},{{110,4,20,75},{-150,13,15,70},{-141,10,31,71},{47,14,31,82},{-116,6,24,66},{95,3,18,52},{-81,14,25,100},{29,12,13,108}},{{-61,5,20,10},{-114,12,30,14},{-23,5,25,53},{172,13,28,120},{29,2,12,91},{174,14,3,98},{174,14,3,98},{29,2,12,91}},{{-23,5,25,53},{56,4,31,53},{56,4,31,53},{-23,5,25,53},{59,9,19,14},{30,12,15,71},{-61,5,20,10},{-118,2,9,105}},{{124,4,0,104},{47,14,31,82},{154,4,1,112},{-129,10,27,47},{-150,13,15,70},{-140,15,5,35},{172,13,28,120},{74,8,2,48}}},{{{-0,14,5,119},{47,14,31,82},{145,13,26,9},{-150,12,27,48},{174,14,3,98},{30,12,15,71},{-134,5,10,54},{154,4,1,112}},{{-97,7,20,120},{56,4,31,53},{-81,14,25,100},{-19,5,8,89},{-134,10,28,16},{174,14,3,98},{-112,11,31,77},{-149,15,5,23}},{{-140,15,5,35},{-114,12,30,14},{-116,6,24,66},{101,10,31,13},{95,1,23,52},{95,3,18,52},{-129,10,27,47},{172,13,28,120}},{{59,6,30,38},{-150,13,15,70},{59,9,19,14},{124,4,0,104},{152,6,21,93},{-61,5,20,10},{-141,10,31,71},{56,4,31,53}},{{-148,11,29,18},{-136,13,28,56},{-39,7,30,57},{-150,13,15,70},{29,12,13,108},{-129,10,27,47},{-114,12,30,14},{-141,10,31,71}},{{42,8,21,80},{145,13,26,9},{-81,8,14,33},{130,13,14,91},{-81,8,14,33},{145,13,26,9},{42,8,21,80},{-86,15,8,7}}},{{{25,0,13,51},{128,3,7,9},{59,6,30,38},{95,1,23,52},{154,4,1,112},{74,8,2,48},{45,11,4,116},{-116,6,24,66}},{{59,9,19,14},{101,10,31,13},{-118,2,9,105},{-136,13,28,56},{154,4,1,112},{-112,11,31,77},{110,4,20,75},{130,13,14,91}},{{25,0,13,51},{9,13,20,103},{-134,10,28,16},{-116,6,24,66},{-81,8,14,33},{161,6,7,45},{83,12,31,120},{-134,5,10,54}},{{42,8,21,80},{110,4,20,75},{-129,10,27,47},{34,6,31,81},{29,12,13,108},{95,1,23,52},{-46,5,11,42},{145,13,26,9}},{{-148,11,29,18},{-39,7,30,57},{30,12,15,71},{29,2,12,91},{152,6,21,93},{101,10,31,13},{154,4,1,112},{-19,5,8,89}},{{59,6,30,38},{-118,2,9,105},{42,8,21,80},{66,11,28,12},{95,1,23,52},{-136,13,28,56},{-140,15,5,35},{161,6,7,45}}}}; + int i, j, k; + return l_647[1][1][5]; + } + } + for (l_329 = 0; (l_329 != (-25)); l_329--) + { /* block id: 332 */ + struct S1 **l_650[10] = {&l_645,&l_645,&l_645,&l_645,&l_645,&l_645,&l_645,&l_645,&l_645,&l_645}; + int i; + p_56 = &g_43[1][0][0]; + } + return l_363; + } + for (g_69.f3 = 6; (g_69.f3 <= (-1)); --g_69.f3) + { /* block id: 339 */ + const int32_t *l_653 = &l_322[0][0]; + const int32_t **l_654 = &l_653; + (*l_654) = ((*l_427) , l_653); + } + return g_153; +} + + +/* ------------------------------------------ */ +/* + * reads : g_94 g_85 g_69.f2.f7 g_84 g_23 g_69.f1 g_131 g_43.f0 g_138 g_111.f5 g_111.f6 g_111.f3 g_153 g_113.f9 g_69.f2.f3 g_69.f2.f2 g_69.f2.f0 g_111.f1 + * writes: g_84 g_85 g_69.f1 g_94 g_109 g_112 g_131 g_151 + */ +static struct S0 func_58(int16_t p_59, int32_t p_60, struct S1 * p_61, uint16_t p_62, struct S1 * p_63) +{ /* block id: 14 */ + int32_t *l_83 = &g_84; + int32_t l_91 = 0xF83796EEL; + int32_t l_93[5][6] = {{(-10L),0x1B442378L,0x08F057B9L,0xA9A3A129L,0xA9A3A129L,0x08F057B9L},{0xBEE15430L,1L,0xBEE15430L,1L,0xBA1556E8L,(-10L)},{1L,0xBEE15430L,0x08F057B9L,(-10L),0x08F057B9L,0xBEE15430L},{1L,1L,0x08F057B9L,(-1L),1L,(-10L)},{0xA9A3A129L,(-1L),0xBEE15430L,0xBEE15430L,(-1L),0xA9A3A129L}}; + int8_t l_142 = 0x11L; + int32_t **l_180 = &g_151[4]; + struct S3 *l_181 = &g_182; + struct S0 l_225 = {-105,9,22,104}; + int i, j; + g_85 = ((*l_83) = 1L); +lbl_205: + for (g_69.f1 = (-24); (g_69.f1 > 31); g_69.f1++) + { /* block id: 19 */ + int32_t *l_88 = &g_84; + int32_t *l_89 = &g_84; + int32_t *l_90 = &g_84; + int32_t *l_92[2][7][8] = {{{&g_84,&g_84,&l_91,&g_84,&g_84,(void*)0,(void*)0,&g_84},{&g_84,&g_84,&g_84,&g_84,&g_84,&g_84,&g_84,&g_84},{&g_84,(void*)0,&g_84,&g_84,&g_84,&g_84,&l_91,&g_84},{&l_91,&g_84,&l_91,&g_84,&g_84,&g_84,&l_91,&l_91},{&l_91,(void*)0,(void*)0,&l_91,&g_84,&g_84,&g_84,(void*)0},{&l_91,&g_84,&l_91,&l_91,&g_84,(void*)0,&g_84,(void*)0},{&l_91,&g_84,&g_84,&g_84,&g_84,(void*)0,&l_91,&l_91}},{{(void*)0,&g_84,&g_84,&l_91,&g_84,&l_91,&g_84,&g_84},{&l_91,&g_84,&g_84,&g_84,&l_91,(void*)0,(void*)0,&l_91},{&g_84,&l_91,&g_84,&g_84,&l_91,(void*)0,(void*)0,&l_91},{(void*)0,&g_84,&g_84,(void*)0,&l_91,&l_91,&g_84,&l_91},{&l_91,&l_91,&g_84,&l_91,&g_84,&l_91,&l_91,(void*)0},{&g_84,&l_91,&g_84,&g_84,&g_84,&g_84,&g_84,&l_91},{&l_91,&l_91,&l_91,&g_84,(void*)0,(void*)0,&g_84,&l_91}}}; + int i, j, k; + ++g_94; + } + for (p_59 = 4; (p_59 >= 1); p_59 -= 1) + { /* block id: 24 */ + uint32_t l_101 = 0x928AAD06L; + struct S1 * const l_122[1] = {&g_43[6][6][2]}; + int32_t l_123 = 0x0C6443E6L; + uint8_t l_146 = 0x0DL; + uint16_t l_160[4]; + int32_t l_210 = 4L; + int32_t l_211 = 0xFD14C5FFL; + int32_t l_212 = (-4L); + int32_t l_213 = (-1L); + int32_t l_215 = 0x9EB05264L; + int32_t l_216 = 0L; + int32_t l_217 = 0xE4B4E971L; + int32_t l_218[3]; + int32_t l_219 = 0x5BEEE314L; + uint16_t l_220 = 0xB3DFL; + int i; + for (i = 0; i < 4; i++) + l_160[i] = 65535UL; + for (i = 0; i < 3; i++) + l_218[i] = 0x77C93981L; + for (g_85 = 0; (g_85 <= 2); g_85 += 1) + { /* block id: 27 */ + int32_t l_127 = (-1L); + struct S4 l_163 = {{-17390,4,292,-10,2,16271,17,29,-55,7808},-5540}; + struct S3 *l_165 = &g_138.f0; + int32_t **l_179 = &l_83; + int i, j; + if (l_93[p_59][g_85]) + break; + for (p_62 = 1; (p_62 <= 4); p_62 += 1) + { /* block id: 31 */ + const uint16_t l_107 = 0x3CE0L; + int16_t *l_108 = &g_109; + struct S1 *l_120[2]; + int32_t l_126 = 0x6F6EEB39L; + int32_t l_130 = 1L; + struct S5 l_134 = {0x658AL,65534UL,{-27175,1,1343,1,2,13314,81,9,-34,991},0L}; + struct S5 **l_137 = &g_76; + int i; + for (i = 0; i < 2; i++) + l_120[i] = &g_43[0][8][0]; + if (p_60) + break; + if ((safe_lshift_func_int8_t_s_s((((safe_add_func_int8_t_s_s((1UL < p_59), g_69.f2.f7)) , (((((l_101 != (*l_83)) || 4294967286UL) <= (l_101 & (safe_unary_minus_func_uint8_t_u((safe_mul_func_uint16_t_u_u(g_23, ((safe_add_func_int32_t_s_s(((((*l_108) = (l_107 , l_101)) & 0x9021L) < 3UL), g_69.f1)) & 0UL))))))) <= (-1L)) < (*l_83))) > 0xBFDD0443L), 6))) + { /* block id: 34 */ + for (p_60 = 0; (p_60 <= 4); p_60 += 1) + { /* block id: 37 */ + struct S3 *l_110 = &g_111; + g_112 = l_110; + } + } + else + { /* block id: 40 */ + const struct S2 l_121[5][9][1] = {{{{0,10989,2755,4,45111,0x0F242EEFL,3188,149,-109}},{{0,10989,2755,4,45111,0x0F242EEFL,3188,149,-109}},{{-1,10083,9718,2,9836,8L,3398,-135,38}},{{-0,7117,4484,1,13754,0xEE6007DAL,2870,165,-29}},{{-0,8270,6048,0,30763,0xAE96437FL,1414,97,-111}},{{-1,5203,21771,0,26939,6L,2897,-13,-86}},{{0,5200,14207,3,36662,0xB4F79F91L,2945,-6,101}},{{-0,10871,5590,2,27478,-5L,4068,71,10}},{{0,5200,14207,3,36662,0xB4F79F91L,2945,-6,101}}},{{{-1,5203,21771,0,26939,6L,2897,-13,-86}},{{-0,8270,6048,0,30763,0xAE96437FL,1414,97,-111}},{{-0,7117,4484,1,13754,0xEE6007DAL,2870,165,-29}},{{-1,10083,9718,2,9836,8L,3398,-135,38}},{{0,10989,2755,4,45111,0x0F242EEFL,3188,149,-109}},{{0,10989,2755,4,45111,0x0F242EEFL,3188,149,-109}},{{-1,10083,9718,2,9836,8L,3398,-135,38}},{{-0,7117,4484,1,13754,0xEE6007DAL,2870,165,-29}},{{-0,8270,6048,0,30763,0xAE96437FL,1414,97,-111}}},{{{-1,5203,21771,0,26939,6L,2897,-13,-86}},{{0,5200,14207,3,36662,0xB4F79F91L,2945,-6,101}},{{-0,10871,5590,2,27478,-5L,4068,71,10}},{{0,5200,14207,3,36662,0xB4F79F91L,2945,-6,101}},{{-1,5203,21771,0,26939,6L,2897,-13,-86}},{{-0,8270,6048,0,30763,0xAE96437FL,1414,97,-111}},{{-0,7117,4484,1,13754,0xEE6007DAL,2870,165,-29}},{{-1,10083,9718,2,9836,8L,3398,-135,38}},{{0,10989,2755,4,45111,0x0F242EEFL,3188,149,-109}}},{{{0,10989,2755,4,45111,0x0F242EEFL,3188,149,-109}},{{-1,10083,9718,2,9836,8L,3398,-135,38}},{{-0,7117,4484,1,13754,0xEE6007DAL,2870,165,-29}},{{-0,8270,6048,0,30763,0xAE96437FL,1414,97,-111}},{{-1,5203,21771,0,26939,6L,2897,-13,-86}},{{0,5200,14207,3,36662,0xB4F79F91L,2945,-6,101}},{{-0,10871,5590,2,27478,-5L,4068,71,10}},{{0,5200,14207,3,36662,0xB4F79F91L,2945,-6,101}},{{-1,5203,21771,0,26939,6L,2897,-13,-86}}},{{{-0,8270,6048,0,30763,0xAE96437FL,1414,97,-111}},{{-0,7117,4484,1,13754,0xEE6007DAL,2870,165,-29}},{{-1,10083,9718,2,9836,8L,3398,-135,38}},{{0,10989,2755,4,45111,0x0F242EEFL,3188,149,-109}},{{0,10989,2755,4,45111,0x0F242EEFL,3188,149,-109}},{{-1,10083,9718,2,9836,8L,3398,-135,38}},{{-0,7117,4484,1,13754,0xEE6007DAL,2870,165,-29}},{{-0,8270,6048,0,30763,0xAE96437FL,1414,97,-111}},{{-1,5203,21771,0,26939,6L,2897,-13,-86}}}}; + int32_t l_128 = 0L; + int32_t l_129 = 0xA5D6F3FEL; + int32_t *l_150 = (void*)0; + struct S0 *l_152[6][10] = {{&g_153,&g_153,&g_153,&g_153,&g_153,&g_153,&g_153,&g_153,&g_153,&g_153},{&g_153,&g_153,&g_153,(void*)0,&g_153,&g_153,&g_153,&g_153,&g_153,&g_153},{&g_153,&g_153,&g_153,&g_153,&g_153,&g_153,&g_153,&g_153,&g_153,&g_153},{&g_153,&g_153,&g_153,&g_153,&g_153,&g_153,&g_153,&g_153,&g_153,&g_153},{&g_153,&g_153,&g_153,&g_153,&g_153,&g_153,&g_153,&g_153,&g_153,&g_153},{&g_153,&g_153,(void*)0,&g_153,(void*)0,&g_153,&g_153,&g_153,&g_153,&g_153}}; + int32_t *l_157 = &l_93[p_59][p_59]; + int32_t *l_158 = (void*)0; + int32_t *l_159[2][8][2] = {{{&g_84,&l_126},{&l_93[0][3],(void*)0},{&l_93[0][3],&l_126},{&g_84,&g_84},{&l_126,&l_93[0][3]},{(void*)0,&l_93[0][3]},{&l_126,&g_84},{&g_84,&l_126}},{{&l_93[0][3],(void*)0},{&l_93[0][3],&l_126},{&g_84,&g_84},{&l_126,&l_93[0][3]},{(void*)0,&l_93[0][3]},{&l_126,&g_84},{&g_84,&l_126},{&l_93[0][3],(void*)0}}}; + struct S3 *l_164 = &l_163.f0; + uint32_t *l_176 = &g_131; + int i, j, k; + if ((((safe_add_func_uint8_t_u_u(p_62, ((safe_lshift_func_int16_t_s_s((&l_93[2][4] == (void*)0), (((void*)0 == &p_62) <= 6UL))) | ((l_93[p_59][p_59] |= 0L) & (((l_123 ^= (safe_lshift_func_uint16_t_u_s((l_120[1] != (l_121[0][7][0] , l_122[0])), p_60))) && 1UL) || (-7L)))))) >= (*l_83)) | (-1L))) + { /* block id: 43 */ + int32_t *l_124 = &l_123; + int32_t *l_125[2][5][2] = {{{&l_93[p_59][p_59],(void*)0},{&l_93[p_59][g_85],&l_93[p_59][g_85]},{(void*)0,&l_93[p_59][g_85]},{&l_93[p_59][g_85],(void*)0},{&l_93[p_59][p_59],&l_93[p_59][p_59]}},{{&l_93[p_59][p_59],(void*)0},{&l_93[p_59][g_85],&l_93[p_59][g_85]},{(void*)0,&l_93[p_59][g_85]},{&l_93[p_59][g_85],(void*)0},{&l_93[p_59][p_59],&l_93[p_59][p_59]}}}; + int i, j, k; + ++g_131; + p_60 ^= (l_134 , (((-1L) ^ (safe_mod_func_int32_t_s_s((*l_83), (((*l_124) &= g_43[6][6][2].f0) || (l_137 == (g_138 , &g_76)))))) != ((((void*)0 == &g_84) == p_62) || (*l_83)))); + p_60 ^= 0x3CCC8CD9L; + } + else + { /* block id: 48 */ + uint32_t *l_139 = &g_131; + int32_t l_143 = 0x4D29C7E7L; + int32_t *l_144 = &l_129; + int32_t *l_145[7][7] = {{&l_93[p_59][g_85],(void*)0,&l_130,(void*)0,&l_93[p_59][g_85],&l_93[p_59][g_85],(void*)0},{&l_128,&g_84,&l_128,&l_93[p_59][p_59],(void*)0,&l_143,&l_91},{(void*)0,&l_127,&l_130,&l_130,&l_127,(void*)0,&l_127},{&l_128,&l_93[p_59][p_59],(void*)0,&l_143,&l_91,&l_143,(void*)0},{&l_93[p_59][g_85],&l_93[p_59][g_85],(void*)0,&l_130,(void*)0,&l_93[p_59][g_85],&l_93[p_59][g_85]},{(void*)0,&l_93[p_59][p_59],(void*)0,&l_93[p_59][p_59],(void*)0,&l_123,(void*)0},{&l_93[p_59][g_85],&l_127,&l_93[p_59][g_85],(void*)0,(void*)0,&l_93[p_59][g_85],&l_127}}; + int32_t **l_149[8] = {&l_145[0][1],&l_83,&l_145[0][1],&l_145[0][1],&l_83,&l_145[0][1],&l_145[0][1],&l_83}; + struct S0 **l_154 = &l_152[5][8]; + struct S0 *l_156 = &g_153; + struct S0 **l_155 = &l_156; + int i, j; + (*l_83) ^= ((p_62 | ((--(*l_139)) & l_123)) , (l_142 != l_143)); + ++l_146; + g_151[4] = (l_150 = &l_143); + (*l_155) = ((*l_154) = l_152[5][8]); + } + if (p_62) + break; + ++l_160[3]; + (*l_157) = ((l_163 , ((p_60 & (8UL & (((g_112 = l_164) != l_165) > (safe_lshift_func_uint8_t_u_s(l_146, (((l_163.f0.f1 || ((0xC9L ^ (safe_mul_func_uint8_t_u_u((safe_mod_func_uint32_t_u_u((((*l_176) = (((((((safe_rshift_func_uint16_t_u_s((((safe_div_func_int8_t_s_s(1L, g_111.f5)) < 0x7EL) & p_60), p_59)) , p_62) == l_134.f3) & 0x03L) ^ p_62) >= g_111.f6) > (*l_83))) || p_59), l_160[2])), (*l_83)))) , l_134.f1)) > 0xD4A83E69L) > p_62)))))) > p_62)) > 0xF8C4L); + } + if (((**l_179) = ((safe_lshift_func_int16_t_s_u((*l_83), 5)) >= ((0xB5L & (l_179 == l_180)) , g_111.f3)))) + { /* block id: 64 */ + int32_t l_185 = (-2L); + l_181 = l_165; + for (l_101 = 0; (l_101 <= 2); l_101 += 1) + { /* block id: 68 */ + int8_t *l_186 = &l_142; + uint32_t *l_199 = (void*)0; + uint32_t *l_200 = &g_131; + uint16_t *l_203 = &g_69.f1; + int32_t *l_204[1][8]; + int i, j; + for (i = 0; i < 1; i++) + { + for (j = 0; j < 8; j++) + l_204[i][j] = &l_127; + } + l_123 |= (safe_rshift_func_int8_t_s_s(((*l_186) = l_185), (((safe_lshift_func_int8_t_s_s((safe_lshift_func_int16_t_s_u(((3UL < ((g_153 , ((safe_mod_func_uint8_t_u_u(p_60, ((&g_109 != (void*)0) , (((safe_lshift_func_uint8_t_u_s((((safe_mod_func_uint8_t_u_u((((((*l_203) = (((p_62 ^ ((*l_83) = (safe_mod_func_uint32_t_u_u(((*l_200) = g_113.f9), ((safe_sub_func_int32_t_s_s((((**l_179) , &g_153) == &g_153), g_69.f2.f3)) , (-7L)))))) , g_69.f2.f2) | p_60)) || p_62) , 0x0F5ECD5AL) , l_185), g_153.f3)) == 0x31L) != p_62), p_62)) , 4UL) || p_62)))) || g_69.f2.f0)) | 0x452CL)) , g_111.f1), 13)), 4)) != l_185) >= g_138.f0.f5))); + } + if (p_60) + break; + } + else + { /* block id: 76 */ + (*l_180) = (void*)0; + } + if (l_134.f2.f7) + goto lbl_205; + } + } + for (l_146 = 0; (l_146 <= 4); l_146 += 1) + { /* block id: 84 */ + int32_t *l_206 = &l_93[4][4]; + int32_t *l_207 = (void*)0; + int32_t *l_208 = &l_93[0][3]; + int32_t *l_209[3][1]; + int i, j; + for (i = 0; i < 3; i++) + { + for (j = 0; j < 1; j++) + l_209[i][j] = &g_84; + } + --l_220; + for (g_94 = 0; (g_94 <= 3); g_94 += 1) + { /* block id: 88 */ + struct S4 *l_223 = &g_138; + struct S4 **l_224 = &l_223; + int i, j; + if (l_93[(g_94 + 1)][l_146]) + break; + for (l_123 = 0; (l_123 <= 3); l_123 += 1) + { /* block id: 92 */ + if (p_59) + break; + } + (*l_224) = l_223; + } + return l_225; + } + } + return l_225; +} + + +/* ------------------------------------------ */ +/* + * reads : + * writes: + */ +static struct S1 * func_64(struct S1 * const p_65, struct S1 * p_66, struct S1 * p_67) +{ /* block id: 9 */ + struct S5 *l_68 = &g_69; + struct S5 **l_70 = &l_68; + int32_t l_71 = 1L; + (*l_70) = l_68; + l_71 &= (-1L); + return p_66; +} + + + + +/* ---------------------------------------- */ +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_22.f0, "g_22.f0", print_hash_value); + transparent_crc(g_22.f1, "g_22.f1", print_hash_value); + transparent_crc(g_23, "g_23", print_hash_value); + for (i = 0; i < 8; i++) + { + for (j = 0; j < 10; j++) + { + for (k = 0; k < 3; k++) + { + transparent_crc(g_43[i][j][k].f0, "g_43[i][j][k].f0", print_hash_value); + transparent_crc(g_43[i][j][k].f1, "g_43[i][j][k].f1", print_hash_value); + if (print_hash_value) printf("index = [%d][%d][%d]\n", i, j, k); + + } + } + } + transparent_crc(g_69.f0, "g_69.f0", print_hash_value); + transparent_crc(g_69.f1, "g_69.f1", print_hash_value); + transparent_crc(g_69.f2.f0, "g_69.f2.f0", print_hash_value); + transparent_crc(g_69.f2.f1, "g_69.f2.f1", print_hash_value); + transparent_crc(g_69.f2.f2, "g_69.f2.f2", print_hash_value); + transparent_crc(g_69.f2.f3, "g_69.f2.f3", print_hash_value); + transparent_crc(g_69.f2.f4, "g_69.f2.f4", print_hash_value); + transparent_crc(g_69.f2.f5, "g_69.f2.f5", print_hash_value); + transparent_crc(g_69.f2.f6, "g_69.f2.f6", print_hash_value); + transparent_crc(g_69.f2.f7, "g_69.f2.f7", print_hash_value); + transparent_crc(g_69.f2.f8, "g_69.f2.f8", print_hash_value); + transparent_crc(g_69.f2.f9, "g_69.f2.f9", print_hash_value); + transparent_crc(g_69.f3, "g_69.f3", print_hash_value); + transparent_crc(g_84, "g_84", print_hash_value); + transparent_crc(g_85, "g_85", print_hash_value); + transparent_crc(g_94, "g_94", print_hash_value); + transparent_crc(g_109, "g_109", print_hash_value); + transparent_crc(g_111.f0, "g_111.f0", print_hash_value); + transparent_crc(g_111.f1, "g_111.f1", print_hash_value); + transparent_crc(g_111.f2, "g_111.f2", print_hash_value); + transparent_crc(g_111.f3, "g_111.f3", print_hash_value); + transparent_crc(g_111.f4, "g_111.f4", print_hash_value); + transparent_crc(g_111.f5, "g_111.f5", print_hash_value); + transparent_crc(g_111.f6, "g_111.f6", print_hash_value); + transparent_crc(g_111.f7, "g_111.f7", print_hash_value); + transparent_crc(g_111.f8, "g_111.f8", print_hash_value); + transparent_crc(g_111.f9, "g_111.f9", print_hash_value); + transparent_crc(g_113.f0, "g_113.f0", print_hash_value); + transparent_crc(g_113.f1, "g_113.f1", print_hash_value); + transparent_crc(g_113.f2, "g_113.f2", print_hash_value); + transparent_crc(g_113.f3, "g_113.f3", print_hash_value); + transparent_crc(g_113.f4, "g_113.f4", print_hash_value); + transparent_crc(g_113.f5, "g_113.f5", print_hash_value); + transparent_crc(g_113.f6, "g_113.f6", print_hash_value); + transparent_crc(g_113.f7, "g_113.f7", print_hash_value); + transparent_crc(g_113.f8, "g_113.f8", print_hash_value); + transparent_crc(g_113.f9, "g_113.f9", print_hash_value); + transparent_crc(g_131, "g_131", print_hash_value); + transparent_crc(g_138.f0.f0, "g_138.f0.f0", print_hash_value); + transparent_crc(g_138.f0.f1, "g_138.f0.f1", print_hash_value); + transparent_crc(g_138.f0.f2, "g_138.f0.f2", print_hash_value); + transparent_crc(g_138.f0.f3, "g_138.f0.f3", print_hash_value); + transparent_crc(g_138.f0.f4, "g_138.f0.f4", print_hash_value); + transparent_crc(g_138.f0.f5, "g_138.f0.f5", print_hash_value); + transparent_crc(g_138.f0.f6, "g_138.f0.f6", print_hash_value); + transparent_crc(g_138.f0.f7, "g_138.f0.f7", print_hash_value); + transparent_crc(g_138.f0.f8, "g_138.f0.f8", print_hash_value); + transparent_crc(g_138.f0.f9, "g_138.f0.f9", print_hash_value); + transparent_crc(g_138.f1, "g_138.f1", print_hash_value); + transparent_crc(g_153.f0, "g_153.f0", print_hash_value); + transparent_crc(g_153.f1, "g_153.f1", print_hash_value); + transparent_crc(g_153.f2, "g_153.f2", print_hash_value); + transparent_crc(g_153.f3, "g_153.f3", print_hash_value); + transparent_crc(g_182.f0, "g_182.f0", print_hash_value); + transparent_crc(g_182.f1, "g_182.f1", print_hash_value); + transparent_crc(g_182.f2, "g_182.f2", print_hash_value); + transparent_crc(g_182.f3, "g_182.f3", print_hash_value); + transparent_crc(g_182.f4, "g_182.f4", print_hash_value); + transparent_crc(g_182.f5, "g_182.f5", print_hash_value); + transparent_crc(g_182.f6, "g_182.f6", print_hash_value); + transparent_crc(g_182.f7, "g_182.f7", print_hash_value); + transparent_crc(g_182.f8, "g_182.f8", print_hash_value); + transparent_crc(g_182.f9, "g_182.f9", print_hash_value); + transparent_crc(g_214, "g_214", print_hash_value); + transparent_crc(g_253, "g_253", print_hash_value); + transparent_crc(g_274, "g_274", print_hash_value); + transparent_crc(g_349.f0, "g_349.f0", print_hash_value); + transparent_crc(g_349.f1, "g_349.f1", print_hash_value); + transparent_crc(g_349.f2, "g_349.f2", print_hash_value); + transparent_crc(g_349.f3, "g_349.f3", print_hash_value); + transparent_crc(g_349.f4, "g_349.f4", print_hash_value); + transparent_crc(g_349.f5, "g_349.f5", print_hash_value); + transparent_crc(g_349.f6, "g_349.f6", print_hash_value); + transparent_crc(g_349.f7, "g_349.f7", print_hash_value); + transparent_crc(g_349.f8, "g_349.f8", print_hash_value); + transparent_crc(g_357.f0, "g_357.f0", print_hash_value); + transparent_crc(g_357.f1, "g_357.f1", print_hash_value); + transparent_crc(g_357.f2, "g_357.f2", print_hash_value); + transparent_crc(g_357.f3, "g_357.f3", print_hash_value); + transparent_crc(g_357.f4, "g_357.f4", print_hash_value); + transparent_crc(g_357.f5, "g_357.f5", print_hash_value); + transparent_crc(g_357.f6, "g_357.f6", print_hash_value); + transparent_crc(g_357.f7, "g_357.f7", print_hash_value); + transparent_crc(g_357.f8, "g_357.f8", print_hash_value); + transparent_crc(g_357.f9, "g_357.f9", print_hash_value); + for (i = 0; i < 4; i++) + { + transparent_crc(g_494[i], "g_494[i]", print_hash_value); + if (print_hash_value) printf("index = [%d]\n", i); + + } + for (i = 0; i < 8; i++) + { + transparent_crc(g_518[i].f0.f0, "g_518[i].f0.f0", print_hash_value); + transparent_crc(g_518[i].f0.f1, "g_518[i].f0.f1", print_hash_value); + transparent_crc(g_518[i].f0.f2, "g_518[i].f0.f2", print_hash_value); + transparent_crc(g_518[i].f0.f3, "g_518[i].f0.f3", print_hash_value); + transparent_crc(g_518[i].f0.f4, "g_518[i].f0.f4", print_hash_value); + transparent_crc(g_518[i].f0.f5, "g_518[i].f0.f5", print_hash_value); + transparent_crc(g_518[i].f0.f6, "g_518[i].f0.f6", print_hash_value); + transparent_crc(g_518[i].f0.f7, "g_518[i].f0.f7", print_hash_value); + transparent_crc(g_518[i].f0.f8, "g_518[i].f0.f8", print_hash_value); + transparent_crc(g_518[i].f0.f9, "g_518[i].f0.f9", print_hash_value); + transparent_crc(g_518[i].f1, "g_518[i].f1", print_hash_value); + if (print_hash_value) printf("index = [%d]\n", i); + + } + for (i = 0; i < 5; i++) + { + for (j = 0; j < 2; j++) + { + for (k = 0; k < 4; k++) + { + transparent_crc(g_521[i][j][k].f0.f0, "g_521[i][j][k].f0.f0", print_hash_value); + transparent_crc(g_521[i][j][k].f0.f1, "g_521[i][j][k].f0.f1", print_hash_value); + transparent_crc(g_521[i][j][k].f0.f2, "g_521[i][j][k].f0.f2", print_hash_value); + transparent_crc(g_521[i][j][k].f0.f3, "g_521[i][j][k].f0.f3", print_hash_value); + transparent_crc(g_521[i][j][k].f0.f4, "g_521[i][j][k].f0.f4", print_hash_value); + transparent_crc(g_521[i][j][k].f0.f5, "g_521[i][j][k].f0.f5", print_hash_value); + transparent_crc(g_521[i][j][k].f0.f6, "g_521[i][j][k].f0.f6", print_hash_value); + transparent_crc(g_521[i][j][k].f0.f7, "g_521[i][j][k].f0.f7", print_hash_value); + transparent_crc(g_521[i][j][k].f0.f8, "g_521[i][j][k].f0.f8", print_hash_value); + transparent_crc(g_521[i][j][k].f0.f9, "g_521[i][j][k].f0.f9", print_hash_value); + transparent_crc(g_521[i][j][k].f1, "g_521[i][j][k].f1", print_hash_value); + if (print_hash_value) printf("index = [%d][%d][%d]\n", i, j, k); + + } + } + } + transparent_crc(g_599, "g_599", print_hash_value); + for (i = 0; i < 2; i++) + { + for (j = 0; j < 3; j++) + { + transparent_crc(g_601[i][j], "g_601[i][j]", print_hash_value); + if (print_hash_value) printf("index = [%d][%d]\n", i, j); + + } + } + transparent_crc(g_745, "g_745", print_hash_value); + transparent_crc(g_763, "g_763", print_hash_value); + transparent_crc(g_798, "g_798", print_hash_value); + transparent_crc(g_809, "g_809", print_hash_value); + transparent_crc(g_903.f0.f0, "g_903.f0.f0", print_hash_value); + transparent_crc(g_903.f0.f1, "g_903.f0.f1", print_hash_value); + transparent_crc(g_903.f0.f2, "g_903.f0.f2", print_hash_value); + transparent_crc(g_903.f0.f3, "g_903.f0.f3", print_hash_value); + transparent_crc(g_903.f0.f4, "g_903.f0.f4", print_hash_value); + transparent_crc(g_903.f0.f5, "g_903.f0.f5", print_hash_value); + transparent_crc(g_903.f0.f6, "g_903.f0.f6", print_hash_value); + transparent_crc(g_903.f0.f7, "g_903.f0.f7", print_hash_value); + transparent_crc(g_903.f0.f8, "g_903.f0.f8", print_hash_value); + transparent_crc(g_903.f0.f9, "g_903.f0.f9", print_hash_value); + transparent_crc(g_903.f1, "g_903.f1", print_hash_value); + for (i = 0; i < 6; i++) + { + transparent_crc(g_922[i], "g_922[i]", print_hash_value); + if (print_hash_value) printf("index = [%d]\n", i); + + } + transparent_crc(g_1001.f0.f0, "g_1001.f0.f0", print_hash_value); + transparent_crc(g_1001.f0.f1, "g_1001.f0.f1", print_hash_value); + transparent_crc(g_1001.f0.f2, "g_1001.f0.f2", print_hash_value); + transparent_crc(g_1001.f0.f3, "g_1001.f0.f3", print_hash_value); + transparent_crc(g_1001.f0.f4, "g_1001.f0.f4", print_hash_value); + transparent_crc(g_1001.f0.f5, "g_1001.f0.f5", print_hash_value); + transparent_crc(g_1001.f0.f6, "g_1001.f0.f6", print_hash_value); + transparent_crc(g_1001.f0.f7, "g_1001.f0.f7", print_hash_value); + transparent_crc(g_1001.f0.f8, "g_1001.f0.f8", print_hash_value); + transparent_crc(g_1001.f0.f9, "g_1001.f0.f9", print_hash_value); + transparent_crc(g_1001.f1, "g_1001.f1", print_hash_value); + transparent_crc(g_1017.f0, "g_1017.f0", print_hash_value); + transparent_crc(g_1017.f1, "g_1017.f1", print_hash_value); + transparent_crc(g_1017.f2.f0, "g_1017.f2.f0", print_hash_value); + transparent_crc(g_1017.f2.f1, "g_1017.f2.f1", print_hash_value); + transparent_crc(g_1017.f2.f2, "g_1017.f2.f2", print_hash_value); + transparent_crc(g_1017.f2.f3, "g_1017.f2.f3", print_hash_value); + transparent_crc(g_1017.f2.f4, "g_1017.f2.f4", print_hash_value); + transparent_crc(g_1017.f2.f5, "g_1017.f2.f5", print_hash_value); + transparent_crc(g_1017.f2.f6, "g_1017.f2.f6", print_hash_value); + transparent_crc(g_1017.f2.f7, "g_1017.f2.f7", print_hash_value); + transparent_crc(g_1017.f2.f8, "g_1017.f2.f8", print_hash_value); + transparent_crc(g_1017.f2.f9, "g_1017.f2.f9", print_hash_value); + transparent_crc(g_1017.f3, "g_1017.f3", print_hash_value); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} + +/************************ statistics ************************* +XXX max struct depth: 2 +breakdown: + depth: 0, occurrence: 261 + depth: 1, occurrence: 31 + depth: 2, occurrence: 14 +XXX total union variables: 0 + +XXX non-zero bitfields defined in structs: 23 +XXX zero bitfields defined in structs: 0 +XXX const bitfields defined in structs: 5 +XXX volatile bitfields defined in structs: 0 +XXX structs with bitfields in the program: 66 +breakdown: + indirect level: 0, occurrence: 35 + indirect level: 1, occurrence: 25 + indirect level: 2, occurrence: 6 +XXX full-bitfields structs in the program: 16 +breakdown: + indirect level: 0, occurrence: 16 +XXX times a bitfields struct's address is taken: 89 +XXX times a bitfields struct on LHS: 8 +XXX times a bitfields struct on RHS: 69 +XXX times a single bitfield on LHS: 10 +XXX times a single bitfield on RHS: 131 + +XXX max expression depth: 37 +breakdown: + depth: 1, occurrence: 153 + depth: 2, occurrence: 53 + depth: 3, occurrence: 2 + depth: 4, occurrence: 5 + depth: 6, occurrence: 3 + depth: 7, occurrence: 1 + depth: 9, occurrence: 1 + depth: 10, occurrence: 1 + depth: 12, occurrence: 1 + depth: 17, occurrence: 2 + depth: 19, occurrence: 2 + depth: 20, occurrence: 2 + depth: 22, occurrence: 1 + depth: 24, occurrence: 2 + depth: 25, occurrence: 2 + depth: 27, occurrence: 4 + depth: 29, occurrence: 2 + depth: 33, occurrence: 1 + depth: 35, occurrence: 1 + depth: 37, occurrence: 1 + +XXX total number of pointers: 257 + +XXX times a variable address is taken: 468 +XXX times a pointer is dereferenced on RHS: 95 +breakdown: + depth: 1, occurrence: 91 + depth: 2, occurrence: 4 +XXX times a pointer is dereferenced on LHS: 124 +breakdown: + depth: 1, occurrence: 120 + depth: 2, occurrence: 4 +XXX times a pointer is compared with null: 12 +XXX times a pointer is compared with address of another variable: 2 +XXX times a pointer is compared with another pointer: 5 +XXX times a pointer is qualified to be dereferenced: 3560 + +XXX max dereference level: 3 +breakdown: + level: 0, occurrence: 0 + level: 1, occurrence: 756 + level: 2, occurrence: 89 + level: 3, occurrence: 4 +XXX number of pointers point to pointers: 71 +XXX number of pointers point to scalars: 126 +XXX number of pointers point to structs: 60 +XXX percent of pointers has null in alias set: 25.3 +XXX average alias set size: 1.37 + +XXX times a non-volatile is read: 778 +XXX times a non-volatile is write: 446 +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: 0 +XXX backward jumps: 3 + +XXX stmts: 166 +XXX max block depth: 5 +breakdown: + depth: 0, occurrence: 26 + depth: 1, occurrence: 16 + depth: 2, occurrence: 19 + depth: 3, occurrence: 31 + depth: 4, occurrence: 40 + depth: 5, occurrence: 34 + +XXX percentage a fresh-made variable is used: 19.7 +XXX percentage an existing variable is used: 80.3 +FYI: the random generator makes assumptions about the integer size. See platform.info for more details. +********************* end of statistics **********************/ + diff --git a/tests/fuzz/16.c.txt b/tests/fuzz/16.c.txt new file mode 100644 index 00000000..222e3adc --- /dev/null +++ b/tests/fuzz/16.c.txt @@ -0,0 +1 @@ +checksum = 8C69559B diff --git a/tests/fuzz/17.c b/tests/fuzz/17.c new file mode 100644 index 00000000..25b3028e --- /dev/null +++ b/tests/fuzz/17.c @@ -0,0 +1,982 @@ +/* + * This is a RANDOMLY GENERATED PROGRAM. + * + * Generator: csmith 2.2.0 + * Git version: bf42ffd + * Options: --no-volatiles --no-math64 --no-packed-struct + * Seed: 3580928136 + */ + +#include "csmith.h" + + +static long __undefined; + +/* --- Struct/Union Declarations --- */ +struct S0 { + const uint16_t f0; + int8_t f1; + int16_t f2; + const int8_t f3; + int32_t f4; +}; + +struct S1 { + unsigned f0 : 15; + signed f1 : 17; + signed f2 : 2; + const unsigned f3 : 30; + signed f4 : 20; +}; + +/* --- GLOBAL VARIABLES --- */ +static int32_t g_3[6] = {0x99D94B4BL,0x99D94B4BL,0x99D94B4BL,0x99D94B4BL,0x99D94B4BL,0x99D94B4BL}; +static int32_t g_5 = (-1L); +static uint16_t g_6[10] = {0xD814L,0x4B54L,0xD814L,0xD814L,0x4B54L,0xD814L,0xD814L,0x4B54L,0xD814L,0xD814L}; +static int32_t g_11 = 0L; +static int32_t g_12 = 0xBD4856CDL; +static int32_t g_15 = (-1L); +static int16_t g_20 = 0xE3D4L; +static int32_t *g_54 = &g_3[0]; +static int32_t **g_53 = &g_54; +static struct S1 g_68 = {97,-181,0,30095,273}; +static int8_t g_83 = 0x24L; +static int32_t g_90 = 0xA07F58E9L; +static struct S0 g_92[6][4][9] = {{{{0x78D3L,0L,0x3BA0L,0x38L,-1L},{0x3FE2L,0xFCL,0x2E64L,-4L,0xAE891756L},{0x85E4L,0xCFL,0x1528L,0x9DL,0xD8B2F938L},{0x3FE2L,0xFCL,0x2E64L,-4L,0xAE891756L},{0x78D3L,0L,0x3BA0L,0x38L,-1L},{0x78D3L,0L,0x3BA0L,0x38L,-1L},{0x3FE2L,0xFCL,0x2E64L,-4L,0xAE891756L},{0x85E4L,0xCFL,0x1528L,0x9DL,0xD8B2F938L},{0x3FE2L,0xFCL,0x2E64L,-4L,0xAE891756L}},{{0x8624L,1L,1L,-1L,0xD6B41A24L},{65530UL,-1L,8L,3L,0xCB4F9107L},{65535UL,0x4CL,-1L,-1L,1L},{65535UL,0x4CL,-1L,-1L,1L},{65530UL,-1L,8L,3L,0xCB4F9107L},{0x8624L,1L,1L,-1L,0xD6B41A24L},{65530UL,-1L,8L,3L,0xCB4F9107L},{65535UL,0x4CL,-1L,-1L,1L},{65535UL,0x4CL,-1L,-1L,1L}},{{0x78D3L,0L,0x3BA0L,0x38L,-1L},{0x78D3L,0L,0x3BA0L,0x38L,-1L},{0x3FE2L,0xFCL,0x2E64L,-4L,0xAE891756L},{0x85E4L,0xCFL,0x1528L,0x9DL,0xD8B2F938L},{0x3FE2L,0xFCL,0x2E64L,-4L,0xAE891756L},{0x78D3L,0L,0x3BA0L,0x38L,-1L},{0x78D3L,0L,0x3BA0L,0x38L,-1L},{0x3FE2L,0xFCL,0x2E64L,-4L,0xAE891756L},{0x85E4L,0xCFL,0x1528L,0x9DL,0xD8B2F938L}},{{0xE1C3L,-9L,-8L,-1L,0x4BB8EBACL},{65530UL,-1L,8L,3L,0xCB4F9107L},{0xE1C3L,-9L,-8L,-1L,0x4BB8EBACL},{0xE1C3L,-9L,-8L,-1L,0x4BB8EBACL},{0xE1C3L,-9L,-8L,-1L,0x4BB8EBACL},{65535UL,0x4CL,-1L,-1L,1L},{65535UL,-1L,6L,1L,0x50DEC7D6L},{65535UL,0x4CL,-1L,-1L,1L},{0xE1C3L,-9L,-8L,-1L,0x4BB8EBACL}}},{{{0x85E4L,0xCFL,0x1528L,0x9DL,0xD8B2F938L},{0x68CBL,0x47L,-8L,0x60L,0x879556C6L},{0x68CBL,0x47L,-8L,0x60L,0x879556C6L},{0x85E4L,0xCFL,0x1528L,0x9DL,0xD8B2F938L},{0x78D3L,0L,0x3BA0L,0x38L,-1L},{0x85E4L,0xCFL,0x1528L,0x9DL,0xD8B2F938L},{0x68CBL,0x47L,-8L,0x60L,0x879556C6L},{0x68CBL,0x47L,-8L,0x60L,0x879556C6L},{0x85E4L,0xCFL,0x1528L,0x9DL,0xD8B2F938L}},{{0x8624L,1L,1L,-1L,0xD6B41A24L},{0xE1C3L,-9L,-8L,-1L,0x4BB8EBACL},{65530UL,-1L,8L,3L,0xCB4F9107L},{0xE1C3L,-9L,-8L,-1L,0x4BB8EBACL},{0x8624L,1L,1L,-1L,0xD6B41A24L},{0x8624L,1L,1L,-1L,0xD6B41A24L},{0xE1C3L,-9L,-8L,-1L,0x4BB8EBACL},{65530UL,-1L,8L,3L,0xCB4F9107L},{0xE1C3L,-9L,-8L,-1L,0x4BB8EBACL}},{{0x68CBL,0x47L,-8L,0x60L,0x879556C6L},{0x78D3L,0L,0x3BA0L,0x38L,-1L},{65535UL,-4L,0L,-1L,0x3BBBF133L},{65535UL,-4L,0L,-1L,0x3BBBF133L},{0x78D3L,0L,0x3BA0L,0x38L,-1L},{0x68CBL,0x47L,-8L,0x60L,0x879556C6L},{0x78D3L,0L,0x3BA0L,0x38L,-1L},{65535UL,-4L,0L,-1L,0x3BBBF133L},{65535UL,-4L,0L,-1L,0x3BBBF133L}},{{0x8624L,1L,1L,-1L,0xD6B41A24L},{0x8624L,1L,1L,-1L,0xD6B41A24L},{0xE1C3L,-9L,-8L,-1L,0x4BB8EBACL},{65530UL,-1L,8L,3L,0xCB4F9107L},{0xE1C3L,-9L,-8L,-1L,0x4BB8EBACL},{0x8624L,1L,1L,-1L,0xD6B41A24L},{0x8624L,1L,1L,-1L,0xD6B41A24L},{0xE1C3L,-9L,-8L,-1L,0x4BB8EBACL},{65530UL,-1L,8L,3L,0xCB4F9107L}}},{{{0x85E4L,0xCFL,0x1528L,0x9DL,0xD8B2F938L},{0x78D3L,0L,0x3BA0L,0x38L,-1L},{0x85E4L,0xCFL,0x1528L,0x9DL,0xD8B2F938L},{0x68CBL,0x47L,-8L,0x60L,0x879556C6L},{0x68CBL,0x47L,-8L,0x60L,0x879556C6L},{0x85E4L,0xCFL,0x1528L,0x9DL,0xD8B2F938L},{0x78D3L,0L,0x3BA0L,0x38L,-1L},{0x85E4L,0xCFL,0x1528L,0x9DL,0xD8B2F938L},{0x68CBL,0x47L,-8L,0x60L,0x879556C6L}},{{65535UL,0x4CL,-1L,-1L,1L},{0xE1C3L,-9L,-8L,-1L,0x4BB8EBACL},{0xE1C3L,-9L,-8L,-1L,0x4BB8EBACL},{65535UL,0x4CL,-1L,-1L,1L},{65535UL,-1L,6L,1L,0x50DEC7D6L},{65535UL,0x4CL,-1L,-1L,1L},{0xE1C3L,-9L,-8L,-1L,0x4BB8EBACL},{0xE1C3L,-9L,-8L,-1L,0x4BB8EBACL},{65535UL,0x4CL,-1L,-1L,1L}},{{0x3FE2L,0xFCL,0x2E64L,-4L,0xAE891756L},{0x68CBL,0x47L,-8L,0x60L,0x879556C6L},{65535UL,-4L,0L,-1L,0x3BBBF133L},{0x68CBL,0x47L,-8L,0x60L,0x879556C6L},{0x3FE2L,0xFCL,0x2E64L,-4L,0xAE891756L},{0x3FE2L,0xFCL,0x2E64L,-4L,0xAE891756L},{0x68CBL,0x47L,-8L,0x60L,0x879556C6L},{65535UL,-4L,0L,-1L,0x3BBBF133L},{0x68CBL,0x47L,-8L,0x60L,0x879556C6L}},{{0xE1C3L,-9L,-8L,-1L,0x4BB8EBACL},{65535UL,-1L,6L,1L,0x50DEC7D6L},{65530UL,-1L,8L,3L,0xCB4F9107L},{65530UL,-1L,8L,3L,0xCB4F9107L},{65535UL,-1L,6L,1L,0x50DEC7D6L},{0xE1C3L,-9L,-8L,-1L,0x4BB8EBACL},{65535UL,-1L,6L,1L,0x50DEC7D6L},{65530UL,-1L,8L,3L,0xCB4F9107L},{65530UL,-1L,8L,3L,0xCB4F9107L}}},{{{0x3FE2L,0xFCL,0x2E64L,-4L,0xAE891756L},{0x3FE2L,0xFCL,0x2E64L,-4L,0xAE891756L},{0x68CBL,0x47L,-8L,0x60L,0x879556C6L},{65535UL,-4L,0L,-1L,0x3BBBF133L},{0x68CBL,0x47L,-8L,0x60L,0x879556C6L},{0x3FE2L,0xFCL,0x2E64L,-4L,0xAE891756L},{0x3FE2L,0xFCL,0x2E64L,-4L,0xAE891756L},{0x68CBL,0x47L,-8L,0x60L,0x879556C6L},{65535UL,-4L,0L,-1L,0x3BBBF133L}},{{65535UL,0x4CL,-1L,-1L,1L},{65535UL,-1L,6L,1L,0x50DEC7D6L},{65535UL,0x4CL,-1L,-1L,1L},{0xE1C3L,-9L,-8L,-1L,0x4BB8EBACL},{0xE1C3L,-9L,-8L,-1L,0x4BB8EBACL},{65535UL,0x4CL,-1L,-1L,1L},{65535UL,-1L,6L,1L,0x50DEC7D6L},{65535UL,0x4CL,-1L,-1L,1L},{0xE1C3L,-9L,-8L,-1L,0x4BB8EBACL}},{{0x85E4L,0xCFL,0x1528L,0x9DL,0xD8B2F938L},{0x68CBL,0x47L,-8L,0x60L,0x879556C6L},{0x68CBL,0x47L,-8L,0x60L,0x879556C6L},{0x85E4L,0xCFL,0x1528L,0x9DL,0xD8B2F938L},{0x78D3L,0L,0x3BA0L,0x38L,-1L},{0x85E4L,0xCFL,0x1528L,0x9DL,0xD8B2F938L},{0x68CBL,0x47L,-8L,0x60L,0x879556C6L},{0x68CBL,0x47L,-8L,0x60L,0x879556C6L},{0x85E4L,0xCFL,0x1528L,0x9DL,0xD8B2F938L}},{{0x8624L,1L,1L,-1L,0xD6B41A24L},{0xE1C3L,-9L,-8L,-1L,0x4BB8EBACL},{65530UL,-1L,8L,3L,0xCB4F9107L},{0xE1C3L,-9L,-8L,-1L,0x4BB8EBACL},{0x8624L,1L,1L,-1L,0xD6B41A24L},{0x8624L,1L,1L,-1L,0xD6B41A24L},{0xE1C3L,-9L,-8L,-1L,0x4BB8EBACL},{65530UL,-1L,8L,3L,0xCB4F9107L},{0xE1C3L,-9L,-8L,-1L,0x4BB8EBACL}}},{{{0x68CBL,0x47L,-8L,0x60L,0x879556C6L},{0x78D3L,0L,0x3BA0L,0x38L,-1L},{65535UL,-4L,0L,-1L,0x3BBBF133L},{65535UL,-4L,0L,-1L,0x3BBBF133L},{0x78D3L,0L,0x3BA0L,0x38L,-1L},{0x68CBL,0x47L,-8L,0x60L,0x879556C6L},{0x78D3L,0L,0x3BA0L,0x38L,-1L},{65535UL,-4L,0L,-1L,0x3BBBF133L},{65535UL,-4L,0L,-1L,0x3BBBF133L}},{{0x8624L,1L,1L,-1L,0xD6B41A24L},{0x8624L,1L,1L,-1L,0xD6B41A24L},{0xE1C3L,-9L,-8L,-1L,0x4BB8EBACL},{65530UL,-1L,8L,3L,0xCB4F9107L},{0xE1C3L,-9L,-8L,-1L,0x4BB8EBACL},{0x8624L,1L,1L,-1L,0xD6B41A24L},{0x8624L,1L,1L,-1L,0xD6B41A24L},{0xE1C3L,-9L,-8L,-1L,0x4BB8EBACL},{65530UL,-1L,8L,3L,0xCB4F9107L}},{{0x85E4L,0xCFL,0x1528L,0x9DL,0xD8B2F938L},{0x78D3L,0L,0x3BA0L,0x38L,-1L},{0x85E4L,0xCFL,0x1528L,0x9DL,0xD8B2F938L},{0x68CBL,0x47L,-8L,0x60L,0x879556C6L},{0x68CBL,0x47L,-8L,0x60L,0x879556C6L},{0x85E4L,0xCFL,0x1528L,0x9DL,0xD8B2F938L},{0x78D3L,0L,0x3BA0L,0x38L,-1L},{0x85E4L,0xCFL,0x1528L,0x9DL,0xD8B2F938L},{0x68CBL,0x47L,-8L,0x60L,0x879556C6L}},{{65535UL,0x4CL,-1L,-1L,1L},{0xE1C3L,-9L,-8L,-1L,0x4BB8EBACL},{0xE1C3L,-9L,-8L,-1L,0x4BB8EBACL},{65535UL,0x4CL,-1L,-1L,1L},{65535UL,-1L,6L,1L,0x50DEC7D6L},{65535UL,0x4CL,-1L,-1L,1L},{0xE1C3L,-9L,-8L,-1L,0x4BB8EBACL},{0xE1C3L,-9L,-8L,-1L,0x4BB8EBACL},{65535UL,0x4CL,-1L,-1L,1L}}},{{{0x3FE2L,0xFCL,0x2E64L,-4L,0xAE891756L},{0x68CBL,0x47L,-8L,0x60L,0x879556C6L},{65535UL,-4L,0L,-1L,0x3BBBF133L},{0x68CBL,0x47L,-8L,0x60L,0x879556C6L},{0x3FE2L,0xFCL,0x2E64L,-4L,0xAE891756L},{0x3FE2L,0xFCL,0x2E64L,-4L,0xAE891756L},{0x68CBL,0x47L,-8L,0x60L,0x879556C6L},{65535UL,-4L,0L,-1L,0x3BBBF133L},{0x68CBL,0x47L,-8L,0x60L,0x879556C6L}},{{0xE1C3L,-9L,-8L,-1L,0x4BB8EBACL},{65535UL,-1L,6L,1L,0x50DEC7D6L},{65530UL,-1L,8L,3L,0xCB4F9107L},{65530UL,-1L,8L,3L,0xCB4F9107L},{65535UL,-1L,6L,1L,0x50DEC7D6L},{0xE1C3L,-9L,-8L,-1L,0x4BB8EBACL},{65535UL,-1L,6L,1L,0x50DEC7D6L},{65530UL,-1L,8L,3L,0xCB4F9107L},{65530UL,-1L,8L,3L,0xCB4F9107L}},{{0x3FE2L,0xFCL,0x2E64L,-4L,0xAE891756L},{0x3FE2L,0xFCL,0x2E64L,-4L,0xAE891756L},{0x68CBL,0x47L,-8L,0x60L,0x879556C6L},{65535UL,-4L,0L,-1L,0x3BBBF133L},{0x68CBL,0x47L,-8L,0x60L,0x879556C6L},{0x3FE2L,0xFCL,0x2E64L,-4L,0xAE891756L},{0x3FE2L,0xFCL,0x2E64L,-4L,0xAE891756L},{0x68CBL,0x47L,-8L,0x60L,0x879556C6L},{65535UL,-4L,0L,-1L,0x3BBBF133L}},{{65535UL,0x4CL,-1L,-1L,1L},{65535UL,-1L,6L,1L,0x50DEC7D6L},{65535UL,0x4CL,-1L,-1L,1L},{0xE1C3L,-9L,-8L,-1L,0x4BB8EBACL},{0xE1C3L,-9L,-8L,-1L,0x4BB8EBACL},{65535UL,0x4CL,-1L,-1L,1L},{65535UL,-1L,6L,1L,0x50DEC7D6L},{65535UL,0x4CL,-1L,-1L,1L},{0xE1C3L,-9L,-8L,-1L,0x4BB8EBACL}}}}; +static struct S0 *g_91 = &g_92[3][1][3]; +static int32_t *g_94 = &g_90; +static int32_t g_97 = 0L; +static const int32_t *g_130 = (void*)0; +static const int32_t **g_129[4] = {(void*)0,(void*)0,(void*)0,(void*)0}; +static uint16_t g_150 = 0xD7ECL; +static uint32_t g_156[6][8] = {{4294967295UL,0x5E426DA7L,5UL,0x5E426DA7L,0UL,0UL,0x5E426DA7L,5UL},{0UL,0UL,0x5E426DA7L,5UL,0x5E426DA7L,0UL,0UL,0x5E426DA7L},{0x43A2B23CL,0x5E426DA7L,0x5E426DA7L,0x43A2B23CL,4294967295UL,0x43A2B23CL,0x5E426DA7L,0x5E426DA7L},{0x5E426DA7L,4294967295UL,5UL,5UL,4294967295UL,0x5E426DA7L,4294967295UL,5UL},{0x43A2B23CL,4294967295UL,0x43A2B23CL,0x5E426DA7L,0x5E426DA7L,0x43A2B23CL,4294967295UL,0x43A2B23CL},{0UL,0x5E426DA7L,5UL,0x5E426DA7L,0UL,0UL,0x5E426DA7L,5UL}}; +static int32_t *g_185 = &g_97; +static int32_t **g_184 = &g_185; +static uint32_t g_213 = 2UL; +static int8_t ***g_272 = (void*)0; +static uint16_t g_278[1][4] = {{65535UL,65535UL,65535UL,65535UL}}; +static uint8_t g_294 = 0x8DL; +static int8_t g_353 = 0x6DL; +static uint32_t g_356 = 0UL; +static const uint16_t g_357 = 0xF420L; +static int8_t g_359[4] = {0x2CL,0x2CL,0x2CL,0x2CL}; +static uint32_t g_428 = 0x0034FCF9L; +static const struct S1 g_433 = {96,257,-1,30005,-437}; +static const struct S1 *g_432 = &g_433; +static uint32_t g_489 = 0UL; +static uint32_t g_504 = 0x38500FCCL; +static uint32_t g_518 = 0x7A80F367L; +static int32_t g_544[9][4] = {{0x433C63A2L,0xE3D1AC7EL,6L,0L},{5L,6L,0xFD45AB81L,0xBDED5D88L},{6L,0x433C63A2L,0x00D2AF56L,0x00D2AF56L},{6L,6L,0xFD45AB81L,0xD4E567DBL},{5L,0x00D2AF56L,6L,6L},{0x433C63A2L,7L,(-4L),6L},{0L,7L,0L,6L},{7L,0x00D2AF56L,0x7AF8F90EL,0xD4E567DBL},{0xD4E567DBL,6L,0x433C63A2L,0x00D2AF56L}}; +static struct S0 g_576 = {65535UL,-1L,0L,0x7CL,-3L}; +static int32_t g_584 = 0xEF0DB528L; +static int32_t ***g_667 = (void*)0; +static int32_t ****g_666[5][4] = {{&g_667,&g_667,&g_667,&g_667},{&g_667,&g_667,&g_667,&g_667},{&g_667,&g_667,&g_667,&g_667},{&g_667,&g_667,&g_667,&g_667},{&g_667,&g_667,&g_667,&g_667}}; +static int8_t g_698 = 0x03L; +static int32_t g_760 = (-1L); +static uint8_t *g_780 = &g_294; +static uint8_t **g_779 = &g_780; +static uint8_t **g_785[3][2] = {{&g_780,(void*)0},{(void*)0,&g_780},{(void*)0,(void*)0}}; +static int8_t g_857[1][9][4] = {{{0xEBL,(-1L),0xEBL,0xEBL},{(-1L),(-1L),(-1L),(-1L)},{(-1L),0xEBL,0xEBL,(-1L)},{0xEBL,(-1L),0xEBL,0xEBL},{(-1L),(-1L),(-1L),(-1L)},{(-1L),0xEBL,0xEBL,(-1L)},{0xEBL,(-1L),0xEBL,0xEBL},{(-1L),(-1L),(-1L),(-1L)},{(-1L),0xEBL,0xEBL,(-1L)}}}; +static struct S1 g_905[7] = {{91,303,0,27868,-625},{91,303,0,27868,-625},{91,303,0,27868,-625},{91,303,0,27868,-625},{91,303,0,27868,-625},{91,303,0,27868,-625},{91,303,0,27868,-625}}; +static struct S0 **g_910 = &g_91; +static struct S0 ***g_909 = &g_910; +static uint32_t g_1042 = 4294967288UL; +static uint32_t g_1058 = 0UL; +static uint32_t g_1138[10] = {0x2CC729EFL,0x2CC729EFL,0x2CC729EFL,0x2CC729EFL,0x2CC729EFL,0x2CC729EFL,0x2CC729EFL,0x2CC729EFL,0x2CC729EFL,0x2CC729EFL}; +static uint32_t *g_1145 = &g_1138[0]; +static uint32_t **g_1144 = &g_1145; +static int32_t g_1225 = 0xC7C95C74L; +static int32_t g_1239 = 0x41BFFEA5L; +static int8_t g_1257[8] = {5L,0x31L,5L,0x31L,5L,0x31L,5L,0x31L}; +static int16_t g_1261 = 0x1F90L; +static struct S0 **g_1294 = (void*)0; +static uint32_t *g_1339 = &g_1042; +static uint32_t **g_1338[3] = {&g_1339,&g_1339,&g_1339}; +static int16_t *g_1372 = &g_1261; +static int16_t **g_1371 = &g_1372; +static uint8_t ***g_1386 = &g_785[1][0]; +static uint8_t g_1402[5] = {255UL,255UL,255UL,255UL,255UL}; +static const int32_t g_1436 = 0x93A97107L; +static int32_t *g_1450[5] = {(void*)0,(void*)0,(void*)0,(void*)0,(void*)0}; +static uint8_t g_1682 = 1UL; +static uint8_t * const g_1681 = &g_1682; +static uint8_t * const *g_1680 = &g_1681; +static uint8_t * const **g_1679 = &g_1680; +static uint8_t * const ***g_1678[8][6][4] = {{{(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},{(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}},{{(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},{(void*)0,(void*)0,(void*)0,(void*)0},{(void*)0,(void*)0,(void*)0,(void*)0},{(void*)0,(void*)0,(void*)0,(void*)0}}}; +static int32_t g_1695[4][5][9] = {{{(-6L),0x427FB25DL,(-1L),0x073E8F67L,8L,1L,3L,0x537E2500L,0x56EAC977L},{0xD85C7FAFL,0x5DB9A4CCL,(-6L),0x073E8F67L,(-7L),8L,3L,9L,0xAD915C69L},{0x903CDB84L,3L,0x0AE52047L,(-1L),1L,1L,(-1L),0x0AE52047L,3L},{0x0C02BF6DL,0xE4C26D6EL,(-1L),1L,(-1L),(-1L),0x0653B189L,0L,0xE5196C37L},{0x2B93F6CCL,0L,0x073E8F67L,(-1L),(-1L),(-7L),0x58D09167L,(-6L),(-1L)}},{{8L,0xE4C26D6EL,1L,(-1L),0x58D09167L,0L,(-10L),0x2B93F6CCL,0L},{0x9B61D6B7L,3L,0xE5196C37L,0x21E388DCL,5L,0x427FB25DL,0L,(-10L),(-7L)},{0x537E2500L,0x5DB9A4CCL,0x2A65B087L,0x85E59DB9L,0xB966E758L,1L,1L,1L,(-7L)},{0x073E8F67L,0x427FB25DL,0x21E388DCL,0x0AE52047L,1L,(-1L),0L,5L,0L},{(-6L),9L,0L,0L,9L,(-6L),0x2B93F6CCL,0xD85C7FAFL,(-1L)}},{{0L,(-1L),0x2B93F6CCL,0x427FB25DL,0x0C02BF6DL,0L,0x0AE52047L,(-1L),0xE5196C37L},{0xDEA2987DL,(-1L),0x046970CFL,(-1L),0x537E2500L,(-6L),0x2B93F6CCL,0x9B61D6B7L,3L},{1L,(-1L),0x58D09167L,0L,(-10L),0x2B93F6CCL,0L,0x427FB25DL,0xAD915C69L},{1L,0xFB6358FBL,0x5DB9A4CCL,3L,(-1L),0xAD915C69L,1L,(-2L),0x56EAC977L},{8L,0x0AE52047L,5L,(-1L),(-1L),0xB966E758L,0L,1L,(-1L)}},{{(-1L),1L,(-1L),0x58D09167L,(-10L),3L,(-10L),0x58D09167L,(-1L)},{0x56EAC977L,0x56EAC977L,0x903CDB84L,8L,0x537E2500L,0xE4C26D6EL,0x58D09167L,1L,0x21E388DCL},{0x58D09167L,0xCDBE185FL,(-2L),(-9L),0x0C02BF6DL,(-1L),0x0653B189L,(-1L),1L},{(-1L),1L,0x903CDB84L,0xE5196C37L,9L,0xFB6358FBL,(-1L),(-1L),0L},{0x05DCEBBBL,8L,(-1L),0xD85C7FAFL,1L,0x0368BC60L,3L,0x046970CFL,0xFB6358FBL}}}; +static int8_t g_2022 = 0L; +static int32_t g_2037 = 0L; +static uint32_t g_2052 = 0x9C7F09F6L; +static uint32_t ***g_2099 = (void*)0; + + +/* --- FORWARD DECLARATIONS --- */ +static uint32_t func_1(void); +static int32_t ** func_13(int32_t * p_14); +static int32_t func_21(int32_t ** p_22, int32_t * const p_23, int8_t p_24); +static int32_t ** func_25(int32_t * p_26, int32_t ** p_27, int16_t p_28, int16_t p_29); +static int32_t * func_30(int32_t p_31, int32_t * p_32, struct S0 p_33, int32_t ** p_34); +static uint8_t func_40(int32_t p_41); +static struct S1 func_47(int32_t * p_48); +static int32_t * func_49(int32_t ** p_50, int16_t p_51, struct S0 p_52); +static struct S0 func_60(int32_t p_61); +static struct S0 * func_62(struct S1 p_63, uint32_t p_64, uint32_t p_65, int32_t ** const p_66, int32_t ** p_67); + + +/* --- FUNCTIONS --- */ +/* ------------------------------------------ */ +/* + * reads : g_92.f2 g_53 g_54 g_1680 g_1681 g_1682 g_94 g_3 g_15 g_90 g_1257 g_432 g_433 g_68 g_6 g_83 g_20 g_91 g_97 g_92 g_780 g_294 g_2022 g_2037 g_1679 g_150 g_1371 g_1372 g_1261 g_779 g_2052 g_1339 g_1042 g_359 g_1239 g_910 + * writes: g_3 g_1261 g_92.f2 g_83 g_15 g_1257 g_90 g_91 g_94 g_97 g_2022 g_1682 g_294 g_1042 g_428 g_54 g_20 g_584 g_2099 g_1450 g_504 + */ +static uint32_t func_1(void) +{ /* block id: 0 */ + int32_t l_2[10] = {0L,0L,0L,0L,0L,0L,0L,0L,0L,0L}; + int32_t **l_1500 = &g_185; + uint16_t l_1513 = 0x73BAL; + int32_t l_1564 = 0x551E51B6L; + int32_t l_1578 = 0L; + int32_t **l_1609 = &g_1450[4]; + int32_t l_1653 = 0x77865CC7L; + int32_t l_1656 = 0L; + int32_t l_1658[2][4] = {{4L,4L,4L,4L},{4L,4L,4L,4L}}; + int32_t l_1696 = (-7L); + uint16_t l_1759 = 1UL; + int8_t *l_1783 = &g_1257[1]; + int8_t **l_1782[6] = {(void*)0,&l_1783,&l_1783,(void*)0,&l_1783,&l_1783}; + int32_t *l_1801[3]; + struct S0 l_1802 = {0x3C70L,0L,0xE823L,0xB4L,8L}; + int16_t l_1835 = 0x24A2L; + uint8_t l_1868 = 0x8EL; + struct S0 **l_1881[6][2]; + uint8_t l_1908 = 0x6CL; + struct S1 *l_1958[6] = {&g_68,&g_68,&g_68,&g_68,&g_68,&g_68}; + struct S1 **l_1957[10] = {&l_1958[0],&l_1958[0],&l_1958[0],&l_1958[0],&l_1958[0],&l_1958[0],&l_1958[0],&l_1958[0],&l_1958[0],&l_1958[0]}; + const uint32_t *l_1999 = &g_518; + const uint32_t **l_1998 = &l_1999; + int32_t ***** const l_2000 = &g_666[1][2]; + uint16_t l_2002 = 0x939BL; + uint32_t l_2004 = 0x02546869L; + uint32_t l_2018 = 8UL; + uint32_t l_2053 = 0x6D00545FL; + uint16_t l_2065 = 0x89B5L; + int32_t l_2066[9] = {(-1L),(-1L),(-1L),(-1L),(-1L),(-1L),(-1L),(-1L),(-1L)}; + uint32_t l_2067 = 0x46071B4CL; + uint16_t l_2082 = 2UL; + int i, j; + for (i = 0; i < 3; i++) + l_1801[i] = &l_1658[0][1]; + for (i = 0; i < 6; i++) + { + for (j = 0; j < 2; j++) + l_1881[i][j] = &g_91; + } +lbl_2105: + for (g_3[0] = 1; (g_3[0] <= 9); g_3[0] += 1) + { /* block id: 3 */ + int16_t ***l_1574 = (void*)0; + int32_t l_1577 = 0L; + int32_t l_1579 = 0L; + struct S0 l_1616 = {1UL,0xF6L,6L,7L,0L}; + uint16_t l_1618 = 0x18F5L; + int32_t l_1619 = (-8L); + int32_t **l_1621[5][5] = {{(void*)0,&g_185,(void*)0,&g_185,(void*)0},{&g_185,&g_185,&g_185,&g_185,&g_185},{(void*)0,&g_185,(void*)0,&g_185,(void*)0},{&g_185,&g_185,&g_185,&g_185,&g_185},{(void*)0,&g_185,(void*)0,&g_185,(void*)0}}; + int32_t l_1657 = 5L; + int8_t *l_1699 = &g_576.f1; + int8_t **l_1698 = &l_1699; + int8_t ***l_1697 = &l_1698; + uint32_t l_1709 = 1UL; + int32_t l_1730 = 0xA4003686L; + int32_t l_1731 = 1L; + int32_t l_1733 = 8L; + int32_t l_1734 = (-1L); + int32_t l_1735 = 1L; + int32_t l_1736 = 1L; + int32_t l_1737 = 0x063BC762L; + int32_t l_1738 = 0L; + int32_t l_1739 = 0xEE142BBCL; + int32_t l_1740[7] = {1L,1L,1L,1L,1L,1L,1L}; + int16_t l_1748 = 0xC892L; + int32_t *l_1803 = &l_1734; + const uint8_t ** const ***l_1808 = (void*)0; + int32_t ****l_1834 = &g_667; + uint32_t l_1849 = 0x5FFDC98BL; + uint16_t l_1935 = 0x99F0L; + int i, j; + } + for (g_1261 = 0; (g_1261 >= 11); ++g_1261) + { /* block id: 929 */ + uint32_t l_1947 = 0UL; + uint8_t l_2001 = 0xB8L; + uint8_t l_2021[1][5]; + int32_t l_2069 = 0x28203BBBL; + int32_t *l_2094 = &g_576.f4; + int32_t l_2106 = 0x8F4603E5L; + int32_t l_2107 = 0xD7C30BE3L; + int32_t l_2108 = 0x7A725D9CL; + int32_t l_2109[8] = {0L,0L,0L,0L,0L,0L,0L,0L}; + uint16_t l_2110 = 0xA6BBL; + int i, j; + for (i = 0; i < 1; i++) + { + for (j = 0; j < 5; j++) + l_2021[i][j] = 0xE3L; + } + for (l_1802.f4 = 17; (l_1802.f4 >= 14); l_1802.f4--) + { /* block id: 932 */ + int32_t l_1959 = 0x5C4E9040L; + int32_t l_1960 = 0xD082F1F8L; + int32_t l_1968 = (-6L); + int16_t ***l_1995 = (void*)0; + uint32_t *l_2063 = &g_428; + uint8_t l_2071 = 0UL; + struct S0 l_2097 = {6UL,0x5CL,-1L,0x3FL,2L}; + int32_t **l_2101 = &l_1801[0]; + for (l_1802.f2 = 20; (l_1802.f2 == (-10)); --l_1802.f2) + { /* block id: 935 */ + int16_t l_1954 = 0xD64CL; + int32_t l_2016 = 0xBD733EEBL; + struct S1 *l_2020 = &g_68; + l_1960 ^= ((l_1947 >= (safe_lshift_func_uint8_t_u_u(((((safe_rshift_func_int16_t_s_u((g_92[3][1][3].f2 |= (safe_div_func_uint8_t_u_u(0xA5L, l_1954))), 13)) || (safe_sub_func_int16_t_s_s(0xD018L, 65535UL))) , (func_47((*g_53)) , &g_432)) != l_1957[0]), (**g_1680)))) < l_1959); + if ((*g_94)) + { /* block id: 938 */ + int16_t ****l_1996 = &l_1995; + uint32_t l_1997 = 1UL; + uint32_t l_2003 = 0x5496A29AL; + if ((safe_unary_minus_func_uint8_t_u((safe_div_func_uint8_t_u_u((safe_lshift_func_uint8_t_u_u((safe_sub_func_int8_t_s_s(((*l_1783) &= l_1968), (func_60(((*g_432) , 6L)) , (*g_780)))), 7)), l_2001))))) + { /* block id: 942 */ + l_1960 |= (*g_54); + } + else + { /* block id: 944 */ + if (l_1968) + break; + } + } + else + { /* block id: 947 */ + uint8_t l_2013 = 0xD2L; + int16_t *l_2017[5][5][8] = {{{&g_576.f2,&g_576.f2,&l_1954,&g_576.f2,&g_576.f2,&l_1954,&l_1954,&l_1954},{&g_92[3][1][3].f2,&g_576.f2,&l_1835,&l_1835,&g_576.f2,&g_92[3][1][3].f2,&l_1835,&g_576.f2},{&l_1954,&l_1835,&l_1835,&l_1954,&l_1835,&l_1835,&l_1954,&g_92[3][1][3].f2},{&g_576.f2,&g_576.f2,&l_1954,&l_1954,&l_1954,&l_1954,&g_576.f2,&g_576.f2},{&g_92[3][1][3].f2,&l_1954,&l_1835,&l_1835,&l_1954,&l_1835,&l_1835,&l_1954}},{{&g_576.f2,&l_1835,&g_92[3][1][3].f2,&g_576.f2,&l_1835,&l_1835,&g_576.f2,&g_92[3][1][3].f2},{&l_1954,&l_1954,&l_1954,&g_576.f2,&g_576.f2,&l_1954,&g_576.f2,&g_576.f2},{&g_92[3][1][3].f2,&g_576.f2,&g_92[3][1][3].f2,&l_1835,&g_576.f2,&l_1835,&l_1835,&g_576.f2},{&g_576.f2,&l_1835,&l_1835,&g_576.f2,&l_1835,&g_92[3][1][3].f2,&g_576.f2,&g_92[3][1][3].f2},{&g_576.f2,&g_576.f2,&l_1954,&g_576.f2,&g_576.f2,&l_1954,&l_1954,&l_1954}},{{&g_92[3][1][3].f2,&g_576.f2,&l_1835,&l_1835,&g_576.f2,&g_92[3][1][3].f2,&l_1835,&g_576.f2},{&l_1954,&l_1835,&l_1835,&l_1954,&l_1835,&l_1835,&l_1954,&g_92[3][1][3].f2},{&g_576.f2,&g_576.f2,&l_1954,&l_1954,&l_1954,&l_1954,&g_576.f2,&g_576.f2},{&g_92[3][1][3].f2,&l_1954,&l_1835,&l_1835,&l_1954,&l_1835,&l_1835,&g_92[3][1][3].f2},{&l_1835,&l_1954,(void*)0,&l_1835,&g_20,&g_20,&l_1835,(void*)0}},{{&g_92[3][1][3].f2,&g_92[3][1][3].f2,&l_1954,&l_1835,&l_1835,&l_1954,&l_1835,&l_1835},{(void*)0,&l_1835,(void*)0,&g_20,&l_1835,&l_1954,&l_1954,&l_1835},{&l_1835,&l_1954,&l_1954,&l_1835,&g_20,(void*)0,&l_1835,(void*)0},{&l_1835,&l_1835,&l_1954,&l_1835,&l_1835,&l_1954,&g_92[3][1][3].f2,&g_92[3][1][3].f2},{(void*)0,&l_1835,&g_20,&g_20,&l_1835,(void*)0,&l_1954,&l_1835}},{{&g_92[3][1][3].f2,&l_1954,&g_20,&g_92[3][1][3].f2,&g_20,&l_1954,&g_92[3][1][3].f2,(void*)0},{&l_1835,&l_1835,&l_1954,&g_92[3][1][3].f2,&g_92[3][1][3].f2,&l_1954,&l_1835,&l_1835},{(void*)0,&g_92[3][1][3].f2,&l_1954,&g_20,&g_92[3][1][3].f2,&g_20,&l_1954,&g_92[3][1][3].f2},{&l_1835,&l_1954,(void*)0,&l_1835,&g_20,&g_20,&l_1835,(void*)0},{&g_92[3][1][3].f2,&g_92[3][1][3].f2,&l_1954,&l_1835,&l_1835,&l_1954,&l_1835,&l_1835}}}; + uint16_t *l_2019 = &l_1513; + int32_t l_2054 = 0x15864E9CL; + int i, j, k; + g_2022 &= ((safe_add_func_uint32_t_u_u((0x35C2757CL < l_1959), (safe_mod_func_int8_t_s_s(((*l_1783) = ((safe_mod_func_int8_t_s_s((safe_lshift_func_uint8_t_u_u((((l_2013 , ((*l_2019) &= (safe_rshift_func_int16_t_s_s((l_2018 = l_2016), 0)))) ^ (((func_60(l_2013) , l_2020) != &g_68) && (l_2013 > 0x26F129C6L))) | l_2021[0][1]), 6)), 1L)) ^ 1L)), l_1954)))) <= 1UL); + (*g_54) = l_2013; + l_2054 |= (safe_mod_func_int32_t_s_s(((safe_div_func_uint16_t_u_u(((((safe_rshift_func_uint16_t_u_s(l_1968, (safe_div_func_uint32_t_u_u((((l_1959 = (safe_lshift_func_int8_t_s_u((safe_sub_func_int16_t_s_s((((l_1960 |= ((**g_779) = (safe_sub_func_int8_t_s_s((g_2037 , (safe_sub_func_int16_t_s_s((((!((safe_sub_func_uint32_t_u_u((safe_lshift_func_uint8_t_u_s(((***g_1679) = (**g_1680)), l_2021[0][1])), ((safe_lshift_func_uint16_t_u_s(g_3[4], 13)) < (safe_sub_func_uint16_t_u_u(65535UL, (((safe_sub_func_uint8_t_u_u((safe_add_func_uint32_t_u_u(l_2016, ((func_60((*g_94)) , (-6L)) && l_1959))), l_1959)) , g_150) | l_2013)))))) && 0x909A7A8FL)) < (-5L)) || 65531UL), (**g_1371)))), l_1954)))) <= 0x83L) | l_2013), 1L)), l_2013))) < 0x0C9DL) < 1L), g_2052)))) || 0x89L) > l_2013) < 0UL), 65534UL)) < l_2001), l_2053)); + } + return (*g_1339); + } + l_2067 &= (l_2066[2] = (0x57717F14L != (!(safe_add_func_int16_t_s_s(((safe_add_func_int8_t_s_s((0x63L > (safe_mod_func_int32_t_s_s(((*g_54) = (safe_mul_func_int8_t_s_s(l_1959, (((*l_2063) = (+((*g_1339) = 4294967291UL))) >= 0x26BB40F7L)))), 1UL))), l_1947)) >= (safe_unary_minus_func_uint16_t_u(2UL))), ((l_2065 ^ l_1947) <= g_433.f2)))))); + for (g_428 = 0; (g_428 <= 1); g_428 += 1) + { /* block id: 968 */ + int32_t l_2068 = (-1L); + int32_t l_2070 = 0x1F9A11E0L; + l_2071--; + } + if ((safe_mod_func_uint32_t_u_u(l_1959, ((*g_1339) = 4294967292UL)))) + { /* block id: 972 */ + uint8_t l_2078 = 2UL; + int8_t *l_2087 = &g_2022; + for (l_1802.f1 = 0; (l_1802.f1 < 28); l_1802.f1 = safe_add_func_int8_t_s_s(l_1802.f1, 8)) + { /* block id: 975 */ + if ((*g_94)) + break; + return l_2078; + } + for (l_1656 = 0; (l_1656 <= 3); l_1656 += 1) + { /* block id: 981 */ + int32_t *l_2079 = &g_15; + int16_t *l_2090 = (void*)0; + int16_t *l_2091[6]; + int i; + for (i = 0; i < 6; i++) + l_2091[i] = &g_576.f2; + if (g_1257[(l_1656 + 2)]) + break; + if (l_2069) + break; + (*g_53) = l_2079; + (*g_54) &= ((safe_mod_func_uint8_t_u_u(l_2082, (safe_mul_func_int8_t_s_s((((safe_sub_func_uint8_t_u_u(0x7DL, ((~(((void*)0 == l_2087) & l_2001)) < (((((safe_lshift_func_uint8_t_u_s(l_2071, 2)) > (~(g_20 |= (*g_1372)))) == g_359[3]) <= ((*g_1680) == (*g_779))) ^ (**g_779))))) != (**g_1680)) <= (*g_1681)), l_2069)))) && (*g_1372)); + } + } + else + { /* block id: 988 */ + uint32_t ***l_2098 = (void*)0; + int32_t l_2104 = 0L; + for (g_584 = (-27); (g_584 > 23); ++g_584) + { /* block id: 991 */ + l_2094 = (*g_53); + for (g_15 = 14; (g_15 >= (-7)); g_15 = safe_sub_func_uint32_t_u_u(g_15, 6)) + { /* block id: 995 */ + int32_t *l_2100 = &g_544[0][0]; + (*g_53) = func_30(((*g_1339) > ((-10L) & (l_2097 , (0L && ((g_2099 = l_2098) != (g_1239 , &g_1338[2])))))), ((*l_1609) = l_2100), (*g_91), l_2101); + } + for (l_1578 = 0; (l_1578 != 0); ++l_1578) + { /* block id: 1002 */ + if (l_2104) + break; + } + } + if (g_150) + goto lbl_2105; + (**l_2101) ^= ((0x77L <= (*g_780)) | 4L); + } + } + (**g_53) |= 0x338F39E1L; + l_2110++; + } + return (*g_1339); +} + + +/* ------------------------------------------ */ +/* + * reads : g_15 g_12 g_20 g_53 g_294 g_1450 g_1372 g_1261 g_94 g_90 g_3 g_1339 g_1042 + * writes: g_15 g_20 g_54 g_294 g_83 g_698 g_432 g_1261 g_90 + */ +static int32_t ** func_13(int32_t * p_14) +{ /* block id: 16 */ + struct S0 l_55 = {0x0EABL,1L,0xC62BL,0x19L,-8L}; + int32_t *l_913 = &g_15; + int16_t **l_1374 = &g_1372; + int32_t l_1416 = 0x288A7F16L; + int32_t l_1417 = 8L; + int32_t l_1418 = 0xF05E35F3L; + int32_t l_1419 = 0L; + int32_t l_1420[10][7] = {{0x02F3AB36L,(-1L),0x02F3AB36L,0x02F3AB36L,(-1L),0x02F3AB36L,0x02F3AB36L},{0x64FCE704L,0x64FCE704L,3L,0x64FCE704L,0x64FCE704L,3L,0x64FCE704L},{(-1L),0x02F3AB36L,0x02F3AB36L,(-1L),0x02F3AB36L,0x02F3AB36L,(-1L)},{8L,0x64FCE704L,8L,8L,0x64FCE704L,8L,8L},{(-1L),(-1L),0xB6B56C67L,(-1L),(-1L),0xB6B56C67L,(-1L)},{0x64FCE704L,8L,8L,0x64FCE704L,8L,8L,0x64FCE704L},{0x02F3AB36L,(-1L),0x02F3AB36L,0x02F3AB36L,(-1L),0x02F3AB36L,0x02F3AB36L},{0x64FCE704L,0x64FCE704L,3L,0x64FCE704L,0x64FCE704L,3L,0x64FCE704L},{(-1L),0x02F3AB36L,0x02F3AB36L,(-1L),0x02F3AB36L,0x02F3AB36L,(-1L)},{8L,0x64FCE704L,8L,8L,0x64FCE704L,8L,8L}}; + int8_t l_1427 = 0x3FL; + int32_t l_1429 = 0x3BD3FFBDL; + struct S1 l_1460 = {59,102,-0,21913,-681}; + int8_t *l_1478 = &g_359[3]; + int8_t ** const l_1477 = &l_1478; + int8_t ** const *l_1476 = &l_1477; + int32_t **l_1484 = (void*)0; + int i, j; + for (g_15 = 0; (g_15 <= 21); g_15++) + { /* block id: 19 */ + int32_t *l_19 = &g_3[0]; + int32_t **l_18 = &l_19; + int32_t l_37 = 0L; + uint32_t *l_912 = &g_518; + struct S0 l_1360 = {6UL,0xB1L,1L,0x9DL,0L}; + uint8_t ** const *l_1383[5][8] = {{&g_779,&g_779,&g_779,&g_779,&g_779,&g_779,&g_779,&g_779},{&g_779,&g_779,&g_779,&g_779,&g_779,&g_779,&g_779,&g_779},{&g_779,&g_779,&g_779,&g_779,&g_779,&g_779,&g_779,&g_779},{&g_779,&g_779,&g_779,&g_779,&g_779,&g_779,&g_779,&g_779},{&g_779,&g_779,&g_779,&g_779,&g_779,&g_779,&g_779,&g_779}}; + int32_t l_1413 = (-5L); + int32_t l_1414 = 1L; + int32_t l_1415 = 0x2585D5A7L; + int32_t l_1421 = 0x7D67A841L; + int32_t l_1422 = 1L; + int32_t l_1423 = 0xA2EE8647L; + int32_t l_1424 = 2L; + int32_t l_1425 = 0x2EFF0BD9L; + int32_t l_1428[2]; + uint8_t l_1430 = 255UL; + struct S0 *l_1439 = (void*)0; + uint32_t l_1442 = 0xA45523CEL; + int32_t *l_1448 = (void*)0; + int32_t *l_1449 = &l_1419; + int i, j; + for (i = 0; i < 2; i++) + l_1428[i] = 0L; + (*l_18) = (void*)0; + g_20 &= g_12; + } + (*g_53) = p_14; + (*g_53) = &l_1420[4][3]; + for (g_294 = 0; (g_294 <= 3); g_294 += 1) + { /* block id: 705 */ + int32_t l_1459 = 0x47B85732L; + int32_t ***l_1464[10]; + int8_t * const *l_1480 = &l_1478; + int8_t * const **l_1479 = &l_1480; + int i; + for (i = 0; i < 10; i++) + l_1464[i] = (void*)0; + (*g_53) = g_1450[2]; + for (g_83 = 3; (g_83 >= 0); g_83 -= 1) + { /* block id: 709 */ + struct S1 *l_1451 = &g_68; + int32_t l_1463 = 0xB66E4D5EL; + int8_t *l_1474 = (void*)0; + int8_t *l_1475[10] = {(void*)0,(void*)0,&g_353,&l_55.f1,&g_353,(void*)0,(void*)0,&g_353,&l_55.f1,&g_353}; + int8_t ** const l_1473[9] = {(void*)0,&l_1475[2],(void*)0,(void*)0,&l_1475[2],(void*)0,(void*)0,&l_1475[2],(void*)0}; + int8_t ** const *l_1472 = &l_1473[1]; + int8_t ** const **l_1471[1]; + struct S0 l_1481 = {1UL,-1L,-1L,0x33L,0xFB97AB4BL}; + int32_t *****l_1482 = (void*)0; + uint16_t l_1483 = 0x3C40L; + int i; + for (i = 0; i < 1; i++) + l_1471[i] = &l_1472; + for (g_698 = 5; (g_698 >= 1); g_698 -= 1) + { /* block id: 712 */ + struct S1 **l_1452 = &l_1451; + struct S1 **l_1453 = (void*)0; + struct S1 **l_1454 = (void*)0; + g_432 = ((*l_1452) = l_1451); + } + (*g_94) = ((((*g_1372) = ((((safe_div_func_uint8_t_u_u((((safe_sub_func_int16_t_s_s((((l_1459 & ((&g_666[3][0] != (((((l_1460 , (((safe_mul_func_int16_t_s_s(l_1463, ((void*)0 == l_1464[6]))) ^ ((safe_lshift_func_int16_t_s_u((0xFC449DBAL || (safe_sub_func_uint16_t_u_u((safe_add_func_uint32_t_u_u((+((l_1476 = (void*)0) != l_1479)), (*p_14))), (*g_1372)))), l_1463)) >= 0xE908L)) && l_1459)) && 1UL) == (*p_14)) , l_1481) , l_1482)) == (*l_913))) ^ l_1483) < (*g_94)), 65526UL)) & 0x697DL) & (*l_913)), 0x98L)) <= l_1459) != g_3[0]) >= 65535UL)) > 5UL) && (*g_1339)); + } + } + return l_1484; +} + + +/* ------------------------------------------ */ +/* + * reads : g_428 g_53 g_1338 g_54 g_3 + * writes: g_428 g_54 g_1338 + */ +static int32_t func_21(int32_t ** p_22, int32_t * const p_23, int8_t p_24) +{ /* block id: 630 */ + int32_t *l_1337 = (void*)0; + int32_t l_1342 = (-2L); + for (g_428 = 1; (g_428 < 32); g_428++) + { /* block id: 633 */ + uint32_t ***l_1340 = &g_1338[0]; + int32_t *l_1341[5] = {(void*)0,(void*)0,(void*)0,(void*)0,(void*)0}; + int i; + (*g_53) = l_1337; + (*g_53) = l_1337; + (*l_1340) = g_1338[0]; + l_1342 ^= ((void*)0 == (*g_53)); + } + return (*p_23); +} + + +/* ------------------------------------------ */ +/* + * reads : g_90 g_94 g_15 g_3 g_780 g_294 g_1294 g_909 g_910 g_433.f2 g_857 g_1042 g_353 g_1225 g_504 g_779 g_156 g_83 g_91 g_53 g_54 g_92 g_544 + * writes: g_90 g_910 g_92.f2 g_294 g_156 g_91 + */ +static int32_t ** func_25(int32_t * p_26, int32_t ** p_27, int16_t p_28, int16_t p_29) +{ /* block id: 606 */ + uint8_t l_1273 = 0UL; + int32_t l_1287 = 0x988A4625L; + struct S0 **l_1305 = &g_91; + struct S0 **l_1307 = &g_91; + struct S0 ***l_1306 = &l_1307; + int8_t *l_1310[8]; + int32_t l_1311[4][2] = {{0x85BF4A12L,0x85BF4A12L},{0x85BF4A12L,0x85BF4A12L},{0x85BF4A12L,0x85BF4A12L},{0x85BF4A12L,0x85BF4A12L}}; + int16_t *l_1314 = &g_92[3][1][3].f2; + int32_t l_1315[5][8] = {{0x9A7D1D6DL,0L,0x5D141B90L,0L,0x9A7D1D6DL,1L,1L,0x9A7D1D6DL},{0L,0xFC94235DL,0xFC94235DL,0L,0x5A407FBCL,0x9A7D1D6DL,0x5A407FBCL,0L},{0xFC94235DL,0x5A407FBCL,0xFC94235DL,1L,0x5D141B90L,0x5D141B90L,1L,0xFC94235DL},{0x5A407FBCL,0x5A407FBCL,0x5D141B90L,0x9A7D1D6DL,1L,0x9A7D1D6DL,0x5D141B90L,0x5A407FBCL},{0x5A407FBCL,0xFC94235DL,1L,0x5D141B90L,0x5D141B90L,1L,0xFC94235DL,0x5A407FBCL}}; + int32_t l_1316[1]; + uint32_t *l_1317[9] = {&g_428,&g_1042,&g_428,&g_1042,&g_428,&g_1042,&g_428,&g_1042,&g_428}; + int16_t l_1318[10][5][5] = {{{1L,0xCA09L,0xDB76L,0x9AB2L,(-1L)},{0xC6CFL,0x329AL,0x4616L,1L,0x200DL},{0x27C9L,0xE21FL,(-2L),0x4CF8L,0xF4CDL},{0x8A57L,0x657FL,0xAC44L,1L,7L},{0x1E8AL,0xAF8AL,0xEE93L,0x4D00L,0xB5C3L}},{{0x924DL,0L,1L,0x0C44L,0xB5C3L},{(-8L),0L,0xC6CFL,0x200DL,7L},{(-4L),0x200DL,0x4CF8L,0xEAF3L,0xF4CDL},{(-5L),0xAC44L,0x2C37L,(-5L),0x200DL},{0xAF8AL,1L,0x97E4L,0x4E6EL,(-1L)}},{{0xE21FL,0x9AB2L,(-1L),(-1L),0x97E4L},{0x4616L,0xD6BDL,5L,0xD2F8L,(-5L)},{7L,1L,(-8L),(-8L),1L},{0x0890L,0xC8E9L,0x8A57L,(-9L),0L},{0xE35BL,1L,7L,0x7C90L,0xD74DL}},{{0xD74DL,0x4E6EL,(-4L),0xB5C3L,0x9AB2L},{0xE35BL,0x4D00L,(-1L),(-2L),0xEAF3L},{0x0890L,0L,0xD6BDL,(-1L),0x4D11L},{7L,(-7L),0x3E6CL,0xC8E9L,(-1L)},{0x4616L,(-2L),0xE21FL,0xCB11L,0xD4A1L}},{{0xE21FL,0xEAF3L,0x0459L,0x3E6CL,0x329AL},{0xFA67L,(-2L),1L,0x36C8L,7L},{(-5L),(-9L),1L,1L,1L},{0xAC44L,0x1E8AL,0xAF8AL,0xEE93L,0x4D00L},{0xC6CFL,0xCA09L,0x879DL,0x657FL,1L}},{{0xEE93L,0xCA09L,0L,1L,0xD2F8L},{0xEAF3L,0x1E8AL,0x4D00L,0x0890L,0xC6CFL},{0x7C90L,(-9L),9L,(-5L),(-7L)},{(-8L),(-2L),(-2L),8L,(-1L)},{0x9AB2L,0xEAF3L,0x97E4L,0x0F72L,0L}},{{(-5L),(-1L),(-9L),0L,0L},{0x04F8L,(-4L),0xEE93L,(-2L),(-2L)},{0x4616L,0x657FL,0x4616L,0x1E8AL,0x0F72L},{0L,0x4E6EL,0xF4CDL,0xC6CFL,9L},{0x2C37L,0x879DL,0xC2C1L,0L,0xCA09L}},{{0x2C75L,8L,0xF4CDL,9L,0xAC44L},{0x329AL,0xD2F8L,0x4616L,1L,0x8A57L},{1L,(-8L),0xEE93L,1L,0x0459L},{0xC37DL,0x36C8L,(-9L),0x200DL,0x04F8L},{0xC2C1L,5L,0x97E4L,7L,0L}},{{9L,(-7L),(-2L),0xE35BL,0x1E8AL},{0x879DL,0x924DL,9L,(-1L),(-1L)},{(-7L),0x97E4L,0x4D00L,0x2C37L,(-4L)},{(-1L),(-4L),0L,0xCB11L,(-1L)},{0xDB76L,0x0459L,0x879DL,0xCB11L,6L}},{{1L,0xFA67L,0xAF8AL,0x2C37L,0x4616L},{7L,(-1L),1L,(-1L),0xE35BL},{0x27C9L,0L,1L,0xE35BL,(-1L)},{1L,0xD6BDL,0x0459L,7L,0L},{0x36C8L,1L,0L,0x200DL,0x7C90L}}}; + int32_t l_1319 = 0xCFB328C7L; + int32_t **l_1322[3][9] = {{&g_54,&g_94,&g_54,&g_54,&g_94,&g_54,&g_54,&g_94,&g_54},{&g_54,&g_94,&g_54,&g_54,&g_94,&g_54,&g_54,&g_94,&g_54},{&g_54,&g_94,&g_54,&g_54,&g_94,&g_54,&g_54,&g_94,&g_54}}; + struct S0 * const l_1333 = &g_576; + uint32_t l_1334[1][9]; + int i, j, k; + for (i = 0; i < 8; i++) + l_1310[i] = &g_576.f1; + for (i = 0; i < 1; i++) + l_1316[i] = 0x0B92BB51L; + for (i = 0; i < 1; i++) + { + for (j = 0; j < 9; j++) + l_1334[i][j] = 4294967286UL; + } + for (g_90 = (-11); (g_90 <= (-11)); ++g_90) + { /* block id: 609 */ + uint32_t l_1270 = 0xE1184BB9L; + int16_t *l_1282 = &g_1261; + l_1287 &= ((safe_div_func_int16_t_s_s(1L, (l_1270 , (safe_lshift_func_int8_t_s_u((l_1273 < (safe_div_func_int16_t_s_s(((safe_div_func_int32_t_s_s((safe_sub_func_uint16_t_u_u((l_1270 | (safe_sub_func_int16_t_s_s(((&g_20 != l_1282) ^ l_1273), (safe_rshift_func_int8_t_s_u((safe_lshift_func_int16_t_s_s(1L, p_29)), l_1270))))), l_1273)), l_1270)) || (*g_94)), 65535UL))), (*g_780)))))) <= g_90); + } + l_1319 = ((0x8F3813C5L >= ((safe_rshift_func_int16_t_s_u((safe_add_func_int8_t_s_s((+((((g_156[0][0] |= (((l_1287 |= (*g_94)) >= ((((**g_779) = ((safe_mul_func_int8_t_s_s((g_1294 != ((*g_909) = (*g_909))), ((l_1316[0] = (l_1315[3][4] = ((safe_rshift_func_int8_t_s_s(((((safe_div_func_uint16_t_u_u(((safe_lshift_func_int8_t_s_s((safe_lshift_func_int16_t_s_s((g_433.f2 || (safe_mod_func_int16_t_s_s(((*l_1314) = ((l_1305 == ((*l_1306) = l_1305)) , (((safe_mul_func_int8_t_s_s((l_1311[3][0] = 0xD7L), ((safe_sub_func_uint8_t_u_u(((g_857[0][8][2] != l_1273) > l_1273), p_29)) >= g_1042))) || l_1311[3][0]) ^ 1UL))), g_353))), 6)), 4)) <= g_1225), g_504)) != p_28) <= p_29) > l_1273), l_1273)) || l_1273))) ^ 1UL))) & 0L)) >= l_1273) ^ l_1273)) || l_1287)) , 1L) & 0UL) >= l_1318[9][3][0])), p_29)), 11)) && p_28)) >= (**p_27)); + for (g_90 = 0; (g_90 >= 27); g_90 = safe_add_func_int32_t_s_s(g_90, 9)) + { /* block id: 624 */ + return l_1322[0][0]; + } + l_1334[0][0] = (((safe_mul_func_uint16_t_u_u(((g_83 != (((safe_sub_func_int32_t_s_s((**p_27), (((((((((safe_rshift_func_int16_t_s_s(((void*)0 == l_1322[1][0]), 5)) >= (p_28 >= ((((**p_27) != ((((**p_27) >= (safe_mod_func_int32_t_s_s(((p_29 ^ (((((*l_1305) = (**l_1306)) == l_1333) && 1L) , p_28)) && g_90), 4294967295UL))) , (void*)0) != &l_1317[6])) || (**g_53)) , p_28))) , (**l_1305)) , &g_213) == p_26) & p_29) | (**g_779)) != p_28) >= 0xA1FC27BAL))) ^ 65534UL) , g_90)) <= p_28), 0x1068L)) > p_28) ^ (**g_779)); + return l_1322[0][0]; +} + + +/* ------------------------------------------ */ +/* + * reads : g_83 g_20 g_90 g_91 g_910 + * writes: g_504 g_83 g_90 g_91 + */ +static int32_t * func_30(int32_t p_31, int32_t * p_32, struct S0 p_33, int32_t ** p_34) +{ /* block id: 472 */ + int32_t **l_914[8][10] = {{&g_94,&g_94,&g_54,&g_94,&g_54,(void*)0,&g_94,(void*)0,&g_94,(void*)0},{&g_94,(void*)0,&g_54,&g_54,&g_54,&g_54,&g_94,&g_54,&g_94,&g_94},{&g_94,&g_94,&g_94,(void*)0,(void*)0,&g_54,&g_54,&g_54,&g_54,&g_54},{&g_54,&g_94,&g_54,&g_54,&g_94,&g_54,&g_94,&g_94,&g_54,&g_54},{&g_94,&g_54,&g_94,&g_54,(void*)0,&g_94,(void*)0,&g_94,(void*)0,&g_94},{&g_94,&g_54,&g_94,&g_54,&g_94,&g_54,&g_94,&g_94,&g_54,&g_54},{&g_54,&g_94,&g_94,&g_54,&g_54,&g_54,&g_94,&g_94,&g_54,&g_54},{&g_94,&g_54,&g_54,&g_94,&g_94,&g_54,&g_94,&g_54,(void*)0,&g_94}}; + struct S1 l_915 = {78,-58,0,25102,417}; + uint16_t l_916[5]; + struct S0 ****l_926[10] = {&g_909,(void*)0,(void*)0,&g_909,&g_909,&g_909,(void*)0,(void*)0,&g_909,&g_909}; + const int32_t l_929 = 0L; + const int32_t l_932 = (-7L); + uint32_t l_933 = 1UL; + uint16_t l_981 = 7UL; + struct S1 * const l_1010 = &g_905[2]; + struct S1 * const *l_1009[10] = {&l_1010,(void*)0,&l_1010,(void*)0,&l_1010,(void*)0,&l_1010,(void*)0,&l_1010,(void*)0}; + int8_t l_1015 = 0xE6L; + int16_t l_1049 = 0x9987L; + uint8_t * const *l_1115[2][6][6] = {{{&g_780,&g_780,&g_780,&g_780,&g_780,&g_780},{&g_780,&g_780,&g_780,&g_780,&g_780,&g_780},{&g_780,&g_780,&g_780,&g_780,&g_780,&g_780},{&g_780,&g_780,&g_780,&g_780,&g_780,&g_780},{&g_780,&g_780,&g_780,&g_780,&g_780,&g_780},{&g_780,&g_780,&g_780,&g_780,&g_780,&g_780}},{{&g_780,&g_780,&g_780,&g_780,&g_780,&g_780},{&g_780,&g_780,&g_780,&g_780,&g_780,&g_780},{&g_780,&g_780,&g_780,&g_780,&g_780,&g_780},{&g_780,&g_780,&g_780,&g_780,&g_780,&g_780},{&g_780,&g_780,&g_780,&g_780,&g_780,&g_780},{&g_780,&g_780,&g_780,&g_780,&g_780,&g_780}}}; + int32_t ****l_1123[4]; + uint8_t l_1188 = 2UL; + int8_t l_1226 = (-1L); + int32_t **l_1247 = &g_185; + int32_t l_1258 = 0x7F18010EL; + int32_t l_1260[5] = {0L,0L,0L,0L,0L}; + int i, j, k; + for (i = 0; i < 5; i++) + l_916[i] = 0xF8D7L; + for (i = 0; i < 4; i++) + l_1123[i] = &g_667; + (*p_34) = (*p_34); + (*g_910) = func_62(l_915, (g_504 = (p_33 , 0x9F0AE6BEL)), l_916[2], &p_32, l_914[0][1]); + return (*p_34); +} + + +/* ------------------------------------------ */ +/* + * reads : + * writes: + */ +static uint8_t func_40(int32_t p_41) +{ /* block id: 22 */ + uint32_t l_42 = 0x5CB296ADL; + return l_42; +} + + +/* ------------------------------------------ */ +/* + * reads : g_83 + * writes: g_83 g_92.f4 g_3 g_15 + */ +static struct S1 func_47(int32_t * p_48) +{ /* block id: 62 */ + int32_t **l_133[10][5] = {{&g_94,&g_94,&g_94,&g_94,&g_94},{&g_94,&g_94,&g_94,&g_94,&g_94},{&g_94,&g_94,&g_94,&g_94,&g_94},{&g_94,&g_94,&g_94,&g_94,&g_94},{&g_94,&g_94,&g_94,&g_94,&g_94},{&g_94,&g_94,&g_94,&g_94,&g_94},{&g_94,&g_94,&g_94,&g_94,&g_94},{&g_94,&g_94,&g_94,&g_94,&g_94},{&g_94,&g_94,&g_94,&g_94,&g_94},{&g_94,&g_94,&g_94,&g_94,&g_94}}; + int16_t l_161 = 6L; + int8_t *l_205 = &g_83; + int32_t l_247 = (-1L); + const int8_t * const l_270[8][1] = {{&g_83},{&g_83},{&g_83},{&g_83},{&g_83},{&g_83},{&g_83},{&g_83}}; + const int8_t * const *l_269 = &l_270[3][0]; + const int8_t * const **l_268[5][4] = {{&l_269,&l_269,&l_269,&l_269},{&l_269,&l_269,&l_269,&l_269},{&l_269,&l_269,&l_269,&l_269},{&l_269,&l_269,&l_269,&l_269},{&l_269,&l_269,&l_269,&l_269}}; + uint32_t l_301[5]; + int16_t l_311[4][6] = {{0x68BFL,0x95B2L,1L,1L,0x95B2L,1L},{0x68BFL,0x3D51L,0x68BFL,1L,0x3D51L,1L},{0x68BFL,9L,1L,1L,9L,0x68BFL},{0x68BFL,0x95B2L,1L,1L,0x95B2L,1L}}; + struct S0 **l_416 = &g_91; + const uint8_t l_542 = 0xE5L; + struct S1 l_560 = {172,-330,-0,18929,95}; + uint32_t l_611 = 1UL; + int32_t *l_705 = (void*)0; + int32_t l_758 = (-6L); + int8_t l_759 = (-1L); + uint8_t l_778 = 3UL; + int32_t l_797 = 0L; + int32_t l_862 = 0xB39451ADL; + int32_t l_873 = 0xFE5FDFEFL; + int16_t l_889 = (-7L); + int i, j; + for (i = 0; i < 5; i++) + l_301[i] = 0x350790CDL; + for (g_83 = 0; (g_83 == 10); g_83 = safe_add_func_uint8_t_u_u(g_83, 3)) + { /* block id: 65 */ + int16_t *l_122[7][5][1] = {{{(void*)0},{&g_20},{&g_20},{&g_92[3][1][3].f2},{&g_92[3][1][3].f2}},{{&g_92[3][1][3].f2},{&g_92[3][1][3].f2},{&g_92[3][1][3].f2},{&g_92[3][1][3].f2},{&g_92[3][1][3].f2}},{{&g_92[3][1][3].f2},{&g_20},{&g_20},{(void*)0},{&g_20}},{{&g_20},{&g_92[3][1][3].f2},{&g_92[3][1][3].f2},{&g_92[3][1][3].f2},{&g_92[3][1][3].f2}},{{&g_92[3][1][3].f2},{&g_92[3][1][3].f2},{&g_92[3][1][3].f2},{&g_92[3][1][3].f2},{&g_20}},{{&g_20},{(void*)0},{&g_20},{&g_20},{&g_92[3][1][3].f2}},{{&g_92[3][1][3].f2},{&g_92[3][1][3].f2},{&g_92[3][1][3].f2},{&g_92[3][1][3].f2},{&g_92[3][1][3].f2}}}; + int32_t l_123 = 0L; + int32_t l_124 = 1L; + const int32_t ***l_131 = (void*)0; + const int32_t ***l_132 = &g_129[1]; + int32_t *l_153 = &l_123; + struct S0 *l_154 = &g_92[1][0][6]; + int16_t *l_162 = &g_20; + int32_t l_172 = (-1L); + int32_t l_173 = 0xAD3B4E33L; + const int8_t l_242 = 0x4DL; + int8_t **l_265 = &l_205; + const int32_t *l_284 = &l_173; + uint8_t l_331 = 250UL; + struct S0 l_396 = {9UL,-6L,1L,0x34L,-1L}; + uint32_t *l_419 = &g_213; + uint32_t **l_418 = &l_419; + int32_t l_441 = 0x8C037808L; + int16_t l_488 = 0L; + uint8_t l_605 = 0xA4L; + uint32_t l_670 = 18446744073709551607UL; + int32_t l_689 = 1L; + int32_t l_692 = 0xE43AF478L; + int32_t l_693 = 0xC0F3538AL; + int32_t l_695 = 0L; + int32_t l_696 = 0xCFD69C5FL; + int32_t l_699 = (-6L); + int16_t l_707 = 0L; + struct S0 ***l_727[7][2] = {{&l_416,(void*)0},{&l_416,&l_416},{(void*)0,&l_416},{&l_416,(void*)0},{&l_416,&l_416},{&l_416,(void*)0},{&l_416,&l_416}}; + struct S0 ****l_726 = &l_727[0][0]; + uint32_t *l_734 = &g_504; + uint16_t *l_743 = &g_150; + int16_t l_882 = 0L; + int32_t l_884[7][1][7] = {{{7L,7L,0xFD203C11L,(-3L),(-8L),(-3L),0xFD203C11L}},{{0x83438ED6L,0x83438ED6L,1L,0L,(-1L),0L,1L}},{{7L,7L,0xFD203C11L,(-3L),(-8L),(-3L),0xFD203C11L}},{{0x83438ED6L,0x83438ED6L,1L,0L,(-1L),0L,1L}},{{7L,7L,0xFD203C11L,(-3L),(-8L),(-3L),0xFD203C11L}},{{0x83438ED6L,0x83438ED6L,1L,0L,(-1L),0L,1L}},{{7L,7L,0xFD203C11L,(-3L),(-8L),(-3L),0xFD203C11L}}}; + struct S1 *l_892 = &g_68; + uint32_t l_896 = 0x3B23285FL; + int i, j, k; + } + (*p_48) = (-1L); + return l_560; +} + + +/* ------------------------------------------ */ +/* + * reads : g_54 g_3 g_68 g_6 g_83 g_20 g_90 g_91 g_97 g_94 g_53 g_92 g_12 g_15 + * writes: g_83 g_90 g_91 g_94 g_97 g_92.f4 + */ +static int32_t * func_49(int32_t ** p_50, int16_t p_51, struct S0 p_52) +{ /* block id: 24 */ + const uint16_t l_110 = 0xE3F5L; + int32_t *l_111 = &g_92[3][1][3].f4; + (*l_111) = (safe_mul_func_int8_t_s_s(func_40((**p_50)), ((safe_sub_func_int8_t_s_s((((func_60((*g_54)) , (*g_53)) != (g_20 , (*p_50))) & (safe_lshift_func_uint16_t_u_s((safe_mod_func_int8_t_s_s(((p_52.f1 = p_52.f0) & (((safe_lshift_func_int8_t_s_s((p_52.f3 == l_110), g_6[8])) > l_110) , g_92[3][1][3].f1)), 1UL)), l_110))), l_110)) > g_12))); + return l_111; +} + + +/* ------------------------------------------ */ +/* + * reads : g_68 g_6 g_83 g_20 g_90 g_91 g_54 g_97 g_3 g_94 g_53 g_92 g_15 + * writes: g_83 g_90 g_91 g_94 g_97 + */ +static struct S0 func_60(int32_t p_61) +{ /* block id: 25 */ + int32_t l_71 = (-4L); + int32_t ** const l_72[1][6][3] = {{{&g_54,&g_54,&g_54},{&g_54,&g_54,&g_54},{&g_54,&g_54,&g_54},{&g_54,&g_54,&g_54},{&g_54,&g_54,&g_54},{&g_54,&g_54,&g_54}}}; + int32_t **l_73 = &g_54; + int32_t ***l_74 = &l_73; + struct S0 **l_93 = &g_91; + int32_t *l_95 = &g_92[3][1][3].f4; + uint8_t l_96[5]; + int i, j, k; + for (i = 0; i < 5; i++) + l_96[i] = 0UL; + (*l_93) = func_62(g_68, p_61, (safe_mul_func_int16_t_s_s(g_6[3], l_71)), l_72[0][5][0], ((*l_74) = l_73)); + l_95 = (g_94 = (*l_73)); + for (p_61 = 1; (p_61 <= 4); p_61 += 1) + { /* block id: 36 */ + int32_t l_98 = 0xFA4E93F4L; + int32_t *l_102[3]; + int i; + for (i = 0; i < 3; i++) + l_102[i] = (void*)0; + g_97 ^= (~l_96[p_61]); + l_98 = (-1L); + for (g_90 = 4; (g_90 >= 0); g_90 -= 1) + { /* block id: 41 */ + int16_t l_99[5]; + int i; + for (i = 0; i < 5; i++) + l_99[i] = 0x8431L; + l_99[2] |= ((***l_74) , ((void*)0 == &g_91)); + for (l_71 = 0; (l_71 <= 4); l_71 += 1) + { /* block id: 45 */ + int32_t *l_100 = (void*)0; + int32_t *l_101 = &g_97; + l_98 &= (((*l_101) = p_61) , (*g_94)); + l_102[1] = (*g_53); + if (l_99[1]) + break; + } + } + } + for (g_90 = 0; (g_90 <= 4); g_90 += 1) + { /* block id: 55 */ + int32_t *l_103 = &g_15; + g_94 = l_103; + } + return (*g_91); +} + + +/* ------------------------------------------ */ +/* + * reads : g_83 g_20 g_90 g_91 + * writes: g_83 g_90 + */ +static struct S0 * func_62(struct S1 p_63, uint32_t p_64, uint32_t p_65, int32_t ** const p_66, int32_t ** p_67) +{ /* block id: 27 */ + uint16_t l_81 = 0xC310L; + int8_t *l_82 = &g_83; + struct S1 l_86 = {5,-235,-1,9762,-453}; + int32_t *l_89 = &g_90; + (*l_89) ^= (safe_mod_func_int8_t_s_s(((safe_add_func_uint32_t_u_u(p_65, ((+p_63.f0) && (safe_div_func_int8_t_s_s((l_81 , ((*l_82) &= p_63.f3)), ((l_81 && l_81) | (safe_rshift_func_int16_t_s_s(1L, (l_86 , ((safe_mod_func_int32_t_s_s(0x986173B0L, l_86.f0)) & g_20)))))))))) != 0x4030L), l_81)); + return g_91; +} + + + + +/* ---------------------------------------- */ +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(); + for (i = 0; i < 6; i++) + { + transparent_crc(g_3[i], "g_3[i]", print_hash_value); + if (print_hash_value) printf("index = [%d]\n", i); + + } + transparent_crc(g_5, "g_5", print_hash_value); + for (i = 0; i < 10; i++) + { + transparent_crc(g_6[i], "g_6[i]", print_hash_value); + if (print_hash_value) printf("index = [%d]\n", i); + + } + transparent_crc(g_11, "g_11", print_hash_value); + transparent_crc(g_12, "g_12", print_hash_value); + transparent_crc(g_15, "g_15", print_hash_value); + transparent_crc(g_20, "g_20", print_hash_value); + transparent_crc(g_68.f0, "g_68.f0", print_hash_value); + transparent_crc(g_68.f1, "g_68.f1", print_hash_value); + transparent_crc(g_68.f2, "g_68.f2", print_hash_value); + transparent_crc(g_68.f3, "g_68.f3", print_hash_value); + transparent_crc(g_68.f4, "g_68.f4", print_hash_value); + transparent_crc(g_83, "g_83", print_hash_value); + transparent_crc(g_90, "g_90", print_hash_value); + for (i = 0; i < 6; i++) + { + for (j = 0; j < 4; j++) + { + for (k = 0; k < 9; k++) + { + transparent_crc(g_92[i][j][k].f0, "g_92[i][j][k].f0", print_hash_value); + transparent_crc(g_92[i][j][k].f1, "g_92[i][j][k].f1", print_hash_value); + transparent_crc(g_92[i][j][k].f2, "g_92[i][j][k].f2", print_hash_value); + transparent_crc(g_92[i][j][k].f3, "g_92[i][j][k].f3", print_hash_value); + transparent_crc(g_92[i][j][k].f4, "g_92[i][j][k].f4", print_hash_value); + if (print_hash_value) printf("index = [%d][%d][%d]\n", i, j, k); + + } + } + } + transparent_crc(g_97, "g_97", print_hash_value); + transparent_crc(g_150, "g_150", print_hash_value); + for (i = 0; i < 6; i++) + { + for (j = 0; j < 8; j++) + { + transparent_crc(g_156[i][j], "g_156[i][j]", print_hash_value); + if (print_hash_value) printf("index = [%d][%d]\n", i, j); + + } + } + transparent_crc(g_213, "g_213", print_hash_value); + for (i = 0; i < 1; i++) + { + for (j = 0; j < 4; j++) + { + transparent_crc(g_278[i][j], "g_278[i][j]", print_hash_value); + if (print_hash_value) printf("index = [%d][%d]\n", i, j); + + } + } + transparent_crc(g_294, "g_294", print_hash_value); + transparent_crc(g_353, "g_353", print_hash_value); + transparent_crc(g_356, "g_356", print_hash_value); + transparent_crc(g_357, "g_357", print_hash_value); + for (i = 0; i < 4; i++) + { + transparent_crc(g_359[i], "g_359[i]", print_hash_value); + if (print_hash_value) printf("index = [%d]\n", i); + + } + transparent_crc(g_428, "g_428", print_hash_value); + transparent_crc(g_433.f0, "g_433.f0", print_hash_value); + transparent_crc(g_433.f1, "g_433.f1", print_hash_value); + transparent_crc(g_433.f2, "g_433.f2", print_hash_value); + transparent_crc(g_433.f3, "g_433.f3", print_hash_value); + transparent_crc(g_433.f4, "g_433.f4", print_hash_value); + transparent_crc(g_489, "g_489", print_hash_value); + transparent_crc(g_504, "g_504", print_hash_value); + transparent_crc(g_518, "g_518", print_hash_value); + for (i = 0; i < 9; i++) + { + for (j = 0; j < 4; j++) + { + transparent_crc(g_544[i][j], "g_544[i][j]", print_hash_value); + if (print_hash_value) printf("index = [%d][%d]\n", i, j); + + } + } + transparent_crc(g_576.f0, "g_576.f0", print_hash_value); + transparent_crc(g_576.f1, "g_576.f1", print_hash_value); + transparent_crc(g_576.f2, "g_576.f2", print_hash_value); + transparent_crc(g_576.f3, "g_576.f3", print_hash_value); + transparent_crc(g_576.f4, "g_576.f4", print_hash_value); + transparent_crc(g_584, "g_584", print_hash_value); + transparent_crc(g_698, "g_698", print_hash_value); + transparent_crc(g_760, "g_760", print_hash_value); + for (i = 0; i < 1; i++) + { + for (j = 0; j < 9; j++) + { + for (k = 0; k < 4; k++) + { + transparent_crc(g_857[i][j][k], "g_857[i][j][k]", print_hash_value); + if (print_hash_value) printf("index = [%d][%d][%d]\n", i, j, k); + + } + } + } + for (i = 0; i < 7; i++) + { + transparent_crc(g_905[i].f0, "g_905[i].f0", print_hash_value); + transparent_crc(g_905[i].f1, "g_905[i].f1", print_hash_value); + transparent_crc(g_905[i].f2, "g_905[i].f2", print_hash_value); + transparent_crc(g_905[i].f3, "g_905[i].f3", print_hash_value); + transparent_crc(g_905[i].f4, "g_905[i].f4", print_hash_value); + if (print_hash_value) printf("index = [%d]\n", i); + + } + transparent_crc(g_1042, "g_1042", print_hash_value); + transparent_crc(g_1058, "g_1058", print_hash_value); + for (i = 0; i < 10; i++) + { + transparent_crc(g_1138[i], "g_1138[i]", print_hash_value); + if (print_hash_value) printf("index = [%d]\n", i); + + } + transparent_crc(g_1225, "g_1225", print_hash_value); + transparent_crc(g_1239, "g_1239", print_hash_value); + for (i = 0; i < 8; i++) + { + transparent_crc(g_1257[i], "g_1257[i]", print_hash_value); + if (print_hash_value) printf("index = [%d]\n", i); + + } + transparent_crc(g_1261, "g_1261", print_hash_value); + for (i = 0; i < 5; i++) + { + transparent_crc(g_1402[i], "g_1402[i]", print_hash_value); + if (print_hash_value) printf("index = [%d]\n", i); + + } + transparent_crc(g_1436, "g_1436", print_hash_value); + transparent_crc(g_1682, "g_1682", print_hash_value); + for (i = 0; i < 4; i++) + { + for (j = 0; j < 5; j++) + { + for (k = 0; k < 9; k++) + { + transparent_crc(g_1695[i][j][k], "g_1695[i][j][k]", print_hash_value); + if (print_hash_value) printf("index = [%d][%d][%d]\n", i, j, k); + + } + } + } + transparent_crc(g_2022, "g_2022", print_hash_value); + transparent_crc(g_2037, "g_2037", print_hash_value); + transparent_crc(g_2052, "g_2052", print_hash_value); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} + +/************************ statistics ************************* +XXX max struct depth: 1 +breakdown: + depth: 0, occurrence: 547 + depth: 1, occurrence: 33 +XXX total union variables: 0 + +XXX non-zero bitfields defined in structs: 5 +XXX zero bitfields defined in structs: 0 +XXX const bitfields defined in structs: 1 +XXX volatile bitfields defined in structs: 0 +XXX structs with bitfields in the program: 27 +breakdown: + indirect level: 0, occurrence: 16 + indirect level: 1, occurrence: 8 + indirect level: 2, occurrence: 3 +XXX full-bitfields structs in the program: 16 +breakdown: + indirect level: 0, occurrence: 16 +XXX times a bitfields struct's address is taken: 24 +XXX times a bitfields struct on LHS: 0 +XXX times a bitfields struct on RHS: 24 +XXX times a single bitfield on LHS: 5 +XXX times a single bitfield on RHS: 74 + +XXX max expression depth: 46 +breakdown: + depth: 1, occurrence: 83 + depth: 2, occurrence: 25 + depth: 3, occurrence: 4 + depth: 8, occurrence: 3 + depth: 13, occurrence: 2 + depth: 14, occurrence: 1 + depth: 15, occurrence: 1 + depth: 16, occurrence: 1 + depth: 17, occurrence: 1 + depth: 18, occurrence: 1 + depth: 20, occurrence: 1 + depth: 32, occurrence: 1 + depth: 33, occurrence: 1 + depth: 37, occurrence: 1 + depth: 46, occurrence: 1 + +XXX total number of pointers: 404 + +XXX times a variable address is taken: 729 +XXX times a pointer is dereferenced on RHS: 359 +breakdown: + depth: 1, occurrence: 251 + depth: 2, occurrence: 71 + depth: 3, occurrence: 35 + depth: 4, occurrence: 2 +XXX times a pointer is dereferenced on LHS: 280 +breakdown: + depth: 1, occurrence: 245 + depth: 2, occurrence: 30 + depth: 3, occurrence: 5 +XXX times a pointer is compared with null: 33 +XXX times a pointer is compared with address of another variable: 8 +XXX times a pointer is compared with another pointer: 10 +XXX times a pointer is qualified to be dereferenced: 8112 + +XXX max dereference level: 5 +breakdown: + level: 0, occurrence: 0 + level: 1, occurrence: 1335 + level: 2, occurrence: 410 + level: 3, occurrence: 168 + level: 4, occurrence: 15 + level: 5, occurrence: 8 +XXX number of pointers point to pointers: 190 +XXX number of pointers point to scalars: 194 +XXX number of pointers point to structs: 20 +XXX percent of pointers has null in alias set: 29.5 +XXX average alias set size: 1.4 + +XXX times a non-volatile is read: 1935 +XXX times a non-volatile is write: 902 +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: 0 +XXX backward jumps: 3 + +XXX stmts: 86 +XXX max block depth: 5 +breakdown: + depth: 0, occurrence: 31 + depth: 1, occurrence: 17 + depth: 2, occurrence: 8 + depth: 3, occurrence: 13 + depth: 4, occurrence: 13 + depth: 5, occurrence: 4 + +XXX percentage a fresh-made variable is used: 16.4 +XXX percentage an existing variable is used: 83.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/17.c.txt b/tests/fuzz/17.c.txt new file mode 100644 index 00000000..ec5e8b3c --- /dev/null +++ b/tests/fuzz/17.c.txt @@ -0,0 +1 @@ +checksum = B0C9CB31 diff --git a/tests/fuzz/csmith_driver.py b/tests/fuzz/csmith_driver.py index c987a3be..90c7df2e 100755 --- a/tests/fuzz/csmith_driver.py +++ b/tests/fuzz/csmith_driver.py @@ -6,11 +6,11 @@ Runs csmith, a C fuzzer, and looks for bugs. CSMITH_PATH should be set to something like /usr/local/include/csmith ''' -import os, sys, difflib, shutil +import os, sys, difflib, shutil, random from distutils.spawn import find_executable from subprocess import check_call, Popen, PIPE, STDOUT, CalledProcessError -sys.path += [os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(__file__))), 'tools')] +sys.path += [os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))), 'tools')] import shared engine1 = eval('shared.' + sys.argv[1]) if len(sys.argv) > 1 else shared.JS_ENGINES[0] @@ -35,9 +35,12 @@ notes = { 'invalid': 0, 'unaligned': 0, 'embug': 0 } fails = 0 while 1: + opts = '-O' + str(random.randint(0, 2)) + print 'opt level:', opts + print 'Tried %d, notes: %s' % (tried, notes) print '1) Generate C' - check_call([CSMITH, '--no-volatiles', '--no-math64', '--no-packed-struct'],# + + check_call([CSMITH, '--no-volatiles', '--no-packed-struct'],# '--no-math64' #['--max-block-depth', '2', '--max-block-size', '2', '--max-expr-complexity', '2', '--max-funcs', '2'], stdout=open(filename + '.c', 'w')) #shutil.copyfile(filename + '.c', 'testcase%d.c' % tried) @@ -47,8 +50,8 @@ while 1: print '2) Compile natively' shared.try_delete(filename) - shared.check_execute([shared.CLANG_CC, '-O2', filename + '.c', '-o', filename + '1'] + CSMITH_CFLAGS) # + shared.EMSDK_OPTS - shared.check_execute([shared.CLANG_CC, '-O2', '-emit-llvm', '-c', '-Xclang', '-triple=i386-pc-linux-gnu', filename + '.c', '-o', filename + '.bc'] + CSMITH_CFLAGS + shared.EMSDK_OPTS) + shared.check_execute([shared.CLANG_CC, opts, filename + '.c', '-o', filename + '1'] + CSMITH_CFLAGS) # + shared.EMSDK_OPTS + shared.check_execute([shared.CLANG_CC, opts, '-emit-llvm', '-c', '-Xclang', '-triple=i386-pc-linux-gnu', filename + '.c', '-o', filename + '.bc'] + CSMITH_CFLAGS + shared.EMSDK_OPTS) shared.check_execute([shared.path_from_root('tools', 'nativize_llvm.py'), filename + '.bc']) shutil.move(filename + '.bc.run', filename + '2') shared.check_execute([shared.CLANG_CC, filename + '.c', '-o', filename + '3'] + CSMITH_CFLAGS) @@ -71,7 +74,7 @@ while 1: def try_js(args): shared.try_delete(filename + '.js') print '(compile)' - shared.check_execute([shared.EMCC, '-O2', '-s', 'ASM_JS=1', filename + '.c', '-o', filename + '.js'] + CSMITH_CFLAGS + args) + shared.check_execute([shared.EMCC, opts, filename + '.c', '-o', filename + '.js'] + CSMITH_CFLAGS + args) assert os.path.exists(filename + '.js') print '(run)' js = shared.run_js(filename + '.js', stderr=PIPE, engine=engine1, check_timeout=True) diff --git a/tests/fuzz/test.sh b/tests/fuzz/test.sh new file mode 100755 index 00000000..166d4bab --- /dev/null +++ b/tests/fuzz/test.sh @@ -0,0 +1,39 @@ +# e.g. +# ~/Dev/emscripten/tests/fuzz$ CSMITH=~/Dev/csmith/src/csmith CSMITH_PATH=~/Dev/csmith python ./csmith_driver.py +# to find failures, then check those out with this script + +echo "builds" +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 +echo "run n1" +./n1.out &> n1 +echo "run n2" +./n2.out &> n2 +echo "run bc" +/home/alon/Dev/fastcomp/build/Release/bin/lli bc.bc &> bc +echo "run js" +mozjs js.out.js &> js +echo "run ua" +#mozjs ua.out.js &> ua +echo "run sh" +#mozjs sh.out.js &> sh +echo "run fc" +mozjs fc.out.js &> fc +echo "n/n" +diff n1 n2 +echo "n/bc" +diff n1 bc +echo "n/js" +diff n1 js | grep -v warning +echo "n/js-ua" +#diff n1 ua | grep -v warning +echo "n/js-sh" +#diff n1 sh | grep -v warning +echo "js/js" +diff js fc | grep -v warning + diff --git a/tests/hello_world_exit.c b/tests/hello_world_exit.c index febecc65..8932caf2 100644 --- a/tests/hello_world_exit.c +++ b/tests/hello_world_exit.c @@ -1,7 +1,13 @@ #include<stdio.h> #include<stdlib.h> -int main() { +int main(int argc, char **argv) { + printf("argc: %d\n", argc); + for(int i = 0; i < argc; ++i) { + printf("argv[%d]: %s\n", i, argv[i]); + } + if (argc <= 1) + exit(1); printf("hello, world!\n"); fprintf(stderr, "hello, error stream!\n"); exit(100); diff --git a/tests/test_benchmark.py b/tests/test_benchmark.py index 9168c4de..60670ed4 100644 --- a/tests/test_benchmark.py +++ b/tests/test_benchmark.py @@ -70,17 +70,23 @@ class NativeBenchmarker(Benchmarker): print '(using clang)' shutil.copyfile(native_exec, filename + '.native') shutil.copymode(native_exec, filename + '.native') - self.filename = filename + + final = os.path.dirname(filename) + os.path.sep + self.name+'_' + os.path.basename(filename) + '.native' + shutil.move(filename + '.native', final) + self.filename = final def run(self, args): - process = Popen([self.filename+'.native'] + args, stdout=PIPE, stderr=PIPE) + process = Popen([self.filename] + args, stdout=PIPE, stderr=PIPE) return process.communicate()[0] class JSBenchmarker(Benchmarker): - def __init__(self, name, engine, extra_args=[]): + def __init__(self, name, engine, extra_args=[], env={}): self.name = name self.engine = engine self.extra_args = extra_args + self.env = os.environ.copy() + for k, v in env.iteritems(): + self.env[k] = v def build(self, parent, filename, args, shared_args, emcc_args, native_args, native_exec, lib_builder): self.filename = filename @@ -97,28 +103,31 @@ process(sys.argv[1]) ''' % str(args[:-1]) # do not hardcode in the last argument, the default arg ) - try_delete(filename + '.js') + final = os.path.dirname(filename) + os.path.sep + self.name+'_' + os.path.basename(filename) + '.js' + try_delete(final) output = Popen([PYTHON, EMCC, filename, #'-O3', '-O2', '-s', 'DOUBLE_MODE=0', '-s', 'PRECISE_I64_MATH=0', '--memory-init-file', '0', '--js-transform', 'python hardcode.py', '-s', 'TOTAL_MEMORY=128*1024*1024', #'--closure', '1', - #'-g', - '-o', filename + '.js'] + shared_args + emcc_args + self.extra_args, stdout=PIPE, stderr=PIPE).communicate() - assert os.path.exists(filename + '.js'), 'Failed to compile file: ' + output[0] + #'-g2', + '-o', final] + shared_args + emcc_args + self.extra_args, stdout=PIPE, stderr=PIPE, env=self.env).communicate() + assert os.path.exists(final), 'Failed to compile file: ' + output[0] + self.filename = final def run(self, args): - return run_js(self.filename + '.js', engine=self.engine, args=args, stderr=PIPE, full_output=True) + return run_js(self.filename, engine=self.engine, args=args, stderr=PIPE, full_output=True) # Benchmarkers benchmarkers = [ NativeBenchmarker('clang', CLANG_CC, CLANG), - NativeBenchmarker('gcc', 'gcc', 'g++'), - JSBenchmarker('sm-f32', SPIDERMONKEY_ENGINE, ['-s', 'PRECISE_F32=2']), + #NativeBenchmarker('gcc', 'gcc', 'g++'), + #JSBenchmarker('sm-f32', SPIDERMONKEY_ENGINE, ['-s', 'PRECISE_F32=2']), JSBenchmarker('sm', SPIDERMONKEY_ENGINE), + JSBenchmarker('sm-fc', SPIDERMONKEY_ENGINE, env={ 'EMCC_FAST_COMPILER': '1' }), #JSBenchmarker('sm-noasm', SPIDERMONKEY_ENGINE + ['--no-asmjs']), #JSBenchmarker('sm-noasm-f32', SPIDERMONKEY_ENGINE + ['--no-asmjs'], ['-s', 'PRECISE_F32=2']), - JSBenchmarker('v8', V8_ENGINE) + #JSBenchmarker('v8', V8_ENGINE) ] class benchmark(RunnerCore): @@ -441,6 +450,7 @@ class benchmark(RunnerCore): self.do_benchmark('linpack_float', open(path_from_root('tests', 'linpack.c')).read(), '''Unrolled Single Precision''', force_c=True, output_parser=output_parser, shared_args=['-DSP']) def test_zzz_java_nbody(self): # tests xmlvm compiled java, including bitcasts of doubles, i64 math, etc. + if CORE_BENCHMARKS: return args = [path_from_root('tests', 'nbody-java', x) for x in os.listdir(path_from_root('tests', 'nbody-java')) if x.endswith('.c')] + \ ['-I' + path_from_root('tests', 'nbody-java')] self.do_benchmark('nbody_java', '', '''Time(s)''', diff --git a/tests/test_browser.py b/tests/test_browser.py index 55bab05b..920c6f8c 100644 --- a/tests/test_browser.py +++ b/tests/test_browser.py @@ -119,6 +119,13 @@ If manually bisecting: Even better, add a breakpoint, e.g. on the printf, then reload, then step through and see the print (best to run with EM_SAVE_DIR=1 for the reload). ''' + def test_emscripten_log(self): + src = os.path.join(self.get_dir(), 'src.cpp') + open(src, 'w').write(self.with_report_result(open(path_from_root('tests', 'emscripten_log', 'emscripten_log.cpp')).read())) + + Popen([PYTHON, EMCC, src, '--pre-js', path_from_root('src', 'emscripten-source-map.min.js'), '-g', '-o', 'page.html']).communicate() + self.run_browser('page.html', None, '/report_result?1') + def build_native_lzma(self): lzma_native = path_from_root('third_party', 'lzma.js', 'lzma-native') if os.path.isfile(lzma_native) and os.access(lzma_native, os.X_OK): return @@ -402,6 +409,7 @@ If manually bisecting: self.run_browser('page.html', 'You should see |load me right before|.', '/report_result?1') # Test subdirectory handling with asset packaging. + try_delete(self.in_dir('assets')) os.makedirs(os.path.join(self.get_dir(), 'assets/sub/asset1/').replace('\\', '/')) os.makedirs(os.path.join(self.get_dir(), 'assets/sub/asset1/.git').replace('\\', '/')) # Test adding directory that shouldn't exist. os.makedirs(os.path.join(self.get_dir(), 'assets/sub/asset2/').replace('\\', '/')) @@ -452,7 +460,7 @@ If manually bisecting: (srcpath, dstpath1, dstpath2, nonexistingpath) = test make_main_two_files(dstpath1, dstpath2, nonexistingpath) print srcpath - Popen([PYTHON, EMCC, os.path.join(self.get_dir(), 'main.cpp'), '--preload-file', srcpath, '-o', 'page.html']).communicate() + Popen([PYTHON, EMCC, os.path.join(self.get_dir(), 'main.cpp'), '--preload-file', srcpath, '--exclude-file', '*/.*', '-o', 'page.html']).communicate() self.run_browser('page.html', 'You should see |load me right before|.', '/report_result?1') # Should still work with -o subdir/.. @@ -1595,7 +1603,7 @@ keydown(100);keyup(100); // trigger the end shutil.copyfile(path_from_root('tests', 'ship.dds'), 'ship.dds') shutil.copyfile(path_from_root('tests', 'bloom.dds'), 'bloom.dds') shutil.copyfile(path_from_root('tests', 'water.dds'), 'water.dds') - Popen([PYTHON, FILE_PACKAGER, 'test.data', '--pre-run', '--crunch', '--preload', 'ship.dds', 'bloom.dds', 'water.dds'], stdout=open('pre.js', 'w')).communicate() + Popen([PYTHON, FILE_PACKAGER, 'test.data', '--crunch', '--preload', 'ship.dds', 'bloom.dds', 'water.dds'], stdout=open('pre.js', 'w')).communicate() assert os.stat('test.data').st_size < 0.5*(os.stat('ship.dds').st_size+os.stat('bloom.dds').st_size+os.stat('water.dds').st_size), 'Compressed should be smaller than dds' shutil.move('ship.dds', 'ship.donotfindme.dds') # make sure we load from the compressed shutil.move('bloom.dds', 'bloom.donotfindme.dds') # make sure we load from the compressed @@ -1606,8 +1614,8 @@ keydown(100);keyup(100); // trigger the end shutil.copyfile(path_from_root('tests', 'ship.dds'), 'ship.dds') shutil.copyfile(path_from_root('tests', 'bloom.dds'), 'bloom.dds') shutil.copyfile(path_from_root('tests', 'water.dds'), 'water.dds') - Popen([PYTHON, FILE_PACKAGER, 'asset_a.data', '--pre-run', '--crunch', '--preload', 'ship.dds', 'bloom.dds'], stdout=open('asset_a.js', 'w')).communicate() - Popen([PYTHON, FILE_PACKAGER, 'asset_b.data', '--pre-run', '--crunch', '--preload', 'water.dds'], stdout=open('asset_b.js', 'w')).communicate() + Popen([PYTHON, FILE_PACKAGER, 'asset_a.data', '--crunch', '--preload', 'ship.dds', 'bloom.dds'], stdout=open('asset_a.js', 'w')).communicate() + Popen([PYTHON, FILE_PACKAGER, 'asset_b.data', '--crunch', '--preload', 'water.dds'], stdout=open('asset_b.js', 'w')).communicate() shutil.move('ship.dds', 'ship.donotfindme.dds') # make sure we load from the compressed shutil.move('bloom.dds', 'bloom.donotfindme.dds') # make sure we load from the compressed shutil.move('water.dds', 'water.donotfindme.dds') # make sure we load from the compressed @@ -1697,8 +1705,15 @@ keydown(100);keyup(100); // trigger the end # and the browser will not close as part of the test, pinning down the cwd on Windows and it wouldn't be possible to delete it. Therefore switch away from that directory # before launching. os.chdir(path_from_root()) - process = subprocess.Popen([PYTHON, path_from_root('emrun'), '--timeout', '30', '--verbose', os.path.join(outdir, 'hello_world.html')], stdout=subprocess.PIPE, stderr=subprocess.PIPE) - (stdout, stderr) = process.communicate() + args = [PYTHON, path_from_root('emrun'), '--timeout', '30', '--verbose', os.path.join(outdir, 'hello_world.html'), '1', '2', '3', '--log_stdout', os.path.join(outdir, 'stdout.txt'), '--log_stderr', os.path.join(outdir, 'stderr.txt')] + if emscripten_browser is not None: + args += ['--browser', emscripten_browser] + process = subprocess.Popen(args) + process.communicate() + stdout = open(os.path.join(outdir, 'stdout.txt'), 'r').read() + stderr = open(os.path.join(outdir, 'stderr.txt'), 'r').read() assert process.returncode == 100 + assert 'argc: 4' in stdout + assert 'argv[3]: 3' in stdout assert 'hello, world!' in stdout assert 'hello, error stream!' in stderr diff --git a/tests/test_core.py b/tests/test_core.py index 862beb8b..9e52792c 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -525,7 +525,7 @@ class T(RunnerCore): # Short name, to make it more fun to use manually on the co os.environ['EMSCRIPT_MAX_CHUNK_SIZE'] = old_chunk_size assert 'asm1' in test_modes - if self.run_name == 'asm1': + if self.run_name == 'asm1' and not os.environ.get('EMCC_FAST_COMPILER'): assert Settings.RELOOP generated = open('src.cpp.o.js').read() main = generated[generated.find('function _main'):] @@ -771,6 +771,12 @@ class T(RunnerCore): # Short name, to make it more fun to use manually on the co self.do_run_from_file(src, output) + def test_closebitcasts(self): + if Settings.USE_TYPED_ARRAYS != 2: return self.skip('requires ta2') + test_path = path_from_root('tests', 'core', 'closebitcasts') + src, output = (test_path + s for s in ('.c', '.txt')) + self.do_run_from_file(src, output) + def test_fast_math(self): if self.emcc_args is None: return self.skip('requires emcc') Building.COMPILER_TEST_OPTS += ['-ffast-math'] @@ -2059,6 +2065,7 @@ def process(filename): def test_bigswitch(self): if self.run_name != 'default': return self.skip('TODO: issue #781') + if os.environ.get('EMCC_FAST_COMPILER') == '1': return self.skip('todo in fastcomp') src = open(path_from_root('tests', 'bigswitch.cpp')).read() self.do_run(src, '''34962: GL_ARRAY_BUFFER (0x8892) @@ -2524,6 +2531,8 @@ The current type of b is: 9 self.do_run_from_file(src, output) def test_intentional_fault(self): + if os.environ.get('EMCC_FAST_COMPILER') == '1' and self.run_name == 'default': return self.skip('todo in fastcomp in default') + # Some programs intentionally segfault themselves, we should compile that into a throw src = r''' int main () { @@ -4620,7 +4629,7 @@ return malloc(size); self.do_run_from_file(src, output) def test_gcc_unmangler(self): - Settings.NAMED_GLOBALS = 1 # test coverage for this + if os.environ.get('EMCC_FAST_COMPILER') != '1': Settings.NAMED_GLOBALS = 1 # test coverage for this Building.COMPILER_TEST_OPTS += ['-I' + path_from_root('third_party')] @@ -5023,8 +5032,8 @@ def process(filename): 'structphiparam', 'callwithstructural_ta2', 'callwithstructural64_ta2', 'structinparam', # pnacl limitations in ExpandStructRegs '2xi40', # pnacl limitations in ExpandGetElementPtr 'legalizer_ta2', '514_ta2', # pnacl limitation in not legalizing i104, i96, etc. - 'longjmp_tiny', 'longjmp_tiny_invoke', 'longjmp_tiny_phi', 'longjmp_tiny_phi2', 'indirectbrphi', 'ptrtoint_blockaddr', 'quoted', # current fastcomp limitations FIXME - 'sillyfuncast', 'sillyfuncast2', 'sillybitcast', # TODO very very soon XXX + 'longjmp_tiny', 'longjmp_tiny_invoke', 'longjmp_tiny_phi', 'longjmp_tiny_phi2', 'longjmp_tiny_invoke_phi', 'indirectbrphi', 'ptrtoint_blockaddr', 'quoted', # current fastcomp limitations FIXME + 'sillyfuncast', 'sillyfuncast2', 'sillybitcast', 'atomicrmw_unaligned' # TODO XXX ]: continue if '_ta2' in shortname and not Settings.USE_TYPED_ARRAYS == 2: print self.skip('case "%s" only relevant for ta2' % shortname) @@ -5069,6 +5078,9 @@ def process(filename): def run_all(x): print x for name in glob.glob(path_from_root('tests', 'fuzz', '*.c')): + #if os.path.basename(name) != '4.c': continue + if os.environ.get('EMCC_FAST_COMPILER') == '1' and os.path.basename(name) in ['17.c']: continue # pnacl limitation in not legalizing i104, i96, etc. + print name self.do_run(open(path_from_root('tests', 'fuzz', name)).read(), open(path_from_root('tests', 'fuzz', name + '.txt')).read(), force_c=True) @@ -6078,6 +6090,11 @@ def process(filename): dirname = self.get_dir() self.build(src, dirname, os.path.join(dirname, 'src.cpp'), post_build=(None, post)) + def test_emscripten_log(self): + if self.emcc_args is None: return self.skip('This test needs libc.') + if '-g' not in Building.COMPILER_TEST_OPTS: Building.COMPILER_TEST_OPTS.append('-g') + self.do_run('#define RUN_FROM_JS_SHELL\n' + open(path_from_root('tests', 'emscripten_log', 'emscripten_log.cpp')).read(), "Success!") + def test_linespecific(self): if Settings.ASM_JS: return self.skip('asm always has corrections on') @@ -6358,7 +6375,7 @@ def make_run(fullname, name=-1, compiler=-1, embetter=0, quantum_size=0, return TT # Make one run with the defaults -default = make_run("default", compiler=CLANG, emcc_args=[]) +default = make_run("default", compiler=CLANG, emcc_args=[] if os.environ.get('EMCC_FAST_COMPILER') != '1' else ['-s', 'ASM_JS=1']) # Make one run with -O1, with safe heap o1 = make_run("o1", compiler=CLANG, emcc_args=["-O1", "-s", "ASM_JS=0", "-s", "SAFE_HEAP=1"]) diff --git a/tests/test_egl.c b/tests/test_egl.c index 5864a797..d66949d0 100644 --- a/tests/test_egl.c +++ b/tests/test_egl.c @@ -37,12 +37,21 @@ int main(int argc, char *argv[]) assert(eglGetError() == EGL_SUCCESS); assert(surface != 0); + // WebGL maps to GLES2. GLES1 is not supported. + EGLint contextAttribsOld[] = + { + EGL_CONTEXT_CLIENT_VERSION, 1, + EGL_NONE + }; + EGLContext context = eglCreateContext(display, config, NULL, contextAttribsOld); + assert(eglGetError() != EGL_SUCCESS); + EGLint contextAttribs[] = { EGL_CONTEXT_CLIENT_VERSION, 2, EGL_NONE }; - EGLContext context = eglCreateContext(display, config, NULL, contextAttribs); + context = eglCreateContext(display, config, NULL, contextAttribs); assert(eglGetError() == EGL_SUCCESS); assert(context != 0); diff --git a/tests/test_other.py b/tests/test_other.py index 46170856..df9e2da5 100644 --- a/tests/test_other.py +++ b/tests/test_other.py @@ -843,7 +843,7 @@ f.close() for test_opts, expected_ranges in [ ([], { - 100: (190, 275), + 100: (190, 500), 250: (200, 500), 500: (250, 500), 1000: (230, 1000), @@ -1165,7 +1165,7 @@ f.close() ''') Popen([PYTHON, EMCC, os.path.join(self.get_dir(), 'main.cpp'), '--js-library', os.path.join(self.get_dir(), 'mylib1.js'), - '--js-library', os.path.join(self.get_dir(), 'mylib2.js')]).communicate() + '--js-library', os.path.join(self.get_dir(), 'mylib2.js')]).communicate() self.assertContained('hello from lib!\n*32*\n', run_js(os.path.join(self.get_dir(), 'a.out.js'))) def test_identical_basenames(self): @@ -1347,61 +1347,93 @@ f.close() Popen([PYTHON, EMCC, os.path.join(self.get_dir(), 'main.cpp'), '--embed-file', 'tst']).communicate() self.assertContained('|frist|\n|sacond|\n|thard|\n', run_js(os.path.join(self.get_dir(), 'a.out.js'))) - def test_multidynamic_link(self): - # Linking the same dynamic library in will error, normally, since we statically link it, causing dupe symbols - # A workaround is to use --ignore-dynamic-linking, see emcc --help for details + def test_exclude_file(self): + try_delete(os.path.join(self.get_dir(), 'tst')) + os.mkdir(os.path.join(self.get_dir(), 'tst')) + os.mkdir(os.path.join(self.get_dir(), 'tst', 'abc.exe')) + os.mkdir(os.path.join(self.get_dir(), 'tst', 'abc.txt')) + open(os.path.join(self.get_dir(), 'tst', 'hello.exe'), 'w').write('''hello''') + open(os.path.join(self.get_dir(), 'tst', 'hello.txt'), 'w').write('''world''') + open(os.path.join(self.get_dir(), 'tst', 'abc.exe', 'foo'), 'w').write('''emscripten''') + open(os.path.join(self.get_dir(), 'tst', 'abc.txt', 'bar'), 'w').write('''!!!''') open(os.path.join(self.get_dir(), 'main.cpp'), 'w').write(r''' #include <stdio.h> - extern void printey(); - extern void printother(); int main() { - printf("*"); - printey(); - printf("\n"); - printother(); - printf("\n"); - printf("*"); + if(fopen("tst/hello.exe", "rb")) printf("Failed\n"); + if(!fopen("tst/hello.txt", "rb")) printf("Failed\n"); + if(fopen("tst/abc.exe/foo", "rb")) printf("Failed\n"); + if(!fopen("tst/abc.txt/bar", "rb")) printf("Failed\n"); + return 0; } ''') - try: - os.makedirs(os.path.join(self.get_dir(), 'libdir')); - except: - pass + Popen([PYTHON, EMCC, os.path.join(self.get_dir(), 'main.cpp'), '--embed-file', 'tst', '--exclude-file', '*.exe']).communicate() + output = run_js(os.path.join(self.get_dir(), 'a.out.js')) + assert output == '' - open(os.path.join(self.get_dir(), 'libdir', 'libfile.cpp'), 'w').write(''' - #include <stdio.h> - void printey() { - printf("hello from lib"); - } - ''') + def test_multidynamic_link(self): + # Linking the same dynamic library in statically will error, normally, since we statically link it, causing dupe symbols - open(os.path.join(self.get_dir(), 'libdir', 'libother.cpp'), 'w').write(''' - #include <stdio.h> - extern void printey(); - void printother() { - printf("|"); - printey(); - printf("|"); - } - ''') + def test(link_cmd, lib_suffix=''): + print link_cmd, lib_suffix + + self.clear() + + open(os.path.join(self.get_dir(), 'main.cpp'), 'w').write(r''' + #include <stdio.h> + extern void printey(); + extern void printother(); + int main() { + printf("*"); + printey(); + printf("\n"); + printother(); + printf("\n"); + printf("*"); + return 0; + } + ''') + + try: + os.makedirs(os.path.join(self.get_dir(), 'libdir')); + except: + pass + + open(os.path.join(self.get_dir(), 'libdir', 'libfile.cpp'), 'w').write(''' + #include <stdio.h> + void printey() { + printf("hello from lib"); + } + ''') + + open(os.path.join(self.get_dir(), 'libdir', 'libother.cpp'), 'w').write(''' + #include <stdio.h> + extern void printey(); + void printother() { + printf("|"); + printey(); + printf("|"); + } + ''') - # This lets us link the same dynamic lib twice. We will need to link it in manually at the end. - compiler = [PYTHON, EMCC, '--ignore-dynamic-linking'] + compiler = [PYTHON, EMCC] - # Build libfile normally into an .so - Popen(compiler + [os.path.join(self.get_dir(), 'libdir', 'libfile.cpp'), '-o', os.path.join(self.get_dir(), 'libdir', 'libfile.so')]).communicate() - # Build libother and dynamically link it to libfile - but add --ignore-dynamic-linking - Popen(compiler + [os.path.join(self.get_dir(), 'libdir', 'libother.cpp'), '-L' + os.path.join(self.get_dir(), 'libdir'), '-lfile', '-o', os.path.join(self.get_dir(), 'libdir', 'libother.so')]).communicate() - # Build the main file, linking in both the libs - Popen(compiler + [os.path.join(self.get_dir(), 'main.cpp'), '-L' + os.path.join(self.get_dir(), 'libdir'), '-lfile', '-lother', '-c']).communicate() + # Build libfile normally into an .so + Popen(compiler + [os.path.join(self.get_dir(), 'libdir', 'libfile.cpp'), '-o', os.path.join(self.get_dir(), 'libdir', 'libfile.so' + lib_suffix)]).communicate() + # Build libother and dynamically link it to libfile + Popen(compiler + [os.path.join(self.get_dir(), 'libdir', 'libother.cpp')] + link_cmd + ['-o', os.path.join(self.get_dir(), 'libdir', 'libother.so')]).communicate() + # Build the main file, linking in both the libs + Popen(compiler + [os.path.join(self.get_dir(), 'main.cpp')] + link_cmd + ['-lother', '-c']).communicate() + print '...' + # The normal build system is over. We need to do an additional step to link in the dynamic libraries, since we ignored them before + Popen([PYTHON, EMCC, os.path.join(self.get_dir(), 'main.o')] + link_cmd + ['-lother']).communicate() - # The normal build system is over. We need to do an additional step to link in the dynamic libraries, since we ignored them before - Popen([PYTHON, EMCC, os.path.join(self.get_dir(), 'main.o'), '-L' + os.path.join(self.get_dir(), 'libdir'), '-lfile', '-lother']).communicate() + self.assertContained('*hello from lib\n|hello from lib|\n*', run_js(os.path.join(self.get_dir(), 'a.out.js'))) - self.assertContained('*hello from lib\n|hello from lib|\n*', run_js(os.path.join(self.get_dir(), 'a.out.js'))) + test(['-L' + os.path.join(self.get_dir(), 'libdir'), '-lfile']) # -l, auto detection from library path + test(['-L' + os.path.join(self.get_dir(), 'libdir'), os.path.join(self.get_dir(), 'libdir', 'libfile.so.3.1.4.1.5.9')], '.3.1.4.1.5.9') # handle libX.so.1.2.3 as well def test_js_link(self): open(os.path.join(self.get_dir(), 'main.cpp'), 'w').write(''' @@ -1995,7 +2027,7 @@ done. Popen([PYTHON, EMCC, 'src.cpp', '-s', 'LINKABLE=1']).communicate() output = run_js('a.out.js') self.assertContained('''operator new() -_main +main() f2() abcdabcdabcd(int) abcdabcdabcd(int) diff --git a/tools/eliminator/asm-eliminator-test-output.js b/tools/eliminator/asm-eliminator-test-output.js index 434fbaf9..a344fc35 100644 --- a/tools/eliminator/asm-eliminator-test-output.js +++ b/tools/eliminator/asm-eliminator-test-output.js @@ -280,9 +280,10 @@ function tempDouble2($46, $14, $28, $42, $20, $32, $45) { $20 = $20 | 0; $32 = $32 | 0; $45 = $45 | 0; - var $_sroa_06_0_insert_insert$1 = 0; + var $46 = 0, $_sroa_06_0_insert_insert$1 = 0; + $46 = (HEAPF32[tempDoublePtr >> 2] = ($14 < $28 ? $14 : $28) - $42, HEAP32[tempDoublePtr >> 2] | 0); $_sroa_06_0_insert_insert$1 = (HEAPF32[tempDoublePtr >> 2] = ($20 < $32 ? $20 : $32) - $42, HEAP32[tempDoublePtr >> 2] | 0) | 0; - HEAP32[$45 >> 2] = 0 | (HEAPF32[tempDoublePtr >> 2] = ($14 < $28 ? $14 : $28) - $42, HEAP32[tempDoublePtr >> 2] | 0); + HEAP32[$45 >> 2] = 0 | $46; HEAP32[$45 + 4 >> 2] = $_sroa_06_0_insert_insert$1; HEAP32[$45 + 8 >> 2] = $_sroa_06_0_insert_insert$1; } @@ -298,4 +299,9 @@ function select2($foundBase_0_off0) { STACKTOP = sp; return ($foundBase_0_off0 ? 0 : $call24) | 0; } +function binary(x) { + x = x | 0; + memset(f(x)) | 0; + +dmemset(f(x)); +} diff --git a/tools/eliminator/asm-eliminator-test.js b/tools/eliminator/asm-eliminator-test.js index 7ec277d5..4b45e4d4 100644 --- a/tools/eliminator/asm-eliminator-test.js +++ b/tools/eliminator/asm-eliminator-test.js @@ -370,5 +370,13 @@ function select2($foundBase_0_off0) { STACKTOP = sp; return $retval_0 | 0; } -// EMSCRIPTEN_GENERATED_FUNCTIONS: ["asm", "__Z11printResultPiS_j", "_segment_holding", "__ZN5identC2EiPKcPci", "_vec2Length", "exc", "label", "confuusion", "tempDouble", "_org_apache_harmony_luni_util_NumberConverter_freeFormat__", "__ZN23b2EdgeAndPolygonContact8EvaluateEP10b2ManifoldRK11b2TransformS4_", "_java_nio_charset_Charset_forNameInternal___java_lang_String", "looop2", "looop3", "looop4", "looop5", "looop6", "looop7", "looop8", "multiloop", "multiloop2", "tempDouble2", "watIf", "select2"] +function binary(x) { + x = x | 0; + var y = 0, z = 0; + y = f(x); + memset(y) | 0; + z = f(x); + +dmemset(z); +} +// EMSCRIPTEN_GENERATED_FUNCTIONS: ["asm", "__Z11printResultPiS_j", "_segment_holding", "__ZN5identC2EiPKcPci", "_vec2Length", "exc", "label", "confuusion", "tempDouble", "_org_apache_harmony_luni_util_NumberConverter_freeFormat__", "__ZN23b2EdgeAndPolygonContact8EvaluateEP10b2ManifoldRK11b2TransformS4_", "_java_nio_charset_Charset_forNameInternal___java_lang_String", "looop2", "looop3", "looop4", "looop5", "looop6", "looop7", "looop8", "multiloop", "multiloop2", "tempDouble2", "watIf", "select2", "binary"] diff --git a/tools/eliminator/eliminator-test-output.js b/tools/eliminator/eliminator-test-output.js index 0171e99b..4551fb34 100644 --- a/tools/eliminator/eliminator-test-output.js +++ b/tools/eliminator/eliminator-test-output.js @@ -6122,4 +6122,15 @@ function intoCond() { function math(a, b, c, d) { print(Math_imul(d) + (Math_fround(c) + (a + Math_abs(b)))); } +function td(x, y) { + HEAP32[tempDoublePtr >> 2] = x; + var xf = HEAPF32[tempDoublePtr >> 2]; + HEAP32[tempDoublePtr >> 2] = y; + func(xf, HEAPF32[tempDoublePtr >> 2]); + HEAPF64[tempDoublePtr >> 3] = x; + var xl = HEAP32[tempDoublePtr >> 2]; + var xh = HEAP32[tempDoublePtr >> 2]; + HEAPF64[tempDoublePtr >> 3] = y; + func(xl, xh, HEAP32[tempDoublePtr >> 2], HEAP32[tempDoublePtr >> 2]); +} diff --git a/tools/eliminator/eliminator-test.js b/tools/eliminator/eliminator-test.js index ef17b388..e629d9f0 100644 --- a/tools/eliminator/eliminator-test.js +++ b/tools/eliminator/eliminator-test.js @@ -8860,5 +8860,20 @@ function math(a, b, c, d) { w = Math_imul(d); print(x + y + z + w); } -// EMSCRIPTEN_GENERATED_FUNCTIONS: ["a", "b", "c", "f", "g", "h", "py", "r", "t", "f2", "f3", "llvm3_1", "_inflate", "_malloc", "_mallocNoU", "asm", "phi", "intoCond", "math"] +function td(x, y) { // tempDoublePtr should invalidate each other + HEAP32[tempDoublePtr>>2] = x; + var xf = HEAPF32[tempDoublePtr>>2]; + HEAP32[tempDoublePtr>>2] = y; + var yf = HEAPF32[tempDoublePtr>>2]; + func(xf, yf); + // + HEAPF64[tempDoublePtr>>3] = x; + var xl = HEAP32[tempDoublePtr>>2]; + var xh = HEAP32[tempDoublePtr>>2]; + HEAPF64[tempDoublePtr>>3] = y; + var yl = HEAP32[tempDoublePtr>>2]; + var yh = HEAP32[tempDoublePtr>>2]; + func(xl, xh, yl, yh); +} +// EMSCRIPTEN_GENERATED_FUNCTIONS: ["a", "b", "c", "f", "g", "h", "py", "r", "t", "f2", "f3", "llvm3_1", "_inflate", "_malloc", "_mallocNoU", "asm", "phi", "intoCond", "math", "td"] diff --git a/tools/file_packager.py b/tools/file_packager.py index 7d9344cd..8b65b219 100644 --- a/tools/file_packager.py +++ b/tools/file_packager.py @@ -11,7 +11,7 @@ data downloads. Usage: - file_packager.py TARGET [--preload A [B..]] [--embed C [D..]] [--compress COMPRESSION_DATA] [--crunch[=X]] [--js-output=OUTPUT.js] [--no-force] [--use-preload-cache] [--no-heap-copy] + file_packager.py TARGET [--preload A [B..]] [--embed C [D..]] [--exclude E [F..]] [--compress COMPRESSION_DATA] [--crunch[=X]] [--js-output=OUTPUT.js] [--no-force] [--use-preload-cache] [--no-heap-copy] --crunch=X Will compress dxt files to crn with quality level X. The crunch commandline tool must be present and CRUNCH should be defined in ~/.emscripten that points to it. JS crunch decompressing code will @@ -45,9 +45,10 @@ import posixpath import shared from shared import Compression, execute, suffix, unsuffixed from subprocess import Popen, PIPE, STDOUT +import fnmatch if len(sys.argv) == 1: - print '''Usage: file_packager.py TARGET [--preload A...] [--embed B...] [--compress COMPRESSION_DATA] [--crunch[=X]] [--js-output=OUTPUT.js] [--no-force] [--use-preload-cache] [--no-heap-copy] + print '''Usage: file_packager.py TARGET [--preload A...] [--embed B...] [--exclude C...] [--compress COMPRESSION_DATA] [--crunch[=X]] [--js-output=OUTPUT.js] [--no-force] [--use-preload-cache] [--no-heap-copy] See the source for more details.''' sys.exit(0) @@ -66,10 +67,10 @@ DDS_HEADER_SIZE = 128 AV_WORKAROUND = 0 # Set to 1 to randomize file order and add some padding, to work around silly av false positives data_files = [] -in_preload = False -in_embed = False +excluded_patterns = [] +leading = '' has_preloaded = False -in_compress = 0 +compress_cnt = 0 crunch = 0 plugins = [] jsoutput = None @@ -81,45 +82,40 @@ use_preload_cache = False # If set to False, the XHR blob is kept intact, and fread()s etc. are performed directly to that data. This optimizes for minimal memory usage and fread() performance. no_heap_copy = True -for arg in sys.argv[1:]: +for arg in sys.argv[2:]: if arg == '--preload': - in_preload = True - in_embed = False has_preloaded = True - in_compress = 0 + leading = 'preload' elif arg == '--embed': - in_embed = True - in_preload = False - in_compress = 0 + leading = 'embed' + elif arg == '--exclude': + leading = 'exclude' elif arg == '--compress': + compress_cnt = 1 Compression.on = True - in_compress = 1 - in_preload = False - in_embed = False + leading = 'compress' elif arg == '--no-force': force = False + leading = '' elif arg == '--use-preload-cache': use_preload_cache = True + leading = '' elif arg == '--no-heap-copy': no_heap_copy = False + leading = '' elif arg.startswith('--js-output'): jsoutput = arg.split('=')[1] if '=' in arg else None + leading = '' elif arg.startswith('--crunch'): from shared import CRUNCH crunch = arg.split('=')[1] if '=' in arg else '128' - in_preload = False - in_embed = False - in_compress = 0 + leading = '' elif arg.startswith('--plugin'): plugin = open(arg.split('=')[1], 'r').read() eval(plugin) # should append itself to plugins - in_preload = False - in_embed = False - in_compress = 0 - elif in_preload or in_embed: - mode = 'preload' - if in_embed: - mode = 'embed' + leading = '' + elif leading == 'preload' or leading == 'embed': + mode = leading if '@' in arg: srcpath, dstpath = arg.split('@') # User is specifying destination filename explicitly. else: @@ -128,16 +124,21 @@ for arg in sys.argv[1:]: data_files.append({ 'srcpath': srcpath, 'dstpath': dstpath, 'mode': mode }) else: print >> sys.stderr, 'Warning: ' + arg + ' does not exist, ignoring.' - elif in_compress: - if in_compress == 1: + elif leading == 'exclude': + excluded_patterns.append(arg) + elif leading == 'compress': + if compress_cnt == 1: Compression.encoder = arg - in_compress = 2 - elif in_compress == 2: + compress_cnt = 2 + elif compress_cnt == 2: Compression.decoder = arg - in_compress = 3 - elif in_compress == 3: + compress_cnt = 3 + elif compress_cnt == 3: Compression.js_name = arg - in_compress = 0 + compress_cnt = 0 + else: + print >> sys.stderr, 'Unknown parameter:', arg + sys.exit(1) if (not force) and len(data_files) == 0: has_preloaded = False @@ -172,16 +173,14 @@ def has_hidden_attribute(filepath): result = False return result -# The packager should never preload/embed any directories that have a component starting with '.' in them, -# or if the file is hidden (Win32). Note that this filter ONLY applies to directories. Explicitly specified single files -# are always preloaded/embedded, even if they start with a '.'. -def should_ignore(filename): - if has_hidden_attribute(filename): +# The packager should never preload/embed files if the file is hidden (Win32). +# or it matches any pattern specified in --exclude +def should_ignore(fullname): + if has_hidden_attribute(fullname): return True - components = filename.replace('\\\\', '/').replace('\\', '/').split('/') - for c in components: - if c.startswith('.') and c != '.' and c != '..': + for p in excluded_patterns: + if fnmatch.fnmatch(fullname, p): return True return False @@ -190,20 +189,31 @@ def add(arg, dirname, names): # rootpathsrc: The path name of the root directory on the local FS we are adding to emscripten virtual FS. # rootpathdst: The name we want to make the source path available on the emscripten virtual FS. mode, rootpathsrc, rootpathdst = arg + new_names = [] for name in names: fullname = os.path.join(dirname, name) - if not os.path.isdir(fullname): - if should_ignore(fullname): - if DEBUG: - print >> sys.stderr, 'Skipping hidden file "' + fullname + '" from inclusion in the emscripten virtual file system.' - else: + if should_ignore(fullname): + if DEBUG: + print >> sys.stderr, 'Skipping file "' + fullname + '" from inclusion in the emscripten virtual file system.' + else: + new_names.append(name) + if not os.path.isdir(fullname): dstpath = os.path.join(rootpathdst, os.path.relpath(fullname, rootpathsrc)) # Convert source filename relative to root directory of target FS. - data_files.append({ 'srcpath': fullname, 'dstpath': dstpath, 'mode': mode }) + new_data_files.append({ 'srcpath': fullname, 'dstpath': dstpath, 'mode': mode }) + del names[:] + names.extend(new_names) +new_data_files = [] for file_ in data_files: - if os.path.isdir(file_['srcpath']): - os.path.walk(file_['srcpath'], add, [file_['mode'], file_['srcpath'], file_['dstpath']]) -data_files = filter(lambda file_: not os.path.isdir(file_['srcpath']), data_files) + if not should_ignore(file_['srcpath']): + if os.path.isdir(file_['srcpath']): + os.path.walk(file_['srcpath'], add, [file_['mode'], file_['srcpath'], file_['dstpath']]) + else: + new_data_files.append(file_) +data_files = filter(lambda file_: not os.path.isdir(file_['srcpath']), new_data_files) +if len(data_files) == 0: + print >> sys.stderr, 'Nothing to do!' + sys.exit(1) # Absolutize paths, and check that they make sense curr_abspath = os.path.abspath(os.getcwd()) diff --git a/tools/js-optimizer.js b/tools/js-optimizer.js index 57ce0071..161ed59c 100644 --- a/tools/js-optimizer.js +++ b/tools/js-optimizer.js @@ -271,6 +271,16 @@ function isEmptyNode(node) { return node.length === 2 && node[0] === 'toplevel' && node[1].length === 0; } +function clearEmptyNodes(list) { + for (var i = 0; i < list.length;) { + if (isEmptyNode(list[i]) || (list[i][0] === 'stat' && isEmptyNode(list[i][1]))) { + list.splice(i, 1); + } else { + i++; + } + } +} + // Passes // Dump the AST. Useful for debugging. For example, @@ -585,12 +595,24 @@ function simplifyExpressions(ast) { } } else if (type === 'assign') { // optimizations for assigning into HEAP32 specifically - if (node[1] === true && node[2][0] === 'sub' && node[2][1][0] === 'name' && node[2][1][1] === 'HEAP32') { - // HEAP32[..] = x | 0 does not need the | 0 (unless it is a mandatory |0 of a call) - if (node[3][0] === 'binary' && node[3][1] === '|') { - if (node[3][2][0] === 'num' && node[3][2][1] === 0 && node[3][3][0] != 'call') { - node[3] = node[3][3]; - } else if (node[3][3][0] === 'num' && node[3][3][1] === 0 && node[3][2][0] != 'call') { + if (node[1] === true && node[2][0] === 'sub' && node[2][1][0] === 'name') { + if (node[2][1][1] === 'HEAP32') { + // HEAP32[..] = x | 0 does not need the | 0 (unless it is a mandatory |0 of a call) + if (node[3][0] === 'binary' && node[3][1] === '|') { + if (node[3][2][0] === 'num' && node[3][2][1] === 0 && node[3][3][0] != 'call') { + node[3] = node[3][3]; + } else if (node[3][3][0] === 'num' && node[3][3][1] === 0 && node[3][2][0] != 'call') { + node[3] = node[3][2]; + } + } + } else if (node[2][1][1] === 'HEAP8') { + // HEAP8[..] = x & 0xff does not need the & 0xff + if (node[3][0] === 'binary' && node[3][1] === '&' && node[3][3][0] == 'num' && node[3][3][1] == 0xff) { + node[3] = node[3][2]; + } + } else if (node[2][1][1] === 'HEAP16') { + // HEAP16[..] = x & 0xffff does not need the & 0xffff + if (node[3][0] === 'binary' && node[3][1] === '&' && node[3][3][0] == 'num' && node[3][3][1] == 0xffff) { node[3] = node[3][2]; } } @@ -2122,7 +2144,7 @@ function registerize(ast) { // In memSafe mode, we are more careful and assume functions can replace HEAP and FUNCTION_TABLE, which // can happen in ALLOW_MEMORY_GROWTH mode -var ELIMINATION_SAFE_NODES = set('var', 'assign', 'call', 'if', 'toplevel', 'do', 'return', 'label', 'switch'); // do is checked carefully, however +var ELIMINATION_SAFE_NODES = set('var', 'assign', 'call', 'if', 'toplevel', 'do', 'return', 'label', 'switch', 'binary', 'unary-prefix'); // do is checked carefully, however var IGNORABLE_ELIMINATOR_SCAN_NODES = set('num', 'toplevel', 'string', 'break', 'continue', 'dot'); // dot can only be STRING_TABLE.* var ABORTING_ELIMINATOR_SCAN_NODES = set('new', 'object', 'function', 'defun', 'for', 'while', 'array', 'throw'); // we could handle some of these, TODO, but nontrivial (e.g. for while, the condition is hit multiple times after the body) @@ -2412,7 +2434,12 @@ function eliminate(ast, memSafe) { if (allowTracking) track(name, node[3], node); } } else if (target[0] === 'sub') { - if (!isTempDoublePtrAccess(target) && !memoryInvalidated) { + if (isTempDoublePtrAccess(target)) { + if (!globalsInvalidated) { + invalidateGlobals(); + globalsInvalidated = true; + } + } else if (!memoryInvalidated) { invalidateMemory(); memoryInvalidated = true; } @@ -2672,6 +2699,7 @@ function eliminate(ast, memSafe) { } if (ifTrue[1][0] && ifTrue[1][0][0] === 'break') { var assigns = ifFalse[1]; + clearEmptyNodes(assigns); var loopers = [], helpers = []; for (var i = 0; i < assigns.length; i++) { if (assigns[i][0] === 'stat' && assigns[i][1][0] === 'assign') { @@ -3097,6 +3125,17 @@ function outline(ast) { parts = []; var curr = node; while (1) { + if (!curr[3]) { + // we normally expect ..if (cond) { .. } else [if (nextCond) {] (in [] is what we hope to see) + // but are now seeing ..if (cond) { .. } with no else. This might be + // ..if (cond) if (nextCond) { + // which vacuum can generate from if (cond) {} else if (nextCond), making it + // if (!cond) if (nextCond) + // so we undo that, in hopes of making it more flattenable + curr[3] = curr[2]; + curr[2] = ['block', []]; + curr[1] = simplifyNotCompsDirect(['unary-prefix', '!', curr[1]]); + } parts.push({ condition: curr[1], body: curr[2] }); curr = curr[3]; if (!curr) break; diff --git a/tools/shared.py b/tools/shared.py index 443ff4c7..eb1c63be 100644 --- a/tools/shared.py +++ b/tools/shared.py @@ -322,7 +322,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.7.8' +EMSCRIPTEN_VERSION = '1.8.0' def generate_sanity(): return EMSCRIPTEN_VERSION + '|' + get_llvm_target() + '|' + LLVM_ROOT @@ -682,7 +682,7 @@ def line_splitter(data): return out -def limit_size(string, MAX=12000*20): +def limit_size(string, MAX=800*20): if len(string) < MAX: return string return string[0:MAX/2] + '\n[..]\n' + string[-MAX/2:] @@ -1094,7 +1094,7 @@ class Building: # 8k is a bit of an arbitrary limit, but a reasonable one # for max command line size before we use a respose file response_file = None - if WINDOWS and len(' '.join(link_cmd)) > 8192: + if len(' '.join(link_cmd)) > 8192: logging.debug('using response file for llvm-link') [response_fd, response_file] = mkstemp(suffix='.response', dir=TEMP_DIR) diff --git a/tools/test-js-optimizer-asm-pre-output.js b/tools/test-js-optimizer-asm-pre-output.js index 2e3db000..0fa81050 100644 --- a/tools/test-js-optimizer-asm-pre-output.js +++ b/tools/test-js-optimizer-asm-pre-output.js @@ -58,12 +58,14 @@ function b($this, $__n) { _memset($38 + $23 | 0, 0, $__n | 0, 1, 1213141516); $40 = $23 + $__n | 0; if ((HEAP8[$4 & 16777215] & 1) == 0) { - HEAP8[$4 & 16777215] = $40 << 1 & 255; + HEAP8[$4 & 16777215] = $40 << 1; } else { HEAP32[($this + 4 & 16777215) >> 2] = $40; } HEAP8[$38 + $40 & 16777215] = 0; HEAP32[$4] = ~HEAP32[$5]; + HEAP8[$4] = HEAP32[$5]; + HEAP16[$4] = HEAP32[$5]; HEAP32[$4] = ~HEAP32[$5]; HEAP32[$4] = ~HEAP32[$5]; h(~~g ^ -1); @@ -240,10 +242,10 @@ function _main($argc, $argv) { } if (($i_09_i_i | 0) > (HEAP32[9600 + ($j_08_i_i << 2) >> 2] | 0)) { $34 = $j_08_i_i + 1 | 0; - HEAP8[$i_09_i_i + 8952 | 0] = $34 & 255; + HEAP8[$i_09_i_i + 8952 | 0] = $34; $j_1_i_i = $34; } else { - HEAP8[$i_09_i_i + 8952 | 0] = $j_08_i_i & 255; + HEAP8[$i_09_i_i + 8952 | 0] = $j_08_i_i; $j_1_i_i = $j_08_i_i; } $38 = $i_09_i_i + 1 | 0; diff --git a/tools/test-js-optimizer-asm-pre.js b/tools/test-js-optimizer-asm-pre.js index 9e6edf0f..dadeef53 100644 --- a/tools/test-js-optimizer-asm-pre.js +++ b/tools/test-js-optimizer-asm-pre.js @@ -66,6 +66,10 @@ function b($this, $__n) { HEAP8[($38 + $40 | 0) & 16777215] = 0; // Eliminate the |0. HEAP32[$4] = ((~(HEAP32[$5]|0))|0); + // Eliminate the &255 + HEAP8[$4] = HEAP32[$5]&255; + // Eliminate the &65535 + HEAP16[$4] = HEAP32[$5]&65535; // Rewrite to ~. HEAP32[$4] = HEAP32[$5]^-1; // Rewrite to ~ and eliminate the |0. |