summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--AUTHORS14
-rw-r--r--CONTRIBUTING.md (renamed from CONTRIBUTING.markdown)3
-rw-r--r--ChangeLog326
-rw-r--r--LICENSE6
-rw-r--r--README.markdown14
-rw-r--r--README.md26
-rw-r--r--cmake/Platform/Emscripten.cmake7
-rw-r--r--docs/emscripten_powered_by_logo.svg1547
-rw-r--r--docs/emscripten_switch_logo.epsbin1114650 -> 0 bytes
-rw-r--r--docs/emscripten_switch_logo.jpgbin35951 -> 0 bytes
-rwxr-xr-xemcc335
-rwxr-xr-xemcmake8
-rw-r--r--emcmake.bat2
-rw-r--r--emscripten-version.txt2
-rwxr-xr-xemscripten.py56
-rw-r--r--media/powered_by_logo.pngbin0 -> 24795 bytes
-rw-r--r--media/powered_by_logo.svg1547
-rw-r--r--media/switch_logo.pngbin0 -> 19222 bytes
-rw-r--r--media/switch_logo.svg (renamed from docs/emscripten_switch_logo.svg)0
-rw-r--r--package.json2
-rw-r--r--patches/README4
-rw-r--r--patches/series2
-rwxr-xr-xscons-tools/emscripten.py56
-rw-r--r--src/closure-externs.js60
-rw-r--r--src/deps_info.json3
-rw-r--r--src/embind/embind.js154
-rw-r--r--src/embind/emval.js156
-rw-r--r--src/headlessCanvas.js4
-rw-r--r--src/intertyper.js10
-rw-r--r--src/jsifier.js16
-rw-r--r--src/library.js446
-rw-r--r--src/library_browser.js231
-rw-r--r--src/library_egl.js6
-rw-r--r--src/library_fs.js151
-rw-r--r--src/library_gc.js2
-rw-r--r--src/library_gl.js7
-rw-r--r--src/library_glfw.js237
-rw-r--r--src/library_glut.js5
-rw-r--r--src/library_html5.js79
-rw-r--r--src/library_openal.js36
-rw-r--r--src/library_sdl.js445
-rw-r--r--src/library_sockfs.js38
-rw-r--r--src/modules.js1
-rw-r--r--src/parseTools.js10
-rw-r--r--src/postamble.js16
-rw-r--r--src/preamble.js23
-rw-r--r--src/relooper/README.markdown14
-rw-r--r--src/relooper/README.md12
-rw-r--r--src/relooper/Relooper.cpp169
-rw-r--r--src/relooper/Relooper.h22
-rw-r--r--src/relooper/test.cpp123
-rw-r--r--src/relooper/test.txt65
-rw-r--r--src/runtime.js27
-rw-r--r--src/settings.js34
-rw-r--r--src/shell.html1664
-rw-r--r--src/shell.js6
-rw-r--r--src/shell_minimal.html11
-rw-r--r--src/struct_info.json29
-rw-r--r--system/include/EGL/eglplatform.h2
-rw-r--r--system/include/SDL/COPYING5
-rw-r--r--system/include/SDL/SDL_config_minimal.h2
-rw-r--r--system/include/SDL/SDL_events.h70
-rw-r--r--system/include/SDL/SDL_stdinc.h2
-rw-r--r--system/include/SDL/SDL_touch.h92
-rw-r--r--system/include/emscripten/bind.h37
-rw-r--r--system/include/emscripten/emscripten.h99
-rw-r--r--system/include/emscripten/html5.h25
-rw-r--r--system/include/emscripten/val.h200
-rw-r--r--system/include/emscripten/wire.h66
-rw-r--r--system/include/execinfo.h44
-rw-r--r--system/include/gc.h2
-rw-r--r--system/include/jansson.h2
-rw-r--r--system/include/unwind.h154
-rw-r--r--system/lib/compiler-rt/int_endianness.h2
-rw-r--r--system/lib/dlmalloc.c2
-rw-r--r--system/lib/embind/bind.cpp79
-rw-r--r--system/lib/libc.symbols2
-rw-r--r--system/lib/libc/musl/arch/js/atomic.h103
-rw-r--r--system/lib/libc/musl/src/stdlib/atoi.c16
-rw-r--r--system/lib/libc/musl/src/stdlib/atol.c17
-rw-r--r--system/lib/libc/musl/src/stdlib/atoll.c17
-rw-r--r--system/lib/libc/musl/src/stdlib/bsearch.c20
-rw-r--r--system/lib/libc/musl/src/stdlib/qsort.c215
-rw-r--r--system/lib/libc/musl/src/string/bcmp.c7
-rw-r--r--system/lib/libc/musl/src/string/bcopy.c7
-rw-r--r--system/lib/libc/musl/src/string/bzero.c7
-rw-r--r--system/lib/libc/musl/src/string/index.c7
-rw-r--r--system/lib/libc/musl/src/string/memchr.c24
-rw-r--r--system/lib/libc/musl/src/string/rindex.c7
-rw-r--r--system/lib/libc/musl/src/string/stpcpy.c29
-rw-r--r--system/lib/libc/musl/src/string/strchr.c9
-rw-r--r--system/lib/libc/musl/src/string/strcspn.c19
-rw-r--r--system/lib/libc/musl/src/string/strdup.c13
-rw-r--r--system/lib/libc/musl/src/string/strncat.c10
-rw-r--r--system/lib/libc/musl/src/string/strndup.c12
-rw-r--r--system/lib/libc/musl/src/string/strnlen.c7
-rw-r--r--system/lib/libc/musl/src/string/strpbrk.c7
-rw-r--r--system/lib/libc/musl/src/string/strrchr.c8
-rw-r--r--system/lib/libc/musl/src/string/strspn.c20
-rw-r--r--system/lib/libc/musl/src/string/strstr.c156
-rw-r--r--system/lib/libc/musl/src/string/strtok.c13
-rw-r--r--system/lib/libc/musl/src/string/strtok_r.c12
-rw-r--r--system/lib/libcextra.symbols22
-rw-r--r--tests/799.cpp2
-rw-r--r--tests/aniso.c2
-rw-r--r--tests/asmjs-unknown-emscripten.c98
-rw-r--r--tests/box2d/Benchmark.cpp8
-rw-r--r--tests/cases/2xi40.ll4
-rw-r--r--tests/cases/514_ta2.ll4
-rw-r--r--tests/cases/aliasbitcast.ll4
-rw-r--r--tests/cases/aliasbitcast2_noasm.ll2
-rw-r--r--tests/cases/aliasbitcast3_noasm.ll4
-rw-r--r--tests/cases/aliasbitcastdollar_noasm.ll2
-rw-r--r--tests/cases/aliases_fastcomp.ll41
-rw-r--r--tests/cases/aliases_fastcomp.txt5
-rw-r--r--tests/cases/atomicrmw.ll4
-rw-r--r--tests/cases/atomicrmw_dec.ll4
-rw-r--r--tests/cases/atomicrmw_unaligned.ll4
-rw-r--r--tests/cases/bigdouble.ll4
-rw-r--r--tests/cases/boolret_fastcomp.ll4
-rw-r--r--tests/cases/breakinthemiddle.ll4
-rw-r--r--tests/cases/breakinthemiddle2.ll4
-rw-r--r--tests/cases/caall.ll4
-rw-r--r--tests/cases/callwithstructural64_ta2.ll4
-rw-r--r--tests/cases/callwithstructural_ta2.ll4
-rw-r--r--tests/cases/complexphi.ll4
-rw-r--r--tests/cases/ctors_cast.ll4
-rw-r--r--tests/cases/dash.ll4
-rw-r--r--tests/cases/dollar.ll4
-rw-r--r--tests/cases/emptyalloca.ll4
-rw-r--r--tests/cases/emptyasm_aue.ll (renamed from tests/cases/emptyasm_le32.ll)4
-rw-r--r--tests/cases/emptystruct.ll2
-rw-r--r--tests/cases/entry3.ll4
-rw-r--r--tests/cases/fixablebadcasts_fastcomp.ll27
-rw-r--r--tests/cases/fixablebadcasts_fastcomp.txt1
-rw-r--r--tests/cases/fptosi.ll4
-rw-r--r--tests/cases/funcptr.ll4
-rw-r--r--tests/cases/fuzz6_ta2.ll4
-rw-r--r--tests/cases/gepaddoverflow.ll4
-rw-r--r--tests/cases/i24_ce_fastcomp.ll11393
-rw-r--r--tests/cases/i24_ce_fastcomp.txt1
-rw-r--r--tests/cases/i24_mem_ta2.ll4
-rw-r--r--tests/cases/i96_ashr_ta2.ll4
-rw-r--r--tests/cases/i96shiftnon32_ta2.ll4
-rw-r--r--tests/cases/icmp64.ll32
-rw-r--r--tests/cases/icmp64.txt4
-rw-r--r--tests/cases/inttoptr.ll4
-rw-r--r--tests/cases/invokebitcast.ll13
-rw-r--r--tests/cases/invokeundef.ll4
-rw-r--r--tests/cases/legalizer_b_ta2.ll6
-rw-r--r--tests/cases/legalizer_ta2.ll4
-rw-r--r--tests/cases/loadbitcastgep.ll4
-rw-r--r--tests/cases/muli33_ta2.ll4
-rw-r--r--tests/cases/oob_ta2.ll4
-rw-r--r--tests/cases/phi24_ta2.ll4
-rw-r--r--tests/cases/phicubed.ll4
-rw-r--r--tests/cases/phientryimplicit.ll10
-rw-r--r--tests/cases/phientryimplicitmix.ll4
-rw-r--r--tests/cases/phientryimplicitmoar.ll4
-rw-r--r--tests/cases/philoop_ta2.ll4
-rw-r--r--tests/cases/phinonexist.ll11
-rw-r--r--tests/cases/phinonreachable64.ll26
-rw-r--r--tests/cases/phiptrtoint.ll4
-rw-r--r--tests/cases/phiself.ll4
-rw-r--r--tests/cases/ptrtoi64.ll4
-rw-r--r--tests/cases/ptrtoint_blockaddr.ll4
-rw-r--r--tests/cases/quotedlabel.ll2
-rw-r--r--tests/cases/returnnan_fastcomp.ll34
-rw-r--r--tests/cases/returnnan_fastcomp.txt3
-rw-r--r--tests/cases/sillybitcast.ll10
-rw-r--r--tests/cases/sillybitcast2.ll4
-rw-r--r--tests/cases/sillyfuncast.ll4
-rw-r--r--tests/cases/sillyfuncast2_noasm.ll (renamed from tests/cases/sillyfuncast2.ll)1
-rw-r--r--tests/cases/storebigfloat.ll4
-rw-r--r--tests/cases/storestruct.ll4
-rw-r--r--tests/cases/structinparam.ll4
-rw-r--r--tests/cases/structparam.ll2
-rw-r--r--tests/cases/structphiparam.ll4
-rw-r--r--tests/cases/sub_11_0.ll4
-rw-r--r--tests/cases/switch64_ta2.ll4
-rw-r--r--tests/cases/switch64b_ta2.ll4
-rw-r--r--tests/cases/switch64c_ta2.ll68
-rw-r--r--tests/cases/switch64c_ta2.txt3
-rw-r--r--tests/cases/uadd_overflow_ta2.ll4
-rw-r--r--tests/cases/usenullcall_fastcomp.ll31
-rw-r--r--tests/cases/usenullcall_fastcomp.txt1
-rw-r--r--tests/cases/zeroembedded.ll4
-rw-r--r--tests/cases/zeroextarg.ll4
-rw-r--r--tests/cmake/target_html/CMakeLists.txt32
-rw-r--r--tests/core/test_atomic_cxx.cpp130
-rw-r--r--tests/core/test_atomic_cxx.txt226
-rw-r--r--tests/core/test_inlinejs3.in8
-rw-r--r--tests/core/test_inlinejs3.out4
-rw-r--r--tests/core/test_sscanf_other_whitespace.in4
-rw-r--r--tests/core/test_strndup.out2
-rw-r--r--tests/cube_explosion.c4
-rw-r--r--tests/cubegeom.c4
-rw-r--r--tests/cubegeom_color.c8
-rw-r--r--tests/cubegeom_color2.c4
-rw-r--r--tests/cubegeom_fog.c4
-rw-r--r--tests/cubegeom_glew.c2
-rw-r--r--tests/cubegeom_mt.c4
-rw-r--r--tests/cubegeom_normal.c4
-rw-r--r--tests/cubegeom_normal_dap.c4
-rw-r--r--tests/cubegeom_normal_dap_far.c4
-rw-r--r--tests/cubegeom_normal_dap_far_glda.c4
-rw-r--r--tests/cubegeom_normal_dap_far_glda_quad.c4
-rw-r--r--tests/cubegeom_normal_dap_far_range.c4
-rw-r--r--tests/cubegeom_pre.c4
-rw-r--r--tests/cubegeom_pre2.c4
-rw-r--r--tests/cubegeom_pre2_vao.c4
-rw-r--r--tests/cubegeom_pre2_vao2.c4
-rw-r--r--tests/cubegeom_pre3.c4
-rw-r--r--tests/cubegeom_pre_vao.c4
-rw-r--r--tests/cubegeom_proc.c4
-rw-r--r--tests/cubegeom_texturematrix.c4
-rw-r--r--tests/dirent/test_readdir_empty.c47
-rw-r--r--tests/embind/build_benchmark2
-rw-r--r--tests/embind/embind.test.js82
-rw-r--r--tests/embind/embind_test.cpp113
-rw-r--r--tests/emscripten_log/emscripten_log.cpp27
-rw-r--r--tests/fs/test_idbfs_sync.c26
-rw-r--r--tests/full_es2_sdlproc.c2
-rw-r--r--tests/fuzz/11.c1570
-rw-r--r--tests/fuzz/11.c.txt1
-rw-r--r--tests/fuzz/15.c1581
-rw-r--r--tests/fuzz/15.c.txt1
-rw-r--r--tests/fuzz/19.c1408
-rw-r--r--tests/fuzz/19.c.txt1
-rwxr-xr-xtests/fuzz/csmith_driver.py16
-rwxr-xr-xtests/fuzz/test.sh48
-rwxr-xr-xtests/fuzz/testpp.sh48
-rw-r--r--tests/gl_matrix_identity.c6
-rw-r--r--tests/gl_ps.c6
-rw-r--r--tests/gl_ps_packed.c6
-rw-r--r--tests/gl_ps_strides.c6
-rw-r--r--tests/gl_renderers.c6
-rw-r--r--tests/gl_stride.c6
-rw-r--r--tests/gl_vertex_buffer.c6
-rw-r--r--tests/gl_vertex_buffer_pre.c6
-rw-r--r--tests/glbegin_points.c2
-rw-r--r--tests/glgettexenv.c2
-rw-r--r--tests/hello_world.ll13
-rw-r--r--tests/hello_world_gles.c12
-rw-r--r--tests/mem_init.cpp24
-rw-r--r--tests/module/test_stdin.c4
-rw-r--r--tests/nbody-java/native_java_lang_String.c4
-rw-r--r--tests/nbody-java/native_java_lang_System.c2
-rw-r--r--tests/nbody-java/xmlvm.c4
-rw-r--r--tests/nbody-java/xmlvm.h2
-rw-r--r--tests/openal_buffers.c8
-rw-r--r--tests/openal_playback.cpp8
-rw-r--r--tests/perspective.c6
-rw-r--r--tests/poppler/utils/pdftoppm.cc2
-rw-r--r--tests/python/python.asmjs-unknown-emscripten.bc (renamed from tests/python/python.le32.bc)bin7810608 -> 7814560 bytes
-rwxr-xr-xtests/runner.py33
-rw-r--r--tests/s3tc.c2
-rw-r--r--tests/s3tc_crunch.c2
-rw-r--r--tests/sdl_alloctext.c2
-rw-r--r--tests/sdl_audio_beep.cpp8
-rw-r--r--tests/sdl_audio_mix_channels.c2
-rw-r--r--tests/sdl_canvas.c2
-rw-r--r--tests/sdl_canvas_size.c6
-rw-r--r--tests/sdl_canvas_twice.c2
-rw-r--r--tests/sdl_fog_density.c2
-rw-r--r--tests/sdl_fog_exp2.c2
-rw-r--r--tests/sdl_fog_linear.c2
-rw-r--r--tests/sdl_fog_negative.c2
-rw-r--r--tests/sdl_fog_simple.c2
-rw-r--r--tests/sdl_free_screen.cpp29
-rw-r--r--tests/sdl_gfx_primitives.c4
-rw-r--r--tests/sdl_headless.c5
-rw-r--r--tests/sdl_ogl.c2
-rw-r--r--tests/sdl_ogl_defaultMatrixMode.c2
-rw-r--r--tests/sdl_ogl_p.c2
-rw-r--r--tests/sdl_ogl_proc_alias.c2
-rw-r--r--tests/sdl_rotozoom.c4
-rw-r--r--tests/sdl_swsurface.c2
-rw-r--r--tests/sdl_touch.c81
-rw-r--r--tests/sdl_wm_togglefullscreen.c78
-rw-r--r--tests/sdlglshader.c2
-rw-r--r--tests/sockets/p2p/.gitignore2
-rw-r--r--tests/sockets/p2p/broker/p2p-broker.js231
-rw-r--r--tests/sockets/p2p/client/p2p-client.js4485
-rw-r--r--tests/sockets/p2p/package.json17
-rw-r--r--tests/sockets/test_enet_client.c10
-rw-r--r--tests/sockets/test_enet_server.c8
-rw-r--r--tests/sockets/test_getaddrinfo.c2
-rw-r--r--tests/sockets/test_gethostbyname.c2
-rw-r--r--tests/sockets/test_getnameinfo.c4
-rw-r--r--tests/sockets/test_sockets_echo_client.c6
-rw-r--r--tests/sockets/test_sockets_echo_server.c4
-rw-r--r--tests/sockets/test_sockets_partial_client.c6
-rw-r--r--tests/sockets/test_sockets_partial_server.c4
-rw-r--r--tests/sockets/test_sockets_select_server_closes_connection_client_rw.c6
-rw-r--r--tests/sockets/test_sockets_select_server_down_client.c6
-rw-r--r--tests/sockets/test_sockets_select_server_down_server.c4
-rw-r--r--tests/sockets/webrtc_host.c17
-rw-r--r--tests/sockets/webrtc_peer.c8
-rw-r--r--tests/sqlite/benchmark.c1
-rw-r--r--tests/sqlite/sqlite3.c18
-rw-r--r--tests/stat/test_mknod.c2
-rw-r--r--tests/stat/test_stat.c12
-rw-r--r--tests/test_benchmark.py59
-rw-r--r--tests/test_browser.py504
-rw-r--r--tests/test_core.py338
-rw-r--r--tests/test_float_literals.cpp4
-rw-r--r--tests/test_html5.c4
-rw-r--r--tests/test_html5_fullscreen.c126
-rw-r--r--tests/test_html5_mouse.c159
-rw-r--r--tests/test_interactive.py97
-rw-r--r--tests/test_other.py1076
-rw-r--r--tests/test_sanity.py190
-rw-r--r--tests/test_sockets.py67
-rw-r--r--tests/tex_nonbyte.c6
-rw-r--r--tests/unistd/unlink.c4
-rw-r--r--tests/uuid/test.c2
-rw-r--r--tests/webidl/output.txt56
-rw-r--r--tests/webidl/post.js117
-rw-r--r--tests/webidl/test.cpp8
-rw-r--r--tests/webidl/test.h72
-rw-r--r--tests/webidl/test.idl64
-rw-r--r--tests/worker_api_3_main.cpp44
-rw-r--r--tests/worker_api_3_worker.cpp25
-rw-r--r--third_party/WebIDL.py5030
-rw-r--r--third_party/__init__.py2
-rw-r--r--tools/eliminator/asm-eliminator-test-output.js143
-rw-r--r--tools/eliminator/asm-eliminator-test.js127
-rw-r--r--tools/file_packager.py16
-rw-r--r--tools/js-optimizer.js739
-rw-r--r--tools/js_optimizer.py18
-rwxr-xr-xtools/nativize_llvm.py8
-rw-r--r--tools/profile_stripper.py43
-rw-r--r--tools/profile_used.py17
-rw-r--r--tools/shared.py197
-rwxr-xr-xtools/source-maps/sourcemapper.js2
-rw-r--r--tools/system_libs.py45
-rw-r--r--tools/test-js-optimizer-asm-outline1-output.js146
-rw-r--r--tools/test-js-optimizer-asm-outline1.js64
-rw-r--r--tools/test-js-optimizer-asm-outline2-output.js1
-rw-r--r--tools/test-js-optimizer-output.js78
-rw-r--r--tools/test-js-optimizer-si-output.js197
-rw-r--r--tools/test-js-optimizer-si.js258
-rw-r--r--tools/test-js-optimizer-t2-output.js91
-rw-r--r--tools/test-js-optimizer-t2.js92
-rw-r--r--tools/test-js-optimizer-t2c-output.js17
-rw-r--r--tools/test-js-optimizer-t2c.js18
-rw-r--r--tools/test-js-optimizer-t3-output.js49
-rw-r--r--tools/test-js-optimizer-t3.js50
-rwxr-xr-xtools/traverse.py50
-rw-r--r--tools/validate_asmjs.py5
-rw-r--r--tools/webidl_binder.py432
352 files changed, 39256 insertions, 4445 deletions
diff --git a/AUTHORS b/AUTHORS
index 6c6b3f27..c162103a 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -10,7 +10,7 @@ a license to everyone to use it as detailed in LICENSE.)
* Sigmund Vik <sigmund_vik@yahoo.com>
* Jeff Terrace <jterrace@gmail.com>
* Benoit Tremblay <benoit.tremblay@frimastudio.com>
-* Andreas Bergmeier <andreas.bergmeier@gmx.net>
+* Andreas Bergmeier <abergmeier@gmx.net>
* Ben Schwartz <bens@alum.mit.edu>
* David Claughton <dave@eclecticdave.com>
* David Yip <yipdw@member.fsf.org>
@@ -126,3 +126,15 @@ a license to everyone to use it as detailed in LICENSE.)
* Jack A. Arrington <jack@epicpineapple.com>
* Richard Janicek <r@janicek.co>
* Joel Croteau <jcroteau@gmail.com>
+* Haneef Mubarak <haneef503@gmail.com>
+* Nicolas Peri <nicox@shivaengine.com> (copyright owned by ShiVa Technologies, SAS)
+* Bernhard Fey <e-male@web.de>
+* Dave Nicponski <dave.nicponski@gmail.com>
+* Jonathan Jarri <noxalus@gmail.com>
+* Daniele Di Proietto <daniele.di.proietto@gmail.com>
+* Dan Dascalescu <dNOSPAMdascalescu@gmail.com>
+* Thomas Borsos <thomasborsos@gmail.com>
+* Ori Avtalion <ori@avtalion.name>
+* Guillaume Blanc <guillaumeblanc.sc@gmail.com>
+* Usagi Ito <usagi@WonderRabbitProject.net>
+
diff --git a/CONTRIBUTING.markdown b/CONTRIBUTING.md
index ceea8735..c068eb7f 100644
--- a/CONTRIBUTING.markdown
+++ b/CONTRIBUTING.md
@@ -1,5 +1,6 @@
+Contributing
+============
See our wiki for information about contributing to Emscripten:
[Contribution section on wiki](https://github.com/kripken/emscripten/wiki#contributing)
-
diff --git a/ChangeLog b/ChangeLog
index 9d1d85d6..18640add 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -10,7 +10,331 @@ Not all changes are documented here. In particular, new features, user-oriented
Current trunk code
------------------
- To see a list of commits in the active development branch 'incoming', which have not yet been packaged in a release, see
- https://github.com/kripken/emscripten/compare/1.8.2...incoming
+ - Emscripten: https://github.com/kripken/emscripten/compare/1.16.0...incoming
+ - Emscripten-LLVM: https://github.com/kripken/emscripten-fastcomp/compare/1.16.0...incoming
+ - Emscripten-Clang: https://github.com/kripken/emscripten-fastcomp-clang/compare/1.16.0...incoming
+
+v1.16.0: 4/16/2014
+------------------
+ - Removed browser warnings message in VFS library about replacing __proto__ performance issue.
+ - Full list of changes:
+ - Emscripten: https://github.com/kripken/emscripten/compare/1.15.1...1.16.0
+ - Emscripten-LLVM: no changes.
+ - Emscripten-Clang: https://github.com/kripken/emscripten-fastcomp-clang/compare/1.15.1...1.16.0
+
+v1.15.1: 4/15/2014
+------------------
+ - Added support for SDL2 touch api.
+ - Added new user-controllable emdind-related define #define EMSCRIPTEN_HAS_UNBOUND_TYPE_NAMES, which allows optimizing embind for minimal size when std::type_info is not needed.
+ - Fixed issues with CMake support where CMAKE_AR and CMAKE_RANLIB were not accessible from CMakeLists.txt files.
+ - Full list of changes:
+ - Emscripten: https://github.com/kripken/emscripten/compare/1.15.0...1.15.1
+ - Emscripten-LLVM: no changes.
+ - Emscripten-Clang: no changes.
+
+v1.15.0: 4/11/2014
+------------------
+ - Fix outlining feature for functions that return a double (#2278)
+ - Added support for C++11 atomic constructs (#2273)
+ - Adjusted stdout and stderr stream behavior in the default shell.html to always print out to both web page text log box, and the browser console.
+ - Fixed an issue with loop variable optimization.
+ - Full list of changes:
+ - Emscripten: https://github.com/kripken/emscripten/compare/1.14.1...1.15.0
+ - Emscripten-LLVM: https://github.com/kripken/emscripten-fastcomp/compare/1.14.1...1.15.0
+ - Emscripten-Clang: https://github.com/kripken/emscripten-fastcomp-clang/compare/1.14.1...1.15.0
+
+v1.14.1: 4/8/2014
+------------------
+ - Added new command line utility 'emcmake', which can be used to call emconfigure for cmake.
+ - Added a new emcc command line parameter '--valid-abspath', which allows selectively suppressing warning messages that occur when using absolute path names in include and link directories.
+ - Added a new emcc linker command line parameter '--emit-symbol-map', which will save a map file between minified global names and the original function names.
+ - Fixed an issue with --default-object-ext not always working properly.
+ - Added optimizations to eliminate redundant loop variables and redundant self-assignments.
+ - Migrated several libc functions to use compiled code from musl instead of handwritten JS implementations.
+ - Improved embind support.
+ - Renamed the EM_ASM_() macro to the form EM_ASM_ARGS().
+ - Fixed mouse button ordering issue in glfw.
+ - Fixed an issue when creating a path name that ends in a slash (#2258, #2263)
+ - Full list of changes:
+ - Emscripten: https://github.com/kripken/emscripten/compare/1.14.0...1.14.1
+ - Emscripten-LLVM: https://github.com/kripken/emscripten-fastcomp/compare/1.14.0...1.14.1
+ - Emscripten-Clang: no changes.
+
+v1.14.0: 3/25/2014
+------------------
+ - Added new emcc linker command line option '-profiling', which defaults JS code generation options suited for benchmarking and profiling purposes.
+ - Implemented the EGL function eglWaitGL().
+ - Fixed an issue with the HTML5 API that caused the HTML5 event listener unregistration to fail.
+ - Fixed issues with numpad keys in SDL support library.
+ - Added a new JS optimizer pass 'simplifyIfs', which is run when -s SIMPLIFY_IFS=1 link flag is set and -g is not specified. This pass merges multiple nested if()s together into single comparisons, where possible.
+ - Removed false positive messages on missing internal "emscripten_xxx" symbols at link stage.
+ - Updated to latest relooper version.
+ - Full list of changes:
+ - Emscripten: https://github.com/kripken/emscripten/compare/1.13.2...1.14.0
+ - Emscripten-LLVM: https://github.com/kripken/emscripten-fastcomp/compare/1.13.2...1.14.0
+ - Emscripten-Clang: no changes.
+
+v1.13.2: 3/15/2014
+------------------
+ - Fixed issues with SDL audio on Safari.
+ - Fixed issues with HTML5 API mouse scroll events on Safari.
+ - Fixed issues with HTML5 fullscreen requests in IE11.
+ - Enabled support for emscripten_get_callstack on IE10+.
+ - Fixed issues with Closure symbol minification.
+ - Further improved em_asm()-related error messages.
+ - Updated to latest relooper version.
+ - Full list of changes:
+ - Emscripten: https://github.com/kripken/emscripten/compare/1.13.1...1.13.2
+ - Emscripten-LLVM: https://github.com/kripken/emscripten-fastcomp/compare/1.13.1...1.13.2
+ - Emscripten-Clang: no changes.
+
+v1.13.1: 3/10/2014
+------------------
+ - Disallow C implicit function declarations by making it an error instead of a warning by default. These will not work with Emscripten, due to strict Emscripten signature requirements when calling function pointers (#2175).
+ - Allow transitioning to full screen from SDL as a response to mouse press events.
+ - Fixed a bug in previous 1.13.0 release that broke fullscreen transitioning from working.
+ - Fixed emscripten/html5.h to be used in C source files.
+ - Fix an issue where extraneous system libraries would get included in the generated output (#2191).
+ - Added a new function emscripten_async_wget2_data() that allows reading from an XMLHTTPRequest directly into memory while supporting advanced features.
+ - Fixed esc key code in GLFW.
+ - Added new emscripten_debugger() intrinsic function, which calls into JS "debugger;" statement to break into a JS debugger.
+ - Fixed varargs function call alignment of doubles to 8 bytes.
+ - Switched to using default function local stack alignment to 16 bytes to be SIMD-friendly.
+ - Improved error messages when user code has a syntax error in em_asm() statements.
+ - Switched to using a new custom LLVM datalayout format for Emscripten. See https://github.com/kripken/emscripten-fastcomp/commit/65405351ba0b32a8658c65940e0b65ceb2601ad4
+ - Optimized function local stack space to use fewer temporary JS variables.
+ - Full list of changes:
+ - Emscripten: https://github.com/kripken/emscripten/compare/1.13.0...1.13.1
+ - Emscripten-LLVM: https://github.com/kripken/emscripten-fastcomp/compare/1.13.0...1.13.1
+ - Emscripten-Clang: https://github.com/kripken/emscripten-fastcomp-clang/compare/1.13.0...1.13.1
+
+v1.13.0: 3/3/2014
+------------------
+ - Fixed the deprecated source mapping syntax warning.
+ - Fixed a buffer overflow issue in emscripten_get_callstack (#2171).
+ - Added support for -Os (optimize for size) and -Oz (aggressively optimize for size) arguments to emcc.
+ - Fixed a typo that broko the call signature of glCompressedTexSubImage2D() function (#2173).
+ - Added new browser fullscreen resize logic that always retains aspect ratio and adds support for IE11.
+ - Improve debug messaging with bad function pointer calls when -s ASSERTIONS=2 is set.
+ - Full list of changes: https://github.com/kripken/emscripten/compare/1.12.3...1.13.0
+
+v1.12.3: 2/27/2014
+------------------
+ - Fixed alcOpenDevice on Safari.
+ - Improved the warning message on missing symbols to not show false positives (#2154).
+ - Improved EmscriptenFullscreenChangeEvent HTML5 API structure to return information about HTML element and screen sizes for convenience.
+ - Full list of changes: https://github.com/kripken/emscripten/compare/1.12.2...1.12.3
+
+v1.12.2: 2/25/2014
+------------------
+ - Added better warning message if Emscripten, LLVM and Clang versions don't match.
+ - Introduced the asmjs-unknown-emscripten target triple that allows specializing LLVM codegen for Emscripten purposes.
+ - Full list of changes: https://github.com/kripken/emscripten/compare/1.12.1...1.12.2
+
+v1.12.1: 2/25/2014
+------------------
+ - TURNED ON FASTCOMP BY DEFAULT. This means that you will need to migrate to fastcomp-clang build. Either use an Emscripten SDK distribution, or to build manually, see https://github.com/kripken/emscripten/wiki/LLVM-Backend for info.
+ - Migrate to requiring Clang 3.3 instead of Clang 3.2. The fastcomp-clang repository by Emscripten is based on Clang 3.3.
+ - Deprecated old Emscripten libgc implementation.
+ - asm.js will now be always enabled, even in -O0 builds in fastcomp.
+ - Remove support for -s RUNTIME_TYPE_INFO, which is unsupported in fastcomp.
+ - Added a new "powered by Emscripten" logo.
+ - Updated default shell.html graphical layout.
+ - Added new macro EM_ASM_, which allows sending values to JS without returning anything.
+ - Deprecated the jcache compiler option. It should not be needed anymore.
+ - Added support for fetching callstack column information in Firefox 30 in emscripten_get_callstack.
+ - Fix issues with missing exceptions-related symbols in fastcomp.
+ - Full list of changes: https://github.com/kripken/emscripten/compare/1.12.0...1.12.1
+
+v1.12.0: 2/22/2014
+------------------
+ - Improved the runtime abort error message when calling an invalid function pointer if compiled with -s ASSERTIONS=1 and 2. This allows the developer to better deduce errors with bad function pointers or function pointers casted and invoked via a wrong signature.
+ - Added a new api function emscripten_set_main_loop_arg, which allows passing a userData pointer that will be carried via the function call, useful for object-oriented encapsulation purposes (#2114).
+ - Fixed CMake MinSizeRel configuration type to actually optimize for minimal size with -Os.
+ - Added support for GLES2 VAO extension OES_vertex_array_object for browsers that support it.
+ - Fix issues with emscripten/html5.f when compiled with the SAFE_HEAP option.
+ - Full list of changes: https://github.com/kripken/emscripten/compare/1.11.1...1.12.0
+
+v1.11.1: 2/19/2014
+------------------
+ - Improved eglSwapBuffers to be spec-conformant.
+ - Fixed an issue with asm.js validation and va_args (#2120).
+ - Fixed asm.js validation issues found with fuzzing.
+ - Added new link-time compiler flag -s RETAIN_COMPILER_SETTINGS=1, which enables a runtime API for querying which Emscripten settings were used to compile the file.
+ - Full list of changes: https://github.com/kripken/emscripten/compare/1.11.0...1.11.1
+
+v1.11.0: 2/14/2014
+------------------
+ - Implemented some new SDL library functions.
+ - Renamed standard file descriptors to have handles 0, 1 and 2 rather than 1, 2 and 3 to coincide with unix numbering.
+ - Improved embind support with smart pointers and mixins.
+ - Improved the registerization -O3 optimization pass around switch-case constructs.
+ - Upper-case files with suffix .C are now also recognized (#2109).
+ - Fixed an issue with glGetTexParameter (#2112).
+ - Improved exceptions support in fastcomp.
+ - Added new linker option -s NO_EXIT_RUNTIME=1, which can be used to set a default value for the Module["noExitRuntime"] parameter at compile-time.
+ - Improved SDL audio buffer queueing when the sample rate matches the native web audio graph sample rate.
+ - Added an optimization that removes redundant Math.frounds in -O3.
+ - Improved the default shell.html file.
+ - Full list of changes: https://github.com/kripken/emscripten/compare/1.10.4...1.11.0
+
+v1.10.4: 2/10/2014
+------------------
+ - Added support for legacy GL emulation in fastcomp.
+ - Deprecated the --split-js compiler option. This is not supported in fastcomp.
+ - Full list of changes: https://github.com/kripken/emscripten/compare/1.10.3...1.10.4
+
+v1.10.3: 2/9/2014
+------------------
+ - Work on supporting GL/EGL GetProcAddress.
+ - Fixed issues with shared lib linking support.
+ - Full list of changes: https://github.com/kripken/emscripten/compare/1.10.2...1.10.3
+
+v1.10.2: 2/7/2014
+------------------
+ - Added basic FS unmount support.
+ - Improved screen orientation lock API to return a success code.
+ - Added PRECISE_F32 support to fastcomp.
+ - Fixed issues in fastcomp related to special floating point literal serialization.
+ - Improved SDL audio buffer queueing.
+ - Added new link-time option -s WARN_UNALIGNED=1 to fastcomp to report compiler warnings about generated unaligned memory accesses, which can hurt performance.
+ - Optimized libc strcmp and memcmp with the implementations from musl libc.
+ - Optimized libc memcpy and memset to back to native code for large buffer sizes.
+ - Full list of changes: https://github.com/kripken/emscripten/compare/1.10.1...1.10.2
+
+v1.10.1: 1/31/2014
+------------------
+ - Improve srand() and rand() to be seedable and use a Linear Congruential Generator (LCG) for the rng generation for performance.
+ - Improved OpenAL library support.
+ - Full list of changes: https://github.com/kripken/emscripten/compare/1.10.0...1.10.1
+
+v1.10.0: 1/29/2014
+------------------
+ - Improved C++ exception handling.
+ - Improved OpenAL library support.
+ - Fixed an issue where loading side modules could try to allocate from sealed heap (#2060).
+ - Fixed safe heap issues (2068).
+ - Added new EM_ASM variants that return a value but do not receive any inputs (#2070).
+ - Add support for simultaneously using setjmp and C++ exceptions in fastcomp.
+ - Full list of changes: https://github.com/kripken/emscripten/compare/1.9.5...1.10.0
+
+v1.9.5: 1/25/2014
+------------------
+ - Added a spinner logo to default html shell.
+ - Full list of changes: https://github.com/kripken/emscripten/compare/1.9.4...1.9.5
+
+v1.9.4: 1/24/2014
+------------------
+ - Add support for Ninja and Eclipse+Ninja builds with Emscripten+CMake.
+ - Fixed regressions with GL emulation.
+ - Added support for #if !X in .js library preprocessor.
+ - Make the syntax EM_ASM("code"); not silently fail. Note that the proper form is EM_ASM(code); without double-quotes.
+ - Optimize generated code size by minifying loop labels as well.
+ - Revised the -O3 optimization level to mean "safe, but very slow optimizations on top of -O2", instead of the old meaning "unsafe optimizations". Using -O3 will now only do safe optimizations, but can be very slow compared to -O2.
+ - Implemented a new registerization optimization pass that does extra variable elimination in -O3 and later to reduce the number of local variables in functions.
+ - Implemented a new emscripten/html5.h interface that exposes common HTML5 APIs directly to C code without having to handwrite JS wrappers.
+ - Improved error messages reported on user-written .js libraries containing syntax errors (#2033).
+ - Fixed glBufferData() function call signature with null data pointer.
+ - Added new option Module['filePackagePrefixURL'] that allows customizing the URL where the VFS package is loaded from.
+ - Implemented glGetTexEnviv and glGetTexEnvfv in GL emulation mode.
+ - Optimized the size of large memory initializer sections.
+ - Fixed issues with the safe heap compilation option.
+ - Full list of changes: https://github.com/kripken/emscripten/compare/1.9.3...1.9.4
+
+v1.9.3: 1/17/2014
+------------------
+ - re-merge split blocks in multiples
+ - Full list of changes: https://github.com/kripken/emscripten/compare/1.9.2...1.9.3
+
+v1.9.2: 1/16/2014
+------------------
+ - Full list of changes: https://github.com/kripken/emscripten/compare/1.9.1...1.9.2
+
+v1.9.1: 1/16/2014
+------------------
+ - Optimize desktop GL fixed function pipeline emulation texture load instruction counts when GL_COMBINE is used.
+ - fix Math_floor coercion in unrecommended codegen modes
+ - Full list of changes: https://github.com/kripken/emscripten/compare/1.9.0...1.9.1
+
+v1.9.0: 1/16/2014
+------------------
+ - Full list of changes: https://github.com/kripken/emscripten/compare/1.8.14...1.9.0
+
+v1.8.14: 1/15/2014
+------------------
+ - add musl fputws and fix vswprintf.
+ - Full list of changes: https://github.com/kripken/emscripten/compare/1.8.13...1.8.14
+
+v1.8.13: 1/15/2014
+------------------
+ - remove musl use of fwritex
+ - Full list of changes: https://github.com/kripken/emscripten/compare/1.8.12...1.8.13
+
+v1.8.12: 1/15/2014
+------------------
+ - Added new GLEW 1.10.0 emulation support.
+ - Fixed an issue where the runtime could start more than once when run in a browser (#1992)
+ - Fix a regression in wprintf.
+ - Full list of changes: https://github.com/kripken/emscripten/compare/1.8.11...1.8.12
+
+v1.8.11: 1/15/2014
+------------------
+ - Full list of changes: https://github.com/kripken/emscripten/compare/1.8.10...1.8.11
+
+v1.8.10: 1/14/2014
+------------------
+ - Update libc implementation from musl libc.
+ - Full list of changes: https://github.com/kripken/emscripten/compare/1.8.9...1.8.10
+
+v1.8.9: 1/14/2014
+------------------
+ - add fputwc, which enables wprintf.
+ - Full list of changes: https://github.com/kripken/emscripten/compare/1.8.8...1.8.9
+
+v1.8.8: 1/14/2014
+------------------
+ - Update to latest libcxx and libcxxabi libraries.
+ - Fix handling of floating point negative zero (#1898)
+ - Fixed a memory leak in relooper in previous release.
+ - Fixed an issue in previous release with VBO handling in GL optimizations.
+ - Full list of changes: https://github.com/kripken/emscripten/compare/1.8.7...1.8.8
+
+v1.8.7: 1/13/2014
+------------------
+ - Added support to numpad keycodes in glut support library.
+ - Fix SIMD support with fastcomp.
+ - Fixed a compiler error 'ran out of names' that could occur with too many minified symbol names.
+ - Work around webkit imul bug https://bugs.webkit.org/show_bug.cgi?id=126345 (#1991)
+ - Optimized desktop GL fixed function pipeline emulation path for better performance.
+ - Added support for exceptions when building with fastcomp.
+ - Fix and issue where the run() function could be called multiple times at startup (#1992)
+ - Removed a relooper limitation with fixed buffer size.
+ - Full list of changes: https://github.com/kripken/emscripten/compare/1.8.6...1.8.7
+
+v1.8.6: 1/8/2014
+------------------
+ - Added support for the libuuid library, see http://linux.die.net/man/3/libuuid.
+ - Fixed .js file preprocessor to preprocess recursively (#1984).
+ - Fixed a compiler codegen issue related to overflow arithmetic (#1975)
+ - Added new link-time optimization flag -s AGGRESSIVE_VARIABLE_ELIMINATION=1 that enables the aggressiveVariableElimination js optimizer pass, which tries to remove temporary variables in generated JS code at the expense of code size.
+ - Full list of changes: https://github.com/kripken/emscripten/compare/1.8.5...1.8.6
+
+v1.8.5: 1/7/2014
+------------------
+ - Fixed compiler issues when used with LLVM 3.4.
+ - Full list of changes: https://github.com/kripken/emscripten/compare/1.8.4...1.8.5
+
+v1.8.4: 1/6/2014
+------------------
+ - Added support to Return and Backspace keys to glut
+ - Fixed compiler issues when used with LLVM 3.4.
+ - Full list of changes: https://github.com/kripken/emscripten/compare/1.8.3...1.8.4
+
+v1.8.3: 1/5/2014
+------------------
+ - Improved SDL and page scroll pos handling support for IE10 and IE11.
+ - Optimized SDL_UnlockSurface performance.
+ - Full list of changes: https://github.com/kripken/emscripten/compare/1.8.2...1.8.3
v1.8.2: 1/4/2014
------------------
diff --git a/LICENSE b/LICENSE
index f742692e..447ddba1 100644
--- a/LICENSE
+++ b/LICENSE
@@ -13,7 +13,7 @@ The full text of both licenses follows.
==============================================================================
-Copyright (c) 2010-2011 Emscripten authors, see AUTHORS file.
+Copyright (c) 2010-2014 Emscripten authors, see AUTHORS file.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -35,7 +35,7 @@ THE SOFTWARE.
==============================================================================
-Copyright (c) 2010-2011 Emscripten authors, see AUTHORS file.
+Copyright (c) 2010-2014 Emscripten authors, see AUTHORS file.
All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a
@@ -91,4 +91,4 @@ in accordance with the terms of the MIT license. Node's license follows:
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
- """ \ No newline at end of file
+ """
diff --git a/README.markdown b/README.markdown
deleted file mode 100644
index 81a95141..00000000
--- a/README.markdown
+++ /dev/null
@@ -1,14 +0,0 @@
-
-![logo](http://dl.dropbox.com/u/80664946/emscripten_logo.jpg)
-
-Emscripten
-==========
-
-Emscripten is an LLVM-to-JavaScript compiler. It takes LLVM bitcode - which can be generated from C/C++, using llvm-gcc or clang, or any other language that can be converted into LLVM - and compiles that into JavaScript, which can be run on the web (or anywhere else JavaScript can run).
-
-Links to **demos**, **tutorial**, **FAQ**, etc: <https://github.com/kripken/emscripten/wiki>
-
-Main project page: <http://emscripten.org>
-
-Emscripten is MIT licensed, see LICENSE.txt.
-
diff --git a/README.md b/README.md
new file mode 100644
index 00000000..27da7513
--- /dev/null
+++ b/README.md
@@ -0,0 +1,26 @@
+![emscripten logo](media/switch_logo.png)
+
+Emscripten is an [LLVM](https://en.wikipedia.org/wiki/LLVM)-to-JavaScript compiler. It takes LLVM bitcode - which can be generated
+from C/C++, using `llvm-gcc` (DragonEgg) or `clang`, or any other language that can be
+converted into LLVM - and compiles that into JavaScript, which can be run on the web (or
+anywhere else JavaScript can run).
+
+Links to **demos**, **tutorial**, **FAQ**, etc: <https://github.com/kripken/emscripten/wiki>
+
+Main project page: <http://emscripten.org>
+
+License
+-------
+
+Emscripten is available under 2 licenses, the MIT license and the
+University of Illinois/NCSA Open Source License.
+
+Both are permissive open source licenses, with little if any
+practical difference between them.
+
+The reason for offering both is that (1) the MIT license is
+well-known, while (2) the University of Illinois/NCSA Open Source
+License allows Emscripten's code to be integrated upstream into
+LLVM, which uses that license, should the opportunity arise.
+
+See `LICENSE` for the full content of the licenses.
diff --git a/cmake/Platform/Emscripten.cmake b/cmake/Platform/Emscripten.cmake
index 7d86c467..f9d8c773 100644
--- a/cmake/Platform/Emscripten.cmake
+++ b/cmake/Platform/Emscripten.cmake
@@ -66,11 +66,11 @@ if ("${CMAKE_CXX_COMPILER}" STREQUAL "")
endif()
if ("${CMAKE_AR}" STREQUAL "")
- set(CMAKE_AR "${EMSCRIPTEN_ROOT_PATH}/emar${EMCC_SUFFIX}")
+ set(CMAKE_AR "${EMSCRIPTEN_ROOT_PATH}/emar${EMCC_SUFFIX}" CACHE FILEPATH "Emscripten ar")
endif()
if ("${CMAKE_RANLIB}" STREQUAL "")
- set(CMAKE_RANLIB "${EMSCRIPTEN_ROOT_PATH}/emranlib${EMCC_SUFFIX}")
+ set(CMAKE_RANLIB "${EMSCRIPTEN_ROOT_PATH}/emranlib${EMCC_SUFFIX}" CACHE FILEPATH "Emscripten ranlib")
endif()
# Don't do compiler autodetection, since we are cross-compiling.
@@ -113,8 +113,7 @@ set(CMAKE_CXX_ARCHIVE_APPEND "${CMAKE_AR} r <TARGET> ${CMAKE_START_TEMP_FILE} <L
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".
-set(EMSCRIPTEN 1)
+set(EMSCRIPTEN 1 CACHE BOOL "If true, we are targeting Emscripten output.")
# We are cross-compiling, so unset the common CMake variables that represent the target platform. Leave UNIX define enabled, since Emscripten
# mimics a Linux environment.
diff --git a/docs/emscripten_powered_by_logo.svg b/docs/emscripten_powered_by_logo.svg
new file mode 100644
index 00000000..f39123c1
--- /dev/null
+++ b/docs/emscripten_powered_by_logo.svg
@@ -0,0 +1,1547 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Generator: Adobe Illustrator 15.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
+
+<svg
+ xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ version="1.1"
+ id="Layer_1"
+ x="0px"
+ y="0px"
+ width="900px"
+ height="400px"
+ viewBox="0 0 900 400"
+ enable-background="new 0 0 900 400"
+ xml:space="preserve"
+ inkscape:version="0.48.4 r9939"
+ sodipodi:docname="emscripten_powered_by_logo.svg"><metadata
+ id="metadata345"><rdf:RDF><cc:Work
+ rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
+ id="defs343"><linearGradient
+ y2="247.6265"
+ x2="225.1929"
+ y1="152.499"
+ x1="225.1929"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient5104">
+ <stop
+ id="stop5106"
+ style="stop-color:#C1D72F"
+ offset="0.3227531" />
+ <stop
+ id="stop5108"
+ style="stop-color:#BCD631"
+ offset="0.45119295" />
+ <stop
+ id="stop5110"
+ style="stop-color:#AFD136"
+ offset="0.64491969" />
+ <stop
+ id="stop5112"
+ style="stop-color:#ABD037"
+ offset="1" />
+ <a:midPointStop
+ style="stop-color:#C1D72F"
+ offset="0.0123" />
+ <a:midPointStop
+ style="stop-color:#C1D72F"
+ offset="0.3086" />
+ <a:midPointStop
+ style="stop-color:#ABD037"
+ offset="1" />
+ </linearGradient><linearGradient
+ inkscape:collect="always"
+ xlink:href="#SVGID_2_"
+ id="linearGradient5120"
+ x1="397.56918"
+ y1="128.12726"
+ x2="397.56918"
+ y2="166.25996"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.103059,0,0,1.103059,-38.997823,3.1312145)" /><filter
+ inkscape:collect="always"
+ id="filter5126"><feGaussianBlur
+ inkscape:collect="always"
+ stdDeviation="0.56377237"
+ id="feGaussianBlur5128" /></filter><linearGradient
+ inkscape:collect="always"
+ xlink:href="#SVGID_2_"
+ id="linearGradient5134"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.103059,0,0,1.103059,-38.997823,3.1312145)"
+ x1="397.56918"
+ y1="128.12726"
+ x2="397.56918"
+ y2="166.25996" /></defs><sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="1440"
+ inkscape:window-height="838"
+ id="namedview341"
+ showgrid="false"
+ inkscape:zoom="0.63555556"
+ inkscape:cx="224.82424"
+ inkscape:cy="-52.085109"
+ inkscape:window-x="-8"
+ inkscape:window-y="-8"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="Layer_1" />
+<g
+ id="g5130"
+ transform="matrix(0.91591318,0,0,0.91591318,28.176953,14.143571)"><path
+ transform="matrix(1.103059,0,0,1.103059,-35.073492,-16.03923)"
+ id="path5122"
+ style="fill:#383838;fill-opacity:0.34705882;stroke:none;filter:url(#filter5126)"
+ d="m 494.39333,173.6323 c 0.57407,0.28703 1.87073,1.00226 2.89426,1.02855 0.55732,0.0143 1.14006,-0.1672 1.60262,-0.4784 1.20466,-0.81046 2.23561,-2.03031 2.72683,-3.39661 0.19424,-0.54027 0.0238,-1.72222 0.0238,-1.72222 l -3.82713,-14.06478 -1.98533,0 0.50231,-2.67891 6.36261,0 2.55939,12.22285 4.78392,-9.68746 -2.00924,0 0,-2.65498 7.19979,0 -11.00301,22.38875 -1.69829,1.91358 -2.29628,1.3395 -2.46371,0.26312 -2.29628,-0.21528 -2.79859,-1.36342 z m -12.0637,-14.56445 c -0.93698,1.88565 -1.70261,4.35262 -0.81842,6.26333 0.36549,0.78976 1.35098,1.19428 2.192,1.41737 0.60934,0.16133 1.29167,0.0999 1.88775,-0.10468 0.48126,-0.1655 0.8829,-0.5224 1.255,-0.8697 0.40341,-0.3768 0.77723,-0.80461 1.03505,-1.29262 0.21864,-0.41395 0.40236,-0.84786 0.49325,-1.30698 0.20667,-1.0485 0.35879,-2.1079 0.33583,-3.17631 -0.0184,-0.87403 -0.0789,-1.87107 -0.47711,-2.64959 -0.26344,-0.51379 -0.77017,-0.71849 -1.33113,-0.85633 -0.42395,-0.10479 -0.81432,-0.0626 -1.21773,0.10517 -0.65479,0.27273 -1.2544,0.5311 -1.82112,0.95764 -0.57331,0.4317 -1.21403,0.86959 -1.53337,1.5127 z m 0.65588,-4.31208 c 0,0 2.19341,-1.80738 3.45549,-2.27082 0.71718,-0.26365 3.45363,-0.65258 4.15,-0.3378 1.47292,0.66633 2.26103,1.57529 2.7222,2.60001 0.46118,1.02472 0.69944,2.59956 0.79701,3.73627 0.13278,1.55027 -0.13682,3.77629 -0.53404,5.74843 -0.30079,1.49256 -1.01883,2.74423 -1.83478,3.92156 -1.06526,1.5373 -1.82382,2.15116 -3.66756,2.46594 -0.98864,0.16889 -1.93845,0.46787 -3.25466,0.0928 -1.4384,-0.40963 -2.35273,-0.81244 -3.39599,-1.63337 -0.72524,-0.57054 -1.16043,-1.54043 -1.16043,-1.54043 l 0,2.82636 -4.8903,0 3.39872,-23.01602 -1.92242,-0.85888 0.0403,-2.38127 7.25847,0.0534 z m -23.77803,2.20447 c 0.29175,1.49273 0.0813,4.83252 -0.86111,6.69751 -0.3062,0.60617 -0.94813,1.32967 -1.55479,1.6983 -1.01515,0.61713 -2.21688,1.21322 -3.3966,1.07639 -0.47944,-0.0541 -0.97036,-0.34348 -1.24383,-0.74151 -0.47686,-0.69328 -0.43621,-1.55032 -0.45448,-2.39198 -0.024,-1.06873 0.13137,-2.23775 0.38272,-3.277 0.18705,-0.7744 0.4229,-1.58254 0.86111,-2.24844 0.39037,-0.59323 0.92628,-1.12617 1.55478,-1.45909 0.54854,-0.29014 1.19695,-0.38467 1.81791,-0.40664 0.63637,-0.0231 1.3031,0.0385 1.88966,0.28704 0.3875,0.16453 0.92361,0.3524 1.00463,0.76542 z m 1.29312,-9.69052 -0.64254,6.12262 c 0,0 -1.68393,-0.96858 -2.605,-1.25148 -0.73032,-0.22434 -1.50312,-0.36654 -2.26624,-0.33838 -0.97069,0.0345 -1.91182,0.22099 -2.81751,0.57088 -0.9185,0.35497 -1.78344,0.94565 -2.49338,1.62792 -0.88025,0.84538 -1.51404,1.90455 -2.02977,3.0106 -0.39653,0.84993 -0.69517,1.75284 -0.87975,2.67232 -0.22875,1.14241 -0.44415,2.38719 -0.43937,3.55197 0.01,1.44865 0.0623,2.89489 0.54092,4.26214 0.25525,0.72907 0.71643,1.40578 1.28572,1.9283 0.56835,0.52207 1.29566,0.87604 2.02935,1.11621 0.41072,0.13491 0.85346,0.17274 1.28579,0.16935 1.00285,-0.01 2.03715,-0.0883 2.97671,-0.43999 0.66497,-0.2489 1.21759,-0.73399 1.79298,-1.1502 0.75304,-0.54475 2.16476,-1.86006 2.16476,-1.86006 l 0,1.62374 -0.5751,0 0,1.48807 6.86709,0 0,-2.84135 -1.92841,0 3.21374,-23.57782 -7.37422,0 0,2.33412 z m -93.60062,7.55781 2.33363,15.57933 6.23084,0 4.04243,-11.34169 1.62654,11.34169 5.88425,0 7.05633,-16.38872 0,-2.0141 -6.1713,0 0,2.82349 1.88966,0 -4.04243,10.16973 -0.74151,0 -1.29167,-12.55773 -5.38194,0 -4.7361,12.50989 -1.55478,-12.94538 -6.86496,0 0,2.82349 z m -12.15,0.72146 c -0.56264,0.0892 -1.03524,0.17358 -1.53086,0.45447 -0.737,0.41808 -1.46132,0.95771 -1.91357,1.67437 -0.44123,0.70048 -0.53204,1.57581 -0.66975,2.39196 -0.1751,1.04003 -0.20064,2.10306 -0.19136,3.15741 0.01,0.81614 -0.0138,1.66577 0.35879,2.39197 0.1904,0.37315 0.52874,0.80945 0.88503,1.02855 0.56015,0.34453 1.06632,0.55494 1.72222,0.598 0.72597,0.0483 1.48801,-0.18852 2.10493,-0.57408 0.59422,-0.37072 1.03334,-0.97401 1.38735,-1.5787 0.46117,-0.78744 0.70905,-1.69257 0.90895,-2.58334 0.20377,-0.90704 0.33579,-1.84565 0.28703,-2.77468 -0.0491,-0.92714 -0.18211,-1.88434 -0.57407,-2.72684 -0.2728,-0.58681 -0.70954,-1.00753 -1.29166,-1.29165 -0.44403,-0.21628 -0.99455,-0.24402 -1.48303,-0.16744 z m -6.62442,-0.73581 c 0.65404,-0.6664 1.4072,-1.25479 2.23273,-1.69161 1.0305,-0.54505 2.16429,-0.92749 3.31518,-1.11604 1.51307,-0.24806 3.09342,-0.2847 4.60036,0 0.88055,0.16632 1.78322,0.44742 2.50307,0.98113 0.77409,0.57312 1.35279,1.40936 1.79291,2.26639 0.42901,0.83457 0.6828,1.77223 0.77798,2.70605 0.16564,1.61985 0.024,3.29135 -0.37201,4.87103 -0.33328,1.33759 -0.88436,2.64754 -1.65745,3.78889 -0.67549,0.99679 -1.52894,1.91262 -2.53721,2.5709 -0.89957,0.58746 -1.9718,0.87641 -3.01035,1.15006 -0.87153,0.22963 -1.77166,0.4095 -2.67235,0.40576 -1.21068,-0.01 -2.47998,-0.0817 -3.58589,-0.57511 -1.09854,-0.48896 -1.89728,-1.32739 -2.60455,-2.30013 -0.61123,-0.83995 -1.02561,-1.59975 -1.31932,-2.87516 -0.2125,-0.9233 -0.40006,-2.19912 -0.37215,-3.14592 0.0335,-1.16537 0.3568,-2.74121 0.83416,-3.80434 0.52547,-1.17098 1.17609,-2.3161 2.07489,-3.2319 z m 94.95184,13.82318 c -2.20516,1.01761 -4.61429,1.69636 -7.02343,1.69636 -5.32726,0 -7.22678,-3.12145 -7.22678,-7.22678 0,-7.1251 4.54685,-11.19645 10.0772,-11.19645 3.7324,0 5.56453,1.69625 5.56453,4.47856 0,4.85189 -5.12329,6.27735 -10.41633,6.82001 0.10168,1.73076 0.81446,3.32485 3.3592,3.32485 1.2218,0 2.88401,-0.37315 4.91982,-1.22099 z m -3.22292,-11.77374 c 0,-0.81423 -0.57695,-1.28891 -1.62876,-1.28891 -1.89988,0 -3.46041,1.66212 -3.96978,4.34287 1.45897,-0.20368 5.59854,-0.91613 5.59854,-3.05396 z m -30.33408,11.77374 c -2.2054,1.01761 -4.61457,1.69636 -7.02371,1.69636 -5.32653,0 -7.22671,-3.12145 -7.22671,-7.22678 0,-7.1251 4.54679,-11.19645 10.07785,-11.19645 3.73175,0 5.56382,1.69625 5.56382,4.47856 0,4.85189 -5.12273,6.27735 -10.41568,6.82001 0.10142,1.73076 0.81422,3.32485 3.35884,3.32485 1.22158,0 2.8842,-0.37315 4.91994,-1.22099 z m -3.22305,-11.77374 c 0,-0.81423 -0.57638,-1.28891 -1.62883,-1.28891 -1.89959,0 -3.46023,1.66212 -3.96971,4.34287 1.4591,-0.20368 5.59854,-0.91613 5.59854,-3.05396 z m -82.36051,20.5268 -0.0679,-0.13571 0.98406,-5.66614 2.10303,-15.16698 c 0.0687,-0.40664 -0.0332,-0.61046 -0.30522,-0.71214 l -1.66259,-0.61111 0.37379,-2.57855 6.78556,0 -0.40663,2.71427 0.10142,0.0335 c 2.0016,-1.86631 4.10566,-3.08743 6.24306,-3.08743 2.91821,0 4.95366,1.86577 4.95366,6.78561 0,4.68241 -1.83206,11.6379 -8.14271,11.6379 -2.20534,0 -3.42694,-0.84825 -4.68256,-1.73039 l -0.74621,5.08917 c -0.0341,0.37361 0.0326,0.50898 0.47457,0.54273 l 3.42697,0.33969 -0.37385,2.5447 -9.0589,0 z m 6.78613,-12.04485 c 0.84787,0.71258 1.96788,1.32305 3.22348,1.32305 2.74798,0 3.76601,-3.86811 3.76601,-6.85368 0,-2.002 -0.47476,-3.32542 -1.76432,-3.32542 -1.35696,0 -3.08763,1.4591 -4.30913,2.54506 z m 81.08934,4.85147 0.33969,-2.54464 1.56064,-0.2038 c 0.47498,-0.0683 0.5429,-0.1695 0.61084,-0.67837 l 1.42466,-10.34864 c 0.0335,-0.37315 -0.0335,-0.61046 -0.33914,-0.71214 l -1.69691,-0.61111 0.37365,-2.57855 6.71797,0 -0.44097,3.05395 0.10191,0.0679 c 1.32326,-1.89982 3.22359,-3.46042 5.39485,-3.46042 0.7463,0 2.0359,0.13582 2.61295,0.30538 l -0.84863,6.17508 -3.96972,-0.13582 -0.10157,-1.76443 c -0.0335,-0.30537 -0.10223,-0.40701 -0.37391,-0.40701 -0.64452,0 -1.69636,0.78027 -2.64651,1.76455 l -1.18674,8.61817 c -0.0687,0.54303 -0.0334,0.64474 0.47477,0.67874 l 3.22351,0.27142 -0.37384,2.51081 -10.8575,0 z"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="cssscccccccccccccccccssssssssccssscssssscsssccccccccsssssssssccsccsssssssssscsscccccccccccccccccccccccccccccccsssscsssssscscsssssssscsssssssssscsssscsccsscscsssscsccsscsccccccccccsssccccccccssscccccccccccccsccccsccccccc" /><path
+ sodipodi:nodetypes="cssscccccccccccccccccssssssssccssscssssscsssccccccccsssssssssccsccsssssssssscsscccccccccccccccccccccccccccccccsssscsssssscscsssssssscsssssssssscsssscsccsscscsssscsccsscsccccccccccsssccccccccssscccccccccccccsccccsccccccc"
+ inkscape:connector-curvature="0"
+ d="m 509.55935,174.26011 c 0.63327,0.31663 2.06355,1.10555 3.19256,1.13455 0.61476,0.0158 1.25757,-0.18443 1.76781,-0.5277 1.3288,-0.89397 2.46618,-2.23946 3.00784,-3.74661 0.21419,-0.59598 0.0258,-1.89972 0.0258,-1.89972 l -4.22153,-15.51428 -2.18993,0 0.55406,-2.95501 7.01835,0 2.82313,13.48255 5.27696,-10.68586 -2.21631,0 0,-2.92858 7.94179,0 -12.13698,24.69605 -1.87332,2.11078 -2.5329,1.4776 -2.71762,0.29022 -2.53295,-0.23748 -3.08699,-1.50392 z m -13.30698,-16.06545 c -1.0335,2.08005 -1.87803,4.80122 -0.90274,6.90883 0.4032,0.87116 1.49018,1.31738 2.4179,1.56347 0.67214,0.17793 1.42477,0.1102 2.08233,-0.11548 0.53084,-0.1826 0.97383,-0.5762 1.38432,-0.9593 0.44502,-0.4157 0.85733,-0.8875 1.14176,-1.42582 0.24113,-0.45665 0.44375,-0.93526 0.54404,-1.44168 0.22797,-1.1566 0.3958,-2.3252 0.37043,-3.50371 -0.0204,-0.96413 -0.0869,-2.06387 -0.52631,-2.92259 -0.29054,-0.56679 -0.84946,-0.79259 -1.46826,-0.94463 -0.46761,-0.11559 -0.89829,-0.0686 -1.34322,0.11597 -0.72226,0.30083 -1.38368,0.5859 -2.00879,1.05634 -0.63242,0.4762 -1.33915,0.9593 -1.69146,1.6686 z m 0.72346,-4.75648 c 0,0 2.41951,-1.99358 3.81169,-2.50482 0.79109,-0.29085 3.80953,-0.71977 4.57766,-0.3726 1.6247,0.73503 2.49408,1.73759 3.00274,2.86791 0.50868,1.13043 0.77154,2.86756 0.87911,4.12137 0.14648,1.71007 -0.15092,4.16549 -0.58904,6.34083 -0.33179,1.64636 -1.12383,3.02703 -2.02388,4.32576 -1.17506,1.6957 -2.01178,2.37286 -4.04556,2.72004 -1.09051,0.18629 -2.13814,0.51607 -3.59006,0.10268 -1.5866,-0.45183 -2.59522,-0.89615 -3.74599,-1.8017 -0.79994,-0.62933 -1.28003,-1.6992 -1.28003,-1.6992 l 0,3.11766 -5.39426,0 3.74898,-25.38802 -2.12052,-0.94738 0.0443,-2.62669 8.00657,0.0587 z m -26.22853,2.43167 c 0.32185,1.64663 0.0893,5.33062 -0.9498,7.38781 -0.33781,0.66857 -1.04588,1.46667 -1.7151,1.8733 -1.11975,0.68073 -2.44527,1.33822 -3.7466,1.18729 -0.52883,-0.0601 -1.07036,-0.37888 -1.37203,-0.81791 -0.52601,-0.76478 -0.48121,-1.71012 -0.50128,-2.63848 -0.0263,-1.17893 0.14487,-2.46835 0.42212,-3.6147 0.20635,-0.8543 0.4665,-1.74564 0.94981,-2.48024 0.43067,-0.65433 1.02178,-1.24217 1.71508,-1.60939 0.60504,-0.32004 1.32025,-0.42437 2.00521,-0.44854 0.70197,-0.0251 1.4374,0.0425 2.08446,0.31654 0.4274,0.18153 1.01882,0.3888 1.10813,0.84432 z m 1.42642,-10.68922 -0.70874,6.75362 c 0,0 -1.85753,-1.06838 -2.8735,-1.38048 -0.80562,-0.24744 -1.65802,-0.40424 -2.49984,-0.37318 -1.07069,0.0382 -2.10882,0.24369 -3.1078,0.62968 -1.01321,0.39157 -1.96724,1.04315 -2.75039,1.79572 -0.97095,0.93248 -1.67003,2.10085 -2.23897,3.3208 -0.43738,0.93753 -0.76677,1.93354 -0.9704,2.94777 -0.2523,1.26016 -0.4899,2.63324 -0.48461,3.91802 0.011,1.59795 0.0683,3.19329 0.59661,4.70144 0.28155,0.80417 0.79028,1.55058 1.41822,2.127 0.62695,0.57587 1.4292,0.96634 2.23856,1.23121 0.45301,0.14881 0.94135,0.19054 1.41828,0.18685 1.10615,-0.011 2.24705,-0.0973 3.28346,-0.48539 0.73352,-0.2745 1.34304,-0.80959 1.97773,-1.2687 0.83064,-0.60085 2.38786,-2.05176 2.38786,-2.05176 l 0,1.79104 -0.63429,0 0,1.64147 7.57478,0 0,-3.13415 -2.12721,0 3.54494,-26.00772 -8.13411,0 0,2.57462 z m -103.24702,8.33671 2.57413,17.18493 6.87304,0 4.45903,-12.51049 1.79414,12.51049 6.49065,0 7.78353,-18.07772 0,-2.2217 -6.8073,0 0,3.11449 2.08446,0 -4.45903,11.21783 -0.8179,0 -1.42488,-13.85193 -5.93654,0 -5.2242,13.79919 -1.71497,-14.27958 -7.57246,0 0,3.11449 z m -13.4021,0.79586 c -0.62064,0.0982 -1.14194,0.19148 -1.68866,0.50127 -0.813,0.46118 -1.61192,1.05641 -2.11077,1.84697 -0.48673,0.77268 -0.58683,1.73821 -0.73875,2.63846 -0.1932,1.14723 -0.22134,2.31976 -0.21116,3.48281 0.011,0.90024 -0.0148,1.83747 0.39579,2.63847 0.21,0.41165 0.58324,0.89285 0.97623,1.13455 0.61796,0.38003 1.17622,0.61214 1.89972,0.6596 0.80077,0.0533 1.64141,-0.20792 2.32189,-0.63318 0.65546,-0.40892 1.13978,-1.07441 1.53029,-1.7414 0.50878,-0.86864 0.78215,-1.86707 1.00265,-2.84964 0.22477,-1.00044 0.37039,-2.03585 0.31663,-3.06058 -0.0541,-1.02274 -0.20091,-2.07854 -0.63327,-3.00784 -0.3009,-0.64731 -0.78264,-1.11143 -1.42476,-1.42485 -0.48983,-0.23858 -1.09705,-0.26912 -1.63583,-0.18464 z m -7.30711,-0.81171 c 0.72143,-0.735 1.55219,-1.38409 2.46282,-1.86591 1.1367,-0.60125 2.38729,-1.02309 3.65678,-1.23104 1.66908,-0.27366 3.41222,-0.314 5.07446,0 0.97135,0.18342 1.96702,0.49352 2.76107,1.08223 0.85389,0.63222 1.49219,1.55466 1.97771,2.49999 0.47321,0.92057 0.7531,1.95483 0.85808,2.98495 0.18274,1.78675 0.0263,3.63055 -0.41031,5.37303 -0.36757,1.47539 -0.97545,2.92034 -1.82825,4.17929 -0.74509,1.09959 -1.68654,2.10982 -2.79871,2.8359 -0.99227,0.64796 -2.175,0.96671 -3.32055,1.26856 -0.96139,0.25333 -1.95426,0.4517 -2.94774,0.44756 -1.33549,-0.011 -2.73559,-0.0897 -3.9555,-0.63431 -1.21174,-0.53936 -2.09278,-1.46419 -2.87295,-2.53723 -0.67423,-0.92645 -1.13131,-1.76457 -1.45532,-3.17146 -0.2344,-1.0184 -0.44126,-2.42572 -0.41044,-3.47012 0.0365,-1.28547 0.39349,-3.02371 0.92005,-4.19644 0.57967,-1.29168 1.29729,-2.5548 2.2888,-3.565 z m 104.73744,15.24778 c -2.43247,1.12251 -5.0899,1.87126 -7.74734,1.87126 -5.87626,0 -7.97147,-3.44315 -7.97147,-7.97158 0,-7.8594 5.0154,-12.35035 11.11569,-12.35035 4.11711,0 6.13803,1.87105 6.13803,4.94016 0,5.35189 -5.65129,6.92425 -11.48983,7.52281 0.11219,1.90916 0.89836,3.66755 3.7054,3.66755 1.3477,0 3.18121,-0.41165 5.42682,-1.34689 z m -3.55513,-12.98704 c 0,-0.89823 -0.63635,-1.42181 -1.79655,-1.42181 -2.09568,0 -3.81712,1.83342 -4.37899,4.79047 1.60937,-0.22468 6.17554,-1.01053 6.17554,-3.36866 z m -33.46028,12.98704 c -2.4327,1.12251 -5.09006,1.87126 -7.74751,1.87126 -5.87553,0 -7.97151,-3.44315 -7.97151,-7.97158 0,-7.8594 5.01539,-12.35035 11.11645,-12.35035 4.11635,0 6.13722,1.87105 6.13722,4.94016 0,5.35189 -5.65062,6.92425 -11.48908,7.52281 0.11182,1.90916 0.89812,3.66755 3.70494,3.66755 1.34748,0 3.1815,-0.41165 5.42704,-1.34689 z m -3.55514,-12.98704 c 0,-0.89823 -0.63578,-1.42181 -1.79674,-1.42181 -2.09539,0 -3.81683,1.83342 -4.37881,4.79047 1.60951,-0.22468 6.17555,-1.01053 6.17555,-3.36866 z m -90.84852,22.6422 -0.0749,-0.14971 1.08546,-6.25004 2.31984,-16.73008 c 0.0757,-0.44854 -0.0367,-0.67336 -0.33673,-0.78554 l -1.83388,-0.67411 0.41228,-2.84425 7.48486,0 -0.44853,2.99397 0.11182,0.0371 c 2.2079,-2.05871 4.52887,-3.40563 6.88646,-3.40563 3.21901,0 5.46427,2.05807 5.46427,7.48491 0,5.16501 -2.02094,12.8373 -8.98192,12.8373 -2.43264,0 -3.78014,-0.93565 -5.16516,-1.90869 l -0.82311,5.61357 c -0.0376,0.41212 0.0356,0.56148 0.52347,0.59873 l 3.78017,0.37469 -0.41234,2.8069 -9.9925,0 z m 7.48553,-13.28615 c 0.93528,0.78598 2.17068,1.45946 3.55568,1.45946 3.03118,0 4.15411,-4.26682 4.15411,-7.56009 0,-2.2083 -0.52366,-3.66812 -1.94612,-3.66812 -1.49686,0 -3.40583,1.6095 -4.75323,2.80736 z m 89.44624,5.35147 0.37469,-2.80694 1.72154,-0.2248 c 0.52388,-0.0753 0.5988,-0.1869 0.67374,-0.74827 l 1.57152,-11.41514 c 0.0365,-0.41155 -0.0368,-0.67336 -0.3741,-0.78554 l -1.87181,-0.67411 0.41215,-2.84425 7.41037,0 -0.48647,3.36865 0.11241,0.0749 c 1.45966,-2.09562 3.55581,-3.81702 5.95085,-3.81702 0.8232,0 2.2457,0.14982 2.88225,0.33688 l -0.93613,6.81148 -4.37882,-0.14982 -0.11196,-1.94633 c -0.0371,-0.33677 -0.11284,-0.44891 -0.41252,-0.44891 -0.71092,0 -1.87116,0.86067 -2.91921,1.94635 l -1.30904,9.50637 c -0.0757,0.59903 -0.0368,0.71124 0.52367,0.74874 l 3.55571,0.29932 -0.41234,2.76961 -11.9765,0 z"
+ style="fill:url(#linearGradient5134);fill-opacity:1;stroke:none"
+ id="path5080" /></g><path
+ fill="#E2E2E2"
+ d="M256.023,135.437H196.36c-16.432,0-29.8,13.368-29.8,29.8v73.527c0,16.432,13.368,29.8,29.8,29.8h59.663 c16.433,0,29.801-13.368,29.801-29.8v-73.527C285.824,148.805,272.456,135.437,256.023,135.437z M191.561,165.236 c0-2.646,2.153-4.8,4.8-4.8h59.663c2.647,0,4.801,2.153,4.801,4.8v73.527c0,2.646-2.153,4.8-4.801,4.8H196.36 c-2.646,0-4.8-2.153-4.8-4.8V165.236z"
+ id="path3" />
+<path
+ d="m 531.664,250.155 h 18.498 l -2.809,18.064 h 5.59 37.586 l 2.6,-17.718 c 4.98,-1.091 9.133,-3.455 12.512,-6.693 3.084,4.075 8.566,7.37 18.252,7.37 6.338,0 12.775,-1.807 17.174,-3.687 4.254,2.399 9.463,3.687 15.459,3.687 3.088,0 6.236,-0.355 9.426,-1.023 h 67.135 l 3.354,-24.827 -5.445,-0.764 1.879,-13.356 c 0.371,-2.386 0.449,-4.66 0.449,-6.156 l -0.008,-0.375 c -0.457,-12.191 -8.139,-19.765 -20.045,-19.765 -2.404,0 -4.623,0.314 -6.676,0.852 h -34.189 l -0.035,0.244 c -2.527,-0.701 -5.41,-1.096 -8.686,-1.096 -3.801,0 -7.406,0.555 -10.76,1.598 l 0.105,-0.746 h -12.467 l 1.826,-12.951 H 615.08 l -1.846,7.658 c -1.373,5.704 -2.213,5.793 -4.453,6.03 l -4.508,0.477 c -3.049,-1.424 -6.357,-2.065 -9.602,-2.065 -2.135,0 -4.275,0.284 -6.416,0.852 h -19.291 c 0.502,-1.772 0.775,-3.674 0.775,-5.678 0,-9.601 -6.846,-16.305 -16.646,-16.305 -11.055,0 -18.775,7.721 -18.775,18.776 0,0.951 0.082,1.869 0.219,2.764 -2.135,-0.288 -4.277,-0.409 -5.553,-0.409 -2.053,0 -4.072,0.288 -6.045,0.852 h -31.342 c -2.74,-0.553 -5.641,-0.852 -8.537,-0.852 -7.138,0 -13.492,1.674 -18.808,4.723 l -3.451,-1.461 c -3.711,-1.571 -11.232,-3.262 -18.979,-3.262 -8.933,0 -16.383,2.56 -21.576,7.016 -3.265,-4.473 -8.523,-7.016 -15.228,-7.016 -4.822,0 -9.021,1.477 -12.572,3.44 -2.996,-2.204 -6.796,-3.44 -11.115,-3.44 -2.327,0 -4.48,0.315 -6.476,0.852 h -33.963 l -0.035,0.245 c -2.526,-0.702 -5.41,-1.097 -8.687,-1.097 -20.458,0 -35.307,16.031 -35.307,38.117 0,17.363 10.785,28.149 28.148,28.149 3.087,0 6.236,-0.356 9.426,-1.023 h 88.816 c 3.706,0.676 7.669,1.023 11.154,1.023 8.907,0 16.278,-2.375 21.51,-6.593 4.872,4.252 11.585,6.593 19.728,6.593 3.053,0 6.206,-0.368 9.286,-1.023 h 44.664 2.069 z"
+ id="path5"
+ inkscape:connector-curvature="0"
+ style="fill:#e2e2e2" />
+<path
+ fill="#F5F5F5"
+ d="M255.023,133.437H195.36c-16.432,0-29.8,13.368-29.8,29.8v73.527c0,16.432,13.368,29.8,29.8,29.8h59.663 c16.433,0,29.801-13.368,29.801-29.8v-73.527C284.824,146.805,271.456,133.437,255.023,133.437z M190.561,163.236 c0-2.646,2.153-4.8,4.8-4.8h59.663c2.647,0,4.801,2.153,4.801,4.8v73.527c0,2.646-2.153,4.8-4.801,4.8H195.36 c-2.646,0-4.8-2.153-4.8-4.8V163.236z"
+ id="path7" />
+<g
+ id="g9">
+ <g
+ id="g11">
+ <path
+ fill="#FBFDF8"
+ d="M195.361,251.626c-8.161,0-14.8-6.64-14.8-14.8v-73.527c0-8.161,6.639-14.8,14.8-14.8h59.663 c8.161,0,14.8,6.639,14.8,14.8v73.527c0,8.16-6.639,14.8-14.8,14.8H195.361z"
+ id="path13" />
+ <path
+ fill="#F0F4E1"
+ d="M255.024,152.499c5.964,0,10.8,4.835,10.8,10.8v73.527c0,5.965-4.835,10.8-10.8,10.8h-59.663 c-5.964,0-10.8-4.835-10.8-10.8v-73.527c0-5.964,4.835-10.8,10.8-10.8H255.024 M255.024,144.499h-59.663 c-10.366,0-18.8,8.434-18.8,18.8v73.527c0,10.366,8.434,18.8,18.8,18.8h59.663c10.366,0,18.8-8.434,18.8-18.8v-73.527 C273.824,152.933,265.391,144.499,255.024,144.499L255.024,144.499z"
+ id="path15" />
+ </g>
+ <defs
+ id="defs17">
+ <filter
+ id="Adobe_OpacityMaskFilter"
+ filterUnits="userSpaceOnUse"
+ x="176.562"
+ y="144.499"
+ width="97.263"
+ height="111.127">
+
+ <feColorMatrix
+ type="matrix"
+ values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0"
+ color-interpolation-filters="sRGB"
+ result="source"
+ id="feColorMatrix20" />
+ </filter>
+ </defs>
+ <mask
+ maskUnits="userSpaceOnUse"
+ x="176.562"
+ y="144.499"
+ width="97.263"
+ height="111.127"
+ id="SVGID_1_">
+ <g
+ filter="url(#Adobe_OpacityMaskFilter)"
+ id="g23">
+
+ <image
+ overflow="visible"
+ width="422"
+ height="480"
+ xlink:href="data:image/jpeg;base64,/9j/4AAQSkZJRgABAgEBLAEsAAD/7AARRHVja3kAAQAEAAAAHgAA/+4AIUFkb2JlAGTAAAAAAQMA EAMCAwYAAAg2AAAQ4QAAF1b/2wCEABALCwsMCxAMDBAXDw0PFxsUEBAUGx8XFxcXFx8eFxoaGhoX Hh4jJSclIx4vLzMzLy9AQEBAQEBAQEBAQEBAQEABEQ8PERMRFRISFRQRFBEUGhQWFhQaJhoaHBoa JjAjHh4eHiMwKy4nJycuKzU1MDA1NUBAP0BAQEBAQEBAQEBAQP/CABEIAeMBqQMBIgACEQEDEQH/ xACjAAEAAgMBAQAAAAAAAAAAAAAABQYBAwQHAgEBAQAAAAAAAAAAAAAAAAAAAAEQAAEDAQQKAwAC AwEAAAAAAAABAwQCMRMUBRBQEjMVJQYWNgcgESEwI5AiMkARAAEBAwsEAQIFAwUBAAAAAAABMQID EFAycqOz0wQ0RaURIXGRIEFRMGEiExRAgRKh0SMzQxUSAQAAAAAAAAAAAAAAAAAAAJD/2gAMAwEA AhEDEQAAANUJsrZYFfFgV8WBXxYEL0ki5fo6GjJuaRuaRuaRuaRuaRuaRuaRuaRuaRuaRuaRuaRu aRuaMHQ5dR3ojnJ9XxYFfFgV8WD0jxf2AodbslbAD6mDhlpLvI/qkuiovZL7CGzNfRCJwQacEGnB Bp0QSdEEnRBJ0QSdEEnRBJ3BBpwQacEHidwQXzPfBA6bBqK5w2nlKVH3iJitt+gAeweP+wFDrdkr Y+vmaN02k6+e3d2Gjo6N0c2zoyaM7xozuGluGluGluGluGluGluGluGluGluGluGluGnG8c/z1YO PVIfJF80xoIGPsfBVVrl6hIrD7+B7B4/7AUOt2StnXaYyxHTJ6ZKvrqb4x9MgAAAAAAAAAAAAAAA DGR8692Dh4pbkIKJscTVNiLdVY1+weP+wFDgJ+JLJORs3XbIc3dGz6ZAAAAAAAAAAAAAAAAAAAPn R0ayMi5uLqv1S51eIT2Dx/2AofB38Ra5uIm6kOzm6o+gAAAAAAAAAAAAAAAAAAAPj7+TkjJWNIOt 2et1WfYPH/YIofH2cZcJyEnKkenn6IyAAAAAAAAAAAAAAAAAAABjODmjZONIWt2WtVWPYPH/AGCK Hx9nIXGcg5ypLfo3xkAAAAAAAAAAAAAAAAAAADGcHPGyUaQ1astaqseweP8AsEUPk6+QuM7BTtSW 7TujIAAAAAAAAAAAAAAAAAAAGM4OeOkY4hqzZqzVY9g8f9gih8nXyFxnYKdqS3ad0ZAAAAAAAAAA AAAAAAAAAAxnBzx0jHENWbNWarHsHj/sEUPk6+QuM7BTtSW7TujIAAAAAAAAAAAAAAAAAAAGM4Oe OkY4hqzZqzVY9g8f9gih8nXyFxnYKdqS3ad0ZAAAAAAAAAAAAAAAAAAAAxnBzx0jHENWbNWarHsH j/sEUPk6+QuM7BTtSW7TujIAAAAAAAAAAAAAAAAAAAGM4OeOkY4hqzZqzVY9g8f9gih8nXyFxnYK dqS3ad0ZAAAAAAAAAAAAAAAAAAAAxnBzx0jHENWbNWarHsHj/sEUPk6+QuM7BTtSW7TujIAAAAAA AAAAAAAAAAAAAGM4OeOkY4hqzZqzVY9g8f8AYIofJ18hcZ2Cnakt2ndGQAAAAAAAAAAAAAAAAAAA MZwc8dIxxDVmzVmqx7B4/wCwRQ+Tr5C4zsFO1JbtO6MgAAAAAAAAAAAAAAAAAAAYzg546RjiGrNm rNVj2Dx/2CKHydfIXGdgp2pLdp3RkAAAAAAAAAAAAAAAAAAADGcHPHSMcQ1Zs1ZqseweP+wRQ+Tr 5C4zsFO1JbtO6MgAAAAAAAAAAAAAAAAAAAYzg546RjiGrNmrNVj2Dx/2CKHydfIXGdgp2pLdp3Rk AAAAAAAAAAAAAAAAAAADGcHPHSMcQ1Zs1ZqseweP+wRQ+Tr5C4zsFO1JbtO6MgAAAAAAAAAAAAAA AAAAAYzg546RjiGrNmrNVj2Dx/2CKHydfIXGdgp2pLdp3RkAAAAAAAAAAAAAAAAAAADGcHPHSMcQ 1Zs1ZqseweP+wRQ+Tr4y5TkHOVJb9G+MgAAAAAAAAAAAAAAAAAAAYzg542SjSGrVlrVVj2Dx/wBg ih8fZxlxnIKcqT6ObpjIAAAAAAAAAAAAAAAAAAAGM4OeNkY0h61Za1VY9g8f9gih8Xbwlxm4GbqW 6uLrj7AAAAAAAAAAAAAAAAAAAA+fr5OaNkI0ia1Y61Vb9g8f9gihxknCl1m65N1OdsZ3x0ZxkAAA AAAAAAAAAAAAAAAAx8fek5ozui6jazYKsRPsHj/sEUOu2Ktlqn6XZ6scjBSRLbOPpjYxkAAAAAAA AAAAAAAAAAYfJjm+uM0xXVE1xVOZr0Y9g8f9gKHW7JWz7s1W6i9SdYlasXXB9pLbI7fHY5/s3NeT 7fGT6fI+nyPp8j6fI+nyPp8j6fI+nyPp8j6fI+nyPp8D7x8fJtxp1m7Tp5jbw/MfWIjbXTk5SHsH j/sBQ63ZK2AdthqO8vXbUZWrJ0V/oJ7ZB7Sa+ofJMIkS6IySyJRLIkSyJEsiRLIkSyJEsiRLIkSy JVLYiRLYicEr8xfwSemN0kjy8PIdkfxQp0xWEAPYPH/YCh1uyVsAAz08ome2si37qZkumaULspIu 2aRkuyki7KSLspIuyki7KSLspIuyki7KSLtilC6qSLtilC6fNNFu5qz8k7wcI+vkAAHsHj/sBWoQ AAAAAAAAAAAAAAAAAAAAAAAAAHpAf//aAAgBAgABBQD/ACi//9oACAEDAAEFAP8AKL//2gAIAQEA AQUA6w6rz/LM+776rO++qzvvqs776rO++qzvvqs776rO++qzvvqs776rO++qzvvqs776rO++qzvv qs776rO++qzvvqs776rO++qzvvqs776rO++qzvvqs776rO++qzvvqs776rO++qzvvqs776rO++qz vvqs776rO++qzvvqs776rO++qzvvqs776rO++qzvvqs776rO++qzvvqs776rO++qzvvqs776rO++ qzvvqs776rMfLPYHlHyRFUbivuDeUv1FOSVKJkRwE4CcAOAHADgBwA4AcAOAHADgBwA4AcAOAHAD gBwA4AcAOAHADgBwA4AcAOAnARciFyRUK8ndQcgyGxaaqf4fYHlHwRFUjZe68RsqbpGoKIUQkKYY kISEYJDAmBMCYEwJgTAmBMCYEwJgTAmBMCYEwJgTAmBMCYEwJgTAmCQWELCKoSFcNByEhIyxusk5 VVQV0VUL8vYHlGltupyqDlaIMREQaijcUoilMUSKgkZDDIYZDDIYZDDIYZDDIYZDDIYZDDIYZDDI YZDDIYZDDIYZDDIYZDDIYZDDIYZDDIYZDDILGQWKVRSuKORR2KPRCZltDiSYrjFXx9geUaG26nKs vy9KEjxhmONRxuOUMFLAjIjJdF0XRdIXSF0hdF0XRdF0XRdF0XRdF0XRdF0XRdIXSF0hdIXRdCsi sisFTBXHHY49GH4xMhU10y4tTFfw9geUCJ9rlcL6SNHGGBlgbZKGilsShDZQ+kPr/wBX0fSGygtC CtoVNDjI6wPsElgzCGjlLrdTden2B5QZfGvnYbCIkdkYZGmihsSn61ItJXQOtD7JIZJTBm0X6+Hs DyhP1cpjbLcVojtDLY3QIn1qZU+yugebJDRKaJ7CVUvtq27o9geURaLx6C19JFbI7Y1QU0/WqFQd oH6CS2TG/wAzZrZd0ewPKMqo2n4VH5FoGKBunVTifj9JJpJdBnVH+mj2B5RkqfdcOki0jFJQn5qm pPx5CTSS6TOKf6tHsDyjI0/2hIRU/GUKbNU1DyfklCWhm6f06PYHlGRf9QkIqfjKCWapWx4kkszj daPYHlGQ2wrItjImqlseJJMM43Wj2B5RkNsEjWNarUeJJMM43Oj2B5RkNsEjWNarUeJJMM43Oj2B 5RkNsGyLY1qtR6ySTDONzo9geUZDbBsi2NarUesk2TDON1o9geUZDbBsjWNarUesk2TDON1o9geU ZDbBsjWNarUeskkwzjdaPYHlGQ2wbI1jWq1HrJJMM43Wj2B5RkNsGyNY1qtR6ySTDON1o9geUZDb BsjWNarUeskkwzjdaPYHlGQ2wbI1jWq1HrJJMM43Wj2B5RkNsGyNY1qtR6ySTDON1o9geUZDbBsj WNarUeskkwzjdaPYHlGQ2wbI1jWq1HrJJMM43Wj2B5RkNsGyNY1qtR6ySTDON1o9geUZDbBsjWNa rUeskkwzjdaPYHlGQ2wbI1jWq1HrJJMM43Wj2B5RkNsGyNY1qtR6ySTDON1o9geUZDbBsjWNarUe skkwzjdaPYHlGQ2wbI1jWq1HrJJMM43Wj2B5RkNsGyNY1qtR6ySTDON1o9geUZDbBsjWNarUeskk wzjdaPYHlGQ2wbI1jWq1HrJJMM43Wj2B5RkNsGyNY1qtR6ySTDON1o9geUZDbBsjWNarUeskkwzj daPYHlGQ2wbI1jWq1HrJJMM43Wj2B5RkNsGyNY1qtR6ySTDON1o9geUZDbBsjWNarUeskkwzjdaP YHlGQ2wbI1jWq1HrJNkwzjdaPYHlGQ2wbItjWq1HrJNkwzjdaPYHlGQ2wbItjWq1HrJJMM43Oj2B 5RkNsGyNY1qtR4kkwzjc6PYHlGQ2wSNY1qtR4kkwzjc6PYHlGQ2wrItjImqlseJJMM43Wj2B5RkV sJSKv4yolmqVseJJLM43Wj2B5Rkf/UJSKv4ypTZqmoeX8kqS1M43Oj2B5Rki/wC0Koi1DKlC/mqa h5SSpLUzdf6tHsDyjJ6/p2HURaxiobX81TWv4/USaiXUZy59N6PYHlGXubEiE5+RaxisaqEXVCjl Q/WSayXX+Zy59ro9geUUVbNeXPpVRFdI7gzWUVfeqK6h2skOElwmu/ST3bx/R7A8oMpk/SxHiM8M OjThTX9iLqWqr6HHB50kOkp4zSVsUVKqro9geUDLit15fLSumM+MPjTw26UuCVH2moPsWoqcK3R1 4feJD5MkIiTpKvO6fYHlGiFLViuHLSpGJAzIGnyh8peKXRHEEcQ20NtDbQ2kNpDaQ2kNpDaQ2kNp DaQ2kNpDaQ2kNpDaQ2kNpDaQ2kNpDaQ20NtDbQVxBXEFdKnit8cfHpA/IJMn6TMp+0vw9geUaYU+ pmqJNprRmUNSRuSUSSmQgkgSQI+X5fl+X5fl+X5fl+X5fl+X5fl+X5fl+X5fl+X5fl+X4r4sgWQV SCuSOSR2SPSiRLREzDMlUVVVfh7A8o+EeW4wsTNKKxmYijcsollMspliSxJZjDGIYxDGIYxDGIYx DGIYxDGIYxDGIYxDGIYxDGIYxDGIYxDGIYxDGIYxDGIYxBZYssqllUsrljksdmISsxooSVmLjyqq r8vYHlHxRVRWZ77QznNI3mzSlGZUKU5hSJmKHEUOIocRQ4jScRQ4ihxFDiKHEUOIocRQ4ihxFDiK HEUOIocRQ4ihxFDiKHEUOIocRpOIocRQ4ihxFBcxQXMEKsxpHM1aQezmhB/M3nCquqtfn7A8o/hS utC9dL50vnS/eL94v3i/eL94v3i/eL94v3i/eL94v3i/eL94v3i/eL94v3i/eL94v3i/eL94v3i/ eL50vnS9dLytT7X+PrDhvHuTHJjkxyY5McmOTHJjkxyY5McmOTHJjkxyY5McmOTHJjkxyY5McmOT HJjkxyY5McmOTHJjkxyY5McmOTHJjkxyY5McmOTHJjkxyY5McmOTHJjkxyY/pP/aAAgBAgIGPwBR f//aAAgBAwIGPwBRf//aAAgBAQEGPwCPk8jmv2su47DV1z9uE90V5xHl7vuKrTXWMHDNdYwcM11j BwzXWMHDNdYwcM11jBwzXWMHDNdYwcM11jBwzXWMHDNdYwcM11jBwzXWMHDNdYwcM11jBwzXWMHD NdYwcM11jBwzXWMHDNdYwcM11jBwzXWMHDNdYwcM11jBwzXWMHDNdYwcM11jBwzXWMHDNdYwcM11 jBwzXWMHDNdYwcM11jBwzXWMHDNdYwcM11jBwzXWMHDNdYwcM11jBwzXWMHDNdYwcM11jBwzXWMH DNdYwcM11jBwzXWMHDNdYwcM11jBwzXWMHDNdYwcM11jBwzXWMHDP+z/AEd/2MzUhXbvz7H6XVO/ Y7vFJSkpSUpKUlKSlJSkpSUpKUlKSlJSkpSUpKUlKSlJSkpSUpKUlKSlJSkpSUpKUlKSlJSkp+le p3d6ndOn4OZqQrt349EOqp0QT9PVfzGDBgwYMGDBgwYMGDBgwYMGDBgwYMGDBgwYMGDBgwYMGC9X RVh9/wAjo8nRfnmakK7d+H+LqdVEefTqonYYMGDBgwYMGDBgwYMGDBgwYMGDBgwYMGDBgwYMGDBg wYMGDBeqd/uKip2+/wAszUhXbsqOutURVT9SidhgwYMlZ/XsGDBgvYVFQVOnb6fHM1IV27J0QR95 O6idhOwyaWC9hU6d/oK6v0+GZqQrt2RFVOyCdhBJrUU/cRO6N+GZqQrt06CL07qIJNiijydGjzsu ZqQrt0dd/MRBBJsUUU/y+8uZqQrt06/YQQSbFFFOv2WXM1IV26KIJNyij0uZqQrt0e8iCTcoo/Lm akK7dHvIggk2KKKPy5mpCu3R7yIJNyij8uZqQrt0e8iCTcoo/LmakK7dHvIgk3KKPy5mpCu3R7yI JNyij8uZqQrt0e8iCTaooo/LmakK7dHvIgk3KKPy5mpCu3R7yIJNyij8uZqQrt0e8iCCTaoo/Lma kK7dHvIggk2qKPy5mpCu3R7yIIJNqij8uZqQrt0e8iCCTaoo/LmakK7dHvIggk2qKPy5mpCu3R7y IIJNqij8uZqQrt0e8iCCTaoo/LmakK7dHvIggk2qKPy5mpCu3R7yIIJNqij8uZqQrt0e8iCCTaoo /LmakK7dHvIggk2qKPy5mpCu3R7yIIJNqij8uZqQrt0e8iCCTaoo/LmakK7dHvIggk2qKPy5mpCu 3R7yIIJNqij8uZqQrt0e8iCCTaoo/LmakK7dHvIggk2qKPy5mpCu3R7yIIJNqij8uZqQrt0e8iCC Taoo/LmakK7dHvIggk2qKPy5mpCu3R7yIIJNqij8uZqQrt0e8iCTcoo/LmakK7dHvIgk2qKKPy5m pCu3R7yIJNyij8uZqQrt0e8iCTcoo/LmakK7dHvIgk3KKPy5mpCu3R7yIJNyij8uZqQrt0e8iCCT aoo/LmakK7dHvIgk3KKPy5mpCu3R4QSblFHpczUhXboqfcQQSbVFFT7y5mpCu3RPzEEEmxRRRHZc zUhXbojyfRR1RBJsUUUX7JLmakK7dk/bVfAgk2KKL37qwVV+suZqQrt2RHk+giook2L3F7i9GJ8M zUhXbsqItFRFRRO40aNmVo0aL3FhuL5+OZqQrt34I69REVFGjRo0aNGjf6po0aNGjRo0XuK5DXv9 zqrV+OZqQrt349UXt9hEVeijRo0aNGjRo0aNGjRo0aNGjRo0aNGjRo0aNGjRo0aNGjRo0Xq9/YVH V6OnVflmakK7d+XVOw3qh0e7FM7PJ7KQ0aNGjRo0aNGjRo0aNGjRo0aNGjRo0aNGjRpSKaH6V6nR 3sh1eXr+BmakK7d/C7KqFJfZTX2U19lNfZTX2U19lN72U3vZTe9lN72U3vZTe9lN72U3vZTe9lN7 2U3vZTe9lN72U3vZTe9lN72U3vZTe9lN72U19lNfZTX2U19lNfZSX2d3l/Ej/wAj/wCf+7/jD6/y f5/7tBOnX+L/AMfr+5tPKm08qbTyptPKm08qbTyptPKm08qbTyptPKm08qbTyptPKm08qbTyptPK m08qbTyptPKm08qbTyptPKm08qbTyptPKm08qbTyptPKm08qbTyptPKm08qbTyptPKm08qbTyptP Km08qbTyptPKm08qbTyptPKm08qbTyptPKm08qbTyptPKm08qbTyptPKn/jan//Z"
+ transform="matrix(0.24 0 0 0.24 174.5615 142.499)"
+ id="image25">
+ </image>
+ </g>
+ </mask>
+ <g
+ opacity="0.09"
+ mask="url(#SVGID_1_)"
+ a:adobe-blending-mode="multiply"
+ a:adobe-opacity-share="1"
+ id="g27">
+ <path
+ fill="#1D2915"
+ a:adobe-blending-mode="normal"
+ a:adobe-opacity-share="0"
+ d="M195.361,251.626 c-8.161,0-14.8-6.64-14.8-14.8v-73.527c0-8.161,6.639-14.8,14.8-14.8h59.663c8.161,0,14.8,6.639,14.8,14.8v73.527 c0,8.16-6.639,14.8-14.8,14.8H195.361z"
+ id="path29" />
+ <path
+ fill="#1D2915"
+ a:adobe-blending-mode="normal"
+ a:adobe-opacity-share="0"
+ d="M255.024,152.499 c5.964,0,10.8,4.835,10.8,10.8v73.527c0,5.965-4.835,10.8-10.8,10.8h-59.663c-5.964,0-10.8-4.835-10.8-10.8v-73.527 c0-5.964,4.835-10.8,10.8-10.8H255.024 M255.024,144.499h-59.663c-10.366,0-18.8,8.434-18.8,18.8v73.527 c0,10.366,8.434,18.8,18.8,18.8h59.663c10.366,0,18.8-8.434,18.8-18.8v-73.527C273.824,152.933,265.391,144.499,255.024,144.499 L255.024,144.499z"
+ id="path31" />
+ </g>
+</g>
+<g
+ id="g33">
+ <g
+ id="g35">
+ <linearGradient
+ id="SVGID_2_"
+ gradientUnits="userSpaceOnUse"
+ x1="225.1929"
+ y1="152.499"
+ x2="225.1929"
+ y2="247.6265">
+ <stop
+ offset="0.0123"
+ style="stop-color:#C1D72F"
+ id="stop38" />
+ <stop
+ offset="0.1394"
+ style="stop-color:#BCD631"
+ id="stop40" />
+ <stop
+ offset="0.5859"
+ style="stop-color:#AFD136"
+ id="stop42" />
+ <stop
+ offset="1"
+ style="stop-color:#ABD037"
+ id="stop44" />
+ <a:midPointStop
+ offset="0.0123"
+ style="stop-color:#C1D72F" />
+ <a:midPointStop
+ offset="0.3086"
+ style="stop-color:#C1D72F" />
+ <a:midPointStop
+ offset="1"
+ style="stop-color:#ABD037" />
+ </linearGradient>
+ <path
+ d="M184.562,236.826c0,5.965,4.835,10.8,10.8,10.8h59.663c5.964,0,10.8-4.835,10.8-10.8v-73.527 c0-5.964-4.835-10.8-10.8-10.8h-59.663c-5.964,0-10.8,4.835-10.8,10.8V236.826z"
+ id="path46"
+ fill="url(#SVGID_2_)" />
+ </g>
+ <defs
+ id="defs48">
+ <filter
+ id="Adobe_OpacityMaskFilter_1_"
+ filterUnits="userSpaceOnUse"
+ x="184.562"
+ y="152.499"
+ width="81.263"
+ height="95.127">
+
+ <feColorMatrix
+ type="matrix"
+ values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0"
+ color-interpolation-filters="sRGB"
+ result="source"
+ id="feColorMatrix51" />
+ </filter>
+ </defs>
+ <mask
+ maskUnits="userSpaceOnUse"
+ x="184.562"
+ y="152.499"
+ width="81.263"
+ height="95.127"
+ id="SVGID_3_">
+ <g
+ filter="url(#Adobe_OpacityMaskFilter_1_)"
+ id="g54">
+
+ <image
+ overflow="visible"
+ width="356"
+ height="414"
+ xlink:href="data:image/jpeg;base64,/9j/4AAQSkZJRgABAgEBLAEsAAD/7AARRHVja3kAAQAEAAAAHgAA/+4AIUFkb2JlAGTAAAAAAQMA EAMCAwYAAAXBAAALIQAAEOP/2wCEABALCwsMCxAMDBAXDw0PFxsUEBAUGx8XFxcXFx8eFxoaGhoX Hh4jJSclIx4vLzMzLy9AQEBAQEBAQEBAQEBAQEABEQ8PERMRFRISFRQRFBEUGhQWFhQaJhoaHBoa JjAjHh4eHiMwKy4nJycuKzU1MDA1NUBAP0BAQEBAQEBAQEBAQP/CABEIAaEBawMBIgACEQEDEQH/ xACYAAEAAgMBAQAAAAAAAAAAAAAABAcBBQYDAgEBAAAAAAAAAAAAAAAAAAAAABAAAAMIAwEAAgMB AAAAAAAAAAIGATIDBBQFFjZQMwcRECKQMRMSEQABAgQEBgEBBwQDAQAAAAAAAQIxcgMEEFCRsyGC M6PTNBFBIGFxEiIyE1GB0UKhscFiEgEAAAAAAAAAAAAAAAAAAACQ/9oADAMBAAIRAxEAAADy0npz Z0Dnx0DS7Q9kr0IKcIKeICeICeICeICeICeICeICeICeICeICeICeICfggp2CElQD1aXxOgc+O1s um7kKj5vpObG6d2Q9zspRA9JmSGmCHmWIiWIiWIiWIiWIiWIiWIiWIiWIiWIiWIiWIaYIeJo1sPe 4OK5C2tCVS3OmN5clN3IVHod9EOv6zWb0zkAAAAAAAAAAAAAAAAAMRJnwcVXltVuetyU3chUfp5+ 5YexhTgAAAAAAAAAAAAAAAAABjODUVxZNbnjclN3IVHIjyCx5sKaAAAAAAAAAAAAAAAAAAMZwaut rJrY8bkpu5Co5EeQWPNhTQAAAAAAAAAAAAAAAAABjODV1tZNbHjclN3IVHIjyCx5sKaAAAAAAAAA AAAAAAAAAMZwautrJrY8bkpu5Co5EeQWPNhTQAAAAAAAAAAAAAAAAABjODV1tZNbHjclN3IVHIjy Cx5sKaAAAAAAAAAAAAAAAAAAMZwautrJrY8bkpu5Co5EeQWPNhTQAAAAAAAAAAAAAAAAABjODV1t ZNbHjclN3IVHIjyCx5sKaAAAAAAAAAAAAAAAAAAMZwautrJrY8bkpu5Co5EeQWPNhTQAAAAAAAAA AAAAAAAABjODV1tZNbHjclN3IVHIjyCx5sKaAAAAAAAAAAAAAAAAAAMZwautrJrY8bkpu5Co5EeQ WPNhTQAAAAAAAAAAAAAAAAABjODV1tZNbHjclN3IVHIjyCx5sKaAAAAAAAAAAAAAAAAAAMZwautr JrY8bkpu5Co5EeQWPNhTQAAAAAAAAAAAAAAAAABjODV1tZNbHjclN3IVHIjyCx5sKaAAAAAAAAAA AAAAAAAAMZwautrJrY8bkpu5Co5EeQWPNhTQAAAAAAAAAAAAAAAAABjODV1tZNbHjclN3IVHIjyC x5sKaAAAAAAAAAAAAAAAAAAMZwautrJrY8bkpu5Co5EeQWPNhTQAAAAAAAAAAAAAAAAABjODV1tZ NbHjclN3IVHIjyCx5sKaAAAAAAAAAAAAAAAAAAMZwautrJrY8bkpu5Co5EeQWPNhTQAAAAAAAAAA AAAAAAABjODV1tZNbHjclN3IVH7+HqWTO1uxMgAAAAAAAAAAAAAAAAAYzg1Vb2NXB5XJTdyFRx5G jLc3XG9SS2MgAAAAAAAAAAAAAAAAD4+ohqq47GvTa3JTdyFR830nNm/7qp+gLVk8fuDcZgehLRBL RBLRBLRBLRBLRBLRBLRBLRBLRBLRBLRBLRBLRBLRBKQohP0MbkT40OcG8uSm7kKj5vpObAJm45sd n98SO3cQO3cQO3cQO3cQO3cQO3cQO3cQO3cQO3cQO3cQO3cQO3cQO3cQO3cQO3xxI7PX84JcQAN5 clN3IAAAAAAAAAAAAAAAAAAAAAAAf//aAAgBAgABBQD+G3//2gAIAQMAAQUA/ht//9oACAEBAAEF AFgq7/bL9narGdqsZ2qxnarGdqsZ2qxnarGdqsZ2qxnarGdqsZ2qxnarGdqsZ2qxnarGdqsZ2qxn arGdqsZ2qxnarGdqsZ2qxnarGdqsZ2qxnarGdqsZ2qxnarGdqsZ2qxnarGdqsZ2qxnarGdqsZ2qx narGdqsZ2qxnarCYVyhn78PQNo/MCUmJhssm48QEScNrGJGEMQgjEIIxCCMQgjEIIxCCMQgjEIIx CCMQgjEIIxCCMQgjEIIxCCMQgjEIIxCCMQgjEIIxCCMQgjEIIxCCMQgjEIIxCCMQgjEIQakYQOlI bGTCajw2R5SPLm/KK2gegbR+LVYzzDZGzFKyBaysYS3FYGSBBQkFCQUJBQkFCQUJBQkFCQUJBQkF CQUJBQkFCQUJBQkFCQUJBQkFCQUJBQkFCQUJBQkFCQUJBQkFCQNkCA9uK0R7WVrJ+ykMy6WI8BrW NY0IraB6BtAsdqbMHtttYxkvKFKxhCs4JpCtExKFMy5W5jWX22NgRAitoHoG0SsBsePZZFhSSkuw peFm5dhi3qRKYk1BbAjoraB6BtCcl/8ASYtUBjCkL8Lwp2fS3WCxpVDA/wA5lFbQPQNoShGNLbif CcM3+roX9VQz4ZFbQPQNoSLP0t7P04e5uql5FbQPQNoSPXIOcPc3VU8itoHoG0JHrkHOHubqqeRW 0D0DaEj1yDnD3N1VPIraB6BtCR65Bzh7m6qnkVtA9A2hI9cg5w9zdVTyK2gegbQkeuQc4e5uqp5F bQPQNoSPXIOcPc3VU8itoHoG0JHrkHOHubqqeRW0D0DaEj1yDnD3N1VPIraB6BtCR65Bzh7m6qnk VtA9A2hI9cg5w9zdVTyK2gegbQkeuQc4e5uqp5FbQPQNoSPXIOcPc3VU8itoHoG0JHrkHOHubqqe RW0D0DaEj1yDnD3N1VPIraB6BtCR65Bzh7m6qnkVtA9A2hI9cg5w9zdVTyK2gegbQkeuQc4e5uqp 5FbQPQNoSPXIOcPc3VU8itoHoG0JHrkHOHubqqeRW0D0DaEj1yDnD3N1VPIraB6BtCR65Bzh7m6q nkVtA9A2hI9cg5w9zdVTyK2gegbQkeuQc4e5uqp5FbQPQNoSPXIOcPc3VU8itoHoG0JHrkHOHubq qeRW0D0DaEj1yDnD3N1VPIraB6BtCR65Bzh7m6qnkVtA9A2hI9cg5w9zdVTyK2gegbQkeuQc4e5u qp5FbQPQNoSPXIOcPc3VU8itoHoG0JHrkHOHubqqeRW0D0DaEj1yDnD3N1VPIraB6BtCR65Bzh7m 6qnkVtA9A2hI9cg5w9zdVTyK2gegbQkeuQc4e5uqp5FbQPQNoSLlvb+nD3N1UvIraB6BtCTN8Jbj /ScM3+rob9VQ36ZFbQPQNoTUx/xGtcdjSlb9ZwsRvwt1jMYVRR/+5hFbQPQNokZinmbPOsaWVjsM XhZuOwpbxOsYWcjtjzCK2gegbQLDdv8ANtuuDGsgTJTMYZjeCaZjBHmSlZcbgxjL9dGxDBFbQPQN oDGtK2z31pBJXYrWQLmVrCz5Whk8QVpBWkFaQVpBWkFaQVpBWkFaQVpBWkFaQVpBWkFaQVpBWkFa QVpBWkFaQVpBWkFaQVpBWkFaQVpBWkDZ4gNPkYI9zKxk7dysZdr80zTGaZoRW0D0DaPzK3Oalmyy oYwEVEv8yqXGVS4yqXGVS4yqXGVS4yqXGVS4yqXGVS4yqXGVS4yqXGVS4yqXGVS4yqXGVS4yqXGV S4yqXGVS4yqXGVS4yqXGVS4yqXGVS4yqXGVS4yqXB1RL/JlUMMyauU1Mt/KK2gegbRxaK2jj/wD/ 2gAIAQICBj8AG3//2gAIAQMCBj8AG3//2gAIAQEBBj8Ar2djdfxW7G01az+Ok74VzEcvF7FWJ73Z o+M97s0fGe92aPjPe7NHxnvdmj4z3uzR8Z73Zo+M97s0fGe92aPjPe7NHxnvdmj4z3uzR8Z73Zo+ M97s0fGe92aPjPe7NHxnvdmj4z3uzR8Z73Zo+M97s0fGe92aPjPe7NHxnvdmj4z3uzR8Z73Zo+M9 7s0fGe92aPjPe7NHxnvdmj4z3uzR8Z73Zo+M97s0fGe92aPjPe7NHxnvdmj4z3uzR8Z73Zo+M97s 0fGe92aPjPe7NHxnvdmj4z3uzR8Z73Zo+Ms7O7u/5Leq5yVGfx0m/KIxzotYixTC5kpbbfsfFJir 9/0EWo74+5qHH8y/3IO1Ug7VSDtVIO1Ug7VSDtVIO1Ug7VSDtVIO1Ug7VSDtVIO1Ug7VSDtVIO1U g7VSDtVIO1Ug7VSDtVIO1Ug7VSDtVIO1Ug7VSDtVIO1Ug7VSDtVIO1U4fmT+5803fP3Kn+D4qsVP v+n2LCd22/C5kpbbcUqVkX4+jf8AIiI34QTgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIEBe AqK1FRfuFqUE/SkWf4PhY4WE7tt+FzJS224JWqJw+f0ov/YnATgcMi4i8BeAtdifpX9yf+4WE7tt +FzJS22jKSfVeP4DUROCCcMmXgORU4KPpL/qvD8CwndtvwuZKW20dUVIcEE4Hxkyi8BHon7uC/2L Cd22/C5kpbbT5/8AoTKFG/iWE7tt+FzJS22nMomUKNmLCd22/C5kpbbTmUTKFGzFhO7bfhcyUttp zKJlCjZiwndtvwuZKW205lEyhRsxYTu234XMlLbacyiZQo2YsJ3bb8LmSlttOZRMoUbMWE7tt+Fz JS22nMomUKNmLCd22/C5kpbbTmUTKFGzFhO7bfhcyUttpzKJlCjZiwndtvwuZKW205lEyhRsxYTu 234XMlLbacyiZQo2YsJ3bb8LmSlttOZRMoUbMWE7tt+FzJS22nMomUKNmLCd22/C5kpbbTmUTKFG zFhO7bfhcyUttpzKJlCjZiwndtvwuZKW205lEyhRsxYTu234XMlLbacyiZQo2YsJ3bb8LmSlttOZ RMoUbMWE7tt+FzJS22nMomUKNmLCd22/C5kpbbTmUTKFGzFhO7bfhcyUttpzKJlCjZiwndtvwuZK W205lEyhRsxYTu234XMlLbacyiZQo2YsJ3bb8LmSlttOZRMoUbMWE7tt+FzJS22nMomUKNmLCd22 /C5kpbbTmUTKFGzFhO7bfhcyUttpzKJlCjZiwndtvwuZKW205lEyhRsxYTu234XMlLbacyiZQo2Y sJ3bb8LmSlttOZRMoUbMWE7tt+FzJS22nMomUKNmLCd22/C5kpbbTmUTKFGzFhO7bfhcyUttpzKJ lCjZiwndtvwuZKW205lEyhRsxYTu234XMlLbacyiZQo2YsJ3bb8LmSlttOZRMoUbMWE7tt+FzJS2 2nMomUKNmLCd22/C5kpbbTmUTKFGzFhO7bfhcyUttpzCZQo38SwndtvwuZKW20dTVfvQQ+cmUXiI xFhxUsJ3bb8LmSlttGVPp8/C/go1fkTjky8RyqsB9T6KvD8CwndtvwuZKW23BKNR3wqftX+qCcRO JwyLiLxF4i0Ka8V/cuFhO7bfhcyUttuCKi/CpBRtOs74cnBF/qJ+oiRIkSJEiRIkSJEiRIkSJEiR IkSJEiRIkSJEiRIkReIv6hadFfl31d9EFc5flViuFhO7bfhcyUttv2ERrvzNT/VT4qIrf+TqIdVD qodVDqpqdVNTqpqdVNTqpqdVNTqpqdVNTqpqdVNTqpqdVNTqpqdVNTqpqdVNTqpqdVNTqpqdVNTq pqdVNTqpqdVNTqpqdVDqodVDqC/xorl0F/O74av+qfYsJ3bb8LmSlttyywndtvzD/9k="
+ transform="matrix(0.24 0 0 0.24 182.5615 150.499)"
+ id="image56">
+ </image>
+ </g>
+ </mask>
+ <g
+ opacity="0.35"
+ mask="url(#SVGID_3_)"
+ a:adobe-opacity-share="1"
+ id="g58">
+ <path
+ a:adobe-opacity-share="0"
+ d="M184.562,236.826c0,5.965,4.835,10.8,10.8,10.8h59.663 c5.964,0,10.8-4.835,10.8-10.8v-73.527c0-5.964-4.835-10.8-10.8-10.8h-59.663c-5.964,0-10.8,4.835-10.8,10.8V236.826z"
+ id="path60"
+ fill="#1D2915" />
+ </g>
+</g>
+<linearGradient
+ id="SVGID_4_"
+ gradientUnits="userSpaceOnUse"
+ x1="226.1924"
+ y1="159.7139"
+ x2="226.1924"
+ y2="200">
+ <stop
+ offset="0.0123"
+ style="stop-color:#FFFFFF"
+ id="stop63" />
+ <stop
+ offset="0.3788"
+ style="stop-color:#F8FBF3"
+ id="stop65" />
+ <stop
+ offset="1"
+ style="stop-color:#F2F7E8"
+ id="stop67" />
+ <a:midPointStop
+ offset="0.0123"
+ style="stop-color:#FFFFFF" />
+ <a:midPointStop
+ offset="0.4383"
+ style="stop-color:#FFFFFF" />
+ <a:midPointStop
+ offset="1"
+ style="stop-color:#F2F7E8" />
+</linearGradient>
+<polygon
+ fill="url(#SVGID_4_)"
+ points="221.189,159.714 214.142,180.951 224.048,180.951 214.142,200 238.243,173.61 227.655,173.61 236.978,159.714 "
+ id="polygon69" />
+<g
+ id="g71">
+ <g
+ id="g73">
+ <g
+ id="g75">
+
+ <image
+ overflow="visible"
+ opacity="0.75"
+ a:adobe-blending-mode="multiply"
+ a:adobe-opacity-share="1"
+ width="392"
+ height="242"
+ xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAYwAAAD2CAYAAADF97BZAAAACXBIWXMAAC4jAAAuIwF4pT92AAAA GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAHohJREFUeNrsnYlu40gSBZMU5Z75 /4+dbUsiFwtY2JrqvIqHSEoRACFZPtqk3BV8WVcvAAAACXouAQAAIAwAAEAYAADwWgYuwSp0XAKA wzJxCRAGIgCANf8fIxaE8RIxIBaA8yeMDokgjLkNfLfyzwOAfWTRNX49EkEY5h9N6+sIAuC8/++n mXKZjJ/5UfIYPuyPRXut9WOEAXDuxOGJYEqKZPpEebyjMOYKoTO+BmEAfIYwSjG0JJFaHm8rjncS RkYE2uutwkAgAO8liezzTPqY3jl1vIMwooa+fi0SRvQzshIBgHMKYwpez5Su3jJ1nFUYLWWlznne KpHW5AEAx5fF5Aijfi0jDy91nFocZxRGJgnUMvDkkf3arDiQCMD+YshIwxKE93xy5CGJ1HFqcZxJ GEsE4b0WHa3JA2EAHEcYU8PjlJREdESp47TiOIMwIlG0yqEPPl4iDmQBcCxpZMtOmWNs+Fy2n6M7 kzSOLIy5oogk0SsfZwWCNADeSxhZMYzGYy2I8uslIY5TpY2jCiMzsikjCO2xDz4fiaNFGggDYD9h LJGF9uh9rq8+7hxxWLI4vDiOJozsKCdPFJoc5ry2JG0gDYDzJouxOrTXLJHUsuiKz4uROurS1GHL VEcShpcqNGFoZSZLBBfla6zXO0MeGXGQMgCOkyyyopgCMfzveDifs44yRdQlLKtEdei0cRRhaLKI UkXZoFtCeH7uUn3dJfF9UV8HwgA4tzDG6nktjYfy/OF8zhJLZ0hjEns01SHTxt7C8EpQmdKTlhQu lSguxmu1TLSfNac8hTQAji+MMZEsahHUx6g8743v1aQxOudzSGnsKYyoBOUlCk0StQQGRRrW4aUO bWRVpj8DYQDsI4xaFJEwPFk8FGHcDYGUR1/Jon7uzf84bIlqL2FkS1BWP8XFSRKDIozBEclgiMPq CJ8rDSQCsI0cWmWRTRaWDO7BYy2OXhFH2SE+BudymLSxhzAsWbSkCk8S3vNBkUdGGJE06pTUIgTE AbCOKLRylCYNqxyVTRV347gYX9sr4nhUotDKVPXw292l8WphtMrCSxWeEOrjqghDE0hUlrKkYaUL ZACwj1S8lBGli1oYWpL433Eznl8qWdxFL2trfRsiev/GIaTxSmFkJ99po5+0RBHJoXy8Bt+j9WmU /743qU/E7vxGGgD7JBBrCRCvs9sqRd2NZHErRDEY4iiTxV1p72ppiPx/IqDVr7GbNF4ljBZZaKnC E0UtBu3jq5E0PGFcgpJUH8gCcQDsJworXWQTRiSMWyWM5/Oheu3ZltzFLmk/lPbhkCOoXiEMreHM 9FVYsrhWz8vjS3lNE8dglKiyHd9ewqAsBbB/KcoThjbvwhpCG6WL8vgu2pRb0XbdnGpFKY26vbCG 3u4mja2Fkemz8EpQZWOulZq+gkdNIlFZaq4wBGkAHFYWIm2d3lG6uFeiKNPFt9Ku3ESfEOyJY3TS xi7S2FIYc2ThpQpLFF/Bx6U4auFckiWpFlkgCoBjiCPb8T01Jow6WVx/JHEtZPEt+oCaaD6XRUYa b1OSapXFEJSdsodVporKUZlRUpEsEAbAcaWhpYx6WK02lPamSKOWxVBIo1UY3QJpbC6PrYTROhLK SxW1LH5VUvhlvG5JQ0sXWv/FReYNp0UaAPvKYq4wxoQwvIQRlbojYayRNDaVxhbCaFmKXJNFPcrp q5LFL0UUGWlE6UJ7Y7MT9hAGwDmFEaUMb/5F3X/hjb70hulnZVFL4/Sd3l2iLNUHsrBKUL+M48v4 2EoX0ZvqlaIEYQCcWhalNKwNkrz5GPeftuRWtCk30ed8aUsYzU0WdZoo25ZaHJsJZMuSVMs8i6iv opbEX4FAnt+jdXZnZaEtby6IAuBtUsac/oxaGoPy6A2mWZoupiJldK8uTa0pjLmlKK2DOxLFX8br WllKG5Lbsn4UO+0BII1B/uzLqG9Av+XPKQHZNsU7H22IcF2e0qRx2ISRkYU1g3sISlB/KY9/OUlD 67vIyOKSKEO1JAzEAbCfKFqF4c0CL1PGUKSNm9hr1LXchHYJWYjoy4RYZSnZQhxbz8OIRDEYwvhl SOIvQxh/KenC6+hu7eSOpIEwAM4hjCXSuBRp47lW1F1p16wtoFvShSYLa++MUV7Un7GGMFpKUV66 qPssaln8bUijFoY1u9vbOGnp8NkucX0A4LWyEGmbCT6KvnzIWMjiUcgjsyGbdQOa+V0nyW/p2r2i NLVmSWqJLLR0Ycnib6ck5U3S85JFy8KCSzq5kQfA9pJokUX52AdJo6/EkVmwdM6ci2nG0TmyWE0c S4URDaPN9ltkZPG3U5bS5l1kFhecu2w55SeAfcl0FncJgXh9G30hivqxXIE2Gl3ZO6KIymPZo0xI m/VjrFWSmjsqanBkYfVd/K2kC6uj25JFZ7yxraJAEADHF8pUvTYFjbZUd+5T0UY8hfEQfapAZnRl lCpG0eeHaB/XKcOS5CriGFZ6Qyx5aPMuhiBZ/FJkoaUMTRblMNpoFvfS3fOQBcB55DEp/3e9DuJa GE9ZWO1bpvRkNeZWp7u1Z0emNDUp579YGsOCNyBKF9HIqEFp7K1U4Q2lteZcWOu4tM6xoAQF8H7S EKN0Uz9qd/B90Xh3ku+r6IxUMTpHuWWsdvRGacrr09g9YWTnW7RM0rPKU9oyIN7CgpYs1twxD3EA HJcp+f9UuxPvFGnMFUUXpANLGJ5Qyu+t/+1Ddnp3iXKUNu/iy0gYvyQ/Qa8cGaUt+5FJFiJtI5+Q A8D50kVGIpNy0zgtkIYY/0b5PLOnuHZcqpTRK0nIK0+9TBjZLVfnzOrOJI0vQxbafAuvzyJbfmK4 LMB7JAzv/+zU8H+9lEZL2zApopgMcURHVJrqRO+72a0Pw0oX0YZIVsKIylDWkuVav0UpK2upj7mi QA4A504YnkCmoLpQfm/r3hbWarmRHJ5rV3kpwytNaalqljiGhRc+U4qKNkb6ctJFnSa0uRaaLC7J ZEEZCgCBRCOoLHFMxd19JuVEndyeMLIpo98yZcwtSWWXL5/bf/El9kioL7H3tYhmW1rpYm4pCgDe RyCt4pCigRaxZ297w2fHIFWU6aJ8HOTf61uVbd5mKWOYcVFb08Wc/bm1RQTrVFH3WViy6INUgSgA oEUcWn9HL7kFEOtS1BiIojy+5P97cdSlqUfVDnspYzZLh9Vq+3Rn5mBcE6KwtlgtReEli16YiAcA 64vDayt65XszQ2ejhFFu3FTuxfFQksYo+kitXfowOrFHSnmlqGgLVi9daEt9ZCbmibAzHgBsK46u kIFUlY3pp416CmNIlqNulShuRVtYbuB0r26aR6MsNYm/d8aqwpi7DEhm74urU36K9rTQ1p23Fg9E FgCwpjjqmeFdlTK8ctS1eNT2DP+qZPFVSOMm+grcUV/G4s7v1j6MOcuYe3MwNGl8KV8b7cFd/w4i /pR8RAEAc8QRSUOqlPH8+jpljEVJqZbGl5Iq6qPc7e9eScPry5AlKWONeRjeUNpLUI7SEsUg9sxt bwZ3L/RVAMBr04bXCT5Wpam6XF+WpK7y7z6Ka5EqynQxiL2DaC/xaKnNJ+5Fayi1jpQagtKTNXN7 SKSLaClhZAEAa6cNSxrlXX5fpYyxaNdqadyVdnBuyli187ufeaG0foJMyhgMMdSlp0wZykoXIu3b qAIAzE0b2nNtBGl2YdbBaRsHJ2W0rMg9q23sGy5My2S9PnExhsTFyG6BmHkDAQBeLRFNGpeqNOXt RJppG7Wb6i6Qxiz6hpP3RNIHCSNj0swF6WaUopAFALwyZWRvri1xXIL2sWVqQbR67qrCaEkaLUNr 6wtxCWRh7ZVryQFJAMAe0ojazWe7dWlsI6/JhKG1l6KUoma1lf3Ci2RdiGyyuIg+CspbRLA3TD7n jQQA2EIe0Y21Nw1hUB6z0sgkDC8dLRZGNlVkR0hZpSdLFpfkBVhkTgCADVJGZoM5qyLjyaN1o7hV +jH6mTHL2gcjugjWBfHKUN1WJw8AsFG6iGSRLeNn2spoFOlqbWXfeDG6IHK1ysI76cyOeaQLADhr maqfIY2L5Pt5rQ7vzYfVZspUfXC0CsLq5LbGEgMAnC1laP0Z1giqls7ubBl/k07vaOiYtp6TdjKa JKJJJ9n5FqQLADhj2vCG20Y33NlSVNfwu62SMLqkNb2E0SviyMzgXrUOBwDw4pThrY6R6QPOVmo2 7fvNTNzrgs9F9bhIHH3ihC07C+kCAE4mE00ctUCiakymhN+vfZPdz4gm2fHFXSALK0V409pFWPID AM6XNrwUklnANSpZzRlS29x+zllLqiVpZBKHNwoqE6OQBgAcXRTeIoCd0x564siW8K2RUs0MMy9E 9tBOwNv4KFtjQxwA8C5C8drOLlmlya4h5a21Fy513q948llbdo48okglQn8FAJxLCt68Ma1Bt9pD 7fW1O7q7LYQRxausLaPaGivPAsC7yyTbZnZiTznIyENk4UipfuZJtp68VXLyxJGZoEfaAIAzSaJl TtuaCWOVdrJ18UHrJCNZRFErU3ZCCgDwjglDa+u6GQkjszjr5sLIJI2oA8dLGtKYMBAHAJxVDJ4s Mmv1ZWURlaNeKgxJnmBmT9kueZFFKEEBwGdJJjui9CU7j/YrnJTX6Gcn3m1SbwMAOEnyyDT4SxNF tGrtLGF4nc3euN7MbMKsGDIlKMQCAO8kjeyNdIs0Vm0vt+jDiGQS2TVbtgIAOKMkoopMa5uaEc4q 9C+8EF4UmyMpAIB3Tx4tfcGb32T3G52sVzN7iQkBAA4ogJYbbetjbxe9zFp8s8v8/Y4XCQAAkeiN uwSJQiQ3qbn1Jn/zhNHNuDCR5RAKAHyKLDKfjxJG9t/YpdNbpH1/7ZY4BgDw6TKJSvWtW0Espt/g ROes/eQtxYtQAAAOsJFc/6KTmxPJAADAF8RL29F+5xMHAEAGfz5fvHfFFu1tf8ILCgDwbrLIrAi+ xs/+CGEAACCX/FpTm9x4IwwAgPMkka2+/jDCoJwEAPAGbSoJAwDgwxr+owuDlAEAcHJIGAAAgDAA AD6At5jpDQAAJAwAAPikdIEwAAAAYQAAAMIAAACEAQAACAMAABAGAAAgDAAAAIQBAAAIAwAAEAYA ACAMAABAGAAAgDAAAABhAAAAIAwAAEAYAACAMAAAAGEAAADCAAAAhAEAAAgDAAAAYQAAAMIAAACE AQAACAMAABAGAAAgDAAAQBgAAAAIAwAAEAYAACAMAABAGAAAgDAAAABhAAAAwgAAAEAYAACAMAAA AGEAAADCAAAAhAEAAAgDAAAQBgAAAMIAAACEAQDwMUwIAwAASBgAAHDOlIEwAADgUMKYuNQAAOdu F0kYAABwGGGQLgAA1mtHd2tTSRgAAOeThvX58vhYYZBSAOBTJDAl0sXU0EauJhESBgDA/tKoG/U1 GvnVk0a/08UhNQAArJtENqff4KQydbTpyBcFAODA0titA7xf+MtPM09YuwDT1nEKAOCEaSLqw5he 1Wb2K51c5hedErYkUQDAJ0ohalen4KZ9esXN9h4zvefIBQDgE6QxSVyJmSRXllq9xN9vdBEiM2ai FwDAp0hjMm6sWxKGN9oqandTbW+/0clnkkXr8DFkAgBnl8KcG+dJ/AFFU9DGZqUQ3uT3G1yUKGJ5 1pyEkVIA8BkCySSOKHVMiTZ2tfazn3liU/IEopPPXBhkAQDvKIu5N9JTcGx2o903xpLopDIXyJNB JIgp+XsCAJxBHNkb6czN+ZT8Ppl7Q96vcNItJxHZUoKTRBAA8K4CiYbIPp+PDW1t5qb+ZcKQwIxZ C3oJA2kAwLumi0w7OiqSGKWtI3yV9rNPntyc2KQdkRk9cQAAvIscJidZWG3mqHy89IZ804SR6Zix RDFWJzlK23Axz4zIBQDOJBCRuDQ/OqLItKOrDx5asw/DkoRmxFH5mlH8OhzDbQHg3WQRtZuZhDE6 clky9201YURlqDFIGGODGT0rAwCcVRxRKX9MtJ8tJarF7WffcIJZY3mmtKJVFK+s+AYAcBYxRJ+L Sk5jcMzp12iq2myVMFpO0CpXtdoRgQDAGSQSdW5bCePRII1R8h3tL1lLaq4kyhN/SNwhHtkaUQDA UdOFVRXxkoUmh0fQfmZK/SILy/t94mS9dUsiI3on6J209jNF4o5w5AEAZxFHNM/iURxLZbFKGT+7 ltSUSBjRCKjoRB/BBaQjHADOKAmvKqP1UTyM9jFqQz2BaL/D6sJoPenROdHoKC+EVdfLCAJ5AMCR xJGpzHg32I9EW9pSltosYXiiECNWRXW4R0PUmrOoFgDAEdOFJpEoSTyPe/U4VxpzfvdFCSNKGi1W fF6Au7T1a7SsagsAsHe6EMmVo7yb63tSFF5ZalHq6Gc2utnRUZEkshdgSpw8ogCAI6YLWUEUd+fj pQkj3W6uMXEvEkdWEnfR63abxSsAgBeki7k32Hfj0BJH3W5uMlqqbzh5TyCtUSpzEVpKU6QMADhi uvCE8VBuqj1R3IMb72iY7WLmrlabnXuRsWXGng/xZ4KTMgDgiOlCGiowLdKIOr6jzetm7ZGx1bDa TN/F87glLkhLR44IczQAYL90kZnYbI2EqtvEW4M8Mqt/L2of+4YLEfVfaOb0TvJWXIybcWE8e86Z owEAsJUsrOkGmVLUXZFG1D5mb7BXm4vRz7worQkjEsVNsanVqROtzLjYogAAM2URdXA/GtrIW0Ic L524Nyy4UJm+jEdwEerj+vM4/DxeiuN/P6P7kdz487z7ed4rF6P7ea0rfueOv3EA2KAMJZLbEygr iqjNbE0X2u/YfEM9JC9MV/3gLlGWsmpz1vH98/uUx70QRl8cXXFIJY5IGoI4AGBFWbR0cFtTDeo2 8ltpH7W+jUyHt7fH92YJY3JEkZFFfVG+fxLFd5EsbkXCGKqEEQmjThmlLOp0QdoAgLVkUYujbrSt AUC3QBLWa9mEYW0V8fKSVH1xygbbGjJWlppuijQG5Yhk0SmJoa+k4EmDtAEAS0RRPnorz1ojoer2 sD40aUQDgzJbts5KGUPDxeoco0bjiy9KuhgUWVyLz1+MhOEJoyt+v1H5Gk0SpA0AyIoiksUYVFse jizqR00ac6YeTMnzWj1haHfpVsdOb0SwoUgadbK4FsmiTBnZhNFVKUNDEwdpAwCyohCZtyzSwyhD 1cdvI2lEKcOTxSpTEJb0YZSNb1mailLGUxpRGWqoRKHJonMa+k7aO8ERBwCiiEShVVesEaLlTbM1 2Oe3IwpLGLdkyvDKaZsnDE0cXSGLTMrISKNMFhdHFpYwpkIWnZM4InEgDwBEYcnCWnVWW+LDE0Ut jUgcmc7uVdeQWiIMcS5iJmXcqpLTt/w5IqpFFlGjXs/b6BrEQeoAQBTRpLxphiwsUXji8EpSWv+F yEqd3XOFMTl34V7KuFelpUtwaGWovlEW5UXqg5SRKU1NhmQA4NyCyIpCjGShDZ3V5lV8B3L4bXzu OyhFeSOkWs5/s4RhDVEt7+QfRUNfSqNMGV6qqKXRBymjlsTFKFPV3zsVH7eUpqagzAUAxxRDNmFk k8XDSBfaCKhaCv/5OTxpRB3eXt/FquvtrdGHUd+p18t2PIqGXytNXZTk4U3Sy7zxtTiespjEHmk1 JctVmWQDAOcSibXQamYDJGvobCmL34njP+L3YWRLUasOpS25zPy+srPZKhFpX+Md3pDZqA+j5Y9k 6UXrFn4eAPZPGNnyU3borCaLm1KG+k+VLLzDG17rSWOTdLFEGCJ+B7IllEgCEryWbaCjWZlrxVlE AXA+cSyRxST6sFlNFjdHFnU5yhPGb0cW1gipTSofwwpvRl3S0dZ+19JEn0waljCiIW7Px6EqS12K z2n9IyL+pEBGTQGcUxaZ5T2iDm5v8yNtUp7VZ/FPQ7Lw9gpqWdJ8t+XNPVlIUhqZklSXSBGj2JNn roU0xh9ZjIU4ns9HRxzWo9dBjlAAjlOGmgJJiCzbz8KSxbfofRSRLH47Zaho7oXIhpvKrTUPo1N+ wbFoOLPSyAgjMw66vJClLMpjlD9HYdXikMSjJocu+SYhFYBlMmhJFa2y0EZCZWRxE33IbC2Hf6rH WhatI6M230RurZKUNcy2FkerNLw33lvw6/mmXos3tlyj6iH6aKw+WRaLZIEgAPYTSKs0rEUEvdFQ 1uZH2qQ8r5/iH4k7uVtGRmlltdVYM2FYb9RYNbgZaXiNq/amWtseatJ4iD9JcKk0WjrnAWB7aXhr QXk3oJP4o6G0mdzakh9WZ/c/Ys/DiFanrTdM8q7BoUpSUWmqbOSz0rB+flSGeiSkcRF7rw1vhrlI bhgx0gDYVxhT0GjWd+FjsmJxF31TuGg2dzSk9rdRjlpj7+7DJYxsaapMG1oDG02Es5ZR90RRvsHP pdOfW79mpZFdUh1hABxfGN5EvKws6r6Let8Kq/8imt3tLWWe2fNis1LUFgnDeyNHpeF8JGThJYxo 8kx5J3AtJHFVUoa1LIkmjH6mMJAFwPbCyHZyjzOqFlay0Pa1aJnR7Y2KinbV82SxujS2Kklpo4Qm RRwtPzsShZUqvooL/0wX9QZN1gq5njhE2kZSIQ2A7WQxNT5qZai6P3SU3G559RIgVsqwEoW1wGA0 jFacEtQpEoYnjXLOQ7bxzAyh9UYtfBXiuMq/d/UbnKShiWOuNJAFwHGkYQnj0ZAublU5yts5L1qy /DuQRVSCispzpyhJlfLwImGLLKw+DC8yluIYKnFo0uiN8hTSAHgfYYwSz+HKlqIyW61qaULbqzsq Q2X7LTaTx7DRm9gF4sjKQpKi8IRx/XkjalnUfRmeNCxhRP0ZCAPgGMLwZDGJP4imlsXdKEdF+3Pf xO+rqDu4DyWLLRNG1J8RScMaAjc69UUrXVyrhOGVpYbGlIEwAM6TLsZkwshULW4N0rgpj9oM7nr4 bKss3qIkNVcaIvl16LWRUc9SVJkwhiphWH0ZLSlj7dngANAuCi1R1M+z6WIUe85FnTK+FWnclBRR J4rspLwWWWwujuGFb3KLNDL9F1Z0/DJKUbUwWstSnjSQBcDxpRHJIprRHaWMmyEIL1FEqSLb0X36 Tu9SFFlpTOKvSZ8dVntVRKEJo+78tvYWvyQSBsIAOFZJKhKG1p6MTtXCGimlPY9E8RB9BvdDkdok L1qN9ggJo0Ua2T0vvIRxlT/7MKwSVDS8NprINzdlIA6AdUQRJYy6HOUtLGi1KZnSlCWSjChaS1C7 yGKPklQkDS1teEnjUr3JQ/H4nKh3q4RxUaRxCRJGZngtHd8Ax0oYmXJUZq+LaB0p77WHxP0UD4nX htqlz2IvYWSkMUnbHhhjII5aCjcjTXjlqOxcjEgaiAJge3FkN0NqmYORKU9ZcmhJFNYM7sPI4tXC mFue0t703hFH+ca2pIkoXWRkkU0ZHogFoK1BbNk9L+rH8OZ5ZYRgPc+Iwis/7S6LPYThSUOTxyh/ 7hNei6N+oy/y7z0v7skk4fVdZIWxRBaIAmC+OLKyyHZ+eyth3wOpRENkWzc/OoQs9hJGNmlMSmNc v+F9lTZ6+fduehdFHPXn+oQoMsIQsffKQAwA24ukRRqZlOF1hkevWf0To1IWkzPIYk9hlCffGc8l SBudkjaejXmdNHrjMRLEnHSBMAD2k4WIP2CmRRqePEbxl/Cw0kRUftp1nsWRhdFaotI6xbW00RWl qmfi0NJDS5pAGADnF4ZIbk0pSxjWx1lJjOL3URwyVRxNGFrasGRRp43668dKFmVD/0gKwtqiNdrn m/kXAPsJQyS3rPmkNN7185bDks00s/R0WFkcSRiiJAxLIJNxh1+nkzFICr3zemY01JzlzZEGwD7C kERpKtv4j4mUUm9L3ZImpqNe+OHAfwzRwoWROLoqcXTiL1MepYmlu+0hCoDXlaZapZFJHlMghslJ FJnf7dCyOKoworSREYcYAukqeWTkQKoAeO+kIQl5eK+PkptDccpUcRZhiPgjqTKd4p2TRGSGIJYI A2kAbC+LrDBE8qOpWo45SWI6y0UfTvbHEZWp6mSSafQzH4vkJ+chDIB9hRHdxWdGKUWL/0Wd2G8l irMJQ5OBKOnDk4bX6GdSw1qLCyINgNcKo0UakUhE5o1yOrUozioMcWTRkjqyKSGbJOjgBjiuSLyG u6V/YU5fxFuI4szC0N6MOaljmiGDTOkJUQAcM31MM59PC37GW4jiXYShiUMkP7JK+16SBMBnp45s w9/6McI48B9GlDrq2eNTQjgIA+D9hLH11yCME6cOCdJHy89AGADnFEbm89PCr0UYb5A6ZIFAsn8o SATguIJo+fppxX8HYZz8D6n75DcfAGE0ff3HtxEDf1ipdNDyh9LxhwVwOmkgB4Sx6h9Kxx8aAGJB GLDmHxb9FwCIAGEAf6gA8Ln0XAIAAEAYAACAMAAAAGEAAADCAACAs/JfAQYAL3iXmIlSiu4AAAAA SUVORK5CYII="
+ transform="matrix(0.24 0 0 0.24 179.2061 198.1514)"
+ id="image77">
+ </image>
+ <g
+ id="g79">
+
+ <radialGradient
+ id="SVGID_5_"
+ cx="225.1929"
+ cy="226.1387"
+ r="30.8299"
+ gradientTransform="matrix(1 0 0 0.75 0 56.5347)"
+ gradientUnits="userSpaceOnUse">
+ <stop
+ offset="0.0123"
+ style="stop-color:#FFFFFF"
+ id="stop82" />
+ <stop
+ offset="0.4828"
+ style="stop-color:#FDFEFB"
+ id="stop84" />
+ <stop
+ offset="0.7611"
+ style="stop-color:#F8FBF3"
+ id="stop86" />
+ <stop
+ offset="0.989"
+ style="stop-color:#F2F8E8"
+ id="stop88" />
+ <stop
+ offset="1"
+ style="stop-color:#F2F7E8"
+ id="stop90" />
+ <a:midPointStop
+ offset="0.0123"
+ style="stop-color:#FFFFFF" />
+ <a:midPointStop
+ offset="0.8025"
+ style="stop-color:#FFFFFF" />
+ <a:midPointStop
+ offset="1"
+ style="stop-color:#F2F7E8" />
+ </radialGradient>
+ <path
+ fill="url(#SVGID_5_)"
+ d="M186.706,235.825c0,5.965,4.835,10.801,10.799,10.801h55.374c5.965,0,10.801-4.836,10.801-10.801 v-19.373c0-5.965-4.836-10.801-10.801-10.801h-55.374c-5.964,0-10.799,4.836-10.799,10.801V235.825z"
+ id="path92" />
+ <path
+ fill="none"
+ stroke="#EDF5E5"
+ stroke-width="5"
+ stroke-miterlimit="10"
+ d="M186.706,235.825 c0,5.965,4.835,10.801,10.799,10.801h55.374c5.965,0,10.801-4.836,10.801-10.801v-19.373c0-5.965-4.836-10.801-10.801-10.801 h-55.374c-5.964,0-10.799,4.836-10.799,10.801V235.825z"
+ id="path94" />
+ </g>
+ </g>
+ <path
+ opacity="0.74"
+ fill="#FFFFFF"
+ a:adobe-blending-mode="lighten"
+ d="M263.623,229.595c0.037-0.364,0.057-0.734,0.057-1.107 v-13.375c0-5.965-4.836-10.799-10.801-10.799h-55.374c-5.964,0-10.799,4.834-10.799,10.799v7.324 c7.545-1.012,15.699-1.566,24.213-1.566C231.959,220.87,250.812,224.252,263.623,229.595z"
+ id="path96" />
+ <linearGradient
+ id="SVGID_6_"
+ gradientUnits="userSpaceOnUse"
+ x1="225.1929"
+ y1="204.3135"
+ x2="225.1929"
+ y2="246.626">
+ <stop
+ offset="0.0123"
+ style="stop-color:#FFFFFF;stop-opacity:0"
+ id="stop99" />
+ <stop
+ offset="0.0141"
+ style="stop-color:#FDFDFC;stop-opacity:2.231669e-04"
+ id="stop101" />
+ <stop
+ offset="0.1344"
+ style="stop-color:#BEBEAF;stop-opacity:0.0148"
+ id="stop103" />
+ <stop
+ offset="0.2565"
+ style="stop-color:#94957C;stop-opacity:0.0297"
+ id="stop105" />
+ <stop
+ offset="0.3796"
+ style="stop-color:#747759;stop-opacity:0.0446"
+ id="stop107" />
+ <stop
+ offset="0.5029"
+ style="stop-color:#5D633F;stop-opacity:0.0596"
+ id="stop109" />
+ <stop
+ offset="0.6263"
+ style="stop-color:#4D552E;stop-opacity:0.0746"
+ id="stop111" />
+ <stop
+ offset="0.75"
+ style="stop-color:#414B23;stop-opacity:0.0896"
+ id="stop113" />
+ <stop
+ offset="0.8742"
+ style="stop-color:#3B461E;stop-opacity:0.1047"
+ id="stop115" />
+ <stop
+ offset="1"
+ style="stop-color:#38441C;stop-opacity:0.12"
+ id="stop117" />
+ <a:midPointStop
+ offset="0.0123"
+ style="stop-color:#FFFFFF;stop-opacity:0" />
+ <a:midPointStop
+ offset="0.2901"
+ style="stop-color:#FFFFFF;stop-opacity:0" />
+ <a:midPointStop
+ offset="1"
+ style="stop-color:#38441C;stop-opacity:0.12" />
+ </linearGradient>
+ <path
+ fill="url(#SVGID_6_)"
+ a:adobe-blending-mode="darken"
+ d="M263.68,221.954v13.871c0,5.965-4.836,10.801-10.801,10.801 h-55.374c-5.964,0-10.799-4.836-10.799-10.801v-13.871l0.038-7.704c0,0,0.923-9.937,11.173-9.937h54.962 c0,0,10.063,0.328,10.801,10.799V221.954z"
+ id="path119" />
+ </g>
+ <g
+ id="g121">
+ <g
+ id="g123">
+
+ <image
+ overflow="visible"
+ opacity="0.25"
+ a:adobe-blending-mode="multiply"
+ a:adobe-opacity-share="1"
+ width="30"
+ height="30"
+ xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAACXBIWXMAAC4jAAAuIwF4pT92AAAA GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAuJJREFUeNrsl9trE0EUxjO7m5vW tKFN1RqLCmqlIvjgkz5I/cOFIqLggw9KsRHxUo1IdEtactG9+A1+A8dxNrsxK/rgwI9lt5ueb875 ZuZspfJ//Bhqjvc0AfCIHClIQEzSMkUoBqyCJbAKWrxXQoBmBL6AQzChmGQREWbmNQY/DS6Aa6AL mtZvdcDPoEcOQEgxUV5mVMYzH5wCZ8FFcJ0CLoN1UHeIGII34AV4BvbBW4qbzsqKctzruq+ALXAL 3ABXwAafNyjS9sQ3cAwG4BXYA0/AU/AejLOE+I4MtME22AH3wE2wyedNivSFQT3eB/y79kwHnGE2 v4IjinCaNrBEtJiBu2SLs686VkRWGRt8/wTL5jFwxIxMbSGB+Ac1qtcluEMBbWslFDV7QBFdlmBE bwxZtthVDn1dpgF3WIIOhakF9iCf2ajQK32W5hcRJgvnmYHb9ECzQAnyhif8o7PxkWImsiQeRSyJ fWCjJAGy5G2usKtgzc6wx5dWxT6wYhm2jKNBm/UcV90m/aLsdLVoonX+QJV8RvmcXNflNVOOKktQ Fz4p+6AMrBg/GUeeFWUHd51HyuXevz7+GRELNSRzjMwYnmhI5Laa/gEBYxEjskVE7Ih67AeOi3ZE BYc55j+xxzjgpBMpImZL1mNDMuDxm5aYBT2x1+wx+vZJ6lt94kl2Ux1uWl4JWZhy9g/AQ/DOPjt8 q0ULuLebhiRYYO8wPUTIdm+X1zDrKE/FKjH95TL3eP83MiIF7FHAY2ZkYpfadxhoRE80WJ66EKIK BE9YAiPgPkW8dPUSFUfDGnMpHVmKvQJCEoofcsamBLs0fOgSUMnomo2QQ66UAbMTi4+hmOk2mGZW B39OE+rgj5iBcNb3h5qxk9boDb1SLrEh2c75+NlnCfT1A4OP8nZiVeAT0IhZY0Ni+gHP8oEpQ59Z HHP2uRtfkeUnxTj7AWHqMU0ZiRVX2ld5kZ4jnSewHN8FGACSOOKkAlOGAAAAAABJRU5ErkJggg=="
+ transform="matrix(0.24 0 0 0.24 199.0298 216.5547)"
+ id="image125">
+ </image>
+ <g
+ id="g127">
+
+ <radialGradient
+ id="SVGID_7_"
+ cx="202.6289"
+ cy="219.7041"
+ r="2.9995"
+ gradientTransform="matrix(1 0 0 0.75 0 54.926)"
+ gradientUnits="userSpaceOnUse">
+ <stop
+ offset="0.0123"
+ style="stop-color:#FFFFFF"
+ id="stop130" />
+ <stop
+ offset="0.4235"
+ style="stop-color:#FAFCF6"
+ id="stop132" />
+ <stop
+ offset="1"
+ style="stop-color:#F2F7E8"
+ id="stop134" />
+ <a:midPointStop
+ offset="0.0123"
+ style="stop-color:#FFFFFF" />
+ <a:midPointStop
+ offset="0.6235"
+ style="stop-color:#FFFFFF" />
+ <a:midPointStop
+ offset="1"
+ style="stop-color:#F2F7E8" />
+ </radialGradient>
+ <circle
+ fill="url(#SVGID_7_)"
+ cx="202.629"
+ cy="219.704"
+ r="2.999"
+ id="circle136" />
+ </g>
+ </g>
+ <g
+ id="g138">
+
+ <image
+ overflow="visible"
+ opacity="0.25"
+ a:adobe-blending-mode="multiply"
+ a:adobe-opacity-share="1"
+ width="30"
+ height="30"
+ xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAhCAYAAAC1ONkWAAAACXBIWXMAAC4jAAAuIwF4pT92AAAA GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAtFJREFUeNrsmP1LFEEYx292Ts3V 9ujFrCiwFyPShH4I+imoiPqbhYKIoKigN0W8SulNIrOU63S921u/A9+BYdm9mbndg4IGPiynuzOf eea52WeuVvvf/Joo8VwA6rxm+0lBD3R5TYctpu6XYBRE4DiYzMhpqRbYBDtgHyQ+gsIzQmMUOg3O gzkwzciZTUXqO1gCH8E3CsauERSOUiOgAc6AC2ABXAYXwZECsV/gPVgBb8AH8AVsg45NTjhKTYGr 4Aa4AmYZqYjLmpdj+4ySilwTLIOn4C34YZOTjlLXwH1wC8xzKSMureQym0g+O85ITxP1uU3hPS6r t5j63zFK3QM3uYwNQ0g45KUSPMSJNLjsLS71blHUZJ9Ox5lDSuo2k32SHYsBvslKcAIc5jJvUK7r I1ZntK6Du8yryBJhW9P73hi3jg2ym7ek0hKtO0z4E5xx2RYYOany7DPYyotaUPCwyoVL3KemKpLS TX+h5jhGI88jT0x9/U9yrzoHwoL7ykQtZN8LHGvURUxy05xhntWH8I7WOTzDsaSLmOAMQl6DIYgF mTGEi5iWEyWqD9dtpHCMoPaXtn9KrHSR59CsYxSJ6SKv1e9FW6L1MmM4iXWMIu8ri7u04mjF7HuJ Y3VcxLqciaqfVlnYJRWKJexzlWNs5r2SZMGMNOp1cRYc5atEVBCtPVazD8AzHzHdQUKZUyzywoIT kY9Uh9XrC4o1WTimPmI9ouv9iAXfIHKm1GtKvSyKlq2C1Una5sMTLBRHPN4MOvIxpV6BRfCEJU/s W8Ganf4xzoaCf5dGaS36JHnMKnWNUg/BY35uD1rza7ku5bY4658cMDHkEt6nUZP4TQG1dI/Ic/CJ /SVVHHglS2J94pnluXLecuB9x3Nlk5+3jUlV9hOBMAQjCpn1lMikgFrCdQrtGEKp62CDlCtaMLQc eNu+QmV/7XGp2cyN2rsdCDAAoyXZx8WJpTUAAAAASUVORK5CYII="
+ transform="matrix(0.24 0 0 0.24 213.9448 216.5547)"
+ id="image140">
+ </image>
+ <g
+ id="g142">
+
+ <radialGradient
+ id="SVGID_8_"
+ cx="217.5439"
+ cy="219.7041"
+ r="2.9995"
+ gradientTransform="matrix(1 0 0 0.75 0 54.926)"
+ gradientUnits="userSpaceOnUse">
+ <stop
+ offset="0.0123"
+ style="stop-color:#FFFFFF"
+ id="stop145" />
+ <stop
+ offset="0.4235"
+ style="stop-color:#FAFCF6"
+ id="stop147" />
+ <stop
+ offset="1"
+ style="stop-color:#F2F7E8"
+ id="stop149" />
+ <a:midPointStop
+ offset="0.0123"
+ style="stop-color:#FFFFFF" />
+ <a:midPointStop
+ offset="0.6235"
+ style="stop-color:#FFFFFF" />
+ <a:midPointStop
+ offset="1"
+ style="stop-color:#F2F7E8" />
+ </radialGradient>
+ <circle
+ fill="url(#SVGID_8_)"
+ cx="217.544"
+ cy="219.704"
+ r="2.999"
+ id="circle151" />
+ </g>
+ </g>
+ <g
+ id="g153">
+
+ <image
+ overflow="visible"
+ opacity="0.25"
+ a:adobe-blending-mode="multiply"
+ a:adobe-opacity-share="1"
+ width="30"
+ height="30"
+ xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAhCAYAAAC1ONkWAAAACXBIWXMAAC4jAAAuIwF4pT92AAAA GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAttJREFUeNrsmO9r00Acxptc1m6d Fn9M125sU4RVpyjiSwXB/9wXulciiE4dhpUMpwzFUa02XdP4HDwHR7hcLk0mCh58WOnI9548973k uTYa/0e54c15nQ8E8TJ1UpKQ2Z8QJgUtgDa4CC6AliZOiYrBCfgGfoLTsgK9OQStgE2wDa6DDv+v hhQwBAdgH0TgS1mBLsIEBV0F18BNcJvC1sCyQdgIHFHYG/AODMAxBSZVhQXgHJ15AO5T2Aa4TMHC 0GMJBXwFhxT2Erygkz/AtGhim1NS1A3wCDwGO+AKBS3QKS+nrlp6eQProKe5G4LvNucCS0+1uXQP wRNwj6JaFkH6SgitNxeJ0BwNueSzMsIC3ulduiX/roJmpp9cWkVQ1CrrqB17ws+TPGdM3y3Rftnk fTpVVlS2ZpN1+qy7znl8V2HSrUvcdbKnutryVRk+63RZd5vzBC7ClFvyMXALbHEDiJreNGpDbbH+ Wp5rJmEd7sQ+n13NCq8uU881WbfPeTquwtq0u1ezW1nXepyn7SJM9dgSCc4oPBTO4Rus9jKJwatZ lGeZy+rYXzH+GWEpXxEq5Kl8VecwBcnURVjMgCcZn5GwsTZH7CJMD3khL5zWLGzKuiHnGZpe5CZh I6bO9wx7v+bN7YYxY70j1o/yEoZpKSdMmntMoMq1tIYlVG7ts/4x50tddmXCEDfgxRETZ1JRWMI6 EesObGFRWCyfaa+oDl8jQd4DscApJUr21S54Dj7wu1JBUW2Ct1rybDDRntditUtPnWor8Aw8Zd2h rXdFQdGYd6WfbPTYnOeeEiSv/cTDyC5FvbL1luspSSXPFUYUmaHu8KS0yfjdMpySYp6QIop6TZdC njEnRTvdpVc8Lt0yBW4wS+04HHj3+Fg4pKARnUxdJnVNBL7hSNal4OxPBFLAZ/CRzumn8NR1wrKR xdfy1KLlwDvmw3RaRlDVX3s8h8dGWiUE/BZgAMf82R9IYLF+AAAAAElFTkSuQmCC"
+ transform="matrix(0.24 0 0 0.24 228.8599 216.5547)"
+ id="image155">
+ </image>
+ <g
+ id="g157">
+
+ <radialGradient
+ id="SVGID_9_"
+ cx="232.459"
+ cy="219.7041"
+ r="2.9995"
+ gradientTransform="matrix(1 0 0 0.75 0 54.926)"
+ gradientUnits="userSpaceOnUse">
+ <stop
+ offset="0.0123"
+ style="stop-color:#FFFFFF"
+ id="stop160" />
+ <stop
+ offset="0.4235"
+ style="stop-color:#FAFCF6"
+ id="stop162" />
+ <stop
+ offset="1"
+ style="stop-color:#F2F7E8"
+ id="stop164" />
+ <a:midPointStop
+ offset="0.0123"
+ style="stop-color:#FFFFFF" />
+ <a:midPointStop
+ offset="0.6235"
+ style="stop-color:#FFFFFF" />
+ <a:midPointStop
+ offset="1"
+ style="stop-color:#F2F7E8" />
+ </radialGradient>
+ <circle
+ fill="url(#SVGID_9_)"
+ cx="232.459"
+ cy="219.704"
+ r="2.999"
+ id="circle166" />
+ </g>
+ </g>
+ <g
+ id="g168">
+
+ <image
+ overflow="visible"
+ opacity="0.25"
+ a:adobe-blending-mode="multiply"
+ a:adobe-opacity-share="1"
+ width="30"
+ height="30"
+ xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAACXBIWXMAAC4jAAAuIwF4pT92AAAA GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAt9JREFUeNrsl91rE0EUxTOzm69a 05YmVWsUFdRKRfDBJ32Q+ocLRUTBBx+UYiOitlqRaEos2UT3w3P1jIzrbHZNVuiDAz9CNru5Z+69 M3O2Uvk/fg414zOCDzSxRwJiEJGkTBGKAatgEayCFr8rS4AwAp/BIRhTTDyPCDPzGoOfAhfANdAF zdT/SMBPoEf2wYBiQldmVAEBHjgJzoCL4DoFXAZroO4QMQRvwAvwDOyCtxQ3SWdF5QiQui+DDXAL 3ABXwDqvNygy3RPfwBHog1dgBzwBT8E7ENhCvJwMrIBNsAXugZvgPK83KdKzGlTzu8/fpWc64DSz +RV8oYhfTetPEdFiBu6SDc6+6lgRWZNo8P4Flk0zcMiMSGkSP+MPalQvJbhDASuplVB0RfkU0WUJ RuyNIcsWucoh15bYgFssQYfC1Bz7kcdsVNgrByzNHyJMFs4xA7fZA80CJcgb2uofycYHihlrh4hF ax9YL0mAGT7LKivsKmjLpLXjplVrH1ie0ryzlkWa9SxXnWR5QTv6ocUmWuMDqlLu8Di5ruk1Vzmq LEGdD5QtQln7yI8YespZUXbwzBi6cgzGsRTx14ZkxvFbDJeI9Laa/AMBgRUjTIsI6Yh69ANH0xzR DMMc8x/pMcTwjNIiIlqyHg1Jn8dvUmIWZGKv6THk/Jh4GWqFE3RTHW5auoQsTDj7B+Ah2JOzI8vU RNxQ2pYh8efYO4yHGNDubfNzkHWUJ9YqMf5yiZ7AmyEjtoAdCnjMjIj5TbycBhqxJxosT90SogoE j1kCI+A+Rbw0XmKaxzQlCXjz2GpOXUBITPFDztiUYJsNPzAC8kQklpBDrpQ+sxNZL0MR020wZlaC P2cTSvBHzMAg/f6hCu6qNfaGrJRLNCSbOS8/uyyBfL5n8JFrJy7a7Solpk1DYrynTvWBKcMBsxhw 9nEZL8S2GNtzuJo6YFOG1oor7a28iOdI8gLb47sAAwCDFN6m03jgxgAAAABJRU5ErkJggg=="
+ transform="matrix(0.24 0 0 0.24 243.7749 216.5547)"
+ id="image170">
+ </image>
+ <g
+ id="g172">
+
+ <radialGradient
+ id="SVGID_10_"
+ cx="247.374"
+ cy="219.7041"
+ r="2.9995"
+ gradientTransform="matrix(1 0 0 0.75 0 54.926)"
+ gradientUnits="userSpaceOnUse">
+ <stop
+ offset="0.0123"
+ style="stop-color:#FFFFFF"
+ id="stop175" />
+ <stop
+ offset="0.4235"
+ style="stop-color:#FAFCF6"
+ id="stop177" />
+ <stop
+ offset="1"
+ style="stop-color:#F2F7E8"
+ id="stop179" />
+ <a:midPointStop
+ offset="0.0123"
+ style="stop-color:#FFFFFF" />
+ <a:midPointStop
+ offset="0.6235"
+ style="stop-color:#FFFFFF" />
+ <a:midPointStop
+ offset="1"
+ style="stop-color:#F2F7E8" />
+ </radialGradient>
+ <circle
+ fill="url(#SVGID_10_)"
+ cx="247.374"
+ cy="219.704"
+ r="2.999"
+ id="circle181" />
+ </g>
+ </g>
+ <g
+ id="g183">
+
+ <image
+ overflow="visible"
+ opacity="0.25"
+ a:adobe-blending-mode="multiply"
+ a:adobe-opacity-share="1"
+ width="30"
+ height="30"
+ xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAACXBIWXMAAC4jAAAuIwF4pT92AAAA GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAn9JREFUeNrsl+lrE0EYxvdKjSZW YxEPxBsVrNdHQTxA/KMFBRGPDwoVVIpoq3jUeJUG25qk2fVZ+A28WTabxG4lHzrwgxw78z7zzMw7 73reBDR/jOcCUREhn21LRCy6osfn0kT4BN0h9oiDoiGmTN8Efoum+CHWEBRvRoSbeZXgR8QZcVEc F7syfTcI/kq8Fgviu1jlv3hcET627xXHxFlxWZwXJ8RMxgmPIKkTn8UbMSdeinfiq1hnmUYS4QTs F5fENQSc4rfUgahgT7TFivgk5sVj8VQs4kqukGiAgCviDiKOijr/BUOWL7t/9uGaVyTEighYggsI uI79NQYfdY9FPF8x/WL2xiJLk9hOoelcJehtcYslqI8hYNDGrvP9G5t1PbtRQ+NIg/W/KWaxNNpk DnK5JZ35TzbuCq70ibAu3BBXxWHW1i8hGbpc0+akNLNuBDAtTopz4kBJAuxEC8cPzIlI88BpOoQl Xw1TuDtLsqvZkxbwUA2FjZxEVJYbdROj4mWOpVuzCMoWYGPlxggm4SrfFmFFJOTzDUi2KFY8KIYT sUoSWRadLRDSM0XPMgVPn4guOT0tSN6KVtHd/w8tYWJfqDHeM+m+jBkTeIEaoEmKTUp0oXD80Kjt kU4PkVSqJWTOhIDpFf5APBFLOOPliYhxZgYR00MKmVEEuKWeQ8Q8ruRe5Xb3po7s5CqvDSjnxhVw XzzjFu3k5XTbuuziNYLvZolCk+KHBU8n8QcBL8Rd8VB8yCto8kTEDNBCTIdBg4wQvyD4L6rsdOb3 xKNhhW44IKm4wZaghSAnoIdrHWhz/m3wlOfiI86OXPJPzMvPxLwG/tcX4u3m2l8BBgBQ/dU5d1Za tAAAAABJRU5ErkJggg=="
+ transform="matrix(0.24 0 0 0.24 199.0298 230.2217)"
+ id="image185">
+ </image>
+ <g
+ id="g187">
+
+ <radialGradient
+ id="SVGID_11_"
+ cx="202.6289"
+ cy="233.3711"
+ r="2.999"
+ gradientTransform="matrix(1 0 0 0.75 0 58.3428)"
+ gradientUnits="userSpaceOnUse">
+ <stop
+ offset="0.0123"
+ style="stop-color:#FFFFFF"
+ id="stop190" />
+ <stop
+ offset="0.4235"
+ style="stop-color:#FAFCF6"
+ id="stop192" />
+ <stop
+ offset="1"
+ style="stop-color:#F2F7E8"
+ id="stop194" />
+ <a:midPointStop
+ offset="0.0123"
+ style="stop-color:#FFFFFF" />
+ <a:midPointStop
+ offset="0.6235"
+ style="stop-color:#FFFFFF" />
+ <a:midPointStop
+ offset="1"
+ style="stop-color:#F2F7E8" />
+ </radialGradient>
+ <circle
+ fill="url(#SVGID_11_)"
+ cx="202.629"
+ cy="233.37"
+ r="2.999"
+ id="circle196" />
+ </g>
+ </g>
+ <g
+ id="g198">
+
+ <image
+ overflow="visible"
+ opacity="0.25"
+ a:adobe-blending-mode="multiply"
+ a:adobe-opacity-share="1"
+ width="30"
+ height="30"
+ xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAhCAYAAAC1ONkWAAAACXBIWXMAAC4jAAAuIwF4pT92AAAA GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAmlJREFUeNrsmM9r1EAUx3cz2XW1 il2wLLagIh5aeilUBC967EX/XA/1It5aUaiC2JNY/EWp0lZkG3c3id+Bz0AIaXayibKHDnzIJfPm s29eZl/Sas3paNeYZ0SHaz5OKmIx5pr+azF7fyh6oi+WxXURZGJZiUScim/iWERiUkWwXTFDlxG6 I1bFBnKd3P1jpPbEvviE4JlvBtueUl1xQ9wVa2ITsdtkzOTmxGTsALE34oP4KH6I0TS5tofUJXFT PBCPxToZ67OlZTUWkSmbsffipXglvos/ZXLGI1N2qx6Kp+KRuFcgVYRh/oJYEgNxle08EUNqsbJY SDAnZa8r1FlYoQzc02sFF5n/W/wskzMlAReopydkaoVtDWocL1bqGtv8Bblx0YSgJFt9xNbJXLfG uZctjQEx11gj9M2YDXCFiVviflmAGeQCYtlt/MxTOvbJmEFkFZqSyu9GNr7xEXNP4gbnVK/mFhZl rUdsd0B3fcQCDs3lcw7PJobJrRH4iE37g24qa6VrBK05HRdiTYjVbvI8xtQ1isSyTd4pE5secW6N xEdslGnyDmhd0oazFRF7j7VGPmIxPdQ+HNMWNzUmBfFj3+7C1YDtMG7RT3UaONMS+jErtC1e05tV EksyPdkAyToHbsqW2e51R7ygs42qNooJaU/oPF2TF8wgl2SkdsVz8Y5sJVXFUvryX6TfNXld5HwE U37cWUbqGdfDsto1njVxQjscQ8jc8+SckO25jqipHTK1i+Ro1peR7FM6pKH7StAhC7uam7CQI+J+ J7RNTb0lU7Vf3+b6hXeuPxH8948qF6Pq+CvAAGGezDColMK7AAAAAElFTkSuQmCC"
+ transform="matrix(0.24 0 0 0.24 213.9448 230.2217)"
+ id="image200">
+ </image>
+ <g
+ id="g202">
+
+ <radialGradient
+ id="SVGID_12_"
+ cx="217.5439"
+ cy="233.3711"
+ r="2.999"
+ gradientTransform="matrix(1 0 0 0.75 0 58.3428)"
+ gradientUnits="userSpaceOnUse">
+ <stop
+ offset="0.0123"
+ style="stop-color:#FFFFFF"
+ id="stop205" />
+ <stop
+ offset="0.4235"
+ style="stop-color:#FAFCF6"
+ id="stop207" />
+ <stop
+ offset="1"
+ style="stop-color:#F2F7E8"
+ id="stop209" />
+ <a:midPointStop
+ offset="0.0123"
+ style="stop-color:#FFFFFF" />
+ <a:midPointStop
+ offset="0.6235"
+ style="stop-color:#FFFFFF" />
+ <a:midPointStop
+ offset="1"
+ style="stop-color:#F2F7E8" />
+ </radialGradient>
+ <circle
+ fill="url(#SVGID_12_)"
+ cx="217.544"
+ cy="233.37"
+ r="2.999"
+ id="circle211" />
+ </g>
+ </g>
+ <g
+ id="g213">
+
+ <image
+ overflow="visible"
+ opacity="0.25"
+ a:adobe-blending-mode="multiply"
+ a:adobe-opacity-share="1"
+ width="30"
+ height="30"
+ xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAhCAYAAAC1ONkWAAAACXBIWXMAAC4jAAAuIwF4pT92AAAA GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAlRJREFUeNrsmM9LG0EUx5PdjTTW otDYWmoOQm2M/YGXnrxI/3IvnnoRW7TagocotqjQtLYp5pffgc/CECc7u+uGpuDAB2Y32Tff9+bN 7Jstlaa0lXM+E4gIAsd/BqIHpj+cpLBY0Ix4JBbhwYg4I+SvOIdf4jqrwHIOQUvihXgtVsWCQ9gP 8UV8El/Ft6wCyyl+DxH0XLwUb8UbxD0V1RE7ZtCO+I6oj2JPHIlTBPZ94sqe3yIi0hCb4h1Reibm iOK4HDPRuRJnRO+D2BGHRLSXJC7yRGpeNMV7sYXAeQSFCU6FRHIGB56IGveMI/uIGxu5JGFzTN0W wpqIijIsmpDFYZ55hah4xRpxP7MIM4NWWHEbTGGDKY1ybi8VKyVM/l2wYjtM+S1xrvww9x6KulgX K0QqvOOeGafGCnbrjOPScOtmnPA1Hm7Sr+TcjF2Rq2F3nb4zNVzCZsWyWMOr2XFe5WgB9urYX+ba KywkF1bJh8d4WWSrYLdhbdBhmohVrddNtYApLOUZI0jxgp6EMO8YQWlK272wuwobFlHkeVqqMVzC OlaR15mQMO8Yo8L6VpFnypNL0S1YWBe7h4wTVxneiP0RJ+KzaHE9KEjUAHst7J9wnWoqe7z9TVly QL9bwJQOsXOB3X36vbTVhfHqN16Zh49F2xXujK2PnWPsthhnkLYeiz0ziblrVZ55CkV7Ftrk1Q52 z5NmIkowdsUBIrIqz7SltR2la0vUNhxhP3PNP7RCf4CouPIs4jDS9p2U/svj21QfeKf6E8E/+ahy 37K2GwEGAJb/2mQI89WQAAAAAElFTkSuQmCC"
+ transform="matrix(0.24 0 0 0.24 228.8599 230.2217)"
+ id="image215">
+ </image>
+ <g
+ id="g217">
+
+ <radialGradient
+ id="SVGID_13_"
+ cx="232.459"
+ cy="233.3711"
+ r="2.999"
+ gradientTransform="matrix(1 0 0 0.75 0 58.3428)"
+ gradientUnits="userSpaceOnUse">
+ <stop
+ offset="0.0123"
+ style="stop-color:#FFFFFF"
+ id="stop220" />
+ <stop
+ offset="0.4235"
+ style="stop-color:#FAFCF6"
+ id="stop222" />
+ <stop
+ offset="1"
+ style="stop-color:#F2F7E8"
+ id="stop224" />
+ <a:midPointStop
+ offset="0.0123"
+ style="stop-color:#FFFFFF" />
+ <a:midPointStop
+ offset="0.6235"
+ style="stop-color:#FFFFFF" />
+ <a:midPointStop
+ offset="1"
+ style="stop-color:#F2F7E8" />
+ </radialGradient>
+ <circle
+ fill="url(#SVGID_13_)"
+ cx="232.459"
+ cy="233.37"
+ r="2.999"
+ id="circle226" />
+ </g>
+ </g>
+ <g
+ id="g228">
+
+ <image
+ overflow="visible"
+ opacity="0.25"
+ a:adobe-blending-mode="multiply"
+ a:adobe-opacity-share="1"
+ width="30"
+ height="30"
+ xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAACXBIWXMAAC4jAAAuIwF4pT92AAAA GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAnpJREFUeNrsl2lrE1EUhmdLjSZ2 sYgL4lqsYN0+CuIC4o8WFERcPii0YEsQtYpL3cVgW7PMjO+F55ZhmMlMzATyoRceSDKZc957zplz zzjOBCz3P+/xRE34fE6uWESiJ0I+VybCxekeMSMOizkxlbATwx/xRXwXWwiKRhFhd17H+TFxVlwU J8W+lJ0+zlfFmngjvolNrkXDinAJ+6w4IRbFZXFenBLzqUg4ODGR+CheimXxQrwWn8U2aSolwgo4 KC6Jawg4w28mAsGAmuiI3+KDaInH4qlYJyo7QoISAq6IO4g4Lppc8wrSl66fA0TNSQvJE+GRggsI uE74GxgvW8gB/68l7ouojXVSE/s5N9dxelvcIgXNIQTkFXaT718pViMiyjIa8OiZ/N8US4Q0GLEf 2d5iauYHhWtqpu8PiMINcVUcJbduBY3R9poOT4rpJdteRi1Mi9PinDhUkQC7/Cz7aRH2iTB9YIEb /IqPiSmiu0Sza3gZf2qgcC6jEVUVjWbCR83LOR8CqFpAMu07PrxJOMp3ReSJiOnnfYjH5DdK+sgS sUkT+SW6YxASJoYe46OXFtGjp5uB5JVop8/+EVfMxj4xY7w1m/YywtRmGmqhtlNhNMIs+36O2pB2 fYSmUq+gc8ZsyBzhD8QTsWEikyciomjnETFdMMiUEWBTvYyIFlGJ/ILqNRHZy1HeyBnnhhVwXzzj FO06BSHuUcVbON9Piuy7hlvCudnEXwSsiLvioXhnB5oiEREG2ojpYtRLCXEHOP/JlG12fk88yhp0 /RJNxRrbgDaCrICQqHWhw/OfdG54Lt4T2dIj/8S8/EzMa+DYX4h3l13/BBgABM7SO70ZkkMAAAAA SUVORK5CYII="
+ transform="matrix(0.24 0 0 0.24 243.7749 230.2217)"
+ id="image230">
+ </image>
+ <g
+ id="g232">
+
+ <radialGradient
+ id="SVGID_14_"
+ cx="247.374"
+ cy="233.3711"
+ r="2.999"
+ gradientTransform="matrix(1 0 0 0.75 0 58.3428)"
+ gradientUnits="userSpaceOnUse">
+ <stop
+ offset="0.0123"
+ style="stop-color:#FFFFFF"
+ id="stop235" />
+ <stop
+ offset="0.4235"
+ style="stop-color:#FAFCF6"
+ id="stop237" />
+ <stop
+ offset="1"
+ style="stop-color:#F2F7E8"
+ id="stop239" />
+ <a:midPointStop
+ offset="0.0123"
+ style="stop-color:#FFFFFF" />
+ <a:midPointStop
+ offset="0.6235"
+ style="stop-color:#FFFFFF" />
+ <a:midPointStop
+ offset="1"
+ style="stop-color:#F2F7E8" />
+ </radialGradient>
+ <circle
+ fill="url(#SVGID_14_)"
+ cx="247.374"
+ cy="233.37"
+ r="2.999"
+ id="circle241" />
+ </g>
+ </g>
+ </g>
+</g>
+<path
+ d="m 529.664,248.155 h 18.498 l -2.809,18.064 h 5.59 37.586 l 2.6,-17.718 c 4.98,-1.091 9.133,-3.455 12.512,-6.693 3.084,4.075 8.566,7.37 18.252,7.37 6.338,0 12.775,-1.807 17.174,-3.687 4.254,2.399 9.463,3.687 15.459,3.687 3.088,0 6.236,-0.355 9.426,-1.023 h 67.135 l 3.354,-24.827 -5.445,-0.764 1.879,-13.356 c 0.371,-2.386 0.449,-4.66 0.449,-6.156 l -0.008,-0.375 c -0.457,-12.191 -8.139,-19.765 -20.045,-19.765 -2.404,0 -4.623,0.314 -6.676,0.852 h -34.189 l -0.035,0.244 c -2.527,-0.701 -5.41,-1.096 -8.686,-1.096 -3.801,0 -7.406,0.555 -10.76,1.598 l 0.105,-0.746 h -12.467 l 1.826,-12.951 H 613.08 l -1.846,7.658 c -1.373,5.704 -2.213,5.793 -4.453,6.03 l -4.508,0.477 c -3.049,-1.424 -6.357,-2.065 -9.602,-2.065 -2.135,0 -4.275,0.284 -6.416,0.852 h -19.291 c 0.502,-1.772 0.775,-3.674 0.775,-5.678 0,-9.601 -6.846,-16.305 -16.646,-16.305 -11.055,0 -18.775,7.721 -18.775,18.776 0,0.951 0.082,1.869 0.219,2.764 -2.135,-0.288 -4.277,-0.409 -5.553,-0.409 -2.053,0 -4.072,0.288 -6.045,0.852 h -31.342 c -2.74,-0.553 -5.641,-0.852 -8.537,-0.852 -7.138,0 -13.492,1.674 -18.808,4.723 l -3.451,-1.461 c -3.711,-1.571 -11.232,-3.262 -18.979,-3.262 -8.933,0 -16.383,2.56 -21.576,7.016 -3.265,-4.473 -8.523,-7.016 -15.228,-7.016 -4.822,0 -9.021,1.477 -12.572,3.44 -2.996,-2.204 -6.796,-3.44 -11.115,-3.44 -2.327,0 -4.48,0.315 -6.476,0.852 h -33.963 l -0.035,0.245 c -2.526,-0.702 -5.41,-1.097 -8.687,-1.097 -20.458,0 -35.307,16.031 -35.307,38.117 0,17.363 10.785,28.149 28.148,28.149 3.087,0 6.236,-0.356 9.426,-1.023 h 88.816 c 3.706,0.676 7.669,1.023 11.154,1.023 8.907,0 16.278,-2.375 21.51,-6.593 4.872,4.252 11.585,6.593 19.728,6.593 3.053,0 6.206,-0.368 9.286,-1.023 h 44.664 2.069 z"
+ id="path243"
+ inkscape:connector-curvature="0"
+ style="fill:#f5f5f5" />
+<g
+ id="g245"
+ transform="translate(0,16)">
+ <g
+ id="g247">
+ <path
+ d="m 340.308,218.463 c -5.538,2.556 -11.588,4.26 -17.638,4.26 -13.377,0 -18.148,-7.839 -18.148,-18.148 0,-17.893 11.418,-28.117 25.307,-28.117 9.372,0 13.973,4.26 13.973,11.247 0,12.184 -12.865,15.763 -26.157,17.126 0.255,4.346 2.045,8.35 8.435,8.35 3.068,0 7.243,-0.937 12.355,-3.067 l 1.873,8.349 z m -8.095,-29.567 c 0,-2.045 -1.448,-3.237 -4.09,-3.237 -4.771,0 -8.69,4.175 -9.969,10.906 3.664,-0.511 14.059,-2.3 14.059,-7.669 z"
+ id="path249"
+ inkscape:connector-curvature="0"
+ style="fill:#383838" />
+ <path
+ d="m 394.07,221.7 -0.171,-0.255 1.789,-10.055 2.642,-18.063 c 0.512,-3.749 0.341,-5.623 -1.96,-5.623 -2.642,0 -5.794,2.727 -9.372,5.879 l -2.727,19.512 c -0.171,1.363 -0.171,1.534 1.022,1.704 l 4.26,0.597 -0.852,6.305 h -18.404 l -0.171,-0.341 1.875,-10.82 2.471,-17.212 c 0.512,-3.237 0.682,-5.453 -1.789,-5.453 -3.238,0 -7.413,3.664 -9.714,5.709 l -2.642,19.512 c -0.17,1.363 -0.17,1.534 1.108,1.704 l 4.26,0.597 -0.852,6.305 h -23.347 l 0.853,-6.39 3.749,-0.512 c 1.107,-0.17 1.363,-0.426 1.533,-1.704 l 3.579,-25.987 c 0.17,-0.938 0,-1.534 -0.767,-1.789 l -4.176,-1.534 0.938,-6.476 h 16.871 l -0.938,6.987 0.256,0.085 c 4.43,-3.749 9.116,-7.924 15.592,-7.924 4.687,0 7.839,2.641 8.18,7.753 l 0.256,0.086 c 4.175,-3.664 9.202,-7.839 15.252,-7.839 6.22,0 8.775,3.152 8.946,9.202 0,1.618 -0.171,3.493 -0.426,5.538 l -3.067,21.897 c -0.171,1.363 -0.171,1.534 1.107,1.704 l 4.175,0.597 -0.852,6.305 H 394.07 z"
+ id="path251"
+ inkscape:connector-curvature="0"
+ style="fill:#383838" />
+ <path
+ d="m 443.995,190.771 -0.17,-4.431 c 0,-0.682 -0.085,-1.108 -1.022,-1.363 -1.022,-0.256 -2.642,-0.427 -4.771,-0.427 -3.579,0 -6.391,1.108 -6.391,4.09 0,2.727 2.982,3.749 6.731,5.027 6.05,2.045 13.888,4.431 13.888,13.463 0,11.076 -9.372,15.592 -20.193,15.592 -8.009,0 -14.91,-1.959 -16.273,-2.981 l 1.618,-12.355 8.691,0.512 0.255,4.941 c 0,0.597 0.171,1.108 0.938,1.363 1.278,0.427 3.238,0.768 6.05,0.768 4.687,0 7.327,-1.79 7.327,-4.687 0,-3.408 -3.152,-4.175 -8.009,-5.624 -6.135,-1.874 -12.78,-4.26 -12.78,-13.206 0,-10.48 9.116,-14.996 19.597,-14.996 6.646,0 12.866,1.533 15.081,2.471 l -1.704,12.354 -8.863,-0.511 z"
+ id="path253"
+ inkscape:connector-curvature="0"
+ style="fill:#383838" />
+ <path
+ d="m 489.748,218.548 c -4.175,2.386 -10.395,4.175 -16.444,4.175 -13.036,0 -18.575,-7.583 -18.575,-18.574 0,-18.83 11.588,-27.691 25.988,-27.691 6.475,0 11.843,1.874 14.229,3.578 l -1.874,13.377 -8.691,-0.426 -0.255,-5.794 c 0,-0.597 -0.086,-0.938 -0.597,-1.192 -1.022,-0.427 -2.557,-0.597 -4.175,-0.597 -5.624,0 -11.418,4.601 -11.418,17.382 0,7.839 3.493,10.395 8.436,10.395 4.346,0 8.436,-1.448 11.247,-2.556 l 2.129,7.923 z"
+ id="path255"
+ inkscape:connector-curvature="0"
+ style="fill:#383838" />
+ <path
+ d="m 491.364,221.7 0.853,-6.39 3.919,-0.512 c 1.193,-0.17 1.363,-0.426 1.534,-1.704 l 3.578,-25.987 c 0.086,-0.938 -0.085,-1.534 -0.852,-1.789 l -4.261,-1.534 0.938,-6.476 h 16.87 l -1.107,7.669 0.256,0.17 c 3.323,-4.771 8.095,-8.69 13.548,-8.69 1.874,0 5.112,0.341 6.561,0.767 l -2.13,15.507 -9.969,-0.341 -0.256,-4.431 c -0.086,-0.767 -0.256,-1.022 -0.938,-1.022 -1.619,0 -4.26,1.96 -6.646,4.431 l -2.981,21.643 c -0.171,1.363 -0.085,1.619 1.192,1.704 l 8.095,0.682 -0.938,6.305 h -27.266 z"
+ id="path257"
+ inkscape:connector-curvature="0"
+ style="fill:#383838" />
+ <path
+ d="m 536.094,221.7 -0.17,-0.426 2.045,-11.503 3.152,-22.749 c 0.17,-0.938 -0.086,-1.534 -0.853,-1.79 l -4.175,-1.448 0.852,-6.476 h 18.149 l -5.027,35.786 c -0.171,1.363 -0.085,1.534 1.192,1.704 l 4.09,0.597 -0.852,6.305 h -18.403 z m 5.879,-57.598 c 0,-5.453 3.238,-8.775 8.776,-8.775 4.175,0 6.646,2.215 6.646,6.305 0,5.368 -3.322,8.861 -8.861,8.861 -4.176,-0.001 -6.561,-2.387 -6.561,-6.391 z"
+ id="path259"
+ inkscape:connector-curvature="0"
+ style="fill:#383838" />
+ <path
+ d="m 556.796,239.764 -0.17,-0.341 2.471,-14.229 5.282,-38.087 c 0.171,-1.022 -0.085,-1.534 -0.767,-1.789 l -4.175,-1.534 0.938,-6.476 h 17.041 l -1.022,6.816 0.255,0.085 c 5.027,-4.686 10.311,-7.753 15.678,-7.753 7.328,0 12.44,4.686 12.44,17.041 0,11.758 -4.601,29.225 -20.449,29.225 -5.538,0 -8.605,-2.13 -11.759,-4.345 l -1.874,12.78 c -0.085,0.938 0.085,1.278 1.192,1.363 l 8.606,0.853 -0.938,6.39 h -22.749 z m 17.041,-30.247 c 2.13,1.789 4.942,3.322 8.095,3.322 6.901,0 9.458,-9.713 9.458,-17.211 0,-5.027 -1.193,-8.351 -4.431,-8.351 -3.408,0 -7.754,3.664 -10.821,6.391 l -2.301,15.849 z"
+ id="path261"
+ inkscape:connector-curvature="0"
+ style="fill:#383838" />
+ <path
+ d="m 635.777,219.4 c -3.749,1.789 -9.458,3.322 -14.229,3.322 -8.521,0 -12.099,-2.981 -12.099,-9.969 0,-1.107 0.085,-2.386 0.256,-3.749 l 3.066,-22.323 c 0.086,-0.512 0.086,-0.853 -0.511,-0.853 h -5.879 l 1.107,-7.839 c 7.242,-0.767 10.906,-4.431 13.122,-13.633 h 7.924 l -1.704,12.1 c -0.085,0.596 -0.085,0.852 0.597,0.852 h 11.758 l -1.193,8.521 h -12.439 l -2.812,20.364 c -0.171,1.107 -0.256,1.96 -0.256,2.727 0,2.982 1.278,4.26 4.942,4.26 2.385,0 4.771,-0.596 6.816,-1.363 l 1.534,7.583 z"
+ id="path263"
+ inkscape:connector-curvature="0"
+ style="fill:#383838" />
+ <path
+ d="m 671.817,218.463 c -5.538,2.556 -11.588,4.26 -17.638,4.26 -13.377,0 -18.148,-7.839 -18.148,-18.148 0,-17.893 11.418,-28.117 25.307,-28.117 9.372,0 13.973,4.26 13.973,11.247 0,12.184 -12.865,15.763 -26.157,17.126 0.255,4.346 2.045,8.35 8.435,8.35 3.068,0 7.243,-0.937 12.355,-3.067 l 1.873,8.349 z m -8.094,-29.567 c 0,-2.045 -1.448,-3.237 -4.09,-3.237 -4.771,0 -8.69,4.175 -9.969,10.906 3.664,-0.511 14.059,-2.3 14.059,-7.669 z"
+ id="path265"
+ inkscape:connector-curvature="0"
+ style="fill:#383838" />
+ <path
+ d="m 703.596,221.7 -0.17,-0.255 1.874,-10.396 2.471,-17.723 c 0.512,-3.578 0.341,-5.879 -2.215,-5.879 -3.664,0 -8.18,3.578 -11.077,6.135 l -2.641,19.512 c -0.171,1.363 -0.171,1.534 1.107,1.704 l 4.26,0.597 -0.852,6.305 h -23.347 l 0.853,-6.39 3.749,-0.512 c 1.107,-0.17 1.363,-0.426 1.533,-1.704 l 3.579,-25.987 c 0.17,-0.938 0,-1.534 -0.768,-1.789 l -4.175,-1.534 0.938,-6.476 h 16.87 l -0.937,6.987 0.255,0.085 c 4.771,-4.09 9.373,-7.924 16.02,-7.924 6.475,0 9.798,3.322 10.054,10.139 0,1.363 -0.085,3.067 -0.341,4.687 l -3.067,21.812 c -0.171,1.363 -0.171,1.534 1.022,1.704 l 4.26,0.597 L 722,221.7 h -18.404 z"
+ id="path267"
+ inkscape:connector-curvature="0"
+ style="fill:#383838" />
+ </g>
+ <g
+ id="g269">
+ <linearGradient
+ id="SVGID_15_"
+ gradientUnits="userSpaceOnUse"
+ x1="324.1611"
+ y1="239.7637"
+ x2="324.1611"
+ y2="155.3275">
+ <stop
+ offset="0"
+ style="stop-color:#000000"
+ id="stop272" />
+ <stop
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0"
+ id="stop274" />
+ <a:midPointStop
+ offset="0"
+ style="stop-color:#000000" />
+ <a:midPointStop
+ offset="0.6933"
+ style="stop-color:#000000" />
+ <a:midPointStop
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0" />
+ </linearGradient>
+ <path
+ d="m 340.308,218.463 c -5.538,2.556 -11.588,4.26 -17.638,4.26 -13.377,0 -18.148,-7.839 -18.148,-18.148 0,-17.893 11.418,-28.117 25.307,-28.117 9.372,0 13.973,4.26 13.973,11.247 0,12.184 -12.865,15.763 -26.157,17.126 0.255,4.346 2.045,8.35 8.435,8.35 3.068,0 7.243,-0.937 12.355,-3.067 l 1.873,8.349 z m -8.095,-29.567 c 0,-2.045 -1.448,-3.237 -4.09,-3.237 -4.771,0 -8.69,4.175 -9.969,10.906 3.664,-0.511 14.059,-2.3 14.059,-7.669 z"
+ id="path276"
+ style="fill:url(#SVGID_15_)"
+ inkscape:connector-curvature="0" />
+ <linearGradient
+ id="SVGID_16_"
+ gradientUnits="userSpaceOnUse"
+ x1="377.45459"
+ y1="239.7637"
+ x2="377.45459"
+ y2="155.3277">
+ <stop
+ offset="0"
+ style="stop-color:#000000"
+ id="stop279" />
+ <stop
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0"
+ id="stop281" />
+ <a:midPointStop
+ offset="0"
+ style="stop-color:#000000" />
+ <a:midPointStop
+ offset="0.6933"
+ style="stop-color:#000000" />
+ <a:midPointStop
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0" />
+ </linearGradient>
+ <path
+ d="m 394.07,221.7 -0.171,-0.255 1.789,-10.055 2.642,-18.063 c 0.512,-3.749 0.341,-5.623 -1.96,-5.623 -2.642,0 -5.794,2.727 -9.372,5.879 l -2.727,19.512 c -0.171,1.363 -0.171,1.534 1.022,1.704 l 4.26,0.597 -0.852,6.305 h -18.404 l -0.171,-0.341 1.875,-10.82 2.471,-17.212 c 0.512,-3.237 0.682,-5.453 -1.789,-5.453 -3.238,0 -7.413,3.664 -9.714,5.709 l -2.642,19.512 c -0.17,1.363 -0.17,1.534 1.108,1.704 l 4.26,0.597 -0.852,6.305 h -23.347 l 0.853,-6.39 3.749,-0.512 c 1.107,-0.17 1.363,-0.426 1.533,-1.704 l 3.579,-25.987 c 0.17,-0.938 0,-1.534 -0.767,-1.789 l -4.176,-1.534 0.938,-6.476 h 16.871 l -0.938,6.987 0.256,0.085 c 4.43,-3.749 9.116,-7.924 15.592,-7.924 4.687,0 7.839,2.641 8.18,7.753 l 0.256,0.086 c 4.175,-3.664 9.202,-7.839 15.252,-7.839 6.22,0 8.775,3.152 8.946,9.202 0,1.618 -0.171,3.493 -0.426,5.538 l -3.067,21.897 c -0.171,1.363 -0.171,1.534 1.107,1.704 l 4.175,0.597 -0.852,6.305 H 394.07 z"
+ id="path283"
+ style="fill:url(#SVGID_16_)"
+ inkscape:connector-curvature="0" />
+ <linearGradient
+ id="SVGID_17_"
+ gradientUnits="userSpaceOnUse"
+ x1="435.17719"
+ y1="239.7637"
+ x2="435.17719"
+ y2="155.3275">
+ <stop
+ offset="0"
+ style="stop-color:#000000"
+ id="stop286" />
+ <stop
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0"
+ id="stop288" />
+ <a:midPointStop
+ offset="0"
+ style="stop-color:#000000" />
+ <a:midPointStop
+ offset="0.6933"
+ style="stop-color:#000000" />
+ <a:midPointStop
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0" />
+ </linearGradient>
+ <path
+ d="m 443.995,190.771 -0.17,-4.431 c 0,-0.682 -0.085,-1.108 -1.022,-1.363 -1.022,-0.256 -2.642,-0.427 -4.771,-0.427 -3.579,0 -6.391,1.108 -6.391,4.09 0,2.727 2.982,3.749 6.731,5.027 6.05,2.045 13.888,4.431 13.888,13.463 0,11.076 -9.372,15.592 -20.193,15.592 -8.009,0 -14.91,-1.959 -16.273,-2.981 l 1.618,-12.355 8.691,0.512 0.255,4.941 c 0,0.597 0.171,1.108 0.938,1.363 1.278,0.427 3.238,0.768 6.05,0.768 4.687,0 7.327,-1.79 7.327,-4.687 0,-3.408 -3.152,-4.175 -8.009,-5.624 -6.135,-1.874 -12.78,-4.26 -12.78,-13.206 0,-10.48 9.116,-14.996 19.597,-14.996 6.646,0 12.866,1.533 15.081,2.471 l -1.704,12.354 -8.863,-0.511 z"
+ id="path290"
+ style="fill:url(#SVGID_17_)"
+ inkscape:connector-curvature="0" />
+ <linearGradient
+ id="SVGID_18_"
+ gradientUnits="userSpaceOnUse"
+ x1="474.83691"
+ y1="239.7637"
+ x2="474.83691"
+ y2="155.3275">
+ <stop
+ offset="0"
+ style="stop-color:#000000"
+ id="stop293" />
+ <stop
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0"
+ id="stop295" />
+ <a:midPointStop
+ offset="0"
+ style="stop-color:#000000" />
+ <a:midPointStop
+ offset="0.6933"
+ style="stop-color:#000000" />
+ <a:midPointStop
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0" />
+ </linearGradient>
+ <path
+ d="m 489.748,218.548 c -4.175,2.386 -10.395,4.175 -16.444,4.175 -13.036,0 -18.575,-7.583 -18.575,-18.574 0,-18.83 11.588,-27.691 25.988,-27.691 6.475,0 11.843,1.874 14.229,3.578 l -1.874,13.377 -8.691,-0.426 -0.255,-5.794 c 0,-0.597 -0.086,-0.938 -0.597,-1.192 -1.022,-0.427 -2.557,-0.597 -4.175,-0.597 -5.624,0 -11.418,4.601 -11.418,17.382 0,7.839 3.493,10.395 8.436,10.395 4.346,0 8.436,-1.448 11.247,-2.556 l 2.129,7.923 z"
+ id="path297"
+ style="fill:url(#SVGID_18_)"
+ inkscape:connector-curvature="0" />
+ <linearGradient
+ id="SVGID_19_"
+ gradientUnits="userSpaceOnUse"
+ x1="512.28223"
+ y1="239.7637"
+ x2="512.28223"
+ y2="155.3277">
+ <stop
+ offset="0"
+ style="stop-color:#000000"
+ id="stop300" />
+ <stop
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0"
+ id="stop302" />
+ <a:midPointStop
+ offset="0"
+ style="stop-color:#000000" />
+ <a:midPointStop
+ offset="0.6933"
+ style="stop-color:#000000" />
+ <a:midPointStop
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0" />
+ </linearGradient>
+ <path
+ d="m 491.364,221.7 0.853,-6.39 3.919,-0.512 c 1.193,-0.17 1.363,-0.426 1.534,-1.704 l 3.578,-25.987 c 0.086,-0.938 -0.085,-1.534 -0.852,-1.789 l -4.261,-1.534 0.938,-6.476 h 16.87 l -1.107,7.669 0.256,0.17 c 3.323,-4.771 8.095,-8.69 13.548,-8.69 1.874,0 5.112,0.341 6.561,0.767 l -2.13,15.507 -9.969,-0.341 -0.256,-4.431 c -0.086,-0.767 -0.256,-1.022 -0.938,-1.022 -1.619,0 -4.26,1.96 -6.646,4.431 l -2.981,21.643 c -0.171,1.363 -0.085,1.619 1.192,1.704 l 8.095,0.682 -0.938,6.305 h -27.266 z"
+ id="path304"
+ style="fill:url(#SVGID_19_)"
+ inkscape:connector-curvature="0" />
+ <linearGradient
+ id="SVGID_20_"
+ gradientUnits="userSpaceOnUse"
+ x1="546.65918"
+ y1="239.7637"
+ x2="546.65918"
+ y2="155.32719">
+ <stop
+ offset="0"
+ style="stop-color:#000000"
+ id="stop307" />
+ <stop
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0"
+ id="stop309" />
+ <a:midPointStop
+ offset="0"
+ style="stop-color:#000000" />
+ <a:midPointStop
+ offset="0.6933"
+ style="stop-color:#000000" />
+ <a:midPointStop
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0" />
+ </linearGradient>
+ <path
+ d="m 536.094,221.7 -0.17,-0.426 2.045,-11.503 3.152,-22.749 c 0.17,-0.938 -0.086,-1.534 -0.853,-1.79 l -4.175,-1.448 0.852,-6.476 h 18.149 l -5.027,35.786 c -0.171,1.363 -0.085,1.534 1.192,1.704 l 4.09,0.597 -0.852,6.305 h -18.403 z m 5.879,-57.598 c 0,-5.453 3.238,-8.775 8.776,-8.775 4.175,0 6.646,2.215 6.646,6.305 0,5.368 -3.322,8.861 -8.861,8.861 -4.176,-0.001 -6.561,-2.387 -6.561,-6.391 z"
+ id="path311"
+ style="fill:url(#SVGID_20_)"
+ inkscape:connector-curvature="0" />
+ <linearGradient
+ id="SVGID_21_"
+ gradientUnits="userSpaceOnUse"
+ x1="580.69629"
+ y1="239.7637"
+ x2="580.69629"
+ y2="155.32719">
+ <stop
+ offset="0"
+ style="stop-color:#000000"
+ id="stop314" />
+ <stop
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0"
+ id="stop316" />
+ <a:midPointStop
+ offset="0"
+ style="stop-color:#000000" />
+ <a:midPointStop
+ offset="0.6933"
+ style="stop-color:#000000" />
+ <a:midPointStop
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0" />
+ </linearGradient>
+ <path
+ d="m 556.796,239.764 -0.17,-0.341 2.471,-14.229 5.282,-38.087 c 0.171,-1.022 -0.085,-1.534 -0.767,-1.789 l -4.175,-1.534 0.938,-6.476 h 17.041 l -1.022,6.816 0.255,0.085 c 5.027,-4.686 10.311,-7.753 15.678,-7.753 7.328,0 12.44,4.686 12.44,17.041 0,11.758 -4.601,29.225 -20.449,29.225 -5.538,0 -8.605,-2.13 -11.759,-4.345 l -1.874,12.78 c -0.085,0.938 0.085,1.278 1.192,1.363 l 8.606,0.853 -0.938,6.39 h -22.749 z m 17.041,-30.247 c 2.13,1.789 4.942,3.322 8.095,3.322 6.901,0 9.458,-9.713 9.458,-17.211 0,-5.027 -1.193,-8.351 -4.431,-8.351 -3.408,0 -7.754,3.664 -10.821,6.391 l -2.301,15.849 z"
+ id="path318"
+ style="fill:url(#SVGID_21_)"
+ inkscape:connector-curvature="0" />
+ <linearGradient
+ id="SVGID_22_"
+ gradientUnits="userSpaceOnUse"
+ x1="622.7832"
+ y1="239.7637"
+ x2="622.7832"
+ y2="155.3268">
+ <stop
+ offset="0"
+ style="stop-color:#000000"
+ id="stop321" />
+ <stop
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0"
+ id="stop323" />
+ <a:midPointStop
+ offset="0"
+ style="stop-color:#000000" />
+ <a:midPointStop
+ offset="0.6933"
+ style="stop-color:#000000" />
+ <a:midPointStop
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0" />
+ </linearGradient>
+ <path
+ d="m 635.777,219.4 c -3.749,1.789 -9.458,3.322 -14.229,3.322 -8.521,0 -12.099,-2.981 -12.099,-9.969 0,-1.107 0.085,-2.386 0.256,-3.749 l 3.066,-22.323 c 0.086,-0.512 0.086,-0.853 -0.511,-0.853 h -5.879 l 1.107,-7.839 c 7.242,-0.767 10.906,-4.431 13.122,-13.633 h 7.924 l -1.704,12.1 c -0.085,0.596 -0.085,0.852 0.597,0.852 h 11.758 l -1.193,8.521 h -12.439 l -2.812,20.364 c -0.171,1.107 -0.256,1.96 -0.256,2.727 0,2.982 1.278,4.26 4.942,4.26 2.385,0 4.771,-0.596 6.816,-1.363 l 1.534,7.583 z"
+ id="path325"
+ style="fill:url(#SVGID_22_)"
+ inkscape:connector-curvature="0" />
+ <linearGradient
+ id="SVGID_23_"
+ gradientUnits="userSpaceOnUse"
+ x1="655.6709"
+ y1="239.7637"
+ x2="655.6709"
+ y2="155.3275">
+ <stop
+ offset="0"
+ style="stop-color:#000000"
+ id="stop328" />
+ <stop
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0"
+ id="stop330" />
+ <a:midPointStop
+ offset="0"
+ style="stop-color:#000000" />
+ <a:midPointStop
+ offset="0.6933"
+ style="stop-color:#000000" />
+ <a:midPointStop
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0" />
+ </linearGradient>
+ <path
+ d="m 671.817,218.463 c -5.538,2.556 -11.588,4.26 -17.638,4.26 -13.377,0 -18.148,-7.839 -18.148,-18.148 0,-17.893 11.418,-28.117 25.307,-28.117 9.372,0 13.973,4.26 13.973,11.247 0,12.184 -12.865,15.763 -26.157,17.126 0.255,4.346 2.045,8.35 8.435,8.35 3.068,0 7.243,-0.937 12.355,-3.067 l 1.873,8.349 z m -8.094,-29.567 c 0,-2.045 -1.448,-3.237 -4.09,-3.237 -4.771,0 -8.69,4.175 -9.969,10.906 3.664,-0.511 14.059,-2.3 14.059,-7.669 z"
+ id="path332"
+ style="fill:url(#SVGID_23_)"
+ inkscape:connector-curvature="0" />
+ <linearGradient
+ id="SVGID_24_"
+ gradientUnits="userSpaceOnUse"
+ x1="697.92969"
+ y1="239.7637"
+ x2="697.92969"
+ y2="155.3277">
+ <stop
+ offset="0"
+ style="stop-color:#000000"
+ id="stop335" />
+ <stop
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0"
+ id="stop337" />
+ <a:midPointStop
+ offset="0"
+ style="stop-color:#000000" />
+ <a:midPointStop
+ offset="0.6933"
+ style="stop-color:#000000" />
+ <a:midPointStop
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0" />
+ </linearGradient>
+ <path
+ d="m 703.596,221.7 -0.17,-0.255 1.874,-10.396 2.471,-17.723 c 0.512,-3.578 0.341,-5.879 -2.215,-5.879 -3.664,0 -8.18,3.578 -11.077,6.135 l -2.641,19.512 c -0.171,1.363 -0.171,1.534 1.107,1.704 l 4.26,0.597 -0.852,6.305 h -23.347 l 0.853,-6.39 3.749,-0.512 c 1.107,-0.17 1.363,-0.426 1.533,-1.704 l 3.579,-25.987 c 0.17,-0.938 0,-1.534 -0.768,-1.789 l -4.175,-1.534 0.938,-6.476 h 16.87 l -0.937,6.987 0.255,0.085 c 4.771,-4.09 9.373,-7.924 16.02,-7.924 6.475,0 9.798,3.322 10.054,10.139 0,1.363 -0.085,3.067 -0.341,4.687 l -3.067,21.812 c -0.171,1.363 -0.171,1.534 1.022,1.704 l 4.26,0.597 L 722,221.7 h -18.404 z"
+ id="path339"
+ style="fill:url(#SVGID_24_)"
+ inkscape:connector-curvature="0" />
+ </g>
+</g>
+<g
+ id="g4141"
+ transform="matrix(0.81856441,0,0,0.81856441,79.234731,-94.128741)">
+ <g
+ id="g4143">
+
+
+
+
+
+
+
+
+
+
+ </g>
+ <g
+ id="g4165">
+ <linearGradient
+ y2="155.3275"
+ x2="324.1611"
+ y1="239.7637"
+ x1="324.1611"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient4167">
+ <stop
+ id="stop4169"
+ style="stop-color:#000000"
+ offset="0" />
+ <stop
+ id="stop4171"
+ style="stop-color:#000000;stop-opacity:0"
+ offset="1" />
+ <a:midPointStop
+ style="stop-color:#000000"
+ offset="0" />
+ <a:midPointStop
+ style="stop-color:#000000"
+ offset="0.6933" />
+ <a:midPointStop
+ style="stop-color:#000000;stop-opacity:0"
+ offset="1" />
+ </linearGradient>
+
+ <linearGradient
+ y2="155.3277"
+ x2="377.45459"
+ y1="239.7637"
+ x1="377.45459"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient4175">
+ <stop
+ id="stop4177"
+ style="stop-color:#000000"
+ offset="0" />
+ <stop
+ id="stop4179"
+ style="stop-color:#000000;stop-opacity:0"
+ offset="1" />
+ <a:midPointStop
+ style="stop-color:#000000"
+ offset="0" />
+ <a:midPointStop
+ style="stop-color:#000000"
+ offset="0.6933" />
+ <a:midPointStop
+ style="stop-color:#000000;stop-opacity:0"
+ offset="1" />
+ </linearGradient>
+
+ <linearGradient
+ y2="155.3275"
+ x2="435.17719"
+ y1="239.7637"
+ x1="435.17719"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient4183">
+ <stop
+ id="stop4185"
+ style="stop-color:#000000"
+ offset="0" />
+ <stop
+ id="stop4187"
+ style="stop-color:#000000;stop-opacity:0"
+ offset="1" />
+ <a:midPointStop
+ style="stop-color:#000000"
+ offset="0" />
+ <a:midPointStop
+ style="stop-color:#000000"
+ offset="0.6933" />
+ <a:midPointStop
+ style="stop-color:#000000;stop-opacity:0"
+ offset="1" />
+ </linearGradient>
+
+ <linearGradient
+ y2="155.3275"
+ x2="474.83691"
+ y1="239.7637"
+ x1="474.83691"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient4191">
+ <stop
+ id="stop4193"
+ style="stop-color:#000000"
+ offset="0" />
+ <stop
+ id="stop4195"
+ style="stop-color:#000000;stop-opacity:0"
+ offset="1" />
+ <a:midPointStop
+ style="stop-color:#000000"
+ offset="0" />
+ <a:midPointStop
+ style="stop-color:#000000"
+ offset="0.6933" />
+ <a:midPointStop
+ style="stop-color:#000000;stop-opacity:0"
+ offset="1" />
+ </linearGradient>
+
+ <linearGradient
+ y2="155.3277"
+ x2="512.28223"
+ y1="239.7637"
+ x1="512.28223"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient4199">
+ <stop
+ id="stop4201"
+ style="stop-color:#000000"
+ offset="0" />
+ <stop
+ id="stop4203"
+ style="stop-color:#000000;stop-opacity:0"
+ offset="1" />
+ <a:midPointStop
+ style="stop-color:#000000"
+ offset="0" />
+ <a:midPointStop
+ style="stop-color:#000000"
+ offset="0.6933" />
+ <a:midPointStop
+ style="stop-color:#000000;stop-opacity:0"
+ offset="1" />
+ </linearGradient>
+
+ <linearGradient
+ y2="155.32719"
+ x2="546.65918"
+ y1="239.7637"
+ x1="546.65918"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient4207">
+ <stop
+ id="stop4209"
+ style="stop-color:#000000"
+ offset="0" />
+ <stop
+ id="stop4211"
+ style="stop-color:#000000;stop-opacity:0"
+ offset="1" />
+ <a:midPointStop
+ style="stop-color:#000000"
+ offset="0" />
+ <a:midPointStop
+ style="stop-color:#000000"
+ offset="0.6933" />
+ <a:midPointStop
+ style="stop-color:#000000;stop-opacity:0"
+ offset="1" />
+ </linearGradient>
+
+ <linearGradient
+ y2="155.32719"
+ x2="580.69629"
+ y1="239.7637"
+ x1="580.69629"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient4215">
+ <stop
+ id="stop4217"
+ style="stop-color:#000000"
+ offset="0" />
+ <stop
+ id="stop4219"
+ style="stop-color:#000000;stop-opacity:0"
+ offset="1" />
+ <a:midPointStop
+ style="stop-color:#000000"
+ offset="0" />
+ <a:midPointStop
+ style="stop-color:#000000"
+ offset="0.6933" />
+ <a:midPointStop
+ style="stop-color:#000000;stop-opacity:0"
+ offset="1" />
+ </linearGradient>
+
+ <linearGradient
+ y2="155.3268"
+ x2="622.7832"
+ y1="239.7637"
+ x1="622.7832"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient4223">
+ <stop
+ id="stop4225"
+ style="stop-color:#000000"
+ offset="0" />
+ <stop
+ id="stop4227"
+ style="stop-color:#000000;stop-opacity:0"
+ offset="1" />
+ <a:midPointStop
+ style="stop-color:#000000"
+ offset="0" />
+ <a:midPointStop
+ style="stop-color:#000000"
+ offset="0.6933" />
+ <a:midPointStop
+ style="stop-color:#000000;stop-opacity:0"
+ offset="1" />
+ </linearGradient>
+
+ <linearGradient
+ y2="155.3275"
+ x2="655.6709"
+ y1="239.7637"
+ x1="655.6709"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient4231">
+ <stop
+ id="stop4233"
+ style="stop-color:#000000"
+ offset="0" />
+ <stop
+ id="stop4235"
+ style="stop-color:#000000;stop-opacity:0"
+ offset="1" />
+ <a:midPointStop
+ style="stop-color:#000000"
+ offset="0" />
+ <a:midPointStop
+ style="stop-color:#000000"
+ offset="0.6933" />
+ <a:midPointStop
+ style="stop-color:#000000;stop-opacity:0"
+ offset="1" />
+ </linearGradient>
+
+ <linearGradient
+ y2="155.3277"
+ x2="697.92969"
+ y1="239.7637"
+ x1="697.92969"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient4239">
+ <stop
+ id="stop4241"
+ style="stop-color:#000000"
+ offset="0" />
+ <stop
+ id="stop4243"
+ style="stop-color:#000000;stop-opacity:0"
+ offset="1" />
+ <a:midPointStop
+ style="stop-color:#000000"
+ offset="0" />
+ <a:midPointStop
+ style="stop-color:#000000"
+ offset="0.6933" />
+ <a:midPointStop
+ style="stop-color:#000000;stop-opacity:0"
+ offset="1" />
+ </linearGradient>
+
+ </g>
+</g></svg> \ No newline at end of file
diff --git a/docs/emscripten_switch_logo.eps b/docs/emscripten_switch_logo.eps
deleted file mode 100644
index 741970c1..00000000
--- a/docs/emscripten_switch_logo.eps
+++ /dev/null
Binary files differ
diff --git a/docs/emscripten_switch_logo.jpg b/docs/emscripten_switch_logo.jpg
deleted file mode 100644
index 7c05cd94..00000000
--- a/docs/emscripten_switch_logo.jpg
+++ /dev/null
Binary files differ
diff --git a/emcc b/emcc
index 2c3033aa..c8e1814b 100755
--- a/emcc
+++ b/emcc
@@ -47,10 +47,10 @@ emcc can be influenced by a few environment variables:
EMMAKEN_COMPILER - The compiler to be used, if you don't want the default clang.
'''
-import os, sys, shutil, tempfile, subprocess, shlex, time, re, logging, json
-from subprocess import PIPE, STDOUT
+import os, sys, shutil, tempfile, subprocess, shlex, time, re, logging
+from subprocess import PIPE
from tools import shared, jsrun, system_libs
-from tools.shared import Compression, execute, suffix, unsuffixed, unsuffixed_basename, WINDOWS
+from tools.shared import Compression, execute, suffix, unsuffixed, unsuffixed_basename, WINDOWS, safe_move
from tools.response_file import read_response_file
# endings = dot + a suffix, safe to test by filename.endswith(endings)
@@ -95,7 +95,7 @@ AUTODEBUG = os.environ.get('EMCC_AUTODEBUG') # If set to 1, we will run the auto
# dlmalloc makes it hard to compare native and js builds
EMCC_CFLAGS = os.environ.get('EMCC_CFLAGS') # Additional compiler flags that we treat as if they were passed to us on the commandline
-logging.debug('invocation: ' + ' '.join(sys.argv) + (' + ' + EMCC_CFLAGS if EMCC_CFLAGS else ''))
+if DEBUG: logging.warning('invocation: ' + ' '.join(sys.argv) + (' + ' + EMCC_CFLAGS if EMCC_CFLAGS else '') + ' (in ' + os.getcwd() + ')')
if EMCC_CFLAGS: sys.argv.append(EMCC_CFLAGS)
if DEBUG and LEAVE_INPUTS_RAW: logging.warning('leaving inputs raw')
@@ -161,9 +161,17 @@ Options that are modified or new in %s include:
time in return for the smallest and fastest
output.
- -O3 As -O2, plus additional optimizations that can
+ -Os Like -O2 with extra optimizations for size.
+
+ -Oz Like -Os but reduces code size further.
+
+ -O3 Like -O2 plus additional JS optimizations that can
take a significant amount of compilation time and/or
- are relatively new.
+ are relatively new. Note that differs from -O2 only
+ during the bitcode to JS (final link + JS generation)
+ stage, as it is JS-specific, so you can run -Os
+ on your source files for example, and -O3 during
+ JS generation if you want.
For tips on optimizing your code, see
https://github.com/kripken/emscripten/wiki/Optimizing-Code
@@ -227,6 +235,21 @@ Options that are modified or new in %s include:
slower because JS optimization will be
limited to 1 core. (default in -O0)
+ -profiling Use reasonable defaults when emitting JS to
+ make the build useful for profiling. This
+ sets -g2 (preserve function names) and may
+ also enable optimizations that affect
+ performance and otherwise might not be
+ performed in -g2.
+
+ --emit-symbol-map Save a map file between the minified
+ global names and the original function names.
+ This allows you to reconstruct meaningful
+ stack traces, for example. (This is only
+ relevant when minifying global names, which
+ happens in -O2 and above, and when no -g
+ option to prevent minification was specified.)
+
--typed-arrays <mode> 0: No typed arrays
1: Parallel typed arrays
2: Shared (C-like) typed arrays (default)
@@ -330,7 +353,7 @@ Options that are modified or new in %s include:
For more docs on the options --preload-file
accepts, see https://github.com/kripken/emscripten/wiki/Filesystem-Guide
- --exclude-file <name> Files and directories to be excluded from
+ --exclude-file <name> Files and directories to be excluded from
--embed-file and --preload-file
wildcard is supported
@@ -423,60 +446,17 @@ Options that are modified or new in %s include:
-v Turns on verbose output. This will pass
-v to Clang, and also enable EMCC_DEBUG
- to details emcc's operations
-
- --jcache Use a JavaScript cache. This is disabled by
- default. When enabled, emcc will store the
- results of compilation in a cache and check
- the cache when compiling later, something
- like what ccache does. This allows incremental
- builds - where you are compiling a large
- program but only modified a small part of it -
- to be much faster (at the cost of more disk
- IO for cache accesses). Note that you need
- to enable --jcache for both loading and saving
- of data, so you must enable it on a full build
- for a later incremental build (where you also
- enable it) to be sped up.
-
- Caching works separately on 4 parts of compilation:
- 'pre' which is types and global variables; that
- information is then fed into 'funcs' which are
- the functions (which we parallelize), and then
- 'post' which adds final information based on
- the functions (e.g., do we need long64 support
- code). Finally, 'jsfuncs' are JavaScript-level
- optimizations. Each of the 4 parts can be cached
- separately, but note that they can affect each
- other: If you recompile a single C++ file that
- changes a global variable - e.g., adds, removes
- or modifies a global variable, say by adding
- a printf or by adding a compile-time timestamp,
- then 'pre' cannot be loaded from the cache. And
- since 'pre's output is sent to 'funcs' and 'post',
- they will get invalidated as well, and only
- 'jsfuncs' will be cached. So avoid modifying
- globals to let caching work fully.
-
- To work around the problem mentioned in the
- previous paragraph, you can use
-
- emscripten_jcache_printf
-
- when adding debug printfs to your code. That
- function is specially preprocessed so that it
- does not create a constant string global for
- its first argument. See emscripten.h for more
- details. Note in particular that you need to
- already have a call to that function in your
- code *before* you add one and do an incremental
- build, so that adding an external reference
- (also a global property) does not invalidate
- everything.
-
- Note that you should use -g during the linking
- stage (bitcode to JS), for jcache to work
- (otherwise, JS minification can confuse it).
+ to details emcc's operations.
+
+ It will also run emscripten's internal sanity
+ checks, checking that things like the LLVM directory
+ path looks correct, etc. This works with or
+ without other arguments, so it can be useful to run
+
+ emcc -v
+
+ if you see odd errors, as it can help diagnose
+ things.
--clear-cache Manually clears the cache of compiled
emscripten system libraries (libc++,
@@ -505,7 +485,16 @@ Options that are modified or new in %s include:
1: Emit a separate memory initialization file
in binary format. This is more efficient than
storing it as text inside JavaScript, but does
- mean you have another file to publish.
+ mean you have another file to publish. The
+ binary file will also be loaded asynchronously,
+ which means main() will not be called until
+ the file is downloaded and applied; you cannot
+ call any C functions until it arrives. (Call
+ yourself from main() to know when all async
+ stuff has happened and it is safe to call
+ library functions, as main() will only be
+ called at that time. You can also call
+ addOnPreMain from a preRun.)
-Wno-warn-absolute-paths If not specified, the compiler will warn about any
uses of absolute paths in -I and -L command line
@@ -530,9 +519,11 @@ Options that are modified or new in %s include:
--default-obj-ext .ext Specifies the file suffix to generate if the location
of a directory name is passed to -o directive, e.g.
emcc -c a.c -o dir/
- will by default generate an output name 'dir/a.o',
+ will by default generate an output name 'dir/a.o',
but this cmdline param can be passed to generate a
- file with a custom suffix 'dir/a.ext'.
+ file with a custom suffix 'dir/a.ext'.
+ --valid_abspath path Whitelist an absolute path to prevent warnings about
+ absolute include paths.
The target file, if specified (-o <target>), defines what will
be generated:
@@ -573,17 +564,19 @@ elif sys.argv[1] == '--version':
finally:
os.chdir(here)
print '''emcc (Emscripten GCC-like replacement) %s (%s)
-Copyright (C) 2013 the Emscripten authors (see AUTHORS.txt)
+Copyright (C) 2014 the Emscripten authors (see AUTHORS.txt)
This is free and open source software under the MIT license.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
''' % (shared.EMSCRIPTEN_VERSION, revision)
- exit(0)
+ exit(0)
elif len(sys.argv) == 2 and sys.argv[1] == '-v': # -v with no inputs
print 'emcc (Emscripten GCC-like replacement + linker emulating GNU ld ) %s' % shared.EMSCRIPTEN_VERSION
- exit(subprocess.call([shared.CLANG, '-v']))
+ code = subprocess.call([shared.CLANG, '-v'])
+ shared.check_sanity(force=True)
+ exit(code)
-def is_minus_s_for_emcc(newargs,i):
+def is_minus_s_for_emcc(newargs, i):
assert newargs[i] == '-s'
if i+1 < len(newargs) and '=' in newargs[i+1]: # -s OPT=VALUE is for us, -s by itself is a linker option
return True
@@ -644,7 +637,7 @@ if CONFIGURE_CONFIG or CMAKE_CONFIG:
idx += 1
cmd = [compiler] + list(filter_emscripten_options(sys.argv[1:]))
- if not use_js: cmd += shared.EMSDK_OPTS + ['-DEMSCRIPTEN']
+ if not use_js: cmd += shared.EMSDK_OPTS + ['-D__EMSCRIPTEN__', '-DEMSCRIPTEN']
if use_js: cmd += ['-s', 'ERROR_ON_UNDEFINED_SYMBOLS=1'] # configure tests should fail when an undefined symbol exists
logging.debug('just configuring: ' + ' '.join(cmd))
@@ -766,6 +759,15 @@ else:
def in_temp(name):
return os.path.join(temp_dir, os.path.basename(name))
+def in_directory(root, child):
+ # make both path absolute
+ root = os.path.realpath(root)
+ child = os.path.realpath(child)
+
+ # return true, if the common prefix of both is equal to directory
+ # e.g. /a/b/c/d.rst and directory is /a/b, the common prefix is /a/b
+ return os.path.commonprefix([root, child]) == root
+
# Parses the essential suffix of a filename, discarding Unix-style version numbers in the name. For example for 'libz.so.1.2.8' returns '.so'
def filename_type_suffix(filename):
for i in reversed(filename.split('.')[1:]):
@@ -782,7 +784,7 @@ log_time_last = time.time()
def log_time(name):
global log_time_last
now = time.time()
- logging.debug('emcc step "%s" took %.2f seconds' % (name, now - log_time_last))
+ logging.debug('emcc step "%s" took %.2f seconds', name, now - log_time_last)
log_time_last = now
try:
@@ -794,6 +796,8 @@ try:
opt_level = 0
debug_level = 0
+ profiling = False
+ emit_symbol_map = False
js_opts = None
llvm_opts = None
llvm_lto = None
@@ -818,6 +822,14 @@ try:
no_heap_copy = False
proxy_to_worker = False
default_object_extension = '.o'
+ valid_abspaths = []
+
+ def is_valid_abspath(path_name):
+ for valid_abspath in valid_abspaths:
+ if in_directory(valid_abspath, path_name):
+ return True
+ return False
+
if use_cxx:
default_cxx_std = '-std=c++03' # Enforce a consistent C++ standard when compiling .cpp files, if user does not specify one on the cmdline.
@@ -851,14 +863,19 @@ try:
# Let -O default to -O2, which is what gcc does.
requested_level = newargs[i][2:] or '2'
if requested_level == 's':
+ llvm_opts = ['-Os']
requested_level = 2
settings_changes.append('INLINING_LIMIT=50')
+ elif requested_level == 'z':
+ llvm_opts = ['-Oz']
+ requested_level = 2
+ settings_changes.append('INLINING_LIMIT=25')
opt_level = validate_arg_level(requested_level, 3, 'Invalid optimization level: ' + newargs[i])
# We leave the -O option in place so that the clang front-end runs in that
# optimization mode, but we disable the actual optimization passes, as we'll
# run them seperately.
newargs.append('-mllvm')
- newargs.append('-disable-llvm-optzns');
+ newargs.append('-disable-llvm-optzns')
elif newargs[i].startswith('--js-opts'):
check_bad_eq(newargs[i])
js_opts = eval(newargs[i+1])
@@ -909,6 +926,13 @@ try:
requested_level = newargs[i][2:] or '3'
debug_level = validate_arg_level(requested_level, 4, 'Invalid debug level: ' + newargs[i])
newargs[i] = '-g' # we'll need this to get LLVM debug info
+ elif newargs[i] == '-profiling':
+ debug_level = 2
+ profiling = True
+ newargs[i] = ''
+ elif newargs[i] == '--emit-symbol-map':
+ emit_symbol_map = True
+ newargs[i] = ''
elif newargs[i] == '--bind':
bind = True
newargs[i] = ''
@@ -969,8 +993,9 @@ try:
# swap in debug logging
DEBUG = 1
shared.set_logging()
- logging.debug('invocation: ' + ' '.join(sys.argv))
+ logging.debug('-v invocation: ' + ' '.join(sys.argv))
shared.apply_configuration() # reset config to pick up change
+ shared.check_sanity(force=True)
newargs[i] = ''
elif newargs[i].startswith('--shell-file'):
check_bad_eq(newargs[i])
@@ -983,15 +1008,17 @@ try:
newargs[i] = ''
newargs[i+1] = ''
elif newargs[i] == '--remove-duplicates':
- logging.warning ('--remove-duplicates is deprecated as it is no longer needed. If you cannot link without it, file a bug with a testcase')
+ logging.warning('--remove-duplicates is deprecated as it is no longer needed. If you cannot link without it, file a bug with a testcase')
newargs[i] = ''
elif newargs[i] == '--jcache':
+ logging.warning('jcache is deprecated')
jcache = True
newargs[i] = ''
elif newargs[i] == '--clear-cache':
newargs[i] = ''
logging.warning('clearing cache')
shared.Cache.erase()
+ shared.check_sanity(force=True) # this is a good time for a sanity check
sys.exit(0)
elif newargs[i] == '--save-bc':
check_bad_eq(newargs[i])
@@ -1006,10 +1033,14 @@ try:
elif newargs[i] == '--proxy-to-worker':
proxy_to_worker = True
newargs[i] = ''
+ elif newargs[i] == '--valid-abspath':
+ valid_abspaths.append(newargs[i+1])
+ newargs[i] = ''
+ newargs[i+1] = ''
elif newargs[i].startswith(('-I', '-L')):
path_name = newargs[i][2:]
- if not absolute_warning_shown and os.path.isabs(path_name):
- logging.warning ('-I or -L of an absolute path "' + newargs[i] + '" encountered. If this is to a local system header/library, it may cause problems (local system files make sense for compiling natively on your system, but not necessarily to JavaScript). Pass \'-Wno-warn-absolute-paths\' to emcc to hide this warning.') # Of course an absolute path to a non-system-specific library or header is fine, and you can ignore this warning. The danger are system headers that are e.g. x86 specific and nonportable. The emscripten bundled headers are modified to be portable, local system ones are generally not
+ if not absolute_warning_shown and os.path.isabs(path_name) and not is_valid_abspath(path_name):
+ logging.warning('-I or -L of an absolute path "' + newargs[i] + '" encountered. If this is to a local system header/library, it may cause problems (local system files make sense for compiling natively on your system, but not necessarily to JavaScript). Pass \'-Wno-warn-absolute-paths\' to emcc to hide this warning.') # Of course an absolute path to a non-system-specific library or header is fine, and you can ignore this warning. The danger are system headers that are e.g. x86 specific and nonportable. The emscripten bundled headers are modified to be portable, local system ones are generally not
absolute_warning_shown = True
elif newargs[i] == '--emrun':
emrun = True
@@ -1025,7 +1056,7 @@ try:
default_object_extension = '.' + default_object_extension
newargs[i+1] = ''
- newargs = [ arg for arg in newargs if arg is not '' ]
+ newargs = [arg for arg in newargs if arg is not '']
# If user did not specify a default -std for C++ code, specify the emscripten default.
if default_cxx_std:
@@ -1050,9 +1081,6 @@ try:
if DEBUG: start_time = time.time() # done after parsing arguments, which might affect debug state
- if closure:
- assert os.path.exists(shared.CLOSURE_COMPILER), logging.error('fatal: Closure compiler (%s) does not exist' % shared.CLOSURE_COMPILER)
-
for i in range(len(newargs)):
if newargs[i] == '-s':
if is_minus_s_for_emcc(newargs, i):
@@ -1063,7 +1091,7 @@ try:
settings_changes.append('USE_TYPED_ARRAYS=' + newargs[i+1])
newargs[i] = ''
newargs[i+1] = ''
- newargs = [ arg for arg in newargs if arg is not '' ]
+ newargs = [arg for arg in newargs if arg is not '']
if split_js_file:
settings_changes.append("PRINT_SPLIT_FILE_MARKER=1")
@@ -1084,12 +1112,12 @@ try:
prev = newargs[i-1]
if prev in ['-MT', '-MF', '-MQ', '-D', '-U', '-o', '-x', '-Xpreprocessor', '-include', '-imacros', '-idirafter', '-iprefix', '-iwithprefix', '-iwithprefixbefore', '-isysroot', '-imultilib', '-A', '-isystem', '-iquote', '-install_name', '-compatibility_version', '-current_version', '-I', '-L']: continue # ignore this gcc-style argument
- if (os.path.islink(arg) and os.path.realpath(arg).endswith(SOURCE_ENDINGS + BITCODE_ENDINGS + DYNAMICLIB_ENDINGS + ASSEMBLY_ENDINGS + HEADER_ENDINGS)):
+ if os.path.islink(arg) and os.path.realpath(arg).endswith(SOURCE_ENDINGS + BITCODE_ENDINGS + DYNAMICLIB_ENDINGS + ASSEMBLY_ENDINGS + HEADER_ENDINGS):
arg = os.path.realpath(arg)
if not arg.startswith('-'):
if not os.path.exists(arg):
- logging.error('%s: No such file or directory ("%s" was expected to be an input file, based on the commandline arguments provided)' % (arg, arg))
+ logging.error('%s: No such file or directory ("%s" was expected to be an input file, based on the commandline arguments provided)', arg, arg)
exit(1)
arg_ending = filename_type_ending(arg)
@@ -1134,7 +1162,7 @@ try:
original_input_files = input_files[:]
- newargs = [ arg for arg in newargs if arg is not '' ]
+ newargs = [arg for arg in newargs if arg is not '']
# -c means do not link in gcc, and for us, the parallel is to not go all the way to JS, but stop at bitcode
has_dash_c = '-c' in newargs
@@ -1142,10 +1170,11 @@ try:
assert has_source_inputs or has_header_inputs, 'Must have source code or header inputs to use -c'
target = target_basename + '.o'
final_suffix = 'o'
+ final_ending = ('.' + final_suffix) if len(final_suffix) > 0 else ''
# Find library files
for lib in libs:
- logging.debug('looking for library "%s"' % lib)
+ logging.debug('looking for library "%s"', lib)
found = False
for prefix in LIB_PREFIXES:
for suff in STATICLIB_ENDINGS + DYNAMICLIB_ENDINGS:
@@ -1153,24 +1182,24 @@ try:
for lib_dir in lib_dirs:
path = os.path.join(lib_dir, name)
if os.path.exists(path):
- logging.debug('found library "%s" at %s' % (lib, path))
+ logging.debug('found library "%s" at %s', lib, path)
input_files.append(path)
found = True
break
if found: break
if found: break
- if not found: logging.warning('emcc: cannot find library "%s"' % lib)
+ if not found: logging.warning('emcc: cannot find library "%s"', lib)
# If not compiling to JS, then we are compiling to an intermediate bitcode objects or library, so
# ignore dynamic linking, since multiple dynamic linkings can interfere with each other
if not filename_type_suffix(target) in JS_CONTAINING_SUFFIXES or ignore_dynamic_linking:
def check(input_file):
if filename_type_ending(input_file) in DYNAMICLIB_ENDINGS:
- if not ignore_dynamic_linking: logging.warning('ignoring dynamic library %s because not compiling to JS or HTML, remember to link it when compiling to JS or HTML at the end' % os.path.basename(input_file))
+ if not ignore_dynamic_linking: logging.warning('ignoring dynamic library %s because not compiling to JS or HTML, remember to link it when compiling to JS or HTML at the end', os.path.basename(input_file))
return False
else:
return True
- input_files = filter(lambda input_file: check(input_file), input_files)
+ input_files = [input_file for input_file in input_files if check(input_file)]
if len(input_files) == 0:
logging.error('no input files\nnote that input files without a known suffix are ignored, make sure your input files end with one of: ' + str(SOURCE_ENDINGS + BITCODE_ENDINGS + DYNAMICLIB_ENDINGS + STATICLIB_ENDINGS + ASSEMBLY_ENDINGS + HEADER_ENDINGS))
@@ -1200,29 +1229,41 @@ try:
logging.warning('disabling asm.js since embind is not ready for it yet')
shared.Settings.ASM_JS = 0
- fastcomp = os.environ.get('EMCC_FAST_COMPILER') == '1'
+ fastcomp = os.environ.get('EMCC_FAST_COMPILER') != '0'
if fastcomp:
shared.Settings.ASM_JS = 1 if opt_level > 0 else 2
- assert shared.Settings.UNALIGNED_MEMORY == 0, 'forced unaligned memory not supported in fastcomp'
- assert shared.Settings.CHECK_HEAP_ALIGN == 0, 'check heap align not supported in fastcomp yet'
- assert shared.Settings.SAFE_DYNCALLS == 0, 'safe dyncalls 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.EXECUTION_TIMEOUT == -1, 'execution timeout not supported in fastcomp'
- assert shared.Settings.NAMED_GLOBALS == 0, 'named globals not supported in fastcomp'
- assert shared.Settings.PGO == 0, 'pgo not supported in fastcomp'
- assert shared.Settings.TARGET_LE32 == 1, 'fastcomp requires le32'
- assert shared.Settings.USE_TYPED_ARRAYS == 2, 'fastcomp assumes ta2'
- assert not split_js_file, '--split-js is deprecated and not supported in fastcomp'
- assert not bind, 'embind not supported in fastcomp yet'
- assert shared.Settings.MAX_SETJMPS == 20, 'changing MAX_SETJMPS is not supported in fastcomp yet'
- assert shared.Settings.INIT_HEAP == 0, 'HEAP_INIT is not supported in fastcomp (and should never be needed except for debugging)'
+ try:
+ assert shared.Settings.UNALIGNED_MEMORY == 0, 'forced unaligned memory not supported in fastcomp'
+ assert shared.Settings.CHECK_HEAP_ALIGN == 0, 'check heap align not supported in fastcomp - use SAFE_HEAP instead'
+ assert shared.Settings.SAFE_DYNCALLS == 0, 'safe dyncalls 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.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_ASMJS_UNKNOWN_EMSCRIPTEN == 1, 'fastcomp requires asmjs-unknown-emscripten'
+ assert shared.Settings.USE_TYPED_ARRAYS == 2, 'fastcomp assumes ta2'
+ assert not split_js_file, '--split-js is deprecated and not supported in fastcomp'
+ assert not bind, 'embind not supported in fastcomp yet'
+ assert shared.Settings.MAX_SETJMPS == 20, 'changing MAX_SETJMPS is not supported in fastcomp yet'
+ assert shared.Settings.INIT_HEAP == 0, 'HEAP_INIT is not supported in fastcomp (and should never be needed except for debugging)'
+ assert not shared.Settings.RUNTIME_TYPE_INFO, 'RUNTIME_TYPE_INFO is not supported in fastcomp'
+ assert not shared.Settings.CORRUPTION_CHECK, 'CORRUPTION_CHECK is not supported in asm.js mode, which is what fastcomp can emit (you can use non-asm.js mode in non-fastcomp)'
+ except Exception, e:
+ logging.error('Compiler settings are incompatible with fastcomp. You can fall back to the older compiler core, although that is not recommended, see https://github.com/kripken/emscripten/wiki/LLVM-Backend')
+ raise e
+
if jcache:
- logging.warning('jcache is not supported in fastcomp (you should not need it anyhow), disabling')
+ logging.warning('jcache is deprecated and not supported in fastcomp (you should not need it anyhow), disabling')
jcache = False
- fastcomp_opts = ['-pnacl-abi-simplify-preopt', '-pnacl-abi-simplify-postopt']
+ pre_fastcomp_opts = []
+ fastcomp_opts = []
+ if shared.Settings.NO_EXIT_RUNTIME:
+ pre_fastcomp_opts += ['-emscripten-no-exit-runtime']
+ if not llvm_lto: fastcomp_opts += ['-globalopt', '-globaldce']
+ fastcomp_opts += ['-pnacl-abi-simplify-preopt', '-pnacl-abi-simplify-postopt']
if shared.Settings.DISABLE_EXCEPTION_CATCHING != 1:
fastcomp_opts += ['-enable-emscripten-cxx-exceptions']
if len(shared.Settings.EXCEPTION_CATCHING_WHITELIST) > 0:
@@ -1256,13 +1297,19 @@ try:
logging.warning('disabling closure because debug info was requested')
closure = False
+ if closure:
+ shared.Settings.CLOSURE_COMPILER = 1
+ assert os.path.exists(shared.CLOSURE_COMPILER), logging.error('fatal: Closure compiler (%s) does not exist', shared.CLOSURE_COMPILER)
+
assert shared.LLVM_TARGET in shared.COMPILER_OPTS
if shared.LLVM_TARGET == 'i386-pc-linux-gnu':
shared.Settings.TARGET_X86 = 1
- shared.Settings.TARGET_LE32 = 0
- assert 'le32-unknown-nacl' not in shared.COMPILER_OPTS
- elif shared.LLVM_TARGET == 'le32-unknown-nacl':
- shared.Settings.TARGET_LE32 = 1
+ shared.Settings.TARGET_ASMJS_UNKNOWN_EMSCRIPTEN = 0
+ assert 'asmjs-unknown-emscripten' not in shared.COMPILER_OPTS
+ elif shared.LLVM_TARGET == 'asmjs-unknown-emscripten' or \
+ shared.LLVM_TARGET == 'le32-unknown-nacl':
+ # For temporary compatibility, treat 'le32-unknown-nacl' as 'asmjs-unknown-emscripten'.
+ shared.Settings.TARGET_ASMJS_UNKNOWN_EMSCRIPTEN = 1
shared.Settings.TARGET_X86 = 0
assert 'i386-pc-linux-gnu' not in shared.COMPILER_OPTS
else:
@@ -1284,7 +1331,7 @@ try:
shared.Settings.LINKABLE = 1 # TODO: add FORCE_DCE option for the brave people that do want to dce here and in side modules
debug_level = max(debug_level, 2)
- if shared.Settings.ASSERTIONS and shared.Settings.ALIASING_FUNCTION_POINTERS:
+ if not fastcomp and shared.Settings.ASSERTIONS and shared.Settings.ALIASING_FUNCTION_POINTERS:
logging.warning('ALIASING_FUNCTION_POINTERS is on, function pointer comparisons may be invalid across types')
if shared.Settings.STB_IMAGE and final_suffix in JS_CONTAINING_SUFFIXES:
@@ -1329,13 +1376,25 @@ try:
execute([call] + args) # let compiler frontend print directly, so colors are saved (PIPE kills that)
sys.exit(1)
+ def get_bitcode_file(input_file):
+ if final_suffix not in JS_CONTAINING_SUFFIXES:
+ # no need for a temp file, just emit to the right place
+ if len(input_files) == 1:
+ # can just emit directly to the target
+ if specified_target:
+ if specified_target.endswith('/') or specified_target.endswith('\\') or os.path.isdir(specified_target):
+ return os.path.join(specified_target, os.path.basename(unsuffixed(input_file))) + default_object_extension
+ return specified_target
+ return unsuffixed(input_file) + final_ending
+ return unsuffixed(input_file) + default_object_extension
+ return in_temp(unsuffixed(uniquename(input_file)) + default_object_extension)
+
# First, generate LLVM bitcode. For each input file, we get base.o with bitcode
for input_file in input_files:
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')
+ output_file = get_bitcode_file(input_file)
temp_files.append(output_file)
args = newargs + ['-emit-llvm', '-c', input_file, '-o', output_file]
if file_ending.endswith(CXX_ENDINGS):
@@ -1358,8 +1417,6 @@ try:
temp_files.append(temp_file)
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
logging.debug('assembling assembly file: ' + input_file)
temp_file = in_temp(unsuffixed(uniquename(input_file)) + '.o')
shared.Building.llvm_as(input_file, temp_file)
@@ -1379,33 +1436,25 @@ try:
file_ending = filename_type_ending(input_file)
if file_ending.endswith(SOURCE_ENDINGS):
temp_file = temp_files[i]
- logging.debug('optimizing %s with -O%s' % (input_file, llvm_opts))
+ logging.debug('optimizing %s', input_file)
+ #if DEBUG: shutil.copyfile(temp_file, os.path.join(TEMP_DIR, 'to_opt.bc') # useful when LLVM opt aborts
shared.Building.llvm_opt(temp_file, llvm_opts)
# If we were just asked to generate bitcode, stop there
if final_suffix not in JS_CONTAINING_SUFFIXES:
if not specified_target:
for input_file in input_files:
- shutil.move(in_temp(unsuffixed(uniquename(input_file)) + '.o'), unsuffixed_basename(input_file) + '.' + final_suffix)
+ safe_move(get_bitcode_file(input_file), unsuffixed_basename(input_file) + final_ending)
else:
if len(input_files) == 1:
- temp_output_base = in_temp(unsuffixed(uniquename(input_files[0])))
- if specified_target.endswith('/') or specified_target.endswith('\\') or os.path.isdir(specified_target): # User passed '-o <directory' as the location to output to.
- obj_output_name = os.path.join(specified_target, os.path.splitext(os.path.basename(input_file))[0] + default_object_extension)
- logging.debug('User specified -o <directoryname> as the location of the output. Generating output file ' + obj_output_name)
- try:
- shutil.move(temp_output_base + '.o', obj_output_name)
- except IOError, e:
- logging.error('Could not write to output file ' + obj_output_name + '. Perhaps the output directory does not exist?')
- exit(1)
- else: # User passed '-o <filename>' as the location to output to.
- shutil.move(temp_output_base + '.o', specified_target)
+ safe_move(temp_files[0], specified_target if specified_target else unsuffixed_basename(input_file) + final_ending)
+ temp_output_base = unsuffixed(temp_files[0])
if os.path.exists(temp_output_base + '.d'):
# There was a .d file generated, from -MD or -MMD and friends, save a copy of it to where the output resides,
# adjusting the target name away from the temporary file name to the specified target.
# It will be deleted with the rest of the temporary directory.
deps = open(temp_output_base + '.d').read()
- deps = deps.replace(temp_output_base + '.o', specified_target)
+ deps = deps.replace(temp_output_base + default_object_extension, specified_target)
with open(os.path.join(os.path.dirname(specified_target), os.path.basename(unsuffixed(input_files[0]) + '.d')), "w") as out_dep:
out_dep.write(deps)
else:
@@ -1414,9 +1463,10 @@ try:
# we have multiple files: Link them
logging.debug('link: ' + str(temp_files) + specified_target)
shared.Building.link(temp_files, specified_target)
+ logging.debug('stopping at bitcode')
exit(0)
- log_time('bitcodeize inputs')
+ log_time('process inputs')
## Continue on to create JavaScript
@@ -1436,7 +1486,7 @@ try:
(not LEAVE_INPUTS_RAW and not (suffix(temp_files[0]) in BITCODE_ENDINGS or suffix(temp_files[0]) in DYNAMICLIB_ENDINGS) and shared.Building.is_ar(temp_files[0])):
linker_inputs = temp_files + extra_files_to_link
logging.debug('linking: ' + str(linker_inputs))
- shared.Building.link(linker_inputs, in_temp(target_basename + '.bc'), force_archive_contents = len(filter(lambda temp: not temp.endswith(STATICLIB_ENDINGS), temp_files)) == 0)
+ shared.Building.link(linker_inputs, in_temp(target_basename + '.bc'), force_archive_contents=len([temp for temp in temp_files if not temp.endswith(STATICLIB_ENDINGS)]) == 0)
final = in_temp(target_basename + '.bc')
else:
if not LEAVE_INPUTS_RAW:
@@ -1449,7 +1499,7 @@ try:
log_time('link')
if DEBUG:
- logging.debug('saving intermediate processing steps to %s' % shared.EMSCRIPTEN_TEMP_DIR)
+ logging.debug('saving intermediate processing steps to %s', shared.EMSCRIPTEN_TEMP_DIR)
intermediate_counter = 0
def save_intermediate(name=None, suffix='js'):
@@ -1486,7 +1536,7 @@ try:
else:
if fastcomp and not save_bc:
# Simplify LLVM bitcode for fastcomp
- link_opts += fastcomp_opts
+ link_opts = pre_fastcomp_opts + link_opts + fastcomp_opts
shared.Building.llvm_opt(final, link_opts)
if DEBUG: save_intermediate('linktime', 'bc')
if save_bc:
@@ -1498,7 +1548,7 @@ try:
# Prepare .ll for Emscripten
if not LEAVE_INPUTS_RAW:
- if save_bc:
+ if save_bc and not fastcomp:
final = shared.Building.llvm_dis(final, final + '.ll')
else:
assert len(input_files) == 1
@@ -1573,7 +1623,7 @@ try:
shutil.copyfile(final, final + '.tr.js')
final += '.tr.js'
posix = True if not shared.WINDOWS else False
- logging.debug('applying transform: %s' % js_transform)
+ logging.debug('applying transform: %s', js_transform)
subprocess.check_call(shlex.split(js_transform, posix=posix) + [os.path.abspath(final)])
if DEBUG: save_intermediate('transformed')
@@ -1603,7 +1653,7 @@ try:
if DEBUG:
if os.path.exists(memfile):
save_intermediate('meminit')
- logging.debug('wrote memory initialization to %s' % memfile)
+ logging.debug('wrote memory initialization to %s', memfile)
else:
logging.debug('did not see memory initialization')
elif shared.Settings.USE_TYPED_ARRAYS == 2 and not shared.Settings.MAIN_MODULE and not shared.Settings.SIDE_MODULE:
@@ -1677,6 +1727,10 @@ try:
js_optimizer_queue += ['simplifyExpressions']
+ # simplify ifs if it is ok to make the code somewhat unreadable, and unless outlining (simplified ifs
+ # with commaified code breaks late aggressive variable elimination)
+ if shared.Settings.SIMPLIFY_IFS and (debug_level == 0 or profiling) and shared.Settings.OUTLINING_LIMIT == 0: js_optimizer_queue += ['simplifyIfs']
+
if opt_level >= 3 and shared.Settings.PRECISE_F32: js_optimizer_queue += ['optimizeFrounds']
if closure and not shared.Settings.ASM_JS:
@@ -1702,10 +1756,12 @@ try:
js_optimizer_queue += ['registerize']
if opt_level >= 2:
- if debug_level < 2 and shared.Settings.ASM_JS: js_optimizer_queue += ['minifyNames']
+ if debug_level < 2 and shared.Settings.ASM_JS:
+ js_optimizer_queue += ['minifyNames']
+ if emit_symbol_map: js_optimizer_queue += ['symbolMap='+target+'.symbols']
if debug_level == 0: js_optimizer_queue += ['minifyWhitespace']
- if closure and shared.Settings.ASM_JS:
+ if closure and shared.Settings.ASM_JS:
js_optimizer_queue += ['closure']
if not shared.Settings.SIDE_MODULE: js_optimizer_queue += ['last'] # side modules are not finalized until after relocation
@@ -1885,7 +1941,7 @@ try {
log_time('final emitting')
- if DEBUG: logging.debug('total time: %.2f seconds' % (time.time() - start_time))
+ if DEBUG: logging.debug('total time: %.2f seconds', (time.time() - start_time))
finally:
if not TEMP_DIR:
@@ -1896,3 +1952,6 @@ finally:
else:
logging.info('emcc saved files are in:' + temp_dir)
+#//eliminate a = a in js opt. will kill STACKTOP = STACKTOP in funcs that do not use the C stack! add test for no STACKTOP or sp in such a func
+#// minify if into ?: ?
+
diff --git a/emcmake b/emcmake
new file mode 100755
index 00000000..9617ace5
--- /dev/null
+++ b/emcmake
@@ -0,0 +1,8 @@
+#!/usr/bin/env python2
+
+import os, subprocess, sys
+from tools import shared
+
+configure_path = shared.path_from_root('emconfigure')
+exit(subprocess.call([configure_path] + sys.argv[1:]))
+
diff --git a/emcmake.bat b/emcmake.bat
new file mode 100644
index 00000000..c05ba028
--- /dev/null
+++ b/emcmake.bat
@@ -0,0 +1,2 @@
+@echo off
+python "%~dp0\emcmake" %*
diff --git a/emscripten-version.txt b/emscripten-version.txt
new file mode 100644
index 00000000..f488f67e
--- /dev/null
+++ b/emscripten-version.txt
@@ -0,0 +1,2 @@
+1.16.0
+
diff --git a/emscripten.py b/emscripten.py
index 59a0666c..c8122cb9 100755
--- a/emscripten.py
+++ b/emscripten.py
@@ -9,7 +9,7 @@ header files (so that the JS compiler can see the constants in those
headers, for the libc implementation in JS).
'''
-import os, sys, json, optparse, subprocess, re, time, multiprocessing, string, logging, shutil
+import os, sys, json, optparse, subprocess, re, time, multiprocessing, string, logging
from tools import shared
from tools import jsrun, cache as cache_module, tempfiles
@@ -538,7 +538,7 @@ def emscript(infile, settings, outfile, libraries=[], compiler_engine=None,
''.join([' var ' + g + '=+env.' + g + ';\n' for g in basic_float_vars])
# In linkable modules, we need to add some explicit globals for global variables that can be linked and used across modules
if settings.get('MAIN_MODULE') or settings.get('SIDE_MODULE'):
- assert settings.get('TARGET_LE32'), 'TODO: support x86 target when linking modules (needs offset of 4 and not 8 here)'
+ assert settings.get('TARGET_ASMJS_UNKNOWN_EMSCRIPTEN'), 'TODO: support x86 target when linking modules (needs offset of 4 and not 8 here)'
for key, value in forwarded_json['Variables']['globals'].iteritems():
if value.get('linkable'):
init = forwarded_json['Variables']['indexedGlobals'][key] + 8 # 8 is Runtime.GLOBAL_BASE / STATIC_BASE
@@ -746,6 +746,9 @@ def emscript_fast(infile, settings, outfile, libraries=[], compiler_engine=None,
backend_args += ['-emscripten-warn-unaligned']
if settings['RESERVED_FUNCTION_POINTERS'] > 0:
backend_args += ['-emscripten-reserved-function-pointers=%d' % settings['RESERVED_FUNCTION_POINTERS']]
+ if settings['ASSERTIONS'] > 0:
+ backend_args += ['-emscripten-assertions=%d' % settings['ASSERTIONS']]
+ backend_args += ['-O' + str(settings['OPT_LEVEL'])]
if DEBUG:
logging.debug('emscript: llvm backend: ' + ' '.join(backend_args))
t = time.time()
@@ -780,6 +783,8 @@ def emscript_fast(infile, settings, outfile, libraries=[], compiler_engine=None,
table_sizes = {}
for k, v in metadata['tables'].iteritems():
table_sizes[k] = str(v.count(',')) # undercounts by one, but that is what we want
+ #if settings['ASSERTIONS'] >= 2 and table_sizes[k] == 0:
+ # print >> sys.stderr, 'warning: no function pointers with signature ' + k + ', but there is a call, which will abort if it occurs (this can result from undefined behavior, check for compiler warnings on your source files and consider -Werror)'
funcs = re.sub(r"#FM_(\w+)#", lambda m: table_sizes[m.groups(0)[0]], funcs)
# fix +float into float.0, if not running js opts
@@ -801,8 +806,8 @@ def emscript_fast(infile, settings, outfile, libraries=[], compiler_engine=None,
if DEBUG: logging.debug('emscript: js compiler glue')
# Settings changes
- assert settings['TARGET_LE32'] == 1
- settings['TARGET_LE32'] = 2
+ assert settings['TARGET_ASMJS_UNKNOWN_EMSCRIPTEN'] == 1
+ settings['TARGET_ASMJS_UNKNOWN_EMSCRIPTEN'] = 2
i64_funcs = ['i64Add', 'i64Subtract', '__muldi3', '__divdi3', '__udivdi3', '__remdi3', '__uremdi3']
for i64_func in i64_funcs:
if i64_func in metadata['declares']:
@@ -819,6 +824,8 @@ def emscript_fast(infile, settings, outfile, libraries=[], compiler_engine=None,
) + map(lambda x: x[1:], metadata['externs'])
if metadata['simd']:
settings['SIMD'] = 1
+ if not metadata['canValidate'] and settings['ASM_JS'] != 2:
+ logging.warning('disabling asm.js validation due to use of non-supported features')
settings['ASM_JS'] = 2
# Save settings to a file to work around v8 issue 1579
@@ -922,7 +929,6 @@ def emscript_fast(infile, settings, outfile, libraries=[], compiler_engine=None,
debug_tables = {}
def make_table(sig, raw):
- Counter.pre = ''
params = ','.join(['p%d' % p for p in range(len(sig)-1)])
coerced_params = ','.join([shared.JS.make_coercion('p%d', unfloat(sig[p+1]), settings) % p for p in range(len(sig)-1)])
coercions = ';'.join(['p%d = %s' % (p, shared.JS.make_coercion('p%d' % p, sig[p+1], settings)) for p in range(len(sig)-1)]) + ';'
@@ -941,7 +947,10 @@ def emscript_fast(infile, settings, outfile, libraries=[], compiler_engine=None,
code += 'return %s' % shared.JS.make_initializer(sig[0], settings) + ';'
return name, make_func(name, code)
bad, bad_func = make_bad() # the default bad func
- Counter.pre = [bad_func]
+ if settings['ASSERTIONS'] <= 1:
+ Counter.pre = [bad_func]
+ else:
+ Counter.pre = []
start = raw.index('[')
end = raw.rindex(']')
body = raw[start+1:end].split(',')
@@ -957,7 +966,7 @@ def emscript_fast(infile, settings, outfile, libraries=[], compiler_engine=None,
if settings['ASSERTIONS'] <= 1:
return bad if not newline else (bad + '\n')
else:
- specific_bad, specific_bad_func = make_bad(Counter.j)
+ specific_bad, specific_bad_func = make_bad(Counter.j-1)
Counter.pre.append(specific_bad_func)
return specific_bad if not newline else (specific_bad + '\n')
if item not in implemented_functions:
@@ -997,6 +1006,7 @@ def emscript_fast(infile, settings, outfile, libraries=[], compiler_engine=None,
if settings['SAFE_HEAP']: basic_funcs += ['SAFE_HEAP_LOAD', 'SAFE_HEAP_STORE']
if settings['CHECK_HEAP_ALIGN']: basic_funcs += ['CHECK_ALIGN_2', 'CHECK_ALIGN_4', 'CHECK_ALIGN_8']
if settings['ASSERTIONS']:
+ if settings['ASSERTIONS'] >= 2: import difflib
for sig in last_forwarded_json['Functions']['tables'].iterkeys():
basic_funcs += ['nullFunc_' + sig]
if settings['ASSERTIONS'] <= 1:
@@ -1006,11 +1016,29 @@ def emscript_fast(infile, settings, outfile, libraries=[], compiler_engine=None,
pointer = ' \'" + x + "\' '
asm_setup += '\nvar debug_table_' + sig + ' = ' + json.dumps(debug_tables[sig]) + ';'
extra = ' Module["printErr"]("This pointer might make sense in another type signature: '
- for other in last_forwarded_json['Functions']['tables'].iterkeys():
+ # sort signatures, attempting to show most likely related ones first
+ sigs = last_forwarded_json['Functions']['tables'].keys()
+ def keyfunc(other):
+ ret = 0
+ minlen = min(len(other), len(sig))
+ maxlen = min(len(other), len(sig))
+ if other.startswith(sig) or sig.startswith(other): ret -= 1000 # prioritize prefixes, could be dropped params
+ ret -= 133*difflib.SequenceMatcher(a=other, b=sig).ratio() # prioritize on diff similarity
+ ret += 15*abs(len(other) - len(sig))/float(maxlen) # deprioritize the bigger the length difference is
+ for i in range(minlen):
+ if other[i] == sig[i]: ret -= 5/float(maxlen) # prioritize on identically-placed params
+ ret += 20*len(other) # deprioritize on length
+ return ret
+ sigs.sort(key=keyfunc)
+ for other in sigs:
if other != sig:
extra += other + ': " + debug_table_' + other + '[x] + " '
extra += '"); '
- asm_setup += '\nfunction nullFunc_' + sig + '(x) { Module["printErr"]("Invalid function pointer' + pointer + 'called with signature \'' + sig + '\'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an different type, which will fail?"); ' + extra + ' abort(x) }\n'
+ asm_setup += '\nfunction nullFunc_' + sig + '(x) { Module["printErr"]("Invalid function pointer' + pointer + 'called with signature \'' + sig + '\'. ' + \
+ 'Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? ' + \
+ 'Or calling a function with an incorrect type, which will fail? ' + \
+ '(it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)' + \
+ '"); ' + extra + ' abort(x) }\n'
basic_vars = ['STACKTOP', 'STACK_MAX', 'tempDoublePtr', 'ABORT']
basic_float_vars = ['NaN', 'Infinity']
@@ -1087,7 +1115,7 @@ def emscript_fast(infile, settings, outfile, libraries=[], compiler_engine=None,
asm_global_vars = ''.join([' var ' + g + '=env.' + g + '|0;\n' for g in basic_vars + global_vars])
# In linkable modules, we need to add some explicit globals for global variables that can be linked and used across modules
if settings.get('MAIN_MODULE') or settings.get('SIDE_MODULE'):
- assert settings.get('TARGET_LE32'), 'TODO: support x86 target when linking modules (needs offset of 4 and not 8 here)'
+ assert settings.get('TARGET_ASMJS_UNKNOWN_EMSCRIPTEN'), 'TODO: support x86 target when linking modules (needs offset of 4 and not 8 here)'
for key, value in forwarded_json['Variables']['globals'].iteritems():
if value.get('linkable'):
init = forwarded_json['Variables']['indexedGlobals'][key] + 8 # 8 is Runtime.GLOBAL_BASE / STATIC_BASE
@@ -1257,7 +1285,7 @@ Runtime.stackRestore = function(top) { asm['stackRestore'](top) };
if DEBUG: logging.debug(' emscript: final python processing took %s seconds' % (time.time() - t))
-if os.environ.get('EMCC_FAST_COMPILER') == '1':
+if os.environ.get('EMCC_FAST_COMPILER') != '0':
emscript = emscript_fast
def main(args, compiler_engine, cache, jcache, relooper, temp_files, DEBUG, DEBUG_CACHE):
@@ -1277,13 +1305,13 @@ def main(args, compiler_engine, cache, jcache, relooper, temp_files, DEBUG, DEBU
settings.setdefault('RELOOPER', relooper)
if not os.path.exists(relooper):
shared.Building.ensure_relooper(relooper)
-
+
settings.setdefault('STRUCT_INFO', cache.get_path('struct_info.compiled.json'))
struct_info = settings.get('STRUCT_INFO')
-
+
if not os.path.exists(struct_info):
shared.Building.ensure_struct_info(struct_info)
-
+
emscript(args.infile, settings, args.outfile, libraries, compiler_engine=compiler_engine,
jcache=jcache, temp_files=temp_files, DEBUG=DEBUG, DEBUG_CACHE=DEBUG_CACHE)
diff --git a/media/powered_by_logo.png b/media/powered_by_logo.png
new file mode 100644
index 00000000..69e90c77
--- /dev/null
+++ b/media/powered_by_logo.png
Binary files differ
diff --git a/media/powered_by_logo.svg b/media/powered_by_logo.svg
new file mode 100644
index 00000000..f39123c1
--- /dev/null
+++ b/media/powered_by_logo.svg
@@ -0,0 +1,1547 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Generator: Adobe Illustrator 15.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
+
+<svg
+ xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ version="1.1"
+ id="Layer_1"
+ x="0px"
+ y="0px"
+ width="900px"
+ height="400px"
+ viewBox="0 0 900 400"
+ enable-background="new 0 0 900 400"
+ xml:space="preserve"
+ inkscape:version="0.48.4 r9939"
+ sodipodi:docname="emscripten_powered_by_logo.svg"><metadata
+ id="metadata345"><rdf:RDF><cc:Work
+ rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
+ id="defs343"><linearGradient
+ y2="247.6265"
+ x2="225.1929"
+ y1="152.499"
+ x1="225.1929"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient5104">
+ <stop
+ id="stop5106"
+ style="stop-color:#C1D72F"
+ offset="0.3227531" />
+ <stop
+ id="stop5108"
+ style="stop-color:#BCD631"
+ offset="0.45119295" />
+ <stop
+ id="stop5110"
+ style="stop-color:#AFD136"
+ offset="0.64491969" />
+ <stop
+ id="stop5112"
+ style="stop-color:#ABD037"
+ offset="1" />
+ <a:midPointStop
+ style="stop-color:#C1D72F"
+ offset="0.0123" />
+ <a:midPointStop
+ style="stop-color:#C1D72F"
+ offset="0.3086" />
+ <a:midPointStop
+ style="stop-color:#ABD037"
+ offset="1" />
+ </linearGradient><linearGradient
+ inkscape:collect="always"
+ xlink:href="#SVGID_2_"
+ id="linearGradient5120"
+ x1="397.56918"
+ y1="128.12726"
+ x2="397.56918"
+ y2="166.25996"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.103059,0,0,1.103059,-38.997823,3.1312145)" /><filter
+ inkscape:collect="always"
+ id="filter5126"><feGaussianBlur
+ inkscape:collect="always"
+ stdDeviation="0.56377237"
+ id="feGaussianBlur5128" /></filter><linearGradient
+ inkscape:collect="always"
+ xlink:href="#SVGID_2_"
+ id="linearGradient5134"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.103059,0,0,1.103059,-38.997823,3.1312145)"
+ x1="397.56918"
+ y1="128.12726"
+ x2="397.56918"
+ y2="166.25996" /></defs><sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="1440"
+ inkscape:window-height="838"
+ id="namedview341"
+ showgrid="false"
+ inkscape:zoom="0.63555556"
+ inkscape:cx="224.82424"
+ inkscape:cy="-52.085109"
+ inkscape:window-x="-8"
+ inkscape:window-y="-8"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="Layer_1" />
+<g
+ id="g5130"
+ transform="matrix(0.91591318,0,0,0.91591318,28.176953,14.143571)"><path
+ transform="matrix(1.103059,0,0,1.103059,-35.073492,-16.03923)"
+ id="path5122"
+ style="fill:#383838;fill-opacity:0.34705882;stroke:none;filter:url(#filter5126)"
+ d="m 494.39333,173.6323 c 0.57407,0.28703 1.87073,1.00226 2.89426,1.02855 0.55732,0.0143 1.14006,-0.1672 1.60262,-0.4784 1.20466,-0.81046 2.23561,-2.03031 2.72683,-3.39661 0.19424,-0.54027 0.0238,-1.72222 0.0238,-1.72222 l -3.82713,-14.06478 -1.98533,0 0.50231,-2.67891 6.36261,0 2.55939,12.22285 4.78392,-9.68746 -2.00924,0 0,-2.65498 7.19979,0 -11.00301,22.38875 -1.69829,1.91358 -2.29628,1.3395 -2.46371,0.26312 -2.29628,-0.21528 -2.79859,-1.36342 z m -12.0637,-14.56445 c -0.93698,1.88565 -1.70261,4.35262 -0.81842,6.26333 0.36549,0.78976 1.35098,1.19428 2.192,1.41737 0.60934,0.16133 1.29167,0.0999 1.88775,-0.10468 0.48126,-0.1655 0.8829,-0.5224 1.255,-0.8697 0.40341,-0.3768 0.77723,-0.80461 1.03505,-1.29262 0.21864,-0.41395 0.40236,-0.84786 0.49325,-1.30698 0.20667,-1.0485 0.35879,-2.1079 0.33583,-3.17631 -0.0184,-0.87403 -0.0789,-1.87107 -0.47711,-2.64959 -0.26344,-0.51379 -0.77017,-0.71849 -1.33113,-0.85633 -0.42395,-0.10479 -0.81432,-0.0626 -1.21773,0.10517 -0.65479,0.27273 -1.2544,0.5311 -1.82112,0.95764 -0.57331,0.4317 -1.21403,0.86959 -1.53337,1.5127 z m 0.65588,-4.31208 c 0,0 2.19341,-1.80738 3.45549,-2.27082 0.71718,-0.26365 3.45363,-0.65258 4.15,-0.3378 1.47292,0.66633 2.26103,1.57529 2.7222,2.60001 0.46118,1.02472 0.69944,2.59956 0.79701,3.73627 0.13278,1.55027 -0.13682,3.77629 -0.53404,5.74843 -0.30079,1.49256 -1.01883,2.74423 -1.83478,3.92156 -1.06526,1.5373 -1.82382,2.15116 -3.66756,2.46594 -0.98864,0.16889 -1.93845,0.46787 -3.25466,0.0928 -1.4384,-0.40963 -2.35273,-0.81244 -3.39599,-1.63337 -0.72524,-0.57054 -1.16043,-1.54043 -1.16043,-1.54043 l 0,2.82636 -4.8903,0 3.39872,-23.01602 -1.92242,-0.85888 0.0403,-2.38127 7.25847,0.0534 z m -23.77803,2.20447 c 0.29175,1.49273 0.0813,4.83252 -0.86111,6.69751 -0.3062,0.60617 -0.94813,1.32967 -1.55479,1.6983 -1.01515,0.61713 -2.21688,1.21322 -3.3966,1.07639 -0.47944,-0.0541 -0.97036,-0.34348 -1.24383,-0.74151 -0.47686,-0.69328 -0.43621,-1.55032 -0.45448,-2.39198 -0.024,-1.06873 0.13137,-2.23775 0.38272,-3.277 0.18705,-0.7744 0.4229,-1.58254 0.86111,-2.24844 0.39037,-0.59323 0.92628,-1.12617 1.55478,-1.45909 0.54854,-0.29014 1.19695,-0.38467 1.81791,-0.40664 0.63637,-0.0231 1.3031,0.0385 1.88966,0.28704 0.3875,0.16453 0.92361,0.3524 1.00463,0.76542 z m 1.29312,-9.69052 -0.64254,6.12262 c 0,0 -1.68393,-0.96858 -2.605,-1.25148 -0.73032,-0.22434 -1.50312,-0.36654 -2.26624,-0.33838 -0.97069,0.0345 -1.91182,0.22099 -2.81751,0.57088 -0.9185,0.35497 -1.78344,0.94565 -2.49338,1.62792 -0.88025,0.84538 -1.51404,1.90455 -2.02977,3.0106 -0.39653,0.84993 -0.69517,1.75284 -0.87975,2.67232 -0.22875,1.14241 -0.44415,2.38719 -0.43937,3.55197 0.01,1.44865 0.0623,2.89489 0.54092,4.26214 0.25525,0.72907 0.71643,1.40578 1.28572,1.9283 0.56835,0.52207 1.29566,0.87604 2.02935,1.11621 0.41072,0.13491 0.85346,0.17274 1.28579,0.16935 1.00285,-0.01 2.03715,-0.0883 2.97671,-0.43999 0.66497,-0.2489 1.21759,-0.73399 1.79298,-1.1502 0.75304,-0.54475 2.16476,-1.86006 2.16476,-1.86006 l 0,1.62374 -0.5751,0 0,1.48807 6.86709,0 0,-2.84135 -1.92841,0 3.21374,-23.57782 -7.37422,0 0,2.33412 z m -93.60062,7.55781 2.33363,15.57933 6.23084,0 4.04243,-11.34169 1.62654,11.34169 5.88425,0 7.05633,-16.38872 0,-2.0141 -6.1713,0 0,2.82349 1.88966,0 -4.04243,10.16973 -0.74151,0 -1.29167,-12.55773 -5.38194,0 -4.7361,12.50989 -1.55478,-12.94538 -6.86496,0 0,2.82349 z m -12.15,0.72146 c -0.56264,0.0892 -1.03524,0.17358 -1.53086,0.45447 -0.737,0.41808 -1.46132,0.95771 -1.91357,1.67437 -0.44123,0.70048 -0.53204,1.57581 -0.66975,2.39196 -0.1751,1.04003 -0.20064,2.10306 -0.19136,3.15741 0.01,0.81614 -0.0138,1.66577 0.35879,2.39197 0.1904,0.37315 0.52874,0.80945 0.88503,1.02855 0.56015,0.34453 1.06632,0.55494 1.72222,0.598 0.72597,0.0483 1.48801,-0.18852 2.10493,-0.57408 0.59422,-0.37072 1.03334,-0.97401 1.38735,-1.5787 0.46117,-0.78744 0.70905,-1.69257 0.90895,-2.58334 0.20377,-0.90704 0.33579,-1.84565 0.28703,-2.77468 -0.0491,-0.92714 -0.18211,-1.88434 -0.57407,-2.72684 -0.2728,-0.58681 -0.70954,-1.00753 -1.29166,-1.29165 -0.44403,-0.21628 -0.99455,-0.24402 -1.48303,-0.16744 z m -6.62442,-0.73581 c 0.65404,-0.6664 1.4072,-1.25479 2.23273,-1.69161 1.0305,-0.54505 2.16429,-0.92749 3.31518,-1.11604 1.51307,-0.24806 3.09342,-0.2847 4.60036,0 0.88055,0.16632 1.78322,0.44742 2.50307,0.98113 0.77409,0.57312 1.35279,1.40936 1.79291,2.26639 0.42901,0.83457 0.6828,1.77223 0.77798,2.70605 0.16564,1.61985 0.024,3.29135 -0.37201,4.87103 -0.33328,1.33759 -0.88436,2.64754 -1.65745,3.78889 -0.67549,0.99679 -1.52894,1.91262 -2.53721,2.5709 -0.89957,0.58746 -1.9718,0.87641 -3.01035,1.15006 -0.87153,0.22963 -1.77166,0.4095 -2.67235,0.40576 -1.21068,-0.01 -2.47998,-0.0817 -3.58589,-0.57511 -1.09854,-0.48896 -1.89728,-1.32739 -2.60455,-2.30013 -0.61123,-0.83995 -1.02561,-1.59975 -1.31932,-2.87516 -0.2125,-0.9233 -0.40006,-2.19912 -0.37215,-3.14592 0.0335,-1.16537 0.3568,-2.74121 0.83416,-3.80434 0.52547,-1.17098 1.17609,-2.3161 2.07489,-3.2319 z m 94.95184,13.82318 c -2.20516,1.01761 -4.61429,1.69636 -7.02343,1.69636 -5.32726,0 -7.22678,-3.12145 -7.22678,-7.22678 0,-7.1251 4.54685,-11.19645 10.0772,-11.19645 3.7324,0 5.56453,1.69625 5.56453,4.47856 0,4.85189 -5.12329,6.27735 -10.41633,6.82001 0.10168,1.73076 0.81446,3.32485 3.3592,3.32485 1.2218,0 2.88401,-0.37315 4.91982,-1.22099 z m -3.22292,-11.77374 c 0,-0.81423 -0.57695,-1.28891 -1.62876,-1.28891 -1.89988,0 -3.46041,1.66212 -3.96978,4.34287 1.45897,-0.20368 5.59854,-0.91613 5.59854,-3.05396 z m -30.33408,11.77374 c -2.2054,1.01761 -4.61457,1.69636 -7.02371,1.69636 -5.32653,0 -7.22671,-3.12145 -7.22671,-7.22678 0,-7.1251 4.54679,-11.19645 10.07785,-11.19645 3.73175,0 5.56382,1.69625 5.56382,4.47856 0,4.85189 -5.12273,6.27735 -10.41568,6.82001 0.10142,1.73076 0.81422,3.32485 3.35884,3.32485 1.22158,0 2.8842,-0.37315 4.91994,-1.22099 z m -3.22305,-11.77374 c 0,-0.81423 -0.57638,-1.28891 -1.62883,-1.28891 -1.89959,0 -3.46023,1.66212 -3.96971,4.34287 1.4591,-0.20368 5.59854,-0.91613 5.59854,-3.05396 z m -82.36051,20.5268 -0.0679,-0.13571 0.98406,-5.66614 2.10303,-15.16698 c 0.0687,-0.40664 -0.0332,-0.61046 -0.30522,-0.71214 l -1.66259,-0.61111 0.37379,-2.57855 6.78556,0 -0.40663,2.71427 0.10142,0.0335 c 2.0016,-1.86631 4.10566,-3.08743 6.24306,-3.08743 2.91821,0 4.95366,1.86577 4.95366,6.78561 0,4.68241 -1.83206,11.6379 -8.14271,11.6379 -2.20534,0 -3.42694,-0.84825 -4.68256,-1.73039 l -0.74621,5.08917 c -0.0341,0.37361 0.0326,0.50898 0.47457,0.54273 l 3.42697,0.33969 -0.37385,2.5447 -9.0589,0 z m 6.78613,-12.04485 c 0.84787,0.71258 1.96788,1.32305 3.22348,1.32305 2.74798,0 3.76601,-3.86811 3.76601,-6.85368 0,-2.002 -0.47476,-3.32542 -1.76432,-3.32542 -1.35696,0 -3.08763,1.4591 -4.30913,2.54506 z m 81.08934,4.85147 0.33969,-2.54464 1.56064,-0.2038 c 0.47498,-0.0683 0.5429,-0.1695 0.61084,-0.67837 l 1.42466,-10.34864 c 0.0335,-0.37315 -0.0335,-0.61046 -0.33914,-0.71214 l -1.69691,-0.61111 0.37365,-2.57855 6.71797,0 -0.44097,3.05395 0.10191,0.0679 c 1.32326,-1.89982 3.22359,-3.46042 5.39485,-3.46042 0.7463,0 2.0359,0.13582 2.61295,0.30538 l -0.84863,6.17508 -3.96972,-0.13582 -0.10157,-1.76443 c -0.0335,-0.30537 -0.10223,-0.40701 -0.37391,-0.40701 -0.64452,0 -1.69636,0.78027 -2.64651,1.76455 l -1.18674,8.61817 c -0.0687,0.54303 -0.0334,0.64474 0.47477,0.67874 l 3.22351,0.27142 -0.37384,2.51081 -10.8575,0 z"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="cssscccccccccccccccccssssssssccssscssssscsssccccccccsssssssssccsccsssssssssscsscccccccccccccccccccccccccccccccsssscsssssscscsssssssscsssssssssscsssscsccsscscsssscsccsscsccccccccccsssccccccccssscccccccccccccsccccsccccccc" /><path
+ sodipodi:nodetypes="cssscccccccccccccccccssssssssccssscssssscsssccccccccsssssssssccsccsssssssssscsscccccccccccccccccccccccccccccccsssscsssssscscsssssssscsssssssssscsssscsccsscscsssscsccsscsccccccccccsssccccccccssscccccccccccccsccccsccccccc"
+ inkscape:connector-curvature="0"
+ d="m 509.55935,174.26011 c 0.63327,0.31663 2.06355,1.10555 3.19256,1.13455 0.61476,0.0158 1.25757,-0.18443 1.76781,-0.5277 1.3288,-0.89397 2.46618,-2.23946 3.00784,-3.74661 0.21419,-0.59598 0.0258,-1.89972 0.0258,-1.89972 l -4.22153,-15.51428 -2.18993,0 0.55406,-2.95501 7.01835,0 2.82313,13.48255 5.27696,-10.68586 -2.21631,0 0,-2.92858 7.94179,0 -12.13698,24.69605 -1.87332,2.11078 -2.5329,1.4776 -2.71762,0.29022 -2.53295,-0.23748 -3.08699,-1.50392 z m -13.30698,-16.06545 c -1.0335,2.08005 -1.87803,4.80122 -0.90274,6.90883 0.4032,0.87116 1.49018,1.31738 2.4179,1.56347 0.67214,0.17793 1.42477,0.1102 2.08233,-0.11548 0.53084,-0.1826 0.97383,-0.5762 1.38432,-0.9593 0.44502,-0.4157 0.85733,-0.8875 1.14176,-1.42582 0.24113,-0.45665 0.44375,-0.93526 0.54404,-1.44168 0.22797,-1.1566 0.3958,-2.3252 0.37043,-3.50371 -0.0204,-0.96413 -0.0869,-2.06387 -0.52631,-2.92259 -0.29054,-0.56679 -0.84946,-0.79259 -1.46826,-0.94463 -0.46761,-0.11559 -0.89829,-0.0686 -1.34322,0.11597 -0.72226,0.30083 -1.38368,0.5859 -2.00879,1.05634 -0.63242,0.4762 -1.33915,0.9593 -1.69146,1.6686 z m 0.72346,-4.75648 c 0,0 2.41951,-1.99358 3.81169,-2.50482 0.79109,-0.29085 3.80953,-0.71977 4.57766,-0.3726 1.6247,0.73503 2.49408,1.73759 3.00274,2.86791 0.50868,1.13043 0.77154,2.86756 0.87911,4.12137 0.14648,1.71007 -0.15092,4.16549 -0.58904,6.34083 -0.33179,1.64636 -1.12383,3.02703 -2.02388,4.32576 -1.17506,1.6957 -2.01178,2.37286 -4.04556,2.72004 -1.09051,0.18629 -2.13814,0.51607 -3.59006,0.10268 -1.5866,-0.45183 -2.59522,-0.89615 -3.74599,-1.8017 -0.79994,-0.62933 -1.28003,-1.6992 -1.28003,-1.6992 l 0,3.11766 -5.39426,0 3.74898,-25.38802 -2.12052,-0.94738 0.0443,-2.62669 8.00657,0.0587 z m -26.22853,2.43167 c 0.32185,1.64663 0.0893,5.33062 -0.9498,7.38781 -0.33781,0.66857 -1.04588,1.46667 -1.7151,1.8733 -1.11975,0.68073 -2.44527,1.33822 -3.7466,1.18729 -0.52883,-0.0601 -1.07036,-0.37888 -1.37203,-0.81791 -0.52601,-0.76478 -0.48121,-1.71012 -0.50128,-2.63848 -0.0263,-1.17893 0.14487,-2.46835 0.42212,-3.6147 0.20635,-0.8543 0.4665,-1.74564 0.94981,-2.48024 0.43067,-0.65433 1.02178,-1.24217 1.71508,-1.60939 0.60504,-0.32004 1.32025,-0.42437 2.00521,-0.44854 0.70197,-0.0251 1.4374,0.0425 2.08446,0.31654 0.4274,0.18153 1.01882,0.3888 1.10813,0.84432 z m 1.42642,-10.68922 -0.70874,6.75362 c 0,0 -1.85753,-1.06838 -2.8735,-1.38048 -0.80562,-0.24744 -1.65802,-0.40424 -2.49984,-0.37318 -1.07069,0.0382 -2.10882,0.24369 -3.1078,0.62968 -1.01321,0.39157 -1.96724,1.04315 -2.75039,1.79572 -0.97095,0.93248 -1.67003,2.10085 -2.23897,3.3208 -0.43738,0.93753 -0.76677,1.93354 -0.9704,2.94777 -0.2523,1.26016 -0.4899,2.63324 -0.48461,3.91802 0.011,1.59795 0.0683,3.19329 0.59661,4.70144 0.28155,0.80417 0.79028,1.55058 1.41822,2.127 0.62695,0.57587 1.4292,0.96634 2.23856,1.23121 0.45301,0.14881 0.94135,0.19054 1.41828,0.18685 1.10615,-0.011 2.24705,-0.0973 3.28346,-0.48539 0.73352,-0.2745 1.34304,-0.80959 1.97773,-1.2687 0.83064,-0.60085 2.38786,-2.05176 2.38786,-2.05176 l 0,1.79104 -0.63429,0 0,1.64147 7.57478,0 0,-3.13415 -2.12721,0 3.54494,-26.00772 -8.13411,0 0,2.57462 z m -103.24702,8.33671 2.57413,17.18493 6.87304,0 4.45903,-12.51049 1.79414,12.51049 6.49065,0 7.78353,-18.07772 0,-2.2217 -6.8073,0 0,3.11449 2.08446,0 -4.45903,11.21783 -0.8179,0 -1.42488,-13.85193 -5.93654,0 -5.2242,13.79919 -1.71497,-14.27958 -7.57246,0 0,3.11449 z m -13.4021,0.79586 c -0.62064,0.0982 -1.14194,0.19148 -1.68866,0.50127 -0.813,0.46118 -1.61192,1.05641 -2.11077,1.84697 -0.48673,0.77268 -0.58683,1.73821 -0.73875,2.63846 -0.1932,1.14723 -0.22134,2.31976 -0.21116,3.48281 0.011,0.90024 -0.0148,1.83747 0.39579,2.63847 0.21,0.41165 0.58324,0.89285 0.97623,1.13455 0.61796,0.38003 1.17622,0.61214 1.89972,0.6596 0.80077,0.0533 1.64141,-0.20792 2.32189,-0.63318 0.65546,-0.40892 1.13978,-1.07441 1.53029,-1.7414 0.50878,-0.86864 0.78215,-1.86707 1.00265,-2.84964 0.22477,-1.00044 0.37039,-2.03585 0.31663,-3.06058 -0.0541,-1.02274 -0.20091,-2.07854 -0.63327,-3.00784 -0.3009,-0.64731 -0.78264,-1.11143 -1.42476,-1.42485 -0.48983,-0.23858 -1.09705,-0.26912 -1.63583,-0.18464 z m -7.30711,-0.81171 c 0.72143,-0.735 1.55219,-1.38409 2.46282,-1.86591 1.1367,-0.60125 2.38729,-1.02309 3.65678,-1.23104 1.66908,-0.27366 3.41222,-0.314 5.07446,0 0.97135,0.18342 1.96702,0.49352 2.76107,1.08223 0.85389,0.63222 1.49219,1.55466 1.97771,2.49999 0.47321,0.92057 0.7531,1.95483 0.85808,2.98495 0.18274,1.78675 0.0263,3.63055 -0.41031,5.37303 -0.36757,1.47539 -0.97545,2.92034 -1.82825,4.17929 -0.74509,1.09959 -1.68654,2.10982 -2.79871,2.8359 -0.99227,0.64796 -2.175,0.96671 -3.32055,1.26856 -0.96139,0.25333 -1.95426,0.4517 -2.94774,0.44756 -1.33549,-0.011 -2.73559,-0.0897 -3.9555,-0.63431 -1.21174,-0.53936 -2.09278,-1.46419 -2.87295,-2.53723 -0.67423,-0.92645 -1.13131,-1.76457 -1.45532,-3.17146 -0.2344,-1.0184 -0.44126,-2.42572 -0.41044,-3.47012 0.0365,-1.28547 0.39349,-3.02371 0.92005,-4.19644 0.57967,-1.29168 1.29729,-2.5548 2.2888,-3.565 z m 104.73744,15.24778 c -2.43247,1.12251 -5.0899,1.87126 -7.74734,1.87126 -5.87626,0 -7.97147,-3.44315 -7.97147,-7.97158 0,-7.8594 5.0154,-12.35035 11.11569,-12.35035 4.11711,0 6.13803,1.87105 6.13803,4.94016 0,5.35189 -5.65129,6.92425 -11.48983,7.52281 0.11219,1.90916 0.89836,3.66755 3.7054,3.66755 1.3477,0 3.18121,-0.41165 5.42682,-1.34689 z m -3.55513,-12.98704 c 0,-0.89823 -0.63635,-1.42181 -1.79655,-1.42181 -2.09568,0 -3.81712,1.83342 -4.37899,4.79047 1.60937,-0.22468 6.17554,-1.01053 6.17554,-3.36866 z m -33.46028,12.98704 c -2.4327,1.12251 -5.09006,1.87126 -7.74751,1.87126 -5.87553,0 -7.97151,-3.44315 -7.97151,-7.97158 0,-7.8594 5.01539,-12.35035 11.11645,-12.35035 4.11635,0 6.13722,1.87105 6.13722,4.94016 0,5.35189 -5.65062,6.92425 -11.48908,7.52281 0.11182,1.90916 0.89812,3.66755 3.70494,3.66755 1.34748,0 3.1815,-0.41165 5.42704,-1.34689 z m -3.55514,-12.98704 c 0,-0.89823 -0.63578,-1.42181 -1.79674,-1.42181 -2.09539,0 -3.81683,1.83342 -4.37881,4.79047 1.60951,-0.22468 6.17555,-1.01053 6.17555,-3.36866 z m -90.84852,22.6422 -0.0749,-0.14971 1.08546,-6.25004 2.31984,-16.73008 c 0.0757,-0.44854 -0.0367,-0.67336 -0.33673,-0.78554 l -1.83388,-0.67411 0.41228,-2.84425 7.48486,0 -0.44853,2.99397 0.11182,0.0371 c 2.2079,-2.05871 4.52887,-3.40563 6.88646,-3.40563 3.21901,0 5.46427,2.05807 5.46427,7.48491 0,5.16501 -2.02094,12.8373 -8.98192,12.8373 -2.43264,0 -3.78014,-0.93565 -5.16516,-1.90869 l -0.82311,5.61357 c -0.0376,0.41212 0.0356,0.56148 0.52347,0.59873 l 3.78017,0.37469 -0.41234,2.8069 -9.9925,0 z m 7.48553,-13.28615 c 0.93528,0.78598 2.17068,1.45946 3.55568,1.45946 3.03118,0 4.15411,-4.26682 4.15411,-7.56009 0,-2.2083 -0.52366,-3.66812 -1.94612,-3.66812 -1.49686,0 -3.40583,1.6095 -4.75323,2.80736 z m 89.44624,5.35147 0.37469,-2.80694 1.72154,-0.2248 c 0.52388,-0.0753 0.5988,-0.1869 0.67374,-0.74827 l 1.57152,-11.41514 c 0.0365,-0.41155 -0.0368,-0.67336 -0.3741,-0.78554 l -1.87181,-0.67411 0.41215,-2.84425 7.41037,0 -0.48647,3.36865 0.11241,0.0749 c 1.45966,-2.09562 3.55581,-3.81702 5.95085,-3.81702 0.8232,0 2.2457,0.14982 2.88225,0.33688 l -0.93613,6.81148 -4.37882,-0.14982 -0.11196,-1.94633 c -0.0371,-0.33677 -0.11284,-0.44891 -0.41252,-0.44891 -0.71092,0 -1.87116,0.86067 -2.91921,1.94635 l -1.30904,9.50637 c -0.0757,0.59903 -0.0368,0.71124 0.52367,0.74874 l 3.55571,0.29932 -0.41234,2.76961 -11.9765,0 z"
+ style="fill:url(#linearGradient5134);fill-opacity:1;stroke:none"
+ id="path5080" /></g><path
+ fill="#E2E2E2"
+ d="M256.023,135.437H196.36c-16.432,0-29.8,13.368-29.8,29.8v73.527c0,16.432,13.368,29.8,29.8,29.8h59.663 c16.433,0,29.801-13.368,29.801-29.8v-73.527C285.824,148.805,272.456,135.437,256.023,135.437z M191.561,165.236 c0-2.646,2.153-4.8,4.8-4.8h59.663c2.647,0,4.801,2.153,4.801,4.8v73.527c0,2.646-2.153,4.8-4.801,4.8H196.36 c-2.646,0-4.8-2.153-4.8-4.8V165.236z"
+ id="path3" />
+<path
+ d="m 531.664,250.155 h 18.498 l -2.809,18.064 h 5.59 37.586 l 2.6,-17.718 c 4.98,-1.091 9.133,-3.455 12.512,-6.693 3.084,4.075 8.566,7.37 18.252,7.37 6.338,0 12.775,-1.807 17.174,-3.687 4.254,2.399 9.463,3.687 15.459,3.687 3.088,0 6.236,-0.355 9.426,-1.023 h 67.135 l 3.354,-24.827 -5.445,-0.764 1.879,-13.356 c 0.371,-2.386 0.449,-4.66 0.449,-6.156 l -0.008,-0.375 c -0.457,-12.191 -8.139,-19.765 -20.045,-19.765 -2.404,0 -4.623,0.314 -6.676,0.852 h -34.189 l -0.035,0.244 c -2.527,-0.701 -5.41,-1.096 -8.686,-1.096 -3.801,0 -7.406,0.555 -10.76,1.598 l 0.105,-0.746 h -12.467 l 1.826,-12.951 H 615.08 l -1.846,7.658 c -1.373,5.704 -2.213,5.793 -4.453,6.03 l -4.508,0.477 c -3.049,-1.424 -6.357,-2.065 -9.602,-2.065 -2.135,0 -4.275,0.284 -6.416,0.852 h -19.291 c 0.502,-1.772 0.775,-3.674 0.775,-5.678 0,-9.601 -6.846,-16.305 -16.646,-16.305 -11.055,0 -18.775,7.721 -18.775,18.776 0,0.951 0.082,1.869 0.219,2.764 -2.135,-0.288 -4.277,-0.409 -5.553,-0.409 -2.053,0 -4.072,0.288 -6.045,0.852 h -31.342 c -2.74,-0.553 -5.641,-0.852 -8.537,-0.852 -7.138,0 -13.492,1.674 -18.808,4.723 l -3.451,-1.461 c -3.711,-1.571 -11.232,-3.262 -18.979,-3.262 -8.933,0 -16.383,2.56 -21.576,7.016 -3.265,-4.473 -8.523,-7.016 -15.228,-7.016 -4.822,0 -9.021,1.477 -12.572,3.44 -2.996,-2.204 -6.796,-3.44 -11.115,-3.44 -2.327,0 -4.48,0.315 -6.476,0.852 h -33.963 l -0.035,0.245 c -2.526,-0.702 -5.41,-1.097 -8.687,-1.097 -20.458,0 -35.307,16.031 -35.307,38.117 0,17.363 10.785,28.149 28.148,28.149 3.087,0 6.236,-0.356 9.426,-1.023 h 88.816 c 3.706,0.676 7.669,1.023 11.154,1.023 8.907,0 16.278,-2.375 21.51,-6.593 4.872,4.252 11.585,6.593 19.728,6.593 3.053,0 6.206,-0.368 9.286,-1.023 h 44.664 2.069 z"
+ id="path5"
+ inkscape:connector-curvature="0"
+ style="fill:#e2e2e2" />
+<path
+ fill="#F5F5F5"
+ d="M255.023,133.437H195.36c-16.432,0-29.8,13.368-29.8,29.8v73.527c0,16.432,13.368,29.8,29.8,29.8h59.663 c16.433,0,29.801-13.368,29.801-29.8v-73.527C284.824,146.805,271.456,133.437,255.023,133.437z M190.561,163.236 c0-2.646,2.153-4.8,4.8-4.8h59.663c2.647,0,4.801,2.153,4.801,4.8v73.527c0,2.646-2.153,4.8-4.801,4.8H195.36 c-2.646,0-4.8-2.153-4.8-4.8V163.236z"
+ id="path7" />
+<g
+ id="g9">
+ <g
+ id="g11">
+ <path
+ fill="#FBFDF8"
+ d="M195.361,251.626c-8.161,0-14.8-6.64-14.8-14.8v-73.527c0-8.161,6.639-14.8,14.8-14.8h59.663 c8.161,0,14.8,6.639,14.8,14.8v73.527c0,8.16-6.639,14.8-14.8,14.8H195.361z"
+ id="path13" />
+ <path
+ fill="#F0F4E1"
+ d="M255.024,152.499c5.964,0,10.8,4.835,10.8,10.8v73.527c0,5.965-4.835,10.8-10.8,10.8h-59.663 c-5.964,0-10.8-4.835-10.8-10.8v-73.527c0-5.964,4.835-10.8,10.8-10.8H255.024 M255.024,144.499h-59.663 c-10.366,0-18.8,8.434-18.8,18.8v73.527c0,10.366,8.434,18.8,18.8,18.8h59.663c10.366,0,18.8-8.434,18.8-18.8v-73.527 C273.824,152.933,265.391,144.499,255.024,144.499L255.024,144.499z"
+ id="path15" />
+ </g>
+ <defs
+ id="defs17">
+ <filter
+ id="Adobe_OpacityMaskFilter"
+ filterUnits="userSpaceOnUse"
+ x="176.562"
+ y="144.499"
+ width="97.263"
+ height="111.127">
+
+ <feColorMatrix
+ type="matrix"
+ values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0"
+ color-interpolation-filters="sRGB"
+ result="source"
+ id="feColorMatrix20" />
+ </filter>
+ </defs>
+ <mask
+ maskUnits="userSpaceOnUse"
+ x="176.562"
+ y="144.499"
+ width="97.263"
+ height="111.127"
+ id="SVGID_1_">
+ <g
+ filter="url(#Adobe_OpacityMaskFilter)"
+ id="g23">
+
+ <image
+ overflow="visible"
+ width="422"
+ height="480"
+ xlink:href="data:image/jpeg;base64,/9j/4AAQSkZJRgABAgEBLAEsAAD/7AARRHVja3kAAQAEAAAAHgAA/+4AIUFkb2JlAGTAAAAAAQMA EAMCAwYAAAg2AAAQ4QAAF1b/2wCEABALCwsMCxAMDBAXDw0PFxsUEBAUGx8XFxcXFx8eFxoaGhoX Hh4jJSclIx4vLzMzLy9AQEBAQEBAQEBAQEBAQEABEQ8PERMRFRISFRQRFBEUGhQWFhQaJhoaHBoa JjAjHh4eHiMwKy4nJycuKzU1MDA1NUBAP0BAQEBAQEBAQEBAQP/CABEIAeMBqQMBIgACEQEDEQH/ xACjAAEAAgMBAQAAAAAAAAAAAAAABQYBAwQHAgEBAQAAAAAAAAAAAAAAAAAAAAEQAAEDAQQKAwAC AwEAAAAAAAABAwQCMRMUBRBQEjMVJQYWNgcgESEwI5AiMkARAAEBAwsEAQIFAwUBAAAAAAABMQID EFAycqOz0wQ0RaURIXGRIEFRMGEiExRAgRKh0SMzQxUSAQAAAAAAAAAAAAAAAAAAAJD/2gAMAwEA AhEDEQAAANUJsrZYFfFgV8WBXxYEL0ki5fo6GjJuaRuaRuaRuaRuaRuaRuaRuaRuaRuaRuaRuaRu aRuaMHQ5dR3ojnJ9XxYFfFgV8WD0jxf2AodbslbAD6mDhlpLvI/qkuiovZL7CGzNfRCJwQacEGnB Bp0QSdEEnRBJ0QSdEEnRBJ3BBpwQacEHidwQXzPfBA6bBqK5w2nlKVH3iJitt+gAeweP+wFDrdkr Y+vmaN02k6+e3d2Gjo6N0c2zoyaM7xozuGluGluGluGluGluGluGluGluGluGluGluGnG8c/z1YO PVIfJF80xoIGPsfBVVrl6hIrD7+B7B4/7AUOt2StnXaYyxHTJ6ZKvrqb4x9MgAAAAAAAAAAAAAAA DGR8692Dh4pbkIKJscTVNiLdVY1+weP+wFDgJ+JLJORs3XbIc3dGz6ZAAAAAAAAAAAAAAAAAAAPn R0ayMi5uLqv1S51eIT2Dx/2AofB38Ra5uIm6kOzm6o+gAAAAAAAAAAAAAAAAAAAPj7+TkjJWNIOt 2et1WfYPH/YIofH2cZcJyEnKkenn6IyAAAAAAAAAAAAAAAAAAABjODmjZONIWt2WtVWPYPH/AGCK Hx9nIXGcg5ypLfo3xkAAAAAAAAAAAAAAAAAAADGcHPGyUaQ1astaqseweP8AsEUPk6+QuM7BTtSW 7TujIAAAAAAAAAAAAAAAAAAAGM4OeOkY4hqzZqzVY9g8f9gih8nXyFxnYKdqS3ad0ZAAAAAAAAAA AAAAAAAAAAxnBzx0jHENWbNWarHsHj/sEUPk6+QuM7BTtSW7TujIAAAAAAAAAAAAAAAAAAAGM4Oe OkY4hqzZqzVY9g8f9gih8nXyFxnYKdqS3ad0ZAAAAAAAAAAAAAAAAAAAAxnBzx0jHENWbNWarHsH j/sEUPk6+QuM7BTtSW7TujIAAAAAAAAAAAAAAAAAAAGM4OeOkY4hqzZqzVY9g8f9gih8nXyFxnYK dqS3ad0ZAAAAAAAAAAAAAAAAAAAAxnBzx0jHENWbNWarHsHj/sEUPk6+QuM7BTtSW7TujIAAAAAA AAAAAAAAAAAAAGM4OeOkY4hqzZqzVY9g8f8AYIofJ18hcZ2Cnakt2ndGQAAAAAAAAAAAAAAAAAAA MZwc8dIxxDVmzVmqx7B4/wCwRQ+Tr5C4zsFO1JbtO6MgAAAAAAAAAAAAAAAAAAAYzg546RjiGrNm rNVj2Dx/2CKHydfIXGdgp2pLdp3RkAAAAAAAAAAAAAAAAAAADGcHPHSMcQ1Zs1ZqseweP+wRQ+Tr 5C4zsFO1JbtO6MgAAAAAAAAAAAAAAAAAAAYzg546RjiGrNmrNVj2Dx/2CKHydfIXGdgp2pLdp3Rk AAAAAAAAAAAAAAAAAAADGcHPHSMcQ1Zs1ZqseweP+wRQ+Tr5C4zsFO1JbtO6MgAAAAAAAAAAAAAA AAAAAYzg546RjiGrNmrNVj2Dx/2CKHydfIXGdgp2pLdp3RkAAAAAAAAAAAAAAAAAAADGcHPHSMcQ 1Zs1ZqseweP+wRQ+Tr4y5TkHOVJb9G+MgAAAAAAAAAAAAAAAAAAAYzg542SjSGrVlrVVj2Dx/wBg ih8fZxlxnIKcqT6ObpjIAAAAAAAAAAAAAAAAAAAGM4OeNkY0h61Za1VY9g8f9gih8Xbwlxm4GbqW 6uLrj7AAAAAAAAAAAAAAAAAAAA+fr5OaNkI0ia1Y61Vb9g8f9gihxknCl1m65N1OdsZ3x0ZxkAAA AAAAAAAAAAAAAAAAx8fek5ozui6jazYKsRPsHj/sEUOu2Ktlqn6XZ6scjBSRLbOPpjYxkAAAAAAA AAAAAAAAAAYfJjm+uM0xXVE1xVOZr0Y9g8f9gKHW7JWz7s1W6i9SdYlasXXB9pLbI7fHY5/s3NeT 7fGT6fI+nyPp8j6fI+nyPp8j6fI+nyPp8j6fI+nyPp8D7x8fJtxp1m7Tp5jbw/MfWIjbXTk5SHsH j/sBQ63ZK2AdthqO8vXbUZWrJ0V/oJ7ZB7Sa+ofJMIkS6IySyJRLIkSyJEsiRLIkSyJEsiRLIkSy JVLYiRLYicEr8xfwSemN0kjy8PIdkfxQp0xWEAPYPH/YCh1uyVsAAz08ome2si37qZkumaULspIu 2aRkuyki7KSLspIuyki7KSLspIuyki7KSLtilC6qSLtilC6fNNFu5qz8k7wcI+vkAAHsHj/sBWoQ AAAAAAAAAAAAAAAAAAAAAAAAAHpAf//aAAgBAgABBQD/ACi//9oACAEDAAEFAP8AKL//2gAIAQEA AQUA6w6rz/LM+776rO++qzvvqs776rO++qzvvqs776rO++qzvvqs776rO++qzvvqs776rO++qzvv qs776rO++qzvvqs776rO++qzvvqs776rO++qzvvqs776rO++qzvvqs776rO++qzvvqs776rO++qz vvqs776rO++qzvvqs776rO++qzvvqs776rO++qzvvqs776rO++qzvvqs776rO++qzvvqs776rO++ qzvvqs776rMfLPYHlHyRFUbivuDeUv1FOSVKJkRwE4CcAOAHADgBwA4AcAOAHADgBwA4AcAOAHAD gBwA4AcAOAHADgBwA4AcAOAnARciFyRUK8ndQcgyGxaaqf4fYHlHwRFUjZe68RsqbpGoKIUQkKYY kISEYJDAmBMCYEwJgTAmBMCYEwJgTAmBMCYEwJgTAmBMCYEwJgTAmCQWELCKoSFcNByEhIyxusk5 VVQV0VUL8vYHlGltupyqDlaIMREQaijcUoilMUSKgkZDDIYZDDIYZDDIYZDDIYZDDIYZDDIYZDDI YZDDIYZDDIYZDDIYZDDIYZDDIYZDDIYZDDILGQWKVRSuKORR2KPRCZltDiSYrjFXx9geUaG26nKs vy9KEjxhmONRxuOUMFLAjIjJdF0XRdIXSF0hdF0XRdF0XRdF0XRdF0XRdF0XRdIXSF0hdIXRdCsi sisFTBXHHY49GH4xMhU10y4tTFfw9geUCJ9rlcL6SNHGGBlgbZKGilsShDZQ+kPr/wBX0fSGygtC CtoVNDjI6wPsElgzCGjlLrdTden2B5QZfGvnYbCIkdkYZGmihsSn61ItJXQOtD7JIZJTBm0X6+Hs DyhP1cpjbLcVojtDLY3QIn1qZU+yugebJDRKaJ7CVUvtq27o9geURaLx6C19JFbI7Y1QU0/WqFQd oH6CS2TG/wAzZrZd0ewPKMqo2n4VH5FoGKBunVTifj9JJpJdBnVH+mj2B5RkqfdcOki0jFJQn5qm pPx5CTSS6TOKf6tHsDyjI0/2hIRU/GUKbNU1DyfklCWhm6f06PYHlGRf9QkIqfjKCWapWx4kkszj daPYHlGQ2wrItjImqlseJJMM43Wj2B5RkNsEjWNarUeJJMM43Oj2B5RkNsEjWNarUeJJMM43Oj2B 5RkNsGyLY1qtR6ySTDONzo9geUZDbBsi2NarUesk2TDON1o9geUZDbBsjWNarUesk2TDON1o9geU ZDbBsjWNarUeskkwzjdaPYHlGQ2wbI1jWq1HrJJMM43Wj2B5RkNsGyNY1qtR6ySTDON1o9geUZDb BsjWNarUeskkwzjdaPYHlGQ2wbI1jWq1HrJJMM43Wj2B5RkNsGyNY1qtR6ySTDON1o9geUZDbBsj WNarUeskkwzjdaPYHlGQ2wbI1jWq1HrJJMM43Wj2B5RkNsGyNY1qtR6ySTDON1o9geUZDbBsjWNa rUeskkwzjdaPYHlGQ2wbI1jWq1HrJJMM43Wj2B5RkNsGyNY1qtR6ySTDON1o9geUZDbBsjWNarUe skkwzjdaPYHlGQ2wbI1jWq1HrJJMM43Wj2B5RkNsGyNY1qtR6ySTDON1o9geUZDbBsjWNarUeskk wzjdaPYHlGQ2wbI1jWq1HrJJMM43Wj2B5RkNsGyNY1qtR6ySTDON1o9geUZDbBsjWNarUeskkwzj daPYHlGQ2wbI1jWq1HrJJMM43Wj2B5RkNsGyNY1qtR6ySTDON1o9geUZDbBsjWNarUeskkwzjdaP YHlGQ2wbI1jWq1HrJNkwzjdaPYHlGQ2wbItjWq1HrJNkwzjdaPYHlGQ2wbItjWq1HrJJMM43Oj2B 5RkNsGyNY1qtR4kkwzjc6PYHlGQ2wSNY1qtR4kkwzjc6PYHlGQ2wrItjImqlseJJMM43Wj2B5RkV sJSKv4yolmqVseJJLM43Wj2B5Rkf/UJSKv4ypTZqmoeX8kqS1M43Oj2B5Rki/wC0Koi1DKlC/mqa h5SSpLUzdf6tHsDyjJ6/p2HURaxiobX81TWv4/USaiXUZy59N6PYHlGXubEiE5+RaxisaqEXVCjl Q/WSayXX+Zy59ro9geUUVbNeXPpVRFdI7gzWUVfeqK6h2skOElwmu/ST3bx/R7A8oMpk/SxHiM8M OjThTX9iLqWqr6HHB50kOkp4zSVsUVKqro9geUDLit15fLSumM+MPjTw26UuCVH2moPsWoqcK3R1 4feJD5MkIiTpKvO6fYHlGiFLViuHLSpGJAzIGnyh8peKXRHEEcQ20NtDbQ2kNpDaQ2kNpDaQ2kNp DaQ2kNpDaQ2kNpDaQ2kNpDaQ2kNpDaQ20NtDbQVxBXEFdKnit8cfHpA/IJMn6TMp+0vw9geUaYU+ pmqJNprRmUNSRuSUSSmQgkgSQI+X5fl+X5fl+X5fl+X5fl+X5fl+X5fl+X5fl+X5fl+X4r4sgWQV SCuSOSR2SPSiRLREzDMlUVVVfh7A8o+EeW4wsTNKKxmYijcsollMspliSxJZjDGIYxDGIYxDGIYx DGIYxDGIYxDGIYxDGIYxDGIYxDGIYxDGIYxDGIYxDGIYxBZYssqllUsrljksdmISsxooSVmLjyqq r8vYHlHxRVRWZ77QznNI3mzSlGZUKU5hSJmKHEUOIocRQ4jScRQ4ihxFDiKHEUOIocRQ4ihxFDiK HEUOIocRQ4ihxFDiKHEUOIocRpOIocRQ4ihxFBcxQXMEKsxpHM1aQezmhB/M3nCquqtfn7A8o/hS utC9dL50vnS/eL94v3i/eL94v3i/eL94v3i/eL94v3i/eL94v3i/eL94v3i/eL94v3i/eL94v3i/ eL50vnS9dLytT7X+PrDhvHuTHJjkxyY5McmOTHJjkxyY5McmOTHJjkxyY5McmOTHJjkxyY5McmOT HJjkxyY5McmOTHJjkxyY5McmOTHJjkxyY5McmOTHJjkxyY5McmOTHJjkxyY/pP/aAAgBAgIGPwBR f//aAAgBAwIGPwBRf//aAAgBAQEGPwCPk8jmv2su47DV1z9uE90V5xHl7vuKrTXWMHDNdYwcM11j BwzXWMHDNdYwcM11jBwzXWMHDNdYwcM11jBwzXWMHDNdYwcM11jBwzXWMHDNdYwcM11jBwzXWMHD NdYwcM11jBwzXWMHDNdYwcM11jBwzXWMHDNdYwcM11jBwzXWMHDNdYwcM11jBwzXWMHDNdYwcM11 jBwzXWMHDNdYwcM11jBwzXWMHDNdYwcM11jBwzXWMHDNdYwcM11jBwzXWMHDNdYwcM11jBwzXWMH DNdYwcM11jBwzXWMHDNdYwcM11jBwzXWMHDNdYwcM11jBwzXWMHDP+z/AEd/2MzUhXbvz7H6XVO/ Y7vFJSkpSUpKUlKSlJSkpSUpKUlKSlJSkpSUpKUlKSlJSkpSUpKUlKSlJSkpSUpKUlKSlJSkp+le p3d6ndOn4OZqQrt349EOqp0QT9PVfzGDBgwYMGDBgwYMGDBgwYMGDBgwYMGDBgwYMGDBgwYMGC9X RVh9/wAjo8nRfnmakK7d+H+LqdVEefTqonYYMGDBgwYMGDBgwYMGDBgwYMGDBgwYMGDBgwYMGDBg wYMGDBeqd/uKip2+/wAszUhXbsqOutURVT9SidhgwYMlZ/XsGDBgvYVFQVOnb6fHM1IV27J0QR95 O6idhOwyaWC9hU6d/oK6v0+GZqQrt2RFVOyCdhBJrUU/cRO6N+GZqQrt06CL07qIJNiijydGjzsu ZqQrt0dd/MRBBJsUUU/y+8uZqQrt06/YQQSbFFFOv2WXM1IV26KIJNyij0uZqQrt0e8iCTcoo/Lm akK7dHvIggk2KKKPy5mpCu3R7yIJNyij8uZqQrt0e8iCTcoo/LmakK7dHvIgk3KKPy5mpCu3R7yI JNyij8uZqQrt0e8iCTaooo/LmakK7dHvIgk3KKPy5mpCu3R7yIJNyij8uZqQrt0e8iCCTaoo/Lma kK7dHvIggk2qKPy5mpCu3R7yIIJNqij8uZqQrt0e8iCCTaoo/LmakK7dHvIggk2qKPy5mpCu3R7y IIJNqij8uZqQrt0e8iCCTaoo/LmakK7dHvIggk2qKPy5mpCu3R7yIIJNqij8uZqQrt0e8iCCTaoo /LmakK7dHvIggk2qKPy5mpCu3R7yIIJNqij8uZqQrt0e8iCCTaoo/LmakK7dHvIggk2qKPy5mpCu 3R7yIIJNqij8uZqQrt0e8iCCTaoo/LmakK7dHvIggk2qKPy5mpCu3R7yIIJNqij8uZqQrt0e8iCC Taoo/LmakK7dHvIggk2qKPy5mpCu3R7yIIJNqij8uZqQrt0e8iCTcoo/LmakK7dHvIgk2qKKPy5m pCu3R7yIJNyij8uZqQrt0e8iCTcoo/LmakK7dHvIgk3KKPy5mpCu3R7yIJNyij8uZqQrt0e8iCCT aoo/LmakK7dHvIgk3KKPy5mpCu3R4QSblFHpczUhXboqfcQQSbVFFT7y5mpCu3RPzEEEmxRRRHZc zUhXbojyfRR1RBJsUUUX7JLmakK7dk/bVfAgk2KKL37qwVV+suZqQrt2RHk+giook2L3F7i9GJ8M zUhXbsqItFRFRRO40aNmVo0aL3FhuL5+OZqQrt34I69REVFGjRo0aNGjf6po0aNGjRo0XuK5DXv9 zqrV+OZqQrt349UXt9hEVeijRo0aNGjRo0aNGjRo0aNGjRo0aNGjRo0aNGjRo0aNGjRo0Xq9/YVH V6OnVflmakK7d+XVOw3qh0e7FM7PJ7KQ0aNGjRo0aNGjRo0aNGjRo0aNGjRo0aNGjRpSKaH6V6nR 3sh1eXr+BmakK7d/C7KqFJfZTX2U19lNfZTX2U19lN72U3vZTe9lN72U3vZTe9lN72U3vZTe9lN7 2U3vZTe9lN72U3vZTe9lN72U3vZTe9lN72U19lNfZTX2U19lNfZSX2d3l/Ej/wAj/wCf+7/jD6/y f5/7tBOnX+L/AMfr+5tPKm08qbTyptPKm08qbTyptPKm08qbTyptPKm08qbTyptPKm08qbTyptPK m08qbTyptPKm08qbTyptPKm08qbTyptPKm08qbTyptPKm08qbTyptPKm08qbTyptPKm08qbTyptP Km08qbTyptPKm08qbTyptPKm08qbTyptPKm08qbTyptPKm08qbTyptPKn/jan//Z"
+ transform="matrix(0.24 0 0 0.24 174.5615 142.499)"
+ id="image25">
+ </image>
+ </g>
+ </mask>
+ <g
+ opacity="0.09"
+ mask="url(#SVGID_1_)"
+ a:adobe-blending-mode="multiply"
+ a:adobe-opacity-share="1"
+ id="g27">
+ <path
+ fill="#1D2915"
+ a:adobe-blending-mode="normal"
+ a:adobe-opacity-share="0"
+ d="M195.361,251.626 c-8.161,0-14.8-6.64-14.8-14.8v-73.527c0-8.161,6.639-14.8,14.8-14.8h59.663c8.161,0,14.8,6.639,14.8,14.8v73.527 c0,8.16-6.639,14.8-14.8,14.8H195.361z"
+ id="path29" />
+ <path
+ fill="#1D2915"
+ a:adobe-blending-mode="normal"
+ a:adobe-opacity-share="0"
+ d="M255.024,152.499 c5.964,0,10.8,4.835,10.8,10.8v73.527c0,5.965-4.835,10.8-10.8,10.8h-59.663c-5.964,0-10.8-4.835-10.8-10.8v-73.527 c0-5.964,4.835-10.8,10.8-10.8H255.024 M255.024,144.499h-59.663c-10.366,0-18.8,8.434-18.8,18.8v73.527 c0,10.366,8.434,18.8,18.8,18.8h59.663c10.366,0,18.8-8.434,18.8-18.8v-73.527C273.824,152.933,265.391,144.499,255.024,144.499 L255.024,144.499z"
+ id="path31" />
+ </g>
+</g>
+<g
+ id="g33">
+ <g
+ id="g35">
+ <linearGradient
+ id="SVGID_2_"
+ gradientUnits="userSpaceOnUse"
+ x1="225.1929"
+ y1="152.499"
+ x2="225.1929"
+ y2="247.6265">
+ <stop
+ offset="0.0123"
+ style="stop-color:#C1D72F"
+ id="stop38" />
+ <stop
+ offset="0.1394"
+ style="stop-color:#BCD631"
+ id="stop40" />
+ <stop
+ offset="0.5859"
+ style="stop-color:#AFD136"
+ id="stop42" />
+ <stop
+ offset="1"
+ style="stop-color:#ABD037"
+ id="stop44" />
+ <a:midPointStop
+ offset="0.0123"
+ style="stop-color:#C1D72F" />
+ <a:midPointStop
+ offset="0.3086"
+ style="stop-color:#C1D72F" />
+ <a:midPointStop
+ offset="1"
+ style="stop-color:#ABD037" />
+ </linearGradient>
+ <path
+ d="M184.562,236.826c0,5.965,4.835,10.8,10.8,10.8h59.663c5.964,0,10.8-4.835,10.8-10.8v-73.527 c0-5.964-4.835-10.8-10.8-10.8h-59.663c-5.964,0-10.8,4.835-10.8,10.8V236.826z"
+ id="path46"
+ fill="url(#SVGID_2_)" />
+ </g>
+ <defs
+ id="defs48">
+ <filter
+ id="Adobe_OpacityMaskFilter_1_"
+ filterUnits="userSpaceOnUse"
+ x="184.562"
+ y="152.499"
+ width="81.263"
+ height="95.127">
+
+ <feColorMatrix
+ type="matrix"
+ values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0"
+ color-interpolation-filters="sRGB"
+ result="source"
+ id="feColorMatrix51" />
+ </filter>
+ </defs>
+ <mask
+ maskUnits="userSpaceOnUse"
+ x="184.562"
+ y="152.499"
+ width="81.263"
+ height="95.127"
+ id="SVGID_3_">
+ <g
+ filter="url(#Adobe_OpacityMaskFilter_1_)"
+ id="g54">
+
+ <image
+ overflow="visible"
+ width="356"
+ height="414"
+ xlink:href="data:image/jpeg;base64,/9j/4AAQSkZJRgABAgEBLAEsAAD/7AARRHVja3kAAQAEAAAAHgAA/+4AIUFkb2JlAGTAAAAAAQMA EAMCAwYAAAXBAAALIQAAEOP/2wCEABALCwsMCxAMDBAXDw0PFxsUEBAUGx8XFxcXFx8eFxoaGhoX Hh4jJSclIx4vLzMzLy9AQEBAQEBAQEBAQEBAQEABEQ8PERMRFRISFRQRFBEUGhQWFhQaJhoaHBoa JjAjHh4eHiMwKy4nJycuKzU1MDA1NUBAP0BAQEBAQEBAQEBAQP/CABEIAaEBawMBIgACEQEDEQH/ xACYAAEAAgMBAQAAAAAAAAAAAAAABAcBBQYDAgEBAAAAAAAAAAAAAAAAAAAAABAAAAMIAwEAAgMB AAAAAAAAAAIGATIDBBQFFjZQMwcRECKQMRMSEQABAgQEBgEBBwQDAQAAAAAAAQIxcgMEEFCRsyGC M6PTNBFBIGFxEiIyE1GB0UKhscFiEgEAAAAAAAAAAAAAAAAAAACQ/9oADAMBAAIRAxEAAADy0npz Z0Dnx0DS7Q9kr0IKcIKeICeICeICeICeICeICeICeICeICeICeICeICfggp2CElQD1aXxOgc+O1s um7kKj5vpObG6d2Q9zspRA9JmSGmCHmWIiWIiWIiWIiWIiWIiWIiWIiWIiWIiWIiWIaYIeJo1sPe 4OK5C2tCVS3OmN5clN3IVHod9EOv6zWb0zkAAAAAAAAAAAAAAAAAMRJnwcVXltVuetyU3chUfp5+ 5YexhTgAAAAAAAAAAAAAAAAABjODUVxZNbnjclN3IVHIjyCx5sKaAAAAAAAAAAAAAAAAAAMZwaut rJrY8bkpu5Co5EeQWPNhTQAAAAAAAAAAAAAAAAABjODV1tZNbHjclN3IVHIjyCx5sKaAAAAAAAAA AAAAAAAAAMZwautrJrY8bkpu5Co5EeQWPNhTQAAAAAAAAAAAAAAAAABjODV1tZNbHjclN3IVHIjy Cx5sKaAAAAAAAAAAAAAAAAAAMZwautrJrY8bkpu5Co5EeQWPNhTQAAAAAAAAAAAAAAAAABjODV1t ZNbHjclN3IVHIjyCx5sKaAAAAAAAAAAAAAAAAAAMZwautrJrY8bkpu5Co5EeQWPNhTQAAAAAAAAA AAAAAAAABjODV1tZNbHjclN3IVHIjyCx5sKaAAAAAAAAAAAAAAAAAAMZwautrJrY8bkpu5Co5EeQ WPNhTQAAAAAAAAAAAAAAAAABjODV1tZNbHjclN3IVHIjyCx5sKaAAAAAAAAAAAAAAAAAAMZwautr JrY8bkpu5Co5EeQWPNhTQAAAAAAAAAAAAAAAAABjODV1tZNbHjclN3IVHIjyCx5sKaAAAAAAAAAA AAAAAAAAMZwautrJrY8bkpu5Co5EeQWPNhTQAAAAAAAAAAAAAAAAABjODV1tZNbHjclN3IVHIjyC x5sKaAAAAAAAAAAAAAAAAAAMZwautrJrY8bkpu5Co5EeQWPNhTQAAAAAAAAAAAAAAAAABjODV1tZ NbHjclN3IVHIjyCx5sKaAAAAAAAAAAAAAAAAAAMZwautrJrY8bkpu5Co5EeQWPNhTQAAAAAAAAAA AAAAAAABjODV1tZNbHjclN3IVH7+HqWTO1uxMgAAAAAAAAAAAAAAAAAYzg1Vb2NXB5XJTdyFRx5G jLc3XG9SS2MgAAAAAAAAAAAAAAAAD4+ohqq47GvTa3JTdyFR830nNm/7qp+gLVk8fuDcZgehLRBL RBLRBLRBLRBLRBLRBLRBLRBLRBLRBLRBLRBLRBLRBKQohP0MbkT40OcG8uSm7kKj5vpObAJm45sd n98SO3cQO3cQO3cQO3cQO3cQO3cQO3cQO3cQO3cQO3cQO3cQO3cQO3cQO3cQO3xxI7PX84JcQAN5 clN3IAAAAAAAAAAAAAAAAAAAAAAAf//aAAgBAgABBQD+G3//2gAIAQMAAQUA/ht//9oACAEBAAEF AFgq7/bL9narGdqsZ2qxnarGdqsZ2qxnarGdqsZ2qxnarGdqsZ2qxnarGdqsZ2qxnarGdqsZ2qxn arGdqsZ2qxnarGdqsZ2qxnarGdqsZ2qxnarGdqsZ2qxnarGdqsZ2qxnarGdqsZ2qxnarGdqsZ2qx narGdqsZ2qxnarCYVyhn78PQNo/MCUmJhssm48QEScNrGJGEMQgjEIIxCCMQgjEIIxCCMQgjEIIx CCMQgjEIIxCCMQgjEIIxCCMQgjEIIxCCMQgjEIIxCCMQgjEIIxCCMQgjEIIxCCMQgjEIQakYQOlI bGTCajw2R5SPLm/KK2gegbR+LVYzzDZGzFKyBaysYS3FYGSBBQkFCQUJBQkFCQUJBQkFCQUJBQkF CQUJBQkFCQUJBQkFCQUJBQkFCQUJBQkFCQUJBQkFCQUJBQkFCQNkCA9uK0R7WVrJ+ykMy6WI8BrW NY0IraB6BtAsdqbMHtttYxkvKFKxhCs4JpCtExKFMy5W5jWX22NgRAitoHoG0SsBsePZZFhSSkuw peFm5dhi3qRKYk1BbAjoraB6BtCcl/8ASYtUBjCkL8Lwp2fS3WCxpVDA/wA5lFbQPQNoShGNLbif CcM3+roX9VQz4ZFbQPQNoSLP0t7P04e5uql5FbQPQNoSPXIOcPc3VU8itoHoG0JHrkHOHubqqeRW 0D0DaEj1yDnD3N1VPIraB6BtCR65Bzh7m6qnkVtA9A2hI9cg5w9zdVTyK2gegbQkeuQc4e5uqp5F bQPQNoSPXIOcPc3VU8itoHoG0JHrkHOHubqqeRW0D0DaEj1yDnD3N1VPIraB6BtCR65Bzh7m6qnk VtA9A2hI9cg5w9zdVTyK2gegbQkeuQc4e5uqp5FbQPQNoSPXIOcPc3VU8itoHoG0JHrkHOHubqqe RW0D0DaEj1yDnD3N1VPIraB6BtCR65Bzh7m6qnkVtA9A2hI9cg5w9zdVTyK2gegbQkeuQc4e5uqp 5FbQPQNoSPXIOcPc3VU8itoHoG0JHrkHOHubqqeRW0D0DaEj1yDnD3N1VPIraB6BtCR65Bzh7m6q nkVtA9A2hI9cg5w9zdVTyK2gegbQkeuQc4e5uqp5FbQPQNoSPXIOcPc3VU8itoHoG0JHrkHOHubq qeRW0D0DaEj1yDnD3N1VPIraB6BtCR65Bzh7m6qnkVtA9A2hI9cg5w9zdVTyK2gegbQkeuQc4e5u qp5FbQPQNoSPXIOcPc3VU8itoHoG0JHrkHOHubqqeRW0D0DaEj1yDnD3N1VPIraB6BtCR65Bzh7m 6qnkVtA9A2hI9cg5w9zdVTyK2gegbQkeuQc4e5uqp5FbQPQNoSLlvb+nD3N1UvIraB6BtCTN8Jbj /ScM3+rob9VQ36ZFbQPQNoTUx/xGtcdjSlb9ZwsRvwt1jMYVRR/+5hFbQPQNokZinmbPOsaWVjsM XhZuOwpbxOsYWcjtjzCK2gegbQLDdv8ANtuuDGsgTJTMYZjeCaZjBHmSlZcbgxjL9dGxDBFbQPQN oDGtK2z31pBJXYrWQLmVrCz5Whk8QVpBWkFaQVpBWkFaQVpBWkFaQVpBWkFaQVpBWkFaQVpBWkFa QVpBWkFaQVpBWkFaQVpBWkFaQVpBWkDZ4gNPkYI9zKxk7dysZdr80zTGaZoRW0D0DaPzK3Oalmyy oYwEVEv8yqXGVS4yqXGVS4yqXGVS4yqXGVS4yqXGVS4yqXGVS4yqXGVS4yqXGVS4yqXGVS4yqXGV S4yqXGVS4yqXGVS4yqXGVS4yqXGVS4yqXGVS4yqXB1RL/JlUMMyauU1Mt/KK2gegbRxaK2jj/wD/ 2gAIAQICBj8AG3//2gAIAQMCBj8AG3//2gAIAQEBBj8Ar2djdfxW7G01az+Ok74VzEcvF7FWJ73Z o+M97s0fGe92aPjPe7NHxnvdmj4z3uzR8Z73Zo+M97s0fGe92aPjPe7NHxnvdmj4z3uzR8Z73Zo+ M97s0fGe92aPjPe7NHxnvdmj4z3uzR8Z73Zo+M97s0fGe92aPjPe7NHxnvdmj4z3uzR8Z73Zo+M9 7s0fGe92aPjPe7NHxnvdmj4z3uzR8Z73Zo+M97s0fGe92aPjPe7NHxnvdmj4z3uzR8Z73Zo+M97s 0fGe92aPjPe7NHxnvdmj4z3uzR8Z73Zo+Ms7O7u/5Leq5yVGfx0m/KIxzotYixTC5kpbbfsfFJir 9/0EWo74+5qHH8y/3IO1Ug7VSDtVIO1Ug7VSDtVIO1Ug7VSDtVIO1Ug7VSDtVIO1Ug7VSDtVIO1U g7VSDtVIO1Ug7VSDtVIO1Ug7VSDtVIO1Ug7VSDtVIO1Ug7VSDtVIO1U4fmT+5803fP3Kn+D4qsVP v+n2LCd22/C5kpbbcUqVkX4+jf8AIiI34QTgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIEBe AqK1FRfuFqUE/SkWf4PhY4WE7tt+FzJS224JWqJw+f0ov/YnATgcMi4i8BeAtdifpX9yf+4WE7tt +FzJS22jKSfVeP4DUROCCcMmXgORU4KPpL/qvD8CwndtvwuZKW20dUVIcEE4Hxkyi8BHon7uC/2L Cd22/C5kpbbT5/8AoTKFG/iWE7tt+FzJS22nMomUKNmLCd22/C5kpbbTmUTKFGzFhO7bfhcyUttp zKJlCjZiwndtvwuZKW205lEyhRsxYTu234XMlLbacyiZQo2YsJ3bb8LmSlttOZRMoUbMWE7tt+Fz JS22nMomUKNmLCd22/C5kpbbTmUTKFGzFhO7bfhcyUttpzKJlCjZiwndtvwuZKW205lEyhRsxYTu 234XMlLbacyiZQo2YsJ3bb8LmSlttOZRMoUbMWE7tt+FzJS22nMomUKNmLCd22/C5kpbbTmUTKFG zFhO7bfhcyUttpzKJlCjZiwndtvwuZKW205lEyhRsxYTu234XMlLbacyiZQo2YsJ3bb8LmSlttOZ RMoUbMWE7tt+FzJS22nMomUKNmLCd22/C5kpbbTmUTKFGzFhO7bfhcyUttpzKJlCjZiwndtvwuZK W205lEyhRsxYTu234XMlLbacyiZQo2YsJ3bb8LmSlttOZRMoUbMWE7tt+FzJS22nMomUKNmLCd22 /C5kpbbTmUTKFGzFhO7bfhcyUttpzKJlCjZiwndtvwuZKW205lEyhRsxYTu234XMlLbacyiZQo2Y sJ3bb8LmSlttOZRMoUbMWE7tt+FzJS22nMomUKNmLCd22/C5kpbbTmUTKFGzFhO7bfhcyUttpzKJ lCjZiwndtvwuZKW205lEyhRsxYTu234XMlLbacyiZQo2YsJ3bb8LmSlttOZRMoUbMWE7tt+FzJS2 2nMomUKNmLCd22/C5kpbbTmUTKFGzFhO7bfhcyUttpzCZQo38SwndtvwuZKW20dTVfvQQ+cmUXiI xFhxUsJ3bb8LmSlttGVPp8/C/go1fkTjky8RyqsB9T6KvD8CwndtvwuZKW23BKNR3wqftX+qCcRO JwyLiLxF4i0Ka8V/cuFhO7bfhcyUttuCKi/CpBRtOs74cnBF/qJ+oiRIkSJEiRIkSJEiRIkSJEiR IkSJEiRIkSJEiRIkReIv6hadFfl31d9EFc5flViuFhO7bfhcyUttv2ERrvzNT/VT4qIrf+TqIdVD qodVDqpqdVNTqpqdVNTqpqdVNTqpqdVNTqpqdVNTqpqdVNTqpqdVNTqpqdVNTqpqdVNTqpqdVNTq pqdVNTqpqdVNTqpqdVDqodVDqC/xorl0F/O74av+qfYsJ3bb8LmSlttyywndtvzD/9k="
+ transform="matrix(0.24 0 0 0.24 182.5615 150.499)"
+ id="image56">
+ </image>
+ </g>
+ </mask>
+ <g
+ opacity="0.35"
+ mask="url(#SVGID_3_)"
+ a:adobe-opacity-share="1"
+ id="g58">
+ <path
+ a:adobe-opacity-share="0"
+ d="M184.562,236.826c0,5.965,4.835,10.8,10.8,10.8h59.663 c5.964,0,10.8-4.835,10.8-10.8v-73.527c0-5.964-4.835-10.8-10.8-10.8h-59.663c-5.964,0-10.8,4.835-10.8,10.8V236.826z"
+ id="path60"
+ fill="#1D2915" />
+ </g>
+</g>
+<linearGradient
+ id="SVGID_4_"
+ gradientUnits="userSpaceOnUse"
+ x1="226.1924"
+ y1="159.7139"
+ x2="226.1924"
+ y2="200">
+ <stop
+ offset="0.0123"
+ style="stop-color:#FFFFFF"
+ id="stop63" />
+ <stop
+ offset="0.3788"
+ style="stop-color:#F8FBF3"
+ id="stop65" />
+ <stop
+ offset="1"
+ style="stop-color:#F2F7E8"
+ id="stop67" />
+ <a:midPointStop
+ offset="0.0123"
+ style="stop-color:#FFFFFF" />
+ <a:midPointStop
+ offset="0.4383"
+ style="stop-color:#FFFFFF" />
+ <a:midPointStop
+ offset="1"
+ style="stop-color:#F2F7E8" />
+</linearGradient>
+<polygon
+ fill="url(#SVGID_4_)"
+ points="221.189,159.714 214.142,180.951 224.048,180.951 214.142,200 238.243,173.61 227.655,173.61 236.978,159.714 "
+ id="polygon69" />
+<g
+ id="g71">
+ <g
+ id="g73">
+ <g
+ id="g75">
+
+ <image
+ overflow="visible"
+ opacity="0.75"
+ a:adobe-blending-mode="multiply"
+ a:adobe-opacity-share="1"
+ width="392"
+ height="242"
+ xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAYwAAAD2CAYAAADF97BZAAAACXBIWXMAAC4jAAAuIwF4pT92AAAA GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAHohJREFUeNrsnYlu40gSBZMU5Z75 /4+dbUsiFwtY2JrqvIqHSEoRACFZPtqk3BV8WVcvAAAACXouAQAAIAwAAEAYAADwWgYuwSp0XAKA wzJxCRAGIgCANf8fIxaE8RIxIBaA8yeMDokgjLkNfLfyzwOAfWTRNX49EkEY5h9N6+sIAuC8/++n mXKZjJ/5UfIYPuyPRXut9WOEAXDuxOGJYEqKZPpEebyjMOYKoTO+BmEAfIYwSjG0JJFaHm8rjncS RkYE2uutwkAgAO8liezzTPqY3jl1vIMwooa+fi0SRvQzshIBgHMKYwpez5Su3jJ1nFUYLWWlznne KpHW5AEAx5fF5Aijfi0jDy91nFocZxRGJgnUMvDkkf3arDiQCMD+YshIwxKE93xy5CGJ1HFqcZxJ GEsE4b0WHa3JA2EAHEcYU8PjlJREdESp47TiOIMwIlG0yqEPPl4iDmQBcCxpZMtOmWNs+Fy2n6M7 kzSOLIy5oogk0SsfZwWCNADeSxhZMYzGYy2I8uslIY5TpY2jCiMzsikjCO2xDz4fiaNFGggDYD9h LJGF9uh9rq8+7hxxWLI4vDiOJozsKCdPFJoc5ry2JG0gDYDzJouxOrTXLJHUsuiKz4uROurS1GHL VEcShpcqNGFoZSZLBBfla6zXO0MeGXGQMgCOkyyyopgCMfzveDifs44yRdQlLKtEdei0cRRhaLKI UkXZoFtCeH7uUn3dJfF9UV8HwgA4tzDG6nktjYfy/OF8zhJLZ0hjEns01SHTxt7C8EpQmdKTlhQu lSguxmu1TLSfNac8hTQAji+MMZEsahHUx6g8743v1aQxOudzSGnsKYyoBOUlCk0StQQGRRrW4aUO bWRVpj8DYQDsI4xaFJEwPFk8FGHcDYGUR1/Jon7uzf84bIlqL2FkS1BWP8XFSRKDIozBEclgiMPq CJ8rDSQCsI0cWmWRTRaWDO7BYy2OXhFH2SE+BudymLSxhzAsWbSkCk8S3vNBkUdGGJE06pTUIgTE AbCOKLRylCYNqxyVTRV347gYX9sr4nhUotDKVPXw292l8WphtMrCSxWeEOrjqghDE0hUlrKkYaUL ZACwj1S8lBGli1oYWpL433Eznl8qWdxFL2trfRsiev/GIaTxSmFkJ99po5+0RBHJoXy8Bt+j9WmU /743qU/E7vxGGgD7JBBrCRCvs9sqRd2NZHErRDEY4iiTxV1p72ppiPx/IqDVr7GbNF4ljBZZaKnC E0UtBu3jq5E0PGFcgpJUH8gCcQDsJworXWQTRiSMWyWM5/Oheu3ZltzFLmk/lPbhkCOoXiEMreHM 9FVYsrhWz8vjS3lNE8dglKiyHd9ewqAsBbB/KcoThjbvwhpCG6WL8vgu2pRb0XbdnGpFKY26vbCG 3u4mja2Fkemz8EpQZWOulZq+gkdNIlFZaq4wBGkAHFYWIm2d3lG6uFeiKNPFt9Ku3ESfEOyJY3TS xi7S2FIYc2ThpQpLFF/Bx6U4auFckiWpFlkgCoBjiCPb8T01Jow6WVx/JHEtZPEt+oCaaD6XRUYa b1OSapXFEJSdsodVporKUZlRUpEsEAbAcaWhpYx6WK02lPamSKOWxVBIo1UY3QJpbC6PrYTROhLK SxW1LH5VUvhlvG5JQ0sXWv/FReYNp0UaAPvKYq4wxoQwvIQRlbojYayRNDaVxhbCaFmKXJNFPcrp q5LFL0UUGWlE6UJ7Y7MT9hAGwDmFEaUMb/5F3X/hjb70hulnZVFL4/Sd3l2iLNUHsrBKUL+M48v4 2EoX0ZvqlaIEYQCcWhalNKwNkrz5GPeftuRWtCk30ed8aUsYzU0WdZoo25ZaHJsJZMuSVMs8i6iv opbEX4FAnt+jdXZnZaEtby6IAuBtUsac/oxaGoPy6A2mWZoupiJldK8uTa0pjLmlKK2DOxLFX8br WllKG5Lbsn4UO+0BII1B/uzLqG9Av+XPKQHZNsU7H22IcF2e0qRx2ISRkYU1g3sISlB/KY9/OUlD 67vIyOKSKEO1JAzEAbCfKFqF4c0CL1PGUKSNm9hr1LXchHYJWYjoy4RYZSnZQhxbz8OIRDEYwvhl SOIvQxh/KenC6+hu7eSOpIEwAM4hjCXSuBRp47lW1F1p16wtoFvShSYLa++MUV7Un7GGMFpKUV66 qPssaln8bUijFoY1u9vbOGnp8NkucX0A4LWyEGmbCT6KvnzIWMjiUcgjsyGbdQOa+V0nyW/p2r2i NLVmSWqJLLR0Ycnib6ck5U3S85JFy8KCSzq5kQfA9pJokUX52AdJo6/EkVmwdM6ci2nG0TmyWE0c S4URDaPN9ltkZPG3U5bS5l1kFhecu2w55SeAfcl0FncJgXh9G30hivqxXIE2Gl3ZO6KIymPZo0xI m/VjrFWSmjsqanBkYfVd/K2kC6uj25JFZ7yxraJAEADHF8pUvTYFjbZUd+5T0UY8hfEQfapAZnRl lCpG0eeHaB/XKcOS5CriGFZ6Qyx5aPMuhiBZ/FJkoaUMTRblMNpoFvfS3fOQBcB55DEp/3e9DuJa GE9ZWO1bpvRkNeZWp7u1Z0emNDUp579YGsOCNyBKF9HIqEFp7K1U4Q2lteZcWOu4tM6xoAQF8H7S EKN0Uz9qd/B90Xh3ku+r6IxUMTpHuWWsdvRGacrr09g9YWTnW7RM0rPKU9oyIN7CgpYs1twxD3EA HJcp+f9UuxPvFGnMFUUXpANLGJ5Qyu+t/+1Ddnp3iXKUNu/iy0gYvyQ/Qa8cGaUt+5FJFiJtI5+Q A8D50kVGIpNy0zgtkIYY/0b5PLOnuHZcqpTRK0nIK0+9TBjZLVfnzOrOJI0vQxbafAuvzyJbfmK4 LMB7JAzv/+zU8H+9lEZL2zApopgMcURHVJrqRO+72a0Pw0oX0YZIVsKIylDWkuVav0UpK2upj7mi QA4A504YnkCmoLpQfm/r3hbWarmRHJ5rV3kpwytNaalqljiGhRc+U4qKNkb6ctJFnSa0uRaaLC7J ZEEZCgCBRCOoLHFMxd19JuVEndyeMLIpo98yZcwtSWWXL5/bf/El9kioL7H3tYhmW1rpYm4pCgDe RyCt4pCigRaxZ297w2fHIFWU6aJ8HOTf61uVbd5mKWOYcVFb08Wc/bm1RQTrVFH3WViy6INUgSgA oEUcWn9HL7kFEOtS1BiIojy+5P97cdSlqUfVDnspYzZLh9Vq+3Rn5mBcE6KwtlgtReEli16YiAcA 64vDayt65XszQ2ejhFFu3FTuxfFQksYo+kitXfowOrFHSnmlqGgLVi9daEt9ZCbmibAzHgBsK46u kIFUlY3pp416CmNIlqNulShuRVtYbuB0r26aR6MsNYm/d8aqwpi7DEhm74urU36K9rTQ1p23Fg9E FgCwpjjqmeFdlTK8ctS1eNT2DP+qZPFVSOMm+grcUV/G4s7v1j6MOcuYe3MwNGl8KV8b7cFd/w4i /pR8RAEAc8QRSUOqlPH8+jpljEVJqZbGl5Iq6qPc7e9eScPry5AlKWONeRjeUNpLUI7SEsUg9sxt bwZ3L/RVAMBr04bXCT5Wpam6XF+WpK7y7z6Ka5EqynQxiL2DaC/xaKnNJ+5Fayi1jpQagtKTNXN7 SKSLaClhZAEAa6cNSxrlXX5fpYyxaNdqadyVdnBuyli187ufeaG0foJMyhgMMdSlp0wZykoXIu3b qAIAzE0b2nNtBGl2YdbBaRsHJ2W0rMg9q23sGy5My2S9PnExhsTFyG6BmHkDAQBeLRFNGpeqNOXt RJppG7Wb6i6Qxiz6hpP3RNIHCSNj0swF6WaUopAFALwyZWRvri1xXIL2sWVqQbR67qrCaEkaLUNr 6wtxCWRh7ZVryQFJAMAe0ojazWe7dWlsI6/JhKG1l6KUoma1lf3Ci2RdiGyyuIg+CspbRLA3TD7n jQQA2EIe0Y21Nw1hUB6z0sgkDC8dLRZGNlVkR0hZpSdLFpfkBVhkTgCADVJGZoM5qyLjyaN1o7hV +jH6mTHL2gcjugjWBfHKUN1WJw8AsFG6iGSRLeNn2spoFOlqbWXfeDG6IHK1ysI76cyOeaQLADhr maqfIY2L5Pt5rQ7vzYfVZspUfXC0CsLq5LbGEgMAnC1laP0Z1giqls7ubBl/k07vaOiYtp6TdjKa JKJJJ9n5FqQLADhj2vCG20Y33NlSVNfwu62SMLqkNb2E0SviyMzgXrUOBwDw4pThrY6R6QPOVmo2 7fvNTNzrgs9F9bhIHH3ihC07C+kCAE4mE00ctUCiakymhN+vfZPdz4gm2fHFXSALK0V409pFWPID AM6XNrwUklnANSpZzRlS29x+zllLqiVpZBKHNwoqE6OQBgAcXRTeIoCd0x564siW8K2RUs0MMy9E 9tBOwNv4KFtjQxwA8C5C8drOLlmlya4h5a21Fy513q948llbdo48okglQn8FAJxLCt68Ma1Bt9pD 7fW1O7q7LYQRxausLaPaGivPAsC7yyTbZnZiTznIyENk4UipfuZJtp68VXLyxJGZoEfaAIAzSaJl TtuaCWOVdrJ18UHrJCNZRFErU3ZCCgDwjglDa+u6GQkjszjr5sLIJI2oA8dLGtKYMBAHAJxVDJ4s Mmv1ZWURlaNeKgxJnmBmT9kueZFFKEEBwGdJJjui9CU7j/YrnJTX6Gcn3m1SbwMAOEnyyDT4SxNF tGrtLGF4nc3euN7MbMKsGDIlKMQCAO8kjeyNdIs0Vm0vt+jDiGQS2TVbtgIAOKMkoopMa5uaEc4q 9C+8EF4UmyMpAIB3Tx4tfcGb32T3G52sVzN7iQkBAA4ogJYbbetjbxe9zFp8s8v8/Y4XCQAAkeiN uwSJQiQ3qbn1Jn/zhNHNuDCR5RAKAHyKLDKfjxJG9t/YpdNbpH1/7ZY4BgDw6TKJSvWtW0Espt/g ROes/eQtxYtQAAAOsJFc/6KTmxPJAADAF8RL29F+5xMHAEAGfz5fvHfFFu1tf8ILCgDwbrLIrAi+ xs/+CGEAACCX/FpTm9x4IwwAgPMkka2+/jDCoJwEAPAGbSoJAwDgwxr+owuDlAEAcHJIGAAAgDAA AD6At5jpDQAAJAwAAPikdIEwAAAAYQAAAMIAAACEAQAACAMAABAGAAAgDAAAAIQBAAAIAwAAEAYA ACAMAABAGAAAgDAAAABhAAAAIAwAAEAYAACAMAAAAGEAAADCAAAAhAEAAAgDAAAAYQAAAMIAAACE AQAACAMAABAGAAAgDAAAQBgAAAAIAwAAEAYAACAMAABAGAAAgDAAAABhAAAAwgAAAEAYAACAMAAA AGEAAADCAAAAhAEAAAgDAAAQBgAAAMIAAACEAQDwMUwIAwAASBgAAHDOlIEwAADgUMKYuNQAAOdu F0kYAABwGGGQLgAA1mtHd2tTSRgAAOeThvX58vhYYZBSAOBTJDAl0sXU0EauJhESBgDA/tKoG/U1 GvnVk0a/08UhNQAArJtENqff4KQydbTpyBcFAODA0titA7xf+MtPM09YuwDT1nEKAOCEaSLqw5he 1Wb2K51c5hedErYkUQDAJ0ohalen4KZ9esXN9h4zvefIBQDgE6QxSVyJmSRXllq9xN9vdBEiM2ai FwDAp0hjMm6sWxKGN9oqandTbW+/0clnkkXr8DFkAgBnl8KcG+dJ/AFFU9DGZqUQ3uT3G1yUKGJ5 1pyEkVIA8BkCySSOKHVMiTZ2tfazn3liU/IEopPPXBhkAQDvKIu5N9JTcGx2o903xpLopDIXyJNB JIgp+XsCAJxBHNkb6czN+ZT8Ppl7Q96vcNItJxHZUoKTRBAA8K4CiYbIPp+PDW1t5qb+ZcKQwIxZ C3oJA2kAwLumi0w7OiqSGKWtI3yV9rNPntyc2KQdkRk9cQAAvIscJidZWG3mqHy89IZ804SR6Zix RDFWJzlK23Axz4zIBQDOJBCRuDQ/OqLItKOrDx5asw/DkoRmxFH5mlH8OhzDbQHg3WQRtZuZhDE6 clky9201YURlqDFIGGODGT0rAwCcVRxRKX9MtJ8tJarF7WffcIJZY3mmtKJVFK+s+AYAcBYxRJ+L Sk5jcMzp12iq2myVMFpO0CpXtdoRgQDAGSQSdW5bCePRII1R8h3tL1lLaq4kyhN/SNwhHtkaUQDA UdOFVRXxkoUmh0fQfmZK/SILy/t94mS9dUsiI3on6J209jNF4o5w5AEAZxFHNM/iURxLZbFKGT+7 ltSUSBjRCKjoRB/BBaQjHADOKAmvKqP1UTyM9jFqQz2BaL/D6sJoPenROdHoKC+EVdfLCAJ5AMCR xJGpzHg32I9EW9pSltosYXiiECNWRXW4R0PUmrOoFgDAEdOFJpEoSTyPe/U4VxpzfvdFCSNKGi1W fF6Au7T1a7SsagsAsHe6EMmVo7yb63tSFF5ZalHq6Gc2utnRUZEkshdgSpw8ogCAI6YLWUEUd+fj pQkj3W6uMXEvEkdWEnfR63abxSsAgBeki7k32Hfj0BJH3W5uMlqqbzh5TyCtUSpzEVpKU6QMADhi uvCE8VBuqj1R3IMb72iY7WLmrlabnXuRsWXGng/xZ4KTMgDgiOlCGiowLdKIOr6jzetm7ZGx1bDa TN/F87glLkhLR44IczQAYL90kZnYbI2EqtvEW4M8Mqt/L2of+4YLEfVfaOb0TvJWXIybcWE8e86Z owEAsJUsrOkGmVLUXZFG1D5mb7BXm4vRz7worQkjEsVNsanVqROtzLjYogAAM2URdXA/GtrIW0Ic L524Nyy4UJm+jEdwEerj+vM4/DxeiuN/P6P7kdz487z7ed4rF6P7ea0rfueOv3EA2KAMJZLbEygr iqjNbE0X2u/YfEM9JC9MV/3gLlGWsmpz1vH98/uUx70QRl8cXXFIJY5IGoI4AGBFWbR0cFtTDeo2 8ltpH7W+jUyHt7fH92YJY3JEkZFFfVG+fxLFd5EsbkXCGKqEEQmjThmlLOp0QdoAgLVkUYujbrSt AUC3QBLWa9mEYW0V8fKSVH1xygbbGjJWlppuijQG5Yhk0SmJoa+k4EmDtAEAS0RRPnorz1ojoer2 sD40aUQDgzJbts5KGUPDxeoco0bjiy9KuhgUWVyLz1+MhOEJoyt+v1H5Gk0SpA0AyIoiksUYVFse jizqR00ac6YeTMnzWj1haHfpVsdOb0SwoUgadbK4FsmiTBnZhNFVKUNDEwdpAwCyohCZtyzSwyhD 1cdvI2lEKcOTxSpTEJb0YZSNb1mailLGUxpRGWqoRKHJonMa+k7aO8ERBwCiiEShVVesEaLlTbM1 2Oe3IwpLGLdkyvDKaZsnDE0cXSGLTMrISKNMFhdHFpYwpkIWnZM4InEgDwBEYcnCWnVWW+LDE0Ut jUgcmc7uVdeQWiIMcS5iJmXcqpLTt/w5IqpFFlGjXs/b6BrEQeoAQBTRpLxphiwsUXji8EpSWv+F yEqd3XOFMTl34V7KuFelpUtwaGWovlEW5UXqg5SRKU1NhmQA4NyCyIpCjGShDZ3V5lV8B3L4bXzu OyhFeSOkWs5/s4RhDVEt7+QfRUNfSqNMGV6qqKXRBymjlsTFKFPV3zsVH7eUpqagzAUAxxRDNmFk k8XDSBfaCKhaCv/5OTxpRB3eXt/FquvtrdGHUd+p18t2PIqGXytNXZTk4U3Sy7zxtTiespjEHmk1 JctVmWQDAOcSibXQamYDJGvobCmL34njP+L3YWRLUasOpS25zPy+srPZKhFpX+Md3pDZqA+j5Y9k 6UXrFn4eAPZPGNnyU3borCaLm1KG+k+VLLzDG17rSWOTdLFEGCJ+B7IllEgCEryWbaCjWZlrxVlE AXA+cSyRxST6sFlNFjdHFnU5yhPGb0cW1gipTSofwwpvRl3S0dZ+19JEn0waljCiIW7Px6EqS12K z2n9IyL+pEBGTQGcUxaZ5T2iDm5v8yNtUp7VZ/FPQ7Lw9gpqWdJ8t+XNPVlIUhqZklSXSBGj2JNn roU0xh9ZjIU4ns9HRxzWo9dBjlAAjlOGmgJJiCzbz8KSxbfofRSRLH47Zaho7oXIhpvKrTUPo1N+ wbFoOLPSyAgjMw66vJClLMpjlD9HYdXikMSjJocu+SYhFYBlMmhJFa2y0EZCZWRxE33IbC2Hf6rH WhatI6M230RurZKUNcy2FkerNLw33lvw6/mmXos3tlyj6iH6aKw+WRaLZIEgAPYTSKs0rEUEvdFQ 1uZH2qQ8r5/iH4k7uVtGRmlltdVYM2FYb9RYNbgZaXiNq/amWtseatJ4iD9JcKk0WjrnAWB7aXhr QXk3oJP4o6G0mdzakh9WZ/c/Ys/DiFanrTdM8q7BoUpSUWmqbOSz0rB+flSGeiSkcRF7rw1vhrlI bhgx0gDYVxhT0GjWd+FjsmJxF31TuGg2dzSk9rdRjlpj7+7DJYxsaapMG1oDG02Es5ZR90RRvsHP pdOfW79mpZFdUh1hABxfGN5EvKws6r6Let8Kq/8imt3tLWWe2fNis1LUFgnDeyNHpeF8JGThJYxo 8kx5J3AtJHFVUoa1LIkmjH6mMJAFwPbCyHZyjzOqFlay0Pa1aJnR7Y2KinbV82SxujS2Kklpo4Qm RRwtPzsShZUqvooL/0wX9QZN1gq5njhE2kZSIQ2A7WQxNT5qZai6P3SU3G559RIgVsqwEoW1wGA0 jFacEtQpEoYnjXLOQ7bxzAyh9UYtfBXiuMq/d/UbnKShiWOuNJAFwHGkYQnj0ZAublU5yts5L1qy /DuQRVSCispzpyhJlfLwImGLLKw+DC8yluIYKnFo0uiN8hTSAHgfYYwSz+HKlqIyW61qaULbqzsq Q2X7LTaTx7DRm9gF4sjKQpKi8IRx/XkjalnUfRmeNCxhRP0ZCAPgGMLwZDGJP4imlsXdKEdF+3Pf xO+rqDu4DyWLLRNG1J8RScMaAjc69UUrXVyrhOGVpYbGlIEwAM6TLsZkwshULW4N0rgpj9oM7nr4 bKss3qIkNVcaIvl16LWRUc9SVJkwhiphWH0ZLSlj7dngANAuCi1R1M+z6WIUe85FnTK+FWnclBRR J4rspLwWWWwujuGFb3KLNDL9F1Z0/DJKUbUwWstSnjSQBcDxpRHJIprRHaWMmyEIL1FEqSLb0X36 Tu9SFFlpTOKvSZ8dVntVRKEJo+78tvYWvyQSBsIAOFZJKhKG1p6MTtXCGimlPY9E8RB9BvdDkdok L1qN9ggJo0Ua2T0vvIRxlT/7MKwSVDS8NprINzdlIA6AdUQRJYy6HOUtLGi1KZnSlCWSjChaS1C7 yGKPklQkDS1teEnjUr3JQ/H4nKh3q4RxUaRxCRJGZngtHd8Ax0oYmXJUZq+LaB0p77WHxP0UD4nX htqlz2IvYWSkMUnbHhhjII5aCjcjTXjlqOxcjEgaiAJge3FkN0NqmYORKU9ZcmhJFNYM7sPI4tXC mFue0t703hFH+ca2pIkoXWRkkU0ZHogFoK1BbNk9L+rH8OZ5ZYRgPc+Iwis/7S6LPYThSUOTxyh/ 7hNei6N+oy/y7z0v7skk4fVdZIWxRBaIAmC+OLKyyHZ+eyth3wOpRENkWzc/OoQs9hJGNmlMSmNc v+F9lTZ6+fduehdFHPXn+oQoMsIQsffKQAwA24ukRRqZlOF1hkevWf0To1IWkzPIYk9hlCffGc8l SBudkjaejXmdNHrjMRLEnHSBMAD2k4WIP2CmRRqePEbxl/Cw0kRUftp1nsWRhdFaotI6xbW00RWl qmfi0NJDS5pAGADnF4ZIbk0pSxjWx1lJjOL3URwyVRxNGFrasGRRp43668dKFmVD/0gKwtqiNdrn m/kXAPsJQyS3rPmkNN7185bDks00s/R0WFkcSRiiJAxLIJNxh1+nkzFICr3zemY01JzlzZEGwD7C kERpKtv4j4mUUm9L3ZImpqNe+OHAfwzRwoWROLoqcXTiL1MepYmlu+0hCoDXlaZapZFJHlMghslJ FJnf7dCyOKoworSREYcYAukqeWTkQKoAeO+kIQl5eK+PkptDccpUcRZhiPgjqTKd4p2TRGSGIJYI A2kAbC+LrDBE8qOpWo45SWI6y0UfTvbHEZWp6mSSafQzH4vkJ+chDIB9hRHdxWdGKUWL/0Wd2G8l irMJQ5OBKOnDk4bX6GdSw1qLCyINgNcKo0UakUhE5o1yOrUozioMcWTRkjqyKSGbJOjgBjiuSLyG u6V/YU5fxFuI4szC0N6MOaljmiGDTOkJUQAcM31MM59PC37GW4jiXYShiUMkP7JK+16SBMBnp45s w9/6McI48B9GlDrq2eNTQjgIA+D9hLH11yCME6cOCdJHy89AGADnFEbm89PCr0UYb5A6ZIFAsn8o SATguIJo+fppxX8HYZz8D6n75DcfAGE0ff3HtxEDf1ipdNDyh9LxhwVwOmkgB4Sx6h9Kxx8aAGJB GLDmHxb9FwCIAGEAf6gA8Ln0XAIAAEAYAACAMAAAAGEAAADCAACAs/JfAQYAL3iXmIlSiu4AAAAA SUVORK5CYII="
+ transform="matrix(0.24 0 0 0.24 179.2061 198.1514)"
+ id="image77">
+ </image>
+ <g
+ id="g79">
+
+ <radialGradient
+ id="SVGID_5_"
+ cx="225.1929"
+ cy="226.1387"
+ r="30.8299"
+ gradientTransform="matrix(1 0 0 0.75 0 56.5347)"
+ gradientUnits="userSpaceOnUse">
+ <stop
+ offset="0.0123"
+ style="stop-color:#FFFFFF"
+ id="stop82" />
+ <stop
+ offset="0.4828"
+ style="stop-color:#FDFEFB"
+ id="stop84" />
+ <stop
+ offset="0.7611"
+ style="stop-color:#F8FBF3"
+ id="stop86" />
+ <stop
+ offset="0.989"
+ style="stop-color:#F2F8E8"
+ id="stop88" />
+ <stop
+ offset="1"
+ style="stop-color:#F2F7E8"
+ id="stop90" />
+ <a:midPointStop
+ offset="0.0123"
+ style="stop-color:#FFFFFF" />
+ <a:midPointStop
+ offset="0.8025"
+ style="stop-color:#FFFFFF" />
+ <a:midPointStop
+ offset="1"
+ style="stop-color:#F2F7E8" />
+ </radialGradient>
+ <path
+ fill="url(#SVGID_5_)"
+ d="M186.706,235.825c0,5.965,4.835,10.801,10.799,10.801h55.374c5.965,0,10.801-4.836,10.801-10.801 v-19.373c0-5.965-4.836-10.801-10.801-10.801h-55.374c-5.964,0-10.799,4.836-10.799,10.801V235.825z"
+ id="path92" />
+ <path
+ fill="none"
+ stroke="#EDF5E5"
+ stroke-width="5"
+ stroke-miterlimit="10"
+ d="M186.706,235.825 c0,5.965,4.835,10.801,10.799,10.801h55.374c5.965,0,10.801-4.836,10.801-10.801v-19.373c0-5.965-4.836-10.801-10.801-10.801 h-55.374c-5.964,0-10.799,4.836-10.799,10.801V235.825z"
+ id="path94" />
+ </g>
+ </g>
+ <path
+ opacity="0.74"
+ fill="#FFFFFF"
+ a:adobe-blending-mode="lighten"
+ d="M263.623,229.595c0.037-0.364,0.057-0.734,0.057-1.107 v-13.375c0-5.965-4.836-10.799-10.801-10.799h-55.374c-5.964,0-10.799,4.834-10.799,10.799v7.324 c7.545-1.012,15.699-1.566,24.213-1.566C231.959,220.87,250.812,224.252,263.623,229.595z"
+ id="path96" />
+ <linearGradient
+ id="SVGID_6_"
+ gradientUnits="userSpaceOnUse"
+ x1="225.1929"
+ y1="204.3135"
+ x2="225.1929"
+ y2="246.626">
+ <stop
+ offset="0.0123"
+ style="stop-color:#FFFFFF;stop-opacity:0"
+ id="stop99" />
+ <stop
+ offset="0.0141"
+ style="stop-color:#FDFDFC;stop-opacity:2.231669e-04"
+ id="stop101" />
+ <stop
+ offset="0.1344"
+ style="stop-color:#BEBEAF;stop-opacity:0.0148"
+ id="stop103" />
+ <stop
+ offset="0.2565"
+ style="stop-color:#94957C;stop-opacity:0.0297"
+ id="stop105" />
+ <stop
+ offset="0.3796"
+ style="stop-color:#747759;stop-opacity:0.0446"
+ id="stop107" />
+ <stop
+ offset="0.5029"
+ style="stop-color:#5D633F;stop-opacity:0.0596"
+ id="stop109" />
+ <stop
+ offset="0.6263"
+ style="stop-color:#4D552E;stop-opacity:0.0746"
+ id="stop111" />
+ <stop
+ offset="0.75"
+ style="stop-color:#414B23;stop-opacity:0.0896"
+ id="stop113" />
+ <stop
+ offset="0.8742"
+ style="stop-color:#3B461E;stop-opacity:0.1047"
+ id="stop115" />
+ <stop
+ offset="1"
+ style="stop-color:#38441C;stop-opacity:0.12"
+ id="stop117" />
+ <a:midPointStop
+ offset="0.0123"
+ style="stop-color:#FFFFFF;stop-opacity:0" />
+ <a:midPointStop
+ offset="0.2901"
+ style="stop-color:#FFFFFF;stop-opacity:0" />
+ <a:midPointStop
+ offset="1"
+ style="stop-color:#38441C;stop-opacity:0.12" />
+ </linearGradient>
+ <path
+ fill="url(#SVGID_6_)"
+ a:adobe-blending-mode="darken"
+ d="M263.68,221.954v13.871c0,5.965-4.836,10.801-10.801,10.801 h-55.374c-5.964,0-10.799-4.836-10.799-10.801v-13.871l0.038-7.704c0,0,0.923-9.937,11.173-9.937h54.962 c0,0,10.063,0.328,10.801,10.799V221.954z"
+ id="path119" />
+ </g>
+ <g
+ id="g121">
+ <g
+ id="g123">
+
+ <image
+ overflow="visible"
+ opacity="0.25"
+ a:adobe-blending-mode="multiply"
+ a:adobe-opacity-share="1"
+ width="30"
+ height="30"
+ xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAACXBIWXMAAC4jAAAuIwF4pT92AAAA GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAuJJREFUeNrsl9trE0EUxjO7m5vW tKFN1RqLCmqlIvjgkz5I/cOFIqLggw9KsRHxUo1IdEtactG9+A1+A8dxNrsxK/rgwI9lt5ueb875 ZuZspfJ//Bhqjvc0AfCIHClIQEzSMkUoBqyCJbAKWrxXQoBmBL6AQzChmGQREWbmNQY/DS6Aa6AL mtZvdcDPoEcOQEgxUV5mVMYzH5wCZ8FFcJ0CLoN1UHeIGII34AV4BvbBW4qbzsqKctzruq+ALXAL 3ABXwAafNyjS9sQ3cAwG4BXYA0/AU/AejLOE+I4MtME22AH3wE2wyedNivSFQT3eB/y79kwHnGE2 v4IjinCaNrBEtJiBu2SLs686VkRWGRt8/wTL5jFwxIxMbSGB+Ac1qtcluEMBbWslFDV7QBFdlmBE bwxZtthVDn1dpgF3WIIOhakF9iCf2ajQK32W5hcRJgvnmYHb9ECzQAnyhif8o7PxkWImsiQeRSyJ fWCjJAGy5G2usKtgzc6wx5dWxT6wYhm2jKNBm/UcV90m/aLsdLVoonX+QJV8RvmcXNflNVOOKktQ Fz4p+6AMrBg/GUeeFWUHd51HyuXevz7+GRELNSRzjMwYnmhI5Laa/gEBYxEjskVE7Ih67AeOi3ZE BYc55j+xxzjgpBMpImZL1mNDMuDxm5aYBT2x1+wx+vZJ6lt94kl2Ux1uWl4JWZhy9g/AQ/DOPjt8 q0ULuLebhiRYYO8wPUTIdm+X1zDrKE/FKjH95TL3eP83MiIF7FHAY2ZkYpfadxhoRE80WJ66EKIK BE9YAiPgPkW8dPUSFUfDGnMpHVmKvQJCEoofcsamBLs0fOgSUMnomo2QQ66UAbMTi4+hmOk2mGZW B39OE+rgj5iBcNb3h5qxk9boDb1SLrEh2c75+NlnCfT1A4OP8nZiVeAT0IhZY0Ni+gHP8oEpQ59Z HHP2uRtfkeUnxTj7AWHqMU0ZiRVX2ld5kZ4jnSewHN8FGACSOOKkAlOGAAAAAABJRU5ErkJggg=="
+ transform="matrix(0.24 0 0 0.24 199.0298 216.5547)"
+ id="image125">
+ </image>
+ <g
+ id="g127">
+
+ <radialGradient
+ id="SVGID_7_"
+ cx="202.6289"
+ cy="219.7041"
+ r="2.9995"
+ gradientTransform="matrix(1 0 0 0.75 0 54.926)"
+ gradientUnits="userSpaceOnUse">
+ <stop
+ offset="0.0123"
+ style="stop-color:#FFFFFF"
+ id="stop130" />
+ <stop
+ offset="0.4235"
+ style="stop-color:#FAFCF6"
+ id="stop132" />
+ <stop
+ offset="1"
+ style="stop-color:#F2F7E8"
+ id="stop134" />
+ <a:midPointStop
+ offset="0.0123"
+ style="stop-color:#FFFFFF" />
+ <a:midPointStop
+ offset="0.6235"
+ style="stop-color:#FFFFFF" />
+ <a:midPointStop
+ offset="1"
+ style="stop-color:#F2F7E8" />
+ </radialGradient>
+ <circle
+ fill="url(#SVGID_7_)"
+ cx="202.629"
+ cy="219.704"
+ r="2.999"
+ id="circle136" />
+ </g>
+ </g>
+ <g
+ id="g138">
+
+ <image
+ overflow="visible"
+ opacity="0.25"
+ a:adobe-blending-mode="multiply"
+ a:adobe-opacity-share="1"
+ width="30"
+ height="30"
+ xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAhCAYAAAC1ONkWAAAACXBIWXMAAC4jAAAuIwF4pT92AAAA GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAtFJREFUeNrsmP1LFEEYx292Ts3V 9ujFrCiwFyPShH4I+imoiPqbhYKIoKigN0W8SulNIrOU63S921u/A9+BYdm9mbndg4IGPiynuzOf eea52WeuVvvf/Joo8VwA6rxm+0lBD3R5TYctpu6XYBRE4DiYzMhpqRbYBDtgHyQ+gsIzQmMUOg3O gzkwzciZTUXqO1gCH8E3CsauERSOUiOgAc6AC2ABXAYXwZECsV/gPVgBb8AH8AVsg45NTjhKTYGr 4Aa4AmYZqYjLmpdj+4ySilwTLIOn4C34YZOTjlLXwH1wC8xzKSMureQym0g+O85ITxP1uU3hPS6r t5j63zFK3QM3uYwNQ0g45KUSPMSJNLjsLS71blHUZJ9Ox5lDSuo2k32SHYsBvslKcAIc5jJvUK7r I1ZntK6Du8yryBJhW9P73hi3jg2ym7ek0hKtO0z4E5xx2RYYOany7DPYyotaUPCwyoVL3KemKpLS TX+h5jhGI88jT0x9/U9yrzoHwoL7ykQtZN8LHGvURUxy05xhntWH8I7WOTzDsaSLmOAMQl6DIYgF mTGEi5iWEyWqD9dtpHCMoPaXtn9KrHSR59CsYxSJ6SKv1e9FW6L1MmM4iXWMIu8ri7u04mjF7HuJ Y3VcxLqciaqfVlnYJRWKJexzlWNs5r2SZMGMNOp1cRYc5atEVBCtPVazD8AzHzHdQUKZUyzywoIT kY9Uh9XrC4o1WTimPmI9ouv9iAXfIHKm1GtKvSyKlq2C1Una5sMTLBRHPN4MOvIxpV6BRfCEJU/s W8Ganf4xzoaCf5dGaS36JHnMKnWNUg/BY35uD1rza7ku5bY4658cMDHkEt6nUZP4TQG1dI/Ic/CJ /SVVHHglS2J94pnluXLecuB9x3Nlk5+3jUlV9hOBMAQjCpn1lMikgFrCdQrtGEKp62CDlCtaMLQc eNu+QmV/7XGp2cyN2rsdCDAAoyXZx8WJpTUAAAAASUVORK5CYII="
+ transform="matrix(0.24 0 0 0.24 213.9448 216.5547)"
+ id="image140">
+ </image>
+ <g
+ id="g142">
+
+ <radialGradient
+ id="SVGID_8_"
+ cx="217.5439"
+ cy="219.7041"
+ r="2.9995"
+ gradientTransform="matrix(1 0 0 0.75 0 54.926)"
+ gradientUnits="userSpaceOnUse">
+ <stop
+ offset="0.0123"
+ style="stop-color:#FFFFFF"
+ id="stop145" />
+ <stop
+ offset="0.4235"
+ style="stop-color:#FAFCF6"
+ id="stop147" />
+ <stop
+ offset="1"
+ style="stop-color:#F2F7E8"
+ id="stop149" />
+ <a:midPointStop
+ offset="0.0123"
+ style="stop-color:#FFFFFF" />
+ <a:midPointStop
+ offset="0.6235"
+ style="stop-color:#FFFFFF" />
+ <a:midPointStop
+ offset="1"
+ style="stop-color:#F2F7E8" />
+ </radialGradient>
+ <circle
+ fill="url(#SVGID_8_)"
+ cx="217.544"
+ cy="219.704"
+ r="2.999"
+ id="circle151" />
+ </g>
+ </g>
+ <g
+ id="g153">
+
+ <image
+ overflow="visible"
+ opacity="0.25"
+ a:adobe-blending-mode="multiply"
+ a:adobe-opacity-share="1"
+ width="30"
+ height="30"
+ xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAhCAYAAAC1ONkWAAAACXBIWXMAAC4jAAAuIwF4pT92AAAA GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAttJREFUeNrsmO9r00Acxptc1m6d Fn9M125sU4RVpyjiSwXB/9wXulciiE4dhpUMpwzFUa02XdP4HDwHR7hcLk0mCh58WOnI9548973k uTYa/0e54c15nQ8E8TJ1UpKQ2Z8QJgUtgDa4CC6AliZOiYrBCfgGfoLTsgK9OQStgE2wDa6DDv+v hhQwBAdgH0TgS1mBLsIEBV0F18BNcJvC1sCyQdgIHFHYG/AODMAxBSZVhQXgHJ15AO5T2Aa4TMHC 0GMJBXwFhxT2Erygkz/AtGhim1NS1A3wCDwGO+AKBS3QKS+nrlp6eQProKe5G4LvNucCS0+1uXQP wRNwj6JaFkH6SgitNxeJ0BwNueSzMsIC3ulduiX/roJmpp9cWkVQ1CrrqB17ws+TPGdM3y3Rftnk fTpVVlS2ZpN1+qy7znl8V2HSrUvcdbKnutryVRk+63RZd5vzBC7ClFvyMXALbHEDiJreNGpDbbH+ Wp5rJmEd7sQ+n13NCq8uU881WbfPeTquwtq0u1ezW1nXepyn7SJM9dgSCc4oPBTO4Rus9jKJwatZ lGeZy+rYXzH+GWEpXxEq5Kl8VecwBcnURVjMgCcZn5GwsTZH7CJMD3khL5zWLGzKuiHnGZpe5CZh I6bO9wx7v+bN7YYxY70j1o/yEoZpKSdMmntMoMq1tIYlVG7ts/4x50tddmXCEDfgxRETZ1JRWMI6 EesObGFRWCyfaa+oDl8jQd4DscApJUr21S54Dj7wu1JBUW2Ct1rybDDRntditUtPnWor8Aw8Zd2h rXdFQdGYd6WfbPTYnOeeEiSv/cTDyC5FvbL1luspSSXPFUYUmaHu8KS0yfjdMpySYp6QIop6TZdC njEnRTvdpVc8Lt0yBW4wS+04HHj3+Fg4pKARnUxdJnVNBL7hSNal4OxPBFLAZ/CRzumn8NR1wrKR xdfy1KLlwDvmw3RaRlDVX3s8h8dGWiUE/BZgAMf82R9IYLF+AAAAAElFTkSuQmCC"
+ transform="matrix(0.24 0 0 0.24 228.8599 216.5547)"
+ id="image155">
+ </image>
+ <g
+ id="g157">
+
+ <radialGradient
+ id="SVGID_9_"
+ cx="232.459"
+ cy="219.7041"
+ r="2.9995"
+ gradientTransform="matrix(1 0 0 0.75 0 54.926)"
+ gradientUnits="userSpaceOnUse">
+ <stop
+ offset="0.0123"
+ style="stop-color:#FFFFFF"
+ id="stop160" />
+ <stop
+ offset="0.4235"
+ style="stop-color:#FAFCF6"
+ id="stop162" />
+ <stop
+ offset="1"
+ style="stop-color:#F2F7E8"
+ id="stop164" />
+ <a:midPointStop
+ offset="0.0123"
+ style="stop-color:#FFFFFF" />
+ <a:midPointStop
+ offset="0.6235"
+ style="stop-color:#FFFFFF" />
+ <a:midPointStop
+ offset="1"
+ style="stop-color:#F2F7E8" />
+ </radialGradient>
+ <circle
+ fill="url(#SVGID_9_)"
+ cx="232.459"
+ cy="219.704"
+ r="2.999"
+ id="circle166" />
+ </g>
+ </g>
+ <g
+ id="g168">
+
+ <image
+ overflow="visible"
+ opacity="0.25"
+ a:adobe-blending-mode="multiply"
+ a:adobe-opacity-share="1"
+ width="30"
+ height="30"
+ xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAACXBIWXMAAC4jAAAuIwF4pT92AAAA GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAt9JREFUeNrsl91rE0EUxTOzm69a 05YmVWsUFdRKRfDBJ32Q+ocLRUTBBx+UYiOitlqRaEos2UT3w3P1jIzrbHZNVuiDAz9CNru5Z+69 M3O2Uvk/fg414zOCDzSxRwJiEJGkTBGKAatgEayCFr8rS4AwAp/BIRhTTDyPCDPzGoOfAhfANdAF zdT/SMBPoEf2wYBiQldmVAEBHjgJzoCL4DoFXAZroO4QMQRvwAvwDOyCtxQ3SWdF5QiQui+DDXAL 3ABXwDqvNygy3RPfwBHog1dgBzwBT8E7ENhCvJwMrIBNsAXugZvgPK83KdKzGlTzu8/fpWc64DSz +RV8oYhfTetPEdFiBu6SDc6+6lgRWZNo8P4Flk0zcMiMSGkSP+MPalQvJbhDASuplVB0RfkU0WUJ RuyNIcsWucoh15bYgFssQYfC1Bz7kcdsVNgrByzNHyJMFs4xA7fZA80CJcgb2uofycYHihlrh4hF ax9YL0mAGT7LKivsKmjLpLXjplVrH1ie0ryzlkWa9SxXnWR5QTv6ocUmWuMDqlLu8Di5ruk1Vzmq LEGdD5QtQln7yI8YespZUXbwzBi6cgzGsRTx14ZkxvFbDJeI9Laa/AMBgRUjTIsI6Yh69ANH0xzR DMMc8x/pMcTwjNIiIlqyHg1Jn8dvUmIWZGKv6THk/Jh4GWqFE3RTHW5auoQsTDj7B+Ah2JOzI8vU RNxQ2pYh8efYO4yHGNDubfNzkHWUJ9YqMf5yiZ7AmyEjtoAdCnjMjIj5TbycBhqxJxosT90SogoE j1kCI+A+Rbw0XmKaxzQlCXjz2GpOXUBITPFDztiUYJsNPzAC8kQklpBDrpQ+sxNZL0MR020wZlaC P2cTSvBHzMAg/f6hCu6qNfaGrJRLNCSbOS8/uyyBfL5n8JFrJy7a7Solpk1DYrynTvWBKcMBsxhw 9nEZL8S2GNtzuJo6YFOG1oor7a28iOdI8gLb47sAAwCDFN6m03jgxgAAAABJRU5ErkJggg=="
+ transform="matrix(0.24 0 0 0.24 243.7749 216.5547)"
+ id="image170">
+ </image>
+ <g
+ id="g172">
+
+ <radialGradient
+ id="SVGID_10_"
+ cx="247.374"
+ cy="219.7041"
+ r="2.9995"
+ gradientTransform="matrix(1 0 0 0.75 0 54.926)"
+ gradientUnits="userSpaceOnUse">
+ <stop
+ offset="0.0123"
+ style="stop-color:#FFFFFF"
+ id="stop175" />
+ <stop
+ offset="0.4235"
+ style="stop-color:#FAFCF6"
+ id="stop177" />
+ <stop
+ offset="1"
+ style="stop-color:#F2F7E8"
+ id="stop179" />
+ <a:midPointStop
+ offset="0.0123"
+ style="stop-color:#FFFFFF" />
+ <a:midPointStop
+ offset="0.6235"
+ style="stop-color:#FFFFFF" />
+ <a:midPointStop
+ offset="1"
+ style="stop-color:#F2F7E8" />
+ </radialGradient>
+ <circle
+ fill="url(#SVGID_10_)"
+ cx="247.374"
+ cy="219.704"
+ r="2.999"
+ id="circle181" />
+ </g>
+ </g>
+ <g
+ id="g183">
+
+ <image
+ overflow="visible"
+ opacity="0.25"
+ a:adobe-blending-mode="multiply"
+ a:adobe-opacity-share="1"
+ width="30"
+ height="30"
+ xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAACXBIWXMAAC4jAAAuIwF4pT92AAAA GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAn9JREFUeNrsl+lrE0EYxvdKjSZW YxEPxBsVrNdHQTxA/KMFBRGPDwoVVIpoq3jUeJUG25qk2fVZ+A28WTabxG4lHzrwgxw78z7zzMw7 73reBDR/jOcCUREhn21LRCy6osfn0kT4BN0h9oiDoiGmTN8Efoum+CHWEBRvRoSbeZXgR8QZcVEc F7syfTcI/kq8Fgviu1jlv3hcET627xXHxFlxWZwXJ8RMxgmPIKkTn8UbMSdeinfiq1hnmUYS4QTs F5fENQSc4rfUgahgT7TFivgk5sVj8VQs4kqukGiAgCviDiKOijr/BUOWL7t/9uGaVyTEighYggsI uI79NQYfdY9FPF8x/WL2xiJLk9hOoelcJehtcYslqI8hYNDGrvP9G5t1PbtRQ+NIg/W/KWaxNNpk DnK5JZ35TzbuCq70ibAu3BBXxWHW1i8hGbpc0+akNLNuBDAtTopz4kBJAuxEC8cPzIlI88BpOoQl Xw1TuDtLsqvZkxbwUA2FjZxEVJYbdROj4mWOpVuzCMoWYGPlxggm4SrfFmFFJOTzDUi2KFY8KIYT sUoSWRadLRDSM0XPMgVPn4guOT0tSN6KVtHd/w8tYWJfqDHeM+m+jBkTeIEaoEmKTUp0oXD80Kjt kU4PkVSqJWTOhIDpFf5APBFLOOPliYhxZgYR00MKmVEEuKWeQ8Q8ruRe5Xb3po7s5CqvDSjnxhVw XzzjFu3k5XTbuuziNYLvZolCk+KHBU8n8QcBL8Rd8VB8yCto8kTEDNBCTIdBg4wQvyD4L6rsdOb3 xKNhhW44IKm4wZaghSAnoIdrHWhz/m3wlOfiI86OXPJPzMvPxLwG/tcX4u3m2l8BBgBQ/dU5d1Za tAAAAABJRU5ErkJggg=="
+ transform="matrix(0.24 0 0 0.24 199.0298 230.2217)"
+ id="image185">
+ </image>
+ <g
+ id="g187">
+
+ <radialGradient
+ id="SVGID_11_"
+ cx="202.6289"
+ cy="233.3711"
+ r="2.999"
+ gradientTransform="matrix(1 0 0 0.75 0 58.3428)"
+ gradientUnits="userSpaceOnUse">
+ <stop
+ offset="0.0123"
+ style="stop-color:#FFFFFF"
+ id="stop190" />
+ <stop
+ offset="0.4235"
+ style="stop-color:#FAFCF6"
+ id="stop192" />
+ <stop
+ offset="1"
+ style="stop-color:#F2F7E8"
+ id="stop194" />
+ <a:midPointStop
+ offset="0.0123"
+ style="stop-color:#FFFFFF" />
+ <a:midPointStop
+ offset="0.6235"
+ style="stop-color:#FFFFFF" />
+ <a:midPointStop
+ offset="1"
+ style="stop-color:#F2F7E8" />
+ </radialGradient>
+ <circle
+ fill="url(#SVGID_11_)"
+ cx="202.629"
+ cy="233.37"
+ r="2.999"
+ id="circle196" />
+ </g>
+ </g>
+ <g
+ id="g198">
+
+ <image
+ overflow="visible"
+ opacity="0.25"
+ a:adobe-blending-mode="multiply"
+ a:adobe-opacity-share="1"
+ width="30"
+ height="30"
+ xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAhCAYAAAC1ONkWAAAACXBIWXMAAC4jAAAuIwF4pT92AAAA GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAmlJREFUeNrsmM9r1EAUx3cz2XW1 il2wLLagIh5aeilUBC967EX/XA/1It5aUaiC2JNY/EWp0lZkG3c3id+Bz0AIaXayibKHDnzIJfPm s29eZl/Sas3paNeYZ0SHaz5OKmIx5pr+azF7fyh6oi+WxXURZGJZiUScim/iWERiUkWwXTFDlxG6 I1bFBnKd3P1jpPbEvviE4JlvBtueUl1xQ9wVa2ITsdtkzOTmxGTsALE34oP4KH6I0TS5tofUJXFT PBCPxToZ67OlZTUWkSmbsffipXglvos/ZXLGI1N2qx6Kp+KRuFcgVYRh/oJYEgNxle08EUNqsbJY SDAnZa8r1FlYoQzc02sFF5n/W/wskzMlAReopydkaoVtDWocL1bqGtv8Bblx0YSgJFt9xNbJXLfG uZctjQEx11gj9M2YDXCFiVviflmAGeQCYtlt/MxTOvbJmEFkFZqSyu9GNr7xEXNP4gbnVK/mFhZl rUdsd0B3fcQCDs3lcw7PJobJrRH4iE37g24qa6VrBK05HRdiTYjVbvI8xtQ1isSyTd4pE5secW6N xEdslGnyDmhd0oazFRF7j7VGPmIxPdQ+HNMWNzUmBfFj3+7C1YDtMG7RT3UaONMS+jErtC1e05tV EksyPdkAyToHbsqW2e51R7ygs42qNooJaU/oPF2TF8wgl2SkdsVz8Y5sJVXFUvryX6TfNXld5HwE U37cWUbqGdfDsto1njVxQjscQ8jc8+SckO25jqipHTK1i+Ro1peR7FM6pKH7StAhC7uam7CQI+J+ J7RNTb0lU7Vf3+b6hXeuPxH8948qF6Pq+CvAAGGezDColMK7AAAAAElFTkSuQmCC"
+ transform="matrix(0.24 0 0 0.24 213.9448 230.2217)"
+ id="image200">
+ </image>
+ <g
+ id="g202">
+
+ <radialGradient
+ id="SVGID_12_"
+ cx="217.5439"
+ cy="233.3711"
+ r="2.999"
+ gradientTransform="matrix(1 0 0 0.75 0 58.3428)"
+ gradientUnits="userSpaceOnUse">
+ <stop
+ offset="0.0123"
+ style="stop-color:#FFFFFF"
+ id="stop205" />
+ <stop
+ offset="0.4235"
+ style="stop-color:#FAFCF6"
+ id="stop207" />
+ <stop
+ offset="1"
+ style="stop-color:#F2F7E8"
+ id="stop209" />
+ <a:midPointStop
+ offset="0.0123"
+ style="stop-color:#FFFFFF" />
+ <a:midPointStop
+ offset="0.6235"
+ style="stop-color:#FFFFFF" />
+ <a:midPointStop
+ offset="1"
+ style="stop-color:#F2F7E8" />
+ </radialGradient>
+ <circle
+ fill="url(#SVGID_12_)"
+ cx="217.544"
+ cy="233.37"
+ r="2.999"
+ id="circle211" />
+ </g>
+ </g>
+ <g
+ id="g213">
+
+ <image
+ overflow="visible"
+ opacity="0.25"
+ a:adobe-blending-mode="multiply"
+ a:adobe-opacity-share="1"
+ width="30"
+ height="30"
+ xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAhCAYAAAC1ONkWAAAACXBIWXMAAC4jAAAuIwF4pT92AAAA GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAlRJREFUeNrsmM9LG0EUx5PdjTTW otDYWmoOQm2M/YGXnrxI/3IvnnoRW7TagocotqjQtLYp5pffgc/CECc7u+uGpuDAB2Y32Tff9+bN 7Jstlaa0lXM+E4gIAsd/BqIHpj+cpLBY0Ix4JBbhwYg4I+SvOIdf4jqrwHIOQUvihXgtVsWCQ9gP 8UV8El/Ft6wCyyl+DxH0XLwUb8UbxD0V1RE7ZtCO+I6oj2JPHIlTBPZ94sqe3yIi0hCb4h1Reibm iOK4HDPRuRJnRO+D2BGHRLSXJC7yRGpeNMV7sYXAeQSFCU6FRHIGB56IGveMI/uIGxu5JGFzTN0W wpqIijIsmpDFYZ55hah4xRpxP7MIM4NWWHEbTGGDKY1ybi8VKyVM/l2wYjtM+S1xrvww9x6KulgX K0QqvOOeGafGCnbrjOPScOtmnPA1Hm7Sr+TcjF2Rq2F3nb4zNVzCZsWyWMOr2XFe5WgB9urYX+ba KywkF1bJh8d4WWSrYLdhbdBhmohVrddNtYApLOUZI0jxgp6EMO8YQWlK272wuwobFlHkeVqqMVzC OlaR15mQMO8Yo8L6VpFnypNL0S1YWBe7h4wTVxneiP0RJ+KzaHE9KEjUAHst7J9wnWoqe7z9TVly QL9bwJQOsXOB3X36vbTVhfHqN16Zh49F2xXujK2PnWPsthhnkLYeiz0ziblrVZ55CkV7Ftrk1Q52 z5NmIkowdsUBIrIqz7SltR2la0vUNhxhP3PNP7RCf4CouPIs4jDS9p2U/svj21QfeKf6E8E/+ahy 37K2GwEGAJb/2mQI89WQAAAAAElFTkSuQmCC"
+ transform="matrix(0.24 0 0 0.24 228.8599 230.2217)"
+ id="image215">
+ </image>
+ <g
+ id="g217">
+
+ <radialGradient
+ id="SVGID_13_"
+ cx="232.459"
+ cy="233.3711"
+ r="2.999"
+ gradientTransform="matrix(1 0 0 0.75 0 58.3428)"
+ gradientUnits="userSpaceOnUse">
+ <stop
+ offset="0.0123"
+ style="stop-color:#FFFFFF"
+ id="stop220" />
+ <stop
+ offset="0.4235"
+ style="stop-color:#FAFCF6"
+ id="stop222" />
+ <stop
+ offset="1"
+ style="stop-color:#F2F7E8"
+ id="stop224" />
+ <a:midPointStop
+ offset="0.0123"
+ style="stop-color:#FFFFFF" />
+ <a:midPointStop
+ offset="0.6235"
+ style="stop-color:#FFFFFF" />
+ <a:midPointStop
+ offset="1"
+ style="stop-color:#F2F7E8" />
+ </radialGradient>
+ <circle
+ fill="url(#SVGID_13_)"
+ cx="232.459"
+ cy="233.37"
+ r="2.999"
+ id="circle226" />
+ </g>
+ </g>
+ <g
+ id="g228">
+
+ <image
+ overflow="visible"
+ opacity="0.25"
+ a:adobe-blending-mode="multiply"
+ a:adobe-opacity-share="1"
+ width="30"
+ height="30"
+ xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAACXBIWXMAAC4jAAAuIwF4pT92AAAA GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAnpJREFUeNrsl2lrE1EUhmdLjSZ2 sYgL4lqsYN0+CuIC4o8WFERcPii0YEsQtYpL3cVgW7PMjO+F55ZhmMlMzATyoRceSDKZc957zplz zzjOBCz3P+/xRE34fE6uWESiJ0I+VybCxekeMSMOizkxlbATwx/xRXwXWwiKRhFhd17H+TFxVlwU J8W+lJ0+zlfFmngjvolNrkXDinAJ+6w4IRbFZXFenBLzqUg4ODGR+CheimXxQrwWn8U2aSolwgo4 KC6Jawg4w28mAsGAmuiI3+KDaInH4qlYJyo7QoISAq6IO4g4Lppc8wrSl66fA0TNSQvJE+GRggsI uE74GxgvW8gB/68l7ouojXVSE/s5N9dxelvcIgXNIQTkFXaT718pViMiyjIa8OiZ/N8US4Q0GLEf 2d5iauYHhWtqpu8PiMINcVUcJbduBY3R9poOT4rpJdteRi1Mi9PinDhUkQC7/Cz7aRH2iTB9YIEb /IqPiSmiu0Sza3gZf2qgcC6jEVUVjWbCR83LOR8CqFpAMu07PrxJOMp3ReSJiOnnfYjH5DdK+sgS sUkT+SW6YxASJoYe46OXFtGjp5uB5JVop8/+EVfMxj4xY7w1m/YywtRmGmqhtlNhNMIs+36O2pB2 fYSmUq+gc8ZsyBzhD8QTsWEikyciomjnETFdMMiUEWBTvYyIFlGJ/ILqNRHZy1HeyBnnhhVwXzzj FO06BSHuUcVbON9Piuy7hlvCudnEXwSsiLvioXhnB5oiEREG2ojpYtRLCXEHOP/JlG12fk88yhp0 /RJNxRrbgDaCrICQqHWhw/OfdG54Lt4T2dIj/8S8/EzMa+DYX4h3l13/BBgABM7SO70ZkkMAAAAA SUVORK5CYII="
+ transform="matrix(0.24 0 0 0.24 243.7749 230.2217)"
+ id="image230">
+ </image>
+ <g
+ id="g232">
+
+ <radialGradient
+ id="SVGID_14_"
+ cx="247.374"
+ cy="233.3711"
+ r="2.999"
+ gradientTransform="matrix(1 0 0 0.75 0 58.3428)"
+ gradientUnits="userSpaceOnUse">
+ <stop
+ offset="0.0123"
+ style="stop-color:#FFFFFF"
+ id="stop235" />
+ <stop
+ offset="0.4235"
+ style="stop-color:#FAFCF6"
+ id="stop237" />
+ <stop
+ offset="1"
+ style="stop-color:#F2F7E8"
+ id="stop239" />
+ <a:midPointStop
+ offset="0.0123"
+ style="stop-color:#FFFFFF" />
+ <a:midPointStop
+ offset="0.6235"
+ style="stop-color:#FFFFFF" />
+ <a:midPointStop
+ offset="1"
+ style="stop-color:#F2F7E8" />
+ </radialGradient>
+ <circle
+ fill="url(#SVGID_14_)"
+ cx="247.374"
+ cy="233.37"
+ r="2.999"
+ id="circle241" />
+ </g>
+ </g>
+ </g>
+</g>
+<path
+ d="m 529.664,248.155 h 18.498 l -2.809,18.064 h 5.59 37.586 l 2.6,-17.718 c 4.98,-1.091 9.133,-3.455 12.512,-6.693 3.084,4.075 8.566,7.37 18.252,7.37 6.338,0 12.775,-1.807 17.174,-3.687 4.254,2.399 9.463,3.687 15.459,3.687 3.088,0 6.236,-0.355 9.426,-1.023 h 67.135 l 3.354,-24.827 -5.445,-0.764 1.879,-13.356 c 0.371,-2.386 0.449,-4.66 0.449,-6.156 l -0.008,-0.375 c -0.457,-12.191 -8.139,-19.765 -20.045,-19.765 -2.404,0 -4.623,0.314 -6.676,0.852 h -34.189 l -0.035,0.244 c -2.527,-0.701 -5.41,-1.096 -8.686,-1.096 -3.801,0 -7.406,0.555 -10.76,1.598 l 0.105,-0.746 h -12.467 l 1.826,-12.951 H 613.08 l -1.846,7.658 c -1.373,5.704 -2.213,5.793 -4.453,6.03 l -4.508,0.477 c -3.049,-1.424 -6.357,-2.065 -9.602,-2.065 -2.135,0 -4.275,0.284 -6.416,0.852 h -19.291 c 0.502,-1.772 0.775,-3.674 0.775,-5.678 0,-9.601 -6.846,-16.305 -16.646,-16.305 -11.055,0 -18.775,7.721 -18.775,18.776 0,0.951 0.082,1.869 0.219,2.764 -2.135,-0.288 -4.277,-0.409 -5.553,-0.409 -2.053,0 -4.072,0.288 -6.045,0.852 h -31.342 c -2.74,-0.553 -5.641,-0.852 -8.537,-0.852 -7.138,0 -13.492,1.674 -18.808,4.723 l -3.451,-1.461 c -3.711,-1.571 -11.232,-3.262 -18.979,-3.262 -8.933,0 -16.383,2.56 -21.576,7.016 -3.265,-4.473 -8.523,-7.016 -15.228,-7.016 -4.822,0 -9.021,1.477 -12.572,3.44 -2.996,-2.204 -6.796,-3.44 -11.115,-3.44 -2.327,0 -4.48,0.315 -6.476,0.852 h -33.963 l -0.035,0.245 c -2.526,-0.702 -5.41,-1.097 -8.687,-1.097 -20.458,0 -35.307,16.031 -35.307,38.117 0,17.363 10.785,28.149 28.148,28.149 3.087,0 6.236,-0.356 9.426,-1.023 h 88.816 c 3.706,0.676 7.669,1.023 11.154,1.023 8.907,0 16.278,-2.375 21.51,-6.593 4.872,4.252 11.585,6.593 19.728,6.593 3.053,0 6.206,-0.368 9.286,-1.023 h 44.664 2.069 z"
+ id="path243"
+ inkscape:connector-curvature="0"
+ style="fill:#f5f5f5" />
+<g
+ id="g245"
+ transform="translate(0,16)">
+ <g
+ id="g247">
+ <path
+ d="m 340.308,218.463 c -5.538,2.556 -11.588,4.26 -17.638,4.26 -13.377,0 -18.148,-7.839 -18.148,-18.148 0,-17.893 11.418,-28.117 25.307,-28.117 9.372,0 13.973,4.26 13.973,11.247 0,12.184 -12.865,15.763 -26.157,17.126 0.255,4.346 2.045,8.35 8.435,8.35 3.068,0 7.243,-0.937 12.355,-3.067 l 1.873,8.349 z m -8.095,-29.567 c 0,-2.045 -1.448,-3.237 -4.09,-3.237 -4.771,0 -8.69,4.175 -9.969,10.906 3.664,-0.511 14.059,-2.3 14.059,-7.669 z"
+ id="path249"
+ inkscape:connector-curvature="0"
+ style="fill:#383838" />
+ <path
+ d="m 394.07,221.7 -0.171,-0.255 1.789,-10.055 2.642,-18.063 c 0.512,-3.749 0.341,-5.623 -1.96,-5.623 -2.642,0 -5.794,2.727 -9.372,5.879 l -2.727,19.512 c -0.171,1.363 -0.171,1.534 1.022,1.704 l 4.26,0.597 -0.852,6.305 h -18.404 l -0.171,-0.341 1.875,-10.82 2.471,-17.212 c 0.512,-3.237 0.682,-5.453 -1.789,-5.453 -3.238,0 -7.413,3.664 -9.714,5.709 l -2.642,19.512 c -0.17,1.363 -0.17,1.534 1.108,1.704 l 4.26,0.597 -0.852,6.305 h -23.347 l 0.853,-6.39 3.749,-0.512 c 1.107,-0.17 1.363,-0.426 1.533,-1.704 l 3.579,-25.987 c 0.17,-0.938 0,-1.534 -0.767,-1.789 l -4.176,-1.534 0.938,-6.476 h 16.871 l -0.938,6.987 0.256,0.085 c 4.43,-3.749 9.116,-7.924 15.592,-7.924 4.687,0 7.839,2.641 8.18,7.753 l 0.256,0.086 c 4.175,-3.664 9.202,-7.839 15.252,-7.839 6.22,0 8.775,3.152 8.946,9.202 0,1.618 -0.171,3.493 -0.426,5.538 l -3.067,21.897 c -0.171,1.363 -0.171,1.534 1.107,1.704 l 4.175,0.597 -0.852,6.305 H 394.07 z"
+ id="path251"
+ inkscape:connector-curvature="0"
+ style="fill:#383838" />
+ <path
+ d="m 443.995,190.771 -0.17,-4.431 c 0,-0.682 -0.085,-1.108 -1.022,-1.363 -1.022,-0.256 -2.642,-0.427 -4.771,-0.427 -3.579,0 -6.391,1.108 -6.391,4.09 0,2.727 2.982,3.749 6.731,5.027 6.05,2.045 13.888,4.431 13.888,13.463 0,11.076 -9.372,15.592 -20.193,15.592 -8.009,0 -14.91,-1.959 -16.273,-2.981 l 1.618,-12.355 8.691,0.512 0.255,4.941 c 0,0.597 0.171,1.108 0.938,1.363 1.278,0.427 3.238,0.768 6.05,0.768 4.687,0 7.327,-1.79 7.327,-4.687 0,-3.408 -3.152,-4.175 -8.009,-5.624 -6.135,-1.874 -12.78,-4.26 -12.78,-13.206 0,-10.48 9.116,-14.996 19.597,-14.996 6.646,0 12.866,1.533 15.081,2.471 l -1.704,12.354 -8.863,-0.511 z"
+ id="path253"
+ inkscape:connector-curvature="0"
+ style="fill:#383838" />
+ <path
+ d="m 489.748,218.548 c -4.175,2.386 -10.395,4.175 -16.444,4.175 -13.036,0 -18.575,-7.583 -18.575,-18.574 0,-18.83 11.588,-27.691 25.988,-27.691 6.475,0 11.843,1.874 14.229,3.578 l -1.874,13.377 -8.691,-0.426 -0.255,-5.794 c 0,-0.597 -0.086,-0.938 -0.597,-1.192 -1.022,-0.427 -2.557,-0.597 -4.175,-0.597 -5.624,0 -11.418,4.601 -11.418,17.382 0,7.839 3.493,10.395 8.436,10.395 4.346,0 8.436,-1.448 11.247,-2.556 l 2.129,7.923 z"
+ id="path255"
+ inkscape:connector-curvature="0"
+ style="fill:#383838" />
+ <path
+ d="m 491.364,221.7 0.853,-6.39 3.919,-0.512 c 1.193,-0.17 1.363,-0.426 1.534,-1.704 l 3.578,-25.987 c 0.086,-0.938 -0.085,-1.534 -0.852,-1.789 l -4.261,-1.534 0.938,-6.476 h 16.87 l -1.107,7.669 0.256,0.17 c 3.323,-4.771 8.095,-8.69 13.548,-8.69 1.874,0 5.112,0.341 6.561,0.767 l -2.13,15.507 -9.969,-0.341 -0.256,-4.431 c -0.086,-0.767 -0.256,-1.022 -0.938,-1.022 -1.619,0 -4.26,1.96 -6.646,4.431 l -2.981,21.643 c -0.171,1.363 -0.085,1.619 1.192,1.704 l 8.095,0.682 -0.938,6.305 h -27.266 z"
+ id="path257"
+ inkscape:connector-curvature="0"
+ style="fill:#383838" />
+ <path
+ d="m 536.094,221.7 -0.17,-0.426 2.045,-11.503 3.152,-22.749 c 0.17,-0.938 -0.086,-1.534 -0.853,-1.79 l -4.175,-1.448 0.852,-6.476 h 18.149 l -5.027,35.786 c -0.171,1.363 -0.085,1.534 1.192,1.704 l 4.09,0.597 -0.852,6.305 h -18.403 z m 5.879,-57.598 c 0,-5.453 3.238,-8.775 8.776,-8.775 4.175,0 6.646,2.215 6.646,6.305 0,5.368 -3.322,8.861 -8.861,8.861 -4.176,-0.001 -6.561,-2.387 -6.561,-6.391 z"
+ id="path259"
+ inkscape:connector-curvature="0"
+ style="fill:#383838" />
+ <path
+ d="m 556.796,239.764 -0.17,-0.341 2.471,-14.229 5.282,-38.087 c 0.171,-1.022 -0.085,-1.534 -0.767,-1.789 l -4.175,-1.534 0.938,-6.476 h 17.041 l -1.022,6.816 0.255,0.085 c 5.027,-4.686 10.311,-7.753 15.678,-7.753 7.328,0 12.44,4.686 12.44,17.041 0,11.758 -4.601,29.225 -20.449,29.225 -5.538,0 -8.605,-2.13 -11.759,-4.345 l -1.874,12.78 c -0.085,0.938 0.085,1.278 1.192,1.363 l 8.606,0.853 -0.938,6.39 h -22.749 z m 17.041,-30.247 c 2.13,1.789 4.942,3.322 8.095,3.322 6.901,0 9.458,-9.713 9.458,-17.211 0,-5.027 -1.193,-8.351 -4.431,-8.351 -3.408,0 -7.754,3.664 -10.821,6.391 l -2.301,15.849 z"
+ id="path261"
+ inkscape:connector-curvature="0"
+ style="fill:#383838" />
+ <path
+ d="m 635.777,219.4 c -3.749,1.789 -9.458,3.322 -14.229,3.322 -8.521,0 -12.099,-2.981 -12.099,-9.969 0,-1.107 0.085,-2.386 0.256,-3.749 l 3.066,-22.323 c 0.086,-0.512 0.086,-0.853 -0.511,-0.853 h -5.879 l 1.107,-7.839 c 7.242,-0.767 10.906,-4.431 13.122,-13.633 h 7.924 l -1.704,12.1 c -0.085,0.596 -0.085,0.852 0.597,0.852 h 11.758 l -1.193,8.521 h -12.439 l -2.812,20.364 c -0.171,1.107 -0.256,1.96 -0.256,2.727 0,2.982 1.278,4.26 4.942,4.26 2.385,0 4.771,-0.596 6.816,-1.363 l 1.534,7.583 z"
+ id="path263"
+ inkscape:connector-curvature="0"
+ style="fill:#383838" />
+ <path
+ d="m 671.817,218.463 c -5.538,2.556 -11.588,4.26 -17.638,4.26 -13.377,0 -18.148,-7.839 -18.148,-18.148 0,-17.893 11.418,-28.117 25.307,-28.117 9.372,0 13.973,4.26 13.973,11.247 0,12.184 -12.865,15.763 -26.157,17.126 0.255,4.346 2.045,8.35 8.435,8.35 3.068,0 7.243,-0.937 12.355,-3.067 l 1.873,8.349 z m -8.094,-29.567 c 0,-2.045 -1.448,-3.237 -4.09,-3.237 -4.771,0 -8.69,4.175 -9.969,10.906 3.664,-0.511 14.059,-2.3 14.059,-7.669 z"
+ id="path265"
+ inkscape:connector-curvature="0"
+ style="fill:#383838" />
+ <path
+ d="m 703.596,221.7 -0.17,-0.255 1.874,-10.396 2.471,-17.723 c 0.512,-3.578 0.341,-5.879 -2.215,-5.879 -3.664,0 -8.18,3.578 -11.077,6.135 l -2.641,19.512 c -0.171,1.363 -0.171,1.534 1.107,1.704 l 4.26,0.597 -0.852,6.305 h -23.347 l 0.853,-6.39 3.749,-0.512 c 1.107,-0.17 1.363,-0.426 1.533,-1.704 l 3.579,-25.987 c 0.17,-0.938 0,-1.534 -0.768,-1.789 l -4.175,-1.534 0.938,-6.476 h 16.87 l -0.937,6.987 0.255,0.085 c 4.771,-4.09 9.373,-7.924 16.02,-7.924 6.475,0 9.798,3.322 10.054,10.139 0,1.363 -0.085,3.067 -0.341,4.687 l -3.067,21.812 c -0.171,1.363 -0.171,1.534 1.022,1.704 l 4.26,0.597 L 722,221.7 h -18.404 z"
+ id="path267"
+ inkscape:connector-curvature="0"
+ style="fill:#383838" />
+ </g>
+ <g
+ id="g269">
+ <linearGradient
+ id="SVGID_15_"
+ gradientUnits="userSpaceOnUse"
+ x1="324.1611"
+ y1="239.7637"
+ x2="324.1611"
+ y2="155.3275">
+ <stop
+ offset="0"
+ style="stop-color:#000000"
+ id="stop272" />
+ <stop
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0"
+ id="stop274" />
+ <a:midPointStop
+ offset="0"
+ style="stop-color:#000000" />
+ <a:midPointStop
+ offset="0.6933"
+ style="stop-color:#000000" />
+ <a:midPointStop
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0" />
+ </linearGradient>
+ <path
+ d="m 340.308,218.463 c -5.538,2.556 -11.588,4.26 -17.638,4.26 -13.377,0 -18.148,-7.839 -18.148,-18.148 0,-17.893 11.418,-28.117 25.307,-28.117 9.372,0 13.973,4.26 13.973,11.247 0,12.184 -12.865,15.763 -26.157,17.126 0.255,4.346 2.045,8.35 8.435,8.35 3.068,0 7.243,-0.937 12.355,-3.067 l 1.873,8.349 z m -8.095,-29.567 c 0,-2.045 -1.448,-3.237 -4.09,-3.237 -4.771,0 -8.69,4.175 -9.969,10.906 3.664,-0.511 14.059,-2.3 14.059,-7.669 z"
+ id="path276"
+ style="fill:url(#SVGID_15_)"
+ inkscape:connector-curvature="0" />
+ <linearGradient
+ id="SVGID_16_"
+ gradientUnits="userSpaceOnUse"
+ x1="377.45459"
+ y1="239.7637"
+ x2="377.45459"
+ y2="155.3277">
+ <stop
+ offset="0"
+ style="stop-color:#000000"
+ id="stop279" />
+ <stop
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0"
+ id="stop281" />
+ <a:midPointStop
+ offset="0"
+ style="stop-color:#000000" />
+ <a:midPointStop
+ offset="0.6933"
+ style="stop-color:#000000" />
+ <a:midPointStop
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0" />
+ </linearGradient>
+ <path
+ d="m 394.07,221.7 -0.171,-0.255 1.789,-10.055 2.642,-18.063 c 0.512,-3.749 0.341,-5.623 -1.96,-5.623 -2.642,0 -5.794,2.727 -9.372,5.879 l -2.727,19.512 c -0.171,1.363 -0.171,1.534 1.022,1.704 l 4.26,0.597 -0.852,6.305 h -18.404 l -0.171,-0.341 1.875,-10.82 2.471,-17.212 c 0.512,-3.237 0.682,-5.453 -1.789,-5.453 -3.238,0 -7.413,3.664 -9.714,5.709 l -2.642,19.512 c -0.17,1.363 -0.17,1.534 1.108,1.704 l 4.26,0.597 -0.852,6.305 h -23.347 l 0.853,-6.39 3.749,-0.512 c 1.107,-0.17 1.363,-0.426 1.533,-1.704 l 3.579,-25.987 c 0.17,-0.938 0,-1.534 -0.767,-1.789 l -4.176,-1.534 0.938,-6.476 h 16.871 l -0.938,6.987 0.256,0.085 c 4.43,-3.749 9.116,-7.924 15.592,-7.924 4.687,0 7.839,2.641 8.18,7.753 l 0.256,0.086 c 4.175,-3.664 9.202,-7.839 15.252,-7.839 6.22,0 8.775,3.152 8.946,9.202 0,1.618 -0.171,3.493 -0.426,5.538 l -3.067,21.897 c -0.171,1.363 -0.171,1.534 1.107,1.704 l 4.175,0.597 -0.852,6.305 H 394.07 z"
+ id="path283"
+ style="fill:url(#SVGID_16_)"
+ inkscape:connector-curvature="0" />
+ <linearGradient
+ id="SVGID_17_"
+ gradientUnits="userSpaceOnUse"
+ x1="435.17719"
+ y1="239.7637"
+ x2="435.17719"
+ y2="155.3275">
+ <stop
+ offset="0"
+ style="stop-color:#000000"
+ id="stop286" />
+ <stop
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0"
+ id="stop288" />
+ <a:midPointStop
+ offset="0"
+ style="stop-color:#000000" />
+ <a:midPointStop
+ offset="0.6933"
+ style="stop-color:#000000" />
+ <a:midPointStop
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0" />
+ </linearGradient>
+ <path
+ d="m 443.995,190.771 -0.17,-4.431 c 0,-0.682 -0.085,-1.108 -1.022,-1.363 -1.022,-0.256 -2.642,-0.427 -4.771,-0.427 -3.579,0 -6.391,1.108 -6.391,4.09 0,2.727 2.982,3.749 6.731,5.027 6.05,2.045 13.888,4.431 13.888,13.463 0,11.076 -9.372,15.592 -20.193,15.592 -8.009,0 -14.91,-1.959 -16.273,-2.981 l 1.618,-12.355 8.691,0.512 0.255,4.941 c 0,0.597 0.171,1.108 0.938,1.363 1.278,0.427 3.238,0.768 6.05,0.768 4.687,0 7.327,-1.79 7.327,-4.687 0,-3.408 -3.152,-4.175 -8.009,-5.624 -6.135,-1.874 -12.78,-4.26 -12.78,-13.206 0,-10.48 9.116,-14.996 19.597,-14.996 6.646,0 12.866,1.533 15.081,2.471 l -1.704,12.354 -8.863,-0.511 z"
+ id="path290"
+ style="fill:url(#SVGID_17_)"
+ inkscape:connector-curvature="0" />
+ <linearGradient
+ id="SVGID_18_"
+ gradientUnits="userSpaceOnUse"
+ x1="474.83691"
+ y1="239.7637"
+ x2="474.83691"
+ y2="155.3275">
+ <stop
+ offset="0"
+ style="stop-color:#000000"
+ id="stop293" />
+ <stop
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0"
+ id="stop295" />
+ <a:midPointStop
+ offset="0"
+ style="stop-color:#000000" />
+ <a:midPointStop
+ offset="0.6933"
+ style="stop-color:#000000" />
+ <a:midPointStop
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0" />
+ </linearGradient>
+ <path
+ d="m 489.748,218.548 c -4.175,2.386 -10.395,4.175 -16.444,4.175 -13.036,0 -18.575,-7.583 -18.575,-18.574 0,-18.83 11.588,-27.691 25.988,-27.691 6.475,0 11.843,1.874 14.229,3.578 l -1.874,13.377 -8.691,-0.426 -0.255,-5.794 c 0,-0.597 -0.086,-0.938 -0.597,-1.192 -1.022,-0.427 -2.557,-0.597 -4.175,-0.597 -5.624,0 -11.418,4.601 -11.418,17.382 0,7.839 3.493,10.395 8.436,10.395 4.346,0 8.436,-1.448 11.247,-2.556 l 2.129,7.923 z"
+ id="path297"
+ style="fill:url(#SVGID_18_)"
+ inkscape:connector-curvature="0" />
+ <linearGradient
+ id="SVGID_19_"
+ gradientUnits="userSpaceOnUse"
+ x1="512.28223"
+ y1="239.7637"
+ x2="512.28223"
+ y2="155.3277">
+ <stop
+ offset="0"
+ style="stop-color:#000000"
+ id="stop300" />
+ <stop
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0"
+ id="stop302" />
+ <a:midPointStop
+ offset="0"
+ style="stop-color:#000000" />
+ <a:midPointStop
+ offset="0.6933"
+ style="stop-color:#000000" />
+ <a:midPointStop
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0" />
+ </linearGradient>
+ <path
+ d="m 491.364,221.7 0.853,-6.39 3.919,-0.512 c 1.193,-0.17 1.363,-0.426 1.534,-1.704 l 3.578,-25.987 c 0.086,-0.938 -0.085,-1.534 -0.852,-1.789 l -4.261,-1.534 0.938,-6.476 h 16.87 l -1.107,7.669 0.256,0.17 c 3.323,-4.771 8.095,-8.69 13.548,-8.69 1.874,0 5.112,0.341 6.561,0.767 l -2.13,15.507 -9.969,-0.341 -0.256,-4.431 c -0.086,-0.767 -0.256,-1.022 -0.938,-1.022 -1.619,0 -4.26,1.96 -6.646,4.431 l -2.981,21.643 c -0.171,1.363 -0.085,1.619 1.192,1.704 l 8.095,0.682 -0.938,6.305 h -27.266 z"
+ id="path304"
+ style="fill:url(#SVGID_19_)"
+ inkscape:connector-curvature="0" />
+ <linearGradient
+ id="SVGID_20_"
+ gradientUnits="userSpaceOnUse"
+ x1="546.65918"
+ y1="239.7637"
+ x2="546.65918"
+ y2="155.32719">
+ <stop
+ offset="0"
+ style="stop-color:#000000"
+ id="stop307" />
+ <stop
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0"
+ id="stop309" />
+ <a:midPointStop
+ offset="0"
+ style="stop-color:#000000" />
+ <a:midPointStop
+ offset="0.6933"
+ style="stop-color:#000000" />
+ <a:midPointStop
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0" />
+ </linearGradient>
+ <path
+ d="m 536.094,221.7 -0.17,-0.426 2.045,-11.503 3.152,-22.749 c 0.17,-0.938 -0.086,-1.534 -0.853,-1.79 l -4.175,-1.448 0.852,-6.476 h 18.149 l -5.027,35.786 c -0.171,1.363 -0.085,1.534 1.192,1.704 l 4.09,0.597 -0.852,6.305 h -18.403 z m 5.879,-57.598 c 0,-5.453 3.238,-8.775 8.776,-8.775 4.175,0 6.646,2.215 6.646,6.305 0,5.368 -3.322,8.861 -8.861,8.861 -4.176,-0.001 -6.561,-2.387 -6.561,-6.391 z"
+ id="path311"
+ style="fill:url(#SVGID_20_)"
+ inkscape:connector-curvature="0" />
+ <linearGradient
+ id="SVGID_21_"
+ gradientUnits="userSpaceOnUse"
+ x1="580.69629"
+ y1="239.7637"
+ x2="580.69629"
+ y2="155.32719">
+ <stop
+ offset="0"
+ style="stop-color:#000000"
+ id="stop314" />
+ <stop
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0"
+ id="stop316" />
+ <a:midPointStop
+ offset="0"
+ style="stop-color:#000000" />
+ <a:midPointStop
+ offset="0.6933"
+ style="stop-color:#000000" />
+ <a:midPointStop
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0" />
+ </linearGradient>
+ <path
+ d="m 556.796,239.764 -0.17,-0.341 2.471,-14.229 5.282,-38.087 c 0.171,-1.022 -0.085,-1.534 -0.767,-1.789 l -4.175,-1.534 0.938,-6.476 h 17.041 l -1.022,6.816 0.255,0.085 c 5.027,-4.686 10.311,-7.753 15.678,-7.753 7.328,0 12.44,4.686 12.44,17.041 0,11.758 -4.601,29.225 -20.449,29.225 -5.538,0 -8.605,-2.13 -11.759,-4.345 l -1.874,12.78 c -0.085,0.938 0.085,1.278 1.192,1.363 l 8.606,0.853 -0.938,6.39 h -22.749 z m 17.041,-30.247 c 2.13,1.789 4.942,3.322 8.095,3.322 6.901,0 9.458,-9.713 9.458,-17.211 0,-5.027 -1.193,-8.351 -4.431,-8.351 -3.408,0 -7.754,3.664 -10.821,6.391 l -2.301,15.849 z"
+ id="path318"
+ style="fill:url(#SVGID_21_)"
+ inkscape:connector-curvature="0" />
+ <linearGradient
+ id="SVGID_22_"
+ gradientUnits="userSpaceOnUse"
+ x1="622.7832"
+ y1="239.7637"
+ x2="622.7832"
+ y2="155.3268">
+ <stop
+ offset="0"
+ style="stop-color:#000000"
+ id="stop321" />
+ <stop
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0"
+ id="stop323" />
+ <a:midPointStop
+ offset="0"
+ style="stop-color:#000000" />
+ <a:midPointStop
+ offset="0.6933"
+ style="stop-color:#000000" />
+ <a:midPointStop
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0" />
+ </linearGradient>
+ <path
+ d="m 635.777,219.4 c -3.749,1.789 -9.458,3.322 -14.229,3.322 -8.521,0 -12.099,-2.981 -12.099,-9.969 0,-1.107 0.085,-2.386 0.256,-3.749 l 3.066,-22.323 c 0.086,-0.512 0.086,-0.853 -0.511,-0.853 h -5.879 l 1.107,-7.839 c 7.242,-0.767 10.906,-4.431 13.122,-13.633 h 7.924 l -1.704,12.1 c -0.085,0.596 -0.085,0.852 0.597,0.852 h 11.758 l -1.193,8.521 h -12.439 l -2.812,20.364 c -0.171,1.107 -0.256,1.96 -0.256,2.727 0,2.982 1.278,4.26 4.942,4.26 2.385,0 4.771,-0.596 6.816,-1.363 l 1.534,7.583 z"
+ id="path325"
+ style="fill:url(#SVGID_22_)"
+ inkscape:connector-curvature="0" />
+ <linearGradient
+ id="SVGID_23_"
+ gradientUnits="userSpaceOnUse"
+ x1="655.6709"
+ y1="239.7637"
+ x2="655.6709"
+ y2="155.3275">
+ <stop
+ offset="0"
+ style="stop-color:#000000"
+ id="stop328" />
+ <stop
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0"
+ id="stop330" />
+ <a:midPointStop
+ offset="0"
+ style="stop-color:#000000" />
+ <a:midPointStop
+ offset="0.6933"
+ style="stop-color:#000000" />
+ <a:midPointStop
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0" />
+ </linearGradient>
+ <path
+ d="m 671.817,218.463 c -5.538,2.556 -11.588,4.26 -17.638,4.26 -13.377,0 -18.148,-7.839 -18.148,-18.148 0,-17.893 11.418,-28.117 25.307,-28.117 9.372,0 13.973,4.26 13.973,11.247 0,12.184 -12.865,15.763 -26.157,17.126 0.255,4.346 2.045,8.35 8.435,8.35 3.068,0 7.243,-0.937 12.355,-3.067 l 1.873,8.349 z m -8.094,-29.567 c 0,-2.045 -1.448,-3.237 -4.09,-3.237 -4.771,0 -8.69,4.175 -9.969,10.906 3.664,-0.511 14.059,-2.3 14.059,-7.669 z"
+ id="path332"
+ style="fill:url(#SVGID_23_)"
+ inkscape:connector-curvature="0" />
+ <linearGradient
+ id="SVGID_24_"
+ gradientUnits="userSpaceOnUse"
+ x1="697.92969"
+ y1="239.7637"
+ x2="697.92969"
+ y2="155.3277">
+ <stop
+ offset="0"
+ style="stop-color:#000000"
+ id="stop335" />
+ <stop
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0"
+ id="stop337" />
+ <a:midPointStop
+ offset="0"
+ style="stop-color:#000000" />
+ <a:midPointStop
+ offset="0.6933"
+ style="stop-color:#000000" />
+ <a:midPointStop
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0" />
+ </linearGradient>
+ <path
+ d="m 703.596,221.7 -0.17,-0.255 1.874,-10.396 2.471,-17.723 c 0.512,-3.578 0.341,-5.879 -2.215,-5.879 -3.664,0 -8.18,3.578 -11.077,6.135 l -2.641,19.512 c -0.171,1.363 -0.171,1.534 1.107,1.704 l 4.26,0.597 -0.852,6.305 h -23.347 l 0.853,-6.39 3.749,-0.512 c 1.107,-0.17 1.363,-0.426 1.533,-1.704 l 3.579,-25.987 c 0.17,-0.938 0,-1.534 -0.768,-1.789 l -4.175,-1.534 0.938,-6.476 h 16.87 l -0.937,6.987 0.255,0.085 c 4.771,-4.09 9.373,-7.924 16.02,-7.924 6.475,0 9.798,3.322 10.054,10.139 0,1.363 -0.085,3.067 -0.341,4.687 l -3.067,21.812 c -0.171,1.363 -0.171,1.534 1.022,1.704 l 4.26,0.597 L 722,221.7 h -18.404 z"
+ id="path339"
+ style="fill:url(#SVGID_24_)"
+ inkscape:connector-curvature="0" />
+ </g>
+</g>
+<g
+ id="g4141"
+ transform="matrix(0.81856441,0,0,0.81856441,79.234731,-94.128741)">
+ <g
+ id="g4143">
+
+
+
+
+
+
+
+
+
+
+ </g>
+ <g
+ id="g4165">
+ <linearGradient
+ y2="155.3275"
+ x2="324.1611"
+ y1="239.7637"
+ x1="324.1611"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient4167">
+ <stop
+ id="stop4169"
+ style="stop-color:#000000"
+ offset="0" />
+ <stop
+ id="stop4171"
+ style="stop-color:#000000;stop-opacity:0"
+ offset="1" />
+ <a:midPointStop
+ style="stop-color:#000000"
+ offset="0" />
+ <a:midPointStop
+ style="stop-color:#000000"
+ offset="0.6933" />
+ <a:midPointStop
+ style="stop-color:#000000;stop-opacity:0"
+ offset="1" />
+ </linearGradient>
+
+ <linearGradient
+ y2="155.3277"
+ x2="377.45459"
+ y1="239.7637"
+ x1="377.45459"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient4175">
+ <stop
+ id="stop4177"
+ style="stop-color:#000000"
+ offset="0" />
+ <stop
+ id="stop4179"
+ style="stop-color:#000000;stop-opacity:0"
+ offset="1" />
+ <a:midPointStop
+ style="stop-color:#000000"
+ offset="0" />
+ <a:midPointStop
+ style="stop-color:#000000"
+ offset="0.6933" />
+ <a:midPointStop
+ style="stop-color:#000000;stop-opacity:0"
+ offset="1" />
+ </linearGradient>
+
+ <linearGradient
+ y2="155.3275"
+ x2="435.17719"
+ y1="239.7637"
+ x1="435.17719"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient4183">
+ <stop
+ id="stop4185"
+ style="stop-color:#000000"
+ offset="0" />
+ <stop
+ id="stop4187"
+ style="stop-color:#000000;stop-opacity:0"
+ offset="1" />
+ <a:midPointStop
+ style="stop-color:#000000"
+ offset="0" />
+ <a:midPointStop
+ style="stop-color:#000000"
+ offset="0.6933" />
+ <a:midPointStop
+ style="stop-color:#000000;stop-opacity:0"
+ offset="1" />
+ </linearGradient>
+
+ <linearGradient
+ y2="155.3275"
+ x2="474.83691"
+ y1="239.7637"
+ x1="474.83691"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient4191">
+ <stop
+ id="stop4193"
+ style="stop-color:#000000"
+ offset="0" />
+ <stop
+ id="stop4195"
+ style="stop-color:#000000;stop-opacity:0"
+ offset="1" />
+ <a:midPointStop
+ style="stop-color:#000000"
+ offset="0" />
+ <a:midPointStop
+ style="stop-color:#000000"
+ offset="0.6933" />
+ <a:midPointStop
+ style="stop-color:#000000;stop-opacity:0"
+ offset="1" />
+ </linearGradient>
+
+ <linearGradient
+ y2="155.3277"
+ x2="512.28223"
+ y1="239.7637"
+ x1="512.28223"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient4199">
+ <stop
+ id="stop4201"
+ style="stop-color:#000000"
+ offset="0" />
+ <stop
+ id="stop4203"
+ style="stop-color:#000000;stop-opacity:0"
+ offset="1" />
+ <a:midPointStop
+ style="stop-color:#000000"
+ offset="0" />
+ <a:midPointStop
+ style="stop-color:#000000"
+ offset="0.6933" />
+ <a:midPointStop
+ style="stop-color:#000000;stop-opacity:0"
+ offset="1" />
+ </linearGradient>
+
+ <linearGradient
+ y2="155.32719"
+ x2="546.65918"
+ y1="239.7637"
+ x1="546.65918"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient4207">
+ <stop
+ id="stop4209"
+ style="stop-color:#000000"
+ offset="0" />
+ <stop
+ id="stop4211"
+ style="stop-color:#000000;stop-opacity:0"
+ offset="1" />
+ <a:midPointStop
+ style="stop-color:#000000"
+ offset="0" />
+ <a:midPointStop
+ style="stop-color:#000000"
+ offset="0.6933" />
+ <a:midPointStop
+ style="stop-color:#000000;stop-opacity:0"
+ offset="1" />
+ </linearGradient>
+
+ <linearGradient
+ y2="155.32719"
+ x2="580.69629"
+ y1="239.7637"
+ x1="580.69629"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient4215">
+ <stop
+ id="stop4217"
+ style="stop-color:#000000"
+ offset="0" />
+ <stop
+ id="stop4219"
+ style="stop-color:#000000;stop-opacity:0"
+ offset="1" />
+ <a:midPointStop
+ style="stop-color:#000000"
+ offset="0" />
+ <a:midPointStop
+ style="stop-color:#000000"
+ offset="0.6933" />
+ <a:midPointStop
+ style="stop-color:#000000;stop-opacity:0"
+ offset="1" />
+ </linearGradient>
+
+ <linearGradient
+ y2="155.3268"
+ x2="622.7832"
+ y1="239.7637"
+ x1="622.7832"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient4223">
+ <stop
+ id="stop4225"
+ style="stop-color:#000000"
+ offset="0" />
+ <stop
+ id="stop4227"
+ style="stop-color:#000000;stop-opacity:0"
+ offset="1" />
+ <a:midPointStop
+ style="stop-color:#000000"
+ offset="0" />
+ <a:midPointStop
+ style="stop-color:#000000"
+ offset="0.6933" />
+ <a:midPointStop
+ style="stop-color:#000000;stop-opacity:0"
+ offset="1" />
+ </linearGradient>
+
+ <linearGradient
+ y2="155.3275"
+ x2="655.6709"
+ y1="239.7637"
+ x1="655.6709"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient4231">
+ <stop
+ id="stop4233"
+ style="stop-color:#000000"
+ offset="0" />
+ <stop
+ id="stop4235"
+ style="stop-color:#000000;stop-opacity:0"
+ offset="1" />
+ <a:midPointStop
+ style="stop-color:#000000"
+ offset="0" />
+ <a:midPointStop
+ style="stop-color:#000000"
+ offset="0.6933" />
+ <a:midPointStop
+ style="stop-color:#000000;stop-opacity:0"
+ offset="1" />
+ </linearGradient>
+
+ <linearGradient
+ y2="155.3277"
+ x2="697.92969"
+ y1="239.7637"
+ x1="697.92969"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient4239">
+ <stop
+ id="stop4241"
+ style="stop-color:#000000"
+ offset="0" />
+ <stop
+ id="stop4243"
+ style="stop-color:#000000;stop-opacity:0"
+ offset="1" />
+ <a:midPointStop
+ style="stop-color:#000000"
+ offset="0" />
+ <a:midPointStop
+ style="stop-color:#000000"
+ offset="0.6933" />
+ <a:midPointStop
+ style="stop-color:#000000;stop-opacity:0"
+ offset="1" />
+ </linearGradient>
+
+ </g>
+</g></svg> \ No newline at end of file
diff --git a/media/switch_logo.png b/media/switch_logo.png
new file mode 100644
index 00000000..1e072247
--- /dev/null
+++ b/media/switch_logo.png
Binary files differ
diff --git a/docs/emscripten_switch_logo.svg b/media/switch_logo.svg
index 58277388..58277388 100644
--- a/docs/emscripten_switch_logo.svg
+++ b/media/switch_logo.svg
diff --git a/package.json b/package.json
index a1447c9f..4fbba2fb 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "emscripten",
- "version": "1.0.0",
+ "version": "1.13.0",
"dependencies": {
"ws": "~0.4.28"
}
diff --git a/patches/README b/patches/README
deleted file mode 100644
index f6817fed..00000000
--- a/patches/README
+++ /dev/null
@@ -1,4 +0,0 @@
-This directory contains a useful mercurial patch queue.
-
-Note to patch queue maintainer: You need to manually copy from .hg/patches into this directory, after |qrefresh|ing the patch.
-
diff --git a/patches/series b/patches/series
deleted file mode 100644
index 04f16d03..00000000
--- a/patches/series
+++ /dev/null
@@ -1,2 +0,0 @@
-sauer
-
diff --git a/scons-tools/emscripten.py b/scons-tools/emscripten.py
index 4c48083e..94153adb 100755
--- a/scons-tools/emscripten.py
+++ b/scons-tools/emscripten.py
@@ -9,11 +9,6 @@ from SCons.Scanner import Scanner
def exists(env):
return True
-def _expand_settings_flags(settings, env):
- return [
- ('-s%s=%s' % (KEY, json.dumps(VALUE).replace('"', '\\"')))
- for KEY, VALUE in settings.items() ]
-
emscripten_version_files = {}
def build_version_file(env):
@@ -86,10 +81,6 @@ def emscripten(env, target_js, source_bc):
buildName('raw.js'),
[opt_ll])
- [optimized_js] = env.JSOptimizer(
- buildName('opt.js'),
- raw_emscripten_js)
-
prejs = [
env['EMSCRIPTEN_PREJS'],
'${EMSCRIPTEN_HOME}/src/embind/emval.js',
@@ -98,7 +89,7 @@ def emscripten(env, target_js, source_bc):
[concatenated_js] = env.Concatenate(
buildName('concat.js'),
[ prejs,
- optimized_js,
+ raw_emscripten_js,
env['EMSCRIPTEN_POSTJS'] ])
DISABLE_EMSCRIPTEN_WARNINGS = [
@@ -139,11 +130,6 @@ def emscripten(env, target_js, source_bc):
concatenated_js,
CLOSURE_FLAGS=['--language_in', 'ECMASCRIPT5']+DISABLE_EMSCRIPTEN_WARNINGS+['--formatting', 'PRETTY_PRINT', '--compilation_level', 'ADVANCED_OPTIMIZATIONS'])
- [global_emscripten_min_js] = env.JSOptimizer(
- buildName('global.min.js'),
- closure_js,
- JS_OPTIMIZER_PASSES=['simplifyExpressionsPost', 'minifyWhitespace', 'last'])
-
[emscripten_iteration_js] = env.WrapInModule(
buildName('iteration.js'),
iter_global_emscripten_js)
@@ -154,12 +140,27 @@ def emscripten(env, target_js, source_bc):
[emscripten_min_js] = env.WrapInModule(
buildName('min.js'),
- global_emscripten_min_js)
+ closure_js)
return [emscripten_iteration_js, emscripten_js, emscripten_min_js]
LIBC_SOURCES = [
'system/lib/dlmalloc.c',
+ 'system/lib/libc/musl/src/internal/floatscan.c',
+ 'system/lib/libc/musl/src/internal/shgetc.c',
+ 'system/lib/libc/musl/src/math/scalbn.c',
+ 'system/lib/libc/musl/src/math/scalbnl.c',
+ 'system/lib/libc/musl/src/stdio/__overflow.c',
+ 'system/lib/libc/musl/src/stdio/__toread.c',
+ 'system/lib/libc/musl/src/stdio/__towrite.c',
+ 'system/lib/libc/musl/src/stdio/__uflow.c',
+ 'system/lib/libc/musl/src/stdlib/atof.c',
+ 'system/lib/libc/musl/src/stdlib/strtod.c',
+ 'system/lib/libc/musl/src/string/memcmp.c',
+ 'system/lib/libc/musl/src/string/strcasecmp.c',
+ 'system/lib/libc/musl/src/string/strcmp.c',
+ 'system/lib/libc/musl/src/string/strncasecmp.c',
+ 'system/lib/libc/musl/src/string/strncmp.c',
'system/lib/libc/musl/src/string/wmemset.c',
'system/lib/libc/musl/src/string/wmemcpy.c',
]
@@ -185,13 +186,14 @@ LIBCXX_SOURCES = [os.path.join('system/lib/libcxx', x) for x in [
'strstream.cpp',
'system_error.cpp',
#'thread.cpp',
- 'typeinfo.cpp',
+ #'typeinfo.cpp',
'utility.cpp',
'valarray.cpp',
]]
LIBCXXABI_SOURCES = [os.path.join('system/lib/libcxxabi/src', x) for x in [
- 'private_typeinfo.cpp'
+ 'private_typeinfo.cpp',
+ 'typeinfo.cpp'
]]
# MAJOR HACK ALERT
@@ -233,6 +235,7 @@ def build_libcxx(env):
env = env.Clone()
env['CXXFLAGS'] = filter(lambda e: e not in ('-Werror', '-Wall'), env['CXXFLAGS'])
env['CCFLAGS'] = filter(lambda e: e not in ('-Werror', '-Wall'), env['CCFLAGS'])
+ env['CCFLAGS'] = env['CCFLAGS'] + ['-isystem${EMSCRIPTEN_HOME}/system/lib/libc/musl/src/internal/']
objs = [
env.Object(
@@ -248,16 +251,10 @@ def build_libcxx(env):
def generate(env):
env.SetDefault(
PYTHON=sys.executable,
- NODEJS='node',
- JS_ENGINE='$NODEJS',
- EMSCRIPTEN_FLAGS=['-v', '-j', '--suppressUsageWarning'],
+ EMSCRIPTEN_FLAGS=[],
EMSCRIPTEN_TEMP_DIR=env.Dir('#/emscripten.tmp'),
- _expand_settings_flags=_expand_settings_flags,
EMSCRIPTEN_PREJS=[],
EMSCRIPTEN_POSTJS=[],
- EMSCRIPTEN_SETTINGS={},
- _EMSCRIPTEN_SETTINGS_FLAGS='${_expand_settings_flags(EMSCRIPTEN_SETTINGS, __env__)}',
- JS_OPTIMIZER_PASSES=[],
LLVM_OPT_PASSES=['-std-compile-opts', '-std-link-opts'],
EMSCRIPTEN_HOME=env.Dir(os.path.join(os.path.dirname(__file__), '..')),
@@ -286,10 +283,9 @@ def generate(env):
'-Xclang', '-nostdinc++',
'-Xclang', '-nobuiltininc',
'-Xclang', '-nostdsysteminc',
- '-Xclang', '-isystem$EMSCRIPTEN_HOME/system/include',
+ '-Xclang', '-isystem$EMSCRIPTEN_HOME/system/include/compat',
'-Xclang', '-isystem$EMSCRIPTEN_HOME/system/include/libc',
'-Xclang', '-isystem$EMSCRIPTEN_HOME/system/include/libcxx',
- '-Xclang', '-isystem$EMSCRIPTEN_HOME/system/include/bsd',
'-emit-llvm'],
CXXFLAGS=['-std=c++11', '-fno-exceptions'],
)
@@ -307,11 +303,7 @@ def generate(env):
)
env['BUILDERS']['Emscripten'] = Builder(
- action='$PYTHON ${EMSCRIPTEN_HOME}/emscripten.py $EMSCRIPTEN_FLAGS $_EMSCRIPTEN_SETTINGS_FLAGS --temp-dir=$EMSCRIPTEN_TEMP_DIR --compiler $JS_ENGINE --relooper=third-party/relooper.js $SOURCE > $TARGET',
- target_scanner=EmscriptenScanner)
-
- env['BUILDERS']['JSOptimizer'] = Builder(
- action='$JS_ENGINE ${EMSCRIPTEN_HOME}/tools/js-optimizer.js $SOURCE $JS_OPTIMIZER_PASSES > $TARGET',
+ action='$PYTHON ${EMSCRIPTEN_HOME}/emcc ${EMSCRIPTEN_FLAGS} $SOURCE -o $TARGET',
target_scanner=EmscriptenScanner)
def depend_on_embedder(target, source, env):
diff --git a/src/closure-externs.js b/src/closure-externs.js
index a82aa669..fe6d84aa 100644
--- a/src/closure-externs.js
+++ b/src/closure-externs.js
@@ -108,3 +108,63 @@ var flags = {};
flags.binary;
+/**
+ * @fileoverview Definitions for W3C's Gamepad specification.
+ * @see http://www.w3.org/TR/gamepad/
+ * @externs
+ */
+
+/**
+ * @typedef {{id: string, index: number, timestamp: number, axes: Array.<number>, buttons: Array.<number>}}
+ */
+var Gamepad;
+
+/**
+* @type {Array.<number>}
+*/
+Gamepad.buttons;
+
+/**
+* @type {Array.<number>}
+*/
+Gamepad.axes;
+
+/**
+* @type {number}
+*/
+Gamepad.index;
+
+/**
+* @type {string}
+*/
+Gamepad.id;
+
+/**
+* @type {number}
+*/
+Gamepad.timestamp;
+
+/**
+ * @return {Array.<Gamepad>}
+ */
+navigator.getGamepads = function() {};
+
+/**
+ * @return {Array.<Gamepad>}
+ */
+navigator.webkitGetGamepads = function() {};
+
+/**
+ * @return {Array.<Gamepad>}
+ */
+navigator.webkitGamepads = function() {};
+
+/**
+ * @return {Array.<Gamepad>}
+ */
+navigator.mozGamepads = function() {};
+
+/**
+ * @return {Array.<Gamepad>}
+ */
+navigator.gamepads = function() {};
diff --git a/src/deps_info.json b/src/deps_info.json
index b38ffd00..029a20e1 100644
--- a/src/deps_info.json
+++ b/src/deps_info.json
@@ -2,6 +2,7 @@
"uuid_compare": ["memcmp"],
"SDL_Init": ["malloc", "free"],
"SDL_GL_GetProcAddress": ["emscripten_GetProcAddress"],
- "eglGetProcAddress": ["emscripten_GetProcAddress"]
+ "eglGetProcAddress": ["emscripten_GetProcAddress"],
+ "emscripten_GetProcAddress": ["strstr"]
}
diff --git a/src/embind/embind.js b/src/embind/embind.js
index f0cd0c74..6ec07cd9 100644
--- a/src/embind/embind.js
+++ b/src/embind/embind.js
@@ -1,6 +1,6 @@
/*global Module*/
/*global _malloc, _free, _memcpy*/
-/*global FUNCTION_TABLE, HEAP8, HEAPU8, HEAP16, HEAPU16, HEAP32, HEAPU32*/
+/*global FUNCTION_TABLE, HEAP8, HEAPU8, HEAP16, HEAPU16, HEAP32, HEAPU32, HEAPF32, HEAPF64*/
/*global readLatin1String*/
/*global __emval_register, _emval_handle_array, __emval_decref*/
/*global ___getTypeName*/
@@ -35,7 +35,7 @@ function throwUnboundTypeError(message, types) {
seen[type] = true;
}
types.forEach(visit);
-
+
throw new UnboundTypeError(message + ': ' + unboundTypes.map(getTypeName).join([', ']));
}
@@ -55,7 +55,7 @@ function ensureOverloadTable(proto, methodName, humanName) {
// Move the previous function into the overload table.
proto[methodName].overloadTable = [];
proto[methodName].overloadTable[prevFunc.argCount] = prevFunc;
- }
+ }
}
/* Registers a symbol (function, class, enum, ...) as part of the Module JS object so that
@@ -72,7 +72,7 @@ function exposePublicSymbol(name, value, numArguments) {
if (undefined === numArguments || (undefined !== Module[name].overloadTable && undefined !== Module[name].overloadTable[numArguments])) {
throwBindingError("Cannot register public name '" + name + "' twice");
}
-
+
// We are exposing a function with the same name as an existing function. Create an overload table and a function selector
// that routes between the two.
ensureOverloadTable(Module, name, name);
@@ -164,6 +164,10 @@ var typeDependencies = {};
var registeredPointers = {};
function registerType(rawType, registeredInstance) {
+ if (!('argPackAdvance' in registeredInstance)) {
+ throw new TypeError('registerType registeredInstance requires argPackAdvance');
+ }
+
var name = registeredInstance.name;
if (!rawType) {
throwBindingError('type "' + name + '" must have a positive integer typeid pointer');
@@ -268,6 +272,7 @@ function __embind_register_void(rawType, name) {
name = readLatin1String(name);
registerType(rawType, {
name: name,
+ 'argPackAdvance': 0,
'fromWireType': function() {
return undefined;
},
@@ -278,7 +283,9 @@ function __embind_register_void(rawType, name) {
});
}
-function __embind_register_bool(rawType, name, trueValue, falseValue) {
+function __embind_register_bool(rawType, name, size, trueValue, falseValue) {
+ var shift = getShiftFromSize(size);
+
name = readLatin1String(name);
registerType(rawType, {
name: name,
@@ -290,21 +297,80 @@ function __embind_register_bool(rawType, name, trueValue, falseValue) {
'toWireType': function(destructors, o) {
return o ? trueValue : falseValue;
},
+ 'argPackAdvance': 8,
+ 'readValueFromPointer': function(pointer) {
+ // TODO: if heap is fixed (like in asm.js) this could be executed outside
+ var heap;
+ if (size === 1) {
+ heap = HEAP8;
+ } else if (size === 2) {
+ heap = HEAP16;
+ } else if (size === 4) {
+ heap = HEAP32;
+ } else {
+ throw new TypeError("Unknown boolean type size: " + name);
+ }
+ return this['fromWireType'](heap[pointer >> shift]);
+ },
destructorFunction: null, // This type does not need a destructor
});
}
+function getShiftFromSize(size) {
+ switch (size) {
+ case 1: return 0;
+ case 2: return 1;
+ case 4: return 2;
+ case 8: return 3;
+ default:
+ throw new TypeError('Unknown type size: ' + size);
+ }
+}
+
+function integerReadValueFromPointer(name, shift, signed) {
+ switch (shift) {
+ case 0: return function(pointer) {
+ var heap = signed ? HEAP8 : HEAPU8;
+ return this['fromWireType'](heap[pointer]);
+ };
+ case 1: return function(pointer) {
+ var heap = signed ? HEAP16 : HEAPU16;
+ return this['fromWireType'](heap[pointer >> 1]);
+ };
+ case 2: return function(pointer) {
+ var heap = signed ? HEAP32 : HEAPU32;
+ return this['fromWireType'](heap[pointer >> 2]);
+ };
+ default:
+ throw new TypeError("Unknown integer type: " + name);
+ }
+}
+
+function floatReadValueFromPointer(name, shift) {
+ switch (shift) {
+ case 2: return function(pointer) {
+ return this['fromWireType'](HEAPF32[pointer >> 2]);
+ };
+ case 3: return function(pointer) {
+ return this['fromWireType'](HEAPF64[pointer >> 3]);
+ };
+ default:
+ throw new TypeError("Unknown float type: " + name);
+ }
+}
+
// When converting a number from JS to C++ side, the valid range of the number is
// [minRange, maxRange], inclusive.
-function __embind_register_integer(primitiveType, name, minRange, maxRange) {
+function __embind_register_integer(primitiveType, name, size, minRange, maxRange) {
name = readLatin1String(name);
if (maxRange === -1) { // LLVM doesn't have signed and unsigned 32-bit types, so u32 literals come out as 'i32 -1'. Always treat those as max u32.
maxRange = 4294967295;
}
+
+ var shift = getShiftFromSize(size);
+
registerType(primitiveType, {
name: name,
- minRange: minRange,
- maxRange: maxRange,
'fromWireType': function(value) {
return value;
},
@@ -319,11 +385,16 @@ function __embind_register_integer(primitiveType, name, minRange, maxRange) {
}
return value | 0;
},
+ 'argPackAdvance': 8,
+ 'readValueFromPointer': integerReadValueFromPointer(name, shift, minRange !== 0),
destructorFunction: null, // This type does not need a destructor
});
}
-function __embind_register_float(rawType, name) {
+
+
+function __embind_register_float(rawType, name, size) {
+ var shift = getShiftFromSize(size);
name = readLatin1String(name);
registerType(rawType, {
name: name,
@@ -338,10 +409,17 @@ function __embind_register_float(rawType, name) {
}
return value;
},
+ 'argPackAdvance': 8,
+ 'readValueFromPointer': floatReadValueFromPointer(name, shift),
destructorFunction: null, // This type does not need a destructor
});
}
+// For types whose wire types are 32-bit pointers.
+function simpleReadValueFromPointer(pointer) {
+ return this['fromWireType'](HEAPU32[pointer >> 2]);
+}
+
function __embind_register_std_string(rawType, name) {
name = readLatin1String(name);
registerType(rawType, {
@@ -394,6 +472,8 @@ function __embind_register_std_string(rawType, name) {
}
return ptr;
},
+ 'argPackAdvance': 8,
+ 'readValueFromPointer': simpleReadValueFromPointer,
destructorFunction: function(ptr) { _free(ptr); },
});
}
@@ -434,6 +514,8 @@ function __embind_register_std_wstring(rawType, charSize, name) {
}
return ptr;
},
+ 'argPackAdvance': 8,
+ 'readValueFromPointer': simpleReadValueFromPointer,
destructorFunction: function(ptr) { _free(ptr); },
});
}
@@ -450,6 +532,8 @@ function __embind_register_emval(rawType, name) {
'toWireType': function(destructors, value) {
return __emval_register(value);
},
+ 'argPackAdvance': 8,
+ 'readValueFromPointer': simpleReadValueFromPointer,
destructorFunction: null, // This type does not need a destructor
});
}
@@ -463,7 +547,7 @@ function __embind_register_memory_view(rawType, name) {
Int32Array,
Uint32Array,
Float32Array,
- Float64Array,
+ Float64Array,
];
name = readLatin1String(name);
@@ -476,6 +560,10 @@ function __embind_register_memory_view(rawType, name) {
var TA = typeMapping[type];
return new TA(HEAP8.buffer, data, size);
},
+ 'argPackAdvance': 16,
+ 'readValueFromPointer': function(ptr) {
+ return this['fromWireType'](ptr);
+ },
});
}
@@ -531,7 +619,7 @@ function craftInvokerFunction(humanName, argTypes, classType, cppInvokerFunc, cp
if (argCount < 2) {
throwBindingError("argTypes array size mismatch! Must at least get return value and 'this' types!");
}
-
+
var isClassMethodFunc = (argTypes[1] !== null && classType !== null);
if (!isClassMethodFunc && !FUNCTION_TABLE[cppTargetFunc]) {
@@ -560,7 +648,7 @@ function craftInvokerFunction(humanName, argTypes, classType, cppInvokerFunc, cp
// Determine if we need to use a dynamic stack to store the destructors for the function parameters.
// TODO: Remove this completely once all function invokers are being dynamically generated.
var needsDestructorStack = false;
-
+
for(var i = 1; i < argTypes.length; ++i) { // Skip return value at index 0 - it's not deleted here.
if (argTypes[i] !== null && argTypes[i].destructorFunction === undefined) { // The type does not define a destructor function - must use dynamic stack
needsDestructorStack = true;
@@ -595,7 +683,7 @@ function craftInvokerFunction(humanName, argTypes, classType, cppInvokerFunc, cp
invokerFnBody +=
(returns?"var rv = ":"") + "invoker(fn"+(argsListWired.length>0?", ":"")+argsListWired+");\n";
-
+
if (needsDestructorStack) {
invokerFnBody += "runDestructors(destructors);\n";
} else {
@@ -608,7 +696,7 @@ function craftInvokerFunction(humanName, argTypes, classType, cppInvokerFunc, cp
}
}
}
-
+
if (returns) {
invokerFnBody += "return retType.fromWireType(rv);\n";
}
@@ -676,7 +764,7 @@ function __embind_finalize_value_array(rawTupleType) {
var rawConstructor = reg.rawConstructor;
var rawDestructor = reg.rawDestructor;
-
+
whenDependentTypesAreResolved([rawTupleType], elementTypes, function(elementTypes) {
elements.forEach(function(elt, i) {
var getterReturnType = elementTypes[i];
@@ -718,6 +806,8 @@ function __embind_finalize_value_array(rawTupleType) {
}
return ptr;
},
+ 'argPackAdvance': 8,
+ 'readValueFromPointer': simpleReadValueFromPointer,
destructorFunction: rawDestructor,
}];
});
@@ -819,6 +909,8 @@ function __embind_finalize_value_object(structType) {
}
return ptr;
},
+ 'argPackAdvance': 8,
+ 'readValueFromPointer': simpleReadValueFromPointer,
destructorFunction: rawDestructor,
}];
});
@@ -860,7 +952,7 @@ var genericPointerToWireType = function(destructors, handle) {
if (undefined === handle.$$.smartPtr) {
throwBindingError('Passing raw pointer to smart pointer is illegal');
}
-
+
switch (this.sharingPolicy) {
case 0: // NONE
// no upcasting
@@ -870,11 +962,11 @@ var genericPointerToWireType = function(destructors, handle) {
throwBindingError('Cannot convert argument of type ' + (handle.$$.smartPtrType ? handle.$$.smartPtrType.name : handle.$$.ptrType.name) + ' to parameter type ' + this.name);
}
break;
-
+
case 1: // INTRUSIVE
ptr = handle.$$.smartPtr;
break;
-
+
case 2: // BY_EMVAL
if (handle.$$.smartPtrType === this) {
ptr = handle.$$.smartPtr;
@@ -891,7 +983,7 @@ var genericPointerToWireType = function(destructors, handle) {
}
}
break;
-
+
default:
throwBindingError('Unsupporting sharing policy');
}
@@ -985,7 +1077,7 @@ function RegisteredPointer(
this['toWireType'] = genericPointerToWireType;
// Here we must leave this.destructorFunction undefined, since whether genericPointerToWireType returns
// a pointer that needs to be freed up is runtime-dependent, and cannot be evaluated at registration time.
- // TODO: Create an alternative mechanism that allows removing the use of var destructors = []; array in
+ // TODO: Create an alternative mechanism that allows removing the use of var destructors = []; array in
// craftInvokerFunction altogether.
}
}
@@ -1003,6 +1095,9 @@ RegisteredPointer.prototype.destructor = function(ptr) {
}
};
+RegisteredPointer.prototype['argPackAdvance'] = 8;
+RegisteredPointer.prototype['readValueFromPointer'] = simpleReadValueFromPointer;
+
RegisteredPointer.prototype['fromWireType'] = function(ptr) {
// ptr is a raw pointer (or a raw smartpointer)
@@ -1110,7 +1205,7 @@ ClassHandle.prototype['isAliasOf'] = function(other) {
right = rightClass.upcast(right);
rightClass = rightClass.baseClass;
}
-
+
return leftClass === rightClass && left === right;
};
@@ -1195,7 +1290,7 @@ Module['setDelayFunction'] = function setDelayFunction(fn) {
delayFunction(flushPendingDeletes);
}
};
-
+
function RegisteredClass(
name,
constructor,
@@ -1298,7 +1393,7 @@ function __embind_register_class(
true,
false,
false);
-
+
var pointerConverter = new RegisteredPointer(
name + '*',
registeredClass,
@@ -1360,10 +1455,10 @@ function __embind_register_class_constructor(
for (var i = 1; i < argCount; ++i) {
args[i] = argTypes[i]['toWireType'](destructors, arguments[i - 1]);
}
-
+
var ptr = invoker.apply(null, args);
runDestructors(destructors);
-
+
return argTypes[0]['fromWireType'](ptr);
};
return [];
@@ -1447,7 +1542,7 @@ function __embind_register_class_function(
}
whenDependentTypesAreResolved([], rawArgTypes, function(argTypes) {
-
+
var memberFunction = craftInvokerFunction(humanName, argTypes, classType, rawInvoker, context);
// Replace the initial unbound-handler-stub function with the appropriate member function, now that all types
@@ -1627,8 +1722,11 @@ function __embind_register_smart_ptr(
function __embind_register_enum(
rawType,
- name
+ name,
+ size,
+ isSigned
) {
+ var shift = getShiftFromSize(size);
name = readLatin1String(name);
function constructor() {
@@ -1644,6 +1742,8 @@ function __embind_register_enum(
'toWireType': function(destructors, c) {
return c.value;
},
+ 'argPackAdvance': 8,
+ 'readValueFromPointer': integerReadValueFromPointer(name, shift, isSigned),
destructorFunction: null,
});
exposePublicSymbol(name, constructor);
diff --git a/src/embind/emval.js b/src/embind/emval.js
index 039f1d61..4007701a 100644
--- a/src/embind/emval.js
+++ b/src/embind/emval.js
@@ -55,6 +55,7 @@ function requireHandle(handle) {
if (!handle) {
throwBindingError('Cannot use deleted val. handle = ' + handle);
}
+ return _emval_handle_array[handle].value;
}
function __emval_register(value) {
@@ -105,9 +106,9 @@ function __emval_new_cstring(v) {
return __emval_register(getStringOrSymbol(v));
}
-function __emval_take_value(type, v) {
+function __emval_take_value(type, argv) {
type = requireRegisteredType(type, '_emval_take_value');
- v = type['fromWireType'](v);
+ var v = type['readValueFromPointer'](argv);
return __emval_register(v);
}
@@ -116,70 +117,51 @@ var __newers = {}; // arity -> function
function craftEmvalAllocator(argCount) {
/*This function returns a new function that looks like this:
- function emval_allocator_3(handle, argTypes, arg0Wired, arg1Wired, arg2Wired) {
+ function emval_allocator_3(constructor, argTypes, args) {
var argType0 = requireRegisteredType(HEAP32[(argTypes >> 2)], "parameter 0");
- var arg0 = argType0.fromWireType(arg0Wired);
+ var arg0 = argType0.readValueFromPointer(args);
var argType1 = requireRegisteredType(HEAP32[(argTypes >> 2) + 1], "parameter 1");
- var arg1 = argType1.fromWireType(arg1Wired);
+ var arg1 = argType1.readValueFromPointer(args + 8);
var argType2 = requireRegisteredType(HEAP32[(argTypes >> 2) + 2], "parameter 2");
- var arg2 = argType2.fromWireType(arg2Wired);
- var constructor = _emval_handle_array[handle].value;
- var emval = new constructor(arg0, arg1, arg2);
- return emval;
+ var arg2 = argType2.readValueFromPointer(args + 16);
+ var obj = new constructor(arg0, arg1, arg2);
+ return __emval_register(obj);
} */
- var args1 = ["requireRegisteredType", "HEAP32", "_emval_handle_array", "__emval_register"];
- var args2 = [requireRegisteredType, HEAP32, _emval_handle_array, __emval_register];
-
var argsList = "";
- var argsListWired = "";
for(var i = 0; i < argCount; ++i) {
argsList += (i!==0?", ":"")+"arg"+i; // 'arg0, arg1, ..., argn'
- argsListWired += ", arg"+i+"Wired"; // ', arg0Wired, arg1Wired, ..., argnWired'
}
- var invokerFnBody =
- "return function emval_allocator_"+argCount+"(handle, argTypes " + argsListWired + ") {\n";
+ var functionBody =
+ "return function emval_allocator_"+argCount+"(constructor, argTypes, args) {\n";
for(var i = 0; i < argCount; ++i) {
- invokerFnBody +=
+ functionBody +=
"var argType"+i+" = requireRegisteredType(HEAP32[(argTypes >> 2) + "+i+"], \"parameter "+i+"\");\n" +
- "var arg"+i+" = argType"+i+".fromWireType(arg"+i+"Wired);\n";
+ "var arg"+i+" = argType"+i+".readValueFromPointer(args);\n" +
+ "args += argType"+i+".argPackAdvance;\n";
}
- invokerFnBody +=
- "var constructor = _emval_handle_array[handle].value;\n" +
+ functionBody +=
"var obj = new constructor("+argsList+");\n" +
"return __emval_register(obj);\n" +
"}\n";
- args1.push(invokerFnBody);
- var invokerFunction = new_(Function, args1).apply(null, args2);
- return invokerFunction;
+ /*jshint evil:true*/
+ return (new Function("requireRegisteredType", "HEAP32", "__emval_register", functionBody))(
+ requireRegisteredType, HEAP32, __emval_register);
}
-function __emval_new(handle, argCount, argTypes) {
- requireHandle(handle);
-
+function __emval_new(handle, argCount, argTypes, args) {
+ handle = requireHandle(handle);
+
var newer = __newers[argCount];
if (!newer) {
newer = craftEmvalAllocator(argCount);
__newers[argCount] = newer;
}
- if (argCount === 0) {
- return newer(handle, argTypes);
- } else if (argCount === 1) {
- return newer(handle, argTypes, arguments[3]);
- } else if (argCount === 2) {
- return newer(handle, argTypes, arguments[3], arguments[4]);
- } else if (argCount === 3) {
- return newer(handle, argTypes, arguments[3], arguments[4], arguments[5]);
- } else if (argCount === 4) {
- return newer(handle, argTypes, arguments[3], arguments[4], arguments[5], arguments[6]);
- } else {
- // This is a slow path! (.apply and .splice are slow), so a few specializations are present above.
- return newer.apply(null, arguments.splice(1));
- }
+ return newer(handle, argTypes, args);
}
// appease jshint (technically this code uses eval)
@@ -196,46 +178,39 @@ function __emval_get_module_property(name) {
}
function __emval_get_property(handle, key) {
- requireHandle(handle);
- return __emval_register(_emval_handle_array[handle].value[_emval_handle_array[key].value]);
+ handle = requireHandle(handle);
+ key = requireHandle(key);
+ return __emval_register(handle[key]);
}
function __emval_set_property(handle, key, value) {
- requireHandle(handle);
- _emval_handle_array[handle].value[_emval_handle_array[key].value] = _emval_handle_array[value].value;
+ handle = requireHandle(handle);
+ key = requireHandle(key);
+ value = requireHandle(value);
+ handle[key] = value;
}
function __emval_as(handle, returnType, destructorsRef) {
- requireHandle(handle);
+ handle = requireHandle(handle);
returnType = requireRegisteredType(returnType, 'emval::as');
var destructors = [];
var rd = __emval_register(destructors);
HEAP32[destructorsRef >> 2] = rd;
- return returnType['toWireType'](destructors, _emval_handle_array[handle].value);
+ return returnType['toWireType'](destructors, handle);
}
-function parseParameters(argCount, argTypes, argWireTypes) {
- var a = new Array(argCount);
- for (var i = 0; i < argCount; ++i) {
- var argType = requireRegisteredType(
- HEAP32[(argTypes >> 2) + i],
- "parameter " + i);
- a[i] = argType['fromWireType'](argWireTypes[i]);
- }
- return a;
-}
-
-function __emval_call(handle, argCount, argTypes) {
- requireHandle(handle);
+function __emval_call(handle, argCount, argTypes, argv) {
+ handle = requireHandle(handle);
var types = lookupTypes(argCount, argTypes);
var args = new Array(argCount);
for (var i = 0; i < argCount; ++i) {
- args[i] = types[i]['fromWireType'](arguments[3 + i]);
+ var type = types[i];
+ args[i] = type['readValueFromPointer'](argv);
+ argv += type.argPackAdvance;
}
- var fn = _emval_handle_array[handle].value;
- var rv = fn.apply(undefined, args);
+ var rv = handle.apply(undefined, args);
return __emval_register(rv);
}
@@ -255,44 +230,59 @@ function allocateDestructors(destructorsRef) {
return destructors;
}
+// Leave id 0 undefined. It's not a big deal, but might be confusing
+// to have null be a valid method caller.
+var methodCallers = [undefined];
+
+function addMethodCaller(caller) {
+ var id = methodCallers.length;
+ methodCallers.push(caller);
+ return id;
+}
+
function __emval_get_method_caller(argCount, argTypes) {
var types = lookupTypes(argCount, argTypes);
var retType = types[0];
var signatureName = retType.name + "_$" + types.slice(1).map(function (t) { return t.name; }).join("_") + "$";
- var args1 = ["addFunction", "createNamedFunction", "requireHandle", "getStringOrSymbol", "_emval_handle_array", "retType", "allocateDestructors"];
- var args2 = [Runtime.addFunction, createNamedFunction, requireHandle, getStringOrSymbol, _emval_handle_array, retType, allocateDestructors];
+ var params = ["retType"];
+ var args = [retType];
var argsList = ""; // 'arg0, arg1, arg2, ... , argN'
- var argsListWired = ""; // 'arg0Wired, ..., argNWired'
for (var i = 0; i < argCount - 1; ++i) {
argsList += (i !== 0 ? ", " : "") + "arg" + i;
- argsListWired += ", arg" + i + "Wired";
- args1.push("argType" + i);
- args2.push(types[1 + i]);
+ params.push("argType" + i);
+ args.push(types[1 + i]);
}
- var invokerFnBody =
- "return addFunction(createNamedFunction('" + signatureName + "', function (handle, name, destructorsRef" + argsListWired + ") {\n" +
- " requireHandle(handle);\n" +
- " name = getStringOrSymbol(name);\n";
+ var functionBody =
+ "return function (handle, name, destructors, args) {\n";
for (var i = 0; i < argCount - 1; ++i) {
- invokerFnBody += " var arg" + i + " = argType" + i + ".fromWireType(arg" + i + "Wired);\n";
+ functionBody +=
+ " var arg" + i + " = argType" + i + ".readValueFromPointer(args);\n" +
+ " args += argType" + i + ".argPackAdvance;\n";
}
- invokerFnBody +=
- " var obj = _emval_handle_array[handle].value;\n" +
- " var rv = obj[name](" + argsList + ");\n" +
- " return retType.toWireType(allocateDestructors(destructorsRef), rv);\n" +
- "}));\n";
-
- args1.push(invokerFnBody);
- var invokerFunction = new_(Function, args1).apply(null, args2);
- return invokerFunction;
+ functionBody +=
+ " var rv = handle[name](" + argsList + ");\n" +
+ " return retType.toWireType(destructors, rv);\n" +
+ "};\n";
+
+ params.push(functionBody);
+ var invokerFunction = new_(Function, params).apply(null, args);
+ return addMethodCaller(createNamedFunction(signatureName, invokerFunction));
+}
+
+function __emval_call_method(caller, handle, methodName, destructorsRef, args) {
+ caller = methodCallers[caller];
+ handle = requireHandle(handle);
+ methodName = getStringOrSymbol(methodName);
+ return caller(handle, methodName, allocateDestructors(destructorsRef), args);
}
function __emval_has_function(handle, name) {
+ handle = requireHandle(handle);
name = getStringOrSymbol(name);
- return _emval_handle_array[handle].value[name] instanceof Function;
+ return handle[name] instanceof Function;
}
diff --git a/src/headlessCanvas.js b/src/headlessCanvas.js
index 4bd17a7b..1eefe48e 100644
--- a/src/headlessCanvas.js
+++ b/src/headlessCanvas.js
@@ -598,7 +598,9 @@ function headlessCanvas() {
});
},
exitPointerLock: function(){},
- style: {},
+ style: {
+ setProperty: function(){}
+ },
eventListeners: {},
addEventListener: function(){},
removeEventListener: function(){},
diff --git a/src/intertyper.js b/src/intertyper.js
index 10822e48..323787ac 100644
--- a/src/intertyper.js
+++ b/src/intertyper.js
@@ -348,9 +348,11 @@ function intertyper(lines, sidePass, baseLineNums) {
if (token1Text == 'triple') {
var triple = item.tokens[3].text;
triple = triple.substr(1, triple.length-2);
- var expected = TARGET_LE32 ? 'le32-unknown-nacl' : 'i386-pc-linux-gnu';
+ var expected = TARGET_ASMJS_UNKNOWN_EMSCRIPTEN ? 'asmjs-unknown-emscripten' : 'i386-pc-linux-gnu';
if (triple !== expected) {
- warn('using an unexpected LLVM triple: ' + [triple, ' !== ', expected] + ' (are you using emcc for everything and not clang?)');
+ if (!(TARGET_ASMJS_UNKNOWN_EMSCRIPTEN && triple === 'le32-unknown-nacl')) {
+ warn('using an unexpected LLVM triple: ' + [triple, ' !== ', expected] + ' (are you using emcc for everything and not clang?)');
+ }
}
}
return null;
@@ -688,7 +690,7 @@ function intertyper(lines, sidePass, baseLineNums) {
Types.hasInlineJS = true;
warnOnce('inline JavaScript using asm() will cause the code to no longer fall in the asm.js subset of JavaScript, which can reduce performance - consider using emscripten_run_script');
}
- assert(TARGET_LE32, 'inline js is only supported in le32');
+ assert(TARGET_ASMJS_UNKNOWN_EMSCRIPTEN, 'inline js is only supported in asmjs-unknown-emscripten');
// Inline assembly is just JavaScript that we paste into the code
item.intertype = 'value';
if (tokensLeft[0].text == 'sideeffect') tokensLeft.splice(0, 1);
@@ -848,7 +850,7 @@ function intertyper(lines, sidePass, baseLineNums) {
}).filter(function(param) { return param.value && param.value.ident != 'undef' });
return item;
}
- // 'phi'
+ // 'va_arg'
function va_argHandler(item) {
item.intertype = 'va_arg';
var segments = splitTokenList(item.tokens.slice(1));
diff --git a/src/jsifier.js b/src/jsifier.js
index c1ca893b..065c66a8 100644
--- a/src/jsifier.js
+++ b/src/jsifier.js
@@ -384,7 +384,7 @@ function JSify(data, functionsOnly) {
functionStubSigs[item.ident] = Functions.getSignature(item.returnType.text, item.params.map(function(arg) { return arg.type }), false);
}
- function addFromLibrary(ident) {
+ function addFromLibrary(ident, notDep) {
if (ident in addedLibraryItems) return '';
addedLibraryItems[ident] = true;
@@ -396,8 +396,12 @@ function JSify(data, functionsOnly) {
if (('_' + ident) in Functions.implementedFunctions) return '';
if (!LibraryManager.library.hasOwnProperty(ident) && !LibraryManager.library.hasOwnProperty(ident + '__inline')) {
- if (ERROR_ON_UNDEFINED_SYMBOLS) error('unresolved symbol: ' + ident);
- else if (VERBOSE || (WARN_ON_UNDEFINED_SYMBOLS && !LINKABLE)) warn('unresolved symbol: ' + ident);
+ if (notDep) {
+ if (VERBOSE || ident.substr(0, 11) !== 'emscripten_') { // avoid warning on emscripten_* functions which are for internal usage anyhow
+ if (ERROR_ON_UNDEFINED_SYMBOLS) error('unresolved symbol: ' + ident);
+ else if (VERBOSE || (WARN_ON_UNDEFINED_SYMBOLS && !LINKABLE)) warn('unresolved symbol: ' + ident);
+ }
+ }
// emit a stub that will fail at runtime
LibraryManager.library[shortident] = new Function("Module['printErr']('missing function: " + shortident + "'); abort(-1);");
}
@@ -502,7 +506,7 @@ function JSify(data, functionsOnly) {
delete LibraryManager.library[shortident + '__deps'];
}
}
- item.JS = addFromLibrary(shortident);
+ item.JS = addFromLibrary(shortident, true);
}
}
@@ -1413,7 +1417,7 @@ function JSify(data, functionsOnly) {
}
}
function va_argHandler(item) {
- assert(TARGET_LE32);
+ assert(TARGET_ASMJS_UNKNOWN_EMSCRIPTEN);
var ident = item.value.ident;
var move = Runtime.STACK_ALIGN;
@@ -1710,7 +1714,7 @@ function JSify(data, functionsOnly) {
if ((phase == 'pre' || phase == 'glue') && !Variables.generatedGlobalBase && !BUILD_AS_SHARED_LIB) {
Variables.generatedGlobalBase = true;
// Globals are done, here is the rest of static memory
- assert((TARGET_LE32 && Runtime.GLOBAL_BASE == 8) || (TARGET_X86 && Runtime.GLOBAL_BASE == 4)); // this is assumed in e.g. relocations for linkable modules
+ assert((TARGET_ASMJS_UNKNOWN_EMSCRIPTEN && Runtime.GLOBAL_BASE == 8) || (TARGET_X86 && Runtime.GLOBAL_BASE == 4)); // this is assumed in e.g. relocations for linkable modules
if (!SIDE_MODULE) {
print('STATIC_BASE = ' + Runtime.GLOBAL_BASE + ';\n');
print('STATICTOP = STATIC_BASE + ' + Runtime.alignMemory(Variables.nextIndexedOffset) + ';\n');
diff --git a/src/library.js b/src/library.js
index 91d5f925..c2830397 100644
--- a/src/library.js
+++ b/src/library.js
@@ -325,6 +325,9 @@ LibraryManager.library = {
// int mkdir(const char *path, mode_t mode);
// http://pubs.opengroup.org/onlinepubs/7908799/xsh/mkdir.html
path = Pointer_stringify(path);
+ // remove a trailing slash, if one - /a/b/ has basename of '', but
+ // we want to create b in the context of this function
+ if (path[path.length-1] === '/') path = path.substr(0, path.length-1);
try {
FS.mkdir(path, mode, 0);
return 0;
@@ -1861,14 +1864,14 @@ LibraryManager.library = {
// int x = 4; printf("%c\n", (char)x);
var ret;
if (type === 'double') {
-#if TARGET_LE32 == 2
+#if TARGET_ASMJS_UNKNOWN_EMSCRIPTEN == 2
ret = {{{ makeGetValue('varargs', 'argIndex', 'double', undefined, undefined, true, 4) }}};
#else
ret = {{{ makeGetValue('varargs', 'argIndex', 'double', undefined, undefined, true) }}};
#endif
#if USE_TYPED_ARRAYS == 2
} else if (type == 'i64') {
-#if TARGET_LE32 == 1
+#if TARGET_ASMJS_UNKNOWN_EMSCRIPTEN == 1
ret = [{{{ makeGetValue('varargs', 'argIndex', 'i32', undefined, undefined, true) }}},
{{{ makeGetValue('varargs', 'argIndex+8', 'i32', undefined, undefined, true) }}}];
argIndex += {{{ STACK_ALIGN }}}; // each 32-bit chunk is in a 64-bit block
@@ -1885,7 +1888,7 @@ LibraryManager.library = {
type = 'i32'; // varargs are always i32, i64, or double
ret = {{{ makeGetValue('varargs', 'argIndex', 'i32', undefined, undefined, true) }}};
}
-#if TARGET_LE32 == 2
+#if TARGET_ASMJS_UNKNOWN_EMSCRIPTEN == 2
argIndex += Runtime.getNativeFieldSize(type);
#else
argIndex += Math.max(Runtime.getNativeFieldSize(type), Runtime.getAlignSize(type, null, true));
@@ -2420,7 +2423,9 @@ LibraryManager.library = {
fileno: function(stream) {
// int fileno(FILE *stream);
// http://pubs.opengroup.org/onlinepubs/000095399/functions/fileno.html
- return FS.getStreamFromPtr(stream).fd;
+ stream = FS.getStreamFromPtr(stream);
+ if (!stream) return -1;
+ return stream.fd;
},
ftrylockfile: function() {
// int ftrylockfile(FILE *file);
@@ -2859,7 +2864,7 @@ LibraryManager.library = {
vsscanf: 'sscanf',
#endif
-#if TARGET_LE32
+#if TARGET_ASMJS_UNKNOWN_EMSCRIPTEN
// convert va_arg into varargs
vfprintf__deps: ['fprintf'],
vfprintf: function(s, f, va_arg) {
@@ -3033,34 +3038,6 @@ LibraryManager.library = {
Module['abort']();
},
- bsearch: function(key, base, num, size, compar) {
- function cmp(x, y) {
-#if ASM_JS
- return Module['dynCall_iii'](compar, x, y);
-#else
- return FUNCTION_TABLE[compar](x, y);
-#endif
- };
- var left = 0;
- var right = num;
- var mid, test, addr;
-
- while (left < right) {
- mid = (left + right) >>> 1;
- addr = base + (mid * size);
- test = cmp(key, addr);
- if (test < 0) {
- right = mid;
- } else if (test > 0) {
- left = mid + 1;
- } else {
- return addr;
- }
- }
-
- return 0;
- },
-
realloc__deps: ['malloc', 'memcpy', 'free'],
realloc: function(ptr, size) {
// Very simple, inefficient implementation - if you use a real malloc, best to use
@@ -3264,41 +3241,6 @@ LibraryManager.library = {
return _strtoull(str, endptr, base); // no locale support yet
},
- atoi__deps: ['strtol'],
- atoi: function(ptr) {
- return _strtol(ptr, null, 10);
- },
- atol: 'atoi',
-
- atoll__deps: ['strtoll'],
- atoll: function(ptr) {
- return _strtoll(ptr, null, 10);
- },
-
- qsort__deps: ['malloc', 'memcpy', 'free'],
- qsort: function(base, num, size, cmp) {
- if (num == 0 || size == 0) return;
- // forward calls to the JavaScript sort method
- // first, sort the items logically
- var keys = [];
- for (var i = 0; i < num; i++) keys.push(i);
- keys.sort(function(a, b) {
-#if ASM_JS
- return Module['dynCall_iii'](cmp, base+a*size, base+b*size);
-#else
- return FUNCTION_TABLE[cmp](base+a*size, base+b*size);
-#endif
- });
- // apply the sort
- var temp = _malloc(num*size);
- _memcpy(temp, base, num*size);
- for (var i = 0; i < num; i++) {
- if (keys[i] == i) continue; // already in place
- _memcpy(base+i*size, temp+keys[i]*size, size);
- }
- _free(temp);
- },
-
environ: 'allocate(1, "i32*", ALLOC_STATIC)',
__environ__deps: ['environ'],
__environ: '_environ',
@@ -3502,8 +3444,6 @@ LibraryManager.library = {
// string.h
// ==========================================================================
- // FIXME: memcpy, memmove and memset should all return their destination pointers.
-
memcpy__inline: function(dest, src, num, align) {
var ret = '';
#if ASSERTIONS
@@ -3585,13 +3525,6 @@ LibraryManager.library = {
llvm_memmove_p0i8_p0i8_i32: 'memmove',
llvm_memmove_p0i8_p0i8_i64: 'memmove',
- bcopy__deps: ['memmove'],
- bcopy: function(src, dest, num) {
- // void bcopy(const void *s1, void *s2, size_t n);
- // http://pubs.opengroup.org/onlinepubs/009695399/functions/bcopy.html
- _memmove(dest, src, num);
- },
-
memset__inline: function(ptr, value, num, align) {
return makeSetValues(ptr, 0, value, 'null', num, align);
},
@@ -3646,38 +3579,6 @@ LibraryManager.library = {
return (curr - ptr)|0;
},
- strspn: function(pstr, pset) {
- var str = pstr, set, strcurr, setcurr;
- while (1) {
- strcurr = {{{ makeGetValue('str', '0', 'i8') }}};
- if (!strcurr) return str - pstr;
- set = pset;
- while (1) {
- setcurr = {{{ makeGetValue('set', '0', 'i8') }}};
- if (!setcurr || setcurr == strcurr) break;
- set++;
- }
- if (!setcurr) return str - pstr;
- str++;
- }
- },
-
- strcspn: function(pstr, pset) {
- var str = pstr, set, strcurr, setcurr;
- while (1) {
- strcurr = {{{ makeGetValue('str', '0', 'i8') }}};
- if (!strcurr) return str - pstr;
- set = pset;
- while (1) {
- setcurr = {{{ makeGetValue('set', '0', 'i8') }}};
- if (!setcurr || setcurr == strcurr) break;
- set++;
- }
- if (setcurr) return str - pstr;
- str++;
- }
- },
-
strcpy__asm: true,
strcpy__sig: 'iii',
strcpy: function(pdest, psrc) {
@@ -3690,15 +3591,6 @@ LibraryManager.library = {
return pdest|0;
},
- stpcpy: function(pdest, psrc) {
- var i = 0;
- do {
- {{{ makeCopyValues('pdest+i', 'psrc+i', 1, 'i8', null, 1) }}};
- i ++;
- } while ({{{ makeGetValue('psrc', 'i-1', 'i8') }}} != 0);
- return pdest + i - 1;
- },
-
strncpy__asm: true,
strncpy__sig: 'iiii',
strncpy: function(pdest, psrc, num) {
@@ -3750,184 +3642,6 @@ LibraryManager.library = {
return pdest|0;
},
- strncat__deps: ['strlen'],
- strncat: function(pdest, psrc, num) {
- var len = _strlen(pdest);
- var i = 0;
- while(1) {
- {{{ makeCopyValues('pdest+len+i', 'psrc+i', 1, 'i8', null, 1) }}};
- if ({{{ makeGetValue('pdest', 'len+i', 'i8') }}} == 0) break;
- i ++;
- if (i == num) {
- {{{ makeSetValue('pdest', 'len+i', 0, 'i8') }}};
- break;
- }
- }
- return pdest;
- },
-
- memchr: function(ptr, chr, num) {
- chr = unSign(chr);
- for (var i = 0; i < num; i++) {
- if ({{{ makeGetValue('ptr', 0, 'i8') }}} == chr) return ptr;
- ptr++;
- }
- return 0;
- },
-
- strnlen: function(ptr, num) {
- num = num >>> 0;
- for (var i = 0; i < num; i++) {
- if ({{{ makeGetValue('ptr', 0, 'i8') }}} == 0) return i;
- ptr++;
- }
- return num;
- },
-
- strstr: function(ptr1, ptr2) {
- var check = 0, start;
- do {
- if (!check) {
- start = ptr1;
- check = ptr2;
- }
- var curr1 = {{{ makeGetValue('ptr1++', 0, 'i8') }}};
- var curr2 = {{{ makeGetValue('check++', 0, 'i8') }}};
- if (curr2 == 0) return start;
- if (curr2 != curr1) {
- // rewind to one character after start, to find ez in eeez
- ptr1 = start + 1;
- check = 0;
- }
- } while (curr1);
- return 0;
- },
-
- strchr: function(ptr, chr) {
- ptr--;
- do {
- ptr++;
- var val = {{{ makeGetValue('ptr', 0, 'i8') }}};
- if (val == chr) return ptr;
- } while (val);
- return 0;
- },
- index: 'strchr',
-
- strrchr__deps: ['strlen'],
- strrchr: function(ptr, chr) {
- var ptr2 = ptr + _strlen(ptr);
- do {
- if ({{{ makeGetValue('ptr2', 0, 'i8') }}} == chr) return ptr2;
- ptr2--;
- } while (ptr2 >= ptr);
- return 0;
- },
- rindex: 'strrchr',
-
- strdup__deps: ['strlen', 'malloc'],
- strdup: function(ptr) {
- var len = _strlen(ptr);
- var newStr = _malloc(len + 1);
- {{{ makeCopyValues('newStr', 'ptr', 'len', 'null', null, 1) }}};
- {{{ makeSetValue('newStr', 'len', '0', 'i8') }}};
- return newStr;
- },
-
- strndup__deps: ['strdup', 'strlen', 'malloc'],
- strndup: function(ptr, size) {
- var len = _strlen(ptr);
-
- if (size >= len) {
- return _strdup(ptr);
- }
-
- if (size < 0) {
- size = 0;
- }
-
- var newStr = _malloc(size + 1);
- {{{ makeCopyValues('newStr', 'ptr', 'size', 'null', null, 1) }}};
- {{{ makeSetValue('newStr', 'size', '0', 'i8') }}};
- return newStr;
- },
-
- strpbrk: function(ptr1, ptr2) {
- var curr;
- var searchSet = {};
- while (1) {
- var curr = {{{ makeGetValue('ptr2++', 0, 'i8') }}};
- if (!curr) break;
- searchSet[curr] = 1;
- }
- while (1) {
- curr = {{{ makeGetValue('ptr1', 0, 'i8') }}};
- if (!curr) break;
- if (curr in searchSet) return ptr1;
- ptr1++;
- }
- return 0;
- },
-
- __strtok_state: 0,
- strtok__deps: ['__strtok_state', 'strtok_r'],
- strtok__postset: '___strtok_state = Runtime.staticAlloc(4);',
- strtok: function(s, delim) {
- return _strtok_r(s, delim, ___strtok_state);
- },
-
- // Translated from newlib; for the original source and licensing, see library_strtok_r.c
- strtok_r: function(s, delim, lasts) {
- var skip_leading_delim = 1;
- var spanp;
- var c, sc;
- var tok;
-
-
- if (s == 0 && (s = getValue(lasts, 'i8*')) == 0) {
- return 0;
- }
-
- cont: while (1) {
- c = getValue(s++, 'i8');
- for (spanp = delim; (sc = getValue(spanp++, 'i8')) != 0;) {
- if (c == sc) {
- if (skip_leading_delim) {
- continue cont;
- } else {
- setValue(lasts, s, 'i8*');
- setValue(s - 1, 0, 'i8');
- return s - 1;
- }
- }
- }
- break;
- }
-
- if (c == 0) {
- setValue(lasts, 0, 'i8*');
- return 0;
- }
- tok = s - 1;
-
- for (;;) {
- c = getValue(s++, 'i8');
- spanp = delim;
- do {
- if ((sc = getValue(spanp++, 'i8')) == c) {
- if (c == 0) {
- s = 0;
- } else {
- setValue(s - 1, 0, 'i8');
- }
- setValue(lasts, s, 'i8*');
- return tok;
- }
- } while (sc != 0);
- }
- abort('strtok_r error!');
- },
-
strerror_r__deps: ['$ERRNO_CODES', '$ERRNO_MESSAGES', '__setErrNo'],
strerror_r: function(errnum, strerrbuf, buflen) {
if (errnum in ERRNO_MESSAGES) {
@@ -4178,7 +3892,7 @@ LibraryManager.library = {
#if TARGET_X86
return makeSetValue(ptr, 0, 'varrp', 'void*');
#endif
-#if TARGET_LE32
+#if TARGET_ASMJS_UNKNOWN_EMSCRIPTEN
// 2-word structure: struct { void* start; void* currentOffset; }
return makeSetValue(ptr, 0, 'varrp', 'void*') + ';' + makeSetValue(ptr, Runtime.QUANTUM_SIZE, 0, 'void*');
#endif
@@ -4194,12 +3908,18 @@ LibraryManager.library = {
{{{ makeCopyValues('(ppdest+'+Runtime.QUANTUM_SIZE+')', '(ppsrc+'+Runtime.QUANTUM_SIZE+')', Runtime.QUANTUM_SIZE, 'null', null, 1) }}};
},
+ llvm_bswap_i16__asm: true,
+ llvm_bswap_i16__sig: 'ii',
llvm_bswap_i16: function(x) {
- return ((x&0xff)<<8) | ((x>>8)&0xff);
+ x = x|0;
+ return (((x&0xff)<<8) | ((x>>8)&0xff))|0;
},
+ llvm_bswap_i32__asm: true,
+ llvm_bswap_i32__sig: 'ii',
llvm_bswap_i32: function(x) {
- return ((x&0xff)<<24) | (((x>>8)&0xff)<<16) | (((x>>16)&0xff)<<8) | (x>>>24);
+ x = x|0;
+ return (((x&0xff)<<24) | (((x>>8)&0xff)<<16) | (((x>>16)&0xff)<<8) | (x>>>24))|0;
},
llvm_bswap_i64__deps: ['llvm_bswap_i32'],
@@ -4584,6 +4304,7 @@ LibraryManager.library = {
// Destructors for std::exception since we don't have them implemented in libcxx as we aren't using libcxxabi.
// These are also needed for the dlmalloc tests.
+ _ZNSt9exceptionD0Ev: function() {},
_ZNSt9exceptionD1Ev: function() {},
_ZNSt9exceptionD2Ev: function() {},
@@ -4597,8 +4318,6 @@ LibraryManager.library = {
return __ZNKSt9exception4whatEv.buffer;
},
- _ZNSt9type_infoD2Ev: function(){},
-
// RTTI hacks for exception handling, defining type_infos for common types.
// The values are dummies. We simply use the addresses of these statically
// allocated variables as unique identifiers.
@@ -4717,6 +4436,89 @@ LibraryManager.library = {
llvm_nacl_atomic_store_i32__inline: true,
+ // gnu atomics
+
+ __atomic_is_lock_free: function(size, ptr) {
+ return size <= 4 && (ptr&(size-1)) == 0;
+ },
+
+ __atomic_load_8: function(ptr, memmodel) {
+ {{{ makeStructuralReturn([makeGetValue('ptr', 0, 'i32'), makeGetValue('ptr', 4, 'i32')]) }}};
+ },
+
+ __atomic_store_8: function(ptr, vall, valh, memmodel) {
+ {{{ makeSetValue('ptr', 0, 'vall', 'i32') }}};
+ {{{ makeSetValue('ptr', 4, 'valh', 'i32') }}};
+ },
+
+ __atomic_exchange_8: function(ptr, vall, valh, memmodel) {
+ var l = {{{ makeGetValue('ptr', 0, 'i32') }}};
+ var h = {{{ makeGetValue('ptr', 4, 'i32') }}};
+ {{{ makeSetValue('ptr', 0, 'vall', 'i32') }}};
+ {{{ makeSetValue('ptr', 4, 'valh', 'i32') }}};
+ {{{ makeStructuralReturn(['l', 'h']) }}};
+ },
+
+ __atomic_compare_exchange_8: function(ptr, expected, desiredl, desiredh, weak, success_memmodel, failure_memmodel) {
+ var pl = {{{ makeGetValue('ptr', 0, 'i32') }}};
+ var ph = {{{ makeGetValue('ptr', 4, 'i32') }}};
+ var el = {{{ makeGetValue('expected', 0, 'i32') }}};
+ var eh = {{{ makeGetValue('expected', 4, 'i32') }}};
+ if (pl === el && ph === eh) {
+ {{{ makeSetValue('ptr', 0, 'desiredl', 'i32') }}};
+ {{{ makeSetValue('ptr', 4, 'desiredh', 'i32') }}};
+ return 1;
+ } else {
+ {{{ makeSetValue('expected', 0, 'pl', 'i32') }}};
+ {{{ makeSetValue('expected', 4, 'ph', 'i32') }}};
+ return 0;
+ }
+ },
+
+ __atomic_fetch_add_8__deps: ['llvm_uadd_with_overflow_i64'],
+ __atomic_fetch_add_8: function(ptr, vall, valh, memmodel) {
+ var l = {{{ makeGetValue('ptr', 0, 'i32') }}};
+ var h = {{{ makeGetValue('ptr', 4, 'i32') }}};
+ {{{ makeSetValue('ptr', 0, '_llvm_uadd_with_overflow_i64(l, h, vall, valh)', 'i32') }}};
+ {{{ makeSetValue('ptr', 4, 'tempRet0', 'i32') }}};
+ {{{ makeStructuralReturn(['l', 'h']) }}};
+ },
+
+ __atomic_fetch_sub_8__deps: ['i64Subtract'],
+ __atomic_fetch_sub_8: function(ptr, vall, valh, memmodel) {
+ var l = {{{ makeGetValue('ptr', 0, 'i32') }}};
+ var h = {{{ makeGetValue('ptr', 4, 'i32') }}};
+ {{{ makeSetValue('ptr', 0, '_i64Subtract(l, h, vall, valh)', 'i32') }}};
+ {{{ makeSetValue('ptr', 4, 'tempRet0', 'i32') }}};
+ {{{ makeStructuralReturn(['l', 'h']) }}};
+ },
+
+ __atomic_fetch_and_8__deps: ['i64Subtract'],
+ __atomic_fetch_and_8: function(ptr, vall, valh, memmodel) {
+ var l = {{{ makeGetValue('ptr', 0, 'i32') }}};
+ var h = {{{ makeGetValue('ptr', 4, 'i32') }}};
+ {{{ makeSetValue('ptr', 0, 'l&vall', 'i32') }}};
+ {{{ makeSetValue('ptr', 4, 'h&valh', 'i32') }}};
+ {{{ makeStructuralReturn(['l', 'h']) }}};
+ },
+
+ __atomic_fetch_or_8: function(ptr, vall, valh, memmodel) {
+ var l = {{{ makeGetValue('ptr', 0, 'i32') }}};
+ var h = {{{ makeGetValue('ptr', 4, 'i32') }}};
+ {{{ makeSetValue('ptr', 0, 'l|vall', 'i32') }}};
+ {{{ makeSetValue('ptr', 4, 'h|valh', 'i32') }}};
+ {{{ makeStructuralReturn(['l', 'h']) }}};
+ },
+
+ __atomic_fetch_xor_8: function(ptr, vall, valh, memmodel) {
+ var l = {{{ makeGetValue('ptr', 0, 'i32') }}};
+ var h = {{{ makeGetValue('ptr', 4, 'i32') }}};
+ {{{ makeSetValue('ptr', 0, 'l^vall', 'i32') }}};
+ {{{ makeSetValue('ptr', 4, 'h^valh', 'i32') }}};
+ {{{ makeStructuralReturn(['l', 'h']) }}};
+ },
+
+
// ==========================================================================
// llvm-mono integration
// ==========================================================================
@@ -6399,6 +6201,13 @@ LibraryManager.library = {
siginterrupt: function() { throw 'siginterrupt not implemented' },
+ raise__deps: ['$ERRNO_CODES', '__setErrNo'],
+ raise: function(sig) {
+ // TODO:
+ ___setErrNo(ERRNO_CODES.ENOSYS);
+ return -1;
+ },
+
// ==========================================================================
// sys/wait.h
// ==========================================================================
@@ -8166,7 +7975,9 @@ LibraryManager.library = {
},
setsockopt: function(d, level, optname, optval, optlen) {
+#if SOCKET_DEBUG
console.log('ignoring setsockopt command');
+#endif
return 0;
},
@@ -8655,7 +8466,9 @@ LibraryManager.library = {
},
setsockopt: function(fd, level, optname, optval, optlen) {
+#if SOCKET_DEBUG
console.log('ignoring setsockopt command');
+#endif
return 0;
},
@@ -8912,10 +8725,19 @@ LibraryManager.library = {
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 '';
+ // IE10+ special cases: It does have callstack info, but it is only populated if an Error object is thrown,
+ // so try that as a special-case.
+ try {
+ throw new Error(0);
+ } catch(e) {
+ err = e;
+ }
+ if (!err.stack) {
+ Runtime.warnOnce('emscripten_get_callstack_js is not supported on this browser!');
+ return '';
+ }
}
- var callstack = new Error().stack.toString();
+ var callstack = err.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');
@@ -8941,7 +8763,8 @@ LibraryManager.library = {
// Process all lines:
lines = callstack.split('\n');
callstack = '';
- var firefoxRe = new RegExp('\\s*(.*?)@(.*):(.*)'); // Extract components of form ' Object._main@http://server.com:4324'
+ var newFirefoxRe = new RegExp('\\s*(.*?)@(.*?):([0-9]+):([0-9]+)'); // New FF30 with column info: extract components of form ' Object._main@http://server.com:4324:12'
+ var firefoxRe = new RegExp('\\s*(.*?)@(.*):(.*)(:(.*))?'); // Old FF without column info: 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) {
@@ -8959,12 +8782,13 @@ LibraryManager.library = {
lineno = parts[3];
column = parts[4];
} else {
- parts = firefoxRe.exec(line);
- if (parts && parts.length == 4) {
+ parts = newFirefoxRe.exec(line);
+ if (!parts) 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
+ column = parts[4]|0; // Old Firefox doesn't carry column information, but in new FF30, it is present. 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';
@@ -9020,7 +8844,7 @@ LibraryManager.library = {
}
// Truncate output to avoid writing past bounds.
if (callstack.length > maxbytes-1) {
- callstack.slice(0, maxbytes-1);
+ callstack = callstack.slice(0, maxbytes-1);
}
// Output callstack string as C string to HEAP.
writeStringToMemory(callstack, str, false);
@@ -9109,6 +8933,10 @@ LibraryManager.library = {
#endif
#endif
+ emscripten_debugger: function() {
+ debugger;
+ },
+
//============================
// emscripten vector ops
//============================
diff --git a/src/library_browser.js b/src/library_browser.js
index b800292c..4be7315e 100644
--- a/src/library_browser.js
+++ b/src/library_browser.js
@@ -1,7 +1,6 @@
//"use strict";
// Utilities for browser environments
-
mergeInto(LibraryManager.library, {
$Browser__deps: ['$PATH'],
$Browser__postset: 'Module["requestFullScreen"] = function Module_requestFullScreen(lockPointer, resizeCanvas) { Browser.requestFullScreen(lockPointer, resizeCanvas) };\n' + // exports
@@ -197,24 +196,33 @@ mergeInto(LibraryManager.library, {
// Canvas event setup
var canvas = Module['canvas'];
+
+ // forced aspect ratio can be enabled by defining 'forcedAspectRatio' on Module
+ // Module['forcedAspectRatio'] = 4 / 3;
+
canvas.requestPointerLock = canvas['requestPointerLock'] ||
canvas['mozRequestPointerLock'] ||
- canvas['webkitRequestPointerLock'];
+ canvas['webkitRequestPointerLock'] ||
+ canvas['msRequestPointerLock'] ||
+ function(){};
canvas.exitPointerLock = document['exitPointerLock'] ||
document['mozExitPointerLock'] ||
document['webkitExitPointerLock'] ||
+ document['msExitPointerLock'] ||
function(){}; // no-op if function does not exist
canvas.exitPointerLock = canvas.exitPointerLock.bind(document);
function pointerLockChange() {
Browser.pointerLock = document['pointerLockElement'] === canvas ||
document['mozPointerLockElement'] === canvas ||
- document['webkitPointerLockElement'] === canvas;
+ document['webkitPointerLockElement'] === canvas ||
+ document['msPointerLockElement'] === canvas;
}
document.addEventListener('pointerlockchange', pointerLockChange, false);
document.addEventListener('mozpointerlockchange', pointerLockChange, false);
document.addEventListener('webkitpointerlockchange', pointerLockChange, false);
+ document.addEventListener('mspointerlockchange', pointerLockChange, false);
if (Module['elementPointerLock']) {
canvas.addEventListener("click", function(ev) {
@@ -342,20 +350,32 @@ mergeInto(LibraryManager.library, {
var canvas = Module['canvas'];
function fullScreenChange() {
Browser.isFullScreen = false;
+ var canvasContainer = canvas.parentNode;
if ((document['webkitFullScreenElement'] || document['webkitFullscreenElement'] ||
document['mozFullScreenElement'] || document['mozFullscreenElement'] ||
- document['fullScreenElement'] || document['fullscreenElement']) === canvas) {
+ document['fullScreenElement'] || document['fullscreenElement'] ||
+ document['msFullScreenElement'] || document['msFullscreenElement'] ||
+ document['webkitCurrentFullScreenElement']) === canvasContainer) {
canvas.cancelFullScreen = document['cancelFullScreen'] ||
document['mozCancelFullScreen'] ||
- document['webkitCancelFullScreen'];
+ document['webkitCancelFullScreen'] ||
+ document['msExitFullscreen'] ||
+ document['exitFullscreen'] ||
+ function() {};
canvas.cancelFullScreen = canvas.cancelFullScreen.bind(document);
if (Browser.lockPointer) canvas.requestPointerLock();
Browser.isFullScreen = true;
if (Browser.resizeCanvas) Browser.setFullScreenCanvasSize();
- } else if (Browser.resizeCanvas){
- Browser.setWindowedCanvasSize();
+ } else {
+
+ // remove the full screen specific parent of the canvas again to restore the HTML structure from before going full screen
+ canvasContainer.parentNode.insertBefore(canvas, canvasContainer);
+ canvasContainer.parentNode.removeChild(canvasContainer);
+
+ if (Browser.resizeCanvas) Browser.setWindowedCanvasSize();
}
if (Module['onFullScreen']) Module['onFullScreen'](Browser.isFullScreen);
+ Browser.updateCanvasDimensions(canvas);
}
if (!Browser.fullScreenHandlersInstalled) {
@@ -363,12 +383,20 @@ mergeInto(LibraryManager.library, {
document.addEventListener('fullscreenchange', fullScreenChange, false);
document.addEventListener('mozfullscreenchange', fullScreenChange, false);
document.addEventListener('webkitfullscreenchange', fullScreenChange, false);
+ document.addEventListener('MSFullscreenChange', fullScreenChange, false);
}
- canvas.requestFullScreen = canvas['requestFullScreen'] ||
- canvas['mozRequestFullScreen'] ||
- (canvas['webkitRequestFullScreen'] ? function() { canvas['webkitRequestFullScreen'](Element['ALLOW_KEYBOARD_INPUT']) } : null);
- canvas.requestFullScreen();
+ // create a new parent to ensure the canvas has no siblings. this allows browsers to optimize full screen performance when its parent is the full screen root
+ var canvasContainer = document.createElement("div");
+ canvas.parentNode.insertBefore(canvasContainer, canvas);
+ canvasContainer.appendChild(canvas);
+
+ // use parent of canvas as full screen root to allow aspect ratio correction (Firefox stretches the root to screen size)
+ canvasContainer.requestFullScreen = canvasContainer['requestFullScreen'] ||
+ canvasContainer['mozRequestFullScreen'] ||
+ canvasContainer['msRequestFullscreen'] ||
+ (canvasContainer['webkitRequestFullScreen'] ? function() { canvasContainer['webkitRequestFullScreen'](Element['ALLOW_KEYBOARD_INPUT']) } : null);
+ canvasContainer.requestFullScreen();
},
requestAnimationFrame: function requestAnimationFrame(func) {
@@ -454,6 +482,8 @@ mergeInto(LibraryManager.library, {
mouseY: 0,
mouseMovementX: 0,
mouseMovementY: 0,
+ touches: {},
+ lastTouches: {},
calculateMouseEvent: function(event) { // event should be mousemove, mousedown or mouseup
if (Browser.pointerLock) {
@@ -482,8 +512,9 @@ mergeInto(LibraryManager.library, {
// Otherwise, calculate the movement based on the changes
// in the coordinates.
var rect = Module["canvas"].getBoundingClientRect();
- var x, y;
-
+ var cw = Module["canvas"].width;
+ var ch = Module["canvas"].height;
+
// Neither .scrollX or .pageXOffset are defined in a spec, but
// we prefer .scrollX because it is currently in a spec draft.
// (see: http://www.w3.org/TR/2013/WD-cssom-view-20131217/)
@@ -494,26 +525,37 @@ mergeInto(LibraryManager.library, {
// and we have no viable fallback.
assert((typeof scrollX !== 'undefined') && (typeof scrollY !== 'undefined'), 'Unable to retrieve scroll position, mouse positions likely broken.');
#endif
- if (event.type == 'touchstart' ||
- event.type == 'touchend' ||
- event.type == 'touchmove') {
- var t = event.touches.item(0);
- if (t) {
- x = t.pageX - (scrollX + rect.left);
- y = t.pageY - (scrollY + rect.top);
- } else {
- return;
+
+ if (event.type === 'touchstart' || event.type === 'touchend' || event.type === 'touchmove') {
+ var touch = event.touch;
+ if (touch === undefined) {
+ return; // the "touch" property is only defined in SDL
+
}
- } else {
- x = event.pageX - (scrollX + rect.left);
- y = event.pageY - (scrollY + rect.top);
+ var adjustedX = touch.pageX - (scrollX + rect.left);
+ var adjustedY = touch.pageY - (scrollY + rect.top);
+
+ adjustedX = adjustedX * (cw / rect.width);
+ adjustedY = adjustedY * (ch / rect.height);
+
+ var coords = { x: adjustedX, y: adjustedY };
+
+ if (event.type === 'touchstart') {
+ Browser.lastTouches[touch.identifier] = coords;
+ Browser.touches[touch.identifier] = coords;
+ } else if (event.type === 'touchend' || event.type === 'touchmove') {
+ Browser.lastTouches[touch.identifier] = Browser.touches[touch.identifier];
+ Browser.touches[touch.identifier] = { x: adjustedX, y: adjustedY };
+ }
+ return;
}
+ var x = event.pageX - (scrollX + rect.left);
+ var y = event.pageY - (scrollY + rect.top);
+
// the canvas might be CSS-scaled compared to its backbuffer;
// SDL-using content will want mouse coordinates in terms
// of backbuffer units.
- var cw = Module["canvas"].width;
- var ch = Module["canvas"].height;
x = x * (cw / rect.width);
y = y * (ch / rect.height);
@@ -565,19 +607,13 @@ mergeInto(LibraryManager.library, {
setCanvasSize: function(width, height, noUpdates) {
var canvas = Module['canvas'];
- canvas.width = width;
- canvas.height = height;
+ Browser.updateCanvasDimensions(canvas, width, height);
if (!noUpdates) Browser.updateResizeListeners();
},
windowedWidth: 0,
windowedHeight: 0,
setFullScreenCanvasSize: function() {
- var canvas = Module['canvas'];
- this.windowedWidth = canvas.width;
- this.windowedHeight = canvas.height;
- canvas.width = screen.width;
- canvas.height = screen.height;
// check if SDL is available
if (typeof SDL != "undefined") {
var flags = {{{ makeGetValue('SDL.screen+Runtime.QUANTUM_SIZE*0', '0', 'i32', 0, 1) }}};
@@ -588,9 +624,6 @@ mergeInto(LibraryManager.library, {
},
setWindowedCanvasSize: function() {
- var canvas = Module['canvas'];
- canvas.width = this.windowedWidth;
- canvas.height = this.windowedHeight;
// check if SDL is available
if (typeof SDL != "undefined") {
var flags = {{{ makeGetValue('SDL.screen+Runtime.QUANTUM_SIZE*0', '0', 'i32', 0, 1) }}};
@@ -598,8 +631,55 @@ mergeInto(LibraryManager.library, {
{{{ makeSetValue('SDL.screen+Runtime.QUANTUM_SIZE*0', '0', 'flags', 'i32') }}}
}
Browser.updateResizeListeners();
- }
+ },
+ updateCanvasDimensions : function(canvas, wNative, hNative) {
+ if (wNative && hNative) {
+ canvas.widthNative = wNative;
+ canvas.heightNative = hNative;
+ } else {
+ wNative = canvas.widthNative;
+ hNative = canvas.heightNative;
+ }
+ var w = wNative;
+ var h = hNative;
+ if (Module['forcedAspectRatio'] && Module['forcedAspectRatio'] > 0) {
+ if (w/h < Module['forcedAspectRatio']) {
+ w = Math.round(h * Module['forcedAspectRatio']);
+ } else {
+ h = Math.round(w / Module['forcedAspectRatio']);
+ }
+ }
+ if (((document['webkitFullScreenElement'] || document['webkitFullscreenElement'] ||
+ document['mozFullScreenElement'] || document['mozFullscreenElement'] ||
+ document['fullScreenElement'] || document['fullscreenElement'] ||
+ document['msFullScreenElement'] || document['msFullscreenElement'] ||
+ document['webkitCurrentFullScreenElement']) === canvas.parentNode) && (typeof screen != 'undefined')) {
+ var factor = Math.min(screen.width / w, screen.height / h);
+ w = Math.round(w * factor);
+ h = Math.round(h * factor);
+ }
+ if (Browser.resizeCanvas) {
+ if (canvas.width != w) canvas.width = w;
+ if (canvas.height != h) canvas.height = h;
+ if (typeof canvas.style != 'undefined') {
+ canvas.style.removeProperty( "width");
+ canvas.style.removeProperty("height");
+ }
+ } else {
+ if (canvas.width != wNative) canvas.width = wNative;
+ if (canvas.height != hNative) canvas.height = hNative;
+ if (typeof canvas.style != 'undefined') {
+ if (w != wNative || h != hNative) {
+ canvas.style.setProperty( "width", w + "px", "important");
+ canvas.style.setProperty("height", h + "px", "important");
+ } else {
+ canvas.style.removeProperty( "width");
+ canvas.style.removeProperty("height");
+ }
+ }
+ }
+ }
},
emscripten_async_wget: function(url, file, onload, onerror) {
@@ -657,8 +737,59 @@ mergeInto(LibraryManager.library, {
// PROGRESS
http.onprogress = function http_onprogress(e) {
- var percentComplete = (e.position / e.totalSize)*100;
- if (onprogress) Runtime.dynCall('vii', onprogress, [arg, percentComplete]);
+ if (e.lengthComputable || (e.lengthComputable === undefined && e.totalSize != 0)) {
+ var percentComplete = (e.position / e.totalSize)*100;
+ if (onprogress) Runtime.dynCall('vii', onprogress, [arg, percentComplete]);
+ }
+ };
+
+ // Useful because the browser can limit the number of redirection
+ try {
+ if (http.channel instanceof Ci.nsIHttpChannel)
+ http.channel.redirectionLimit = 0;
+ } catch (ex) { /* whatever */ }
+
+ if (_request == "POST") {
+ //Send the proper header information along with the request
+ http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
+ http.setRequestHeader("Content-length", _param.length);
+ http.setRequestHeader("Connection", "close");
+ http.send(_param);
+ } else {
+ http.send(null);
+ }
+ },
+
+ emscripten_async_wget2_data: function(url, request, param, arg, free, onload, onerror, onprogress) {
+ var _url = Pointer_stringify(url);
+ var _request = Pointer_stringify(request);
+ var _param = Pointer_stringify(param);
+
+ var http = new XMLHttpRequest();
+ http.open(_request, _url, true);
+ http.responseType = 'arraybuffer';
+
+ // LOAD
+ http.onload = function http_onload(e) {
+ if (http.status == 200 || _url.substr(0,4).toLowerCase() != "http") {
+ var byteArray = new Uint8Array(http.response);
+ var buffer = _malloc(byteArray.length);
+ HEAPU8.set(byteArray, buffer);
+ if (onload) Runtime.dynCall('viii', onload, [arg, buffer, byteArray.length]);
+ if (free) _free(buffer);
+ } else {
+ if (onerror) Runtime.dynCall('viii', onerror, [arg, http.status, http.statusText]);
+ }
+ };
+
+ // ERROR
+ http.onerror = function http_onerror(e) {
+ if (onerror) Runtime.dynCall('viii', onerror, [arg, http.status, http.statusText]);
+ };
+
+ // PROGRESS
+ http.onprogress = function http_onprogress(e) {
+ if (onprogress) Runtime.dynCall('viii', onprogress, [arg, e.loaded, e.lengthComputable || e.lengthComputable === undefined ? e.total : 0]);
};
// Useful because the browser can limit the number of redirection
@@ -943,8 +1074,11 @@ mergeInto(LibraryManager.library, {
var callbackId = msg.data['callbackId'];
var callbackInfo = info.callbacks[callbackId];
if (!callbackInfo) return; // no callback or callback removed meanwhile
- info.awaited--;
- info.callbacks[callbackId] = null; // TODO: reuse callbackIds, compress this
+ // Don't trash our callback state if we expect additional calls.
+ if (msg.data['finalResponse']) {
+ info.awaited--;
+ info.callbacks[callbackId] = null; // TODO: reuse callbackIds, compress this
+ }
var data = msg.data['data'];
if (data) {
if (!data.byteLength) data = new Uint8Array(data);
@@ -991,12 +1125,23 @@ mergeInto(LibraryManager.library, {
});
},
+ emscripten_worker_respond_provisionally: function(data, size) {
+ if (!inWorkerCall) throw 'not in worker call!';
+ if (workerResponded) throw 'already responded with final response!';
+ postMessage({
+ 'callbackId': workerCallbackId,
+ 'finalResponse': false,
+ 'data': data ? new Uint8Array({{{ makeHEAPView('U8', 'data', 'data + size') }}}) : 0 // XXX copy to a new typed array as a workaround for chrome bug 169705
+ });
+ },
+
emscripten_worker_respond: function(data, size) {
if (!inWorkerCall) throw 'not in worker call!';
- if (workerResponded) throw 'already responded!';
+ if (workerResponded) throw 'already responded with final response!';
workerResponded = true;
postMessage({
'callbackId': workerCallbackId,
+ 'finalResponse': true,
'data': data ? new Uint8Array({{{ makeHEAPView('U8', 'data', 'data + size') }}}) : 0 // XXX copy to a new typed array as a workaround for chrome bug 169705
});
},
diff --git a/src/library_egl.js b/src/library_egl.js
index e2d1df43..46ec939e 100644
--- a/src/library_egl.js
+++ b/src/library_egl.js
@@ -492,7 +492,11 @@ var LibraryEGL = {
EGL.setErrorCode(0x3000 /* EGL_SUCCESS */);
return 1;
},
-
+
+
+ // EGLAPI EGLBoolean EGLAPIENTRY eglWaitGL(void);
+ eglWaitGL: 'eglWaitClient',
+
// EGLAPI EGLBoolean EGLAPIENTRY eglSwapInterval(EGLDisplay dpy, EGLint interval);
eglSwapInterval: function(display, interval) {
if (display != 62000 /* Magic ID for Emscripten 'default display' */) {
diff --git a/src/library_fs.js b/src/library_fs.js
index 1428f041..d53210f9 100644
--- a/src/library_fs.js
+++ b/src/library_fs.js
@@ -394,16 +394,12 @@ mergeInto(LibraryManager.library, {
}
});
}
- if (stream.__proto__) {
- // reuse the object
- stream.__proto__ = FS.FSStream.prototype;
- } else {
- var newStream = new FS.FSStream();
- for (var p in stream) {
- newStream[p] = stream[p];
- }
- stream = newStream;
+ // clone it, so we can return an instance of FSStream
+ var newStream = new FS.FSStream();
+ for (var p in stream) {
+ newStream[p] = stream[p];
}
+ stream = newStream;
var fd = FS.nextfd(fd_start, fd_end);
stream.fd = fd;
FS.streams[fd] = stream;
@@ -1436,82 +1432,81 @@ mergeInto(LibraryManager.library, {
// XHR, which is not possible in browsers except in a web worker! Use preloading,
// either --preload-file in emcc or FS.createPreloadedFile
createLazyFile: function(parent, name, url, canRead, canWrite) {
- if (typeof XMLHttpRequest !== 'undefined') {
- if (!ENVIRONMENT_IS_WORKER) throw 'Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc';
- // Lazy chunked Uint8Array (implements get and length from Uint8Array). Actual getting is abstracted away for eventual reuse.
- function LazyUint8Array() {
- this.lengthKnown = false;
- this.chunks = []; // Loaded chunks. Index is the chunk number
- }
- LazyUint8Array.prototype.get = function LazyUint8Array_get(idx) {
- if (idx > this.length-1 || idx < 0) {
- return undefined;
- }
- var chunkOffset = idx % this.chunkSize;
- var chunkNum = Math.floor(idx / this.chunkSize);
- return this.getter(chunkNum)[chunkOffset];
- }
- LazyUint8Array.prototype.setDataGetter = function LazyUint8Array_setDataGetter(getter) {
- this.getter = getter;
+ // Lazy chunked Uint8Array (implements get and length from Uint8Array). Actual getting is abstracted away for eventual reuse.
+ function LazyUint8Array() {
+ this.lengthKnown = false;
+ this.chunks = []; // Loaded chunks. Index is the chunk number
+ }
+ LazyUint8Array.prototype.get = function LazyUint8Array_get(idx) {
+ if (idx > this.length-1 || idx < 0) {
+ return undefined;
}
- LazyUint8Array.prototype.cacheLength = function LazyUint8Array_cacheLength() {
- // Find length
- var xhr = new XMLHttpRequest();
- xhr.open('HEAD', url, false);
- xhr.send(null);
- if (!(xhr.status >= 200 && xhr.status < 300 || xhr.status === 304)) throw new Error("Couldn't load " + url + ". Status: " + xhr.status);
- var datalength = Number(xhr.getResponseHeader("Content-length"));
- var header;
- var hasByteServing = (header = xhr.getResponseHeader("Accept-Ranges")) && header === "bytes";
+ var chunkOffset = idx % this.chunkSize;
+ var chunkNum = Math.floor(idx / this.chunkSize);
+ return this.getter(chunkNum)[chunkOffset];
+ }
+ LazyUint8Array.prototype.setDataGetter = function LazyUint8Array_setDataGetter(getter) {
+ this.getter = getter;
+ }
+ LazyUint8Array.prototype.cacheLength = function LazyUint8Array_cacheLength() {
+ // Find length
+ var xhr = new XMLHttpRequest();
+ xhr.open('HEAD', url, false);
+ xhr.send(null);
+ if (!(xhr.status >= 200 && xhr.status < 300 || xhr.status === 304)) throw new Error("Couldn't load " + url + ". Status: " + xhr.status);
+ var datalength = Number(xhr.getResponseHeader("Content-length"));
+ var header;
+ var hasByteServing = (header = xhr.getResponseHeader("Accept-Ranges")) && header === "bytes";
#if SMALL_XHR_CHUNKS
- var chunkSize = 1024; // Chunk size in bytes
+ var chunkSize = 1024; // Chunk size in bytes
#else
- var chunkSize = 1024*1024; // Chunk size in bytes
+ var chunkSize = 1024*1024; // Chunk size in bytes
#endif
- if (!hasByteServing) chunkSize = datalength;
-
- // Function to get a range from the remote URL.
- var doXHR = (function(from, to) {
- if (from > to) throw new Error("invalid range (" + from + ", " + to + ") or no bytes requested!");
- if (to > datalength-1) throw new Error("only " + datalength + " bytes available! programmer error!");
-
- // TODO: Use mozResponseArrayBuffer, responseStream, etc. if available.
- var xhr = new XMLHttpRequest();
- xhr.open('GET', url, false);
- if (datalength !== chunkSize) xhr.setRequestHeader("Range", "bytes=" + from + "-" + to);
-
- // Some hints to the browser that we want binary data.
- if (typeof Uint8Array != 'undefined') xhr.responseType = 'arraybuffer';
- if (xhr.overrideMimeType) {
- xhr.overrideMimeType('text/plain; charset=x-user-defined');
- }
-
- xhr.send(null);
- if (!(xhr.status >= 200 && xhr.status < 300 || xhr.status === 304)) throw new Error("Couldn't load " + url + ". Status: " + xhr.status);
- if (xhr.response !== undefined) {
- return new Uint8Array(xhr.response || []);
- } else {
- return intArrayFromString(xhr.responseText || '', true);
- }
- });
- var lazyArray = this;
- lazyArray.setDataGetter(function(chunkNum) {
- var start = chunkNum * chunkSize;
- var end = (chunkNum+1) * chunkSize - 1; // including this byte
- end = Math.min(end, datalength-1); // if datalength-1 is selected, this is the last block
- if (typeof(lazyArray.chunks[chunkNum]) === "undefined") {
- lazyArray.chunks[chunkNum] = doXHR(start, end);
- }
- if (typeof(lazyArray.chunks[chunkNum]) === "undefined") throw new Error("doXHR failed!");
- return lazyArray.chunks[chunkNum];
- });
+ if (!hasByteServing) chunkSize = datalength;
- this._length = datalength;
- this._chunkSize = chunkSize;
- this.lengthKnown = true;
- }
+ // Function to get a range from the remote URL.
+ var doXHR = (function(from, to) {
+ if (from > to) throw new Error("invalid range (" + from + ", " + to + ") or no bytes requested!");
+ if (to > datalength-1) throw new Error("only " + datalength + " bytes available! programmer error!");
+ // TODO: Use mozResponseArrayBuffer, responseStream, etc. if available.
+ var xhr = new XMLHttpRequest();
+ xhr.open('GET', url, false);
+ if (datalength !== chunkSize) xhr.setRequestHeader("Range", "bytes=" + from + "-" + to);
+
+ // Some hints to the browser that we want binary data.
+ if (typeof Uint8Array != 'undefined') xhr.responseType = 'arraybuffer';
+ if (xhr.overrideMimeType) {
+ xhr.overrideMimeType('text/plain; charset=x-user-defined');
+ }
+
+ xhr.send(null);
+ if (!(xhr.status >= 200 && xhr.status < 300 || xhr.status === 304)) throw new Error("Couldn't load " + url + ". Status: " + xhr.status);
+ if (xhr.response !== undefined) {
+ return new Uint8Array(xhr.response || []);
+ } else {
+ return intArrayFromString(xhr.responseText || '', true);
+ }
+ });
+ var lazyArray = this;
+ lazyArray.setDataGetter(function(chunkNum) {
+ var start = chunkNum * chunkSize;
+ var end = (chunkNum+1) * chunkSize - 1; // including this byte
+ end = Math.min(end, datalength-1); // if datalength-1 is selected, this is the last block
+ if (typeof(lazyArray.chunks[chunkNum]) === "undefined") {
+ lazyArray.chunks[chunkNum] = doXHR(start, end);
+ }
+ if (typeof(lazyArray.chunks[chunkNum]) === "undefined") throw new Error("doXHR failed!");
+ return lazyArray.chunks[chunkNum];
+ });
+
+ this._length = datalength;
+ this._chunkSize = chunkSize;
+ this.lengthKnown = true;
+ }
+ if (typeof XMLHttpRequest !== 'undefined') {
+ if (!ENVIRONMENT_IS_WORKER) throw 'Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc';
var lazyArray = new LazyUint8Array();
Object.defineProperty(lazyArray, "length", {
get: function() {
diff --git a/src/library_gc.js b/src/library_gc.js
index b3dae0e9..d86f2d15 100644
--- a/src/library_gc.js
+++ b/src/library_gc.js
@@ -1,4 +1,6 @@
+// WARNING: this is deprecated. You should just build Boehm from source, it is much faster than the toy version written in emscripten
+
if (GC_SUPPORT) {
EXPORTED_FUNCTIONS['_calloc'] = 1;
EXPORTED_FUNCTIONS['_realloc'] = 1;
diff --git a/src/library_gl.js b/src/library_gl.js
index 7e4c5a97..851b01b1 100644
--- a/src/library_gl.js
+++ b/src/library_gl.js
@@ -631,7 +631,7 @@ var LibraryGL = {
GLctx.getExtension('WEBKIT_EXT_texture_filter_anisotropic');
GL.floatExt = GLctx.getExtension('OES_texture_float');
-
+
// Extension available from Firefox 26 and Google Chrome 30
GL.instancedArraysExt = GLctx.getExtension('ANGLE_instanced_arrays');
@@ -648,7 +648,8 @@ var LibraryGL = {
"OES_element_index_uint", "EXT_texture_filter_anisotropic", "ANGLE_instanced_arrays",
"OES_texture_float_linear", "OES_texture_half_float_linear", "WEBGL_compressed_texture_atc",
"WEBGL_compressed_texture_pvrtc", "EXT_color_buffer_half_float", "WEBGL_color_buffer_float",
- "EXT_frag_depth", "EXT_sRGB", "WEBGL_draw_buffers", "WEBGL_shared_resources" ];
+ "EXT_frag_depth", "EXT_sRGB", "WEBGL_draw_buffers", "WEBGL_shared_resources",
+ "EXT_shader_texture_lod" ];
function shouldEnableAutomatically(extension) {
for(var i in automaticallyEnabledExtensions) {
@@ -827,7 +828,7 @@ var LibraryGL = {
} else {
data = null;
}
- CLctx['compressedTexSubImage2D'](target, level, xoffset, yoffset, width, height, data);
+ GLctx['compressedTexSubImage2D'](target, level, xoffset, yoffset, width, height, format, data);
},
glTexImage2D__sig: 'viiiiiiiii',
diff --git a/src/library_glfw.js b/src/library_glfw.js
index 14864992..6d539326 100644
--- a/src/library_glfw.js
+++ b/src/library_glfw.js
@@ -18,6 +18,7 @@
*
* Authors:
* - Éloi Rivard <eloi.rivard@gmail.com>
+ * - Thomas Borsos <thomasborsos@gmail.com>
*
******************************************************************************/
@@ -50,58 +51,60 @@ var LibraryGLFW = {
DOMToGLFWKeyCode: function(keycode) {
switch (keycode) {
- case 0x09: return 295 ; //DOM_VK_TAB -> GLFW_KEY_TAB
- case 0x1B: return 255 ; //DOM_VK_ESCAPE -> GLFW_KEY_ESC
- case 0x6A: return 313 ; //DOM_VK_MULTIPLY -> GLFW_KEY_KP_MULTIPLY
- case 0x6B: return 315 ; //DOM_VK_ADD -> GLFW_KEY_KP_ADD
- case 0x6D: return 314 ; //DOM_VK_SUBTRACT -> GLFW_KEY_KP_SUBTRACT
- case 0x6E: return 316 ; //DOM_VK_DECIMAL -> GLFW_KEY_KP_DECIMAL
- case 0x6F: return 312 ; //DOM_VK_DIVIDE -> GLFW_KEY_KP_DIVIDE
- case 0x70: return 258 ; //DOM_VK_F1 -> GLFW_KEY_F1
- case 0x71: return 259 ; //DOM_VK_F2 -> GLFW_KEY_F2
- case 0x72: return 260 ; //DOM_VK_F3 -> GLFW_KEY_F3
- case 0x73: return 261 ; //DOM_VK_F4 -> GLFW_KEY_F4
- case 0x74: return 262 ; //DOM_VK_F5 -> GLFW_KEY_F5
- case 0x75: return 263 ; //DOM_VK_F6 -> GLFW_KEY_F6
- case 0x76: return 264 ; //DOM_VK_F7 -> GLFW_KEY_F7
- case 0x77: return 265 ; //DOM_VK_F8 -> GLFW_KEY_F8
- case 0x78: return 266 ; //DOM_VK_F9 -> GLFW_KEY_F9
- case 0x79: return 267 ; //DOM_VK_F10 -> GLFW_KEY_F10
- case 0x7a: return 268 ; //DOM_VK_F11 -> GLFW_KEY_F11
- case 0x7b: return 269 ; //DOM_VK_F12 -> GLFW_KEY_F12
- case 0x25: return 285 ; //DOM_VK_LEFT -> GLFW_KEY_LEFT
- case 0x26: return 283 ; //DOM_VK_UP -> GLFW_KEY_UP
- case 0x27: return 286 ; //DOM_VK_RIGHT -> GLFW_KEY_RIGHT
- case 0x28: return 284 ; //DOM_VK_DOWN -> GLFW_KEY_DOWN
- case 0x21: return 298 ; //DOM_VK_PAGE_UP -> GLFW_KEY_PAGEUP
- case 0x22: return 299 ; //DOM_VK_PAGE_DOWN -> GLFW_KEY_PAGEDOWN
- case 0x24: return 300 ; //DOM_VK_HOME -> GLFW_KEY_HOME
- case 0x23: return 301 ; //DOM_VK_END -> GLFW_KEY_END
- case 0x2d: return 296 ; //DOM_VK_INSERT -> GLFW_KEY_INSERT
- case 16 : return 287 ; //DOM_VK_SHIFT -> GLFW_KEY_LSHIFT
- case 0x05: return 287 ; //DOM_VK_LEFT_SHIFT -> GLFW_KEY_LSHIFT
- case 0x06: return 288 ; //DOM_VK_RIGHT_SHIFT -> GLFW_KEY_RSHIFT
- case 17 : return 289 ; //DOM_VK_CONTROL -> GLFW_KEY_LCTRL
- case 0x03: return 289 ; //DOM_VK_LEFT_CONTROL -> GLFW_KEY_LCTRL
- case 0x04: return 290 ; //DOM_VK_RIGHT_CONTROL -> GLFW_KEY_RCTRL
- case 18 : return 291 ; //DOM_VK_ALT -> GLFW_KEY_LALT
- case 0x02: return 291 ; //DOM_VK_LEFT_ALT -> GLFW_KEY_LALT
- case 0x01: return 292 ; //DOM_VK_RIGHT_ALT -> GLFW_KEY_RALT
- case 96 : return 302 ; //GLFW_KEY_KP_0
- case 97 : return 303 ; //GLFW_KEY_KP_1
- case 98 : return 304 ; //GLFW_KEY_KP_2
- case 99 : return 305 ; //GLFW_KEY_KP_3
- case 100 : return 306 ; //GLFW_KEY_KP_4
- case 101 : return 307 ; //GLFW_KEY_KP_5
- case 102 : return 308 ; //GLFW_KEY_KP_6
- case 103 : return 309 ; //GLFW_KEY_KP_7
- case 104 : return 310 ; //GLFW_KEY_KP_8
- case 105 : return 311 ; //GLFW_KEY_KP_9
+ case 0x08: return 295 ; // DOM_VK_BACKSPACE -> GLFW_KEY_BACKSPACE
+ case 0x09: return 293 ; // DOM_VK_TAB -> GLFW_KEY_TAB
+ case 0x0D: return 294 ; // DOM_VK_ENTER -> GLFW_KEY_ENTER
+ case 0x1B: return 257 ; // DOM_VK_ESCAPE -> GLFW_KEY_ESC
+ case 0x6A: return 313 ; // DOM_VK_MULTIPLY -> GLFW_KEY_KP_MULTIPLY
+ case 0x6B: return 315 ; // DOM_VK_ADD -> GLFW_KEY_KP_ADD
+ case 0x6D: return 314 ; // DOM_VK_SUBTRACT -> GLFW_KEY_KP_SUBTRACT
+ case 0x6E: return 316 ; // DOM_VK_DECIMAL -> GLFW_KEY_KP_DECIMAL
+ case 0x6F: return 312 ; // DOM_VK_DIVIDE -> GLFW_KEY_KP_DIVIDE
+ case 0x70: return 258 ; // DOM_VK_F1 -> GLFW_KEY_F1
+ case 0x71: return 259 ; // DOM_VK_F2 -> GLFW_KEY_F2
+ case 0x72: return 260 ; // DOM_VK_F3 -> GLFW_KEY_F3
+ case 0x73: return 261 ; // DOM_VK_F4 -> GLFW_KEY_F4
+ case 0x74: return 262 ; // DOM_VK_F5 -> GLFW_KEY_F5
+ case 0x75: return 263 ; // DOM_VK_F6 -> GLFW_KEY_F6
+ case 0x76: return 264 ; // DOM_VK_F7 -> GLFW_KEY_F7
+ case 0x77: return 265 ; // DOM_VK_F8 -> GLFW_KEY_F8
+ case 0x78: return 266 ; // DOM_VK_F9 -> GLFW_KEY_F9
+ case 0x79: return 267 ; // DOM_VK_F10 -> GLFW_KEY_F10
+ case 0x7a: return 268 ; // DOM_VK_F11 -> GLFW_KEY_F11
+ case 0x7b: return 269 ; // DOM_VK_F12 -> GLFW_KEY_F12
+ case 0x25: return 285 ; // DOM_VK_LEFT -> GLFW_KEY_LEFT
+ case 0x26: return 283 ; // DOM_VK_UP -> GLFW_KEY_UP
+ case 0x27: return 286 ; // DOM_VK_RIGHT -> GLFW_KEY_RIGHT
+ case 0x28: return 284 ; // DOM_VK_DOWN -> GLFW_KEY_DOWN
+ case 0x21: return 298 ; // DOM_VK_PAGE_UP -> GLFW_KEY_PAGEUP
+ case 0x22: return 299 ; // DOM_VK_PAGE_DOWN -> GLFW_KEY_PAGEDOWN
+ case 0x24: return 300 ; // DOM_VK_HOME -> GLFW_KEY_HOME
+ case 0x23: return 301 ; // DOM_VK_END -> GLFW_KEY_END
+ case 0x2d: return 296 ; // DOM_VK_INSERT -> GLFW_KEY_INSERT
+ case 16 : return 287 ; // DOM_VK_SHIFT -> GLFW_KEY_LSHIFT
+ case 0x05: return 287 ; // DOM_VK_LEFT_SHIFT -> GLFW_KEY_LSHIFT
+ case 0x06: return 288 ; // DOM_VK_RIGHT_SHIFT -> GLFW_KEY_RSHIFT
+ case 17 : return 289 ; // DOM_VK_CONTROL -> GLFW_KEY_LCTRL
+ case 0x03: return 289 ; // DOM_VK_LEFT_CONTROL -> GLFW_KEY_LCTRL
+ case 0x04: return 290 ; // DOM_VK_RIGHT_CONTROL -> GLFW_KEY_RCTRL
+ case 18 : return 291 ; // DOM_VK_ALT -> GLFW_KEY_LALT
+ case 0x02: return 291 ; // DOM_VK_LEFT_ALT -> GLFW_KEY_LALT
+ case 0x01: return 292 ; // DOM_VK_RIGHT_ALT -> GLFW_KEY_RALT
+ case 96 : return 302 ; // GLFW_KEY_KP_0
+ case 97 : return 303 ; // GLFW_KEY_KP_1
+ case 98 : return 304 ; // GLFW_KEY_KP_2
+ case 99 : return 305 ; // GLFW_KEY_KP_3
+ case 100 : return 306 ; // GLFW_KEY_KP_4
+ case 101 : return 307 ; // GLFW_KEY_KP_5
+ case 102 : return 308 ; // GLFW_KEY_KP_6
+ case 103 : return 309 ; // GLFW_KEY_KP_7
+ case 104 : return 310 ; // GLFW_KEY_KP_8
+ case 105 : return 311 ; // GLFW_KEY_KP_9
default : return keycode;
};
},
- //UCS-2 to UTF16 (ISO 10646)
+ // UCS-2 to UTF16 (ISO 10646)
getUnicodeChar: function(value) {
var output = '';
if (value > 0xFFFF) {
@@ -114,7 +117,7 @@ var LibraryGLFW = {
},
onKeyPress: function(event) {
- //charCode is only available whith onKeyPress event
+ // charCode is only available whith onKeyPress event
var char = GLFW.getUnicodeChar(event.charCode);
if (event.charCode) {
@@ -127,14 +130,16 @@ var LibraryGLFW = {
onKeyChanged: function(event, status) {
var key = GLFW.DOMToGLFWKeyCode(event.keyCode);
- if (key && GLFW.keyFunc) {
+ if (key) {
GLFW.keys[key] = status;
- Runtime.dynCall('vii', GLFW.keyFunc, [key, status]);
+ if (GLFW.keyFunc) {
+ Runtime.dynCall('vii', GLFW.keyFunc, [key, status]);
+ }
}
},
onKeydown: function(event) {
- GLFW.onKeyChanged(event, 1);//GLFW_PRESS
+ GLFW.onKeyChanged(event, 1);// GLFW_PRESS
// This logic comes directly from the sdl implementation. We cannot
// call preventDefault on all keydown events otherwise onKeyPress will
// not get called
@@ -144,7 +149,7 @@ var LibraryGLFW = {
},
onKeyup: function(event) {
- GLFW.onKeyChanged(event, 0);//GLFW_RELEASE
+ GLFW.onKeyChanged(event, 0);// GLFW_RELEASE
},
onMousemove: function(event) {
@@ -175,25 +180,34 @@ var LibraryGLFW = {
return;
}
- if (status == 1) {//GLFW_PRESS
+ if (status == 1) {// GLFW_PRESS
try {
event.target.setCapture();
} catch (e) {}
}
event.preventDefault();
- //DOM and glfw have the same button codes
- Runtime.dynCall('vii', GLFW.mouseButtonFunc, [event['button'], status]);
+
+ // DOM and glfw have different button codes
+ var eventButton = event['button'];
+ if (eventButton > 0) {
+ if (eventButton == 1) {
+ eventButton = 2;
+ } else {
+ eventButton = 1;
+ }
+ }
+ Runtime.dynCall('vii', GLFW.mouseButtonFunc, [eventButton, status]);
},
onMouseButtonDown: function(event) {
GLFW.buttons |= (1 << event['button']);
- GLFW.onMouseButtonChanged(event, 1);//GLFW_PRESS
+ GLFW.onMouseButtonChanged(event, 1);// GLFW_PRESS
},
onMouseButtonUp: function(event) {
GLFW.buttons &= ~(1 << event['button']);
- GLFW.onMouseButtonChanged(event, 0);//GLFW_RELEASE
+ GLFW.onMouseButtonChanged(event, 0);// GLFW_RELEASE
},
onMouseWheel: function(event) {
@@ -213,8 +227,7 @@ var LibraryGLFW = {
if (document["fullScreen"] || document["mozFullScreen"] || document["webkitIsFullScreen"]) {
width = screen["width"];
height = screen["height"];
- }
- else {
+ } else {
width = GLFW.windowWidth;
height = GLFW.windowHeight;
// TODO set position
@@ -279,40 +292,40 @@ var LibraryGLFW = {
//TODO: Init with correct values
GLFW.params = new Array();
- GLFW.params[0x00030001] = true; //GLFW_MOUSE_CURSOR
- GLFW.params[0x00030002] = false; //GLFW_STICKY_KEYS
- GLFW.params[0x00030003] = true; //GLFW_STICKY_MOUSE_BUTTONS
- GLFW.params[0x00030004] = false; //GLFW_SYSTEM_KEYS
- GLFW.params[0x00030005] = false; //GLFW_KEY_REPEAT
- GLFW.params[0x00030006] = true; //GLFW_AUTO_POLL_EVENTS
- GLFW.params[0x00020001] = true; //GLFW_OPENED
- GLFW.params[0x00020002] = true; //GLFW_ACTIVE
- GLFW.params[0x00020003] = false; //GLFW_ICONIFIED
- GLFW.params[0x00020004] = true; //GLFW_ACCELERATED
- GLFW.params[0x00020005] = 0; //GLFW_RED_BITS
- GLFW.params[0x00020006] = 0; //GLFW_GREEN_BITS
- GLFW.params[0x00020007] = 0; //GLFW_BLUE_BITS
- GLFW.params[0x00020008] = 0; //GLFW_ALPHA_BITS
- GLFW.params[0x00020009] = 0; //GLFW_DEPTH_BITS
- GLFW.params[0x0002000A] = 0; //GLFW_STENCIL_BITS
- GLFW.params[0x0002000B] = 0; //GLFW_REFRESH_RATE
- GLFW.params[0x0002000C] = 0; //GLFW_ACCUM_RED_BITS
- GLFW.params[0x0002000D] = 0; //GLFW_ACCUM_GREEN_BITS
- GLFW.params[0x0002000E] = 0; //GLFW_ACCUM_BLUE_BITS
- GLFW.params[0x0002000F] = 0; //GLFW_ACCUM_ALPHA_BITS
- GLFW.params[0x00020010] = 0; //GLFW_AUX_BUFFERS
- GLFW.params[0x00020011] = 0; //GLFW_STEREO
- GLFW.params[0x00020012] = 0; //GLFW_WINDOW_NO_RESIZE
- GLFW.params[0x00020013] = 0; //GLFW_FSAA_SAMPLES
- GLFW.params[0x00020014] = 0; //GLFW_OPENGL_VERSION_MAJOR
- GLFW.params[0x00020015] = 0; //GLFW_OPENGL_VERSION_MINOR
- GLFW.params[0x00020016] = 0; //GLFW_OPENGL_FORWARD_COMPAT
- GLFW.params[0x00020017] = 0; //GLFW_OPENGL_DEBUG_CONTEXT
- GLFW.params[0x00020018] = 0; //GLFW_OPENGL_PROFILE
+ GLFW.params[0x00030001] = true; // GLFW_MOUSE_CURSOR
+ GLFW.params[0x00030002] = false; // GLFW_STICKY_KEYS
+ GLFW.params[0x00030003] = true; // GLFW_STICKY_MOUSE_BUTTONS
+ GLFW.params[0x00030004] = false; // GLFW_SYSTEM_KEYS
+ GLFW.params[0x00030005] = false; // GLFW_KEY_REPEAT
+ GLFW.params[0x00030006] = true; // GLFW_AUTO_POLL_EVENTS
+ GLFW.params[0x00020001] = true; // GLFW_OPENED
+ GLFW.params[0x00020002] = true; // GLFW_ACTIVE
+ GLFW.params[0x00020003] = false; // GLFW_ICONIFIED
+ GLFW.params[0x00020004] = true; // GLFW_ACCELERATED
+ GLFW.params[0x00020005] = 0; // GLFW_RED_BITS
+ GLFW.params[0x00020006] = 0; // GLFW_GREEN_BITS
+ GLFW.params[0x00020007] = 0; // GLFW_BLUE_BITS
+ GLFW.params[0x00020008] = 0; // GLFW_ALPHA_BITS
+ GLFW.params[0x00020009] = 0; // GLFW_DEPTH_BITS
+ GLFW.params[0x0002000A] = 0; // GLFW_STENCIL_BITS
+ GLFW.params[0x0002000B] = 0; // GLFW_REFRESH_RATE
+ GLFW.params[0x0002000C] = 0; // GLFW_ACCUM_RED_BITS
+ GLFW.params[0x0002000D] = 0; // GLFW_ACCUM_GREEN_BITS
+ GLFW.params[0x0002000E] = 0; // GLFW_ACCUM_BLUE_BITS
+ GLFW.params[0x0002000F] = 0; // GLFW_ACCUM_ALPHA_BITS
+ GLFW.params[0x00020010] = 0; // GLFW_AUX_BUFFERS
+ GLFW.params[0x00020011] = 0; // GLFW_STEREO
+ GLFW.params[0x00020012] = 0; // GLFW_WINDOW_NO_RESIZE
+ GLFW.params[0x00020013] = 0; // GLFW_FSAA_SAMPLES
+ GLFW.params[0x00020014] = 0; // GLFW_OPENGL_VERSION_MAJOR
+ GLFW.params[0x00020015] = 0; // GLFW_OPENGL_VERSION_MINOR
+ GLFW.params[0x00020016] = 0; // GLFW_OPENGL_FORWARD_COMPAT
+ GLFW.params[0x00020017] = 0; // GLFW_OPENGL_DEBUG_CONTEXT
+ GLFW.params[0x00020018] = 0; // GLFW_OPENGL_PROFILE
GLFW.keys = new Array();
- return 1; //GL_TRUE
+ return 1; // GL_TRUE
},
glfwTerminate: function() {},
@@ -332,33 +345,31 @@ var LibraryGLFW = {
if (width > 0 && height == 0) {
height = 3 * width / 4;
}
- GLFW.params[0x00020005] = redbits; //GLFW_RED_BITS
- GLFW.params[0x00020006] = greenbits; //GLFW_GREEN_BITS
- GLFW.params[0x00020007] = bluebits; //GLFW_BLUE_BITS
- GLFW.params[0x00020008] = alphabits; //GLFW_ALPHA_BITS
- GLFW.params[0x00020009] = depthbits; //GLFW_DEPTH_BITS
- GLFW.params[0x0002000A] = stencilbits; //GLFW_STENCIL_BITS
-
- if (mode == 0x00010001) {//GLFW_WINDOW
+ GLFW.params[0x00020005] = redbits; // GLFW_RED_BITS
+ GLFW.params[0x00020006] = greenbits; // GLFW_GREEN_BITS
+ GLFW.params[0x00020007] = bluebits; // GLFW_BLUE_BITS
+ GLFW.params[0x00020008] = alphabits; // GLFW_ALPHA_BITS
+ GLFW.params[0x00020009] = depthbits; // GLFW_DEPTH_BITS
+ GLFW.params[0x0002000A] = stencilbits; // GLFW_STENCIL_BITS
+
+ if (mode == 0x00010001) {// GLFW_WINDOW
Browser.setCanvasSize(GLFW.initWindowWidth = width,
GLFW.initWindowHeight = height);
- GLFW.params[0x00030003] = true; //GLFW_STICKY_MOUSE_BUTTONS
- }
- else if (mode == 0x00010002) {//GLFW_FULLSCREEN
+ GLFW.params[0x00030003] = true; // GLFW_STICKY_MOUSE_BUTTONS
+ } else if (mode == 0x00010002) {// GLFW_FULLSCREEN
GLFW.requestFullScreen();
- GLFW.params[0x00030003] = false; //GLFW_STICKY_MOUSE_BUTTONS
- }
- else{
+ GLFW.params[0x00030003] = false; // GLFW_STICKY_MOUSE_BUTTONS
+ } else {
throw "Invalid glfwOpenWindow mode.";
}
var contextAttributes = {
- antialias: (GLFW.params[0x00020013] > 1), //GLFW_FSAA_SAMPLES
- depth: (GLFW.params[0x00020009] > 0), //GLFW_DEPTH_BITS
- stencil: (GLFW.params[0x0002000A] > 0) //GLFW_STENCIL_BITS
+ antialias: (GLFW.params[0x00020013] > 1), // GLFW_FSAA_SAMPLES
+ depth: (GLFW.params[0x00020009] > 0), // GLFW_DEPTH_BITS
+ stencil: (GLFW.params[0x0002000A] > 0) // GLFW_STENCIL_BITS
}
Module.ctx = Browser.createContext(Module['canvas'], true, true, contextAttributes);
- return 1; //GL_TRUE
+ return 1; // GL_TRUE
},
glfwOpenWindowHint: function(target, hint) {
@@ -439,7 +450,7 @@ var LibraryGLFW = {
setValue(ypos, Browser.mouseY, 'i32');
},
- //I believe it is not possible to move the mouse with javascript
+ // I believe it is not possible to move the mouse with javascript
glfwSetMousePos: function(xpos, ypos) {},
glfwGetMouseWheel: function() {
@@ -514,7 +525,7 @@ var LibraryGLFW = {
str += 'i';
}
Runtime.dynCall(str, fun, arg);
- //One single thread
+ // One single thread
return 0;
},
@@ -523,7 +534,7 @@ var LibraryGLFW = {
glfwWaitThread: function(ID, waitmode) {},
glfwGetThreadID: function() {
- //One single thread
+ // One single thread
return 0;
},
@@ -546,7 +557,7 @@ var LibraryGLFW = {
glfwBroadcastCond: function(cond) { throw "glfwBroadcastCond is not implemented."; },
glfwGetNumberOfProcessors: function() {
- //Threads are disabled anyway…
+ // Threads are disabled anyway…
return 1;
},
diff --git a/src/library_glut.js b/src/library_glut.js
index 167e5272..445e08a4 100644
--- a/src/library_glut.js
+++ b/src/library_glut.js
@@ -22,6 +22,7 @@ var LibraryGLUT = {
windowY: 0,
windowWidth: 0,
windowHeight: 0,
+ requestedAnimationFrame: false,
saveModifiers: function(event) {
GLUT.modifiers = 0;
@@ -484,8 +485,10 @@ var LibraryGLUT = {
glutSwapBuffers: function() {},
glutPostRedisplay: function() {
- if (GLUT.displayFunc) {
+ if (GLUT.displayFunc && !GLUT.requestedAnimationFrame) {
+ GLUT.requestedAnimationFrame = true;
Browser.requestAnimationFrame(function() {
+ GLUT.requestedAnimationFrame = false;
if (ABORT) return;
Runtime.dynCall('v', GLUT.displayFunc);
});
diff --git a/src/library_html5.js b/src/library_html5.js
index 63a4dff7..d9376c2a 100644
--- a/src/library_html5.js
+++ b/src/library_html5.js
@@ -13,6 +13,15 @@ var LibraryJSEvents = {
visibilityChangeEvent: 0,
touchEvent: 0,
+ // When we transition from fullscreen to windowed mode, we remember here the element that was just in fullscreen mode
+ // so that we can report information about that element in the event message.
+ previousFullscreenElement: null,
+
+ // Remember the current mouse coordinates in case we need to emulate movementXY generation for browsers that don't support it.
+ // Some browsers (e.g. Safari 6.0.5) only give movementXY when Pointerlock is active.
+ previousScreenX: null,
+ previousScreenY: null,
+
// When the C runtime exits via exit(), we unregister all event handlers added by this library to be nice and clean.
// Track in this field whether we have yet registered that __ATEXIT__ handler.
removeEventListenersRegistered: false,
@@ -114,8 +123,11 @@ var LibraryJSEvents = {
// Stores objects representing each currently registered JS event handler.
eventHandlers: [],
+ isInternetExplorer: function() { return navigator.userAgent.indexOf('MSIE') !== -1 || navigator.appVersion.indexOf('Trident/') > 0; },
+
_removeHandler: function(i) {
- JSEvents.eventHandlers[i].target.removeEventListener(JSEvents.eventHandlers[i].eventTypeString, JSEvents.eventHandlers[i].handlerFunc, true);
+ var h = JSEvents.eventHandlers[i];
+ h.target.removeEventListener(h.eventTypeString, h.eventListenerFunc, h.useCapture);
JSEvents.eventHandlers.splice(i, 1);
},
@@ -135,6 +147,7 @@ var LibraryJSEvents = {
}
if (eventHandler.callbackfunc) {
+ eventHandler.eventListenerFunc = jsEventHandler;
eventHandler.target.addEventListener(eventHandler.eventTypeString, jsEventHandler, eventHandler.useCapture);
JSEvents.eventHandlers.push(eventHandler);
JSEvents.registerRemoveEventListeners();
@@ -173,11 +186,9 @@ var LibraryJSEvents = {
}
};
- var isInternetExplorer = (navigator.userAgent.indexOf('MSIE') !== -1 || navigator.appVersion.indexOf('Trident/') > 0);
-
var eventHandler = {
target: JSEvents.findEventTarget(target),
- allowsDeferredCalls: isInternetExplorer ? false : true, // MSIE doesn't allow fullscreen and pointerlock requests from key handlers, others do.
+ allowsDeferredCalls: JSEvents.isInternetExplorer() ? false : true, // MSIE doesn't allow fullscreen and pointerlock requests from key handlers, others do.
eventTypeString: eventTypeString,
callbackfunc: callbackfunc,
handlerFunc: handlerFunc,
@@ -199,10 +210,12 @@ var LibraryJSEvents = {
{{{ makeSetValue('eventStruct', C_STRUCTS.EmscriptenMouseEvent.metaKey, 'e.metaKey', 'i32') }}};
{{{ makeSetValue('eventStruct', C_STRUCTS.EmscriptenMouseEvent.button, 'e.button', 'i16') }}};
{{{ makeSetValue('eventStruct', C_STRUCTS.EmscriptenMouseEvent.buttons, 'e.buttons', 'i16') }}};
- {{{ makeSetValue('eventStruct', C_STRUCTS.EmscriptenMouseEvent.movementX, 'e.movementX || e.mozMovementX || e.webkitMovementX', 'i32') }}};
- {{{ makeSetValue('eventStruct', C_STRUCTS.EmscriptenMouseEvent.movementY, 'e.movementY || e.mozMovementY || e.webkitMovementY', 'i32') }}};
+ {{{ makeSetValue('eventStruct', C_STRUCTS.EmscriptenMouseEvent.movementX, 'e["movementX"] || e["mozMovementX"] || e["webkitMovementX"] || (e.screenX-JSEvents.previousScreenX)', 'i32') }}};
+ {{{ makeSetValue('eventStruct', C_STRUCTS.EmscriptenMouseEvent.movementY, 'e["movementY"] || e["mozMovementY"] || e["webkitMovementY"] || (e.screenY-JSEvents.previousScreenY)', 'i32') }}};
{{{ makeSetValue('eventStruct', C_STRUCTS.EmscriptenMouseEvent.canvasX, 'e.clientX - rect.left', 'i32') }}};
{{{ makeSetValue('eventStruct', C_STRUCTS.EmscriptenMouseEvent.canvasY, 'e.clientY - rect.top', 'i32') }}};
+ JSEvents.previousScreenX = e.screenX;
+ JSEvents.previousScreenY = e.screenY;
},
registerMouseEventCallback: function(target, userData, useCapture, callbackfunc, eventTypeId, eventTypeString) {
@@ -226,6 +239,8 @@ var LibraryJSEvents = {
handlerFunc: handlerFunc,
useCapture: useCapture
};
+ // In IE, mousedown events don't either allow deferred calls to be run!
+ if (JSEvents.isInternetExplorer() && eventTypeString == 'mousedown') eventHandler.allowsDeferredCalls = false;
JSEvents.registerOrRemoveHandler(eventHandler);
},
@@ -233,13 +248,27 @@ var LibraryJSEvents = {
if (!JSEvents.wheelEvent) {
JSEvents.wheelEvent = _malloc( {{{ C_STRUCTS.EmscriptenWheelEvent.__size__ }}} );
}
- var handlerFunc = function(event) {
+ // The DOM Level 3 events spec event 'wheel'
+ var wheelHandlerFunc = function(event) {
var e = event || window.event;
JSEvents.fillMouseEventData(JSEvents.wheelEvent, e);
- {{{ makeSetValue('JSEvents.wheelEvent', C_STRUCTS.EmscriptenWheelEvent.deltaX, 'e.deltaX', 'double') }}};
- {{{ makeSetValue('JSEvents.wheelEvent', C_STRUCTS.EmscriptenWheelEvent.deltaY, 'e.deltaY', 'double') }}};
- {{{ makeSetValue('JSEvents.wheelEvent', C_STRUCTS.EmscriptenWheelEvent.deltaZ, 'e.deltaZ', 'double') }}};
- {{{ makeSetValue('JSEvents.wheelEvent', C_STRUCTS.EmscriptenWheelEvent.deltaMode, 'e.deltaMode', 'i32') }}};
+ {{{ makeSetValue('JSEvents.wheelEvent', C_STRUCTS.EmscriptenWheelEvent.deltaX, 'e["deltaX"]', 'double') }}};
+ {{{ makeSetValue('JSEvents.wheelEvent', C_STRUCTS.EmscriptenWheelEvent.deltaY, 'e["deltaY"]', 'double') }}};
+ {{{ makeSetValue('JSEvents.wheelEvent', C_STRUCTS.EmscriptenWheelEvent.deltaZ, 'e["deltaZ"]', 'double') }}};
+ {{{ makeSetValue('JSEvents.wheelEvent', C_STRUCTS.EmscriptenWheelEvent.deltaMode, 'e["deltaMode"]', 'i32') }}};
+ var shouldCancel = Runtime.dynCall('iiii', callbackfunc, [eventTypeId, JSEvents.wheelEvent, userData]);
+ if (shouldCancel) {
+ e.preventDefault();
+ }
+ };
+ // The 'mousewheel' event as implemented in Safari 6.0.5
+ var mouseWheelHandlerFunc = function(event) {
+ var e = event || window.event;
+ JSEvents.fillMouseEventData(JSEvents.wheelEvent, e);
+ {{{ makeSetValue('JSEvents.wheelEvent', C_STRUCTS.EmscriptenWheelEvent.deltaX, 'e["wheelDeltaX"]', 'double') }}};
+ {{{ makeSetValue('JSEvents.wheelEvent', C_STRUCTS.EmscriptenWheelEvent.deltaY, '-e["wheelDeltaY"] /* Invert to unify direction with the DOM Level 3 wheel event. */', 'double') }}};
+ {{{ makeSetValue('JSEvents.wheelEvent', C_STRUCTS.EmscriptenWheelEvent.deltaZ, '0 /* Not available */', 'double') }}};
+ {{{ makeSetValue('JSEvents.wheelEvent', C_STRUCTS.EmscriptenWheelEvent.deltaMode, '0 /* DOM_DELTA_PIXEL */', 'i32') }}};
var shouldCancel = Runtime.dynCall('iiii', callbackfunc, [eventTypeId, JSEvents.wheelEvent, userData]);
if (shouldCancel) {
e.preventDefault();
@@ -251,7 +280,7 @@ var LibraryJSEvents = {
allowsDeferredCalls: true,
eventTypeString: eventTypeString,
callbackfunc: callbackfunc,
- handlerFunc: handlerFunc,
+ handlerFunc: (eventTypeString == 'wheel') ? wheelHandlerFunc : mouseWheelHandlerFunc,
useCapture: useCapture
};
JSEvents.registerOrRemoveHandler(eventHandler);
@@ -484,10 +513,20 @@ var LibraryJSEvents = {
var isFullscreen = !!fullscreenElement;
{{{ makeSetValue('eventStruct', C_STRUCTS.EmscriptenFullscreenChangeEvent.isFullscreen, 'isFullscreen', 'i32') }}};
{{{ makeSetValue('eventStruct', C_STRUCTS.EmscriptenFullscreenChangeEvent.fullscreenEnabled, 'JSEvents.fullscreenEnabled()', 'i32') }}};
- var nodeName = JSEvents.getNodeNameForTarget(fullscreenElement);
- var id = (fullscreenElement && fullscreenElement.id) ? fullscreenElement.id : '';
+ // If transitioning to fullscreen, report info about the element that is now fullscreen.
+ // If transitioning to windowed mode, report info about the element that just was fullscreen.
+ var reportedElement = isFullscreen ? fullscreenElement : JSEvents.previousFullscreenElement;
+ var nodeName = JSEvents.getNodeNameForTarget(reportedElement);
+ var id = (reportedElement && reportedElement.id) ? reportedElement.id : '';
writeStringToMemory(nodeName, eventStruct + {{{ C_STRUCTS.EmscriptenFullscreenChangeEvent.nodeName }}} );
writeStringToMemory(id, eventStruct + {{{ C_STRUCTS.EmscriptenFullscreenChangeEvent.id }}} );
+ {{{ makeSetValue('eventStruct', C_STRUCTS.EmscriptenFullscreenChangeEvent.elementWidth, 'reportedElement ? reportedElement.clientWidth : 0', 'i32') }}};
+ {{{ makeSetValue('eventStruct', C_STRUCTS.EmscriptenFullscreenChangeEvent.elementHeight, 'reportedElement ? reportedElement.clientHeight : 0', 'i32') }}};
+ {{{ makeSetValue('eventStruct', C_STRUCTS.EmscriptenFullscreenChangeEvent.screenWidth, 'screen.width', 'i32') }}};
+ {{{ makeSetValue('eventStruct', C_STRUCTS.EmscriptenFullscreenChangeEvent.screenHeight, 'screen.height', 'i32') }}};
+ if (isFullscreen) {
+ JSEvents.previousFullscreenElement = fullscreenElement;
+ }
},
registerFullscreenChangeEventCallback: function(target, userData, useCapture, callbackfunc, eventTypeId, eventTypeString) {
@@ -904,8 +943,16 @@ var LibraryJSEvents = {
},
emscripten_set_wheel_callback: function(target, userData, useCapture, callbackfunc) {
- JSEvents.registerWheelEventCallback(target, userData, useCapture, callbackfunc, {{{ cDefine('EMSCRIPTEN_EVENT_WHEEL') }}}, "wheel");
- return {{{ cDefine('EMSCRIPTEN_RESULT_SUCCESS') }}};
+ target = JSEvents.findEventTarget(target);
+ if (typeof target.onwheel !== 'undefined') {
+ JSEvents.registerWheelEventCallback(target, userData, useCapture, callbackfunc, {{{ cDefine('EMSCRIPTEN_EVENT_WHEEL') }}}, "wheel");
+ return {{{ cDefine('EMSCRIPTEN_RESULT_SUCCESS') }}};
+ } else if (typeof target.onmousewheel !== 'undefined') {
+ JSEvents.registerWheelEventCallback(target, userData, useCapture, callbackfunc, {{{ cDefine('EMSCRIPTEN_EVENT_WHEEL') }}}, "mousewheel");
+ return {{{ cDefine('EMSCRIPTEN_RESULT_SUCCESS') }}};
+ } else {
+ return {{{ cDefine('EMSCRIPTEN_RESULT_NOT_SUPPORTED') }}};
+ }
},
emscripten_set_resize_callback: function(target, userData, useCapture, callbackfunc) {
diff --git a/src/library_openal.js b/src/library_openal.js
index ac49fe95..58b11607 100644
--- a/src/library_openal.js
+++ b/src/library_openal.js
@@ -58,9 +58,21 @@ var LibraryOpenAL = {
entry.src = AL.currentContext.ctx.createBufferSource();
entry.src.buffer = entry.buffer;
entry.src.connect(src.gain);
- entry.src.start(startTime, offset);
-
+ if (typeof(entry.src.start) !== 'undefined') {
+ entry.src.start(startTime, offset);
+ } else if (typeof(entry.src.noteOn) !== 'undefined') {
+ entry.src.noteOn(startTime);
#if OPENAL_DEBUG
+ if (offset > 0) {
+ Runtime.warnOnce('The current browser does not support AudioBufferSourceNode.start(when, offset); method, so cannot play back audio with an offset '+offset+' secs! Audio glitches will occur!');
+ }
+#endif
+ }
+#if OPENAL_DEBUG
+ else {
+ Runtime.warnOnce('Unable to start AudioBufferSourceNode playback! Not supported by the browser?');
+ }
+
console.log('updateSource queuing buffer ' + i + ' for source ' + idx + ' at ' + startTime + ' (offset by ' + offset + ')');
#endif
}
@@ -174,15 +186,14 @@ var LibraryOpenAL = {
},
alcOpenDevice: function(deviceName) {
- if (typeof(AudioContext) == "function" ||
- typeof(webkitAudioContext) == "function") {
+ if (typeof(AudioContext) !== "undefined" ||
+ typeof(webkitAudioContext) !== "undefined") {
return 1; // non-null pointer -- we just simulate one device
} else {
return 0;
}
},
- alcCreateContext__deps: ['updateSources'],
alcCreateContext: function(device, attrList) {
if (device != 1) {
return 0;
@@ -205,6 +216,9 @@ var LibraryOpenAL = {
}
if (ctx) {
+ // Old Web Audio API (e.g. Safari 6.0.5) had an inconsistently named createGainNode function.
+ if (typeof(ctx.createGain) === 'undefined') ctx.createGain = ctx.createGainNode;
+
var gain = ctx.createGain();
gain.connect(ctx.destination);
var context = {
@@ -386,7 +400,6 @@ var LibraryOpenAL = {
}
},
- alSourcei__deps: ['updateSource'],
alSourcei: function(source, param, value) {
if (!AL.currentContext) {
#if OPENAL_DEBUG
@@ -558,7 +571,6 @@ var LibraryOpenAL = {
{{{ makeGetValue('value', '8', 'float') }}});
},
- alSourceQueueBuffers__deps: ["updateSource"],
alSourceQueueBuffers: function(source, count, buffers) {
if (!AL.currentContext) {
#if OPENAL_DEBUG
@@ -594,7 +606,6 @@ var LibraryOpenAL = {
AL.updateSource(src);
},
- alSourceUnqueueBuffers__deps: ["updateSource"],
alSourceUnqueueBuffers: function(source, count, buffers) {
if (!AL.currentContext) {
#if OPENAL_DEBUG
@@ -860,7 +871,6 @@ var LibraryOpenAL = {
AL.setSourceState(src, 0x1013 /* AL_PAUSED */);
},
- alGetSourcei__deps: ['updateSource'],
alGetSourcei: function(source, param, value) {
if (!AL.currentContext) {
#if OPENAL_DEBUG
@@ -1288,16 +1298,16 @@ var LibraryOpenAL = {
ret = 'Out of Memory';
break;
case 0x1004 /* ALC_DEFAULT_DEVICE_SPECIFIER */:
- if (typeof(AudioContext) == "function" ||
- typeof(webkitAudioContext) == "function") {
+ if (typeof(AudioContext) !== "undefined" ||
+ typeof(webkitAudioContext) !== "undefined") {
ret = 'Device';
} else {
return 0;
}
break;
case 0x1005 /* ALC_DEVICE_SPECIFIER */:
- if (typeof(AudioContext) == "function" ||
- typeof(webkitAudioContext) == "function") {
+ if (typeof(AudioContext) !== "undefined" ||
+ typeof(webkitAudioContext) !== "undefined") {
ret = 'Device\0';
} else {
ret = '\0';
diff --git a/src/library_sdl.js b/src/library_sdl.js
index cadc3aee..6e235e90 100644
--- a/src/library_sdl.js
+++ b/src/library_sdl.js
@@ -10,7 +10,7 @@
// or otherwise).
var LibrarySDL = {
- $SDL__deps: ['$FS', '$PATH', '$Browser'],
+ $SDL__deps: ['$FS', '$PATH', '$Browser', 'SDL_GetTicks'],
$SDL: {
defaults: {
width: 320,
@@ -82,22 +82,31 @@ var LibrarySDL = {
DOMEventToSDLEvent: {},
+ TOUCH_DEFAULT_ID: 0, // Our default deviceID for touch events (we get nothing from the browser)
+
keyCodes: { // DOM code ==> SDL code. See https://developer.mozilla.org/en/Document_Object_Model_%28DOM%29/KeyboardEvent and SDL_keycode.h
+ // For keys that don't have unicode value, we map DOM codes with the corresponding scan codes + 1024 (using "| 1 << 10")
+ 16: 225 | 1<<10, // shift
+ 17: 224 | 1<<10, // control (right, or left)
+ 18: 226 | 1<<10, // alt
+ 20: 57 | 1<<10, // caps lock
+
+ 33: 75 | 1<<10, // pagedup
+ 34: 78 | 1<<10, // pagedown
+ 35: 77 | 1<<10, // end
+ 36: 74 | 1<<10, // home
+ 37: 80 | 1<<10, // left arrow
+ 38: 82 | 1<<10, // up arrow
+ 39: 79 | 1<<10, // right arrow
+ 40: 81 | 1<<10, // down arrow
+ 44: 316, // print screen
+ 45: 73 | 1<<10, // insert
46: 127, // SDLK_DEL == '\177'
- 38: 1106, // up arrow
- 40: 1105, // down arrow
- 37: 1104, // left arrow
- 39: 1103, // right arrow
-
- 33: 1099, // pagedup
- 34: 1102, // pagedown
-
- 17: 1248, // control (right, or left)
- 18: 1250, // alt
- 173: 45, // minus
- 16: 1249, // shift
- 96: 88 | 1<<10, // keypad 0
+ 91: 227 | 1<<10, // windows key or super key on linux (doesn't work on Mac)
+ 93: 101 | 1<<10, // application
+
+ 96: 98 | 1<<10, // keypad 0
97: 89 | 1<<10, // keypad 1
98: 90 | 1<<10, // keypad 2
99: 91 | 1<<10, // keypad 3
@@ -107,7 +116,11 @@ var LibrarySDL = {
103: 95 | 1<<10, // keypad 7
104: 96 | 1<<10, // keypad 8
105: 97 | 1<<10, // keypad 9
-
+ 106: 85 | 1<<10, // keypad multiply
+ 107: 87 | 1<<10, // keypad plus
+ 109: 86 | 1<<10, // keypad minus
+ 110: 99 | 1<<10, // keypad decimal point
+ 111: 84 | 1<<10, // keypad divide
112: 58 | 1<<10, // F1
113: 59 | 1<<10, // F2
114: 60 | 1<<10, // F3
@@ -119,67 +132,121 @@ var LibrarySDL = {
120: 66 | 1<<10, // F9
121: 67 | 1<<10, // F10
122: 68 | 1<<10, // F11
- 123: 69 | 1<<10, // F12
-
+ 123: 69 | 1<<10, // F12
+ 124: 104 | 1<<10, // F13
+ 125: 105 | 1<<10, // F14
+ 126: 106 | 1<<10, // F15
+ 127: 107 | 1<<10, // F16
+ 128: 108 | 1<<10, // F17
+ 129: 109 | 1<<10, // F18
+ 130: 110 | 1<<10, // F19
+ 131: 111 | 1<<10, // F20
+ 132: 112 | 1<<10, // F21
+ 133: 113 | 1<<10, // F22
+ 134: 114 | 1<<10, // F23
+ 135: 115 | 1<<10, // F24
+
+ 144: 83 | 1<<10, // keypad num lock
+
+ 160: 94, // caret
+ 161: 33, // exclaim
+ 162: 34, // double quote
+ 163: 35, // hash
+ 164: 36, // dollar
+ 165: 37, // percent
+ 166: 38, // ampersand
+ 167: 95, // underscore
+ 168: 40, // open parenthesis
+ 169: 41, // close parenthesis
+ 170: 42, // asterix
+ 171: 43, // plus
+ 172: 124, // pipe
+ 173: 45, // minus
+ 174: 123, // open curly bracket
+ 175: 125, // close curly bracket
+ 176: 126, // tilde
+
+ 181: 127, // audio mute
+ 182: 129, // audio volume down
+ 183: 128, // audio volume up
+
188: 44, // comma
190: 46, // period
191: 47, // slash (/)
192: 96, // backtick/backquote (`)
+ 219: 91, // open square bracket
+ 220: 92, // back slash
+ 221: 93, // close square bracket
+ 222: 39, // quote
},
scanCodes: { // SDL keycode ==> SDL scancode. See SDL_scancode.h
+ 8: 42, // backspace
+ 9: 43, // tab
+ 13: 40, // return
+ 27: 41, // escape
+ 32: 44, // space
+ 35: 204, // hash
+
+ 39: 53, // grave
+
+ 44: 54, // comma
+ 46: 55, // period
+ 47: 56, // slash
+ 48: 39, // 0
+ 49: 30, // 1
+ 50: 31, // 2
+ 51: 32, // 3
+ 52: 33, // 4
+ 53: 34, // 5
+ 54: 35, // 6
+ 55: 36, // 7
+ 56: 37, // 8
+ 57: 38, // 9
+ 58: 203, // colon
+ 59: 51, // semicolon
+
+ 61: 46, // equals
+
+ 91: 47, // left bracket
+ 92: 49, // backslash
+ 93: 48, // right bracket
+
+ 96: 52, // apostrophe
97: 4, // A
- 98: 5,
- 99: 6,
- 100: 7,
- 101: 8,
- 102: 9,
- 103: 10,
- 104: 11,
- 105: 12,
- 106: 13,
- 107: 14,
- 108: 15,
- 109: 16,
- 110: 17,
- 111: 18,
- 112: 19,
- 113: 20,
- 114: 21,
- 115: 22,
- 116: 23,
- 117: 24,
- 118: 25,
- 119: 26,
- 120: 27,
- 121: 28,
+ 98: 5, // B
+ 99: 6, // C
+ 100: 7, // D
+ 101: 8, // E
+ 102: 9, // F
+ 103: 10, // G
+ 104: 11, // H
+ 105: 12, // I
+ 106: 13, // J
+ 107: 14, // K
+ 108: 15, // L
+ 109: 16, // M
+ 110: 17, // N
+ 111: 18, // O
+ 112: 19, // P
+ 113: 20, // Q
+ 114: 21, // R
+ 115: 22, // S
+ 116: 23, // T
+ 117: 24, // U
+ 118: 25, // V
+ 119: 26, // W
+ 120: 27, // X
+ 121: 28, // Y
122: 29, // Z
- 49: 30, // 1
- 50: 31,
- 51: 32,
- 52: 33,
- 53: 34,
- 54: 35,
- 55: 36,
- 56: 37,
- 57: 38, // 9
- 48: 39, // 0
- 13: 40, // return
- 27: 41, // escape
- 8: 42, // backspace
- 9: 43, // tab
- 32: 44, // space
- 61: 46, // equals
- 91: 47, // left bracket
- 93: 48, // right bracket
- 92: 49, // backslash
- 59: 51, // ;
- 96: 52, // apostrophe
- 44: 54, // comma
- 46: 55, // period
- 47: 56, // slash
+
+ 127: 76, // delete
+
305: 224, // ctrl
+
308: 226, // alt
+
+ 316: 70, // print screen
},
loadRect: function(rect) {
return {
@@ -346,52 +413,110 @@ var LibrarySDL = {
_free(info.pixelFormat);
_free(surf);
SDL.surfaces[surf] = null;
+
+ if (surf === SDL.screen) {
+ SDL.screen = null;
+ }
},
- touchX: 0, touchY: 0,
+ // the browser sends out touchstart events with the whole group of touches
+ // even if we received a previous touchstart for a specific touch identifier.
+ // You can test this by pressing one finger to the screen, then another. You'll
+ // receive two touchstart events, the first with a touches count of 1 the second
+ // with a touches count of two.
+ // SDL sends out a new touchstart event for only each newly started touch so to
+ // emulate this, we keep track of previously started touches.
+ downFingers: {},
savedKeydown: null,
receiveEvent: function(event) {
switch(event.type) {
- case 'touchstart':
+ case 'touchstart': case 'touchmove': {
event.preventDefault();
- var touch = event.touches[0];
- touchX = touch.pageX;
- touchY = touch.pageY;
- var event = {
- type: 'mousedown',
+
+ var touches = [];
+
+ // Clear out any touchstart events that we've already processed
+ if (event.type === 'touchstart') {
+ for (var i = 0; i < event.touches.length; i++) {
+ var touch = event.touches[i];
+ if (SDL.downFingers[touch.identifier] != true) {
+ SDL.downFingers[touch.identifier] = true;
+ touches.push(touch);
+ }
+ }
+ } else {
+ touches = event.touches;
+ }
+
+ var firstTouch = touches[0];
+ if (event.type == 'touchstart') {
+ SDL.DOMButtons[0] = 1;
+ }
+ var mouseEventType;
+ switch(event.type) {
+ case 'touchstart': mouseEventType = 'mousedown'; break;
+ case 'touchmove': mouseEventType = 'mousemove'; break;
+ }
+ var mouseEvent = {
+ type: mouseEventType,
button: 0,
- pageX: touchX,
- pageY: touchY
+ pageX: firstTouch.clientX,
+ pageY: firstTouch.clientY
};
- SDL.DOMButtons[0] = 1;
- SDL.events.push(event);
- break;
- case 'touchmove':
- event.preventDefault();
- var touch = event.touches[0];
- touchX = touch.pageX;
- touchY = touch.pageY;
- event = {
- type: 'mousemove',
- button: 0,
- pageX: touchX,
- pageY: touchY
+ SDL.events.push(mouseEvent);
+
+ for (var i = 0; i < touches.length; i++) {
+ var touch = touches[i];
+ SDL.events.push({
+ type: event.type,
+ touch: touch
+ });
};
- SDL.events.push(event);
break;
- case 'touchend':
+ }
+ case 'touchend': {
event.preventDefault();
- event = {
+
+ // Remove the entry in the SDL.downFingers hash
+ // because the finger is no longer down.
+ for(var i = 0; i < event.changedTouches.length; i++) {
+ var touch = event.changedTouches[i];
+ if (SDL.downFingers[touch.identifier] === true) {
+ delete SDL.downFingers[touch.identifier];
+ }
+ }
+
+ var mouseEvent = {
type: 'mouseup',
button: 0,
- pageX: touchX,
- pageY: touchY
+ pageX: event.changedTouches[0].clientX,
+ pageY: event.changedTouches[0].clientY
};
SDL.DOMButtons[0] = 0;
- SDL.events.push(event);
+ SDL.events.push(mouseEvent);
+
+ for (var i = 0; i < event.changedTouches.length; i++) {
+ var touch = event.changedTouches[i];
+ SDL.events.push({
+ type: 'touchend',
+ touch: touch
+ });
+ };
break;
+ }
case 'mousemove':
+ if (SDL.DOMButtons[0] === 1) {
+ SDL.events.push({
+ type: 'touchmove',
+ touch: {
+ identifier: 0,
+ deviceID: {{{ cDefine('SDL_TOUCH_MOUSEID') }}},
+ pageX: event.pageX,
+ pageY: event.pageY
+ }
+ });
+ }
if (Browser.pointerLock) {
// workaround for firefox bug 750111
if ('mozMovementX' in event) {
@@ -433,6 +558,15 @@ var LibrarySDL = {
};
} else if (event.type == 'mousedown') {
SDL.DOMButtons[event.button] = 1;
+ SDL.events.push({
+ type: 'touchstart',
+ touch: {
+ identifier: 0,
+ deviceID: {{{ cDefine('SDL_TOUCH_MOUSEID') }}},
+ pageX: event.pageX,
+ pageY: event.pageY
+ }
+ });
} else if (event.type == 'mouseup') {
// ignore extra ups, can happen if we leave the canvas while pressing down, then return,
// since we add a mouseup in that case
@@ -440,6 +574,15 @@ var LibrarySDL = {
return;
}
+ SDL.events.push({
+ type: 'touchend',
+ touch: {
+ identifier: 0,
+ deviceID: {{{ cDefine('SDL_TOUCH_MOUSEID') }}},
+ pageX: event.pageX,
+ pageY: event.pageY
+ }
+ });
SDL.DOMButtons[event.button] = 0;
}
@@ -450,9 +593,9 @@ var LibrarySDL = {
// keyup. This isn't perfect, but it enables SDL_WM_ToggleFullScreen
// to work as the result of a keypress (which is an extremely
// common use case).
- if (event.type === 'keydown') {
+ if (event.type === 'keydown' || event.type === 'mousedown') {
SDL.canRequestFullscreen = true;
- } else if (event.type === 'keyup') {
+ } else if (event.type === 'keyup' || event.type === 'mouseup') {
if (SDL.isRequestingFullscreen) {
Module['requestFullScreen'](true, true);
SDL.isRequestingFullscreen = false;
@@ -531,6 +674,10 @@ var LibrarySDL = {
event.handled = true;
switch (event.type) {
+ case 'touchstart': case 'touchend': case 'touchmove': {
+ Browser.calculateMouseEvent(event);
+ break;
+ }
case 'keydown': case 'keyup': {
var down = event.type === 'keydown';
var code = event.keyCode;
@@ -539,8 +686,11 @@ var LibrarySDL = {
} else {
code = SDL.keyCodes[event.keyCode] || event.keyCode;
}
+
+ var scan = code & ~(1 << 10);
+ scan = SDL.scanCodes[scan] || scan;
- {{{ makeSetValue('SDL.keyboardState', 'code', 'down', 'i8') }}};
+ {{{ makeSetValue('SDL.keyboardState', 'scan', 'down', 'i8') }}};
// TODO: lmeta, rmeta, numlock, capslock, KMOD_MODE, KMOD_RESERVED
SDL.modState = ({{{ makeGetValue('SDL.keyboardState', '1248', 'i8') }}} ? 0x0040 | 0x0080 : 0) | // KMOD_LCTRL & KMOD_RCTRL
({{{ makeGetValue('SDL.keyboardState', '1249', 'i8') }}} ? 0x0001 | 0x0002 : 0) | // KMOD_LSHIFT & KMOD_RSHIFT
@@ -621,13 +771,19 @@ var LibrarySDL = {
if (event.type != 'mousemove') {
var down = event.type === 'mousedown';
{{{ makeSetValue('ptr', C_STRUCTS.SDL_MouseButtonEvent.type, 'SDL.DOMEventToSDLEvent[event.type]', 'i32') }}};
+ {{{ makeSetValue('ptr', C_STRUCTS.SDL_MouseButtonEvent.timestamp, '0', 'i32') }}};
+ {{{ makeSetValue('ptr', C_STRUCTS.SDL_MouseButtonEvent.windowID, '0', 'i32') }}};
+ {{{ makeSetValue('ptr', C_STRUCTS.SDL_MouseButtonEvent.which, '0', 'i32') }}};
{{{ makeSetValue('ptr', C_STRUCTS.SDL_MouseButtonEvent.button, 'event.button+1', 'i8') }}}; // DOM buttons are 0-2, SDL 1-3
{{{ makeSetValue('ptr', C_STRUCTS.SDL_MouseButtonEvent.state, 'down ? 1 : 0', 'i8') }}};
{{{ makeSetValue('ptr', C_STRUCTS.SDL_MouseButtonEvent.x, 'Browser.mouseX', 'i32') }}};
{{{ makeSetValue('ptr', C_STRUCTS.SDL_MouseButtonEvent.y, 'Browser.mouseY', 'i32') }}};
} else {
{{{ makeSetValue('ptr', C_STRUCTS.SDL_MouseMotionEvent.type, 'SDL.DOMEventToSDLEvent[event.type]', 'i32') }}};
- {{{ makeSetValue('ptr', C_STRUCTS.SDL_MouseMotionEvent.state, 'SDL.buttonState', 'i8') }}};
+ {{{ makeSetValue('ptr', C_STRUCTS.SDL_MouseMotionEvent.timestamp, '0', 'i32') }}};
+ {{{ makeSetValue('ptr', C_STRUCTS.SDL_MouseMotionEvent.windowID, '0', 'i32') }}};
+ {{{ makeSetValue('ptr', C_STRUCTS.SDL_MouseMotionEvent.which, '0', 'i32') }}};
+ {{{ makeSetValue('ptr', C_STRUCTS.SDL_MouseMotionEvent.state, 'SDL.buttonState', 'i32') }}};
{{{ makeSetValue('ptr', C_STRUCTS.SDL_MouseMotionEvent.x, 'Browser.mouseX', 'i32') }}};
{{{ makeSetValue('ptr', C_STRUCTS.SDL_MouseMotionEvent.y, 'Browser.mouseY', 'i32') }}};
{{{ makeSetValue('ptr', C_STRUCTS.SDL_MouseMotionEvent.xrel, 'Browser.mouseMovementX', 'i32') }}};
@@ -635,6 +791,33 @@ var LibrarySDL = {
}
break;
}
+ case 'touchstart': case 'touchend': case 'touchmove': {
+ var touch = event.touch;
+ var w = Module['canvas'].width;
+ var h = Module['canvas'].height;
+ var x = Browser.touches[touch.identifier].x / w;
+ var y = Browser.touches[touch.identifier].y / h;
+ var lx = Browser.lastTouches[touch.identifier].x / w;
+ var ly = Browser.lastTouches[touch.identifier].y / h;
+ var dx = x - lx;
+ var dy = y - ly;
+ if (touch['deviceID'] === undefined) touch.deviceID = SDL.TOUCH_DEFAULT_ID;
+ if (dx === 0 && dy === 0 && event.type === 'touchmove') return; // don't send these if nothing happened
+ {{{ makeSetValue('ptr', C_STRUCTS.SDL_TouchFingerEvent.type, 'SDL.DOMEventToSDLEvent[event.type]', 'i32') }}};
+ {{{ makeSetValue('ptr', C_STRUCTS.SDL_TouchFingerEvent.timestamp, '_SDL_GetTicks()', 'i32') }}};
+ {{{ makeSetValue('ptr', C_STRUCTS.SDL_TouchFingerEvent.touchId, 'touch.deviceID', 'i64') }}};
+ {{{ makeSetValue('ptr', C_STRUCTS.SDL_TouchFingerEvent.fingerId, 'touch.identifier', 'i64') }}};
+ {{{ makeSetValue('ptr', C_STRUCTS.SDL_TouchFingerEvent.x, 'x', 'float') }}};
+ {{{ makeSetValue('ptr', C_STRUCTS.SDL_TouchFingerEvent.y, 'y', 'float') }}};
+ {{{ makeSetValue('ptr', C_STRUCTS.SDL_TouchFingerEvent.dx, 'dx', 'float') }}};
+ {{{ makeSetValue('ptr', C_STRUCTS.SDL_TouchFingerEvent.dy, 'dy', 'float') }}};
+ if (touch.force !== undefined) {
+ {{{ makeSetValue('ptr', C_STRUCTS.SDL_TouchFingerEvent.pressure, 'touch.force', 'float') }}};
+ } else { // No pressure data, send a digital 0/1 pressure.
+ {{{ makeSetValue('ptr', C_STRUCTS.SDL_TouchFingerEvent.pressure, 'event.type == "touchend" ? 0 : 1', 'float') }}};
+ }
+ break;
+ }
case 'unload': {
{{{ makeSetValue('ptr', C_STRUCTS.SDL_KeyboardEvent.type, 'SDL.DOMEventToSDLEvent[event.type]', 'i32') }}};
break;
@@ -879,14 +1062,17 @@ var LibrarySDL = {
SDL.keyboardState = _malloc(0x10000); // Our SDL needs 512, but 64K is safe for older SDLs
_memset(SDL.keyboardState, 0, 0x10000);
// Initialize this structure carefully for closure
- SDL.DOMEventToSDLEvent['keydown'] = 0x300 /* SDL_KEYDOWN */;
- SDL.DOMEventToSDLEvent['keyup'] = 0x301 /* SDL_KEYUP */;
- SDL.DOMEventToSDLEvent['keypress'] = 0x303 /* SDL_TEXTINPUT */;
- SDL.DOMEventToSDLEvent['mousedown'] = 0x401 /* SDL_MOUSEBUTTONDOWN */;
- SDL.DOMEventToSDLEvent['mouseup'] = 0x402 /* SDL_MOUSEBUTTONUP */;
- SDL.DOMEventToSDLEvent['mousemove'] = 0x400 /* SDL_MOUSEMOTION */;
- SDL.DOMEventToSDLEvent['unload'] = 0x100 /* SDL_QUIT */;
- SDL.DOMEventToSDLEvent['resize'] = 0x7001 /* SDL_VIDEORESIZE/SDL_EVENT_COMPAT2 */;
+ SDL.DOMEventToSDLEvent['keydown'] = 0x300 /* SDL_KEYDOWN */;
+ SDL.DOMEventToSDLEvent['keyup'] = 0x301 /* SDL_KEYUP */;
+ SDL.DOMEventToSDLEvent['keypress'] = 0x303 /* SDL_TEXTINPUT */;
+ SDL.DOMEventToSDLEvent['mousedown'] = 0x401 /* SDL_MOUSEBUTTONDOWN */;
+ SDL.DOMEventToSDLEvent['mouseup'] = 0x402 /* SDL_MOUSEBUTTONUP */;
+ SDL.DOMEventToSDLEvent['mousemove'] = 0x400 /* SDL_MOUSEMOTION */;
+ SDL.DOMEventToSDLEvent['touchstart'] = 0x700 /* SDL_FINGERDOWN */;
+ SDL.DOMEventToSDLEvent['touchend'] = 0x701 /* SDL_FINGERUP */;
+ SDL.DOMEventToSDLEvent['touchmove'] = 0x702 /* SDL_FINGERMOTION */;
+ SDL.DOMEventToSDLEvent['unload'] = 0x100 /* SDL_QUIT */;
+ SDL.DOMEventToSDLEvent['resize'] = 0x7001 /* SDL_VIDEORESIZE/SDL_EVENT_COMPAT2 */;
// These are not technically DOM events; the HTML gamepad API is poll-based.
// However, we define them here, as the rest of the SDL code assumes that
// all SDL events originate as DOM events.
@@ -956,7 +1142,7 @@ var LibrarySDL = {
},
SDL_SetVideoMode: function(width, height, depth, flags) {
- ['mousedown', 'mouseup', 'mousemove', 'DOMMouseScroll', 'mousewheel', 'mouseout'].forEach(function(event) {
+ ['touchstart', 'touchend', 'touchmove', 'mousedown', 'mouseup', 'mousemove', 'DOMMouseScroll', 'mousewheel', 'mouseout'].forEach(function(event) {
Module['canvas'].addEventListener(event, SDL.receiveEvent, true);
});
@@ -971,7 +1157,7 @@ var LibrarySDL = {
// Free the old surface first.
if (SDL.screen) {
SDL.freeSurface(SDL.screen);
- SDL.screen = null;
+ assert(!SDL.screen);
}
SDL.screen = SDL.makeSurface(width, height, flags, true, 'screen');
if (!SDL.addedResizeListener) {
@@ -1304,7 +1490,7 @@ var LibrarySDL = {
dstData.ctx.globalAlpha = oldAlpha;
if (dst != SDL.screen) {
// XXX As in IMG_Load, for compatibility we write out |pixels|
- console.log('WARNING: copying canvas data to memory for compatibility');
+ Runtime.warnOnce('WARNING: copying canvas data to memory for compatibility');
_SDL_LockSurface(dst);
dstData.locked--; // The surface is not actually locked in this hack
}
@@ -1407,20 +1593,28 @@ var LibrarySDL = {
return 0;
},
- SDL_PeepEvents: function(events, numEvents, action, from, to) {
+ SDL_PeepEvents: function(events, requestedEventCount, action, from, to) {
switch(action) {
case 2: { // SDL_GETEVENT
- assert(numEvents == 1);
- var got = 0;
- while (SDL.events.length > 0 && numEvents > 0) {
- var type = SDL.DOMEventToSDLEvent[SDL.events[0].type];
- if (type < from || type > to) break;
- SDL.makeCEvent(SDL.events.shift(), events);
- got++;
- numEvents--;
- // events += sizeof(..)
+ // We only handle 1 event right now
+ assert(requestedEventCount == 1);
+
+ var index = 0;
+ var retrievedEventCount = 0;
+ // this should look through the entire queue until it has filled up the events
+ // array
+ while (index < SDL.events.length && retrievedEventCount < requestedEventCount) {
+ var event = SDL.events[index];
+ var type = SDL.DOMEventToSDLEvent[event.type];
+ if (from <= type && type <= to) {
+ SDL.makeCEvent(event, events);
+ SDL.events.splice(index, 1);
+ retrievedEventCount++;
+ } else {
+ index++;
+ }
}
- return got;
+ return retrievedEventCount;
}
default: throw 'SDL_PeepEvents does not yet support that action: ' + action;
}
@@ -1746,9 +1940,9 @@ var LibrarySDL = {
// Initialize Web Audio API if we haven't done so yet. Note: Only initialize Web Audio context ever once on the web page,
// since initializing multiple times fails on Chrome saying 'audio resources have been exhausted'.
if (!SDL.audioContext) {
- if (typeof(AudioContext) === 'function') {
+ if (typeof(AudioContext) !== 'undefined') {
SDL.audioContext = new AudioContext();
- } else if (typeof(webkitAudioContext) === 'function') {
+ } else if (typeof(webkitAudioContext) !== 'undefined') {
SDL.audioContext = new webkitAudioContext();
} else {
throw 'Web Audio API is not available!';
@@ -1791,7 +1985,12 @@ var LibrarySDL = {
}
#endif
var playtime = Math.max(curtime, SDL.audio.nextPlayTime);
- SDL.audio.soundSource[SDL.audio.nextSoundSource]['start'](playtime);
+ var ss = SDL.audio.soundSource[SDL.audio.nextSoundSource];
+ if (typeof ss['start'] !== 'undefined') {
+ ss['start'](playtime);
+ } else if (typeof ss['noteOn'] !== 'undefined') {
+ ss['noteOn'](playtime);
+ }
var buffer_duration = sizeSamplesPerChannel / SDL.audio.freq;
SDL.audio.nextPlayTime = playtime + buffer_duration;
// Timer will be scheduled before the buffer completed playing.
@@ -1864,7 +2063,7 @@ var LibrarySDL = {
} else if (!SDL.audio.timer && !SDL.audio.scriptProcessorNode) {
// If we are using the same sampling frequency as the native sampling rate of the Web Audio graph is using, we can feed our buffers via
// Web Audio ScriptProcessorNode, which is a pull-mode API that calls back to our code to get audio data.
- if (SDL.audioContext !== undefined && SDL.audio.freq == SDL.audioContext['sampleRate']) {
+ if (SDL.audioContext !== undefined && SDL.audio.freq == SDL.audioContext['sampleRate'] && typeof SDL.audioContext['createScriptProcessor'] !== 'undefined') {
var sizeSamplesPerChannel = SDL.audio.bufferSize / SDL.audio.bytesPerSample / SDL.audio.channels; // How many samples per a single channel fit in the cb buffer?
SDL.audio.scriptProcessorNode = SDL.audioContext['createScriptProcessor'](sizeSamplesPerChannel, 0, SDL.audio.channels);
SDL.audio.scriptProcessorNode['onaudioprocess'] = function (e) {
diff --git a/src/library_sockfs.js b/src/library_sockfs.js
index 22fd8761..23641464 100644
--- a/src/library_sockfs.js
+++ b/src/library_sockfs.js
@@ -133,12 +133,42 @@ mergeInto(LibraryManager.library, {
} else {
// create the actual websocket object and connect
try {
- var url = 'ws://' + addr + ':' + port;
+ // runtimeConfig gets set to true if WebSocket runtime configuration is available.
+ var runtimeConfig = (Module['websocket'] && ('object' === typeof Module['websocket']));
+
+ // The default value is 'ws://' the replace is needed because the compiler replaces "//" comments with '#'
+ // comments without checking context, so we'd end up with ws:#, the replace swaps the "#" for "//" again.
+ var url = '{{{ WEBSOCKET_URL }}}'.replace('#', '//');
+
+ if (runtimeConfig) {
+ if ('string' === typeof Module['websocket']['url']) {
+ url = Module['websocket']['url']; // Fetch runtime WebSocket URL config.
+ }
+ }
+
+ if (url === 'ws://' || url === 'wss://') { // Is the supplied URL config just a prefix, if so complete it.
+ url = url + addr + ':' + port;
+ }
+
+ // Make the WebSocket subprotocol (Sec-WebSocket-Protocol) default to binary if no configuration is set.
+ var subProtocols = '{{{ WEBSOCKET_SUBPROTOCOL }}}'; // The default value is 'binary'
+
+ if (runtimeConfig) {
+ if ('string' === typeof Module['websocket']['subprotocol']) {
+ subProtocols = Module['websocket']['subprotocol']; // Fetch runtime WebSocket subprotocol config.
+ }
+ }
+
+ // The regex trims the string (removes spaces at the beginning and end, then splits the string by
+ // <any space>,<any space> into an Array. Whitespace removal is important for Websockify and ws.
+ subProtocols = subProtocols.replace(/^ +| +$/g,"").split(/ *, */);
+
+ // The node ws library API for specifying optional subprotocol is slightly different than the browser's.
+ var opts = ENVIRONMENT_IS_NODE ? {'protocol': subProtocols.toString()} : subProtocols;
+
#if SOCKET_DEBUG
- console.log('connect: ' + url);
+ Module.print('connect: ' + url + ', ' + subProtocols.toString());
#endif
- // the node ws library API is slightly different than the browser's
- var opts = ENVIRONMENT_IS_NODE ? {headers: {'websocket-protocol': ['binary']}} : ['binary'];
// If node we use the ws library.
var WebSocket = ENVIRONMENT_IS_NODE ? require('ws') : window['WebSocket'];
ws = new WebSocket(url, opts);
diff --git a/src/modules.js b/src/modules.js
index 2d2a75d0..fd5c23cd 100644
--- a/src/modules.js
+++ b/src/modules.js
@@ -21,6 +21,7 @@ var LLVM = {
CONVERSIONS: set('inttoptr', 'ptrtoint', 'uitofp', 'sitofp', 'fptosi', 'fptoui', 'fpext', 'fptrunc'),
INTRINSICS_32: set('_llvm_memcpy_p0i8_p0i8_i64', '_llvm_memmove_p0i8_p0i8_i64', '_llvm_memset_p0i8_i64'), // intrinsics that need args converted to i32 in USE_TYPED_ARRAYS == 2
MATHOP_IGNORABLES: set('exact', 'nnan', 'ninf', 'nsz', 'arcp', 'fast'),
+ PARAM_IGNORABLES: set('nocapture', 'readonly', 'readnone'),
};
LLVM.GLOBAL_MODIFIERS = set(keys(LLVM.LINKAGES).concat(['constant', 'global', 'hidden']));
diff --git a/src/parseTools.js b/src/parseTools.js
index fe56580e..4396abd9 100644
--- a/src/parseTools.js
+++ b/src/parseTools.js
@@ -467,7 +467,7 @@ function parseParamTokens(params) {
// handle 'byval' and 'byval align X'. We store the alignment in 'byVal'
byVal = QUANTUM_SIZE;
segment.splice(1, 1);
- if (segment[1] && (segment[1].text === 'nocapture' || segment[1].text === 'readonly')) {
+ if (segment[1] && (segment[1].text in LLVM.PARAM_IGNORABLES)) {
segment.splice(1, 1);
}
if (segment[1] && segment[1].text === 'align') {
@@ -476,7 +476,7 @@ function parseParamTokens(params) {
segment.splice(1, 2);
}
}
- if (segment[1] && (segment[1].text === 'nocapture' || segment[1].text === 'readonly')) {
+ if (segment[1] && (segment[1].text in LLVM.PARAM_IGNORABLES)) {
segment.splice(1, 1);
}
if (segment.length == 1) {
@@ -1161,7 +1161,7 @@ function getHeapOffset(offset, type, forceAsm) {
if (Runtime.getNativeFieldSize(type) > 4) {
if (type == 'i64' || TARGET_X86) {
- type = 'i32'; // XXX we emulate 64-bit values as 32 in x86, and also in le32 but only i64, not double
+ type = 'i32'; // XXX we emulate 64-bit values as 32 in x86, and also in asmjs-unknown-emscripten but only i64, not double
}
}
@@ -1287,7 +1287,7 @@ function makeGetValue(ptr, pos, type, noNeedFirst, unsigned, ignore, align, noSa
return '{ ' + ret.join(', ') + ' }';
}
- // In double mode 1, in x86 we always assume unaligned because we can't trust that; otherwise in le32
+ // In double mode 1, in x86 we always assume unaligned because we can't trust that; otherwise in asmjs-unknown-emscripten
// we need this code path if we are not fully aligned.
if (DOUBLE_MODE == 1 && USE_TYPED_ARRAYS == 2 && type == 'double' && (TARGET_X86 || align < 8)) {
return '(' + makeSetTempDouble(0, 'i32', makeGetValue(ptr, pos, 'i32', noNeedFirst, unsigned, ignore, align, noSafe)) + ',' +
@@ -1826,7 +1826,7 @@ function makeGetSlabs(ptr, type, allowMultiple, unsigned) {
case '<4 x i32>':
case 'i32': case 'i64': return [unsigned ? 'HEAPU32' : 'HEAP32']; break;
case 'double': {
- if (TARGET_LE32) return ['HEAPF64']; // in le32, we do have the ability to assume 64-bit alignment
+ if (TARGET_ASMJS_UNKNOWN_EMSCRIPTEN) return ['HEAPF64']; // in asmjs-unknown-emscripten, we do have the ability to assume 64-bit alignment
// otherwise, fall through to float
}
case '<4 x float>':
diff --git a/src/postamble.js b/src/postamble.js
index bb1e334c..b90049bc 100644
--- a/src/postamble.js
+++ b/src/postamble.js
@@ -48,10 +48,6 @@ Module['callMain'] = Module.callMain = function callMain(args) {
args = args || [];
- if (ENVIRONMENT_IS_WEB && preloadStartTime !== null) {
- Module.printErr('preload time: ' + (Date.now() - preloadStartTime) + ' ms');
- }
-
ensureInitRuntime();
var argc = args.length+1;
@@ -130,6 +126,10 @@ function run(args) {
preMain();
+ if (ENVIRONMENT_IS_WEB && preloadStartTime !== null) {
+ Module.printErr('pre-main prep time: ' + (Date.now() - preloadStartTime) + ' ms');
+ }
+
if (Module['_main'] && shouldRunNow) {
Module['callMain'](args);
}
@@ -181,7 +181,13 @@ function abort(text) {
ABORT = true;
EXITSTATUS = 1;
- throw 'abort() at ' + stackTrace();
+#if ASSERTIONS == 0
+ var extra = '\nIf this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.';
+#else
+ var extra = '';
+#endif
+
+ throw 'abort() at ' + stackTrace() + extra;
}
Module['abort'] = Module.abort = abort;
diff --git a/src/preamble.js b/src/preamble.js
index 27a98422..89ab5026 100644
--- a/src/preamble.js
+++ b/src/preamble.js
@@ -187,23 +187,23 @@ function SAFE_HEAP_STORE(dest, value, bytes, isFloat) {
Module.print('SAFE_HEAP store: ' + [dest, value, bytes, isFloat]);
#endif
assert(dest > 0, 'segmentation fault');
- assert(dest % bytes === 0);
- assert(dest < Math.max(DYNAMICTOP, STATICTOP));
+ assert(dest % bytes === 0, 'alignment error');
+ assert(dest < Math.max(DYNAMICTOP, STATICTOP), 'segmentation fault (high)');
assert(DYNAMICTOP <= TOTAL_MEMORY);
setValue(dest, value, getSafeHeapType(bytes, isFloat), 1);
}
function SAFE_HEAP_LOAD(dest, bytes, isFloat, unsigned) {
-#if SAFE_HEAP_LOG
- Module.print('SAFE_HEAP load: ' + [dest, bytes, isFloat, unsigned]);
-#endif
assert(dest > 0, 'segmentation fault');
- assert(dest % bytes === 0);
- assert(dest < Math.max(DYNAMICTOP, STATICTOP));
+ assert(dest % bytes === 0, 'alignment error');
+ assert(dest < Math.max(DYNAMICTOP, STATICTOP), 'segmentation fault (high)');
assert(DYNAMICTOP <= TOTAL_MEMORY);
var type = getSafeHeapType(bytes, isFloat);
var ret = getValue(dest, type, 1);
if (unsigned) ret = unSign(ret, parseInt(type.substr(1)), 1);
+#if SAFE_HEAP_LOG
+ Module.print('SAFE_HEAP load: ' + [dest, ret, bytes, isFloat, unsigned]);
+#endif
return ret;
}
@@ -805,7 +805,14 @@ function demangle(func) {
}
}
if (!allowVoid && list.length === 1 && list[0] === 'void') list = []; // avoid (void)
- return rawList ? list : ret + flushList();
+ if (rawList) {
+ if (ret) {
+ list.push(ret + '?');
+ }
+ return list;
+ } else {
+ return ret + flushList();
+ }
}
try {
// Special-case the entry point, since its name differs from other name mangling.
diff --git a/src/relooper/README.markdown b/src/relooper/README.markdown
deleted file mode 100644
index 9b0187b3..00000000
--- a/src/relooper/README.markdown
+++ /dev/null
@@ -1,14 +0,0 @@
-
-Relooper
-========
-
-This is an optimized C++ implemention of the Relooper algorithm originally
-developed as part of Emscripten. This implementation includes optimizations
-added since the original academic paper [1] - see paper.pdf - was published
-about it, and is written in an LLVM-friendly way with the goal of inclusion
-in upstream LLVM.
-
-License: MIT&LLVM
-
-[1] Alon Zakai. 2011. Emscripten: an LLVM-to-JavaScript compiler. In Proceedings of the ACM international conference companion on Object oriented programming systems languages and applications companion (SPLASH '11). ACM, New York, NY, USA, 301-312. DOI=10.1145/2048147.2048224 http://doi.acm.org/10.1145/2048147.2048224
-
diff --git a/src/relooper/README.md b/src/relooper/README.md
new file mode 100644
index 00000000..a4073a77
--- /dev/null
+++ b/src/relooper/README.md
@@ -0,0 +1,12 @@
+Relooper
+========
+
+This is an optimized C++ implemention of the Relooper algorithm originally developed as part
+of Emscripten. This implementation includes optimizations added since the original academic
+paper [1] - see paper.pdf - was published about it, and is written in an LLVM-friendly way
+with the goal of inclusion in upstream LLVM.
+
+[1] Alon Zakai. 2011. Emscripten: an LLVM-to-JavaScript compiler. In Proceedings of the ACM
+international conference companion on Object oriented programming systems languages and
+applications companion (SPLASH '11). ACM, New York, NY, USA, 301-312.
+DOI=10.1145/2048147.2048224 http://doi.acm.org/10.1145/2048147.2048224
diff --git a/src/relooper/Relooper.cpp b/src/relooper/Relooper.cpp
index 14c203e0..ce9232d9 100644
--- a/src/relooper/Relooper.cpp
+++ b/src/relooper/Relooper.cpp
@@ -17,8 +17,8 @@
typedef std::string ministring;
#endif
-template <class T, class U> bool contains(const T& container, const U& contained) {
- return container.find(contained) != container.end();
+template <class T, class U> static bool contains(const T& container, const U& contained) {
+ return container.count(contained);
}
#if DEBUG
@@ -122,7 +122,7 @@ void Branch::Render(Block *Target, bool SetLabel) {
if (Code) PrintIndented("%s\n", Code);
if (SetLabel) PrintIndented("label = %d;\n", Target->Id);
if (Ancestor) {
- if (Type != Direct) {
+ if (Type == Break || Type == Continue) {
if (Labeled) {
PrintIndented("%s L%d;\n", Type == Break ? "break" : "continue", Ancestor->Id);
} else {
@@ -243,7 +243,7 @@ void Block::Render(bool InLoop) {
Details = ProcessedBranchesOut[DefaultTarget];
}
bool SetCurrLabel = (SetLabel && Target->IsCheckedMultipleEntry) || ForceSetLabel;
- bool HasFusedContent = Fused && contains(Fused->InnerMap, Target);
+ bool HasFusedContent = Fused && contains(Fused->InnerMap, Target->Id);
bool HasContent = SetCurrLabel || Details->Type != Branch::Direct || HasFusedContent || Details->Code;
if (iter != ProcessedBranchesOut.end()) {
// If there is nothing to show in this branch, omit the condition
@@ -286,7 +286,12 @@ void Block::Render(bool InLoop) {
if (!First) Indenter::Indent();
Details->Render(Target, SetCurrLabel);
if (HasFusedContent) {
- Fused->InnerMap.find(Target)->second->Render(InLoop);
+ Fused->InnerMap.find(Target->Id)->second->Render(InLoop);
+ } else if (Details->Type == Branch::Nested) {
+ // Nest the parent content here, and remove it from showing up afterwards as Next
+ assert(Parent->Next);
+ Parent->Next->Render(InLoop);
+ Parent->Next = NULL;
}
if (useSwitch && iter != ProcessedBranchesOut.end()) {
PrintIndented("break;\n");
@@ -307,18 +312,28 @@ void Block::Render(bool InLoop) {
// MultipleShape
void MultipleShape::RenderLoopPrefix() {
- if (NeedLoop) {
- if (Labeled) {
- PrintIndented("L%d: do {\n", Id);
+ if (Breaks) {
+ if (UseSwitch) {
+ if (Labeled) {
+ PrintIndented("L%d: ", Id);
+ }
} else {
- PrintIndented("do {\n");
+ if (Labeled) {
+ if (UseSwitch) {
+ PrintIndented("L%d: ", Id);
+ } else {
+ PrintIndented("L%d: do {\n", Id);
+ }
+ } else {
+ PrintIndented("do {\n");
+ }
+ Indenter::Indent();
}
- Indenter::Indent();
}
}
void MultipleShape::RenderLoopPostfix() {
- if (NeedLoop) {
+ if (Breaks && !UseSwitch) {
Indenter::Unindent();
PrintIndented("} while(0);\n");
}
@@ -327,32 +342,41 @@ void MultipleShape::RenderLoopPostfix() {
void MultipleShape::Render(bool InLoop) {
RenderLoopPrefix();
- // We know that blocks with the same Id were split from the same source, so their contents are identical and they are logically the same, so re-merge them here
- typedef std::map<int, Shape*> IdShapeMap;
- IdShapeMap IdMap;
- for (BlockShapeMap::iterator iter = InnerMap.begin(); iter != InnerMap.end(); iter++) {
- int Id = iter->first->Id;
- IdShapeMap::iterator Test = IdMap.find(Id);
- if (Test != IdMap.end()) {
- assert(Shape::IsSimple(iter->second) && Shape::IsSimple(Test->second)); // we can only merge simple blocks, something horrible has gone wrong if we see anything else
- continue;
+ if (!UseSwitch) {
+ // emit an if-else chain
+ bool First = true;
+ for (IdShapeMap::iterator iter = InnerMap.begin(); iter != InnerMap.end(); iter++) {
+ if (AsmJS) {
+ PrintIndented("%sif ((label|0) == %d) {\n", First ? "" : "else ", iter->first);
+ } else {
+ PrintIndented("%sif (label == %d) {\n", First ? "" : "else ", iter->first);
+ }
+ First = false;
+ Indenter::Indent();
+ iter->second->Render(InLoop);
+ Indenter::Unindent();
+ PrintIndented("}\n");
}
- IdMap[iter->first->Id] = iter->second;
- }
-
- bool First = true;
- for (IdShapeMap::iterator iter = IdMap.begin(); iter != IdMap.end(); iter++) {
+ } else {
+ // emit a switch
if (AsmJS) {
- PrintIndented("%sif ((label|0) == %d) {\n", First ? "" : "else ", iter->first);
+ PrintIndented("switch (label|0) {\n");
} else {
- PrintIndented("%sif (label == %d) {\n", First ? "" : "else ", iter->first);
+ PrintIndented("switch (label) {\n");
}
- First = false;
Indenter::Indent();
- iter->second->Render(InLoop);
+ for (IdShapeMap::iterator iter = InnerMap.begin(); iter != InnerMap.end(); iter++) {
+ PrintIndented("case %d: {\n", iter->first);
+ Indenter::Indent();
+ iter->second->Render(InLoop);
+ PrintIndented("break;\n");
+ Indenter::Unindent();
+ PrintIndented("}\n");
+ }
Indenter::Unindent();
PrintIndented("}\n");
}
+
RenderLoopPostfix();
if (Next) Next->Render(InLoop);
}
@@ -542,7 +566,7 @@ void Relooper::Calculate(Block *Entry) {
PriorOut->Ancestor = Ancestor;
PriorOut->Type = Type;
if (MultipleShape *Multiple = Shape::IsMultiple(Ancestor)) {
- Multiple->NeedLoop++; // We are breaking out of this Multiple, so need a loop
+ Multiple->Breaks++; // We are breaking out of this Multiple, so need a loop
}
iter++; // carefully increment iter before erasing
Target->BranchesIn.erase(Prior);
@@ -650,7 +674,7 @@ void Relooper::Calculate(Block *Entry) {
Block *Curr = *iter;
for (BlockBranchMap::iterator iter = Curr->BranchesOut.begin(); iter != Curr->BranchesOut.end(); iter++) {
Block *Target = iter->first;
- if (Hoisted.find(Target) == Hoisted.end() && NextEntries.find(Target) == NextEntries.end()) {
+ if (!contains(Hoisted, Target) && !contains(NextEntries, Target)) {
// abort this hoisting
abort = true;
break;
@@ -848,7 +872,7 @@ void Relooper::Calculate(Block *Entry) {
iter = Next; // increment carefully because Solipsize can remove us
}
}
- Multiple->InnerMap[CurrEntry] = Process(CurrBlocks, CurrEntries, NULL);
+ Multiple->InnerMap[CurrEntry->Id] = Process(CurrBlocks, CurrEntries, NULL);
// If we are not fused, then our entries will actually be checked
if (!Fused) {
CurrEntry->IsCheckedMultipleEntry = true;
@@ -862,6 +886,11 @@ void Relooper::Calculate(Block *Entry) {
NextEntries.insert(Entry);
}
}
+ // The multiple has been created, we can decide how to implement it
+ if (Multiple->InnerMap.size() >= 10) {
+ Multiple->UseSwitch = true;
+ Multiple->Breaks++; // switch captures breaks
+ }
return Multiple;
}
@@ -1016,7 +1045,7 @@ void Relooper::Calculate(Block *Entry) {
PostOptimizer(Relooper *ParentInit) : Parent(ParentInit), Closure(NULL) {}
#define RECURSE_Multiple(shape, func) \
- for (BlockShapeMap::iterator iter = shape->InnerMap.begin(); iter != shape->InnerMap.end(); iter++) { \
+ for (IdShapeMap::iterator iter = shape->InnerMap.begin(); iter != shape->InnerMap.end(); iter++) { \
func(iter->second); \
}
#define RECURSE_Loop(shape, func) \
@@ -1037,7 +1066,7 @@ void Relooper::Calculate(Block *Entry) {
SHAPE_SWITCH(S, {
Out.insert(Simple->Inner);
}, {
- for (BlockShapeMap::iterator iter = Multiple->InnerMap.begin(); iter != Multiple->InnerMap.end(); iter++) {
+ for (IdShapeMap::iterator iter = Multiple->InnerMap.begin(); iter != Multiple->InnerMap.end(); iter++) {
FollowNaturalFlow(iter->second, Out);
}
FollowNaturalFlow(Multiple->Next, Out);
@@ -1056,7 +1085,7 @@ void Relooper::Calculate(Block *Entry) {
SHAPE_SWITCH(Root, {
}, {
- for (BlockShapeMap::iterator iter = Multiple->InnerMap.begin(); iter != Multiple->InnerMap.end(); iter++) {
+ for (IdShapeMap::iterator iter = Multiple->InnerMap.begin(); iter != Multiple->InnerMap.end(); iter++) {
FindNaturals(iter->second, Root->Natural);
}
}, {
@@ -1077,32 +1106,68 @@ void Relooper::Calculate(Block *Entry) {
SHAPE_SWITCH(Root, {
if (Simple->Inner->BranchVar) LastLoop = NULL; // a switch clears out the loop (TODO: only for breaks, not continue)
- // If there is a next block, we already know at Simple creation time to make direct branches,
- // and we can do nothing more. If there is no next however, then Natural is where we will
- // go to by doing nothing, so we can potentially optimize some branches to direct.
if (Simple->Next) {
+ if (!Simple->Inner->BranchVar && Simple->Inner->ProcessedBranchesOut.size() == 2) {
+ // If there is a next block, we already know at Simple creation time to make direct branches,
+ // and we can do nothing more in general. But, we try to optimize the case of a break and
+ // a direct: This would normally be if (break?) { break; } .. but if we
+ // make sure to nest the else, we can save the break, if (!break?) { .. } . This is also
+ // better because the more canonical nested form is easier to further optimize later. The
+ // downside is more nesting, which adds to size in builds with whitespace.
+ // Note that we avoid switches, as it complicates control flow and is not relevant
+ // for the common case we optimize here.
+ bool Found = false;
+ bool Abort = false;
+ for (BlockBranchMap::iterator iter = Simple->Inner->ProcessedBranchesOut.begin(); iter != Simple->Inner->ProcessedBranchesOut.end(); iter++) {
+ Block *Target = iter->first;
+ Branch *Details = iter->second;
+ if (Details->Type == Branch::Break) {
+ Found = true;
+ if (!contains(NaturalBlocks, Target)) Abort = true;
+ } else if (Details->Type != Branch::Direct) {
+ Abort = true;
+ }
+ }
+ if (Found && !Abort) {
+ for (BlockBranchMap::iterator iter = Simple->Inner->ProcessedBranchesOut.begin(); iter != Simple->Inner->ProcessedBranchesOut.end(); iter++) {
+ Block *Target = iter->first;
+ Branch *Details = iter->second;
+ if (Details->Type == Branch::Break) {
+ Details->Type = Branch::Direct;
+ if (MultipleShape *Multiple = Shape::IsMultiple(Details->Ancestor)) {
+ Multiple->Breaks--;
+ }
+ } else {
+ assert(Details->Type == Branch::Direct);
+ Details->Type = Branch::Nested;
+ }
+ }
+ }
+ }
Next = Simple->Next;
} else {
+ // If there is no next then Natural is where we will
+ // go to by doing nothing, so we can potentially optimize some branches to direct.
for (BlockBranchMap::iterator iter = Simple->Inner->ProcessedBranchesOut.begin(); iter != Simple->Inner->ProcessedBranchesOut.end(); iter++) {
Block *Target = iter->first;
Branch *Details = iter->second;
if (Details->Type != Branch::Direct && contains(NaturalBlocks, Target)) { // note: cannot handle split blocks
Details->Type = Branch::Direct;
if (MultipleShape *Multiple = Shape::IsMultiple(Details->Ancestor)) {
- Multiple->NeedLoop--;
+ Multiple->Breaks--;
}
} else if (Details->Type == Branch::Break && LastLoop && LastLoop->Natural == Details->Ancestor->Natural) {
// it is important to simplify breaks, as simpler breaks enable other optimizations
Details->Labeled = false;
if (MultipleShape *Multiple = Shape::IsMultiple(Details->Ancestor)) {
- Multiple->NeedLoop--;
+ Multiple->Breaks--;
}
}
}
}
}, {
- for (BlockShapeMap::iterator iter = Multiple->InnerMap.begin(); iter != Multiple->InnerMap.end(); iter++) {
- RemoveUnneededFlows(iter->second, Multiple->Next, Multiple->NeedLoop ? NULL : LastLoop);
+ for (IdShapeMap::iterator iter = Multiple->InnerMap.begin(); iter != Multiple->InnerMap.end(); iter++) {
+ RemoveUnneededFlows(iter->second, Multiple->Next, Multiple->Breaks ? NULL : LastLoop);
}
Next = Multiple->Next;
}, {
@@ -1128,19 +1193,22 @@ void Relooper::Calculate(Block *Entry) {
SHAPE_SWITCH(Root, {
MultipleShape *Fused = Shape::IsMultiple(Root->Next);
// If we are fusing a Multiple with a loop into this Simple, then visit it now
- if (Fused && Fused->NeedLoop) {
+ if (Fused && Fused->Breaks) {
LoopStack.push(Fused);
}
if (Simple->Inner->BranchVar) {
LoopStack.push(NULL); // a switch means breaks are now useless, push a dummy
}
if (Fused) {
+ if (Fused->UseSwitch) {
+ LoopStack.push(NULL); // a switch means breaks are now useless, push a dummy
+ }
RECURSE_Multiple(Fused, FindLabeledLoops);
}
for (BlockBranchMap::iterator iter = Simple->Inner->ProcessedBranchesOut.begin(); iter != Simple->Inner->ProcessedBranchesOut.end(); iter++) {
Block *Target = iter->first;
Branch *Details = iter->second;
- if (Details->Type != Branch::Direct) {
+ if (Details->Type == Branch::Break || Details->Type == Branch::Continue) {
assert(LoopStack.size() > 0);
if (Details->Ancestor != LoopStack.top() && Details->Labeled) {
LabeledShape *Labeled = Shape::IsLabeled(Details->Ancestor);
@@ -1150,10 +1218,13 @@ void Relooper::Calculate(Block *Entry) {
}
}
}
+ if (Fused && Fused->UseSwitch) {
+ LoopStack.pop();
+ }
if (Simple->Inner->BranchVar) {
LoopStack.pop();
}
- if (Fused && Fused->NeedLoop) {
+ if (Fused && Fused->Breaks) {
LoopStack.pop();
}
if (Fused) {
@@ -1162,11 +1233,11 @@ void Relooper::Calculate(Block *Entry) {
Next = Root->Next;
}
}, {
- if (Multiple->NeedLoop) {
+ if (Multiple->Breaks) {
LoopStack.push(Multiple);
}
RECURSE(Multiple, FindLabeledLoops);
- if (Multiple->NeedLoop) {
+ if (Multiple->Breaks) {
LoopStack.pop();
}
Next = Root->Next;
@@ -1249,8 +1320,8 @@ void Debugging::Dump(Shape *S, const char *prefix) {
printf("<< Simple with block %d\n", Simple->Inner->Id);
}, {
printf("<< Multiple\n");
- for (BlockShapeMap::iterator iter = Multiple->InnerMap.begin(); iter != Multiple->InnerMap.end(); iter++) {
- printf(" with entry %d\n", iter->first->Id);
+ for (IdShapeMap::iterator iter = Multiple->InnerMap.begin(); iter != Multiple->InnerMap.end(); iter++) {
+ printf(" with entry %d\n", iter->first);
}
}, {
printf("<< Loop\n");
diff --git a/src/relooper/Relooper.h b/src/relooper/Relooper.h
index 85adf359..c86e63ac 100644
--- a/src/relooper/Relooper.h
+++ b/src/relooper/Relooper.h
@@ -24,9 +24,11 @@ struct Shape;
// Info about a branching from one block to another
struct Branch {
enum FlowType {
- Direct = 0, // We will directly reach the right location through other means, no need for continue or break
+ Direct = 0, // We will directly reach the right location through other means, no need for continue or break
Break = 1,
- Continue = 2
+ Continue = 2,
+ Nested = 3 // This code is directly reached, but we must be careful to ensure it is nested in an if - it is not reached
+ // unconditionally, other code paths exist alongside it that we need to make sure do not intertwine
};
Shape *Ancestor; // If not NULL, this shape is the relevant one for purposes of getting to the target block. We break or continue on it
Branch::FlowType Type; // If Ancestor is not NULL, this says whether to break or continue
@@ -59,7 +61,7 @@ struct Block {
Shape *Parent; // The shape we are directly inside
int Id; // A unique identifier, defined when added to relooper. Note that this uniquely identifies a *logical* block - if we split it, the two instances have the same content *and* the same Id
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
+ const char *BranchVar; // A variable whose value determines where we go; if this is not NULL, emit a switch on that variable
bool IsCheckedMultipleEntry; // If true, we are a multiple entry, so reaching us requires setting the label variable
Block(const char *CodeInit, const char *BranchVarInit);
@@ -130,8 +132,6 @@ struct SimpleShape : public Shape {
}
};
-typedef std::map<Block*, Shape*> BlockShapeMap;
-
// A shape that may be implemented with a labeled loop.
struct LabeledShape : public Shape {
bool Labeled; // If we have a loop, whether it needs to be labeled
@@ -139,12 +139,16 @@ struct LabeledShape : public Shape {
LabeledShape(ShapeType TypeInit) : Shape(TypeInit), Labeled(false) {}
};
+// Blocks with the same id were split and are identical, so we just care about ids in Multiple entries
+typedef std::map<int, Shape*> IdShapeMap;
+
struct MultipleShape : public LabeledShape {
- BlockShapeMap InnerMap; // entry block -> shape
- int NeedLoop; // If we have branches, we need a loop. This is a counter of loop requirements,
- // if we optimize it to 0, the loop is unneeded
+ IdShapeMap InnerMap; // entry block ID -> shape
+ int Breaks; // If we have branches on us, we need a loop (or a switch). This is a counter of requirements,
+ // if we optimize it to 0, the loop is unneeded
+ bool UseSwitch; // Whether to switch on label as opposed to an if-else chain
- MultipleShape() : LabeledShape(Multiple), NeedLoop(0) {}
+ MultipleShape() : LabeledShape(Multiple), Breaks(0), UseSwitch(false) {}
void RenderLoopPrefix();
void RenderLoopPostfix();
diff --git a/src/relooper/test.cpp b/src/relooper/test.cpp
index b4ce669c..9f3ddceb 100644
--- a/src/relooper/test.cpp
+++ b/src/relooper/test.cpp
@@ -312,7 +312,128 @@ int main() {
printf("\n\n", "the_var");
r.Render();
- puts(buffer);
+ puts(r.GetOutputBuffer());
+ }
+
+ if (1) {
+ Relooper::MakeOutputBuffer(10);
+
+ printf("\n\n-- If chain (optimized) --\n\n");
+
+ Block *b_a = new Block("// block A\n", NULL);
+ Block *b_b = new Block("// block B\n", NULL);
+ Block *b_c = new Block("// block C\n", NULL);
+
+ b_a->AddBranchTo(b_b, "a == 10", NULL);
+ b_a->AddBranchTo(b_c, NULL, NULL);
+
+ b_b->AddBranchTo(b_c, NULL, NULL);
+
+ Relooper r;
+ r.AddBlock(b_a);
+ r.AddBlock(b_b);
+ r.AddBlock(b_c);
+
+ r.Calculate(b_a);
+ r.Render();
+
+ puts(r.GetOutputBuffer());
+ }
+
+ if (1) {
+ Relooper::MakeOutputBuffer(10);
+
+ printf("\n\n-- If chain (optimized) --\n\n");
+
+ Block *b_a = new Block("// block A\n", NULL);
+ Block *b_b = new Block("// block B\n", NULL);
+ Block *b_c = new Block("// block C\n", NULL);
+ Block *b_d = new Block("// block D\n", NULL);
+
+ b_a->AddBranchTo(b_b, "a == 10", NULL);
+ b_a->AddBranchTo(b_d, NULL, NULL);
+
+ b_b->AddBranchTo(b_c, "b == 10", NULL);
+ b_b->AddBranchTo(b_d, NULL, NULL);
+
+ b_c->AddBranchTo(b_d, NULL, NULL);
+
+ Relooper r;
+ r.AddBlock(b_a);
+ r.AddBlock(b_b);
+ r.AddBlock(b_c);
+ r.AddBlock(b_d);
+
+ r.Calculate(b_a);
+ r.Render();
+
+ puts(r.GetOutputBuffer());
+ }
+
+ if (1) {
+ Relooper::MakeOutputBuffer(10);
+
+ printf("\n\n-- If chain (optimized, long) --\n\n");
+
+ Block *b_a = new Block("// block A\n", NULL);
+ Block *b_b = new Block("// block B\n", NULL);
+ Block *b_c = new Block("// block C\n", NULL);
+ Block *b_d = new Block("// block D\n", NULL);
+ Block *b_e = new Block("// block E\n", NULL);
+
+ b_a->AddBranchTo(b_b, "a == 10", NULL);
+ b_a->AddBranchTo(b_e, NULL, NULL);
+
+ b_b->AddBranchTo(b_c, "b == 10", NULL);
+ b_b->AddBranchTo(b_e, NULL, NULL);
+
+ b_c->AddBranchTo(b_d, "c == 10", NULL);
+ b_c->AddBranchTo(b_e, NULL, NULL);
+
+ b_d->AddBranchTo(b_e, NULL, NULL);
+
+ Relooper r;
+ r.AddBlock(b_a);
+ r.AddBlock(b_b);
+ r.AddBlock(b_c);
+ r.AddBlock(b_d);
+ r.AddBlock(b_e);
+
+ r.Calculate(b_a);
+ r.Render();
+
+ puts(r.GetOutputBuffer());
+ }
+
+ if (1) {
+ Relooper::MakeOutputBuffer(10);
+
+ printf("\n\n-- If chain (optimized, lead to complex) --\n\n");
+
+ Block *b_a = new Block("// block A\n", NULL);
+ Block *b_b = new Block("// block B\n", NULL);
+ Block *b_c = new Block("// block C\n", NULL);
+ Block *b_d = new Block("// block D\n", NULL);
+
+ b_a->AddBranchTo(b_b, "a == 10", NULL);
+ b_a->AddBranchTo(b_d, NULL, NULL);
+
+ b_b->AddBranchTo(b_c, "b == 10", NULL);
+ b_b->AddBranchTo(b_d, NULL, NULL);
+
+ b_c->AddBranchTo(b_c, "loop", NULL);
+ b_c->AddBranchTo(b_d, NULL, NULL);
+
+ Relooper r;
+ r.AddBlock(b_a);
+ r.AddBlock(b_b);
+ r.AddBlock(b_c);
+ r.AddBlock(b_d);
+
+ r.Calculate(b_a);
+ r.Render();
+
+ puts(r.GetOutputBuffer());
}
}
diff --git a/src/relooper/test.txt b/src/relooper/test.txt
index 82b02ad7..d53aeeb1 100644
--- a/src/relooper/test.txt
+++ b/src/relooper/test.txt
@@ -324,10 +324,6 @@
label = 1;
L0: while(1) {
switch(label|0) {
- case 3: {
- // block C
- break;
- }
case 1: {
// block A
if (check == 10) {
@@ -357,6 +353,67 @@
}
break;
}
+ case 3: {
+ // block C
+ break;
+ }
+ }
+ }
+
+
+
+-- If chain (optimized) --
+
+ // block A
+ if (a == 10) {
+ // block B
+ }
+ // block C
+
+
+
+-- If chain (optimized) --
+
+ // block A
+ if (a == 10) {
+ // block B
+ if (b == 10) {
+ // block C
+ }
+ }
+ // block D
+
+
+
+-- If chain (optimized, long) --
+
+ // block A
+ if (a == 10) {
+ // block B
+ if (b == 10) {
+ // block C
+ if (c == 10) {
+ // block D
+ }
+ }
+ }
+ // block E
+
+
+
+-- If chain (optimized, lead to complex) --
+
+ // block A
+ if (a == 10) {
+ // block B
+ if (b == 10) {
+ while(1) {
+ // block C
+ if (!(loop)) {
+ break;
+ }
+ }
}
}
+ // block D
diff --git a/src/runtime.js b/src/runtime.js
index fecd3b68..63610d3b 100644
--- a/src/runtime.js
+++ b/src/runtime.js
@@ -185,10 +185,10 @@ var Runtime = {
// type can be a native type or a struct (or null, for structs we only look at size here)
getAlignSize: function(type, size, vararg) {
// we align i64s and doubles on 64-bit boundaries, unlike x86
-#if TARGET_LE32 == 1
+#if TARGET_ASMJS_UNKNOWN_EMSCRIPTEN == 1
if (vararg) return 8;
#endif
-#if TARGET_LE32
+#if TARGET_ASMJS_UNKNOWN_EMSCRIPTEN
if (!vararg && (type == 'i64' || type == 'double')) return 8;
if (!type) return Math.min(size, 8); // align structures internally to 64 bits
#endif
@@ -399,17 +399,23 @@ var Runtime = {
for (var i = 0; i < numArgs; i++) {
args.push(String.fromCharCode(36) + i); // $0, $1 etc
}
- code = Pointer_stringify(code);
- if (code[0] === '"') {
+ var source = Pointer_stringify(code);
+ if (source[0] === '"') {
// tolerate EM_ASM("..code..") even though EM_ASM(..code..) is correct
- if (code.indexOf('"', 1) === code.length-1) {
- code = code.substr(1, code.length-2);
+ if (source.indexOf('"', 1) === source.length-1) {
+ source = source.substr(1, source.length-2);
} else {
// something invalid happened, e.g. EM_ASM("..code($0)..", input)
- abort('invalid EM_ASM input |' + code + '|. Please use EM_ASM(..code..) (no quotes) or EM_ASM({ ..code($0).. }, input) (to input values)');
+ abort('invalid EM_ASM input |' + source + '|. Please use EM_ASM(..code..) (no quotes) or EM_ASM({ ..code($0).. }, input) (to input values)');
}
}
- return Runtime.asmConstCache[code] = eval('(function(' + args.join(',') + '){ ' + code + ' })'); // new Function does not allow upvars in node
+ try {
+ var evalled = eval('(function(' + args.join(',') + '){ ' + source + ' })'); // new Function does not allow upvars in node
+ } catch(e) {
+ Module.printErr('error in executing inline EM_ASM code: ' + e + ' on: \n\n' + source + '\n\nwith args |' + args + '| (make sure to use the right one out of EM_ASM, EM_ASM_ARGS, etc.)');
+ throw e;
+ }
+ return Runtime.asmConstCache[code] = evalled;
},
warnOnce: function(text) {
@@ -484,6 +490,11 @@ var Runtime = {
return ret;
}
this.processJSString = function processJSString(string) {
+ /* TODO: use TextEncoder when present,
+ var encoder = new TextEncoder();
+ encoder['encoding'] = "utf-8";
+ var utf8Array = encoder['encode'](aMsg.data);
+ */
string = unescape(encodeURIComponent(string));
var ret = [];
for (var i = 0; i < string.length; i++) {
diff --git a/src/settings.js b/src/settings.js
index c8114059..a9a72425 100644
--- a/src/settings.js
+++ b/src/settings.js
@@ -23,8 +23,8 @@ var QUANTUM_SIZE = 4; // This is the size of an individual field in a structure.
// Changing this from the default of 4 is deprecated.
var TARGET_X86 = 0; // For i386-pc-linux-gnu
-var TARGET_LE32 = 1; // For le32-unknown-nacl. 1 is normal, 2 is for the fastcomp llvm
- // backend using pnacl abi simplification
+var TARGET_ASMJS_UNKNOWN_EMSCRIPTEN = 1; // For asmjs-unknown-emscripten. 1 is normal, 2 is for the fastcomp llvm
+ // backend using emscripten-customized abi simplification
var CORRECT_SIGNS = 1; // Whether we make sure to convert unsigned values to signed values.
// Decreases performance with additional runtime checks. Might not be
@@ -39,7 +39,7 @@ var CHECK_SIGNS = 0; // Runtime errors for signing issues that need correcting.
var ASSERTIONS = 1; // Whether we should add runtime assertions, for example to
// check that each allocation to the stack does not
- // exceed it's size, whether all allocations (stack and static) are
+ // exceed its size, whether all allocations (stack and static) are
// of positive size, etc., whether we should throw if we encounter a bad __label__, i.e.,
// if code flow runs into a fault
// ASSERTIONS == 2 gives even more runtime checks
@@ -133,6 +133,7 @@ var PRECISE_F32 = 0; // 0: Use JS numbers for floating-point values. These are 6
// therefore recommended.
var SIMD = 0; // Whether to emit SIMD code ( https://github.com/johnmccutchan/ecmascript_simd )
+var CLOSURE_COMPILER = 0; // Whether closure compiling is being run on this output
var CLOSURE_ANNOTATIONS = 0; // If set, the generated code will be annotated for the closure
// compiler. This potentially lets closure optimize the code better.
@@ -164,8 +165,14 @@ var OUTLINING_LIMIT = 0; // A function size above which we try to automatically
// throughput. It is hard to say what values to start testing
// with, but something around 20,000 to 100,000 might make sense.
// (The unit size is number of AST nodes.)
+ // Outlining decreases maximum function size, but does so at the
+ // cost of increasing overall code size as well as performance
+ // (outlining itself makes code less optimized, and requires
+ // emscripten to disable some passes that are incompatible with
+ // it).
var AGGRESSIVE_VARIABLE_ELIMINATION = 0; // Run aggressiveVariableElimination in js-optimizer.js
+var SIMPLIFY_IFS = 1; // Whether to simplify ifs in js-optimizer.js
// Generated code debugging options
var SAFE_HEAP = 0; // Check each write to the heap, for example, this will give a clear
@@ -224,6 +231,19 @@ var LIBRARY_DEBUG = 0; // Print out when we enter a library call (library*.js).
var SOCKET_DEBUG = 0; // Log out socket/network data transfer.
var SOCKET_WEBRTC = 0; // Select socket backend, either webrtc or websockets.
+// As well as being configurable at compile time via the "-s" option the WEBSOCKET_URL and WEBSOCKET_SUBPROTOCOL
+// settings may configured at run time via the Module object e.g.
+// Module['websocket'] = {subprotocol: 'base64, binary, text'};
+// Module['websocket'] = {url: 'wss://', subprotocol: 'base64'};
+// Run time configuration may be useful as it lets an application select multiple different services.
+var WEBSOCKET_URL = 'ws://'; // A string containing either a WebSocket URL prefix (ws:// or wss://) or a complete
+ // RFC 6455 URL - "ws[s]:" "//" host [ ":" port ] path [ "?" query ].
+ // In the (default) case of only a prefix being specified the URL will be constructed from
+ // prefix + addr + ':' + port
+ // where addr and port are derived from the socket connect/bind/accept calls.
+var WEBSOCKET_SUBPROTOCOL = 'binary'; // A string containing a comma separated list of WebSocket subprotocols
+ // as would be present in the Sec-WebSocket-Protocol header.
+
var OPENAL_DEBUG = 0; // Print out debugging information from our OpenAL implementation.
var GL_ASSERTIONS = 0; // Adds extra checks for error situations in the GL library. Can impact performance.
@@ -311,10 +331,14 @@ var EXPORTED_FUNCTIONS = ['_main', '_malloc'];
// through LLVM dead code elimination, and also made accessible outside of
// the generated code even after running closure compiler (on "Module").
// Note the necessary prefix of "_".
+ // Note also that this is the full list of exported functions - if you
+ // have a main() function and want it to run, you must include it in this
+ // list (as _main is by default in this value, and if you override it
+ // without keeping it there, you are in effect removing it).
var EXPORT_ALL = 0; // If true, we export all the symbols. Note that this does *not* affect LLVM, so it can
// still eliminate functions as dead. This just exports them on the Module object.
var EXPORT_BINDINGS = 0; // Export all bindings generator functions (prefixed with emscripten_bind_). This
- // is necessary to use the bindings generator with asm.js
+ // is necessary to use the WebIDL binder or bindings generator with asm.js
var RETAIN_COMPILER_SETTINGS = 0; // Remembers the values of these settings, and makes them accessible
// through Runtime.getCompilerSetting and emscripten_get_compiler_setting.
// To see what is retained, look for compilerSettings in the generated code.
@@ -446,7 +470,7 @@ var HEADLESS = 0; // If 1, will include shim code that tries to 'fake' a browser
var BENCHMARK = 0; // If 1, will just time how long main() takes to execute, and not
// print out anything at all whatsoever. This is useful for benchmarking.
-var ASM_JS = 0; // If 1, generate code in asm.js format. If 2, emits the same code except
+var ASM_JS = 1; // If 1, generate code in asm.js format. If 2, emits the same code except
// for omitting 'use asm'
var PGO = 0; // Enables profile-guided optimization in the form of runtime checks for
diff --git a/src/shell.html b/src/shell.html
index 4f907936..226f12b9 100644
--- a/src/shell.html
+++ b/src/shell.html
@@ -88,6 +88,7 @@
width: 100%;
height: 200px;
margin: 0 auto;
+ margin-top: 10px;
display: block;
background-color: black;
color: white;
@@ -97,566 +98,1098 @@
</style>
</head>
<body>
- <!-- <img id='emscripten_logo' src="emscripten_cropped_logo.jpg" width=296 height=78> -->
-<?xml version="1.0" encoding="utf-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><a href="http://emscripten.org"><svg version="1.1" id="emscripten_logo" xmlns:x="&ns_extend;" xmlns:i="&ns_ai;" xmlns:graph="&ns_graphs;"
- xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
- x="0px" y="0px" width="296px" height="78px" viewBox="420 120 100 170" enable-background="new 0 0 900 400" xml:space="preserve"><path fill="#E2E2E2" d="M256.023,135.437H196.36c-16.432,0-29.8,13.368-29.8,29.8v73.527c0,16.432,13.368,29.8,29.8,29.8h59.663
- c16.433,0,29.801-13.368,29.801-29.8v-73.527C285.824,148.805,272.456,135.437,256.023,135.437z M191.561,165.236
- c0-2.646,2.153-4.8,4.8-4.8h59.663c2.647,0,4.801,2.153,4.801,4.8v73.527c0,2.646-2.153,4.8-4.801,4.8H196.36
- c-2.646,0-4.8-2.153-4.8-4.8V165.236z"/><path fill="#E2E2E2" d="M531.664,234.155h18.498l-2.809,18.064h5.59h37.586l2.6-17.718c4.98-1.091,9.133-3.455,12.512-6.693
- c3.084,4.075,8.566,7.37,18.252,7.37c6.338,0,12.775-1.807,17.174-3.687c4.254,2.399,9.463,3.687,15.459,3.687
- c3.088,0,6.236-0.355,9.426-1.023h67.135l3.354-24.827l-5.445-0.764l1.879-13.356c0.371-2.386,0.449-4.66,0.449-6.156l-0.008-0.375
- c-0.457-12.191-8.139-19.765-20.045-19.765c-2.404,0-4.623,0.314-6.676,0.852h-34.189l-0.035,0.244
- c-2.527-0.701-5.41-1.096-8.686-1.096c-3.801,0-7.406,0.555-10.76,1.598l0.105-0.746h-12.467l1.826-12.951H615.08l-1.846,7.658
- c-1.373,5.704-2.213,5.793-4.453,6.03l-4.508,0.477c-3.049-1.424-6.357-2.065-9.602-2.065c-2.135,0-4.275,0.284-6.416,0.852h-19.291
- c0.502-1.772,0.775-3.674,0.775-5.678c0-9.601-6.846-16.305-16.646-16.305c-11.055,0-18.775,7.721-18.775,18.776
- c0,0.951,0.082,1.869,0.219,2.764c-2.135-0.288-4.277-0.409-5.553-0.409c-2.053,0-4.072,0.288-6.045,0.852h-31.342
- c-2.74-0.553-5.641-0.852-8.537-0.852c-7.138,0-13.492,1.674-18.808,4.723l-3.451-1.461c-3.711-1.571-11.232-3.262-18.979-3.262
- c-8.933,0-16.383,2.56-21.576,7.016c-3.265-4.473-8.523-7.016-15.228-7.016c-4.822,0-9.021,1.477-12.572,3.44
- c-2.996-2.204-6.796-3.44-11.115-3.44c-2.327,0-4.48,0.315-6.476,0.852h-33.963l-0.035,0.245c-2.526-0.702-5.41-1.097-8.687-1.097
- c-20.458,0-35.307,16.031-35.307,38.117c0,17.363,10.785,28.149,28.148,28.149c3.087,0,6.236-0.356,9.426-1.023h88.816
- c3.706,0.676,7.669,1.023,11.154,1.023c8.907,0,16.278-2.375,21.51-6.593c4.872,4.252,11.585,6.593,19.728,6.593
- c3.053,0,6.206-0.368,9.286-1.023h44.664H531.664z"/><path fill="#F5F5F5" d="M255.023,133.437H195.36c-16.432,0-29.8,13.368-29.8,29.8v73.527c0,16.432,13.368,29.8,29.8,29.8h59.663
- c16.433,0,29.801-13.368,29.801-29.8v-73.527C284.824,146.805,271.456,133.437,255.023,133.437z M190.561,163.236
- c0-2.646,2.153-4.8,4.8-4.8h59.663c2.647,0,4.801,2.153,4.801,4.8v73.527c0,2.646-2.153,4.8-4.801,4.8H195.36
- c-2.646,0-4.8-2.153-4.8-4.8V163.236z"/><g><g><path fill="#FBFDF8" d="M195.361,251.626c-8.161,0-14.8-6.64-14.8-14.8v-73.527c0-8.161,6.639-14.8,14.8-14.8h59.663
- c8.161,0,14.8,6.639,14.8,14.8v73.527c0,8.16-6.639,14.8-14.8,14.8H195.361z"/><path fill="#F0F4E1" d="M255.024,152.499c5.964,0,10.8,4.835,10.8,10.8v73.527c0,5.965-4.835,10.8-10.8,10.8h-59.663
- c-5.964,0-10.8-4.835-10.8-10.8v-73.527c0-5.964,4.835-10.8,10.8-10.8H255.024 M255.024,144.499h-59.663
- c-10.366,0-18.8,8.434-18.8,18.8v73.527c0,10.366,8.434,18.8,18.8,18.8h59.663c10.366,0,18.8-8.434,18.8-18.8v-73.527
- C273.824,152.933,265.391,144.499,255.024,144.499L255.024,144.499z"/></g><defs><filter id="Adobe_OpacityMaskFilter" filterUnits="userSpaceOnUse" x="176.562" y="144.499" width="97.263" height="111.127"><feColorMatrix type="matrix" values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0" color-interpolation-filters="sRGB" result="source"/></filter></defs><mask maskUnits="userSpaceOnUse" x="176.562" y="144.499" width="97.263" height="111.127" id="SVGID_1_"><g filter="url(#Adobe_OpacityMaskFilter)"><image overflow="visible" width="422" height="480" xlink:href="data:image/jpeg;base64,/9j/4AAQSkZJRgABAgEBLAEsAAD/7AARRHVja3kAAQAEAAAAHgAA/+4AIUFkb2JlAGTAAAAAAQMA
-EAMCAwYAAAg2AAAQ4QAAF1b/2wCEABALCwsMCxAMDBAXDw0PFxsUEBAUGx8XFxcXFx8eFxoaGhoX
-Hh4jJSclIx4vLzMzLy9AQEBAQEBAQEBAQEBAQEABEQ8PERMRFRISFRQRFBEUGhQWFhQaJhoaHBoa
-JjAjHh4eHiMwKy4nJycuKzU1MDA1NUBAP0BAQEBAQEBAQEBAQP/CABEIAeMBqQMBIgACEQEDEQH/
-xACjAAEAAgMBAQAAAAAAAAAAAAAABQYBAwQHAgEBAQAAAAAAAAAAAAAAAAAAAAEQAAEDAQQKAwAC
-AwEAAAAAAAABAwQCMRMUBRBQEjMVJQYWNgcgESEwI5AiMkARAAEBAwsEAQIFAwUBAAAAAAABMQID
-EFAycqOz0wQ0RaURIXGRIEFRMGEiExRAgRKh0SMzQxUSAQAAAAAAAAAAAAAAAAAAAJD/2gAMAwEA
-AhEDEQAAANUJsrZYFfFgV8WBXxYEL0ki5fo6GjJuaRuaRuaRuaRuaRuaRuaRuaRuaRuaRuaRuaRu
-aRuaMHQ5dR3ojnJ9XxYFfFgV8WD0jxf2AodbslbAD6mDhlpLvI/qkuiovZL7CGzNfRCJwQacEGnB
-Bp0QSdEEnRBJ0QSdEEnRBJ3BBpwQacEHidwQXzPfBA6bBqK5w2nlKVH3iJitt+gAeweP+wFDrdkr
-Y+vmaN02k6+e3d2Gjo6N0c2zoyaM7xozuGluGluGluGluGluGluGluGluGluGluGluGnG8c/z1YO
-PVIfJF80xoIGPsfBVVrl6hIrD7+B7B4/7AUOt2StnXaYyxHTJ6ZKvrqb4x9MgAAAAAAAAAAAAAAA
-DGR8692Dh4pbkIKJscTVNiLdVY1+weP+wFDgJ+JLJORs3XbIc3dGz6ZAAAAAAAAAAAAAAAAAAAPn
-R0ayMi5uLqv1S51eIT2Dx/2AofB38Ra5uIm6kOzm6o+gAAAAAAAAAAAAAAAAAAAPj7+TkjJWNIOt
-2et1WfYPH/YIofH2cZcJyEnKkenn6IyAAAAAAAAAAAAAAAAAAABjODmjZONIWt2WtVWPYPH/AGCK
-Hx9nIXGcg5ypLfo3xkAAAAAAAAAAAAAAAAAAADGcHPGyUaQ1astaqseweP8AsEUPk6+QuM7BTtSW
-7TujIAAAAAAAAAAAAAAAAAAAGM4OeOkY4hqzZqzVY9g8f9gih8nXyFxnYKdqS3ad0ZAAAAAAAAAA
-AAAAAAAAAAxnBzx0jHENWbNWarHsHj/sEUPk6+QuM7BTtSW7TujIAAAAAAAAAAAAAAAAAAAGM4Oe
-OkY4hqzZqzVY9g8f9gih8nXyFxnYKdqS3ad0ZAAAAAAAAAAAAAAAAAAAAxnBzx0jHENWbNWarHsH
-j/sEUPk6+QuM7BTtSW7TujIAAAAAAAAAAAAAAAAAAAGM4OeOkY4hqzZqzVY9g8f9gih8nXyFxnYK
-dqS3ad0ZAAAAAAAAAAAAAAAAAAAAxnBzx0jHENWbNWarHsHj/sEUPk6+QuM7BTtSW7TujIAAAAAA
-AAAAAAAAAAAAAGM4OeOkY4hqzZqzVY9g8f8AYIofJ18hcZ2Cnakt2ndGQAAAAAAAAAAAAAAAAAAA
-MZwc8dIxxDVmzVmqx7B4/wCwRQ+Tr5C4zsFO1JbtO6MgAAAAAAAAAAAAAAAAAAAYzg546RjiGrNm
-rNVj2Dx/2CKHydfIXGdgp2pLdp3RkAAAAAAAAAAAAAAAAAAADGcHPHSMcQ1Zs1ZqseweP+wRQ+Tr
-5C4zsFO1JbtO6MgAAAAAAAAAAAAAAAAAAAYzg546RjiGrNmrNVj2Dx/2CKHydfIXGdgp2pLdp3Rk
-AAAAAAAAAAAAAAAAAAADGcHPHSMcQ1Zs1ZqseweP+wRQ+Tr5C4zsFO1JbtO6MgAAAAAAAAAAAAAA
-AAAAAYzg546RjiGrNmrNVj2Dx/2CKHydfIXGdgp2pLdp3RkAAAAAAAAAAAAAAAAAAADGcHPHSMcQ
-1Zs1ZqseweP+wRQ+Tr4y5TkHOVJb9G+MgAAAAAAAAAAAAAAAAAAAYzg542SjSGrVlrVVj2Dx/wBg
-ih8fZxlxnIKcqT6ObpjIAAAAAAAAAAAAAAAAAAAGM4OeNkY0h61Za1VY9g8f9gih8Xbwlxm4GbqW
-6uLrj7AAAAAAAAAAAAAAAAAAAA+fr5OaNkI0ia1Y61Vb9g8f9gihxknCl1m65N1OdsZ3x0ZxkAAA
-AAAAAAAAAAAAAAAAx8fek5ozui6jazYKsRPsHj/sEUOu2Ktlqn6XZ6scjBSRLbOPpjYxkAAAAAAA
-AAAAAAAAAAYfJjm+uM0xXVE1xVOZr0Y9g8f9gKHW7JWz7s1W6i9SdYlasXXB9pLbI7fHY5/s3NeT
-7fGT6fI+nyPp8j6fI+nyPp8j6fI+nyPp8j6fI+nyPp8D7x8fJtxp1m7Tp5jbw/MfWIjbXTk5SHsH
-j/sBQ63ZK2AdthqO8vXbUZWrJ0V/oJ7ZB7Sa+ofJMIkS6IySyJRLIkSyJEsiRLIkSyJEsiRLIkSy
-JVLYiRLYicEr8xfwSemN0kjy8PIdkfxQp0xWEAPYPH/YCh1uyVsAAz08ome2si37qZkumaULspIu
-2aRkuyki7KSLspIuyki7KSLspIuyki7KSLtilC6qSLtilC6fNNFu5qz8k7wcI+vkAAHsHj/sBWoQ
-AAAAAAAAAAAAAAAAAAAAAAAAAHpAf//aAAgBAgABBQD/ACi//9oACAEDAAEFAP8AKL//2gAIAQEA
-AQUA6w6rz/LM+776rO++qzvvqs776rO++qzvvqs776rO++qzvvqs776rO++qzvvqs776rO++qzvv
-qs776rO++qzvvqs776rO++qzvvqs776rO++qzvvqs776rO++qzvvqs776rO++qzvvqs776rO++qz
-vvqs776rO++qzvvqs776rO++qzvvqs776rO++qzvvqs776rO++qzvvqs776rO++qzvvqs776rO++
-qzvvqs776rMfLPYHlHyRFUbivuDeUv1FOSVKJkRwE4CcAOAHADgBwA4AcAOAHADgBwA4AcAOAHAD
-gBwA4AcAOAHADgBwA4AcAOAnARciFyRUK8ndQcgyGxaaqf4fYHlHwRFUjZe68RsqbpGoKIUQkKYY
-kISEYJDAmBMCYEwJgTAmBMCYEwJgTAmBMCYEwJgTAmBMCYEwJgTAmCQWELCKoSFcNByEhIyxusk5
-VVQV0VUL8vYHlGltupyqDlaIMREQaijcUoilMUSKgkZDDIYZDDIYZDDIYZDDIYZDDIYZDDIYZDDI
-YZDDIYZDDIYZDDIYZDDIYZDDIYZDDIYZDDILGQWKVRSuKORR2KPRCZltDiSYrjFXx9geUaG26nKs
-vy9KEjxhmONRxuOUMFLAjIjJdF0XRdIXSF0hdF0XRdF0XRdF0XRdF0XRdF0XRdIXSF0hdIXRdCsi
-sisFTBXHHY49GH4xMhU10y4tTFfw9geUCJ9rlcL6SNHGGBlgbZKGilsShDZQ+kPr/wBX0fSGygtC
-CtoVNDjI6wPsElgzCGjlLrdTden2B5QZfGvnYbCIkdkYZGmihsSn61ItJXQOtD7JIZJTBm0X6+Hs
-DyhP1cpjbLcVojtDLY3QIn1qZU+yugebJDRKaJ7CVUvtq27o9geURaLx6C19JFbI7Y1QU0/WqFQd
-oH6CS2TG/wAzZrZd0ewPKMqo2n4VH5FoGKBunVTifj9JJpJdBnVH+mj2B5RkqfdcOki0jFJQn5qm
-pPx5CTSS6TOKf6tHsDyjI0/2hIRU/GUKbNU1DyfklCWhm6f06PYHlGRf9QkIqfjKCWapWx4kkszj
-daPYHlGQ2wrItjImqlseJJMM43Wj2B5RkNsEjWNarUeJJMM43Oj2B5RkNsEjWNarUeJJMM43Oj2B
-5RkNsGyLY1qtR6ySTDONzo9geUZDbBsi2NarUesk2TDON1o9geUZDbBsjWNarUesk2TDON1o9geU
-ZDbBsjWNarUeskkwzjdaPYHlGQ2wbI1jWq1HrJJMM43Wj2B5RkNsGyNY1qtR6ySTDON1o9geUZDb
-BsjWNarUeskkwzjdaPYHlGQ2wbI1jWq1HrJJMM43Wj2B5RkNsGyNY1qtR6ySTDON1o9geUZDbBsj
-WNarUeskkwzjdaPYHlGQ2wbI1jWq1HrJJMM43Wj2B5RkNsGyNY1qtR6ySTDON1o9geUZDbBsjWNa
-rUeskkwzjdaPYHlGQ2wbI1jWq1HrJJMM43Wj2B5RkNsGyNY1qtR6ySTDON1o9geUZDbBsjWNarUe
-skkwzjdaPYHlGQ2wbI1jWq1HrJJMM43Wj2B5RkNsGyNY1qtR6ySTDON1o9geUZDbBsjWNarUeskk
-wzjdaPYHlGQ2wbI1jWq1HrJJMM43Wj2B5RkNsGyNY1qtR6ySTDON1o9geUZDbBsjWNarUeskkwzj
-daPYHlGQ2wbI1jWq1HrJJMM43Wj2B5RkNsGyNY1qtR6ySTDON1o9geUZDbBsjWNarUeskkwzjdaP
-YHlGQ2wbI1jWq1HrJNkwzjdaPYHlGQ2wbItjWq1HrJNkwzjdaPYHlGQ2wbItjWq1HrJJMM43Oj2B
-5RkNsGyNY1qtR4kkwzjc6PYHlGQ2wSNY1qtR4kkwzjc6PYHlGQ2wrItjImqlseJJMM43Wj2B5RkV
-sJSKv4yolmqVseJJLM43Wj2B5Rkf/UJSKv4ypTZqmoeX8kqS1M43Oj2B5Rki/wC0Koi1DKlC/mqa
-h5SSpLUzdf6tHsDyjJ6/p2HURaxiobX81TWv4/USaiXUZy59N6PYHlGXubEiE5+RaxisaqEXVCjl
-Q/WSayXX+Zy59ro9geUUVbNeXPpVRFdI7gzWUVfeqK6h2skOElwmu/ST3bx/R7A8oMpk/SxHiM8M
-OjThTX9iLqWqr6HHB50kOkp4zSVsUVKqro9geUDLit15fLSumM+MPjTw26UuCVH2moPsWoqcK3R1
-4feJD5MkIiTpKvO6fYHlGiFLViuHLSpGJAzIGnyh8peKXRHEEcQ20NtDbQ2kNpDaQ2kNpDaQ2kNp
-DaQ2kNpDaQ2kNpDaQ2kNpDaQ2kNpDaQ20NtDbQVxBXEFdKnit8cfHpA/IJMn6TMp+0vw9geUaYU+
-pmqJNprRmUNSRuSUSSmQgkgSQI+X5fl+X5fl+X5fl+X5fl+X5fl+X5fl+X5fl+X5fl+X4r4sgWQV
-SCuSOSR2SPSiRLREzDMlUVVVfh7A8o+EeW4wsTNKKxmYijcsollMspliSxJZjDGIYxDGIYxDGIYx
-DGIYxDGIYxDGIYxDGIYxDGIYxDGIYxDGIYxDGIYxDGIYxBZYssqllUsrljksdmISsxooSVmLjyqq
-r8vYHlHxRVRWZ77QznNI3mzSlGZUKU5hSJmKHEUOIocRQ4jScRQ4ihxFDiKHEUOIocRQ4ihxFDiK
-HEUOIocRQ4ihxFDiKHEUOIocRpOIocRQ4ihxFBcxQXMEKsxpHM1aQezmhB/M3nCquqtfn7A8o/hS
-utC9dL50vnS/eL94v3i/eL94v3i/eL94v3i/eL94v3i/eL94v3i/eL94v3i/eL94v3i/eL94v3i/
-eL50vnS9dLytT7X+PrDhvHuTHJjkxyY5McmOTHJjkxyY5McmOTHJjkxyY5McmOTHJjkxyY5McmOT
-HJjkxyY5McmOTHJjkxyY5McmOTHJjkxyY5McmOTHJjkxyY5McmOTHJjkxyY/pP/aAAgBAgIGPwBR
-f//aAAgBAwIGPwBRf//aAAgBAQEGPwCPk8jmv2su47DV1z9uE90V5xHl7vuKrTXWMHDNdYwcM11j
-BwzXWMHDNdYwcM11jBwzXWMHDNdYwcM11jBwzXWMHDNdYwcM11jBwzXWMHDNdYwcM11jBwzXWMHD
-NdYwcM11jBwzXWMHDNdYwcM11jBwzXWMHDNdYwcM11jBwzXWMHDNdYwcM11jBwzXWMHDNdYwcM11
-jBwzXWMHDNdYwcM11jBwzXWMHDNdYwcM11jBwzXWMHDNdYwcM11jBwzXWMHDNdYwcM11jBwzXWMH
-DNdYwcM11jBwzXWMHDNdYwcM11jBwzXWMHDNdYwcM11jBwzXWMHDP+z/AEd/2MzUhXbvz7H6XVO/
-Y7vFJSkpSUpKUlKSlJSkpSUpKUlKSlJSkpSUpKUlKSlJSkpSUpKUlKSlJSkpSUpKUlKSlJSkp+le
-p3d6ndOn4OZqQrt349EOqp0QT9PVfzGDBgwYMGDBgwYMGDBgwYMGDBgwYMGDBgwYMGDBgwYMGC9X
-RVh9/wAjo8nRfnmakK7d+H+LqdVEefTqonYYMGDBgwYMGDBgwYMGDBgwYMGDBgwYMGDBgwYMGDBg
-wYMGDBeqd/uKip2+/wAszUhXbsqOutURVT9SidhgwYMlZ/XsGDBgvYVFQVOnb6fHM1IV27J0QR95
-O6idhOwyaWC9hU6d/oK6v0+GZqQrt2RFVOyCdhBJrUU/cRO6N+GZqQrt06CL07qIJNiijydGjzsu
-ZqQrt0dd/MRBBJsUUU/y+8uZqQrt06/YQQSbFFFOv2WXM1IV26KIJNyij0uZqQrt0e8iCTcoo/Lm
-akK7dHvIggk2KKKPy5mpCu3R7yIJNyij8uZqQrt0e8iCTcoo/LmakK7dHvIgk3KKPy5mpCu3R7yI
-JNyij8uZqQrt0e8iCTaooo/LmakK7dHvIgk3KKPy5mpCu3R7yIJNyij8uZqQrt0e8iCCTaoo/Lma
-kK7dHvIggk2qKPy5mpCu3R7yIIJNqij8uZqQrt0e8iCCTaoo/LmakK7dHvIggk2qKPy5mpCu3R7y
-IIJNqij8uZqQrt0e8iCCTaoo/LmakK7dHvIggk2qKPy5mpCu3R7yIIJNqij8uZqQrt0e8iCCTaoo
-/LmakK7dHvIggk2qKPy5mpCu3R7yIIJNqij8uZqQrt0e8iCCTaoo/LmakK7dHvIggk2qKPy5mpCu
-3R7yIIJNqij8uZqQrt0e8iCCTaoo/LmakK7dHvIggk2qKPy5mpCu3R7yIIJNqij8uZqQrt0e8iCC
-Taoo/LmakK7dHvIggk2qKPy5mpCu3R7yIIJNqij8uZqQrt0e8iCTcoo/LmakK7dHvIgk2qKKPy5m
-pCu3R7yIJNyij8uZqQrt0e8iCTcoo/LmakK7dHvIgk3KKPy5mpCu3R7yIJNyij8uZqQrt0e8iCCT
-aoo/LmakK7dHvIgk3KKPy5mpCu3R4QSblFHpczUhXboqfcQQSbVFFT7y5mpCu3RPzEEEmxRRRHZc
-zUhXbojyfRR1RBJsUUUX7JLmakK7dk/bVfAgk2KKL37qwVV+suZqQrt2RHk+giook2L3F7i9GJ8M
-zUhXbsqItFRFRRO40aNmVo0aL3FhuL5+OZqQrt34I69REVFGjRo0aNGjf6po0aNGjRo0XuK5DXv9
-zqrV+OZqQrt349UXt9hEVeijRo0aNGjRo0aNGjRo0aNGjRo0aNGjRo0aNGjRo0aNGjRo0Xq9/YVH
-V6OnVflmakK7d+XVOw3qh0e7FM7PJ7KQ0aNGjRo0aNGjRo0aNGjRo0aNGjRo0aNGjRpSKaH6V6nR
-3sh1eXr+BmakK7d/C7KqFJfZTX2U19lNfZTX2U19lN72U3vZTe9lN72U3vZTe9lN72U3vZTe9lN7
-2U3vZTe9lN72U3vZTe9lN72U3vZTe9lN72U19lNfZTX2U19lNfZSX2d3l/Ej/wAj/wCf+7/jD6/y
-f5/7tBOnX+L/AMfr+5tPKm08qbTyptPKm08qbTyptPKm08qbTyptPKm08qbTyptPKm08qbTyptPK
-m08qbTyptPKm08qbTyptPKm08qbTyptPKm08qbTyptPKm08qbTyptPKm08qbTyptPKm08qbTyptP
-Km08qbTyptPKm08qbTyptPKm08qbTyptPKm08qbTyptPKm08qbTyptPKn/jan//Z" transform="matrix(0.24 0 0 0.24 174.5615 142.499)"></image></g></mask><g opacity="0.09" mask="url(#SVGID_1_)" a:adobe-blending-mode="multiply" a:adobe-opacity-share="1"><path fill="#1D2915" a:adobe-blending-mode="normal" a:adobe-opacity-share="0" d="M195.361,251.626
- c-8.161,0-14.8-6.64-14.8-14.8v-73.527c0-8.161,6.639-14.8,14.8-14.8h59.663c8.161,0,14.8,6.639,14.8,14.8v73.527
- c0,8.16-6.639,14.8-14.8,14.8H195.361z"/><path fill="#1D2915" a:adobe-blending-mode="normal" a:adobe-opacity-share="0" d="M255.024,152.499
- c5.964,0,10.8,4.835,10.8,10.8v73.527c0,5.965-4.835,10.8-10.8,10.8h-59.663c-5.964,0-10.8-4.835-10.8-10.8v-73.527
- c0-5.964,4.835-10.8,10.8-10.8H255.024 M255.024,144.499h-59.663c-10.366,0-18.8,8.434-18.8,18.8v73.527
- c0,10.366,8.434,18.8,18.8,18.8h59.663c10.366,0,18.8-8.434,18.8-18.8v-73.527C273.824,152.933,265.391,144.499,255.024,144.499
- L255.024,144.499z"/></g></g><g><g><linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="225.1929" y1="152.499" x2="225.1929" y2="247.6265"><stop offset="0.0123" style="stop-color:#C1D72F"/><stop offset="0.1394" style="stop-color:#BCD631"/><stop offset="0.5859" style="stop-color:#AFD136"/><stop offset="1" style="stop-color:#ABD037"/><a:midPointStop offset="0.0123" style="stop-color:#C1D72F"/><a:midPointStop offset="0.3086" style="stop-color:#C1D72F"/><a:midPointStop offset="1" style="stop-color:#ABD037"/></linearGradient><path fill="url(#SVGID_2_)" d="M184.562,236.826c0,5.965,4.835,10.8,10.8,10.8h59.663c5.964,0,10.8-4.835,10.8-10.8v-73.527
- c0-5.964-4.835-10.8-10.8-10.8h-59.663c-5.964,0-10.8,4.835-10.8,10.8V236.826z"/></g><defs><filter id="Adobe_OpacityMaskFilter_1_" filterUnits="userSpaceOnUse" x="184.562" y="152.499" width="81.263" height="95.127"><feColorMatrix type="matrix" values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0" color-interpolation-filters="sRGB" result="source"/></filter></defs><mask maskUnits="userSpaceOnUse" x="184.562" y="152.499" width="81.263" height="95.127" id="SVGID_3_"><g filter="url(#Adobe_OpacityMaskFilter_1_)"><image overflow="visible" width="356" height="414" xlink:href="data:image/jpeg;base64,/9j/4AAQSkZJRgABAgEBLAEsAAD/7AARRHVja3kAAQAEAAAAHgAA/+4AIUFkb2JlAGTAAAAAAQMA
-EAMCAwYAAAXBAAALIQAAEOP/2wCEABALCwsMCxAMDBAXDw0PFxsUEBAUGx8XFxcXFx8eFxoaGhoX
-Hh4jJSclIx4vLzMzLy9AQEBAQEBAQEBAQEBAQEABEQ8PERMRFRISFRQRFBEUGhQWFhQaJhoaHBoa
-JjAjHh4eHiMwKy4nJycuKzU1MDA1NUBAP0BAQEBAQEBAQEBAQP/CABEIAaEBawMBIgACEQEDEQH/
-xACYAAEAAgMBAQAAAAAAAAAAAAAABAcBBQYDAgEBAAAAAAAAAAAAAAAAAAAAABAAAAMIAwEAAgMB
-AAAAAAAAAAIGATIDBBQFFjZQMwcRECKQMRMSEQABAgQEBgEBBwQDAQAAAAAAAQIxcgMEEFCRsyGC
-M6PTNBFBIGFxEiIyE1GB0UKhscFiEgEAAAAAAAAAAAAAAAAAAACQ/9oADAMBAAIRAxEAAADy0npz
-Z0Dnx0DS7Q9kr0IKcIKeICeICeICeICeICeICeICeICeICeICeICeICfggp2CElQD1aXxOgc+O1s
-um7kKj5vpObG6d2Q9zspRA9JmSGmCHmWIiWIiWIiWIiWIiWIiWIiWIiWIiWIiWIiWIaYIeJo1sPe
-4OK5C2tCVS3OmN5clN3IVHod9EOv6zWb0zkAAAAAAAAAAAAAAAAAMRJnwcVXltVuetyU3chUfp5+
-5YexhTgAAAAAAAAAAAAAAAAABjODUVxZNbnjclN3IVHIjyCx5sKaAAAAAAAAAAAAAAAAAAMZwaut
-rJrY8bkpu5Co5EeQWPNhTQAAAAAAAAAAAAAAAAABjODV1tZNbHjclN3IVHIjyCx5sKaAAAAAAAAA
-AAAAAAAAAMZwautrJrY8bkpu5Co5EeQWPNhTQAAAAAAAAAAAAAAAAABjODV1tZNbHjclN3IVHIjy
-Cx5sKaAAAAAAAAAAAAAAAAAAMZwautrJrY8bkpu5Co5EeQWPNhTQAAAAAAAAAAAAAAAAABjODV1t
-ZNbHjclN3IVHIjyCx5sKaAAAAAAAAAAAAAAAAAAMZwautrJrY8bkpu5Co5EeQWPNhTQAAAAAAAAA
-AAAAAAAABjODV1tZNbHjclN3IVHIjyCx5sKaAAAAAAAAAAAAAAAAAAMZwautrJrY8bkpu5Co5EeQ
-WPNhTQAAAAAAAAAAAAAAAAABjODV1tZNbHjclN3IVHIjyCx5sKaAAAAAAAAAAAAAAAAAAMZwautr
-JrY8bkpu5Co5EeQWPNhTQAAAAAAAAAAAAAAAAABjODV1tZNbHjclN3IVHIjyCx5sKaAAAAAAAAAA
-AAAAAAAAMZwautrJrY8bkpu5Co5EeQWPNhTQAAAAAAAAAAAAAAAAABjODV1tZNbHjclN3IVHIjyC
-x5sKaAAAAAAAAAAAAAAAAAAMZwautrJrY8bkpu5Co5EeQWPNhTQAAAAAAAAAAAAAAAAABjODV1tZ
-NbHjclN3IVHIjyCx5sKaAAAAAAAAAAAAAAAAAAMZwautrJrY8bkpu5Co5EeQWPNhTQAAAAAAAAAA
-AAAAAAABjODV1tZNbHjclN3IVH7+HqWTO1uxMgAAAAAAAAAAAAAAAAAYzg1Vb2NXB5XJTdyFRx5G
-jLc3XG9SS2MgAAAAAAAAAAAAAAAAD4+ohqq47GvTa3JTdyFR830nNm/7qp+gLVk8fuDcZgehLRBL
-RBLRBLRBLRBLRBLRBLRBLRBLRBLRBLRBLRBLRBLRBKQohP0MbkT40OcG8uSm7kKj5vpObAJm45sd
-n98SO3cQO3cQO3cQO3cQO3cQO3cQO3cQO3cQO3cQO3cQO3cQO3cQO3cQO3cQO3xxI7PX84JcQAN5
-clN3IAAAAAAAAAAAAAAAAAAAAAAAf//aAAgBAgABBQD+G3//2gAIAQMAAQUA/ht//9oACAEBAAEF
-AFgq7/bL9narGdqsZ2qxnarGdqsZ2qxnarGdqsZ2qxnarGdqsZ2qxnarGdqsZ2qxnarGdqsZ2qxn
-arGdqsZ2qxnarGdqsZ2qxnarGdqsZ2qxnarGdqsZ2qxnarGdqsZ2qxnarGdqsZ2qxnarGdqsZ2qx
-narGdqsZ2qxnarCYVyhn78PQNo/MCUmJhssm48QEScNrGJGEMQgjEIIxCCMQgjEIIxCCMQgjEIIx
-CCMQgjEIIxCCMQgjEIIxCCMQgjEIIxCCMQgjEIIxCCMQgjEIIxCCMQgjEIIxCCMQgjEIQakYQOlI
-bGTCajw2R5SPLm/KK2gegbR+LVYzzDZGzFKyBaysYS3FYGSBBQkFCQUJBQkFCQUJBQkFCQUJBQkF
-CQUJBQkFCQUJBQkFCQUJBQkFCQUJBQkFCQUJBQkFCQUJBQkFCQNkCA9uK0R7WVrJ+ykMy6WI8BrW
-NY0IraB6BtAsdqbMHtttYxkvKFKxhCs4JpCtExKFMy5W5jWX22NgRAitoHoG0SsBsePZZFhSSkuw
-peFm5dhi3qRKYk1BbAjoraB6BtCcl/8ASYtUBjCkL8Lwp2fS3WCxpVDA/wA5lFbQPQNoShGNLbif
-CcM3+roX9VQz4ZFbQPQNoSLP0t7P04e5uql5FbQPQNoSPXIOcPc3VU8itoHoG0JHrkHOHubqqeRW
-0D0DaEj1yDnD3N1VPIraB6BtCR65Bzh7m6qnkVtA9A2hI9cg5w9zdVTyK2gegbQkeuQc4e5uqp5F
-bQPQNoSPXIOcPc3VU8itoHoG0JHrkHOHubqqeRW0D0DaEj1yDnD3N1VPIraB6BtCR65Bzh7m6qnk
-VtA9A2hI9cg5w9zdVTyK2gegbQkeuQc4e5uqp5FbQPQNoSPXIOcPc3VU8itoHoG0JHrkHOHubqqe
-RW0D0DaEj1yDnD3N1VPIraB6BtCR65Bzh7m6qnkVtA9A2hI9cg5w9zdVTyK2gegbQkeuQc4e5uqp
-5FbQPQNoSPXIOcPc3VU8itoHoG0JHrkHOHubqqeRW0D0DaEj1yDnD3N1VPIraB6BtCR65Bzh7m6q
-nkVtA9A2hI9cg5w9zdVTyK2gegbQkeuQc4e5uqp5FbQPQNoSPXIOcPc3VU8itoHoG0JHrkHOHubq
-qeRW0D0DaEj1yDnD3N1VPIraB6BtCR65Bzh7m6qnkVtA9A2hI9cg5w9zdVTyK2gegbQkeuQc4e5u
-qp5FbQPQNoSPXIOcPc3VU8itoHoG0JHrkHOHubqqeRW0D0DaEj1yDnD3N1VPIraB6BtCR65Bzh7m
-6qnkVtA9A2hI9cg5w9zdVTyK2gegbQkeuQc4e5uqp5FbQPQNoSLlvb+nD3N1UvIraB6BtCTN8Jbj
-/ScM3+rob9VQ36ZFbQPQNoTUx/xGtcdjSlb9ZwsRvwt1jMYVRR/+5hFbQPQNokZinmbPOsaWVjsM
-XhZuOwpbxOsYWcjtjzCK2gegbQLDdv8ANtuuDGsgTJTMYZjeCaZjBHmSlZcbgxjL9dGxDBFbQPQN
-oDGtK2z31pBJXYrWQLmVrCz5Whk8QVpBWkFaQVpBWkFaQVpBWkFaQVpBWkFaQVpBWkFaQVpBWkFa
-QVpBWkFaQVpBWkFaQVpBWkFaQVpBWkDZ4gNPkYI9zKxk7dysZdr80zTGaZoRW0D0DaPzK3Oalmyy
-oYwEVEv8yqXGVS4yqXGVS4yqXGVS4yqXGVS4yqXGVS4yqXGVS4yqXGVS4yqXGVS4yqXGVS4yqXGV
-S4yqXGVS4yqXGVS4yqXGVS4yqXGVS4yqXGVS4yqXB1RL/JlUMMyauU1Mt/KK2gegbRxaK2jj/wD/
-2gAIAQICBj8AG3//2gAIAQMCBj8AG3//2gAIAQEBBj8Ar2djdfxW7G01az+Ok74VzEcvF7FWJ73Z
-o+M97s0fGe92aPjPe7NHxnvdmj4z3uzR8Z73Zo+M97s0fGe92aPjPe7NHxnvdmj4z3uzR8Z73Zo+
-M97s0fGe92aPjPe7NHxnvdmj4z3uzR8Z73Zo+M97s0fGe92aPjPe7NHxnvdmj4z3uzR8Z73Zo+M9
-7s0fGe92aPjPe7NHxnvdmj4z3uzR8Z73Zo+M97s0fGe92aPjPe7NHxnvdmj4z3uzR8Z73Zo+M97s
-0fGe92aPjPe7NHxnvdmj4z3uzR8Z73Zo+Ms7O7u/5Leq5yVGfx0m/KIxzotYixTC5kpbbfsfFJir
-9/0EWo74+5qHH8y/3IO1Ug7VSDtVIO1Ug7VSDtVIO1Ug7VSDtVIO1Ug7VSDtVIO1Ug7VSDtVIO1U
-g7VSDtVIO1Ug7VSDtVIO1Ug7VSDtVIO1Ug7VSDtVIO1Ug7VSDtVIO1U4fmT+5803fP3Kn+D4qsVP
-v+n2LCd22/C5kpbbcUqVkX4+jf8AIiI34QTgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIEBe
-AqK1FRfuFqUE/SkWf4PhY4WE7tt+FzJS224JWqJw+f0ov/YnATgcMi4i8BeAtdifpX9yf+4WE7tt
-+FzJS22jKSfVeP4DUROCCcMmXgORU4KPpL/qvD8CwndtvwuZKW20dUVIcEE4Hxkyi8BHon7uC/2L
-Cd22/C5kpbbT5/8AoTKFG/iWE7tt+FzJS22nMomUKNmLCd22/C5kpbbTmUTKFGzFhO7bfhcyUttp
-zKJlCjZiwndtvwuZKW205lEyhRsxYTu234XMlLbacyiZQo2YsJ3bb8LmSlttOZRMoUbMWE7tt+Fz
-JS22nMomUKNmLCd22/C5kpbbTmUTKFGzFhO7bfhcyUttpzKJlCjZiwndtvwuZKW205lEyhRsxYTu
-234XMlLbacyiZQo2YsJ3bb8LmSlttOZRMoUbMWE7tt+FzJS22nMomUKNmLCd22/C5kpbbTmUTKFG
-zFhO7bfhcyUttpzKJlCjZiwndtvwuZKW205lEyhRsxYTu234XMlLbacyiZQo2YsJ3bb8LmSlttOZ
-RMoUbMWE7tt+FzJS22nMomUKNmLCd22/C5kpbbTmUTKFGzFhO7bfhcyUttpzKJlCjZiwndtvwuZK
-W205lEyhRsxYTu234XMlLbacyiZQo2YsJ3bb8LmSlttOZRMoUbMWE7tt+FzJS22nMomUKNmLCd22
-/C5kpbbTmUTKFGzFhO7bfhcyUttpzKJlCjZiwndtvwuZKW205lEyhRsxYTu234XMlLbacyiZQo2Y
-sJ3bb8LmSlttOZRMoUbMWE7tt+FzJS22nMomUKNmLCd22/C5kpbbTmUTKFGzFhO7bfhcyUttpzKJ
-lCjZiwndtvwuZKW205lEyhRsxYTu234XMlLbacyiZQo2YsJ3bb8LmSlttOZRMoUbMWE7tt+FzJS2
-2nMomUKNmLCd22/C5kpbbTmUTKFGzFhO7bfhcyUttpzCZQo38SwndtvwuZKW20dTVfvQQ+cmUXiI
-xFhxUsJ3bb8LmSlttGVPp8/C/go1fkTjky8RyqsB9T6KvD8CwndtvwuZKW23BKNR3wqftX+qCcRO
-JwyLiLxF4i0Ka8V/cuFhO7bfhcyUttuCKi/CpBRtOs74cnBF/qJ+oiRIkSJEiRIkSJEiRIkSJEiR
-IkSJEiRIkSJEiRIkReIv6hadFfl31d9EFc5flViuFhO7bfhcyUttv2ERrvzNT/VT4qIrf+TqIdVD
-qodVDqpqdVNTqpqdVNTqpqdVNTqpqdVNTqpqdVNTqpqdVNTqpqdVNTqpqdVNTqpqdVNTqpqdVNTq
-pqdVNTqpqdVNTqpqdVDqodVDqC/xorl0F/O74av+qfYsJ3bb8LmSlttyywndtvzD/9k=" transform="matrix(0.24 0 0 0.24 182.5615 150.499)"></image></g></mask><g opacity="0.35" mask="url(#SVGID_3_)" a:adobe-opacity-share="1"><path fill="#1D2915" a:adobe-opacity-share="0" d="M184.562,236.826c0,5.965,4.835,10.8,10.8,10.8h59.663
- c5.964,0,10.8-4.835,10.8-10.8v-73.527c0-5.964-4.835-10.8-10.8-10.8h-59.663c-5.964,0-10.8,4.835-10.8,10.8V236.826z"/></g></g><linearGradient id="SVGID_4_" gradientUnits="userSpaceOnUse" x1="226.1924" y1="159.7139" x2="226.1924" y2="200"><stop offset="0.0123" style="stop-color:#FFFFFF"/><stop offset="0.3788" style="stop-color:#F8FBF3"/><stop offset="1" style="stop-color:#F2F7E8"/><a:midPointStop offset="0.0123" style="stop-color:#FFFFFF"/><a:midPointStop offset="0.4383" style="stop-color:#FFFFFF"/><a:midPointStop offset="1" style="stop-color:#F2F7E8"/></linearGradient><polygon fill="url(#SVGID_4_)" points="221.189,159.714 214.142,180.951 224.048,180.951 214.142,200 238.243,173.61
- 227.655,173.61 236.978,159.714 "/><g><g><g><image overflow="visible" opacity="0.75" a:adobe-blending-mode="multiply" a:adobe-opacity-share="1" width="392" height="242" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAYwAAAD2CAYAAADF97BZAAAACXBIWXMAAC4jAAAuIwF4pT92AAAA
-GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAHohJREFUeNrsnYlu40gSBZMU5Z75
-/4+dbUsiFwtY2JrqvIqHSEoRACFZPtqk3BV8WVcvAAAACXouAQAAIAwAAEAYAADwWgYuwSp0XAKA
-wzJxCRAGIgCANf8fIxaE8RIxIBaA8yeMDokgjLkNfLfyzwOAfWTRNX49EkEY5h9N6+sIAuC8/++n
-mXKZjJ/5UfIYPuyPRXut9WOEAXDuxOGJYEqKZPpEebyjMOYKoTO+BmEAfIYwSjG0JJFaHm8rjncS
-RkYE2uutwkAgAO8liezzTPqY3jl1vIMwooa+fi0SRvQzshIBgHMKYwpez5Su3jJ1nFUYLWWlznne
-KpHW5AEAx5fF5Aijfi0jDy91nFocZxRGJgnUMvDkkf3arDiQCMD+YshIwxKE93xy5CGJ1HFqcZxJ
-GEsE4b0WHa3JA2EAHEcYU8PjlJREdESp47TiOIMwIlG0yqEPPl4iDmQBcCxpZMtOmWNs+Fy2n6M7
-kzSOLIy5oogk0SsfZwWCNADeSxhZMYzGYy2I8uslIY5TpY2jCiMzsikjCO2xDz4fiaNFGggDYD9h
-LJGF9uh9rq8+7hxxWLI4vDiOJozsKCdPFJoc5ry2JG0gDYDzJouxOrTXLJHUsuiKz4uROurS1GHL
-VEcShpcqNGFoZSZLBBfla6zXO0MeGXGQMgCOkyyyopgCMfzveDifs44yRdQlLKtEdei0cRRhaLKI
-UkXZoFtCeH7uUn3dJfF9UV8HwgA4tzDG6nktjYfy/OF8zhJLZ0hjEns01SHTxt7C8EpQmdKTlhQu
-lSguxmu1TLSfNac8hTQAji+MMZEsahHUx6g8743v1aQxOudzSGnsKYyoBOUlCk0StQQGRRrW4aUO
-bWRVpj8DYQDsI4xaFJEwPFk8FGHcDYGUR1/Jon7uzf84bIlqL2FkS1BWP8XFSRKDIozBEclgiMPq
-CJ8rDSQCsI0cWmWRTRaWDO7BYy2OXhFH2SE+BudymLSxhzAsWbSkCk8S3vNBkUdGGJE06pTUIgTE
-AbCOKLRylCYNqxyVTRV347gYX9sr4nhUotDKVPXw292l8WphtMrCSxWeEOrjqghDE0hUlrKkYaUL
-ZACwj1S8lBGli1oYWpL433Eznl8qWdxFL2trfRsiev/GIaTxSmFkJ99po5+0RBHJoXy8Bt+j9WmU
-/743qU/E7vxGGgD7JBBrCRCvs9sqRd2NZHErRDEY4iiTxV1p72ppiPx/IqDVr7GbNF4ljBZZaKnC
-E0UtBu3jq5E0PGFcgpJUH8gCcQDsJworXWQTRiSMWyWM5/Oheu3ZltzFLmk/lPbhkCOoXiEMreHM
-9FVYsrhWz8vjS3lNE8dglKiyHd9ewqAsBbB/KcoThjbvwhpCG6WL8vgu2pRb0XbdnGpFKY26vbCG
-3u4mja2Fkemz8EpQZWOulZq+gkdNIlFZaq4wBGkAHFYWIm2d3lG6uFeiKNPFt9Ku3ESfEOyJY3TS
-xi7S2FIYc2ThpQpLFF/Bx6U4auFckiWpFlkgCoBjiCPb8T01Jow6WVx/JHEtZPEt+oCaaD6XRUYa
-b1OSapXFEJSdsodVporKUZlRUpEsEAbAcaWhpYx6WK02lPamSKOWxVBIo1UY3QJpbC6PrYTROhLK
-SxW1LH5VUvhlvG5JQ0sXWv/FReYNp0UaAPvKYq4wxoQwvIQRlbojYayRNDaVxhbCaFmKXJNFPcrp
-q5LFL0UUGWlE6UJ7Y7MT9hAGwDmFEaUMb/5F3X/hjb70hulnZVFL4/Sd3l2iLNUHsrBKUL+M48v4
-2EoX0ZvqlaIEYQCcWhalNKwNkrz5GPeftuRWtCk30ed8aUsYzU0WdZoo25ZaHJsJZMuSVMs8i6iv
-opbEX4FAnt+jdXZnZaEtby6IAuBtUsac/oxaGoPy6A2mWZoupiJldK8uTa0pjLmlKK2DOxLFX8br
-WllKG5Lbsn4UO+0BII1B/uzLqG9Av+XPKQHZNsU7H22IcF2e0qRx2ISRkYU1g3sISlB/KY9/OUlD
-67vIyOKSKEO1JAzEAbCfKFqF4c0CL1PGUKSNm9hr1LXchHYJWYjoy4RYZSnZQhxbz8OIRDEYwvhl
-SOIvQxh/KenC6+hu7eSOpIEwAM4hjCXSuBRp47lW1F1p16wtoFvShSYLa++MUV7Un7GGMFpKUV66
-qPssaln8bUijFoY1u9vbOGnp8NkucX0A4LWyEGmbCT6KvnzIWMjiUcgjsyGbdQOa+V0nyW/p2r2i
-NLVmSWqJLLR0Ycnib6ck5U3S85JFy8KCSzq5kQfA9pJokUX52AdJo6/EkVmwdM6ci2nG0TmyWE0c
-S4URDaPN9ltkZPG3U5bS5l1kFhecu2w55SeAfcl0FncJgXh9G30hivqxXIE2Gl3ZO6KIymPZo0xI
-m/VjrFWSmjsqanBkYfVd/K2kC6uj25JFZ7yxraJAEADHF8pUvTYFjbZUd+5T0UY8hfEQfapAZnRl
-lCpG0eeHaB/XKcOS5CriGFZ6Qyx5aPMuhiBZ/FJkoaUMTRblMNpoFvfS3fOQBcB55DEp/3e9DuJa
-GE9ZWO1bpvRkNeZWp7u1Z0emNDUp579YGsOCNyBKF9HIqEFp7K1U4Q2lteZcWOu4tM6xoAQF8H7S
-EKN0Uz9qd/B90Xh3ku+r6IxUMTpHuWWsdvRGacrr09g9YWTnW7RM0rPKU9oyIN7CgpYs1twxD3EA
-HJcp+f9UuxPvFGnMFUUXpANLGJ5Qyu+t/+1Ddnp3iXKUNu/iy0gYvyQ/Qa8cGaUt+5FJFiJtI5+Q
-A8D50kVGIpNy0zgtkIYY/0b5PLOnuHZcqpTRK0nIK0+9TBjZLVfnzOrOJI0vQxbafAuvzyJbfmK4
-LMB7JAzv/+zU8H+9lEZL2zApopgMcURHVJrqRO+72a0Pw0oX0YZIVsKIylDWkuVav0UpK2upj7mi
-QA4A504YnkCmoLpQfm/r3hbWarmRHJ5rV3kpwytNaalqljiGhRc+U4qKNkb6ctJFnSa0uRaaLC7J
-ZEEZCgCBRCOoLHFMxd19JuVEndyeMLIpo98yZcwtSWWXL5/bf/El9kioL7H3tYhmW1rpYm4pCgDe
-RyCt4pCigRaxZ297w2fHIFWU6aJ8HOTf61uVbd5mKWOYcVFb08Wc/bm1RQTrVFH3WViy6INUgSgA
-oEUcWn9HL7kFEOtS1BiIojy+5P97cdSlqUfVDnspYzZLh9Vq+3Rn5mBcE6KwtlgtReEli16YiAcA
-64vDayt65XszQ2ejhFFu3FTuxfFQksYo+kitXfowOrFHSnmlqGgLVi9daEt9ZCbmibAzHgBsK46u
-kIFUlY3pp416CmNIlqNulShuRVtYbuB0r26aR6MsNYm/d8aqwpi7DEhm74urU36K9rTQ1p23Fg9E
-FgCwpjjqmeFdlTK8ctS1eNT2DP+qZPFVSOMm+grcUV/G4s7v1j6MOcuYe3MwNGl8KV8b7cFd/w4i
-/pR8RAEAc8QRSUOqlPH8+jpljEVJqZbGl5Iq6qPc7e9eScPry5AlKWONeRjeUNpLUI7SEsUg9sxt
-bwZ3L/RVAMBr04bXCT5Wpam6XF+WpK7y7z6Ka5EqynQxiL2DaC/xaKnNJ+5Fayi1jpQagtKTNXN7
-SKSLaClhZAEAa6cNSxrlXX5fpYyxaNdqadyVdnBuyli187ufeaG0foJMyhgMMdSlp0wZykoXIu3b
-qAIAzE0b2nNtBGl2YdbBaRsHJ2W0rMg9q23sGy5My2S9PnExhsTFyG6BmHkDAQBeLRFNGpeqNOXt
-RJppG7Wb6i6Qxiz6hpP3RNIHCSNj0swF6WaUopAFALwyZWRvri1xXIL2sWVqQbR67qrCaEkaLUNr
-6wtxCWRh7ZVryQFJAMAe0ojazWe7dWlsI6/JhKG1l6KUoma1lf3Ci2RdiGyyuIg+CspbRLA3TD7n
-jQQA2EIe0Y21Nw1hUB6z0sgkDC8dLRZGNlVkR0hZpSdLFpfkBVhkTgCADVJGZoM5qyLjyaN1o7hV
-+jH6mTHL2gcjugjWBfHKUN1WJw8AsFG6iGSRLeNn2spoFOlqbWXfeDG6IHK1ysI76cyOeaQLADhr
-maqfIY2L5Pt5rQ7vzYfVZspUfXC0CsLq5LbGEgMAnC1laP0Z1giqls7ubBl/k07vaOiYtp6TdjKa
-JKJJJ9n5FqQLADhj2vCG20Y33NlSVNfwu62SMLqkNb2E0SviyMzgXrUOBwDw4pThrY6R6QPOVmo2
-7fvNTNzrgs9F9bhIHH3ihC07C+kCAE4mE00ctUCiakymhN+vfZPdz4gm2fHFXSALK0V409pFWPID
-AM6XNrwUklnANSpZzRlS29x+zllLqiVpZBKHNwoqE6OQBgAcXRTeIoCd0x564siW8K2RUs0MMy9E
-9tBOwNv4KFtjQxwA8C5C8drOLlmlya4h5a21Fy513q948llbdo48okglQn8FAJxLCt68Ma1Bt9pD
-7fW1O7q7LYQRxausLaPaGivPAsC7yyTbZnZiTznIyENk4UipfuZJtp68VXLyxJGZoEfaAIAzSaJl
-TtuaCWOVdrJ18UHrJCNZRFErU3ZCCgDwjglDa+u6GQkjszjr5sLIJI2oA8dLGtKYMBAHAJxVDJ4s
-Mmv1ZWURlaNeKgxJnmBmT9kueZFFKEEBwGdJJjui9CU7j/YrnJTX6Gcn3m1SbwMAOEnyyDT4SxNF
-tGrtLGF4nc3euN7MbMKsGDIlKMQCAO8kjeyNdIs0Vm0vt+jDiGQS2TVbtgIAOKMkoopMa5uaEc4q
-9C+8EF4UmyMpAIB3Tx4tfcGb32T3G52sVzN7iQkBAA4ogJYbbetjbxe9zFp8s8v8/Y4XCQAAkeiN
-uwSJQiQ3qbn1Jn/zhNHNuDCR5RAKAHyKLDKfjxJG9t/YpdNbpH1/7ZY4BgDw6TKJSvWtW0Espt/g
-ROes/eQtxYtQAAAOsJFc/6KTmxPJAADAF8RL29F+5xMHAEAGfz5fvHfFFu1tf8ILCgDwbrLIrAi+
-xs/+CGEAACCX/FpTm9x4IwwAgPMkka2+/jDCoJwEAPAGbSoJAwDgwxr+owuDlAEAcHJIGAAAgDAA
-AD6At5jpDQAAJAwAAPikdIEwAAAAYQAAAMIAAACEAQAACAMAABAGAAAgDAAAAIQBAAAIAwAAEAYA
-ACAMAABAGAAAgDAAAABhAAAAIAwAAEAYAACAMAAAAGEAAADCAAAAhAEAAAgDAAAAYQAAAMIAAACE
-AQAACAMAABAGAAAgDAAAQBgAAAAIAwAAEAYAACAMAABAGAAAgDAAAABhAAAAwgAAAEAYAACAMAAA
-AGEAAADCAAAAhAEAAAgDAAAQBgAAAMIAAACEAQDwMUwIAwAASBgAAHDOlIEwAADgUMKYuNQAAOdu
-F0kYAABwGGGQLgAA1mtHd2tTSRgAAOeThvX58vhYYZBSAOBTJDAl0sXU0EauJhESBgDA/tKoG/U1
-GvnVk0a/08UhNQAArJtENqff4KQydbTpyBcFAODA0titA7xf+MtPM09YuwDT1nEKAOCEaSLqw5he
-1Wb2K51c5hedErYkUQDAJ0ohalen4KZ9esXN9h4zvefIBQDgE6QxSVyJmSRXllq9xN9vdBEiM2ai
-FwDAp0hjMm6sWxKGN9oqandTbW+/0clnkkXr8DFkAgBnl8KcG+dJ/AFFU9DGZqUQ3uT3G1yUKGJ5
-1pyEkVIA8BkCySSOKHVMiTZ2tfazn3liU/IEopPPXBhkAQDvKIu5N9JTcGx2o903xpLopDIXyJNB
-JIgp+XsCAJxBHNkb6czN+ZT8Ppl7Q96vcNItJxHZUoKTRBAA8K4CiYbIPp+PDW1t5qb+ZcKQwIxZ
-C3oJA2kAwLumi0w7OiqSGKWtI3yV9rNPntyc2KQdkRk9cQAAvIscJidZWG3mqHy89IZ804SR6Zix
-RDFWJzlK23Axz4zIBQDOJBCRuDQ/OqLItKOrDx5asw/DkoRmxFH5mlH8OhzDbQHg3WQRtZuZhDE6
-clky9201YURlqDFIGGODGT0rAwCcVRxRKX9MtJ8tJarF7WffcIJZY3mmtKJVFK+s+AYAcBYxRJ+L
-Sk5jcMzp12iq2myVMFpO0CpXtdoRgQDAGSQSdW5bCePRII1R8h3tL1lLaq4kyhN/SNwhHtkaUQDA
-UdOFVRXxkoUmh0fQfmZK/SILy/t94mS9dUsiI3on6J209jNF4o5w5AEAZxFHNM/iURxLZbFKGT+7
-ltSUSBjRCKjoRB/BBaQjHADOKAmvKqP1UTyM9jFqQz2BaL/D6sJoPenROdHoKC+EVdfLCAJ5AMCR
-xJGpzHg32I9EW9pSltosYXiiECNWRXW4R0PUmrOoFgDAEdOFJpEoSTyPe/U4VxpzfvdFCSNKGi1W
-fF6Au7T1a7SsagsAsHe6EMmVo7yb63tSFF5ZalHq6Gc2utnRUZEkshdgSpw8ogCAI6YLWUEUd+fj
-pQkj3W6uMXEvEkdWEnfR63abxSsAgBeki7k32Hfj0BJH3W5uMlqqbzh5TyCtUSpzEVpKU6QMADhi
-uvCE8VBuqj1R3IMb72iY7WLmrlabnXuRsWXGng/xZ4KTMgDgiOlCGiowLdKIOr6jzetm7ZGx1bDa
-TN/F87glLkhLR44IczQAYL90kZnYbI2EqtvEW4M8Mqt/L2of+4YLEfVfaOb0TvJWXIybcWE8e86Z
-owEAsJUsrOkGmVLUXZFG1D5mb7BXm4vRz7worQkjEsVNsanVqROtzLjYogAAM2URdXA/GtrIW0Ic
-L524Nyy4UJm+jEdwEerj+vM4/DxeiuN/P6P7kdz487z7ed4rF6P7ea0rfueOv3EA2KAMJZLbEygr
-iqjNbE0X2u/YfEM9JC9MV/3gLlGWsmpz1vH98/uUx70QRl8cXXFIJY5IGoI4AGBFWbR0cFtTDeo2
-8ltpH7W+jUyHt7fH92YJY3JEkZFFfVG+fxLFd5EsbkXCGKqEEQmjThmlLOp0QdoAgLVkUYujbrSt
-AUC3QBLWa9mEYW0V8fKSVH1xygbbGjJWlppuijQG5Yhk0SmJoa+k4EmDtAEAS0RRPnorz1ojoer2
-sD40aUQDgzJbts5KGUPDxeoco0bjiy9KuhgUWVyLz1+MhOEJoyt+v1H5Gk0SpA0AyIoiksUYVFse
-jizqR00ac6YeTMnzWj1haHfpVsdOb0SwoUgadbK4FsmiTBnZhNFVKUNDEwdpAwCyohCZtyzSwyhD
-1cdvI2lEKcOTxSpTEJb0YZSNb1mailLGUxpRGWqoRKHJonMa+k7aO8ERBwCiiEShVVesEaLlTbM1
-2Oe3IwpLGLdkyvDKaZsnDE0cXSGLTMrISKNMFhdHFpYwpkIWnZM4InEgDwBEYcnCWnVWW+LDE0Ut
-jUgcmc7uVdeQWiIMcS5iJmXcqpLTt/w5IqpFFlGjXs/b6BrEQeoAQBTRpLxphiwsUXji8EpSWv+F
-yEqd3XOFMTl34V7KuFelpUtwaGWovlEW5UXqg5SRKU1NhmQA4NyCyIpCjGShDZ3V5lV8B3L4bXzu
-OyhFeSOkWs5/s4RhDVEt7+QfRUNfSqNMGV6qqKXRBymjlsTFKFPV3zsVH7eUpqagzAUAxxRDNmFk
-k8XDSBfaCKhaCv/5OTxpRB3eXt/FquvtrdGHUd+p18t2PIqGXytNXZTk4U3Sy7zxtTiespjEHmk1
-JctVmWQDAOcSibXQamYDJGvobCmL34njP+L3YWRLUasOpS25zPy+srPZKhFpX+Md3pDZqA+j5Y9k
-6UXrFn4eAPZPGNnyU3borCaLm1KG+k+VLLzDG17rSWOTdLFEGCJ+B7IllEgCEryWbaCjWZlrxVlE
-AXA+cSyRxST6sFlNFjdHFnU5yhPGb0cW1gipTSofwwpvRl3S0dZ+19JEn0waljCiIW7Px6EqS12K
-z2n9IyL+pEBGTQGcUxaZ5T2iDm5v8yNtUp7VZ/FPQ7Lw9gpqWdJ8t+XNPVlIUhqZklSXSBGj2JNn
-roU0xh9ZjIU4ns9HRxzWo9dBjlAAjlOGmgJJiCzbz8KSxbfofRSRLH47Zaho7oXIhpvKrTUPo1N+
-wbFoOLPSyAgjMw66vJClLMpjlD9HYdXikMSjJocu+SYhFYBlMmhJFa2y0EZCZWRxE33IbC2Hf6rH
-WhatI6M230RurZKUNcy2FkerNLw33lvw6/mmXos3tlyj6iH6aKw+WRaLZIEgAPYTSKs0rEUEvdFQ
-1uZH2qQ8r5/iH4k7uVtGRmlltdVYM2FYb9RYNbgZaXiNq/amWtseatJ4iD9JcKk0WjrnAWB7aXhr
-QXk3oJP4o6G0mdzakh9WZ/c/Ys/DiFanrTdM8q7BoUpSUWmqbOSz0rB+flSGeiSkcRF7rw1vhrlI
-bhgx0gDYVxhT0GjWd+FjsmJxF31TuGg2dzSk9rdRjlpj7+7DJYxsaapMG1oDG02Es5ZR90RRvsHP
-pdOfW79mpZFdUh1hABxfGN5EvKws6r6Let8Kq/8imt3tLWWe2fNis1LUFgnDeyNHpeF8JGThJYxo
-8kx5J3AtJHFVUoa1LIkmjH6mMJAFwPbCyHZyjzOqFlay0Pa1aJnR7Y2KinbV82SxujS2Kklpo4Qm
-RRwtPzsShZUqvooL/0wX9QZN1gq5njhE2kZSIQ2A7WQxNT5qZai6P3SU3G559RIgVsqwEoW1wGA0
-jFacEtQpEoYnjXLOQ7bxzAyh9UYtfBXiuMq/d/UbnKShiWOuNJAFwHGkYQnj0ZAublU5yts5L1qy
-/DuQRVSCispzpyhJlfLwImGLLKw+DC8yluIYKnFo0uiN8hTSAHgfYYwSz+HKlqIyW61qaULbqzsq
-Q2X7LTaTx7DRm9gF4sjKQpKi8IRx/XkjalnUfRmeNCxhRP0ZCAPgGMLwZDGJP4imlsXdKEdF+3Pf
-xO+rqDu4DyWLLRNG1J8RScMaAjc69UUrXVyrhOGVpYbGlIEwAM6TLsZkwshULW4N0rgpj9oM7nr4
-bKss3qIkNVcaIvl16LWRUc9SVJkwhiphWH0ZLSlj7dngANAuCi1R1M+z6WIUe85FnTK+FWnclBRR
-J4rspLwWWWwujuGFb3KLNDL9F1Z0/DJKUbUwWstSnjSQBcDxpRHJIprRHaWMmyEIL1FEqSLb0X36
-Tu9SFFlpTOKvSZ8dVntVRKEJo+78tvYWvyQSBsIAOFZJKhKG1p6MTtXCGimlPY9E8RB9BvdDkdok
-L1qN9ggJo0Ua2T0vvIRxlT/7MKwSVDS8NprINzdlIA6AdUQRJYy6HOUtLGi1KZnSlCWSjChaS1C7
-yGKPklQkDS1teEnjUr3JQ/H4nKh3q4RxUaRxCRJGZngtHd8Ax0oYmXJUZq+LaB0p77WHxP0UD4nX
-htqlz2IvYWSkMUnbHhhjII5aCjcjTXjlqOxcjEgaiAJge3FkN0NqmYORKU9ZcmhJFNYM7sPI4tXC
-mFue0t703hFH+ca2pIkoXWRkkU0ZHogFoK1BbNk9L+rH8OZ5ZYRgPc+Iwis/7S6LPYThSUOTxyh/
-7hNei6N+oy/y7z0v7skk4fVdZIWxRBaIAmC+OLKyyHZ+eyth3wOpRENkWzc/OoQs9hJGNmlMSmNc
-v+F9lTZ6+fduehdFHPXn+oQoMsIQsffKQAwA24ukRRqZlOF1hkevWf0To1IWkzPIYk9hlCffGc8l
-SBudkjaejXmdNHrjMRLEnHSBMAD2k4WIP2CmRRqePEbxl/Cw0kRUftp1nsWRhdFaotI6xbW00RWl
-qmfi0NJDS5pAGADnF4ZIbk0pSxjWx1lJjOL3URwyVRxNGFrasGRRp43668dKFmVD/0gKwtqiNdrn
-m/kXAPsJQyS3rPmkNN7185bDks00s/R0WFkcSRiiJAxLIJNxh1+nkzFICr3zemY01JzlzZEGwD7C
-kERpKtv4j4mUUm9L3ZImpqNe+OHAfwzRwoWROLoqcXTiL1MepYmlu+0hCoDXlaZapZFJHlMghslJ
-FJnf7dCyOKoworSREYcYAukqeWTkQKoAeO+kIQl5eK+PkptDccpUcRZhiPgjqTKd4p2TRGSGIJYI
-A2kAbC+LrDBE8qOpWo45SWI6y0UfTvbHEZWp6mSSafQzH4vkJ+chDIB9hRHdxWdGKUWL/0Wd2G8l
-irMJQ5OBKOnDk4bX6GdSw1qLCyINgNcKo0UakUhE5o1yOrUozioMcWTRkjqyKSGbJOjgBjiuSLyG
-u6V/YU5fxFuI4szC0N6MOaljmiGDTOkJUQAcM31MM59PC37GW4jiXYShiUMkP7JK+16SBMBnp45s
-w9/6McI48B9GlDrq2eNTQjgIA+D9hLH11yCME6cOCdJHy89AGADnFEbm89PCr0UYb5A6ZIFAsn8o
-SATguIJo+fppxX8HYZz8D6n75DcfAGE0ff3HtxEDf1ipdNDyh9LxhwVwOmkgB4Sx6h9Kxx8aAGJB
-GLDmHxb9FwCIAGEAf6gA8Ln0XAIAAEAYAACAMAAAAGEAAADCAACAs/JfAQYAL3iXmIlSiu4AAAAA
-SUVORK5CYII=" transform="matrix(0.24 0 0 0.24 179.2061 198.1514)"></image><g><radialGradient id="SVGID_5_" cx="225.1929" cy="226.1387" r="30.8299" gradientTransform="matrix(1 0 0 0.75 0 56.5347)" gradientUnits="userSpaceOnUse"><stop offset="0.0123" style="stop-color:#FFFFFF"/><stop offset="0.4828" style="stop-color:#FDFEFB"/><stop offset="0.7611" style="stop-color:#F8FBF3"/><stop offset="0.989" style="stop-color:#F2F8E8"/><stop offset="1" style="stop-color:#F2F7E8"/><a:midPointStop offset="0.0123" style="stop-color:#FFFFFF"/><a:midPointStop offset="0.8025" style="stop-color:#FFFFFF"/><a:midPointStop offset="1" style="stop-color:#F2F7E8"/></radialGradient><path fill="url(#SVGID_5_)" d="M186.706,235.825c0,5.965,4.835,10.801,10.799,10.801h55.374c5.965,0,10.801-4.836,10.801-10.801
- v-19.373c0-5.965-4.836-10.801-10.801-10.801h-55.374c-5.964,0-10.799,4.836-10.799,10.801V235.825z"/><path fill="none" stroke="#EDF5E5" stroke-width="5" stroke-miterlimit="10" d="M186.706,235.825
- c0,5.965,4.835,10.801,10.799,10.801h55.374c5.965,0,10.801-4.836,10.801-10.801v-19.373c0-5.965-4.836-10.801-10.801-10.801
- h-55.374c-5.964,0-10.799,4.836-10.799,10.801V235.825z"/></g></g><path opacity="0.74" fill="#FFFFFF" a:adobe-blending-mode="lighten" d="M263.623,229.595c0.037-0.364,0.057-0.734,0.057-1.107
- v-13.375c0-5.965-4.836-10.799-10.801-10.799h-55.374c-5.964,0-10.799,4.834-10.799,10.799v7.324
- c7.545-1.012,15.699-1.566,24.213-1.566C231.959,220.87,250.812,224.252,263.623,229.595z"/><linearGradient id="SVGID_6_" gradientUnits="userSpaceOnUse" x1="225.1929" y1="204.3135" x2="225.1929" y2="246.626"><stop offset="0.0123" style="stop-color:#FFFFFF;stop-opacity:0"/><stop offset="0.0141" style="stop-color:#FDFDFC;stop-opacity:2.231669e-04"/><stop offset="0.1344" style="stop-color:#BEBEAF;stop-opacity:0.0148"/><stop offset="0.2565" style="stop-color:#94957C;stop-opacity:0.0297"/><stop offset="0.3796" style="stop-color:#747759;stop-opacity:0.0446"/><stop offset="0.5029" style="stop-color:#5D633F;stop-opacity:0.0596"/><stop offset="0.6263" style="stop-color:#4D552E;stop-opacity:0.0746"/><stop offset="0.75" style="stop-color:#414B23;stop-opacity:0.0896"/><stop offset="0.8742" style="stop-color:#3B461E;stop-opacity:0.1047"/><stop offset="1" style="stop-color:#38441C;stop-opacity:0.12"/><a:midPointStop offset="0.0123" style="stop-color:#FFFFFF;stop-opacity:0"/><a:midPointStop offset="0.2901" style="stop-color:#FFFFFF;stop-opacity:0"/><a:midPointStop offset="1" style="stop-color:#38441C;stop-opacity:0.12"/></linearGradient><path fill="url(#SVGID_6_)" a:adobe-blending-mode="darken" d="M263.68,221.954v13.871c0,5.965-4.836,10.801-10.801,10.801
- h-55.374c-5.964,0-10.799-4.836-10.799-10.801v-13.871l0.038-7.704c0,0,0.923-9.937,11.173-9.937h54.962
- c0,0,10.063,0.328,10.801,10.799V221.954z"/></g><g><g><image overflow="visible" opacity="0.25" a:adobe-blending-mode="multiply" a:adobe-opacity-share="1" width="30" height="30" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAACXBIWXMAAC4jAAAuIwF4pT92AAAA
-GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAuJJREFUeNrsl9trE0EUxjO7m5vW
-tKFN1RqLCmqlIvjgkz5I/cOFIqLggw9KsRHxUo1IdEtactG9+A1+A8dxNrsxK/rgwI9lt5ueb875
-ZuZspfJ//Bhqjvc0AfCIHClIQEzSMkUoBqyCJbAKWrxXQoBmBL6AQzChmGQREWbmNQY/DS6Aa6AL
-mtZvdcDPoEcOQEgxUV5mVMYzH5wCZ8FFcJ0CLoN1UHeIGII34AV4BvbBW4qbzsqKctzruq+ALXAL
-3ABXwAafNyjS9sQ3cAwG4BXYA0/AU/AejLOE+I4MtME22AH3wE2wyedNivSFQT3eB/y79kwHnGE2
-v4IjinCaNrBEtJiBu2SLs686VkRWGRt8/wTL5jFwxIxMbSGB+Ac1qtcluEMBbWslFDV7QBFdlmBE
-bwxZtthVDn1dpgF3WIIOhakF9iCf2ajQK32W5hcRJgvnmYHb9ECzQAnyhif8o7PxkWImsiQeRSyJ
-fWCjJAGy5G2usKtgzc6wx5dWxT6wYhm2jKNBm/UcV90m/aLsdLVoonX+QJV8RvmcXNflNVOOKktQ
-Fz4p+6AMrBg/GUeeFWUHd51HyuXevz7+GRELNSRzjMwYnmhI5Laa/gEBYxEjskVE7Ih67AeOi3ZE
-BYc55j+xxzjgpBMpImZL1mNDMuDxm5aYBT2x1+wx+vZJ6lt94kl2Ux1uWl4JWZhy9g/AQ/DOPjt8
-q0ULuLebhiRYYO8wPUTIdm+X1zDrKE/FKjH95TL3eP83MiIF7FHAY2ZkYpfadxhoRE80WJ66EKIK
-BE9YAiPgPkW8dPUSFUfDGnMpHVmKvQJCEoofcsamBLs0fOgSUMnomo2QQ66UAbMTi4+hmOk2mGZW
-B39OE+rgj5iBcNb3h5qxk9boDb1SLrEh2c75+NlnCfT1A4OP8nZiVeAT0IhZY0Ni+gHP8oEpQ59Z
-HHP2uRtfkeUnxTj7AWHqMU0ZiRVX2ld5kZ4jnSewHN8FGACSOOKkAlOGAAAAAABJRU5ErkJggg==" transform="matrix(0.24 0 0 0.24 199.0298 216.5547)"></image><g><radialGradient id="SVGID_7_" cx="202.6289" cy="219.7041" r="2.9995" gradientTransform="matrix(1 0 0 0.75 0 54.926)" gradientUnits="userSpaceOnUse"><stop offset="0.0123" style="stop-color:#FFFFFF"/><stop offset="0.4235" style="stop-color:#FAFCF6"/><stop offset="1" style="stop-color:#F2F7E8"/><a:midPointStop offset="0.0123" style="stop-color:#FFFFFF"/><a:midPointStop offset="0.6235" style="stop-color:#FFFFFF"/><a:midPointStop offset="1" style="stop-color:#F2F7E8"/></radialGradient><circle fill="url(#SVGID_7_)" cx="202.629" cy="219.704" r="2.999"/></g></g><g><image overflow="visible" opacity="0.25" a:adobe-blending-mode="multiply" a:adobe-opacity-share="1" width="30" height="30" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAhCAYAAAC1ONkWAAAACXBIWXMAAC4jAAAuIwF4pT92AAAA
-GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAtFJREFUeNrsmP1LFEEYx292Ts3V
-9ujFrCiwFyPShH4I+imoiPqbhYKIoKigN0W8SulNIrOU63S921u/A9+BYdm9mbndg4IGPiynuzOf
-eea52WeuVvvf/Joo8VwA6rxm+0lBD3R5TYctpu6XYBRE4DiYzMhpqRbYBDtgHyQ+gsIzQmMUOg3O
-gzkwzciZTUXqO1gCH8E3CsauERSOUiOgAc6AC2ABXAYXwZECsV/gPVgBb8AH8AVsg45NTjhKTYGr
-4Aa4AmYZqYjLmpdj+4ySilwTLIOn4C34YZOTjlLXwH1wC8xzKSMureQym0g+O85ITxP1uU3hPS6r
-t5j63zFK3QM3uYwNQ0g45KUSPMSJNLjsLS71blHUZJ9Ox5lDSuo2k32SHYsBvslKcAIc5jJvUK7r
-I1ZntK6Du8yryBJhW9P73hi3jg2ym7ek0hKtO0z4E5xx2RYYOany7DPYyotaUPCwyoVL3KemKpLS
-TX+h5jhGI88jT0x9/U9yrzoHwoL7ykQtZN8LHGvURUxy05xhntWH8I7WOTzDsaSLmOAMQl6DIYgF
-mTGEi5iWEyWqD9dtpHCMoPaXtn9KrHSR59CsYxSJ6SKv1e9FW6L1MmM4iXWMIu8ri7u04mjF7HuJ
-Y3VcxLqciaqfVlnYJRWKJexzlWNs5r2SZMGMNOp1cRYc5atEVBCtPVazD8AzHzHdQUKZUyzywoIT
-kY9Uh9XrC4o1WTimPmI9ouv9iAXfIHKm1GtKvSyKlq2C1Una5sMTLBRHPN4MOvIxpV6BRfCEJU/s
-W8Ganf4xzoaCf5dGaS36JHnMKnWNUg/BY35uD1rza7ku5bY4658cMDHkEt6nUZP4TQG1dI/Ic/CJ
-/SVVHHglS2J94pnluXLecuB9x3Nlk5+3jUlV9hOBMAQjCpn1lMikgFrCdQrtGEKp62CDlCtaMLQc
-eNu+QmV/7XGp2cyN2rsdCDAAoyXZx8WJpTUAAAAASUVORK5CYII=" transform="matrix(0.24 0 0 0.24 213.9448 216.5547)"></image><g><radialGradient id="SVGID_8_" cx="217.5439" cy="219.7041" r="2.9995" gradientTransform="matrix(1 0 0 0.75 0 54.926)" gradientUnits="userSpaceOnUse"><stop offset="0.0123" style="stop-color:#FFFFFF"/><stop offset="0.4235" style="stop-color:#FAFCF6"/><stop offset="1" style="stop-color:#F2F7E8"/><a:midPointStop offset="0.0123" style="stop-color:#FFFFFF"/><a:midPointStop offset="0.6235" style="stop-color:#FFFFFF"/><a:midPointStop offset="1" style="stop-color:#F2F7E8"/></radialGradient><circle fill="url(#SVGID_8_)" cx="217.544" cy="219.704" r="2.999"/></g></g><g><image overflow="visible" opacity="0.25" a:adobe-blending-mode="multiply" a:adobe-opacity-share="1" width="30" height="30" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAhCAYAAAC1ONkWAAAACXBIWXMAAC4jAAAuIwF4pT92AAAA
-GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAttJREFUeNrsmO9r00Acxptc1m6d
-Fn9M125sU4RVpyjiSwXB/9wXulciiE4dhpUMpwzFUa02XdP4HDwHR7hcLk0mCh58WOnI9548973k
-uTYa/0e54c15nQ8E8TJ1UpKQ2Z8QJgUtgDa4CC6AliZOiYrBCfgGfoLTsgK9OQStgE2wDa6DDv+v
-hhQwBAdgH0TgS1mBLsIEBV0F18BNcJvC1sCyQdgIHFHYG/AODMAxBSZVhQXgHJ15AO5T2Aa4TMHC
-0GMJBXwFhxT2Erygkz/AtGhim1NS1A3wCDwGO+AKBS3QKS+nrlp6eQProKe5G4LvNucCS0+1uXQP
-wRNwj6JaFkH6SgitNxeJ0BwNueSzMsIC3ulduiX/roJmpp9cWkVQ1CrrqB17ws+TPGdM3y3Rftnk
-fTpVVlS2ZpN1+qy7znl8V2HSrUvcdbKnutryVRk+63RZd5vzBC7ClFvyMXALbHEDiJreNGpDbbH+
-Wp5rJmEd7sQ+n13NCq8uU881WbfPeTquwtq0u1ezW1nXepyn7SJM9dgSCc4oPBTO4Rus9jKJwatZ
-lGeZy+rYXzH+GWEpXxEq5Kl8VecwBcnURVjMgCcZn5GwsTZH7CJMD3khL5zWLGzKuiHnGZpe5CZh
-I6bO9wx7v+bN7YYxY70j1o/yEoZpKSdMmntMoMq1tIYlVG7ts/4x50tddmXCEDfgxRETZ1JRWMI6
-EesObGFRWCyfaa+oDl8jQd4DscApJUr21S54Dj7wu1JBUW2Ct1rybDDRntditUtPnWor8Aw8Zd2h
-rXdFQdGYd6WfbPTYnOeeEiSv/cTDyC5FvbL1luspSSXPFUYUmaHu8KS0yfjdMpySYp6QIop6TZdC
-njEnRTvdpVc8Lt0yBW4wS+04HHj3+Fg4pKARnUxdJnVNBL7hSNal4OxPBFLAZ/CRzumn8NR1wrKR
-xdfy1KLlwDvmw3RaRlDVX3s8h8dGWiUE/BZgAMf82R9IYLF+AAAAAElFTkSuQmCC" transform="matrix(0.24 0 0 0.24 228.8599 216.5547)"></image><g><radialGradient id="SVGID_9_" cx="232.459" cy="219.7041" r="2.9995" gradientTransform="matrix(1 0 0 0.75 0 54.926)" gradientUnits="userSpaceOnUse"><stop offset="0.0123" style="stop-color:#FFFFFF"/><stop offset="0.4235" style="stop-color:#FAFCF6"/><stop offset="1" style="stop-color:#F2F7E8"/><a:midPointStop offset="0.0123" style="stop-color:#FFFFFF"/><a:midPointStop offset="0.6235" style="stop-color:#FFFFFF"/><a:midPointStop offset="1" style="stop-color:#F2F7E8"/></radialGradient><circle fill="url(#SVGID_9_)" cx="232.459" cy="219.704" r="2.999"/></g></g><g><image overflow="visible" opacity="0.25" a:adobe-blending-mode="multiply" a:adobe-opacity-share="1" width="30" height="30" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAACXBIWXMAAC4jAAAuIwF4pT92AAAA
-GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAt9JREFUeNrsl91rE0EUxTOzm69a
-05YmVWsUFdRKRfDBJ32Q+ocLRUTBBx+UYiOitlqRaEos2UT3w3P1jIzrbHZNVuiDAz9CNru5Z+69
-M3O2Uvk/fg414zOCDzSxRwJiEJGkTBGKAatgEayCFr8rS4AwAp/BIRhTTDyPCDPzGoOfAhfANdAF
-zdT/SMBPoEf2wYBiQldmVAEBHjgJzoCL4DoFXAZroO4QMQRvwAvwDOyCtxQ3SWdF5QiQui+DDXAL
-3ABXwDqvNygy3RPfwBHog1dgBzwBT8E7ENhCvJwMrIBNsAXugZvgPK83KdKzGlTzu8/fpWc64DSz
-+RV8oYhfTetPEdFiBu6SDc6+6lgRWZNo8P4Flk0zcMiMSGkSP+MPalQvJbhDASuplVB0RfkU0WUJ
-RuyNIcsWucoh15bYgFssQYfC1Bz7kcdsVNgrByzNHyJMFs4xA7fZA80CJcgb2uofycYHihlrh4hF
-ax9YL0mAGT7LKivsKmjLpLXjplVrH1ie0ryzlkWa9SxXnWR5QTv6ocUmWuMDqlLu8Di5ruk1Vzmq
-LEGdD5QtQln7yI8YespZUXbwzBi6cgzGsRTx14ZkxvFbDJeI9Laa/AMBgRUjTIsI6Yh69ANH0xzR
-DMMc8x/pMcTwjNIiIlqyHg1Jn8dvUmIWZGKv6THk/Jh4GWqFE3RTHW5auoQsTDj7B+Ah2JOzI8vU
-RNxQ2pYh8efYO4yHGNDubfNzkHWUJ9YqMf5yiZ7AmyEjtoAdCnjMjIj5TbycBhqxJxosT90SogoE
-j1kCI+A+Rbw0XmKaxzQlCXjz2GpOXUBITPFDztiUYJsNPzAC8kQklpBDrpQ+sxNZL0MR020wZlaC
-P2cTSvBHzMAg/f6hCu6qNfaGrJRLNCSbOS8/uyyBfL5n8JFrJy7a7Solpk1DYrynTvWBKcMBsxhw
-9nEZL8S2GNtzuJo6YFOG1oor7a28iOdI8gLb47sAAwCDFN6m03jgxgAAAABJRU5ErkJggg==" transform="matrix(0.24 0 0 0.24 243.7749 216.5547)"></image><g><radialGradient id="SVGID_10_" cx="247.374" cy="219.7041" r="2.9995" gradientTransform="matrix(1 0 0 0.75 0 54.926)" gradientUnits="userSpaceOnUse"><stop offset="0.0123" style="stop-color:#FFFFFF"/><stop offset="0.4235" style="stop-color:#FAFCF6"/><stop offset="1" style="stop-color:#F2F7E8"/><a:midPointStop offset="0.0123" style="stop-color:#FFFFFF"/><a:midPointStop offset="0.6235" style="stop-color:#FFFFFF"/><a:midPointStop offset="1" style="stop-color:#F2F7E8"/></radialGradient><circle fill="url(#SVGID_10_)" cx="247.374" cy="219.704" r="2.999"/></g></g><g><image overflow="visible" opacity="0.25" a:adobe-blending-mode="multiply" a:adobe-opacity-share="1" width="30" height="30" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAACXBIWXMAAC4jAAAuIwF4pT92AAAA
-GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAn9JREFUeNrsl+lrE0EYxvdKjSZW
-YxEPxBsVrNdHQTxA/KMFBRGPDwoVVIpoq3jUeJUG25qk2fVZ+A28WTabxG4lHzrwgxw78z7zzMw7
-73reBDR/jOcCUREhn21LRCy6osfn0kT4BN0h9oiDoiGmTN8Efoum+CHWEBRvRoSbeZXgR8QZcVEc
-F7syfTcI/kq8Fgviu1jlv3hcET627xXHxFlxWZwXJ8RMxgmPIKkTn8UbMSdeinfiq1hnmUYS4QTs
-F5fENQSc4rfUgahgT7TFivgk5sVj8VQs4kqukGiAgCviDiKOijr/BUOWL7t/9uGaVyTEighYggsI
-uI79NQYfdY9FPF8x/WL2xiJLk9hOoelcJehtcYslqI8hYNDGrvP9G5t1PbtRQ+NIg/W/KWaxNNpk
-DnK5JZ35TzbuCq70ibAu3BBXxWHW1i8hGbpc0+akNLNuBDAtTopz4kBJAuxEC8cPzIlI88BpOoQl
-Xw1TuDtLsqvZkxbwUA2FjZxEVJYbdROj4mWOpVuzCMoWYGPlxggm4SrfFmFFJOTzDUi2KFY8KIYT
-sUoSWRadLRDSM0XPMgVPn4guOT0tSN6KVtHd/w8tYWJfqDHeM+m+jBkTeIEaoEmKTUp0oXD80Kjt
-kU4PkVSqJWTOhIDpFf5APBFLOOPliYhxZgYR00MKmVEEuKWeQ8Q8ruRe5Xb3po7s5CqvDSjnxhVw
-XzzjFu3k5XTbuuziNYLvZolCk+KHBU8n8QcBL8Rd8VB8yCto8kTEDNBCTIdBg4wQvyD4L6rsdOb3
-xKNhhW44IKm4wZaghSAnoIdrHWhz/m3wlOfiI86OXPJPzMvPxLwG/tcX4u3m2l8BBgBQ/dU5d1Za
-tAAAAABJRU5ErkJggg==" transform="matrix(0.24 0 0 0.24 199.0298 230.2217)"></image><g><radialGradient id="SVGID_11_" cx="202.6289" cy="233.3711" r="2.999" gradientTransform="matrix(1 0 0 0.75 0 58.3428)" gradientUnits="userSpaceOnUse"><stop offset="0.0123" style="stop-color:#FFFFFF"/><stop offset="0.4235" style="stop-color:#FAFCF6"/><stop offset="1" style="stop-color:#F2F7E8"/><a:midPointStop offset="0.0123" style="stop-color:#FFFFFF"/><a:midPointStop offset="0.6235" style="stop-color:#FFFFFF"/><a:midPointStop offset="1" style="stop-color:#F2F7E8"/></radialGradient><circle fill="url(#SVGID_11_)" cx="202.629" cy="233.37" r="2.999"/></g></g><g><image overflow="visible" opacity="0.25" a:adobe-blending-mode="multiply" a:adobe-opacity-share="1" width="30" height="30" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAhCAYAAAC1ONkWAAAACXBIWXMAAC4jAAAuIwF4pT92AAAA
-GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAmlJREFUeNrsmM9r1EAUx3cz2XW1
-il2wLLagIh5aeilUBC967EX/XA/1It5aUaiC2JNY/EWp0lZkG3c3id+Bz0AIaXayibKHDnzIJfPm
-s29eZl/Sas3paNeYZ0SHaz5OKmIx5pr+azF7fyh6oi+WxXURZGJZiUScim/iWERiUkWwXTFDlxG6
-I1bFBnKd3P1jpPbEvviE4JlvBtueUl1xQ9wVa2ITsdtkzOTmxGTsALE34oP4KH6I0TS5tofUJXFT
-PBCPxToZ67OlZTUWkSmbsffipXglvos/ZXLGI1N2qx6Kp+KRuFcgVYRh/oJYEgNxle08EUNqsbJY
-SDAnZa8r1FlYoQzc02sFF5n/W/wskzMlAReopydkaoVtDWocL1bqGtv8Bblx0YSgJFt9xNbJXLfG
-uZctjQEx11gj9M2YDXCFiVviflmAGeQCYtlt/MxTOvbJmEFkFZqSyu9GNr7xEXNP4gbnVK/mFhZl
-rUdsd0B3fcQCDs3lcw7PJobJrRH4iE37g24qa6VrBK05HRdiTYjVbvI8xtQ1isSyTd4pE5secW6N
-xEdslGnyDmhd0oazFRF7j7VGPmIxPdQ+HNMWNzUmBfFj3+7C1YDtMG7RT3UaONMS+jErtC1e05tV
-EksyPdkAyToHbsqW2e51R7ygs42qNooJaU/oPF2TF8wgl2SkdsVz8Y5sJVXFUvryX6TfNXld5HwE
-U37cWUbqGdfDsto1njVxQjscQ8jc8+SckO25jqipHTK1i+Ro1peR7FM6pKH7StAhC7uam7CQI+J+
-J7RNTb0lU7Vf3+b6hXeuPxH8948qF6Pq+CvAAGGezDColMK7AAAAAElFTkSuQmCC" transform="matrix(0.24 0 0 0.24 213.9448 230.2217)"></image><g><radialGradient id="SVGID_12_" cx="217.5439" cy="233.3711" r="2.999" gradientTransform="matrix(1 0 0 0.75 0 58.3428)" gradientUnits="userSpaceOnUse"><stop offset="0.0123" style="stop-color:#FFFFFF"/><stop offset="0.4235" style="stop-color:#FAFCF6"/><stop offset="1" style="stop-color:#F2F7E8"/><a:midPointStop offset="0.0123" style="stop-color:#FFFFFF"/><a:midPointStop offset="0.6235" style="stop-color:#FFFFFF"/><a:midPointStop offset="1" style="stop-color:#F2F7E8"/></radialGradient><circle fill="url(#SVGID_12_)" cx="217.544" cy="233.37" r="2.999"/></g></g><g><image overflow="visible" opacity="0.25" a:adobe-blending-mode="multiply" a:adobe-opacity-share="1" width="30" height="30" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAhCAYAAAC1ONkWAAAACXBIWXMAAC4jAAAuIwF4pT92AAAA
-GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAlRJREFUeNrsmM9LG0EUx5PdjTTW
-otDYWmoOQm2M/YGXnrxI/3IvnnoRW7TagocotqjQtLYp5pffgc/CECc7u+uGpuDAB2Y32Tff9+bN
-7Jstlaa0lXM+E4gIAsd/BqIHpj+cpLBY0Ix4JBbhwYg4I+SvOIdf4jqrwHIOQUvihXgtVsWCQ9gP
-8UV8El/Ft6wCyyl+DxH0XLwUb8UbxD0V1RE7ZtCO+I6oj2JPHIlTBPZ94sqe3yIi0hCb4h1Reibm
-iOK4HDPRuRJnRO+D2BGHRLSXJC7yRGpeNMV7sYXAeQSFCU6FRHIGB56IGveMI/uIGxu5JGFzTN0W
-wpqIijIsmpDFYZ55hah4xRpxP7MIM4NWWHEbTGGDKY1ybi8VKyVM/l2wYjtM+S1xrvww9x6KulgX
-K0QqvOOeGafGCnbrjOPScOtmnPA1Hm7Sr+TcjF2Rq2F3nb4zNVzCZsWyWMOr2XFe5WgB9urYX+ba
-KywkF1bJh8d4WWSrYLdhbdBhmohVrddNtYApLOUZI0jxgp6EMO8YQWlK272wuwobFlHkeVqqMVzC
-OlaR15mQMO8Yo8L6VpFnypNL0S1YWBe7h4wTVxneiP0RJ+KzaHE9KEjUAHst7J9wnWoqe7z9TVly
-QL9bwJQOsXOB3X36vbTVhfHqN16Zh49F2xXujK2PnWPsthhnkLYeiz0ziblrVZ55CkV7Ftrk1Q52
-z5NmIkowdsUBIrIqz7SltR2la0vUNhxhP3PNP7RCf4CouPIs4jDS9p2U/svj21QfeKf6E8E/+ahy
-37K2GwEGAJb/2mQI89WQAAAAAElFTkSuQmCC" transform="matrix(0.24 0 0 0.24 228.8599 230.2217)"></image><g><radialGradient id="SVGID_13_" cx="232.459" cy="233.3711" r="2.999" gradientTransform="matrix(1 0 0 0.75 0 58.3428)" gradientUnits="userSpaceOnUse"><stop offset="0.0123" style="stop-color:#FFFFFF"/><stop offset="0.4235" style="stop-color:#FAFCF6"/><stop offset="1" style="stop-color:#F2F7E8"/><a:midPointStop offset="0.0123" style="stop-color:#FFFFFF"/><a:midPointStop offset="0.6235" style="stop-color:#FFFFFF"/><a:midPointStop offset="1" style="stop-color:#F2F7E8"/></radialGradient><circle fill="url(#SVGID_13_)" cx="232.459" cy="233.37" r="2.999"/></g></g><g><image overflow="visible" opacity="0.25" a:adobe-blending-mode="multiply" a:adobe-opacity-share="1" width="30" height="30" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAACXBIWXMAAC4jAAAuIwF4pT92AAAA
-GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAnpJREFUeNrsl2lrE1EUhmdLjSZ2
-sYgL4lqsYN0+CuIC4o8WFERcPii0YEsQtYpL3cVgW7PMjO+F55ZhmMlMzATyoRceSDKZc957zplz
-zzjOBCz3P+/xRE34fE6uWESiJ0I+VybCxekeMSMOizkxlbATwx/xRXwXWwiKRhFhd17H+TFxVlwU
-J8W+lJ0+zlfFmngjvolNrkXDinAJ+6w4IRbFZXFenBLzqUg4ODGR+CheimXxQrwWn8U2aSolwgo4
-KC6Jawg4w28mAsGAmuiI3+KDaInH4qlYJyo7QoISAq6IO4g4Lppc8wrSl66fA0TNSQvJE+GRggsI
-uE74GxgvW8gB/68l7ouojXVSE/s5N9dxelvcIgXNIQTkFXaT718pViMiyjIa8OiZ/N8US4Q0GLEf
-2d5iauYHhWtqpu8PiMINcVUcJbduBY3R9poOT4rpJdteRi1Mi9PinDhUkQC7/Cz7aRH2iTB9YIEb
-/IqPiSmiu0Sza3gZf2qgcC6jEVUVjWbCR83LOR8CqFpAMu07PrxJOMp3ReSJiOnnfYjH5DdK+sgS
-sUkT+SW6YxASJoYe46OXFtGjp5uB5JVop8/+EVfMxj4xY7w1m/YywtRmGmqhtlNhNMIs+36O2pB2
-fYSmUq+gc8ZsyBzhD8QTsWEikyciomjnETFdMMiUEWBTvYyIFlGJ/ILqNRHZy1HeyBnnhhVwXzzj
-FO06BSHuUcVbON9Piuy7hlvCudnEXwSsiLvioXhnB5oiEREG2ojpYtRLCXEHOP/JlG12fk88yhp0
-/RJNxRrbgDaCrICQqHWhw/OfdG54Lt4T2dIj/8S8/EzMa+DYX4h3l13/BBgABM7SO70ZkkMAAAAA
-SUVORK5CYII=" transform="matrix(0.24 0 0 0.24 243.7749 230.2217)"></image><g><radialGradient id="SVGID_14_" cx="247.374" cy="233.3711" r="2.999" gradientTransform="matrix(1 0 0 0.75 0 58.3428)" gradientUnits="userSpaceOnUse"><stop offset="0.0123" style="stop-color:#FFFFFF"/><stop offset="0.4235" style="stop-color:#FAFCF6"/><stop offset="1" style="stop-color:#F2F7E8"/><a:midPointStop offset="0.0123" style="stop-color:#FFFFFF"/><a:midPointStop offset="0.6235" style="stop-color:#FFFFFF"/><a:midPointStop offset="1" style="stop-color:#F2F7E8"/></radialGradient><circle fill="url(#SVGID_14_)" cx="247.374" cy="233.37" r="2.999"/></g></g></g></g><path fill="#F5F5F5" d="M529.664,232.155h18.498l-2.809,18.064h5.59h37.586l2.6-17.718c4.98-1.091,9.133-3.455,12.512-6.693
- c3.084,4.075,8.566,7.37,18.252,7.37c6.338,0,12.775-1.807,17.174-3.687c4.254,2.399,9.463,3.687,15.459,3.687
- c3.088,0,6.236-0.355,9.426-1.023h67.135l3.354-24.827l-5.445-0.764l1.879-13.356c0.371-2.386,0.449-4.66,0.449-6.156l-0.008-0.375
- c-0.457-12.191-8.139-19.765-20.045-19.765c-2.404,0-4.623,0.314-6.676,0.852h-34.189l-0.035,0.244
- c-2.527-0.701-5.41-1.096-8.686-1.096c-3.801,0-7.406,0.555-10.76,1.598l0.105-0.746h-12.467l1.826-12.951H613.08l-1.846,7.658
- c-1.373,5.704-2.213,5.793-4.453,6.03l-4.508,0.477c-3.049-1.424-6.357-2.065-9.602-2.065c-2.135,0-4.275,0.284-6.416,0.852h-19.291
- c0.502-1.772,0.775-3.674,0.775-5.678c0-9.601-6.846-16.305-16.646-16.305c-11.055,0-18.775,7.721-18.775,18.776
- c0,0.951,0.082,1.869,0.219,2.764c-2.135-0.288-4.277-0.409-5.553-0.409c-2.053,0-4.072,0.288-6.045,0.852h-31.342
- c-2.74-0.553-5.641-0.852-8.537-0.852c-7.138,0-13.492,1.674-18.808,4.723l-3.451-1.461c-3.711-1.571-11.232-3.262-18.979-3.262
- c-8.933,0-16.383,2.56-21.576,7.016c-3.265-4.473-8.523-7.016-15.228-7.016c-4.822,0-9.021,1.477-12.572,3.44
- c-2.996-2.204-6.796-3.44-11.115-3.44c-2.327,0-4.48,0.315-6.476,0.852h-33.963l-0.035,0.245c-2.526-0.702-5.41-1.097-8.687-1.097
- c-20.458,0-35.307,16.031-35.307,38.117c0,17.363,10.785,28.149,28.148,28.149c3.087,0,6.236-0.356,9.426-1.023h88.816
- c3.706,0.676,7.669,1.023,11.154,1.023c8.907,0,16.278-2.375,21.51-6.593c4.872,4.252,11.585,6.593,19.728,6.593
- c3.053,0,6.206-0.368,9.286-1.023h44.664H529.664z"/><g><g><path fill="#383838" d="M340.308,218.463c-5.538,2.556-11.588,4.26-17.638,4.26c-13.377,0-18.148-7.839-18.148-18.148
- c0-17.893,11.418-28.117,25.307-28.117c9.372,0,13.973,4.26,13.973,11.247c0,12.184-12.865,15.763-26.157,17.126
- c0.255,4.346,2.045,8.35,8.435,8.35c3.068,0,7.243-0.937,12.355-3.067L340.308,218.463z M332.213,188.896
- c0-2.045-1.448-3.237-4.09-3.237c-4.771,0-8.69,4.175-9.969,10.906C321.818,196.054,332.213,194.265,332.213,188.896z"/><path fill="#383838" d="M394.07,221.7l-0.171-0.255l1.789-10.055l2.642-18.063c0.512-3.749,0.341-5.623-1.96-5.623
- c-2.642,0-5.794,2.727-9.372,5.879l-2.727,19.512c-0.171,1.363-0.171,1.534,1.022,1.704l4.26,0.597l-0.852,6.305h-18.404
- l-0.171-0.341l1.875-10.82l2.471-17.212c0.512-3.237,0.682-5.453-1.789-5.453c-3.238,0-7.413,3.664-9.714,5.709l-2.642,19.512
- c-0.17,1.363-0.17,1.534,1.108,1.704l4.26,0.597l-0.852,6.305h-23.347l0.853-6.39l3.749-0.512c1.107-0.17,1.363-0.426,1.533-1.704
- l3.579-25.987c0.17-0.938,0-1.534-0.767-1.789l-4.176-1.534l0.938-6.476h16.871l-0.938,6.987l0.256,0.085
- c4.43-3.749,9.116-7.924,15.592-7.924c4.687,0,7.839,2.641,8.18,7.753l0.256,0.086c4.175-3.664,9.202-7.839,15.252-7.839
- c6.22,0,8.775,3.152,8.946,9.202c0,1.618-0.171,3.493-0.426,5.538l-3.067,21.897c-0.171,1.363-0.171,1.534,1.107,1.704
- l4.175,0.597l-0.852,6.305H394.07z"/><path fill="#383838" d="M443.995,190.771l-0.17-4.431c0-0.682-0.085-1.108-1.022-1.363c-1.022-0.256-2.642-0.427-4.771-0.427
- c-3.579,0-6.391,1.108-6.391,4.09c0,2.727,2.982,3.749,6.731,5.027c6.05,2.045,13.888,4.431,13.888,13.463
- c0,11.076-9.372,15.592-20.193,15.592c-8.009,0-14.91-1.959-16.273-2.981l1.618-12.355l8.691,0.512l0.255,4.941
- c0,0.597,0.171,1.108,0.938,1.363c1.278,0.427,3.238,0.768,6.05,0.768c4.687,0,7.327-1.79,7.327-4.687
- c0-3.408-3.152-4.175-8.009-5.624c-6.135-1.874-12.78-4.26-12.78-13.206c0-10.48,9.116-14.996,19.597-14.996
- c6.646,0,12.866,1.533,15.081,2.471l-1.704,12.354L443.995,190.771z"/><path fill="#383838" d="M489.748,218.548c-4.175,2.386-10.395,4.175-16.444,4.175c-13.036,0-18.575-7.583-18.575-18.574
- c0-18.83,11.588-27.691,25.988-27.691c6.475,0,11.843,1.874,14.229,3.578l-1.874,13.377l-8.691-0.426l-0.255-5.794
- c0-0.597-0.086-0.938-0.597-1.192c-1.022-0.427-2.557-0.597-4.175-0.597c-5.624,0-11.418,4.601-11.418,17.382
- c0,7.839,3.493,10.395,8.436,10.395c4.346,0,8.436-1.448,11.247-2.556L489.748,218.548z"/><path fill="#383838" d="M491.364,221.7l0.853-6.39l3.919-0.512c1.193-0.17,1.363-0.426,1.534-1.704l3.578-25.987
- c0.086-0.938-0.085-1.534-0.852-1.789l-4.261-1.534l0.938-6.476h16.87l-1.107,7.669l0.256,0.17
- c3.323-4.771,8.095-8.69,13.548-8.69c1.874,0,5.112,0.341,6.561,0.767l-2.13,15.507l-9.969-0.341l-0.256-4.431
- c-0.086-0.767-0.256-1.022-0.938-1.022c-1.619,0-4.26,1.96-6.646,4.431l-2.981,21.643c-0.171,1.363-0.085,1.619,1.192,1.704
- l8.095,0.682l-0.938,6.305H491.364z"/><path fill="#383838" d="M536.094,221.7l-0.17-0.426l2.045-11.503l3.152-22.749c0.17-0.938-0.086-1.534-0.853-1.79l-4.175-1.448
- l0.852-6.476h18.149l-5.027,35.786c-0.171,1.363-0.085,1.534,1.192,1.704l4.09,0.597l-0.852,6.305H536.094z M541.973,164.102
- c0-5.453,3.238-8.775,8.776-8.775c4.175,0,6.646,2.215,6.646,6.305c0,5.368-3.322,8.861-8.861,8.861
- C544.358,170.492,541.973,168.106,541.973,164.102z"/><path fill="#383838" d="M556.796,239.764l-0.17-0.341l2.471-14.229l5.282-38.087c0.171-1.022-0.085-1.534-0.767-1.789
- l-4.175-1.534l0.938-6.476h17.041l-1.022,6.816l0.255,0.085c5.027-4.686,10.311-7.753,15.678-7.753
- c7.328,0,12.44,4.686,12.44,17.041c0,11.758-4.601,29.225-20.449,29.225c-5.538,0-8.605-2.13-11.759-4.345l-1.874,12.78
- c-0.085,0.938,0.085,1.278,1.192,1.363l8.606,0.853l-0.938,6.39H556.796z M573.837,209.517c2.13,1.789,4.942,3.322,8.095,3.322
- c6.901,0,9.458-9.713,9.458-17.211c0-5.027-1.193-8.351-4.431-8.351c-3.408,0-7.754,3.664-10.821,6.391L573.837,209.517z"/><path fill="#383838" d="M635.777,219.4c-3.749,1.789-9.458,3.322-14.229,3.322c-8.521,0-12.099-2.981-12.099-9.969
- c0-1.107,0.085-2.386,0.256-3.749l3.066-22.323c0.086-0.512,0.086-0.853-0.511-0.853h-5.879l1.107-7.839
- c7.242-0.767,10.906-4.431,13.122-13.633h7.924l-1.704,12.1c-0.085,0.596-0.085,0.852,0.597,0.852h11.758l-1.193,8.521h-12.439
- l-2.812,20.364c-0.171,1.107-0.256,1.96-0.256,2.727c0,2.982,1.278,4.26,4.942,4.26c2.385,0,4.771-0.596,6.816-1.363
- L635.777,219.4z"/><path fill="#383838" d="M671.817,218.463c-5.538,2.556-11.588,4.26-17.638,4.26c-13.377,0-18.148-7.839-18.148-18.148
- c0-17.893,11.418-28.117,25.307-28.117c9.372,0,13.973,4.26,13.973,11.247c0,12.184-12.865,15.763-26.157,17.126
- c0.255,4.346,2.045,8.35,8.435,8.35c3.068,0,7.243-0.937,12.355-3.067L671.817,218.463z M663.723,188.896
- c0-2.045-1.448-3.237-4.09-3.237c-4.771,0-8.69,4.175-9.969,10.906C653.328,196.054,663.723,194.265,663.723,188.896z"/><path fill="#383838" d="M703.596,221.7l-0.17-0.255l1.874-10.396l2.471-17.723c0.512-3.578,0.341-5.879-2.215-5.879
- c-3.664,0-8.18,3.578-11.077,6.135l-2.641,19.512c-0.171,1.363-0.171,1.534,1.107,1.704l4.26,0.597l-0.852,6.305h-23.347
- l0.853-6.39l3.749-0.512c1.107-0.17,1.363-0.426,1.533-1.704l3.579-25.987c0.17-0.938,0-1.534-0.768-1.789l-4.175-1.534
- l0.938-6.476h16.87l-0.937,6.987l0.255,0.085c4.771-4.09,9.373-7.924,16.02-7.924c6.475,0,9.798,3.322,10.054,10.139
- c0,1.363-0.085,3.067-0.341,4.687l-3.067,21.812c-0.171,1.363-0.171,1.534,1.022,1.704l4.26,0.597L722,221.7H703.596z"/></g><g><linearGradient id="SVGID_15_" gradientUnits="userSpaceOnUse" x1="324.1611" y1="239.7637" x2="324.1611" y2="155.3275"><stop offset="0" style="stop-color:#000000"/><stop offset="1" style="stop-color:#000000;stop-opacity:0"/><a:midPointStop offset="0" style="stop-color:#000000"/><a:midPointStop offset="0.6933" style="stop-color:#000000"/><a:midPointStop offset="1" style="stop-color:#000000;stop-opacity:0"/></linearGradient><path fill="url(#SVGID_15_)" d="M340.308,218.463c-5.538,2.556-11.588,4.26-17.638,4.26c-13.377,0-18.148-7.839-18.148-18.148
- c0-17.893,11.418-28.117,25.307-28.117c9.372,0,13.973,4.26,13.973,11.247c0,12.184-12.865,15.763-26.157,17.126
- c0.255,4.346,2.045,8.35,8.435,8.35c3.068,0,7.243-0.937,12.355-3.067L340.308,218.463z M332.213,188.896
- c0-2.045-1.448-3.237-4.09-3.237c-4.771,0-8.69,4.175-9.969,10.906C321.818,196.054,332.213,194.265,332.213,188.896z"/><linearGradient id="SVGID_16_" gradientUnits="userSpaceOnUse" x1="377.4546" y1="239.7637" x2="377.4546" y2="155.3277"><stop offset="0" style="stop-color:#000000"/><stop offset="1" style="stop-color:#000000;stop-opacity:0"/><a:midPointStop offset="0" style="stop-color:#000000"/><a:midPointStop offset="0.6933" style="stop-color:#000000"/><a:midPointStop offset="1" style="stop-color:#000000;stop-opacity:0"/></linearGradient><path fill="url(#SVGID_16_)" d="M394.07,221.7l-0.171-0.255l1.789-10.055l2.642-18.063c0.512-3.749,0.341-5.623-1.96-5.623
- c-2.642,0-5.794,2.727-9.372,5.879l-2.727,19.512c-0.171,1.363-0.171,1.534,1.022,1.704l4.26,0.597l-0.852,6.305h-18.404
- l-0.171-0.341l1.875-10.82l2.471-17.212c0.512-3.237,0.682-5.453-1.789-5.453c-3.238,0-7.413,3.664-9.714,5.709l-2.642,19.512
- c-0.17,1.363-0.17,1.534,1.108,1.704l4.26,0.597l-0.852,6.305h-23.347l0.853-6.39l3.749-0.512c1.107-0.17,1.363-0.426,1.533-1.704
- l3.579-25.987c0.17-0.938,0-1.534-0.767-1.789l-4.176-1.534l0.938-6.476h16.871l-0.938,6.987l0.256,0.085
- c4.43-3.749,9.116-7.924,15.592-7.924c4.687,0,7.839,2.641,8.18,7.753l0.256,0.086c4.175-3.664,9.202-7.839,15.252-7.839
- c6.22,0,8.775,3.152,8.946,9.202c0,1.618-0.171,3.493-0.426,5.538l-3.067,21.897c-0.171,1.363-0.171,1.534,1.107,1.704
- l4.175,0.597l-0.852,6.305H394.07z"/><linearGradient id="SVGID_17_" gradientUnits="userSpaceOnUse" x1="435.1772" y1="239.7637" x2="435.1772" y2="155.3275"><stop offset="0" style="stop-color:#000000"/><stop offset="1" style="stop-color:#000000;stop-opacity:0"/><a:midPointStop offset="0" style="stop-color:#000000"/><a:midPointStop offset="0.6933" style="stop-color:#000000"/><a:midPointStop offset="1" style="stop-color:#000000;stop-opacity:0"/></linearGradient><path fill="url(#SVGID_17_)" d="M443.995,190.771l-0.17-4.431c0-0.682-0.085-1.108-1.022-1.363
- c-1.022-0.256-2.642-0.427-4.771-0.427c-3.579,0-6.391,1.108-6.391,4.09c0,2.727,2.982,3.749,6.731,5.027
- c6.05,2.045,13.888,4.431,13.888,13.463c0,11.076-9.372,15.592-20.193,15.592c-8.009,0-14.91-1.959-16.273-2.981l1.618-12.355
- l8.691,0.512l0.255,4.941c0,0.597,0.171,1.108,0.938,1.363c1.278,0.427,3.238,0.768,6.05,0.768c4.687,0,7.327-1.79,7.327-4.687
- c0-3.408-3.152-4.175-8.009-5.624c-6.135-1.874-12.78-4.26-12.78-13.206c0-10.48,9.116-14.996,19.597-14.996
- c6.646,0,12.866,1.533,15.081,2.471l-1.704,12.354L443.995,190.771z"/><linearGradient id="SVGID_18_" gradientUnits="userSpaceOnUse" x1="474.8369" y1="239.7637" x2="474.8369" y2="155.3275"><stop offset="0" style="stop-color:#000000"/><stop offset="1" style="stop-color:#000000;stop-opacity:0"/><a:midPointStop offset="0" style="stop-color:#000000"/><a:midPointStop offset="0.6933" style="stop-color:#000000"/><a:midPointStop offset="1" style="stop-color:#000000;stop-opacity:0"/></linearGradient><path fill="url(#SVGID_18_)" d="M489.748,218.548c-4.175,2.386-10.395,4.175-16.444,4.175c-13.036,0-18.575-7.583-18.575-18.574
- c0-18.83,11.588-27.691,25.988-27.691c6.475,0,11.843,1.874,14.229,3.578l-1.874,13.377l-8.691-0.426l-0.255-5.794
- c0-0.597-0.086-0.938-0.597-1.192c-1.022-0.427-2.557-0.597-4.175-0.597c-5.624,0-11.418,4.601-11.418,17.382
- c0,7.839,3.493,10.395,8.436,10.395c4.346,0,8.436-1.448,11.247-2.556L489.748,218.548z"/><linearGradient id="SVGID_19_" gradientUnits="userSpaceOnUse" x1="512.2822" y1="239.7637" x2="512.2822" y2="155.3277"><stop offset="0" style="stop-color:#000000"/><stop offset="1" style="stop-color:#000000;stop-opacity:0"/><a:midPointStop offset="0" style="stop-color:#000000"/><a:midPointStop offset="0.6933" style="stop-color:#000000"/><a:midPointStop offset="1" style="stop-color:#000000;stop-opacity:0"/></linearGradient><path fill="url(#SVGID_19_)" d="M491.364,221.7l0.853-6.39l3.919-0.512c1.193-0.17,1.363-0.426,1.534-1.704l3.578-25.987
- c0.086-0.938-0.085-1.534-0.852-1.789l-4.261-1.534l0.938-6.476h16.87l-1.107,7.669l0.256,0.17
- c3.323-4.771,8.095-8.69,13.548-8.69c1.874,0,5.112,0.341,6.561,0.767l-2.13,15.507l-9.969-0.341l-0.256-4.431
- c-0.086-0.767-0.256-1.022-0.938-1.022c-1.619,0-4.26,1.96-6.646,4.431l-2.981,21.643c-0.171,1.363-0.085,1.619,1.192,1.704
- l8.095,0.682l-0.938,6.305H491.364z"/><linearGradient id="SVGID_20_" gradientUnits="userSpaceOnUse" x1="546.6592" y1="239.7637" x2="546.6592" y2="155.3272"><stop offset="0" style="stop-color:#000000"/><stop offset="1" style="stop-color:#000000;stop-opacity:0"/><a:midPointStop offset="0" style="stop-color:#000000"/><a:midPointStop offset="0.6933" style="stop-color:#000000"/><a:midPointStop offset="1" style="stop-color:#000000;stop-opacity:0"/></linearGradient><path fill="url(#SVGID_20_)" d="M536.094,221.7l-0.17-0.426l2.045-11.503l3.152-22.749c0.17-0.938-0.086-1.534-0.853-1.79
- l-4.175-1.448l0.852-6.476h18.149l-5.027,35.786c-0.171,1.363-0.085,1.534,1.192,1.704l4.09,0.597l-0.852,6.305H536.094z
- M541.973,164.102c0-5.453,3.238-8.775,8.776-8.775c4.175,0,6.646,2.215,6.646,6.305c0,5.368-3.322,8.861-8.861,8.861
- C544.358,170.492,541.973,168.106,541.973,164.102z"/><linearGradient id="SVGID_21_" gradientUnits="userSpaceOnUse" x1="580.6963" y1="239.7637" x2="580.6963" y2="155.3272"><stop offset="0" style="stop-color:#000000"/><stop offset="1" style="stop-color:#000000;stop-opacity:0"/><a:midPointStop offset="0" style="stop-color:#000000"/><a:midPointStop offset="0.6933" style="stop-color:#000000"/><a:midPointStop offset="1" style="stop-color:#000000;stop-opacity:0"/></linearGradient><path fill="url(#SVGID_21_)" d="M556.796,239.764l-0.17-0.341l2.471-14.229l5.282-38.087c0.171-1.022-0.085-1.534-0.767-1.789
- l-4.175-1.534l0.938-6.476h17.041l-1.022,6.816l0.255,0.085c5.027-4.686,10.311-7.753,15.678-7.753
- c7.328,0,12.44,4.686,12.44,17.041c0,11.758-4.601,29.225-20.449,29.225c-5.538,0-8.605-2.13-11.759-4.345l-1.874,12.78
- c-0.085,0.938,0.085,1.278,1.192,1.363l8.606,0.853l-0.938,6.39H556.796z M573.837,209.517c2.13,1.789,4.942,3.322,8.095,3.322
- c6.901,0,9.458-9.713,9.458-17.211c0-5.027-1.193-8.351-4.431-8.351c-3.408,0-7.754,3.664-10.821,6.391L573.837,209.517z"/><linearGradient id="SVGID_22_" gradientUnits="userSpaceOnUse" x1="622.7832" y1="239.7637" x2="622.7832" y2="155.3268"><stop offset="0" style="stop-color:#000000"/><stop offset="1" style="stop-color:#000000;stop-opacity:0"/><a:midPointStop offset="0" style="stop-color:#000000"/><a:midPointStop offset="0.6933" style="stop-color:#000000"/><a:midPointStop offset="1" style="stop-color:#000000;stop-opacity:0"/></linearGradient><path fill="url(#SVGID_22_)" d="M635.777,219.4c-3.749,1.789-9.458,3.322-14.229,3.322c-8.521,0-12.099-2.981-12.099-9.969
- c0-1.107,0.085-2.386,0.256-3.749l3.066-22.323c0.086-0.512,0.086-0.853-0.511-0.853h-5.879l1.107-7.839
- c7.242-0.767,10.906-4.431,13.122-13.633h7.924l-1.704,12.1c-0.085,0.596-0.085,0.852,0.597,0.852h11.758l-1.193,8.521h-12.439
- l-2.812,20.364c-0.171,1.107-0.256,1.96-0.256,2.727c0,2.982,1.278,4.26,4.942,4.26c2.385,0,4.771-0.596,6.816-1.363
- L635.777,219.4z"/><linearGradient id="SVGID_23_" gradientUnits="userSpaceOnUse" x1="655.6709" y1="239.7637" x2="655.6709" y2="155.3275"><stop offset="0" style="stop-color:#000000"/><stop offset="1" style="stop-color:#000000;stop-opacity:0"/><a:midPointStop offset="0" style="stop-color:#000000"/><a:midPointStop offset="0.6933" style="stop-color:#000000"/><a:midPointStop offset="1" style="stop-color:#000000;stop-opacity:0"/></linearGradient><path fill="url(#SVGID_23_)" d="M671.817,218.463c-5.538,2.556-11.588,4.26-17.638,4.26c-13.377,0-18.148-7.839-18.148-18.148
- c0-17.893,11.418-28.117,25.307-28.117c9.372,0,13.973,4.26,13.973,11.247c0,12.184-12.865,15.763-26.157,17.126
- c0.255,4.346,2.045,8.35,8.435,8.35c3.068,0,7.243-0.937,12.355-3.067L671.817,218.463z M663.723,188.896
- c0-2.045-1.448-3.237-4.09-3.237c-4.771,0-8.69,4.175-9.969,10.906C653.328,196.054,663.723,194.265,663.723,188.896z"/><linearGradient id="SVGID_24_" gradientUnits="userSpaceOnUse" x1="697.9297" y1="239.7637" x2="697.9297" y2="155.3277"><stop offset="0" style="stop-color:#000000"/><stop offset="1" style="stop-color:#000000;stop-opacity:0"/><a:midPointStop offset="0" style="stop-color:#000000"/><a:midPointStop offset="0.6933" style="stop-color:#000000"/><a:midPointStop offset="1" style="stop-color:#000000;stop-opacity:0"/></linearGradient><path fill="url(#SVGID_24_)" d="M703.596,221.7l-0.17-0.255l1.874-10.396l2.471-17.723c0.512-3.578,0.341-5.879-2.215-5.879
- c-3.664,0-8.18,3.578-11.077,6.135l-2.641,19.512c-0.171,1.363-0.171,1.534,1.107,1.704l4.26,0.597l-0.852,6.305h-23.347
- l0.853-6.39l3.749-0.512c1.107-0.17,1.363-0.426,1.533-1.704l3.579-25.987c0.17-0.938,0-1.534-0.768-1.789l-4.175-1.534
- l0.938-6.476h16.87l-0.937,6.987l0.255,0.085c4.771-4.09,9.373-7.924,16.02-7.924c6.475,0,9.798,3.322,10.054,10.139
- c0,1.363-0.085,3.067-0.341,4.687l-3.067,21.812c-0.171,1.363-0.171,1.534,1.022,1.704l4.26,0.597L722,221.7H703.596z"/></g></g></svg></a>
+ <a href="http://emscripten.org">
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?><svg
+ version="1.1"
+ id="Layer_1"
+ x="0px"
+ y="0px"
+ width="296px"
+ height="78px"
+ viewBox="420 120 100 170"
+ enable-background="new 0 0 900 400"
+ xml:space="preserve"
+ inkscape:version="0.48.4 r9939"
+ sodipodi:docname="emscripten_powered_by_logo.svg"><metadata
+ id="metadata345"><rdf:RDF><cc:Work
+ rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
+ id="defs343"><linearGradient
+ y2="247.6265"
+ x2="225.1929"
+ y1="152.499"
+ x1="225.1929"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient5104"><stop
+ id="stop5106"
+ style="stop-color:#C1D72F"
+ offset="0.3227531" /><stop
+ id="stop5108"
+ style="stop-color:#BCD631"
+ offset="0.45119295" /><stop
+ id="stop5110"
+ style="stop-color:#AFD136"
+ offset="0.64491969" /><stop
+ id="stop5112"
+ style="stop-color:#ABD037"
+ offset="1" /><a:midPointStop
+ style="stop-color:#C1D72F"
+ offset="0.0123" /><a:midPointStop
+ style="stop-color:#C1D72F"
+ offset="0.3086" /><a:midPointStop
+ style="stop-color:#ABD037"
+ offset="1" /></linearGradient><linearGradient
+ inkscape:collect="always"
+ xlink:href="#SVGID_2_"
+ id="linearGradient5120"
+ x1="397.56918"
+ y1="128.12726"
+ x2="397.56918"
+ y2="166.25996"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.103059,0,0,1.103059,-38.997823,3.1312145)" /><filter
+ inkscape:collect="always"
+ id="filter5126"><feGaussianBlur
+ inkscape:collect="always"
+ stdDeviation="0.56377237"
+ id="feGaussianBlur5128" /></filter><linearGradient
+ inkscape:collect="always"
+ xlink:href="#SVGID_2_"
+ id="linearGradient5134"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.103059,0,0,1.103059,-38.997823,3.1312145)"
+ x1="397.56918"
+ y1="128.12726"
+ x2="397.56918"
+ y2="166.25996" /></defs><sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="1440"
+ inkscape:window-height="838"
+ id="namedview341"
+ showgrid="false"
+ inkscape:zoom="0.63555556"
+ inkscape:cx="224.82424"
+ inkscape:cy="-52.085109"
+ inkscape:window-x="-8"
+ inkscape:window-y="-8"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="Layer_1" /><g
+ id="g5130"
+ transform="matrix(0.91591318,0,0,0.91591318,28.176953,14.143571)"><path
+ transform="matrix(1.103059,0,0,1.103059,-35.073492,-16.03923)"
+ id="path5122"
+ style="fill:#383838;fill-opacity:0.34705882;stroke:none;filter:url(#filter5126)"
+ d="m 494.39333,173.6323 c 0.57407,0.28703 1.87073,1.00226 2.89426,1.02855 0.55732,0.0143 1.14006,-0.1672 1.60262,-0.4784 1.20466,-0.81046 2.23561,-2.03031 2.72683,-3.39661 0.19424,-0.54027 0.0238,-1.72222 0.0238,-1.72222 l -3.82713,-14.06478 -1.98533,0 0.50231,-2.67891 6.36261,0 2.55939,12.22285 4.78392,-9.68746 -2.00924,0 0,-2.65498 7.19979,0 -11.00301,22.38875 -1.69829,1.91358 -2.29628,1.3395 -2.46371,0.26312 -2.29628,-0.21528 -2.79859,-1.36342 z m -12.0637,-14.56445 c -0.93698,1.88565 -1.70261,4.35262 -0.81842,6.26333 0.36549,0.78976 1.35098,1.19428 2.192,1.41737 0.60934,0.16133 1.29167,0.0999 1.88775,-0.10468 0.48126,-0.1655 0.8829,-0.5224 1.255,-0.8697 0.40341,-0.3768 0.77723,-0.80461 1.03505,-1.29262 0.21864,-0.41395 0.40236,-0.84786 0.49325,-1.30698 0.20667,-1.0485 0.35879,-2.1079 0.33583,-3.17631 -0.0184,-0.87403 -0.0789,-1.87107 -0.47711,-2.64959 -0.26344,-0.51379 -0.77017,-0.71849 -1.33113,-0.85633 -0.42395,-0.10479 -0.81432,-0.0626 -1.21773,0.10517 -0.65479,0.27273 -1.2544,0.5311 -1.82112,0.95764 -0.57331,0.4317 -1.21403,0.86959 -1.53337,1.5127 z m 0.65588,-4.31208 c 0,0 2.19341,-1.80738 3.45549,-2.27082 0.71718,-0.26365 3.45363,-0.65258 4.15,-0.3378 1.47292,0.66633 2.26103,1.57529 2.7222,2.60001 0.46118,1.02472 0.69944,2.59956 0.79701,3.73627 0.13278,1.55027 -0.13682,3.77629 -0.53404,5.74843 -0.30079,1.49256 -1.01883,2.74423 -1.83478,3.92156 -1.06526,1.5373 -1.82382,2.15116 -3.66756,2.46594 -0.98864,0.16889 -1.93845,0.46787 -3.25466,0.0928 -1.4384,-0.40963 -2.35273,-0.81244 -3.39599,-1.63337 -0.72524,-0.57054 -1.16043,-1.54043 -1.16043,-1.54043 l 0,2.82636 -4.8903,0 3.39872,-23.01602 -1.92242,-0.85888 0.0403,-2.38127 7.25847,0.0534 z m -23.77803,2.20447 c 0.29175,1.49273 0.0813,4.83252 -0.86111,6.69751 -0.3062,0.60617 -0.94813,1.32967 -1.55479,1.6983 -1.01515,0.61713 -2.21688,1.21322 -3.3966,1.07639 -0.47944,-0.0541 -0.97036,-0.34348 -1.24383,-0.74151 -0.47686,-0.69328 -0.43621,-1.55032 -0.45448,-2.39198 -0.024,-1.06873 0.13137,-2.23775 0.38272,-3.277 0.18705,-0.7744 0.4229,-1.58254 0.86111,-2.24844 0.39037,-0.59323 0.92628,-1.12617 1.55478,-1.45909 0.54854,-0.29014 1.19695,-0.38467 1.81791,-0.40664 0.63637,-0.0231 1.3031,0.0385 1.88966,0.28704 0.3875,0.16453 0.92361,0.3524 1.00463,0.76542 z m 1.29312,-9.69052 -0.64254,6.12262 c 0,0 -1.68393,-0.96858 -2.605,-1.25148 -0.73032,-0.22434 -1.50312,-0.36654 -2.26624,-0.33838 -0.97069,0.0345 -1.91182,0.22099 -2.81751,0.57088 -0.9185,0.35497 -1.78344,0.94565 -2.49338,1.62792 -0.88025,0.84538 -1.51404,1.90455 -2.02977,3.0106 -0.39653,0.84993 -0.69517,1.75284 -0.87975,2.67232 -0.22875,1.14241 -0.44415,2.38719 -0.43937,3.55197 0.01,1.44865 0.0623,2.89489 0.54092,4.26214 0.25525,0.72907 0.71643,1.40578 1.28572,1.9283 0.56835,0.52207 1.29566,0.87604 2.02935,1.11621 0.41072,0.13491 0.85346,0.17274 1.28579,0.16935 1.00285,-0.01 2.03715,-0.0883 2.97671,-0.43999 0.66497,-0.2489 1.21759,-0.73399 1.79298,-1.1502 0.75304,-0.54475 2.16476,-1.86006 2.16476,-1.86006 l 0,1.62374 -0.5751,0 0,1.48807 6.86709,0 0,-2.84135 -1.92841,0 3.21374,-23.57782 -7.37422,0 0,2.33412 z m -93.60062,7.55781 2.33363,15.57933 6.23084,0 4.04243,-11.34169 1.62654,11.34169 5.88425,0 7.05633,-16.38872 0,-2.0141 -6.1713,0 0,2.82349 1.88966,0 -4.04243,10.16973 -0.74151,0 -1.29167,-12.55773 -5.38194,0 -4.7361,12.50989 -1.55478,-12.94538 -6.86496,0 0,2.82349 z m -12.15,0.72146 c -0.56264,0.0892 -1.03524,0.17358 -1.53086,0.45447 -0.737,0.41808 -1.46132,0.95771 -1.91357,1.67437 -0.44123,0.70048 -0.53204,1.57581 -0.66975,2.39196 -0.1751,1.04003 -0.20064,2.10306 -0.19136,3.15741 0.01,0.81614 -0.0138,1.66577 0.35879,2.39197 0.1904,0.37315 0.52874,0.80945 0.88503,1.02855 0.56015,0.34453 1.06632,0.55494 1.72222,0.598 0.72597,0.0483 1.48801,-0.18852 2.10493,-0.57408 0.59422,-0.37072 1.03334,-0.97401 1.38735,-1.5787 0.46117,-0.78744 0.70905,-1.69257 0.90895,-2.58334 0.20377,-0.90704 0.33579,-1.84565 0.28703,-2.77468 -0.0491,-0.92714 -0.18211,-1.88434 -0.57407,-2.72684 -0.2728,-0.58681 -0.70954,-1.00753 -1.29166,-1.29165 -0.44403,-0.21628 -0.99455,-0.24402 -1.48303,-0.16744 z m -6.62442,-0.73581 c 0.65404,-0.6664 1.4072,-1.25479 2.23273,-1.69161 1.0305,-0.54505 2.16429,-0.92749 3.31518,-1.11604 1.51307,-0.24806 3.09342,-0.2847 4.60036,0 0.88055,0.16632 1.78322,0.44742 2.50307,0.98113 0.77409,0.57312 1.35279,1.40936 1.79291,2.26639 0.42901,0.83457 0.6828,1.77223 0.77798,2.70605 0.16564,1.61985 0.024,3.29135 -0.37201,4.87103 -0.33328,1.33759 -0.88436,2.64754 -1.65745,3.78889 -0.67549,0.99679 -1.52894,1.91262 -2.53721,2.5709 -0.89957,0.58746 -1.9718,0.87641 -3.01035,1.15006 -0.87153,0.22963 -1.77166,0.4095 -2.67235,0.40576 -1.21068,-0.01 -2.47998,-0.0817 -3.58589,-0.57511 -1.09854,-0.48896 -1.89728,-1.32739 -2.60455,-2.30013 -0.61123,-0.83995 -1.02561,-1.59975 -1.31932,-2.87516 -0.2125,-0.9233 -0.40006,-2.19912 -0.37215,-3.14592 0.0335,-1.16537 0.3568,-2.74121 0.83416,-3.80434 0.52547,-1.17098 1.17609,-2.3161 2.07489,-3.2319 z m 94.95184,13.82318 c -2.20516,1.01761 -4.61429,1.69636 -7.02343,1.69636 -5.32726,0 -7.22678,-3.12145 -7.22678,-7.22678 0,-7.1251 4.54685,-11.19645 10.0772,-11.19645 3.7324,0 5.56453,1.69625 5.56453,4.47856 0,4.85189 -5.12329,6.27735 -10.41633,6.82001 0.10168,1.73076 0.81446,3.32485 3.3592,3.32485 1.2218,0 2.88401,-0.37315 4.91982,-1.22099 z m -3.22292,-11.77374 c 0,-0.81423 -0.57695,-1.28891 -1.62876,-1.28891 -1.89988,0 -3.46041,1.66212 -3.96978,4.34287 1.45897,-0.20368 5.59854,-0.91613 5.59854,-3.05396 z m -30.33408,11.77374 c -2.2054,1.01761 -4.61457,1.69636 -7.02371,1.69636 -5.32653,0 -7.22671,-3.12145 -7.22671,-7.22678 0,-7.1251 4.54679,-11.19645 10.07785,-11.19645 3.73175,0 5.56382,1.69625 5.56382,4.47856 0,4.85189 -5.12273,6.27735 -10.41568,6.82001 0.10142,1.73076 0.81422,3.32485 3.35884,3.32485 1.22158,0 2.8842,-0.37315 4.91994,-1.22099 z m -3.22305,-11.77374 c 0,-0.81423 -0.57638,-1.28891 -1.62883,-1.28891 -1.89959,0 -3.46023,1.66212 -3.96971,4.34287 1.4591,-0.20368 5.59854,-0.91613 5.59854,-3.05396 z m -82.36051,20.5268 -0.0679,-0.13571 0.98406,-5.66614 2.10303,-15.16698 c 0.0687,-0.40664 -0.0332,-0.61046 -0.30522,-0.71214 l -1.66259,-0.61111 0.37379,-2.57855 6.78556,0 -0.40663,2.71427 0.10142,0.0335 c 2.0016,-1.86631 4.10566,-3.08743 6.24306,-3.08743 2.91821,0 4.95366,1.86577 4.95366,6.78561 0,4.68241 -1.83206,11.6379 -8.14271,11.6379 -2.20534,0 -3.42694,-0.84825 -4.68256,-1.73039 l -0.74621,5.08917 c -0.0341,0.37361 0.0326,0.50898 0.47457,0.54273 l 3.42697,0.33969 -0.37385,2.5447 -9.0589,0 z m 6.78613,-12.04485 c 0.84787,0.71258 1.96788,1.32305 3.22348,1.32305 2.74798,0 3.76601,-3.86811 3.76601,-6.85368 0,-2.002 -0.47476,-3.32542 -1.76432,-3.32542 -1.35696,0 -3.08763,1.4591 -4.30913,2.54506 z m 81.08934,4.85147 0.33969,-2.54464 1.56064,-0.2038 c 0.47498,-0.0683 0.5429,-0.1695 0.61084,-0.67837 l 1.42466,-10.34864 c 0.0335,-0.37315 -0.0335,-0.61046 -0.33914,-0.71214 l -1.69691,-0.61111 0.37365,-2.57855 6.71797,0 -0.44097,3.05395 0.10191,0.0679 c 1.32326,-1.89982 3.22359,-3.46042 5.39485,-3.46042 0.7463,0 2.0359,0.13582 2.61295,0.30538 l -0.84863,6.17508 -3.96972,-0.13582 -0.10157,-1.76443 c -0.0335,-0.30537 -0.10223,-0.40701 -0.37391,-0.40701 -0.64452,0 -1.69636,0.78027 -2.64651,1.76455 l -1.18674,8.61817 c -0.0687,0.54303 -0.0334,0.64474 0.47477,0.67874 l 3.22351,0.27142 -0.37384,2.51081 -10.8575,0 z"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="cssscccccccccccccccccssssssssccssscssssscsssccccccccsssssssssccsccsssssssssscsscccccccccccccccccccccccccccccccsssscsssssscscsssssssscsssssssssscsssscsccsscscsssscsccsscsccccccccccsssccccccccssscccccccccccccsccccsccccccc" /><path
+ sodipodi:nodetypes="cssscccccccccccccccccssssssssccssscssssscsssccccccccsssssssssccsccsssssssssscsscccccccccccccccccccccccccccccccsssscsssssscscsssssssscsssssssssscsssscsccsscscsssscsccsscsccccccccccsssccccccccssscccccccccccccsccccsccccccc"
+ inkscape:connector-curvature="0"
+ d="m 509.55935,174.26011 c 0.63327,0.31663 2.06355,1.10555 3.19256,1.13455 0.61476,0.0158 1.25757,-0.18443 1.76781,-0.5277 1.3288,-0.89397 2.46618,-2.23946 3.00784,-3.74661 0.21419,-0.59598 0.0258,-1.89972 0.0258,-1.89972 l -4.22153,-15.51428 -2.18993,0 0.55406,-2.95501 7.01835,0 2.82313,13.48255 5.27696,-10.68586 -2.21631,0 0,-2.92858 7.94179,0 -12.13698,24.69605 -1.87332,2.11078 -2.5329,1.4776 -2.71762,0.29022 -2.53295,-0.23748 -3.08699,-1.50392 z m -13.30698,-16.06545 c -1.0335,2.08005 -1.87803,4.80122 -0.90274,6.90883 0.4032,0.87116 1.49018,1.31738 2.4179,1.56347 0.67214,0.17793 1.42477,0.1102 2.08233,-0.11548 0.53084,-0.1826 0.97383,-0.5762 1.38432,-0.9593 0.44502,-0.4157 0.85733,-0.8875 1.14176,-1.42582 0.24113,-0.45665 0.44375,-0.93526 0.54404,-1.44168 0.22797,-1.1566 0.3958,-2.3252 0.37043,-3.50371 -0.0204,-0.96413 -0.0869,-2.06387 -0.52631,-2.92259 -0.29054,-0.56679 -0.84946,-0.79259 -1.46826,-0.94463 -0.46761,-0.11559 -0.89829,-0.0686 -1.34322,0.11597 -0.72226,0.30083 -1.38368,0.5859 -2.00879,1.05634 -0.63242,0.4762 -1.33915,0.9593 -1.69146,1.6686 z m 0.72346,-4.75648 c 0,0 2.41951,-1.99358 3.81169,-2.50482 0.79109,-0.29085 3.80953,-0.71977 4.57766,-0.3726 1.6247,0.73503 2.49408,1.73759 3.00274,2.86791 0.50868,1.13043 0.77154,2.86756 0.87911,4.12137 0.14648,1.71007 -0.15092,4.16549 -0.58904,6.34083 -0.33179,1.64636 -1.12383,3.02703 -2.02388,4.32576 -1.17506,1.6957 -2.01178,2.37286 -4.04556,2.72004 -1.09051,0.18629 -2.13814,0.51607 -3.59006,0.10268 -1.5866,-0.45183 -2.59522,-0.89615 -3.74599,-1.8017 -0.79994,-0.62933 -1.28003,-1.6992 -1.28003,-1.6992 l 0,3.11766 -5.39426,0 3.74898,-25.38802 -2.12052,-0.94738 0.0443,-2.62669 8.00657,0.0587 z m -26.22853,2.43167 c 0.32185,1.64663 0.0893,5.33062 -0.9498,7.38781 -0.33781,0.66857 -1.04588,1.46667 -1.7151,1.8733 -1.11975,0.68073 -2.44527,1.33822 -3.7466,1.18729 -0.52883,-0.0601 -1.07036,-0.37888 -1.37203,-0.81791 -0.52601,-0.76478 -0.48121,-1.71012 -0.50128,-2.63848 -0.0263,-1.17893 0.14487,-2.46835 0.42212,-3.6147 0.20635,-0.8543 0.4665,-1.74564 0.94981,-2.48024 0.43067,-0.65433 1.02178,-1.24217 1.71508,-1.60939 0.60504,-0.32004 1.32025,-0.42437 2.00521,-0.44854 0.70197,-0.0251 1.4374,0.0425 2.08446,0.31654 0.4274,0.18153 1.01882,0.3888 1.10813,0.84432 z m 1.42642,-10.68922 -0.70874,6.75362 c 0,0 -1.85753,-1.06838 -2.8735,-1.38048 -0.80562,-0.24744 -1.65802,-0.40424 -2.49984,-0.37318 -1.07069,0.0382 -2.10882,0.24369 -3.1078,0.62968 -1.01321,0.39157 -1.96724,1.04315 -2.75039,1.79572 -0.97095,0.93248 -1.67003,2.10085 -2.23897,3.3208 -0.43738,0.93753 -0.76677,1.93354 -0.9704,2.94777 -0.2523,1.26016 -0.4899,2.63324 -0.48461,3.91802 0.011,1.59795 0.0683,3.19329 0.59661,4.70144 0.28155,0.80417 0.79028,1.55058 1.41822,2.127 0.62695,0.57587 1.4292,0.96634 2.23856,1.23121 0.45301,0.14881 0.94135,0.19054 1.41828,0.18685 1.10615,-0.011 2.24705,-0.0973 3.28346,-0.48539 0.73352,-0.2745 1.34304,-0.80959 1.97773,-1.2687 0.83064,-0.60085 2.38786,-2.05176 2.38786,-2.05176 l 0,1.79104 -0.63429,0 0,1.64147 7.57478,0 0,-3.13415 -2.12721,0 3.54494,-26.00772 -8.13411,0 0,2.57462 z m -103.24702,8.33671 2.57413,17.18493 6.87304,0 4.45903,-12.51049 1.79414,12.51049 6.49065,0 7.78353,-18.07772 0,-2.2217 -6.8073,0 0,3.11449 2.08446,0 -4.45903,11.21783 -0.8179,0 -1.42488,-13.85193 -5.93654,0 -5.2242,13.79919 -1.71497,-14.27958 -7.57246,0 0,3.11449 z m -13.4021,0.79586 c -0.62064,0.0982 -1.14194,0.19148 -1.68866,0.50127 -0.813,0.46118 -1.61192,1.05641 -2.11077,1.84697 -0.48673,0.77268 -0.58683,1.73821 -0.73875,2.63846 -0.1932,1.14723 -0.22134,2.31976 -0.21116,3.48281 0.011,0.90024 -0.0148,1.83747 0.39579,2.63847 0.21,0.41165 0.58324,0.89285 0.97623,1.13455 0.61796,0.38003 1.17622,0.61214 1.89972,0.6596 0.80077,0.0533 1.64141,-0.20792 2.32189,-0.63318 0.65546,-0.40892 1.13978,-1.07441 1.53029,-1.7414 0.50878,-0.86864 0.78215,-1.86707 1.00265,-2.84964 0.22477,-1.00044 0.37039,-2.03585 0.31663,-3.06058 -0.0541,-1.02274 -0.20091,-2.07854 -0.63327,-3.00784 -0.3009,-0.64731 -0.78264,-1.11143 -1.42476,-1.42485 -0.48983,-0.23858 -1.09705,-0.26912 -1.63583,-0.18464 z m -7.30711,-0.81171 c 0.72143,-0.735 1.55219,-1.38409 2.46282,-1.86591 1.1367,-0.60125 2.38729,-1.02309 3.65678,-1.23104 1.66908,-0.27366 3.41222,-0.314 5.07446,0 0.97135,0.18342 1.96702,0.49352 2.76107,1.08223 0.85389,0.63222 1.49219,1.55466 1.97771,2.49999 0.47321,0.92057 0.7531,1.95483 0.85808,2.98495 0.18274,1.78675 0.0263,3.63055 -0.41031,5.37303 -0.36757,1.47539 -0.97545,2.92034 -1.82825,4.17929 -0.74509,1.09959 -1.68654,2.10982 -2.79871,2.8359 -0.99227,0.64796 -2.175,0.96671 -3.32055,1.26856 -0.96139,0.25333 -1.95426,0.4517 -2.94774,0.44756 -1.33549,-0.011 -2.73559,-0.0897 -3.9555,-0.63431 -1.21174,-0.53936 -2.09278,-1.46419 -2.87295,-2.53723 -0.67423,-0.92645 -1.13131,-1.76457 -1.45532,-3.17146 -0.2344,-1.0184 -0.44126,-2.42572 -0.41044,-3.47012 0.0365,-1.28547 0.39349,-3.02371 0.92005,-4.19644 0.57967,-1.29168 1.29729,-2.5548 2.2888,-3.565 z m 104.73744,15.24778 c -2.43247,1.12251 -5.0899,1.87126 -7.74734,1.87126 -5.87626,0 -7.97147,-3.44315 -7.97147,-7.97158 0,-7.8594 5.0154,-12.35035 11.11569,-12.35035 4.11711,0 6.13803,1.87105 6.13803,4.94016 0,5.35189 -5.65129,6.92425 -11.48983,7.52281 0.11219,1.90916 0.89836,3.66755 3.7054,3.66755 1.3477,0 3.18121,-0.41165 5.42682,-1.34689 z m -3.55513,-12.98704 c 0,-0.89823 -0.63635,-1.42181 -1.79655,-1.42181 -2.09568,0 -3.81712,1.83342 -4.37899,4.79047 1.60937,-0.22468 6.17554,-1.01053 6.17554,-3.36866 z m -33.46028,12.98704 c -2.4327,1.12251 -5.09006,1.87126 -7.74751,1.87126 -5.87553,0 -7.97151,-3.44315 -7.97151,-7.97158 0,-7.8594 5.01539,-12.35035 11.11645,-12.35035 4.11635,0 6.13722,1.87105 6.13722,4.94016 0,5.35189 -5.65062,6.92425 -11.48908,7.52281 0.11182,1.90916 0.89812,3.66755 3.70494,3.66755 1.34748,0 3.1815,-0.41165 5.42704,-1.34689 z m -3.55514,-12.98704 c 0,-0.89823 -0.63578,-1.42181 -1.79674,-1.42181 -2.09539,0 -3.81683,1.83342 -4.37881,4.79047 1.60951,-0.22468 6.17555,-1.01053 6.17555,-3.36866 z m -90.84852,22.6422 -0.0749,-0.14971 1.08546,-6.25004 2.31984,-16.73008 c 0.0757,-0.44854 -0.0367,-0.67336 -0.33673,-0.78554 l -1.83388,-0.67411 0.41228,-2.84425 7.48486,0 -0.44853,2.99397 0.11182,0.0371 c 2.2079,-2.05871 4.52887,-3.40563 6.88646,-3.40563 3.21901,0 5.46427,2.05807 5.46427,7.48491 0,5.16501 -2.02094,12.8373 -8.98192,12.8373 -2.43264,0 -3.78014,-0.93565 -5.16516,-1.90869 l -0.82311,5.61357 c -0.0376,0.41212 0.0356,0.56148 0.52347,0.59873 l 3.78017,0.37469 -0.41234,2.8069 -9.9925,0 z m 7.48553,-13.28615 c 0.93528,0.78598 2.17068,1.45946 3.55568,1.45946 3.03118,0 4.15411,-4.26682 4.15411,-7.56009 0,-2.2083 -0.52366,-3.66812 -1.94612,-3.66812 -1.49686,0 -3.40583,1.6095 -4.75323,2.80736 z m 89.44624,5.35147 0.37469,-2.80694 1.72154,-0.2248 c 0.52388,-0.0753 0.5988,-0.1869 0.67374,-0.74827 l 1.57152,-11.41514 c 0.0365,-0.41155 -0.0368,-0.67336 -0.3741,-0.78554 l -1.87181,-0.67411 0.41215,-2.84425 7.41037,0 -0.48647,3.36865 0.11241,0.0749 c 1.45966,-2.09562 3.55581,-3.81702 5.95085,-3.81702 0.8232,0 2.2457,0.14982 2.88225,0.33688 l -0.93613,6.81148 -4.37882,-0.14982 -0.11196,-1.94633 c -0.0371,-0.33677 -0.11284,-0.44891 -0.41252,-0.44891 -0.71092,0 -1.87116,0.86067 -2.91921,1.94635 l -1.30904,9.50637 c -0.0757,0.59903 -0.0368,0.71124 0.52367,0.74874 l 3.55571,0.29932 -0.41234,2.76961 -11.9765,0 z"
+ style="fill:url(#linearGradient5134);fill-opacity:1;stroke:none"
+ id="path5080" /></g><path
+ fill="#E2E2E2"
+ d="M256.023,135.437H196.36c-16.432,0-29.8,13.368-29.8,29.8v73.527c0,16.432,13.368,29.8,29.8,29.8h59.663 c16.433,0,29.801-13.368,29.801-29.8v-73.527C285.824,148.805,272.456,135.437,256.023,135.437z M191.561,165.236 c0-2.646,2.153-4.8,4.8-4.8h59.663c2.647,0,4.801,2.153,4.801,4.8v73.527c0,2.646-2.153,4.8-4.801,4.8H196.36 c-2.646,0-4.8-2.153-4.8-4.8V165.236z"
+ id="path3" /><path
+ d="m 531.664,250.155 h 18.498 l -2.809,18.064 h 5.59 37.586 l 2.6,-17.718 c 4.98,-1.091 9.133,-3.455 12.512,-6.693 3.084,4.075 8.566,7.37 18.252,7.37 6.338,0 12.775,-1.807 17.174,-3.687 4.254,2.399 9.463,3.687 15.459,3.687 3.088,0 6.236,-0.355 9.426,-1.023 h 67.135 l 3.354,-24.827 -5.445,-0.764 1.879,-13.356 c 0.371,-2.386 0.449,-4.66 0.449,-6.156 l -0.008,-0.375 c -0.457,-12.191 -8.139,-19.765 -20.045,-19.765 -2.404,0 -4.623,0.314 -6.676,0.852 h -34.189 l -0.035,0.244 c -2.527,-0.701 -5.41,-1.096 -8.686,-1.096 -3.801,0 -7.406,0.555 -10.76,1.598 l 0.105,-0.746 h -12.467 l 1.826,-12.951 H 615.08 l -1.846,7.658 c -1.373,5.704 -2.213,5.793 -4.453,6.03 l -4.508,0.477 c -3.049,-1.424 -6.357,-2.065 -9.602,-2.065 -2.135,0 -4.275,0.284 -6.416,0.852 h -19.291 c 0.502,-1.772 0.775,-3.674 0.775,-5.678 0,-9.601 -6.846,-16.305 -16.646,-16.305 -11.055,0 -18.775,7.721 -18.775,18.776 0,0.951 0.082,1.869 0.219,2.764 -2.135,-0.288 -4.277,-0.409 -5.553,-0.409 -2.053,0 -4.072,0.288 -6.045,0.852 h -31.342 c -2.74,-0.553 -5.641,-0.852 -8.537,-0.852 -7.138,0 -13.492,1.674 -18.808,4.723 l -3.451,-1.461 c -3.711,-1.571 -11.232,-3.262 -18.979,-3.262 -8.933,0 -16.383,2.56 -21.576,7.016 -3.265,-4.473 -8.523,-7.016 -15.228,-7.016 -4.822,0 -9.021,1.477 -12.572,3.44 -2.996,-2.204 -6.796,-3.44 -11.115,-3.44 -2.327,0 -4.48,0.315 -6.476,0.852 h -33.963 l -0.035,0.245 c -2.526,-0.702 -5.41,-1.097 -8.687,-1.097 -20.458,0 -35.307,16.031 -35.307,38.117 0,17.363 10.785,28.149 28.148,28.149 3.087,0 6.236,-0.356 9.426,-1.023 h 88.816 c 3.706,0.676 7.669,1.023 11.154,1.023 8.907,0 16.278,-2.375 21.51,-6.593 4.872,4.252 11.585,6.593 19.728,6.593 3.053,0 6.206,-0.368 9.286,-1.023 h 44.664 2.069 z"
+ id="path5"
+ inkscape:connector-curvature="0"
+ style="fill:#e2e2e2" /><path
+ fill="#F5F5F5"
+ d="M255.023,133.437H195.36c-16.432,0-29.8,13.368-29.8,29.8v73.527c0,16.432,13.368,29.8,29.8,29.8h59.663 c16.433,0,29.801-13.368,29.801-29.8v-73.527C284.824,146.805,271.456,133.437,255.023,133.437z M190.561,163.236 c0-2.646,2.153-4.8,4.8-4.8h59.663c2.647,0,4.801,2.153,4.801,4.8v73.527c0,2.646-2.153,4.8-4.801,4.8H195.36 c-2.646,0-4.8-2.153-4.8-4.8V163.236z"
+ id="path7" /><g
+ id="g9"><g
+ id="g11"><path
+ fill="#FBFDF8"
+ d="M195.361,251.626c-8.161,0-14.8-6.64-14.8-14.8v-73.527c0-8.161,6.639-14.8,14.8-14.8h59.663 c8.161,0,14.8,6.639,14.8,14.8v73.527c0,8.16-6.639,14.8-14.8,14.8H195.361z"
+ id="path13" /><path
+ fill="#F0F4E1"
+ d="M255.024,152.499c5.964,0,10.8,4.835,10.8,10.8v73.527c0,5.965-4.835,10.8-10.8,10.8h-59.663 c-5.964,0-10.8-4.835-10.8-10.8v-73.527c0-5.964,4.835-10.8,10.8-10.8H255.024 M255.024,144.499h-59.663 c-10.366,0-18.8,8.434-18.8,18.8v73.527c0,10.366,8.434,18.8,18.8,18.8h59.663c10.366,0,18.8-8.434,18.8-18.8v-73.527 C273.824,152.933,265.391,144.499,255.024,144.499L255.024,144.499z"
+ id="path15" /></g><defs
+ id="defs17"><filter
+ id="Adobe_OpacityMaskFilter"
+ filterUnits="userSpaceOnUse"
+ x="176.562"
+ y="144.499"
+ width="97.263"
+ height="111.127"><feColorMatrix
+ type="matrix"
+ values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0"
+ color-interpolation-filters="sRGB"
+ result="source"
+ id="feColorMatrix20" /></filter></defs><mask
+ maskUnits="userSpaceOnUse"
+ x="176.562"
+ y="144.499"
+ width="97.263"
+ height="111.127"
+ id="SVGID_1_"><g
+ filter="url(#Adobe_OpacityMaskFilter)"
+ id="g23"><image
+ overflow="visible"
+ width="422"
+ height="480"
+ xlink:href="data:image/jpeg;base64,/9j/4AAQSkZJRgABAgEBLAEsAAD/7AARRHVja3kAAQAEAAAAHgAA/+4AIUFkb2JlAGTAAAAAAQMA EAMCAwYAAAg2AAAQ4QAAF1b/2wCEABALCwsMCxAMDBAXDw0PFxsUEBAUGx8XFxcXFx8eFxoaGhoX Hh4jJSclIx4vLzMzLy9AQEBAQEBAQEBAQEBAQEABEQ8PERMRFRISFRQRFBEUGhQWFhQaJhoaHBoa JjAjHh4eHiMwKy4nJycuKzU1MDA1NUBAP0BAQEBAQEBAQEBAQP/CABEIAeMBqQMBIgACEQEDEQH/ xACjAAEAAgMBAQAAAAAAAAAAAAAABQYBAwQHAgEBAQAAAAAAAAAAAAAAAAAAAAEQAAEDAQQKAwAC AwEAAAAAAAABAwQCMRMUBRBQEjMVJQYWNgcgESEwI5AiMkARAAEBAwsEAQIFAwUBAAAAAAABMQID EFAycqOz0wQ0RaURIXGRIEFRMGEiExRAgRKh0SMzQxUSAQAAAAAAAAAAAAAAAAAAAJD/2gAMAwEA AhEDEQAAANUJsrZYFfFgV8WBXxYEL0ki5fo6GjJuaRuaRuaRuaRuaRuaRuaRuaRuaRuaRuaRuaRu aRuaMHQ5dR3ojnJ9XxYFfFgV8WD0jxf2AodbslbAD6mDhlpLvI/qkuiovZL7CGzNfRCJwQacEGnB Bp0QSdEEnRBJ0QSdEEnRBJ3BBpwQacEHidwQXzPfBA6bBqK5w2nlKVH3iJitt+gAeweP+wFDrdkr Y+vmaN02k6+e3d2Gjo6N0c2zoyaM7xozuGluGluGluGluGluGluGluGluGluGluGluGnG8c/z1YO PVIfJF80xoIGPsfBVVrl6hIrD7+B7B4/7AUOt2StnXaYyxHTJ6ZKvrqb4x9MgAAAAAAAAAAAAAAA DGR8692Dh4pbkIKJscTVNiLdVY1+weP+wFDgJ+JLJORs3XbIc3dGz6ZAAAAAAAAAAAAAAAAAAAPn R0ayMi5uLqv1S51eIT2Dx/2AofB38Ra5uIm6kOzm6o+gAAAAAAAAAAAAAAAAAAAPj7+TkjJWNIOt 2et1WfYPH/YIofH2cZcJyEnKkenn6IyAAAAAAAAAAAAAAAAAAABjODmjZONIWt2WtVWPYPH/AGCK Hx9nIXGcg5ypLfo3xkAAAAAAAAAAAAAAAAAAADGcHPGyUaQ1astaqseweP8AsEUPk6+QuM7BTtSW 7TujIAAAAAAAAAAAAAAAAAAAGM4OeOkY4hqzZqzVY9g8f9gih8nXyFxnYKdqS3ad0ZAAAAAAAAAA AAAAAAAAAAxnBzx0jHENWbNWarHsHj/sEUPk6+QuM7BTtSW7TujIAAAAAAAAAAAAAAAAAAAGM4Oe OkY4hqzZqzVY9g8f9gih8nXyFxnYKdqS3ad0ZAAAAAAAAAAAAAAAAAAAAxnBzx0jHENWbNWarHsH j/sEUPk6+QuM7BTtSW7TujIAAAAAAAAAAAAAAAAAAAGM4OeOkY4hqzZqzVY9g8f9gih8nXyFxnYK dqS3ad0ZAAAAAAAAAAAAAAAAAAAAxnBzx0jHENWbNWarHsHj/sEUPk6+QuM7BTtSW7TujIAAAAAA AAAAAAAAAAAAAGM4OeOkY4hqzZqzVY9g8f8AYIofJ18hcZ2Cnakt2ndGQAAAAAAAAAAAAAAAAAAA MZwc8dIxxDVmzVmqx7B4/wCwRQ+Tr5C4zsFO1JbtO6MgAAAAAAAAAAAAAAAAAAAYzg546RjiGrNm rNVj2Dx/2CKHydfIXGdgp2pLdp3RkAAAAAAAAAAAAAAAAAAADGcHPHSMcQ1Zs1ZqseweP+wRQ+Tr 5C4zsFO1JbtO6MgAAAAAAAAAAAAAAAAAAAYzg546RjiGrNmrNVj2Dx/2CKHydfIXGdgp2pLdp3Rk AAAAAAAAAAAAAAAAAAADGcHPHSMcQ1Zs1ZqseweP+wRQ+Tr5C4zsFO1JbtO6MgAAAAAAAAAAAAAA AAAAAYzg546RjiGrNmrNVj2Dx/2CKHydfIXGdgp2pLdp3RkAAAAAAAAAAAAAAAAAAADGcHPHSMcQ 1Zs1ZqseweP+wRQ+Tr4y5TkHOVJb9G+MgAAAAAAAAAAAAAAAAAAAYzg542SjSGrVlrVVj2Dx/wBg ih8fZxlxnIKcqT6ObpjIAAAAAAAAAAAAAAAAAAAGM4OeNkY0h61Za1VY9g8f9gih8Xbwlxm4GbqW 6uLrj7AAAAAAAAAAAAAAAAAAAA+fr5OaNkI0ia1Y61Vb9g8f9gihxknCl1m65N1OdsZ3x0ZxkAAA AAAAAAAAAAAAAAAAx8fek5ozui6jazYKsRPsHj/sEUOu2Ktlqn6XZ6scjBSRLbOPpjYxkAAAAAAA AAAAAAAAAAYfJjm+uM0xXVE1xVOZr0Y9g8f9gKHW7JWz7s1W6i9SdYlasXXB9pLbI7fHY5/s3NeT 7fGT6fI+nyPp8j6fI+nyPp8j6fI+nyPp8j6fI+nyPp8D7x8fJtxp1m7Tp5jbw/MfWIjbXTk5SHsH j/sBQ63ZK2AdthqO8vXbUZWrJ0V/oJ7ZB7Sa+ofJMIkS6IySyJRLIkSyJEsiRLIkSyJEsiRLIkSy JVLYiRLYicEr8xfwSemN0kjy8PIdkfxQp0xWEAPYPH/YCh1uyVsAAz08ome2si37qZkumaULspIu 2aRkuyki7KSLspIuyki7KSLspIuyki7KSLtilC6qSLtilC6fNNFu5qz8k7wcI+vkAAHsHj/sBWoQ AAAAAAAAAAAAAAAAAAAAAAAAAHpAf//aAAgBAgABBQD/ACi//9oACAEDAAEFAP8AKL//2gAIAQEA AQUA6w6rz/LM+776rO++qzvvqs776rO++qzvvqs776rO++qzvvqs776rO++qzvvqs776rO++qzvv qs776rO++qzvvqs776rO++qzvvqs776rO++qzvvqs776rO++qzvvqs776rO++qzvvqs776rO++qz vvqs776rO++qzvvqs776rO++qzvvqs776rO++qzvvqs776rO++qzvvqs776rO++qzvvqs776rO++ qzvvqs776rMfLPYHlHyRFUbivuDeUv1FOSVKJkRwE4CcAOAHADgBwA4AcAOAHADgBwA4AcAOAHAD gBwA4AcAOAHADgBwA4AcAOAnARciFyRUK8ndQcgyGxaaqf4fYHlHwRFUjZe68RsqbpGoKIUQkKYY kISEYJDAmBMCYEwJgTAmBMCYEwJgTAmBMCYEwJgTAmBMCYEwJgTAmCQWELCKoSFcNByEhIyxusk5 VVQV0VUL8vYHlGltupyqDlaIMREQaijcUoilMUSKgkZDDIYZDDIYZDDIYZDDIYZDDIYZDDIYZDDI YZDDIYZDDIYZDDIYZDDIYZDDIYZDDIYZDDILGQWKVRSuKORR2KPRCZltDiSYrjFXx9geUaG26nKs vy9KEjxhmONRxuOUMFLAjIjJdF0XRdIXSF0hdF0XRdF0XRdF0XRdF0XRdF0XRdIXSF0hdIXRdCsi sisFTBXHHY49GH4xMhU10y4tTFfw9geUCJ9rlcL6SNHGGBlgbZKGilsShDZQ+kPr/wBX0fSGygtC CtoVNDjI6wPsElgzCGjlLrdTden2B5QZfGvnYbCIkdkYZGmihsSn61ItJXQOtD7JIZJTBm0X6+Hs DyhP1cpjbLcVojtDLY3QIn1qZU+yugebJDRKaJ7CVUvtq27o9geURaLx6C19JFbI7Y1QU0/WqFQd oH6CS2TG/wAzZrZd0ewPKMqo2n4VH5FoGKBunVTifj9JJpJdBnVH+mj2B5RkqfdcOki0jFJQn5qm pPx5CTSS6TOKf6tHsDyjI0/2hIRU/GUKbNU1DyfklCWhm6f06PYHlGRf9QkIqfjKCWapWx4kkszj daPYHlGQ2wrItjImqlseJJMM43Wj2B5RkNsEjWNarUeJJMM43Oj2B5RkNsEjWNarUeJJMM43Oj2B 5RkNsGyLY1qtR6ySTDONzo9geUZDbBsi2NarUesk2TDON1o9geUZDbBsjWNarUesk2TDON1o9geU ZDbBsjWNarUeskkwzjdaPYHlGQ2wbI1jWq1HrJJMM43Wj2B5RkNsGyNY1qtR6ySTDON1o9geUZDb BsjWNarUeskkwzjdaPYHlGQ2wbI1jWq1HrJJMM43Wj2B5RkNsGyNY1qtR6ySTDON1o9geUZDbBsj WNarUeskkwzjdaPYHlGQ2wbI1jWq1HrJJMM43Wj2B5RkNsGyNY1qtR6ySTDON1o9geUZDbBsjWNa rUeskkwzjdaPYHlGQ2wbI1jWq1HrJJMM43Wj2B5RkNsGyNY1qtR6ySTDON1o9geUZDbBsjWNarUe skkwzjdaPYHlGQ2wbI1jWq1HrJJMM43Wj2B5RkNsGyNY1qtR6ySTDON1o9geUZDbBsjWNarUeskk wzjdaPYHlGQ2wbI1jWq1HrJJMM43Wj2B5RkNsGyNY1qtR6ySTDON1o9geUZDbBsjWNarUeskkwzj daPYHlGQ2wbI1jWq1HrJJMM43Wj2B5RkNsGyNY1qtR6ySTDON1o9geUZDbBsjWNarUeskkwzjdaP YHlGQ2wbI1jWq1HrJNkwzjdaPYHlGQ2wbItjWq1HrJNkwzjdaPYHlGQ2wbItjWq1HrJJMM43Oj2B 5RkNsGyNY1qtR4kkwzjc6PYHlGQ2wSNY1qtR4kkwzjc6PYHlGQ2wrItjImqlseJJMM43Wj2B5RkV sJSKv4yolmqVseJJLM43Wj2B5Rkf/UJSKv4ypTZqmoeX8kqS1M43Oj2B5Rki/wC0Koi1DKlC/mqa h5SSpLUzdf6tHsDyjJ6/p2HURaxiobX81TWv4/USaiXUZy59N6PYHlGXubEiE5+RaxisaqEXVCjl Q/WSayXX+Zy59ro9geUUVbNeXPpVRFdI7gzWUVfeqK6h2skOElwmu/ST3bx/R7A8oMpk/SxHiM8M OjThTX9iLqWqr6HHB50kOkp4zSVsUVKqro9geUDLit15fLSumM+MPjTw26UuCVH2moPsWoqcK3R1 4feJD5MkIiTpKvO6fYHlGiFLViuHLSpGJAzIGnyh8peKXRHEEcQ20NtDbQ2kNpDaQ2kNpDaQ2kNp DaQ2kNpDaQ2kNpDaQ2kNpDaQ2kNpDaQ20NtDbQVxBXEFdKnit8cfHpA/IJMn6TMp+0vw9geUaYU+ pmqJNprRmUNSRuSUSSmQgkgSQI+X5fl+X5fl+X5fl+X5fl+X5fl+X5fl+X5fl+X5fl+X4r4sgWQV SCuSOSR2SPSiRLREzDMlUVVVfh7A8o+EeW4wsTNKKxmYijcsollMspliSxJZjDGIYxDGIYxDGIYx DGIYxDGIYxDGIYxDGIYxDGIYxDGIYxDGIYxDGIYxDGIYxBZYssqllUsrljksdmISsxooSVmLjyqq r8vYHlHxRVRWZ77QznNI3mzSlGZUKU5hSJmKHEUOIocRQ4jScRQ4ihxFDiKHEUOIocRQ4ihxFDiK HEUOIocRQ4ihxFDiKHEUOIocRpOIocRQ4ihxFBcxQXMEKsxpHM1aQezmhB/M3nCquqtfn7A8o/hS utC9dL50vnS/eL94v3i/eL94v3i/eL94v3i/eL94v3i/eL94v3i/eL94v3i/eL94v3i/eL94v3i/ eL50vnS9dLytT7X+PrDhvHuTHJjkxyY5McmOTHJjkxyY5McmOTHJjkxyY5McmOTHJjkxyY5McmOT HJjkxyY5McmOTHJjkxyY5McmOTHJjkxyY5McmOTHJjkxyY5McmOTHJjkxyY/pP/aAAgBAgIGPwBR f//aAAgBAwIGPwBRf//aAAgBAQEGPwCPk8jmv2su47DV1z9uE90V5xHl7vuKrTXWMHDNdYwcM11j BwzXWMHDNdYwcM11jBwzXWMHDNdYwcM11jBwzXWMHDNdYwcM11jBwzXWMHDNdYwcM11jBwzXWMHD NdYwcM11jBwzXWMHDNdYwcM11jBwzXWMHDNdYwcM11jBwzXWMHDNdYwcM11jBwzXWMHDNdYwcM11 jBwzXWMHDNdYwcM11jBwzXWMHDNdYwcM11jBwzXWMHDNdYwcM11jBwzXWMHDNdYwcM11jBwzXWMH DNdYwcM11jBwzXWMHDNdYwcM11jBwzXWMHDNdYwcM11jBwzXWMHDP+z/AEd/2MzUhXbvz7H6XVO/ Y7vFJSkpSUpKUlKSlJSkpSUpKUlKSlJSkpSUpKUlKSlJSkpSUpKUlKSlJSkpSUpKUlKSlJSkp+le p3d6ndOn4OZqQrt349EOqp0QT9PVfzGDBgwYMGDBgwYMGDBgwYMGDBgwYMGDBgwYMGDBgwYMGC9X RVh9/wAjo8nRfnmakK7d+H+LqdVEefTqonYYMGDBgwYMGDBgwYMGDBgwYMGDBgwYMGDBgwYMGDBg wYMGDBeqd/uKip2+/wAszUhXbsqOutURVT9SidhgwYMlZ/XsGDBgvYVFQVOnb6fHM1IV27J0QR95 O6idhOwyaWC9hU6d/oK6v0+GZqQrt2RFVOyCdhBJrUU/cRO6N+GZqQrt06CL07qIJNiijydGjzsu ZqQrt0dd/MRBBJsUUU/y+8uZqQrt06/YQQSbFFFOv2WXM1IV26KIJNyij0uZqQrt0e8iCTcoo/Lm akK7dHvIggk2KKKPy5mpCu3R7yIJNyij8uZqQrt0e8iCTcoo/LmakK7dHvIgk3KKPy5mpCu3R7yI JNyij8uZqQrt0e8iCTaooo/LmakK7dHvIgk3KKPy5mpCu3R7yIJNyij8uZqQrt0e8iCCTaoo/Lma kK7dHvIggk2qKPy5mpCu3R7yIIJNqij8uZqQrt0e8iCCTaoo/LmakK7dHvIggk2qKPy5mpCu3R7y IIJNqij8uZqQrt0e8iCCTaoo/LmakK7dHvIggk2qKPy5mpCu3R7yIIJNqij8uZqQrt0e8iCCTaoo /LmakK7dHvIggk2qKPy5mpCu3R7yIIJNqij8uZqQrt0e8iCCTaoo/LmakK7dHvIggk2qKPy5mpCu 3R7yIIJNqij8uZqQrt0e8iCCTaoo/LmakK7dHvIggk2qKPy5mpCu3R7yIIJNqij8uZqQrt0e8iCC Taoo/LmakK7dHvIggk2qKPy5mpCu3R7yIIJNqij8uZqQrt0e8iCTcoo/LmakK7dHvIgk2qKKPy5m pCu3R7yIJNyij8uZqQrt0e8iCTcoo/LmakK7dHvIgk3KKPy5mpCu3R7yIJNyij8uZqQrt0e8iCCT aoo/LmakK7dHvIgk3KKPy5mpCu3R4QSblFHpczUhXboqfcQQSbVFFT7y5mpCu3RPzEEEmxRRRHZc zUhXbojyfRR1RBJsUUUX7JLmakK7dk/bVfAgk2KKL37qwVV+suZqQrt2RHk+giook2L3F7i9GJ8M zUhXbsqItFRFRRO40aNmVo0aL3FhuL5+OZqQrt34I69REVFGjRo0aNGjf6po0aNGjRo0XuK5DXv9 zqrV+OZqQrt349UXt9hEVeijRo0aNGjRo0aNGjRo0aNGjRo0aNGjRo0aNGjRo0aNGjRo0Xq9/YVH V6OnVflmakK7d+XVOw3qh0e7FM7PJ7KQ0aNGjRo0aNGjRo0aNGjRo0aNGjRo0aNGjRpSKaH6V6nR 3sh1eXr+BmakK7d/C7KqFJfZTX2U19lNfZTX2U19lN72U3vZTe9lN72U3vZTe9lN72U3vZTe9lN7 2U3vZTe9lN72U3vZTe9lN72U3vZTe9lN72U19lNfZTX2U19lNfZSX2d3l/Ej/wAj/wCf+7/jD6/y f5/7tBOnX+L/AMfr+5tPKm08qbTyptPKm08qbTyptPKm08qbTyptPKm08qbTyptPKm08qbTyptPK m08qbTyptPKm08qbTyptPKm08qbTyptPKm08qbTyptPKm08qbTyptPKm08qbTyptPKm08qbTyptP Km08qbTyptPKm08qbTyptPKm08qbTyptPKm08qbTyptPKm08qbTyptPKn/jan//Z"
+ transform="matrix(0.24 0 0 0.24 174.5615 142.499)"
+ id="image25"></image></g></mask><g
+ opacity="0.09"
+ mask="url(#SVGID_1_)"
+ a:adobe-blending-mode="multiply"
+ a:adobe-opacity-share="1"
+ id="g27"><path
+ fill="#1D2915"
+ a:adobe-blending-mode="normal"
+ a:adobe-opacity-share="0"
+ d="M195.361,251.626 c-8.161,0-14.8-6.64-14.8-14.8v-73.527c0-8.161,6.639-14.8,14.8-14.8h59.663c8.161,0,14.8,6.639,14.8,14.8v73.527 c0,8.16-6.639,14.8-14.8,14.8H195.361z"
+ id="path29" /><path
+ fill="#1D2915"
+ a:adobe-blending-mode="normal"
+ a:adobe-opacity-share="0"
+ d="M255.024,152.499 c5.964,0,10.8,4.835,10.8,10.8v73.527c0,5.965-4.835,10.8-10.8,10.8h-59.663c-5.964,0-10.8-4.835-10.8-10.8v-73.527 c0-5.964,4.835-10.8,10.8-10.8H255.024 M255.024,144.499h-59.663c-10.366,0-18.8,8.434-18.8,18.8v73.527 c0,10.366,8.434,18.8,18.8,18.8h59.663c10.366,0,18.8-8.434,18.8-18.8v-73.527C273.824,152.933,265.391,144.499,255.024,144.499 L255.024,144.499z"
+ id="path31" /></g></g><g
+ id="g33"><g
+ id="g35"><linearGradient
+ id="SVGID_2_"
+ gradientUnits="userSpaceOnUse"
+ x1="225.1929"
+ y1="152.499"
+ x2="225.1929"
+ y2="247.6265"><stop
+ offset="0.0123"
+ style="stop-color:#C1D72F"
+ id="stop38" /><stop
+ offset="0.1394"
+ style="stop-color:#BCD631"
+ id="stop40" /><stop
+ offset="0.5859"
+ style="stop-color:#AFD136"
+ id="stop42" /><stop
+ offset="1"
+ style="stop-color:#ABD037"
+ id="stop44" /><a:midPointStop
+ offset="0.0123"
+ style="stop-color:#C1D72F" /><a:midPointStop
+ offset="0.3086"
+ style="stop-color:#C1D72F" /><a:midPointStop
+ offset="1"
+ style="stop-color:#ABD037" /></linearGradient><path
+ d="M184.562,236.826c0,5.965,4.835,10.8,10.8,10.8h59.663c5.964,0,10.8-4.835,10.8-10.8v-73.527 c0-5.964-4.835-10.8-10.8-10.8h-59.663c-5.964,0-10.8,4.835-10.8,10.8V236.826z"
+ id="path46"
+ fill="url(#SVGID_2_)" /></g><defs
+ id="defs48"><filter
+ id="Adobe_OpacityMaskFilter_1_"
+ filterUnits="userSpaceOnUse"
+ x="184.562"
+ y="152.499"
+ width="81.263"
+ height="95.127"><feColorMatrix
+ type="matrix"
+ values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0"
+ color-interpolation-filters="sRGB"
+ result="source"
+ id="feColorMatrix51" /></filter></defs><mask
+ maskUnits="userSpaceOnUse"
+ x="184.562"
+ y="152.499"
+ width="81.263"
+ height="95.127"
+ id="SVGID_3_"><g
+ filter="url(#Adobe_OpacityMaskFilter_1_)"
+ id="g54"><image
+ overflow="visible"
+ width="356"
+ height="414"
+ xlink:href="data:image/jpeg;base64,/9j/4AAQSkZJRgABAgEBLAEsAAD/7AARRHVja3kAAQAEAAAAHgAA/+4AIUFkb2JlAGTAAAAAAQMA EAMCAwYAAAXBAAALIQAAEOP/2wCEABALCwsMCxAMDBAXDw0PFxsUEBAUGx8XFxcXFx8eFxoaGhoX Hh4jJSclIx4vLzMzLy9AQEBAQEBAQEBAQEBAQEABEQ8PERMRFRISFRQRFBEUGhQWFhQaJhoaHBoa JjAjHh4eHiMwKy4nJycuKzU1MDA1NUBAP0BAQEBAQEBAQEBAQP/CABEIAaEBawMBIgACEQEDEQH/ xACYAAEAAgMBAQAAAAAAAAAAAAAABAcBBQYDAgEBAAAAAAAAAAAAAAAAAAAAABAAAAMIAwEAAgMB AAAAAAAAAAIGATIDBBQFFjZQMwcRECKQMRMSEQABAgQEBgEBBwQDAQAAAAAAAQIxcgMEEFCRsyGC M6PTNBFBIGFxEiIyE1GB0UKhscFiEgEAAAAAAAAAAAAAAAAAAACQ/9oADAMBAAIRAxEAAADy0npz Z0Dnx0DS7Q9kr0IKcIKeICeICeICeICeICeICeICeICeICeICeICeICfggp2CElQD1aXxOgc+O1s um7kKj5vpObG6d2Q9zspRA9JmSGmCHmWIiWIiWIiWIiWIiWIiWIiWIiWIiWIiWIiWIaYIeJo1sPe 4OK5C2tCVS3OmN5clN3IVHod9EOv6zWb0zkAAAAAAAAAAAAAAAAAMRJnwcVXltVuetyU3chUfp5+ 5YexhTgAAAAAAAAAAAAAAAAABjODUVxZNbnjclN3IVHIjyCx5sKaAAAAAAAAAAAAAAAAAAMZwaut rJrY8bkpu5Co5EeQWPNhTQAAAAAAAAAAAAAAAAABjODV1tZNbHjclN3IVHIjyCx5sKaAAAAAAAAA AAAAAAAAAMZwautrJrY8bkpu5Co5EeQWPNhTQAAAAAAAAAAAAAAAAABjODV1tZNbHjclN3IVHIjy Cx5sKaAAAAAAAAAAAAAAAAAAMZwautrJrY8bkpu5Co5EeQWPNhTQAAAAAAAAAAAAAAAAABjODV1t ZNbHjclN3IVHIjyCx5sKaAAAAAAAAAAAAAAAAAAMZwautrJrY8bkpu5Co5EeQWPNhTQAAAAAAAAA AAAAAAAABjODV1tZNbHjclN3IVHIjyCx5sKaAAAAAAAAAAAAAAAAAAMZwautrJrY8bkpu5Co5EeQ WPNhTQAAAAAAAAAAAAAAAAABjODV1tZNbHjclN3IVHIjyCx5sKaAAAAAAAAAAAAAAAAAAMZwautr JrY8bkpu5Co5EeQWPNhTQAAAAAAAAAAAAAAAAABjODV1tZNbHjclN3IVHIjyCx5sKaAAAAAAAAAA AAAAAAAAMZwautrJrY8bkpu5Co5EeQWPNhTQAAAAAAAAAAAAAAAAABjODV1tZNbHjclN3IVHIjyC x5sKaAAAAAAAAAAAAAAAAAAMZwautrJrY8bkpu5Co5EeQWPNhTQAAAAAAAAAAAAAAAAABjODV1tZ NbHjclN3IVHIjyCx5sKaAAAAAAAAAAAAAAAAAAMZwautrJrY8bkpu5Co5EeQWPNhTQAAAAAAAAAA AAAAAAABjODV1tZNbHjclN3IVH7+HqWTO1uxMgAAAAAAAAAAAAAAAAAYzg1Vb2NXB5XJTdyFRx5G jLc3XG9SS2MgAAAAAAAAAAAAAAAAD4+ohqq47GvTa3JTdyFR830nNm/7qp+gLVk8fuDcZgehLRBL RBLRBLRBLRBLRBLRBLRBLRBLRBLRBLRBLRBLRBLRBKQohP0MbkT40OcG8uSm7kKj5vpObAJm45sd n98SO3cQO3cQO3cQO3cQO3cQO3cQO3cQO3cQO3cQO3cQO3cQO3cQO3cQO3cQO3xxI7PX84JcQAN5 clN3IAAAAAAAAAAAAAAAAAAAAAAAf//aAAgBAgABBQD+G3//2gAIAQMAAQUA/ht//9oACAEBAAEF AFgq7/bL9narGdqsZ2qxnarGdqsZ2qxnarGdqsZ2qxnarGdqsZ2qxnarGdqsZ2qxnarGdqsZ2qxn arGdqsZ2qxnarGdqsZ2qxnarGdqsZ2qxnarGdqsZ2qxnarGdqsZ2qxnarGdqsZ2qxnarGdqsZ2qx narGdqsZ2qxnarCYVyhn78PQNo/MCUmJhssm48QEScNrGJGEMQgjEIIxCCMQgjEIIxCCMQgjEIIx CCMQgjEIIxCCMQgjEIIxCCMQgjEIIxCCMQgjEIIxCCMQgjEIIxCCMQgjEIIxCCMQgjEIQakYQOlI bGTCajw2R5SPLm/KK2gegbR+LVYzzDZGzFKyBaysYS3FYGSBBQkFCQUJBQkFCQUJBQkFCQUJBQkF CQUJBQkFCQUJBQkFCQUJBQkFCQUJBQkFCQUJBQkFCQUJBQkFCQNkCA9uK0R7WVrJ+ykMy6WI8BrW NY0IraB6BtAsdqbMHtttYxkvKFKxhCs4JpCtExKFMy5W5jWX22NgRAitoHoG0SsBsePZZFhSSkuw peFm5dhi3qRKYk1BbAjoraB6BtCcl/8ASYtUBjCkL8Lwp2fS3WCxpVDA/wA5lFbQPQNoShGNLbif CcM3+roX9VQz4ZFbQPQNoSLP0t7P04e5uql5FbQPQNoSPXIOcPc3VU8itoHoG0JHrkHOHubqqeRW 0D0DaEj1yDnD3N1VPIraB6BtCR65Bzh7m6qnkVtA9A2hI9cg5w9zdVTyK2gegbQkeuQc4e5uqp5F bQPQNoSPXIOcPc3VU8itoHoG0JHrkHOHubqqeRW0D0DaEj1yDnD3N1VPIraB6BtCR65Bzh7m6qnk VtA9A2hI9cg5w9zdVTyK2gegbQkeuQc4e5uqp5FbQPQNoSPXIOcPc3VU8itoHoG0JHrkHOHubqqe RW0D0DaEj1yDnD3N1VPIraB6BtCR65Bzh7m6qnkVtA9A2hI9cg5w9zdVTyK2gegbQkeuQc4e5uqp 5FbQPQNoSPXIOcPc3VU8itoHoG0JHrkHOHubqqeRW0D0DaEj1yDnD3N1VPIraB6BtCR65Bzh7m6q nkVtA9A2hI9cg5w9zdVTyK2gegbQkeuQc4e5uqp5FbQPQNoSPXIOcPc3VU8itoHoG0JHrkHOHubq qeRW0D0DaEj1yDnD3N1VPIraB6BtCR65Bzh7m6qnkVtA9A2hI9cg5w9zdVTyK2gegbQkeuQc4e5u qp5FbQPQNoSPXIOcPc3VU8itoHoG0JHrkHOHubqqeRW0D0DaEj1yDnD3N1VPIraB6BtCR65Bzh7m 6qnkVtA9A2hI9cg5w9zdVTyK2gegbQkeuQc4e5uqp5FbQPQNoSLlvb+nD3N1UvIraB6BtCTN8Jbj /ScM3+rob9VQ36ZFbQPQNoTUx/xGtcdjSlb9ZwsRvwt1jMYVRR/+5hFbQPQNokZinmbPOsaWVjsM XhZuOwpbxOsYWcjtjzCK2gegbQLDdv8ANtuuDGsgTJTMYZjeCaZjBHmSlZcbgxjL9dGxDBFbQPQN oDGtK2z31pBJXYrWQLmVrCz5Whk8QVpBWkFaQVpBWkFaQVpBWkFaQVpBWkFaQVpBWkFaQVpBWkFa QVpBWkFaQVpBWkFaQVpBWkFaQVpBWkDZ4gNPkYI9zKxk7dysZdr80zTGaZoRW0D0DaPzK3Oalmyy oYwEVEv8yqXGVS4yqXGVS4yqXGVS4yqXGVS4yqXGVS4yqXGVS4yqXGVS4yqXGVS4yqXGVS4yqXGV S4yqXGVS4yqXGVS4yqXGVS4yqXGVS4yqXGVS4yqXB1RL/JlUMMyauU1Mt/KK2gegbRxaK2jj/wD/ 2gAIAQICBj8AG3//2gAIAQMCBj8AG3//2gAIAQEBBj8Ar2djdfxW7G01az+Ok74VzEcvF7FWJ73Z o+M97s0fGe92aPjPe7NHxnvdmj4z3uzR8Z73Zo+M97s0fGe92aPjPe7NHxnvdmj4z3uzR8Z73Zo+ M97s0fGe92aPjPe7NHxnvdmj4z3uzR8Z73Zo+M97s0fGe92aPjPe7NHxnvdmj4z3uzR8Z73Zo+M9 7s0fGe92aPjPe7NHxnvdmj4z3uzR8Z73Zo+M97s0fGe92aPjPe7NHxnvdmj4z3uzR8Z73Zo+M97s 0fGe92aPjPe7NHxnvdmj4z3uzR8Z73Zo+Ms7O7u/5Leq5yVGfx0m/KIxzotYixTC5kpbbfsfFJir 9/0EWo74+5qHH8y/3IO1Ug7VSDtVIO1Ug7VSDtVIO1Ug7VSDtVIO1Ug7VSDtVIO1Ug7VSDtVIO1U g7VSDtVIO1Ug7VSDtVIO1Ug7VSDtVIO1Ug7VSDtVIO1Ug7VSDtVIO1U4fmT+5803fP3Kn+D4qsVP v+n2LCd22/C5kpbbcUqVkX4+jf8AIiI34QTgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIEBe AqK1FRfuFqUE/SkWf4PhY4WE7tt+FzJS224JWqJw+f0ov/YnATgcMi4i8BeAtdifpX9yf+4WE7tt +FzJS22jKSfVeP4DUROCCcMmXgORU4KPpL/qvD8CwndtvwuZKW20dUVIcEE4Hxkyi8BHon7uC/2L Cd22/C5kpbbT5/8AoTKFG/iWE7tt+FzJS22nMomUKNmLCd22/C5kpbbTmUTKFGzFhO7bfhcyUttp zKJlCjZiwndtvwuZKW205lEyhRsxYTu234XMlLbacyiZQo2YsJ3bb8LmSlttOZRMoUbMWE7tt+Fz JS22nMomUKNmLCd22/C5kpbbTmUTKFGzFhO7bfhcyUttpzKJlCjZiwndtvwuZKW205lEyhRsxYTu 234XMlLbacyiZQo2YsJ3bb8LmSlttOZRMoUbMWE7tt+FzJS22nMomUKNmLCd22/C5kpbbTmUTKFG zFhO7bfhcyUttpzKJlCjZiwndtvwuZKW205lEyhRsxYTu234XMlLbacyiZQo2YsJ3bb8LmSlttOZ RMoUbMWE7tt+FzJS22nMomUKNmLCd22/C5kpbbTmUTKFGzFhO7bfhcyUttpzKJlCjZiwndtvwuZK W205lEyhRsxYTu234XMlLbacyiZQo2YsJ3bb8LmSlttOZRMoUbMWE7tt+FzJS22nMomUKNmLCd22 /C5kpbbTmUTKFGzFhO7bfhcyUttpzKJlCjZiwndtvwuZKW205lEyhRsxYTu234XMlLbacyiZQo2Y sJ3bb8LmSlttOZRMoUbMWE7tt+FzJS22nMomUKNmLCd22/C5kpbbTmUTKFGzFhO7bfhcyUttpzKJ lCjZiwndtvwuZKW205lEyhRsxYTu234XMlLbacyiZQo2YsJ3bb8LmSlttOZRMoUbMWE7tt+FzJS2 2nMomUKNmLCd22/C5kpbbTmUTKFGzFhO7bfhcyUttpzCZQo38SwndtvwuZKW20dTVfvQQ+cmUXiI xFhxUsJ3bb8LmSlttGVPp8/C/go1fkTjky8RyqsB9T6KvD8CwndtvwuZKW23BKNR3wqftX+qCcRO JwyLiLxF4i0Ka8V/cuFhO7bfhcyUttuCKi/CpBRtOs74cnBF/qJ+oiRIkSJEiRIkSJEiRIkSJEiR IkSJEiRIkSJEiRIkReIv6hadFfl31d9EFc5flViuFhO7bfhcyUttv2ERrvzNT/VT4qIrf+TqIdVD qodVDqpqdVNTqpqdVNTqpqdVNTqpqdVNTqpqdVNTqpqdVNTqpqdVNTqpqdVNTqpqdVNTqpqdVNTq pqdVNTqpqdVNTqpqdVDqodVDqC/xorl0F/O74av+qfYsJ3bb8LmSlttyywndtvzD/9k="
+ transform="matrix(0.24 0 0 0.24 182.5615 150.499)"
+ id="image56"></image></g></mask><g
+ opacity="0.35"
+ mask="url(#SVGID_3_)"
+ a:adobe-opacity-share="1"
+ id="g58"><path
+ a:adobe-opacity-share="0"
+ d="M184.562,236.826c0,5.965,4.835,10.8,10.8,10.8h59.663 c5.964,0,10.8-4.835,10.8-10.8v-73.527c0-5.964-4.835-10.8-10.8-10.8h-59.663c-5.964,0-10.8,4.835-10.8,10.8V236.826z"
+ id="path60"
+ fill="#1D2915" /></g></g><linearGradient
+ id="SVGID_4_"
+ gradientUnits="userSpaceOnUse"
+ x1="226.1924"
+ y1="159.7139"
+ x2="226.1924"
+ y2="200"><stop
+ offset="0.0123"
+ style="stop-color:#FFFFFF"
+ id="stop63" /><stop
+ offset="0.3788"
+ style="stop-color:#F8FBF3"
+ id="stop65" /><stop
+ offset="1"
+ style="stop-color:#F2F7E8"
+ id="stop67" /><a:midPointStop
+ offset="0.0123"
+ style="stop-color:#FFFFFF" /><a:midPointStop
+ offset="0.4383"
+ style="stop-color:#FFFFFF" /><a:midPointStop
+ offset="1"
+ style="stop-color:#F2F7E8" /></linearGradient><polygon
+ fill="url(#SVGID_4_)"
+ points="221.189,159.714 214.142,180.951 224.048,180.951 214.142,200 238.243,173.61 227.655,173.61 236.978,159.714 "
+ id="polygon69" /><g
+ id="g71"><g
+ id="g73"><g
+ id="g75"><image
+ overflow="visible"
+ opacity="0.75"
+ a:adobe-blending-mode="multiply"
+ a:adobe-opacity-share="1"
+ width="392"
+ height="242"
+ xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAYwAAAD2CAYAAADF97BZAAAACXBIWXMAAC4jAAAuIwF4pT92AAAA GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAHohJREFUeNrsnYlu40gSBZMU5Z75 /4+dbUsiFwtY2JrqvIqHSEoRACFZPtqk3BV8WVcvAAAACXouAQAAIAwAAEAYAADwWgYuwSp0XAKA wzJxCRAGIgCANf8fIxaE8RIxIBaA8yeMDokgjLkNfLfyzwOAfWTRNX49EkEY5h9N6+sIAuC8/++n mXKZjJ/5UfIYPuyPRXut9WOEAXDuxOGJYEqKZPpEebyjMOYKoTO+BmEAfIYwSjG0JJFaHm8rjncS RkYE2uutwkAgAO8liezzTPqY3jl1vIMwooa+fi0SRvQzshIBgHMKYwpez5Su3jJ1nFUYLWWlznne KpHW5AEAx5fF5Aijfi0jDy91nFocZxRGJgnUMvDkkf3arDiQCMD+YshIwxKE93xy5CGJ1HFqcZxJ GEsE4b0WHa3JA2EAHEcYU8PjlJREdESp47TiOIMwIlG0yqEPPl4iDmQBcCxpZMtOmWNs+Fy2n6M7 kzSOLIy5oogk0SsfZwWCNADeSxhZMYzGYy2I8uslIY5TpY2jCiMzsikjCO2xDz4fiaNFGggDYD9h LJGF9uh9rq8+7hxxWLI4vDiOJozsKCdPFJoc5ry2JG0gDYDzJouxOrTXLJHUsuiKz4uROurS1GHL VEcShpcqNGFoZSZLBBfla6zXO0MeGXGQMgCOkyyyopgCMfzveDifs44yRdQlLKtEdei0cRRhaLKI UkXZoFtCeH7uUn3dJfF9UV8HwgA4tzDG6nktjYfy/OF8zhJLZ0hjEns01SHTxt7C8EpQmdKTlhQu lSguxmu1TLSfNac8hTQAji+MMZEsahHUx6g8743v1aQxOudzSGnsKYyoBOUlCk0StQQGRRrW4aUO bWRVpj8DYQDsI4xaFJEwPFk8FGHcDYGUR1/Jon7uzf84bIlqL2FkS1BWP8XFSRKDIozBEclgiMPq CJ8rDSQCsI0cWmWRTRaWDO7BYy2OXhFH2SE+BudymLSxhzAsWbSkCk8S3vNBkUdGGJE06pTUIgTE AbCOKLRylCYNqxyVTRV347gYX9sr4nhUotDKVPXw292l8WphtMrCSxWeEOrjqghDE0hUlrKkYaUL ZACwj1S8lBGli1oYWpL433Eznl8qWdxFL2trfRsiev/GIaTxSmFkJ99po5+0RBHJoXy8Bt+j9WmU /743qU/E7vxGGgD7JBBrCRCvs9sqRd2NZHErRDEY4iiTxV1p72ppiPx/IqDVr7GbNF4ljBZZaKnC E0UtBu3jq5E0PGFcgpJUH8gCcQDsJworXWQTRiSMWyWM5/Oheu3ZltzFLmk/lPbhkCOoXiEMreHM 9FVYsrhWz8vjS3lNE8dglKiyHd9ewqAsBbB/KcoThjbvwhpCG6WL8vgu2pRb0XbdnGpFKY26vbCG 3u4mja2Fkemz8EpQZWOulZq+gkdNIlFZaq4wBGkAHFYWIm2d3lG6uFeiKNPFt9Ku3ESfEOyJY3TS xi7S2FIYc2ThpQpLFF/Bx6U4auFckiWpFlkgCoBjiCPb8T01Jow6WVx/JHEtZPEt+oCaaD6XRUYa b1OSapXFEJSdsodVporKUZlRUpEsEAbAcaWhpYx6WK02lPamSKOWxVBIo1UY3QJpbC6PrYTROhLK SxW1LH5VUvhlvG5JQ0sXWv/FReYNp0UaAPvKYq4wxoQwvIQRlbojYayRNDaVxhbCaFmKXJNFPcrp q5LFL0UUGWlE6UJ7Y7MT9hAGwDmFEaUMb/5F3X/hjb70hulnZVFL4/Sd3l2iLNUHsrBKUL+M48v4 2EoX0ZvqlaIEYQCcWhalNKwNkrz5GPeftuRWtCk30ed8aUsYzU0WdZoo25ZaHJsJZMuSVMs8i6iv opbEX4FAnt+jdXZnZaEtby6IAuBtUsac/oxaGoPy6A2mWZoupiJldK8uTa0pjLmlKK2DOxLFX8br WllKG5Lbsn4UO+0BII1B/uzLqG9Av+XPKQHZNsU7H22IcF2e0qRx2ISRkYU1g3sISlB/KY9/OUlD 67vIyOKSKEO1JAzEAbCfKFqF4c0CL1PGUKSNm9hr1LXchHYJWYjoy4RYZSnZQhxbz8OIRDEYwvhl SOIvQxh/KenC6+hu7eSOpIEwAM4hjCXSuBRp47lW1F1p16wtoFvShSYLa++MUV7Un7GGMFpKUV66 qPssaln8bUijFoY1u9vbOGnp8NkucX0A4LWyEGmbCT6KvnzIWMjiUcgjsyGbdQOa+V0nyW/p2r2i NLVmSWqJLLR0Ycnib6ck5U3S85JFy8KCSzq5kQfA9pJokUX52AdJo6/EkVmwdM6ci2nG0TmyWE0c S4URDaPN9ltkZPG3U5bS5l1kFhecu2w55SeAfcl0FncJgXh9G30hivqxXIE2Gl3ZO6KIymPZo0xI m/VjrFWSmjsqanBkYfVd/K2kC6uj25JFZ7yxraJAEADHF8pUvTYFjbZUd+5T0UY8hfEQfapAZnRl lCpG0eeHaB/XKcOS5CriGFZ6Qyx5aPMuhiBZ/FJkoaUMTRblMNpoFvfS3fOQBcB55DEp/3e9DuJa GE9ZWO1bpvRkNeZWp7u1Z0emNDUp579YGsOCNyBKF9HIqEFp7K1U4Q2lteZcWOu4tM6xoAQF8H7S EKN0Uz9qd/B90Xh3ku+r6IxUMTpHuWWsdvRGacrr09g9YWTnW7RM0rPKU9oyIN7CgpYs1twxD3EA HJcp+f9UuxPvFGnMFUUXpANLGJ5Qyu+t/+1Ddnp3iXKUNu/iy0gYvyQ/Qa8cGaUt+5FJFiJtI5+Q A8D50kVGIpNy0zgtkIYY/0b5PLOnuHZcqpTRK0nIK0+9TBjZLVfnzOrOJI0vQxbafAuvzyJbfmK4 LMB7JAzv/+zU8H+9lEZL2zApopgMcURHVJrqRO+72a0Pw0oX0YZIVsKIylDWkuVav0UpK2upj7mi QA4A504YnkCmoLpQfm/r3hbWarmRHJ5rV3kpwytNaalqljiGhRc+U4qKNkb6ctJFnSa0uRaaLC7J ZEEZCgCBRCOoLHFMxd19JuVEndyeMLIpo98yZcwtSWWXL5/bf/El9kioL7H3tYhmW1rpYm4pCgDe RyCt4pCigRaxZ297w2fHIFWU6aJ8HOTf61uVbd5mKWOYcVFb08Wc/bm1RQTrVFH3WViy6INUgSgA oEUcWn9HL7kFEOtS1BiIojy+5P97cdSlqUfVDnspYzZLh9Vq+3Rn5mBcE6KwtlgtReEli16YiAcA 64vDayt65XszQ2ejhFFu3FTuxfFQksYo+kitXfowOrFHSnmlqGgLVi9daEt9ZCbmibAzHgBsK46u kIFUlY3pp416CmNIlqNulShuRVtYbuB0r26aR6MsNYm/d8aqwpi7DEhm74urU36K9rTQ1p23Fg9E FgCwpjjqmeFdlTK8ctS1eNT2DP+qZPFVSOMm+grcUV/G4s7v1j6MOcuYe3MwNGl8KV8b7cFd/w4i /pR8RAEAc8QRSUOqlPH8+jpljEVJqZbGl5Iq6qPc7e9eScPry5AlKWONeRjeUNpLUI7SEsUg9sxt bwZ3L/RVAMBr04bXCT5Wpam6XF+WpK7y7z6Ka5EqynQxiL2DaC/xaKnNJ+5Fayi1jpQagtKTNXN7 SKSLaClhZAEAa6cNSxrlXX5fpYyxaNdqadyVdnBuyli187ufeaG0foJMyhgMMdSlp0wZykoXIu3b qAIAzE0b2nNtBGl2YdbBaRsHJ2W0rMg9q23sGy5My2S9PnExhsTFyG6BmHkDAQBeLRFNGpeqNOXt RJppG7Wb6i6Qxiz6hpP3RNIHCSNj0swF6WaUopAFALwyZWRvri1xXIL2sWVqQbR67qrCaEkaLUNr 6wtxCWRh7ZVryQFJAMAe0ojazWe7dWlsI6/JhKG1l6KUoma1lf3Ci2RdiGyyuIg+CspbRLA3TD7n jQQA2EIe0Y21Nw1hUB6z0sgkDC8dLRZGNlVkR0hZpSdLFpfkBVhkTgCADVJGZoM5qyLjyaN1o7hV +jH6mTHL2gcjugjWBfHKUN1WJw8AsFG6iGSRLeNn2spoFOlqbWXfeDG6IHK1ysI76cyOeaQLADhr maqfIY2L5Pt5rQ7vzYfVZspUfXC0CsLq5LbGEgMAnC1laP0Z1giqls7ubBl/k07vaOiYtp6TdjKa JKJJJ9n5FqQLADhj2vCG20Y33NlSVNfwu62SMLqkNb2E0SviyMzgXrUOBwDw4pThrY6R6QPOVmo2 7fvNTNzrgs9F9bhIHH3ihC07C+kCAE4mE00ctUCiakymhN+vfZPdz4gm2fHFXSALK0V409pFWPID AM6XNrwUklnANSpZzRlS29x+zllLqiVpZBKHNwoqE6OQBgAcXRTeIoCd0x564siW8K2RUs0MMy9E 9tBOwNv4KFtjQxwA8C5C8drOLlmlya4h5a21Fy513q948llbdo48okglQn8FAJxLCt68Ma1Bt9pD 7fW1O7q7LYQRxausLaPaGivPAsC7yyTbZnZiTznIyENk4UipfuZJtp68VXLyxJGZoEfaAIAzSaJl TtuaCWOVdrJ18UHrJCNZRFErU3ZCCgDwjglDa+u6GQkjszjr5sLIJI2oA8dLGtKYMBAHAJxVDJ4s Mmv1ZWURlaNeKgxJnmBmT9kueZFFKEEBwGdJJjui9CU7j/YrnJTX6Gcn3m1SbwMAOEnyyDT4SxNF tGrtLGF4nc3euN7MbMKsGDIlKMQCAO8kjeyNdIs0Vm0vt+jDiGQS2TVbtgIAOKMkoopMa5uaEc4q 9C+8EF4UmyMpAIB3Tx4tfcGb32T3G52sVzN7iQkBAA4ogJYbbetjbxe9zFp8s8v8/Y4XCQAAkeiN uwSJQiQ3qbn1Jn/zhNHNuDCR5RAKAHyKLDKfjxJG9t/YpdNbpH1/7ZY4BgDw6TKJSvWtW0Espt/g ROes/eQtxYtQAAAOsJFc/6KTmxPJAADAF8RL29F+5xMHAEAGfz5fvHfFFu1tf8ILCgDwbrLIrAi+ xs/+CGEAACCX/FpTm9x4IwwAgPMkka2+/jDCoJwEAPAGbSoJAwDgwxr+owuDlAEAcHJIGAAAgDAA AD6At5jpDQAAJAwAAPikdIEwAAAAYQAAAMIAAACEAQAACAMAABAGAAAgDAAAAIQBAAAIAwAAEAYA ACAMAABAGAAAgDAAAABhAAAAIAwAAEAYAACAMAAAAGEAAADCAAAAhAEAAAgDAAAAYQAAAMIAAACE AQAACAMAABAGAAAgDAAAQBgAAAAIAwAAEAYAACAMAABAGAAAgDAAAABhAAAAwgAAAEAYAACAMAAA AGEAAADCAAAAhAEAAAgDAAAQBgAAAMIAAACEAQDwMUwIAwAASBgAAHDOlIEwAADgUMKYuNQAAOdu F0kYAABwGGGQLgAA1mtHd2tTSRgAAOeThvX58vhYYZBSAOBTJDAl0sXU0EauJhESBgDA/tKoG/U1 GvnVk0a/08UhNQAArJtENqff4KQydbTpyBcFAODA0titA7xf+MtPM09YuwDT1nEKAOCEaSLqw5he 1Wb2K51c5hedErYkUQDAJ0ohalen4KZ9esXN9h4zvefIBQDgE6QxSVyJmSRXllq9xN9vdBEiM2ai FwDAp0hjMm6sWxKGN9oqandTbW+/0clnkkXr8DFkAgBnl8KcG+dJ/AFFU9DGZqUQ3uT3G1yUKGJ5 1pyEkVIA8BkCySSOKHVMiTZ2tfazn3liU/IEopPPXBhkAQDvKIu5N9JTcGx2o903xpLopDIXyJNB JIgp+XsCAJxBHNkb6czN+ZT8Ppl7Q96vcNItJxHZUoKTRBAA8K4CiYbIPp+PDW1t5qb+ZcKQwIxZ C3oJA2kAwLumi0w7OiqSGKWtI3yV9rNPntyc2KQdkRk9cQAAvIscJidZWG3mqHy89IZ804SR6Zix RDFWJzlK23Axz4zIBQDOJBCRuDQ/OqLItKOrDx5asw/DkoRmxFH5mlH8OhzDbQHg3WQRtZuZhDE6 clky9201YURlqDFIGGODGT0rAwCcVRxRKX9MtJ8tJarF7WffcIJZY3mmtKJVFK+s+AYAcBYxRJ+L Sk5jcMzp12iq2myVMFpO0CpXtdoRgQDAGSQSdW5bCePRII1R8h3tL1lLaq4kyhN/SNwhHtkaUQDA UdOFVRXxkoUmh0fQfmZK/SILy/t94mS9dUsiI3on6J209jNF4o5w5AEAZxFHNM/iURxLZbFKGT+7 ltSUSBjRCKjoRB/BBaQjHADOKAmvKqP1UTyM9jFqQz2BaL/D6sJoPenROdHoKC+EVdfLCAJ5AMCR xJGpzHg32I9EW9pSltosYXiiECNWRXW4R0PUmrOoFgDAEdOFJpEoSTyPe/U4VxpzfvdFCSNKGi1W fF6Au7T1a7SsagsAsHe6EMmVo7yb63tSFF5ZalHq6Gc2utnRUZEkshdgSpw8ogCAI6YLWUEUd+fj pQkj3W6uMXEvEkdWEnfR63abxSsAgBeki7k32Hfj0BJH3W5uMlqqbzh5TyCtUSpzEVpKU6QMADhi uvCE8VBuqj1R3IMb72iY7WLmrlabnXuRsWXGng/xZ4KTMgDgiOlCGiowLdKIOr6jzetm7ZGx1bDa TN/F87glLkhLR44IczQAYL90kZnYbI2EqtvEW4M8Mqt/L2of+4YLEfVfaOb0TvJWXIybcWE8e86Z owEAsJUsrOkGmVLUXZFG1D5mb7BXm4vRz7worQkjEsVNsanVqROtzLjYogAAM2URdXA/GtrIW0Ic L524Nyy4UJm+jEdwEerj+vM4/DxeiuN/P6P7kdz487z7ed4rF6P7ea0rfueOv3EA2KAMJZLbEygr iqjNbE0X2u/YfEM9JC9MV/3gLlGWsmpz1vH98/uUx70QRl8cXXFIJY5IGoI4AGBFWbR0cFtTDeo2 8ltpH7W+jUyHt7fH92YJY3JEkZFFfVG+fxLFd5EsbkXCGKqEEQmjThmlLOp0QdoAgLVkUYujbrSt AUC3QBLWa9mEYW0V8fKSVH1xygbbGjJWlppuijQG5Yhk0SmJoa+k4EmDtAEAS0RRPnorz1ojoer2 sD40aUQDgzJbts5KGUPDxeoco0bjiy9KuhgUWVyLz1+MhOEJoyt+v1H5Gk0SpA0AyIoiksUYVFse jizqR00ac6YeTMnzWj1haHfpVsdOb0SwoUgadbK4FsmiTBnZhNFVKUNDEwdpAwCyohCZtyzSwyhD 1cdvI2lEKcOTxSpTEJb0YZSNb1mailLGUxpRGWqoRKHJonMa+k7aO8ERBwCiiEShVVesEaLlTbM1 2Oe3IwpLGLdkyvDKaZsnDE0cXSGLTMrISKNMFhdHFpYwpkIWnZM4InEgDwBEYcnCWnVWW+LDE0Ut jUgcmc7uVdeQWiIMcS5iJmXcqpLTt/w5IqpFFlGjXs/b6BrEQeoAQBTRpLxphiwsUXji8EpSWv+F yEqd3XOFMTl34V7KuFelpUtwaGWovlEW5UXqg5SRKU1NhmQA4NyCyIpCjGShDZ3V5lV8B3L4bXzu OyhFeSOkWs5/s4RhDVEt7+QfRUNfSqNMGV6qqKXRBymjlsTFKFPV3zsVH7eUpqagzAUAxxRDNmFk k8XDSBfaCKhaCv/5OTxpRB3eXt/FquvtrdGHUd+p18t2PIqGXytNXZTk4U3Sy7zxtTiespjEHmk1 JctVmWQDAOcSibXQamYDJGvobCmL34njP+L3YWRLUasOpS25zPy+srPZKhFpX+Md3pDZqA+j5Y9k 6UXrFn4eAPZPGNnyU3borCaLm1KG+k+VLLzDG17rSWOTdLFEGCJ+B7IllEgCEryWbaCjWZlrxVlE AXA+cSyRxST6sFlNFjdHFnU5yhPGb0cW1gipTSofwwpvRl3S0dZ+19JEn0waljCiIW7Px6EqS12K z2n9IyL+pEBGTQGcUxaZ5T2iDm5v8yNtUp7VZ/FPQ7Lw9gpqWdJ8t+XNPVlIUhqZklSXSBGj2JNn roU0xh9ZjIU4ns9HRxzWo9dBjlAAjlOGmgJJiCzbz8KSxbfofRSRLH47Zaho7oXIhpvKrTUPo1N+ wbFoOLPSyAgjMw66vJClLMpjlD9HYdXikMSjJocu+SYhFYBlMmhJFa2y0EZCZWRxE33IbC2Hf6rH WhatI6M230RurZKUNcy2FkerNLw33lvw6/mmXos3tlyj6iH6aKw+WRaLZIEgAPYTSKs0rEUEvdFQ 1uZH2qQ8r5/iH4k7uVtGRmlltdVYM2FYb9RYNbgZaXiNq/amWtseatJ4iD9JcKk0WjrnAWB7aXhr QXk3oJP4o6G0mdzakh9WZ/c/Ys/DiFanrTdM8q7BoUpSUWmqbOSz0rB+flSGeiSkcRF7rw1vhrlI bhgx0gDYVxhT0GjWd+FjsmJxF31TuGg2dzSk9rdRjlpj7+7DJYxsaapMG1oDG02Es5ZR90RRvsHP pdOfW79mpZFdUh1hABxfGN5EvKws6r6Let8Kq/8imt3tLWWe2fNis1LUFgnDeyNHpeF8JGThJYxo 8kx5J3AtJHFVUoa1LIkmjH6mMJAFwPbCyHZyjzOqFlay0Pa1aJnR7Y2KinbV82SxujS2Kklpo4Qm RRwtPzsShZUqvooL/0wX9QZN1gq5njhE2kZSIQ2A7WQxNT5qZai6P3SU3G559RIgVsqwEoW1wGA0 jFacEtQpEoYnjXLOQ7bxzAyh9UYtfBXiuMq/d/UbnKShiWOuNJAFwHGkYQnj0ZAublU5yts5L1qy /DuQRVSCispzpyhJlfLwImGLLKw+DC8yluIYKnFo0uiN8hTSAHgfYYwSz+HKlqIyW61qaULbqzsq Q2X7LTaTx7DRm9gF4sjKQpKi8IRx/XkjalnUfRmeNCxhRP0ZCAPgGMLwZDGJP4imlsXdKEdF+3Pf xO+rqDu4DyWLLRNG1J8RScMaAjc69UUrXVyrhOGVpYbGlIEwAM6TLsZkwshULW4N0rgpj9oM7nr4 bKss3qIkNVcaIvl16LWRUc9SVJkwhiphWH0ZLSlj7dngANAuCi1R1M+z6WIUe85FnTK+FWnclBRR J4rspLwWWWwujuGFb3KLNDL9F1Z0/DJKUbUwWstSnjSQBcDxpRHJIprRHaWMmyEIL1FEqSLb0X36 Tu9SFFlpTOKvSZ8dVntVRKEJo+78tvYWvyQSBsIAOFZJKhKG1p6MTtXCGimlPY9E8RB9BvdDkdok L1qN9ggJo0Ua2T0vvIRxlT/7MKwSVDS8NprINzdlIA6AdUQRJYy6HOUtLGi1KZnSlCWSjChaS1C7 yGKPklQkDS1teEnjUr3JQ/H4nKh3q4RxUaRxCRJGZngtHd8Ax0oYmXJUZq+LaB0p77WHxP0UD4nX htqlz2IvYWSkMUnbHhhjII5aCjcjTXjlqOxcjEgaiAJge3FkN0NqmYORKU9ZcmhJFNYM7sPI4tXC mFue0t703hFH+ca2pIkoXWRkkU0ZHogFoK1BbNk9L+rH8OZ5ZYRgPc+Iwis/7S6LPYThSUOTxyh/ 7hNei6N+oy/y7z0v7skk4fVdZIWxRBaIAmC+OLKyyHZ+eyth3wOpRENkWzc/OoQs9hJGNmlMSmNc v+F9lTZ6+fduehdFHPXn+oQoMsIQsffKQAwA24ukRRqZlOF1hkevWf0To1IWkzPIYk9hlCffGc8l SBudkjaejXmdNHrjMRLEnHSBMAD2k4WIP2CmRRqePEbxl/Cw0kRUftp1nsWRhdFaotI6xbW00RWl qmfi0NJDS5pAGADnF4ZIbk0pSxjWx1lJjOL3URwyVRxNGFrasGRRp43668dKFmVD/0gKwtqiNdrn m/kXAPsJQyS3rPmkNN7185bDks00s/R0WFkcSRiiJAxLIJNxh1+nkzFICr3zemY01JzlzZEGwD7C kERpKtv4j4mUUm9L3ZImpqNe+OHAfwzRwoWROLoqcXTiL1MepYmlu+0hCoDXlaZapZFJHlMghslJ FJnf7dCyOKoworSREYcYAukqeWTkQKoAeO+kIQl5eK+PkptDccpUcRZhiPgjqTKd4p2TRGSGIJYI A2kAbC+LrDBE8qOpWo45SWI6y0UfTvbHEZWp6mSSafQzH4vkJ+chDIB9hRHdxWdGKUWL/0Wd2G8l irMJQ5OBKOnDk4bX6GdSw1qLCyINgNcKo0UakUhE5o1yOrUozioMcWTRkjqyKSGbJOjgBjiuSLyG u6V/YU5fxFuI4szC0N6MOaljmiGDTOkJUQAcM31MM59PC37GW4jiXYShiUMkP7JK+16SBMBnp45s w9/6McI48B9GlDrq2eNTQjgIA+D9hLH11yCME6cOCdJHy89AGADnFEbm89PCr0UYb5A6ZIFAsn8o SATguIJo+fppxX8HYZz8D6n75DcfAGE0ff3HtxEDf1ipdNDyh9LxhwVwOmkgB4Sx6h9Kxx8aAGJB GLDmHxb9FwCIAGEAf6gA8Ln0XAIAAEAYAACAMAAAAGEAAADCAACAs/JfAQYAL3iXmIlSiu4AAAAA SUVORK5CYII="
+ transform="matrix(0.24 0 0 0.24 179.2061 198.1514)"
+ id="image77"></image><g
+ id="g79"><radialGradient
+ id="SVGID_5_"
+ cx="225.1929"
+ cy="226.1387"
+ r="30.8299"
+ gradientTransform="matrix(1 0 0 0.75 0 56.5347)"
+ gradientUnits="userSpaceOnUse"><stop
+ offset="0.0123"
+ style="stop-color:#FFFFFF"
+ id="stop82" /><stop
+ offset="0.4828"
+ style="stop-color:#FDFEFB"
+ id="stop84" /><stop
+ offset="0.7611"
+ style="stop-color:#F8FBF3"
+ id="stop86" /><stop
+ offset="0.989"
+ style="stop-color:#F2F8E8"
+ id="stop88" /><stop
+ offset="1"
+ style="stop-color:#F2F7E8"
+ id="stop90" /><a:midPointStop
+ offset="0.0123"
+ style="stop-color:#FFFFFF" /><a:midPointStop
+ offset="0.8025"
+ style="stop-color:#FFFFFF" /><a:midPointStop
+ offset="1"
+ style="stop-color:#F2F7E8" /></radialGradient><path
+ fill="url(#SVGID_5_)"
+ d="M186.706,235.825c0,5.965,4.835,10.801,10.799,10.801h55.374c5.965,0,10.801-4.836,10.801-10.801 v-19.373c0-5.965-4.836-10.801-10.801-10.801h-55.374c-5.964,0-10.799,4.836-10.799,10.801V235.825z"
+ id="path92" /><path
+ fill="none"
+ stroke="#EDF5E5"
+ stroke-width="5"
+ stroke-miterlimit="10"
+ d="M186.706,235.825 c0,5.965,4.835,10.801,10.799,10.801h55.374c5.965,0,10.801-4.836,10.801-10.801v-19.373c0-5.965-4.836-10.801-10.801-10.801 h-55.374c-5.964,0-10.799,4.836-10.799,10.801V235.825z"
+ id="path94" /></g></g><path
+ opacity="0.74"
+ fill="#FFFFFF"
+ a:adobe-blending-mode="lighten"
+ d="M263.623,229.595c0.037-0.364,0.057-0.734,0.057-1.107 v-13.375c0-5.965-4.836-10.799-10.801-10.799h-55.374c-5.964,0-10.799,4.834-10.799,10.799v7.324 c7.545-1.012,15.699-1.566,24.213-1.566C231.959,220.87,250.812,224.252,263.623,229.595z"
+ id="path96" /><linearGradient
+ id="SVGID_6_"
+ gradientUnits="userSpaceOnUse"
+ x1="225.1929"
+ y1="204.3135"
+ x2="225.1929"
+ y2="246.626"><stop
+ offset="0.0123"
+ style="stop-color:#FFFFFF;stop-opacity:0"
+ id="stop99" /><stop
+ offset="0.0141"
+ style="stop-color:#FDFDFC;stop-opacity:2.231669e-04"
+ id="stop101" /><stop
+ offset="0.1344"
+ style="stop-color:#BEBEAF;stop-opacity:0.0148"
+ id="stop103" /><stop
+ offset="0.2565"
+ style="stop-color:#94957C;stop-opacity:0.0297"
+ id="stop105" /><stop
+ offset="0.3796"
+ style="stop-color:#747759;stop-opacity:0.0446"
+ id="stop107" /><stop
+ offset="0.5029"
+ style="stop-color:#5D633F;stop-opacity:0.0596"
+ id="stop109" /><stop
+ offset="0.6263"
+ style="stop-color:#4D552E;stop-opacity:0.0746"
+ id="stop111" /><stop
+ offset="0.75"
+ style="stop-color:#414B23;stop-opacity:0.0896"
+ id="stop113" /><stop
+ offset="0.8742"
+ style="stop-color:#3B461E;stop-opacity:0.1047"
+ id="stop115" /><stop
+ offset="1"
+ style="stop-color:#38441C;stop-opacity:0.12"
+ id="stop117" /><a:midPointStop
+ offset="0.0123"
+ style="stop-color:#FFFFFF;stop-opacity:0" /><a:midPointStop
+ offset="0.2901"
+ style="stop-color:#FFFFFF;stop-opacity:0" /><a:midPointStop
+ offset="1"
+ style="stop-color:#38441C;stop-opacity:0.12" /></linearGradient><path
+ fill="url(#SVGID_6_)"
+ a:adobe-blending-mode="darken"
+ d="M263.68,221.954v13.871c0,5.965-4.836,10.801-10.801,10.801 h-55.374c-5.964,0-10.799-4.836-10.799-10.801v-13.871l0.038-7.704c0,0,0.923-9.937,11.173-9.937h54.962 c0,0,10.063,0.328,10.801,10.799V221.954z"
+ id="path119" /></g><g
+ id="g121"><g
+ id="g123"><image
+ overflow="visible"
+ opacity="0.25"
+ a:adobe-blending-mode="multiply"
+ a:adobe-opacity-share="1"
+ width="30"
+ height="30"
+ xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAACXBIWXMAAC4jAAAuIwF4pT92AAAA GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAuJJREFUeNrsl9trE0EUxjO7m5vW tKFN1RqLCmqlIvjgkz5I/cOFIqLggw9KsRHxUo1IdEtactG9+A1+A8dxNrsxK/rgwI9lt5ueb875 ZuZspfJ//Bhqjvc0AfCIHClIQEzSMkUoBqyCJbAKWrxXQoBmBL6AQzChmGQREWbmNQY/DS6Aa6AL mtZvdcDPoEcOQEgxUV5mVMYzH5wCZ8FFcJ0CLoN1UHeIGII34AV4BvbBW4qbzsqKctzruq+ALXAL 3ABXwAafNyjS9sQ3cAwG4BXYA0/AU/AejLOE+I4MtME22AH3wE2wyedNivSFQT3eB/y79kwHnGE2 v4IjinCaNrBEtJiBu2SLs686VkRWGRt8/wTL5jFwxIxMbSGB+Ac1qtcluEMBbWslFDV7QBFdlmBE bwxZtthVDn1dpgF3WIIOhakF9iCf2ajQK32W5hcRJgvnmYHb9ECzQAnyhif8o7PxkWImsiQeRSyJ fWCjJAGy5G2usKtgzc6wx5dWxT6wYhm2jKNBm/UcV90m/aLsdLVoonX+QJV8RvmcXNflNVOOKktQ Fz4p+6AMrBg/GUeeFWUHd51HyuXevz7+GRELNSRzjMwYnmhI5Laa/gEBYxEjskVE7Ih67AeOi3ZE BYc55j+xxzjgpBMpImZL1mNDMuDxm5aYBT2x1+wx+vZJ6lt94kl2Ux1uWl4JWZhy9g/AQ/DOPjt8 q0ULuLebhiRYYO8wPUTIdm+X1zDrKE/FKjH95TL3eP83MiIF7FHAY2ZkYpfadxhoRE80WJ66EKIK BE9YAiPgPkW8dPUSFUfDGnMpHVmKvQJCEoofcsamBLs0fOgSUMnomo2QQ66UAbMTi4+hmOk2mGZW B39OE+rgj5iBcNb3h5qxk9boDb1SLrEh2c75+NlnCfT1A4OP8nZiVeAT0IhZY0Ni+gHP8oEpQ59Z HHP2uRtfkeUnxTj7AWHqMU0ZiRVX2ld5kZ4jnSewHN8FGACSOOKkAlOGAAAAAABJRU5ErkJggg=="
+ transform="matrix(0.24 0 0 0.24 199.0298 216.5547)"
+ id="image125"></image><g
+ id="g127"><radialGradient
+ id="SVGID_7_"
+ cx="202.6289"
+ cy="219.7041"
+ r="2.9995"
+ gradientTransform="matrix(1 0 0 0.75 0 54.926)"
+ gradientUnits="userSpaceOnUse"><stop
+ offset="0.0123"
+ style="stop-color:#FFFFFF"
+ id="stop130" /><stop
+ offset="0.4235"
+ style="stop-color:#FAFCF6"
+ id="stop132" /><stop
+ offset="1"
+ style="stop-color:#F2F7E8"
+ id="stop134" /><a:midPointStop
+ offset="0.0123"
+ style="stop-color:#FFFFFF" /><a:midPointStop
+ offset="0.6235"
+ style="stop-color:#FFFFFF" /><a:midPointStop
+ offset="1"
+ style="stop-color:#F2F7E8" /></radialGradient><circle
+ fill="url(#SVGID_7_)"
+ cx="202.629"
+ cy="219.704"
+ r="2.999"
+ id="circle136" /></g></g><g
+ id="g138"><image
+ overflow="visible"
+ opacity="0.25"
+ a:adobe-blending-mode="multiply"
+ a:adobe-opacity-share="1"
+ width="30"
+ height="30"
+ xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAhCAYAAAC1ONkWAAAACXBIWXMAAC4jAAAuIwF4pT92AAAA GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAtFJREFUeNrsmP1LFEEYx292Ts3V 9ujFrCiwFyPShH4I+imoiPqbhYKIoKigN0W8SulNIrOU63S921u/A9+BYdm9mbndg4IGPiynuzOf eea52WeuVvvf/Joo8VwA6rxm+0lBD3R5TYctpu6XYBRE4DiYzMhpqRbYBDtgHyQ+gsIzQmMUOg3O gzkwzciZTUXqO1gCH8E3CsauERSOUiOgAc6AC2ABXAYXwZECsV/gPVgBb8AH8AVsg45NTjhKTYGr 4Aa4AmYZqYjLmpdj+4ySilwTLIOn4C34YZOTjlLXwH1wC8xzKSMureQym0g+O85ITxP1uU3hPS6r t5j63zFK3QM3uYwNQ0g45KUSPMSJNLjsLS71blHUZJ9Ox5lDSuo2k32SHYsBvslKcAIc5jJvUK7r I1ZntK6Du8yryBJhW9P73hi3jg2ym7ek0hKtO0z4E5xx2RYYOany7DPYyotaUPCwyoVL3KemKpLS TX+h5jhGI88jT0x9/U9yrzoHwoL7ykQtZN8LHGvURUxy05xhntWH8I7WOTzDsaSLmOAMQl6DIYgF mTGEi5iWEyWqD9dtpHCMoPaXtn9KrHSR59CsYxSJ6SKv1e9FW6L1MmM4iXWMIu8ri7u04mjF7HuJ Y3VcxLqciaqfVlnYJRWKJexzlWNs5r2SZMGMNOp1cRYc5atEVBCtPVazD8AzHzHdQUKZUyzywoIT kY9Uh9XrC4o1WTimPmI9ouv9iAXfIHKm1GtKvSyKlq2C1Una5sMTLBRHPN4MOvIxpV6BRfCEJU/s W8Ganf4xzoaCf5dGaS36JHnMKnWNUg/BY35uD1rza7ku5bY4658cMDHkEt6nUZP4TQG1dI/Ic/CJ /SVVHHglS2J94pnluXLecuB9x3Nlk5+3jUlV9hOBMAQjCpn1lMikgFrCdQrtGEKp62CDlCtaMLQc eNu+QmV/7XGp2cyN2rsdCDAAoyXZx8WJpTUAAAAASUVORK5CYII="
+ transform="matrix(0.24 0 0 0.24 213.9448 216.5547)"
+ id="image140"></image><g
+ id="g142"><radialGradient
+ id="SVGID_8_"
+ cx="217.5439"
+ cy="219.7041"
+ r="2.9995"
+ gradientTransform="matrix(1 0 0 0.75 0 54.926)"
+ gradientUnits="userSpaceOnUse"><stop
+ offset="0.0123"
+ style="stop-color:#FFFFFF"
+ id="stop145" /><stop
+ offset="0.4235"
+ style="stop-color:#FAFCF6"
+ id="stop147" /><stop
+ offset="1"
+ style="stop-color:#F2F7E8"
+ id="stop149" /><a:midPointStop
+ offset="0.0123"
+ style="stop-color:#FFFFFF" /><a:midPointStop
+ offset="0.6235"
+ style="stop-color:#FFFFFF" /><a:midPointStop
+ offset="1"
+ style="stop-color:#F2F7E8" /></radialGradient><circle
+ fill="url(#SVGID_8_)"
+ cx="217.544"
+ cy="219.704"
+ r="2.999"
+ id="circle151" /></g></g><g
+ id="g153"><image
+ overflow="visible"
+ opacity="0.25"
+ a:adobe-blending-mode="multiply"
+ a:adobe-opacity-share="1"
+ width="30"
+ height="30"
+ xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAhCAYAAAC1ONkWAAAACXBIWXMAAC4jAAAuIwF4pT92AAAA GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAttJREFUeNrsmO9r00Acxptc1m6d Fn9M125sU4RVpyjiSwXB/9wXulciiE4dhpUMpwzFUa02XdP4HDwHR7hcLk0mCh58WOnI9548973k uTYa/0e54c15nQ8E8TJ1UpKQ2Z8QJgUtgDa4CC6AliZOiYrBCfgGfoLTsgK9OQStgE2wDa6DDv+v hhQwBAdgH0TgS1mBLsIEBV0F18BNcJvC1sCyQdgIHFHYG/AODMAxBSZVhQXgHJ15AO5T2Aa4TMHC 0GMJBXwFhxT2Erygkz/AtGhim1NS1A3wCDwGO+AKBS3QKS+nrlp6eQProKe5G4LvNucCS0+1uXQP wRNwj6JaFkH6SgitNxeJ0BwNueSzMsIC3ulduiX/roJmpp9cWkVQ1CrrqB17ws+TPGdM3y3Rftnk fTpVVlS2ZpN1+qy7znl8V2HSrUvcdbKnutryVRk+63RZd5vzBC7ClFvyMXALbHEDiJreNGpDbbH+ Wp5rJmEd7sQ+n13NCq8uU881WbfPeTquwtq0u1ezW1nXepyn7SJM9dgSCc4oPBTO4Rus9jKJwatZ lGeZy+rYXzH+GWEpXxEq5Kl8VecwBcnURVjMgCcZn5GwsTZH7CJMD3khL5zWLGzKuiHnGZpe5CZh I6bO9wx7v+bN7YYxY70j1o/yEoZpKSdMmntMoMq1tIYlVG7ts/4x50tddmXCEDfgxRETZ1JRWMI6 EesObGFRWCyfaa+oDl8jQd4DscApJUr21S54Dj7wu1JBUW2Ct1rybDDRntditUtPnWor8Aw8Zd2h rXdFQdGYd6WfbPTYnOeeEiSv/cTDyC5FvbL1luspSSXPFUYUmaHu8KS0yfjdMpySYp6QIop6TZdC njEnRTvdpVc8Lt0yBW4wS+04HHj3+Fg4pKARnUxdJnVNBL7hSNal4OxPBFLAZ/CRzumn8NR1wrKR xdfy1KLlwDvmw3RaRlDVX3s8h8dGWiUE/BZgAMf82R9IYLF+AAAAAElFTkSuQmCC"
+ transform="matrix(0.24 0 0 0.24 228.8599 216.5547)"
+ id="image155"></image><g
+ id="g157"><radialGradient
+ id="SVGID_9_"
+ cx="232.459"
+ cy="219.7041"
+ r="2.9995"
+ gradientTransform="matrix(1 0 0 0.75 0 54.926)"
+ gradientUnits="userSpaceOnUse"><stop
+ offset="0.0123"
+ style="stop-color:#FFFFFF"
+ id="stop160" /><stop
+ offset="0.4235"
+ style="stop-color:#FAFCF6"
+ id="stop162" /><stop
+ offset="1"
+ style="stop-color:#F2F7E8"
+ id="stop164" /><a:midPointStop
+ offset="0.0123"
+ style="stop-color:#FFFFFF" /><a:midPointStop
+ offset="0.6235"
+ style="stop-color:#FFFFFF" /><a:midPointStop
+ offset="1"
+ style="stop-color:#F2F7E8" /></radialGradient><circle
+ fill="url(#SVGID_9_)"
+ cx="232.459"
+ cy="219.704"
+ r="2.999"
+ id="circle166" /></g></g><g
+ id="g168"><image
+ overflow="visible"
+ opacity="0.25"
+ a:adobe-blending-mode="multiply"
+ a:adobe-opacity-share="1"
+ width="30"
+ height="30"
+ xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAACXBIWXMAAC4jAAAuIwF4pT92AAAA GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAt9JREFUeNrsl91rE0EUxTOzm69a 05YmVWsUFdRKRfDBJ32Q+ocLRUTBBx+UYiOitlqRaEos2UT3w3P1jIzrbHZNVuiDAz9CNru5Z+69 M3O2Uvk/fg414zOCDzSxRwJiEJGkTBGKAatgEayCFr8rS4AwAp/BIRhTTDyPCDPzGoOfAhfANdAF zdT/SMBPoEf2wYBiQldmVAEBHjgJzoCL4DoFXAZroO4QMQRvwAvwDOyCtxQ3SWdF5QiQui+DDXAL 3ABXwDqvNygy3RPfwBHog1dgBzwBT8E7ENhCvJwMrIBNsAXugZvgPK83KdKzGlTzu8/fpWc64DSz +RV8oYhfTetPEdFiBu6SDc6+6lgRWZNo8P4Flk0zcMiMSGkSP+MPalQvJbhDASuplVB0RfkU0WUJ RuyNIcsWucoh15bYgFssQYfC1Bz7kcdsVNgrByzNHyJMFs4xA7fZA80CJcgb2uofycYHihlrh4hF ax9YL0mAGT7LKivsKmjLpLXjplVrH1ie0ryzlkWa9SxXnWR5QTv6ocUmWuMDqlLu8Di5ruk1Vzmq LEGdD5QtQln7yI8YespZUXbwzBi6cgzGsRTx14ZkxvFbDJeI9Laa/AMBgRUjTIsI6Yh69ANH0xzR DMMc8x/pMcTwjNIiIlqyHg1Jn8dvUmIWZGKv6THk/Jh4GWqFE3RTHW5auoQsTDj7B+Ah2JOzI8vU RNxQ2pYh8efYO4yHGNDubfNzkHWUJ9YqMf5yiZ7AmyEjtoAdCnjMjIj5TbycBhqxJxosT90SogoE j1kCI+A+Rbw0XmKaxzQlCXjz2GpOXUBITPFDztiUYJsNPzAC8kQklpBDrpQ+sxNZL0MR020wZlaC P2cTSvBHzMAg/f6hCu6qNfaGrJRLNCSbOS8/uyyBfL5n8JFrJy7a7Solpk1DYrynTvWBKcMBsxhw 9nEZL8S2GNtzuJo6YFOG1oor7a28iOdI8gLb47sAAwCDFN6m03jgxgAAAABJRU5ErkJggg=="
+ transform="matrix(0.24 0 0 0.24 243.7749 216.5547)"
+ id="image170"></image><g
+ id="g172"><radialGradient
+ id="SVGID_10_"
+ cx="247.374"
+ cy="219.7041"
+ r="2.9995"
+ gradientTransform="matrix(1 0 0 0.75 0 54.926)"
+ gradientUnits="userSpaceOnUse"><stop
+ offset="0.0123"
+ style="stop-color:#FFFFFF"
+ id="stop175" /><stop
+ offset="0.4235"
+ style="stop-color:#FAFCF6"
+ id="stop177" /><stop
+ offset="1"
+ style="stop-color:#F2F7E8"
+ id="stop179" /><a:midPointStop
+ offset="0.0123"
+ style="stop-color:#FFFFFF" /><a:midPointStop
+ offset="0.6235"
+ style="stop-color:#FFFFFF" /><a:midPointStop
+ offset="1"
+ style="stop-color:#F2F7E8" /></radialGradient><circle
+ fill="url(#SVGID_10_)"
+ cx="247.374"
+ cy="219.704"
+ r="2.999"
+ id="circle181" /></g></g><g
+ id="g183"><image
+ overflow="visible"
+ opacity="0.25"
+ a:adobe-blending-mode="multiply"
+ a:adobe-opacity-share="1"
+ width="30"
+ height="30"
+ xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAACXBIWXMAAC4jAAAuIwF4pT92AAAA GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAn9JREFUeNrsl+lrE0EYxvdKjSZW YxEPxBsVrNdHQTxA/KMFBRGPDwoVVIpoq3jUeJUG25qk2fVZ+A28WTabxG4lHzrwgxw78z7zzMw7 73reBDR/jOcCUREhn21LRCy6osfn0kT4BN0h9oiDoiGmTN8Efoum+CHWEBRvRoSbeZXgR8QZcVEc F7syfTcI/kq8Fgviu1jlv3hcET627xXHxFlxWZwXJ8RMxgmPIKkTn8UbMSdeinfiq1hnmUYS4QTs F5fENQSc4rfUgahgT7TFivgk5sVj8VQs4kqukGiAgCviDiKOijr/BUOWL7t/9uGaVyTEighYggsI uI79NQYfdY9FPF8x/WL2xiJLk9hOoelcJehtcYslqI8hYNDGrvP9G5t1PbtRQ+NIg/W/KWaxNNpk DnK5JZ35TzbuCq70ibAu3BBXxWHW1i8hGbpc0+akNLNuBDAtTopz4kBJAuxEC8cPzIlI88BpOoQl Xw1TuDtLsqvZkxbwUA2FjZxEVJYbdROj4mWOpVuzCMoWYGPlxggm4SrfFmFFJOTzDUi2KFY8KIYT sUoSWRadLRDSM0XPMgVPn4guOT0tSN6KVtHd/w8tYWJfqDHeM+m+jBkTeIEaoEmKTUp0oXD80Kjt kU4PkVSqJWTOhIDpFf5APBFLOOPliYhxZgYR00MKmVEEuKWeQ8Q8ruRe5Xb3po7s5CqvDSjnxhVw XzzjFu3k5XTbuuziNYLvZolCk+KHBU8n8QcBL8Rd8VB8yCto8kTEDNBCTIdBg4wQvyD4L6rsdOb3 xKNhhW44IKm4wZaghSAnoIdrHWhz/m3wlOfiI86OXPJPzMvPxLwG/tcX4u3m2l8BBgBQ/dU5d1Za tAAAAABJRU5ErkJggg=="
+ transform="matrix(0.24 0 0 0.24 199.0298 230.2217)"
+ id="image185"></image><g
+ id="g187"><radialGradient
+ id="SVGID_11_"
+ cx="202.6289"
+ cy="233.3711"
+ r="2.999"
+ gradientTransform="matrix(1 0 0 0.75 0 58.3428)"
+ gradientUnits="userSpaceOnUse"><stop
+ offset="0.0123"
+ style="stop-color:#FFFFFF"
+ id="stop190" /><stop
+ offset="0.4235"
+ style="stop-color:#FAFCF6"
+ id="stop192" /><stop
+ offset="1"
+ style="stop-color:#F2F7E8"
+ id="stop194" /><a:midPointStop
+ offset="0.0123"
+ style="stop-color:#FFFFFF" /><a:midPointStop
+ offset="0.6235"
+ style="stop-color:#FFFFFF" /><a:midPointStop
+ offset="1"
+ style="stop-color:#F2F7E8" /></radialGradient><circle
+ fill="url(#SVGID_11_)"
+ cx="202.629"
+ cy="233.37"
+ r="2.999"
+ id="circle196" /></g></g><g
+ id="g198"><image
+ overflow="visible"
+ opacity="0.25"
+ a:adobe-blending-mode="multiply"
+ a:adobe-opacity-share="1"
+ width="30"
+ height="30"
+ xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAhCAYAAAC1ONkWAAAACXBIWXMAAC4jAAAuIwF4pT92AAAA GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAmlJREFUeNrsmM9r1EAUx3cz2XW1 il2wLLagIh5aeilUBC967EX/XA/1It5aUaiC2JNY/EWp0lZkG3c3id+Bz0AIaXayibKHDnzIJfPm s29eZl/Sas3paNeYZ0SHaz5OKmIx5pr+azF7fyh6oi+WxXURZGJZiUScim/iWERiUkWwXTFDlxG6 I1bFBnKd3P1jpPbEvviE4JlvBtueUl1xQ9wVa2ITsdtkzOTmxGTsALE34oP4KH6I0TS5tofUJXFT PBCPxToZ67OlZTUWkSmbsffipXglvos/ZXLGI1N2qx6Kp+KRuFcgVYRh/oJYEgNxle08EUNqsbJY SDAnZa8r1FlYoQzc02sFF5n/W/wskzMlAReopydkaoVtDWocL1bqGtv8Bblx0YSgJFt9xNbJXLfG uZctjQEx11gj9M2YDXCFiVviflmAGeQCYtlt/MxTOvbJmEFkFZqSyu9GNr7xEXNP4gbnVK/mFhZl rUdsd0B3fcQCDs3lcw7PJobJrRH4iE37g24qa6VrBK05HRdiTYjVbvI8xtQ1isSyTd4pE5secW6N xEdslGnyDmhd0oazFRF7j7VGPmIxPdQ+HNMWNzUmBfFj3+7C1YDtMG7RT3UaONMS+jErtC1e05tV EksyPdkAyToHbsqW2e51R7ygs42qNooJaU/oPF2TF8wgl2SkdsVz8Y5sJVXFUvryX6TfNXld5HwE U37cWUbqGdfDsto1njVxQjscQ8jc8+SckO25jqipHTK1i+Ro1peR7FM6pKH7StAhC7uam7CQI+J+ J7RNTb0lU7Vf3+b6hXeuPxH8948qF6Pq+CvAAGGezDColMK7AAAAAElFTkSuQmCC"
+ transform="matrix(0.24 0 0 0.24 213.9448 230.2217)"
+ id="image200"></image><g
+ id="g202"><radialGradient
+ id="SVGID_12_"
+ cx="217.5439"
+ cy="233.3711"
+ r="2.999"
+ gradientTransform="matrix(1 0 0 0.75 0 58.3428)"
+ gradientUnits="userSpaceOnUse"><stop
+ offset="0.0123"
+ style="stop-color:#FFFFFF"
+ id="stop205" /><stop
+ offset="0.4235"
+ style="stop-color:#FAFCF6"
+ id="stop207" /><stop
+ offset="1"
+ style="stop-color:#F2F7E8"
+ id="stop209" /><a:midPointStop
+ offset="0.0123"
+ style="stop-color:#FFFFFF" /><a:midPointStop
+ offset="0.6235"
+ style="stop-color:#FFFFFF" /><a:midPointStop
+ offset="1"
+ style="stop-color:#F2F7E8" /></radialGradient><circle
+ fill="url(#SVGID_12_)"
+ cx="217.544"
+ cy="233.37"
+ r="2.999"
+ id="circle211" /></g></g><g
+ id="g213"><image
+ overflow="visible"
+ opacity="0.25"
+ a:adobe-blending-mode="multiply"
+ a:adobe-opacity-share="1"
+ width="30"
+ height="30"
+ xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAhCAYAAAC1ONkWAAAACXBIWXMAAC4jAAAuIwF4pT92AAAA GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAlRJREFUeNrsmM9LG0EUx5PdjTTW otDYWmoOQm2M/YGXnrxI/3IvnnoRW7TagocotqjQtLYp5pffgc/CECc7u+uGpuDAB2Y32Tff9+bN 7Jstlaa0lXM+E4gIAsd/BqIHpj+cpLBY0Ix4JBbhwYg4I+SvOIdf4jqrwHIOQUvihXgtVsWCQ9gP 8UV8El/Ft6wCyyl+DxH0XLwUb8UbxD0V1RE7ZtCO+I6oj2JPHIlTBPZ94sqe3yIi0hCb4h1Reibm iOK4HDPRuRJnRO+D2BGHRLSXJC7yRGpeNMV7sYXAeQSFCU6FRHIGB56IGveMI/uIGxu5JGFzTN0W wpqIijIsmpDFYZ55hah4xRpxP7MIM4NWWHEbTGGDKY1ybi8VKyVM/l2wYjtM+S1xrvww9x6KulgX K0QqvOOeGafGCnbrjOPScOtmnPA1Hm7Sr+TcjF2Rq2F3nb4zNVzCZsWyWMOr2XFe5WgB9urYX+ba KywkF1bJh8d4WWSrYLdhbdBhmohVrddNtYApLOUZI0jxgp6EMO8YQWlK272wuwobFlHkeVqqMVzC OlaR15mQMO8Yo8L6VpFnypNL0S1YWBe7h4wTVxneiP0RJ+KzaHE9KEjUAHst7J9wnWoqe7z9TVly QL9bwJQOsXOB3X36vbTVhfHqN16Zh49F2xXujK2PnWPsthhnkLYeiz0ziblrVZ55CkV7Ftrk1Q52 z5NmIkowdsUBIrIqz7SltR2la0vUNhxhP3PNP7RCf4CouPIs4jDS9p2U/svj21QfeKf6E8E/+ahy 37K2GwEGAJb/2mQI89WQAAAAAElFTkSuQmCC"
+ transform="matrix(0.24 0 0 0.24 228.8599 230.2217)"
+ id="image215"></image><g
+ id="g217"><radialGradient
+ id="SVGID_13_"
+ cx="232.459"
+ cy="233.3711"
+ r="2.999"
+ gradientTransform="matrix(1 0 0 0.75 0 58.3428)"
+ gradientUnits="userSpaceOnUse"><stop
+ offset="0.0123"
+ style="stop-color:#FFFFFF"
+ id="stop220" /><stop
+ offset="0.4235"
+ style="stop-color:#FAFCF6"
+ id="stop222" /><stop
+ offset="1"
+ style="stop-color:#F2F7E8"
+ id="stop224" /><a:midPointStop
+ offset="0.0123"
+ style="stop-color:#FFFFFF" /><a:midPointStop
+ offset="0.6235"
+ style="stop-color:#FFFFFF" /><a:midPointStop
+ offset="1"
+ style="stop-color:#F2F7E8" /></radialGradient><circle
+ fill="url(#SVGID_13_)"
+ cx="232.459"
+ cy="233.37"
+ r="2.999"
+ id="circle226" /></g></g><g
+ id="g228"><image
+ overflow="visible"
+ opacity="0.25"
+ a:adobe-blending-mode="multiply"
+ a:adobe-opacity-share="1"
+ width="30"
+ height="30"
+ xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAACXBIWXMAAC4jAAAuIwF4pT92AAAA GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAnpJREFUeNrsl2lrE1EUhmdLjSZ2 sYgL4lqsYN0+CuIC4o8WFERcPii0YEsQtYpL3cVgW7PMjO+F55ZhmMlMzATyoRceSDKZc957zplz zzjOBCz3P+/xRE34fE6uWESiJ0I+VybCxekeMSMOizkxlbATwx/xRXwXWwiKRhFhd17H+TFxVlwU J8W+lJ0+zlfFmngjvolNrkXDinAJ+6w4IRbFZXFenBLzqUg4ODGR+CheimXxQrwWn8U2aSolwgo4 KC6Jawg4w28mAsGAmuiI3+KDaInH4qlYJyo7QoISAq6IO4g4Lppc8wrSl66fA0TNSQvJE+GRggsI uE74GxgvW8gB/68l7ouojXVSE/s5N9dxelvcIgXNIQTkFXaT718pViMiyjIa8OiZ/N8US4Q0GLEf 2d5iauYHhWtqpu8PiMINcVUcJbduBY3R9poOT4rpJdteRi1Mi9PinDhUkQC7/Cz7aRH2iTB9YIEb /IqPiSmiu0Sza3gZf2qgcC6jEVUVjWbCR83LOR8CqFpAMu07PrxJOMp3ReSJiOnnfYjH5DdK+sgS sUkT+SW6YxASJoYe46OXFtGjp5uB5JVop8/+EVfMxj4xY7w1m/YywtRmGmqhtlNhNMIs+36O2pB2 fYSmUq+gc8ZsyBzhD8QTsWEikyciomjnETFdMMiUEWBTvYyIFlGJ/ILqNRHZy1HeyBnnhhVwXzzj FO06BSHuUcVbON9Piuy7hlvCudnEXwSsiLvioXhnB5oiEREG2ojpYtRLCXEHOP/JlG12fk88yhp0 /RJNxRrbgDaCrICQqHWhw/OfdG54Lt4T2dIj/8S8/EzMa+DYX4h3l13/BBgABM7SO70ZkkMAAAAA SUVORK5CYII="
+ transform="matrix(0.24 0 0 0.24 243.7749 230.2217)"
+ id="image230"></image><g
+ id="g232"><radialGradient
+ id="SVGID_14_"
+ cx="247.374"
+ cy="233.3711"
+ r="2.999"
+ gradientTransform="matrix(1 0 0 0.75 0 58.3428)"
+ gradientUnits="userSpaceOnUse"><stop
+ offset="0.0123"
+ style="stop-color:#FFFFFF"
+ id="stop235" /><stop
+ offset="0.4235"
+ style="stop-color:#FAFCF6"
+ id="stop237" /><stop
+ offset="1"
+ style="stop-color:#F2F7E8"
+ id="stop239" /><a:midPointStop
+ offset="0.0123"
+ style="stop-color:#FFFFFF" /><a:midPointStop
+ offset="0.6235"
+ style="stop-color:#FFFFFF" /><a:midPointStop
+ offset="1"
+ style="stop-color:#F2F7E8" /></radialGradient><circle
+ fill="url(#SVGID_14_)"
+ cx="247.374"
+ cy="233.37"
+ r="2.999"
+ id="circle241" /></g></g></g></g><path
+ d="m 529.664,248.155 h 18.498 l -2.809,18.064 h 5.59 37.586 l 2.6,-17.718 c 4.98,-1.091 9.133,-3.455 12.512,-6.693 3.084,4.075 8.566,7.37 18.252,7.37 6.338,0 12.775,-1.807 17.174,-3.687 4.254,2.399 9.463,3.687 15.459,3.687 3.088,0 6.236,-0.355 9.426,-1.023 h 67.135 l 3.354,-24.827 -5.445,-0.764 1.879,-13.356 c 0.371,-2.386 0.449,-4.66 0.449,-6.156 l -0.008,-0.375 c -0.457,-12.191 -8.139,-19.765 -20.045,-19.765 -2.404,0 -4.623,0.314 -6.676,0.852 h -34.189 l -0.035,0.244 c -2.527,-0.701 -5.41,-1.096 -8.686,-1.096 -3.801,0 -7.406,0.555 -10.76,1.598 l 0.105,-0.746 h -12.467 l 1.826,-12.951 H 613.08 l -1.846,7.658 c -1.373,5.704 -2.213,5.793 -4.453,6.03 l -4.508,0.477 c -3.049,-1.424 -6.357,-2.065 -9.602,-2.065 -2.135,0 -4.275,0.284 -6.416,0.852 h -19.291 c 0.502,-1.772 0.775,-3.674 0.775,-5.678 0,-9.601 -6.846,-16.305 -16.646,-16.305 -11.055,0 -18.775,7.721 -18.775,18.776 0,0.951 0.082,1.869 0.219,2.764 -2.135,-0.288 -4.277,-0.409 -5.553,-0.409 -2.053,0 -4.072,0.288 -6.045,0.852 h -31.342 c -2.74,-0.553 -5.641,-0.852 -8.537,-0.852 -7.138,0 -13.492,1.674 -18.808,4.723 l -3.451,-1.461 c -3.711,-1.571 -11.232,-3.262 -18.979,-3.262 -8.933,0 -16.383,2.56 -21.576,7.016 -3.265,-4.473 -8.523,-7.016 -15.228,-7.016 -4.822,0 -9.021,1.477 -12.572,3.44 -2.996,-2.204 -6.796,-3.44 -11.115,-3.44 -2.327,0 -4.48,0.315 -6.476,0.852 h -33.963 l -0.035,0.245 c -2.526,-0.702 -5.41,-1.097 -8.687,-1.097 -20.458,0 -35.307,16.031 -35.307,38.117 0,17.363 10.785,28.149 28.148,28.149 3.087,0 6.236,-0.356 9.426,-1.023 h 88.816 c 3.706,0.676 7.669,1.023 11.154,1.023 8.907,0 16.278,-2.375 21.51,-6.593 4.872,4.252 11.585,6.593 19.728,6.593 3.053,0 6.206,-0.368 9.286,-1.023 h 44.664 2.069 z"
+ id="path243"
+ inkscape:connector-curvature="0"
+ style="fill:#f5f5f5" /><g
+ id="g245"
+ transform="translate(0,16)"><g
+ id="g247"><path
+ d="m 340.308,218.463 c -5.538,2.556 -11.588,4.26 -17.638,4.26 -13.377,0 -18.148,-7.839 -18.148,-18.148 0,-17.893 11.418,-28.117 25.307,-28.117 9.372,0 13.973,4.26 13.973,11.247 0,12.184 -12.865,15.763 -26.157,17.126 0.255,4.346 2.045,8.35 8.435,8.35 3.068,0 7.243,-0.937 12.355,-3.067 l 1.873,8.349 z m -8.095,-29.567 c 0,-2.045 -1.448,-3.237 -4.09,-3.237 -4.771,0 -8.69,4.175 -9.969,10.906 3.664,-0.511 14.059,-2.3 14.059,-7.669 z"
+ id="path249"
+ inkscape:connector-curvature="0"
+ style="fill:#383838" /><path
+ d="m 394.07,221.7 -0.171,-0.255 1.789,-10.055 2.642,-18.063 c 0.512,-3.749 0.341,-5.623 -1.96,-5.623 -2.642,0 -5.794,2.727 -9.372,5.879 l -2.727,19.512 c -0.171,1.363 -0.171,1.534 1.022,1.704 l 4.26,0.597 -0.852,6.305 h -18.404 l -0.171,-0.341 1.875,-10.82 2.471,-17.212 c 0.512,-3.237 0.682,-5.453 -1.789,-5.453 -3.238,0 -7.413,3.664 -9.714,5.709 l -2.642,19.512 c -0.17,1.363 -0.17,1.534 1.108,1.704 l 4.26,0.597 -0.852,6.305 h -23.347 l 0.853,-6.39 3.749,-0.512 c 1.107,-0.17 1.363,-0.426 1.533,-1.704 l 3.579,-25.987 c 0.17,-0.938 0,-1.534 -0.767,-1.789 l -4.176,-1.534 0.938,-6.476 h 16.871 l -0.938,6.987 0.256,0.085 c 4.43,-3.749 9.116,-7.924 15.592,-7.924 4.687,0 7.839,2.641 8.18,7.753 l 0.256,0.086 c 4.175,-3.664 9.202,-7.839 15.252,-7.839 6.22,0 8.775,3.152 8.946,9.202 0,1.618 -0.171,3.493 -0.426,5.538 l -3.067,21.897 c -0.171,1.363 -0.171,1.534 1.107,1.704 l 4.175,0.597 -0.852,6.305 H 394.07 z"
+ id="path251"
+ inkscape:connector-curvature="0"
+ style="fill:#383838" /><path
+ d="m 443.995,190.771 -0.17,-4.431 c 0,-0.682 -0.085,-1.108 -1.022,-1.363 -1.022,-0.256 -2.642,-0.427 -4.771,-0.427 -3.579,0 -6.391,1.108 -6.391,4.09 0,2.727 2.982,3.749 6.731,5.027 6.05,2.045 13.888,4.431 13.888,13.463 0,11.076 -9.372,15.592 -20.193,15.592 -8.009,0 -14.91,-1.959 -16.273,-2.981 l 1.618,-12.355 8.691,0.512 0.255,4.941 c 0,0.597 0.171,1.108 0.938,1.363 1.278,0.427 3.238,0.768 6.05,0.768 4.687,0 7.327,-1.79 7.327,-4.687 0,-3.408 -3.152,-4.175 -8.009,-5.624 -6.135,-1.874 -12.78,-4.26 -12.78,-13.206 0,-10.48 9.116,-14.996 19.597,-14.996 6.646,0 12.866,1.533 15.081,2.471 l -1.704,12.354 -8.863,-0.511 z"
+ id="path253"
+ inkscape:connector-curvature="0"
+ style="fill:#383838" /><path
+ d="m 489.748,218.548 c -4.175,2.386 -10.395,4.175 -16.444,4.175 -13.036,0 -18.575,-7.583 -18.575,-18.574 0,-18.83 11.588,-27.691 25.988,-27.691 6.475,0 11.843,1.874 14.229,3.578 l -1.874,13.377 -8.691,-0.426 -0.255,-5.794 c 0,-0.597 -0.086,-0.938 -0.597,-1.192 -1.022,-0.427 -2.557,-0.597 -4.175,-0.597 -5.624,0 -11.418,4.601 -11.418,17.382 0,7.839 3.493,10.395 8.436,10.395 4.346,0 8.436,-1.448 11.247,-2.556 l 2.129,7.923 z"
+ id="path255"
+ inkscape:connector-curvature="0"
+ style="fill:#383838" /><path
+ d="m 491.364,221.7 0.853,-6.39 3.919,-0.512 c 1.193,-0.17 1.363,-0.426 1.534,-1.704 l 3.578,-25.987 c 0.086,-0.938 -0.085,-1.534 -0.852,-1.789 l -4.261,-1.534 0.938,-6.476 h 16.87 l -1.107,7.669 0.256,0.17 c 3.323,-4.771 8.095,-8.69 13.548,-8.69 1.874,0 5.112,0.341 6.561,0.767 l -2.13,15.507 -9.969,-0.341 -0.256,-4.431 c -0.086,-0.767 -0.256,-1.022 -0.938,-1.022 -1.619,0 -4.26,1.96 -6.646,4.431 l -2.981,21.643 c -0.171,1.363 -0.085,1.619 1.192,1.704 l 8.095,0.682 -0.938,6.305 h -27.266 z"
+ id="path257"
+ inkscape:connector-curvature="0"
+ style="fill:#383838" /><path
+ d="m 536.094,221.7 -0.17,-0.426 2.045,-11.503 3.152,-22.749 c 0.17,-0.938 -0.086,-1.534 -0.853,-1.79 l -4.175,-1.448 0.852,-6.476 h 18.149 l -5.027,35.786 c -0.171,1.363 -0.085,1.534 1.192,1.704 l 4.09,0.597 -0.852,6.305 h -18.403 z m 5.879,-57.598 c 0,-5.453 3.238,-8.775 8.776,-8.775 4.175,0 6.646,2.215 6.646,6.305 0,5.368 -3.322,8.861 -8.861,8.861 -4.176,-0.001 -6.561,-2.387 -6.561,-6.391 z"
+ id="path259"
+ inkscape:connector-curvature="0"
+ style="fill:#383838" /><path
+ d="m 556.796,239.764 -0.17,-0.341 2.471,-14.229 5.282,-38.087 c 0.171,-1.022 -0.085,-1.534 -0.767,-1.789 l -4.175,-1.534 0.938,-6.476 h 17.041 l -1.022,6.816 0.255,0.085 c 5.027,-4.686 10.311,-7.753 15.678,-7.753 7.328,0 12.44,4.686 12.44,17.041 0,11.758 -4.601,29.225 -20.449,29.225 -5.538,0 -8.605,-2.13 -11.759,-4.345 l -1.874,12.78 c -0.085,0.938 0.085,1.278 1.192,1.363 l 8.606,0.853 -0.938,6.39 h -22.749 z m 17.041,-30.247 c 2.13,1.789 4.942,3.322 8.095,3.322 6.901,0 9.458,-9.713 9.458,-17.211 0,-5.027 -1.193,-8.351 -4.431,-8.351 -3.408,0 -7.754,3.664 -10.821,6.391 l -2.301,15.849 z"
+ id="path261"
+ inkscape:connector-curvature="0"
+ style="fill:#383838" /><path
+ d="m 635.777,219.4 c -3.749,1.789 -9.458,3.322 -14.229,3.322 -8.521,0 -12.099,-2.981 -12.099,-9.969 0,-1.107 0.085,-2.386 0.256,-3.749 l 3.066,-22.323 c 0.086,-0.512 0.086,-0.853 -0.511,-0.853 h -5.879 l 1.107,-7.839 c 7.242,-0.767 10.906,-4.431 13.122,-13.633 h 7.924 l -1.704,12.1 c -0.085,0.596 -0.085,0.852 0.597,0.852 h 11.758 l -1.193,8.521 h -12.439 l -2.812,20.364 c -0.171,1.107 -0.256,1.96 -0.256,2.727 0,2.982 1.278,4.26 4.942,4.26 2.385,0 4.771,-0.596 6.816,-1.363 l 1.534,7.583 z"
+ id="path263"
+ inkscape:connector-curvature="0"
+ style="fill:#383838" /><path
+ d="m 671.817,218.463 c -5.538,2.556 -11.588,4.26 -17.638,4.26 -13.377,0 -18.148,-7.839 -18.148,-18.148 0,-17.893 11.418,-28.117 25.307,-28.117 9.372,0 13.973,4.26 13.973,11.247 0,12.184 -12.865,15.763 -26.157,17.126 0.255,4.346 2.045,8.35 8.435,8.35 3.068,0 7.243,-0.937 12.355,-3.067 l 1.873,8.349 z m -8.094,-29.567 c 0,-2.045 -1.448,-3.237 -4.09,-3.237 -4.771,0 -8.69,4.175 -9.969,10.906 3.664,-0.511 14.059,-2.3 14.059,-7.669 z"
+ id="path265"
+ inkscape:connector-curvature="0"
+ style="fill:#383838" /><path
+ d="m 703.596,221.7 -0.17,-0.255 1.874,-10.396 2.471,-17.723 c 0.512,-3.578 0.341,-5.879 -2.215,-5.879 -3.664,0 -8.18,3.578 -11.077,6.135 l -2.641,19.512 c -0.171,1.363 -0.171,1.534 1.107,1.704 l 4.26,0.597 -0.852,6.305 h -23.347 l 0.853,-6.39 3.749,-0.512 c 1.107,-0.17 1.363,-0.426 1.533,-1.704 l 3.579,-25.987 c 0.17,-0.938 0,-1.534 -0.768,-1.789 l -4.175,-1.534 0.938,-6.476 h 16.87 l -0.937,6.987 0.255,0.085 c 4.771,-4.09 9.373,-7.924 16.02,-7.924 6.475,0 9.798,3.322 10.054,10.139 0,1.363 -0.085,3.067 -0.341,4.687 l -3.067,21.812 c -0.171,1.363 -0.171,1.534 1.022,1.704 l 4.26,0.597 L 722,221.7 h -18.404 z"
+ id="path267"
+ inkscape:connector-curvature="0"
+ style="fill:#383838" /></g><g
+ id="g269"><linearGradient
+ id="SVGID_15_"
+ gradientUnits="userSpaceOnUse"
+ x1="324.1611"
+ y1="239.7637"
+ x2="324.1611"
+ y2="155.3275"><stop
+ offset="0"
+ style="stop-color:#000000"
+ id="stop272" /><stop
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0"
+ id="stop274" /><a:midPointStop
+ offset="0"
+ style="stop-color:#000000" /><a:midPointStop
+ offset="0.6933"
+ style="stop-color:#000000" /><a:midPointStop
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0" /></linearGradient><path
+ d="m 340.308,218.463 c -5.538,2.556 -11.588,4.26 -17.638,4.26 -13.377,0 -18.148,-7.839 -18.148,-18.148 0,-17.893 11.418,-28.117 25.307,-28.117 9.372,0 13.973,4.26 13.973,11.247 0,12.184 -12.865,15.763 -26.157,17.126 0.255,4.346 2.045,8.35 8.435,8.35 3.068,0 7.243,-0.937 12.355,-3.067 l 1.873,8.349 z m -8.095,-29.567 c 0,-2.045 -1.448,-3.237 -4.09,-3.237 -4.771,0 -8.69,4.175 -9.969,10.906 3.664,-0.511 14.059,-2.3 14.059,-7.669 z"
+ id="path276"
+ style="fill:url(#SVGID_15_)"
+ inkscape:connector-curvature="0" /><linearGradient
+ id="SVGID_16_"
+ gradientUnits="userSpaceOnUse"
+ x1="377.45459"
+ y1="239.7637"
+ x2="377.45459"
+ y2="155.3277"><stop
+ offset="0"
+ style="stop-color:#000000"
+ id="stop279" /><stop
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0"
+ id="stop281" /><a:midPointStop
+ offset="0"
+ style="stop-color:#000000" /><a:midPointStop
+ offset="0.6933"
+ style="stop-color:#000000" /><a:midPointStop
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0" /></linearGradient><path
+ d="m 394.07,221.7 -0.171,-0.255 1.789,-10.055 2.642,-18.063 c 0.512,-3.749 0.341,-5.623 -1.96,-5.623 -2.642,0 -5.794,2.727 -9.372,5.879 l -2.727,19.512 c -0.171,1.363 -0.171,1.534 1.022,1.704 l 4.26,0.597 -0.852,6.305 h -18.404 l -0.171,-0.341 1.875,-10.82 2.471,-17.212 c 0.512,-3.237 0.682,-5.453 -1.789,-5.453 -3.238,0 -7.413,3.664 -9.714,5.709 l -2.642,19.512 c -0.17,1.363 -0.17,1.534 1.108,1.704 l 4.26,0.597 -0.852,6.305 h -23.347 l 0.853,-6.39 3.749,-0.512 c 1.107,-0.17 1.363,-0.426 1.533,-1.704 l 3.579,-25.987 c 0.17,-0.938 0,-1.534 -0.767,-1.789 l -4.176,-1.534 0.938,-6.476 h 16.871 l -0.938,6.987 0.256,0.085 c 4.43,-3.749 9.116,-7.924 15.592,-7.924 4.687,0 7.839,2.641 8.18,7.753 l 0.256,0.086 c 4.175,-3.664 9.202,-7.839 15.252,-7.839 6.22,0 8.775,3.152 8.946,9.202 0,1.618 -0.171,3.493 -0.426,5.538 l -3.067,21.897 c -0.171,1.363 -0.171,1.534 1.107,1.704 l 4.175,0.597 -0.852,6.305 H 394.07 z"
+ id="path283"
+ style="fill:url(#SVGID_16_)"
+ inkscape:connector-curvature="0" /><linearGradient
+ id="SVGID_17_"
+ gradientUnits="userSpaceOnUse"
+ x1="435.17719"
+ y1="239.7637"
+ x2="435.17719"
+ y2="155.3275"><stop
+ offset="0"
+ style="stop-color:#000000"
+ id="stop286" /><stop
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0"
+ id="stop288" /><a:midPointStop
+ offset="0"
+ style="stop-color:#000000" /><a:midPointStop
+ offset="0.6933"
+ style="stop-color:#000000" /><a:midPointStop
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0" /></linearGradient><path
+ d="m 443.995,190.771 -0.17,-4.431 c 0,-0.682 -0.085,-1.108 -1.022,-1.363 -1.022,-0.256 -2.642,-0.427 -4.771,-0.427 -3.579,0 -6.391,1.108 -6.391,4.09 0,2.727 2.982,3.749 6.731,5.027 6.05,2.045 13.888,4.431 13.888,13.463 0,11.076 -9.372,15.592 -20.193,15.592 -8.009,0 -14.91,-1.959 -16.273,-2.981 l 1.618,-12.355 8.691,0.512 0.255,4.941 c 0,0.597 0.171,1.108 0.938,1.363 1.278,0.427 3.238,0.768 6.05,0.768 4.687,0 7.327,-1.79 7.327,-4.687 0,-3.408 -3.152,-4.175 -8.009,-5.624 -6.135,-1.874 -12.78,-4.26 -12.78,-13.206 0,-10.48 9.116,-14.996 19.597,-14.996 6.646,0 12.866,1.533 15.081,2.471 l -1.704,12.354 -8.863,-0.511 z"
+ id="path290"
+ style="fill:url(#SVGID_17_)"
+ inkscape:connector-curvature="0" /><linearGradient
+ id="SVGID_18_"
+ gradientUnits="userSpaceOnUse"
+ x1="474.83691"
+ y1="239.7637"
+ x2="474.83691"
+ y2="155.3275"><stop
+ offset="0"
+ style="stop-color:#000000"
+ id="stop293" /><stop
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0"
+ id="stop295" /><a:midPointStop
+ offset="0"
+ style="stop-color:#000000" /><a:midPointStop
+ offset="0.6933"
+ style="stop-color:#000000" /><a:midPointStop
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0" /></linearGradient><path
+ d="m 489.748,218.548 c -4.175,2.386 -10.395,4.175 -16.444,4.175 -13.036,0 -18.575,-7.583 -18.575,-18.574 0,-18.83 11.588,-27.691 25.988,-27.691 6.475,0 11.843,1.874 14.229,3.578 l -1.874,13.377 -8.691,-0.426 -0.255,-5.794 c 0,-0.597 -0.086,-0.938 -0.597,-1.192 -1.022,-0.427 -2.557,-0.597 -4.175,-0.597 -5.624,0 -11.418,4.601 -11.418,17.382 0,7.839 3.493,10.395 8.436,10.395 4.346,0 8.436,-1.448 11.247,-2.556 l 2.129,7.923 z"
+ id="path297"
+ style="fill:url(#SVGID_18_)"
+ inkscape:connector-curvature="0" /><linearGradient
+ id="SVGID_19_"
+ gradientUnits="userSpaceOnUse"
+ x1="512.28223"
+ y1="239.7637"
+ x2="512.28223"
+ y2="155.3277"><stop
+ offset="0"
+ style="stop-color:#000000"
+ id="stop300" /><stop
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0"
+ id="stop302" /><a:midPointStop
+ offset="0"
+ style="stop-color:#000000" /><a:midPointStop
+ offset="0.6933"
+ style="stop-color:#000000" /><a:midPointStop
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0" /></linearGradient><path
+ d="m 491.364,221.7 0.853,-6.39 3.919,-0.512 c 1.193,-0.17 1.363,-0.426 1.534,-1.704 l 3.578,-25.987 c 0.086,-0.938 -0.085,-1.534 -0.852,-1.789 l -4.261,-1.534 0.938,-6.476 h 16.87 l -1.107,7.669 0.256,0.17 c 3.323,-4.771 8.095,-8.69 13.548,-8.69 1.874,0 5.112,0.341 6.561,0.767 l -2.13,15.507 -9.969,-0.341 -0.256,-4.431 c -0.086,-0.767 -0.256,-1.022 -0.938,-1.022 -1.619,0 -4.26,1.96 -6.646,4.431 l -2.981,21.643 c -0.171,1.363 -0.085,1.619 1.192,1.704 l 8.095,0.682 -0.938,6.305 h -27.266 z"
+ id="path304"
+ style="fill:url(#SVGID_19_)"
+ inkscape:connector-curvature="0" /><linearGradient
+ id="SVGID_20_"
+ gradientUnits="userSpaceOnUse"
+ x1="546.65918"
+ y1="239.7637"
+ x2="546.65918"
+ y2="155.32719"><stop
+ offset="0"
+ style="stop-color:#000000"
+ id="stop307" /><stop
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0"
+ id="stop309" /><a:midPointStop
+ offset="0"
+ style="stop-color:#000000" /><a:midPointStop
+ offset="0.6933"
+ style="stop-color:#000000" /><a:midPointStop
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0" /></linearGradient><path
+ d="m 536.094,221.7 -0.17,-0.426 2.045,-11.503 3.152,-22.749 c 0.17,-0.938 -0.086,-1.534 -0.853,-1.79 l -4.175,-1.448 0.852,-6.476 h 18.149 l -5.027,35.786 c -0.171,1.363 -0.085,1.534 1.192,1.704 l 4.09,0.597 -0.852,6.305 h -18.403 z m 5.879,-57.598 c 0,-5.453 3.238,-8.775 8.776,-8.775 4.175,0 6.646,2.215 6.646,6.305 0,5.368 -3.322,8.861 -8.861,8.861 -4.176,-0.001 -6.561,-2.387 -6.561,-6.391 z"
+ id="path311"
+ style="fill:url(#SVGID_20_)"
+ inkscape:connector-curvature="0" /><linearGradient
+ id="SVGID_21_"
+ gradientUnits="userSpaceOnUse"
+ x1="580.69629"
+ y1="239.7637"
+ x2="580.69629"
+ y2="155.32719"><stop
+ offset="0"
+ style="stop-color:#000000"
+ id="stop314" /><stop
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0"
+ id="stop316" /><a:midPointStop
+ offset="0"
+ style="stop-color:#000000" /><a:midPointStop
+ offset="0.6933"
+ style="stop-color:#000000" /><a:midPointStop
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0" /></linearGradient><path
+ d="m 556.796,239.764 -0.17,-0.341 2.471,-14.229 5.282,-38.087 c 0.171,-1.022 -0.085,-1.534 -0.767,-1.789 l -4.175,-1.534 0.938,-6.476 h 17.041 l -1.022,6.816 0.255,0.085 c 5.027,-4.686 10.311,-7.753 15.678,-7.753 7.328,0 12.44,4.686 12.44,17.041 0,11.758 -4.601,29.225 -20.449,29.225 -5.538,0 -8.605,-2.13 -11.759,-4.345 l -1.874,12.78 c -0.085,0.938 0.085,1.278 1.192,1.363 l 8.606,0.853 -0.938,6.39 h -22.749 z m 17.041,-30.247 c 2.13,1.789 4.942,3.322 8.095,3.322 6.901,0 9.458,-9.713 9.458,-17.211 0,-5.027 -1.193,-8.351 -4.431,-8.351 -3.408,0 -7.754,3.664 -10.821,6.391 l -2.301,15.849 z"
+ id="path318"
+ style="fill:url(#SVGID_21_)"
+ inkscape:connector-curvature="0" /><linearGradient
+ id="SVGID_22_"
+ gradientUnits="userSpaceOnUse"
+ x1="622.7832"
+ y1="239.7637"
+ x2="622.7832"
+ y2="155.3268"><stop
+ offset="0"
+ style="stop-color:#000000"
+ id="stop321" /><stop
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0"
+ id="stop323" /><a:midPointStop
+ offset="0"
+ style="stop-color:#000000" /><a:midPointStop
+ offset="0.6933"
+ style="stop-color:#000000" /><a:midPointStop
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0" /></linearGradient><path
+ d="m 635.777,219.4 c -3.749,1.789 -9.458,3.322 -14.229,3.322 -8.521,0 -12.099,-2.981 -12.099,-9.969 0,-1.107 0.085,-2.386 0.256,-3.749 l 3.066,-22.323 c 0.086,-0.512 0.086,-0.853 -0.511,-0.853 h -5.879 l 1.107,-7.839 c 7.242,-0.767 10.906,-4.431 13.122,-13.633 h 7.924 l -1.704,12.1 c -0.085,0.596 -0.085,0.852 0.597,0.852 h 11.758 l -1.193,8.521 h -12.439 l -2.812,20.364 c -0.171,1.107 -0.256,1.96 -0.256,2.727 0,2.982 1.278,4.26 4.942,4.26 2.385,0 4.771,-0.596 6.816,-1.363 l 1.534,7.583 z"
+ id="path325"
+ style="fill:url(#SVGID_22_)"
+ inkscape:connector-curvature="0" /><linearGradient
+ id="SVGID_23_"
+ gradientUnits="userSpaceOnUse"
+ x1="655.6709"
+ y1="239.7637"
+ x2="655.6709"
+ y2="155.3275"><stop
+ offset="0"
+ style="stop-color:#000000"
+ id="stop328" /><stop
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0"
+ id="stop330" /><a:midPointStop
+ offset="0"
+ style="stop-color:#000000" /><a:midPointStop
+ offset="0.6933"
+ style="stop-color:#000000" /><a:midPointStop
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0" /></linearGradient><path
+ d="m 671.817,218.463 c -5.538,2.556 -11.588,4.26 -17.638,4.26 -13.377,0 -18.148,-7.839 -18.148,-18.148 0,-17.893 11.418,-28.117 25.307,-28.117 9.372,0 13.973,4.26 13.973,11.247 0,12.184 -12.865,15.763 -26.157,17.126 0.255,4.346 2.045,8.35 8.435,8.35 3.068,0 7.243,-0.937 12.355,-3.067 l 1.873,8.349 z m -8.094,-29.567 c 0,-2.045 -1.448,-3.237 -4.09,-3.237 -4.771,0 -8.69,4.175 -9.969,10.906 3.664,-0.511 14.059,-2.3 14.059,-7.669 z"
+ id="path332"
+ style="fill:url(#SVGID_23_)"
+ inkscape:connector-curvature="0" /><linearGradient
+ id="SVGID_24_"
+ gradientUnits="userSpaceOnUse"
+ x1="697.92969"
+ y1="239.7637"
+ x2="697.92969"
+ y2="155.3277"><stop
+ offset="0"
+ style="stop-color:#000000"
+ id="stop335" /><stop
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0"
+ id="stop337" /><a:midPointStop
+ offset="0"
+ style="stop-color:#000000" /><a:midPointStop
+ offset="0.6933"
+ style="stop-color:#000000" /><a:midPointStop
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0" /></linearGradient><path
+ d="m 703.596,221.7 -0.17,-0.255 1.874,-10.396 2.471,-17.723 c 0.512,-3.578 0.341,-5.879 -2.215,-5.879 -3.664,0 -8.18,3.578 -11.077,6.135 l -2.641,19.512 c -0.171,1.363 -0.171,1.534 1.107,1.704 l 4.26,0.597 -0.852,6.305 h -23.347 l 0.853,-6.39 3.749,-0.512 c 1.107,-0.17 1.363,-0.426 1.533,-1.704 l 3.579,-25.987 c 0.17,-0.938 0,-1.534 -0.768,-1.789 l -4.175,-1.534 0.938,-6.476 h 16.87 l -0.937,6.987 0.255,0.085 c 4.771,-4.09 9.373,-7.924 16.02,-7.924 6.475,0 9.798,3.322 10.054,10.139 0,1.363 -0.085,3.067 -0.341,4.687 l -3.067,21.812 c -0.171,1.363 -0.171,1.534 1.022,1.704 l 4.26,0.597 L 722,221.7 h -18.404 z"
+ id="path339"
+ style="fill:url(#SVGID_24_)"
+ inkscape:connector-curvature="0" /></g></g><g
+ id="g4141"
+ transform="matrix(0.81856441,0,0,0.81856441,79.234731,-94.128741)"><g
+ id="g4143"></g><g
+ id="g4165"><linearGradient
+ y2="155.3275"
+ x2="324.1611"
+ y1="239.7637"
+ x1="324.1611"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient4167"><stop
+ id="stop4169"
+ style="stop-color:#000000"
+ offset="0" /><stop
+ id="stop4171"
+ style="stop-color:#000000;stop-opacity:0"
+ offset="1" /><a:midPointStop
+ style="stop-color:#000000"
+ offset="0" /><a:midPointStop
+ style="stop-color:#000000"
+ offset="0.6933" /><a:midPointStop
+ style="stop-color:#000000;stop-opacity:0"
+ offset="1" /></linearGradient><linearGradient
+ y2="155.3277"
+ x2="377.45459"
+ y1="239.7637"
+ x1="377.45459"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient4175"><stop
+ id="stop4177"
+ style="stop-color:#000000"
+ offset="0" /><stop
+ id="stop4179"
+ style="stop-color:#000000;stop-opacity:0"
+ offset="1" /><a:midPointStop
+ style="stop-color:#000000"
+ offset="0" /><a:midPointStop
+ style="stop-color:#000000"
+ offset="0.6933" /><a:midPointStop
+ style="stop-color:#000000;stop-opacity:0"
+ offset="1" /></linearGradient><linearGradient
+ y2="155.3275"
+ x2="435.17719"
+ y1="239.7637"
+ x1="435.17719"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient4183"><stop
+ id="stop4185"
+ style="stop-color:#000000"
+ offset="0" /><stop
+ id="stop4187"
+ style="stop-color:#000000;stop-opacity:0"
+ offset="1" /><a:midPointStop
+ style="stop-color:#000000"
+ offset="0" /><a:midPointStop
+ style="stop-color:#000000"
+ offset="0.6933" /><a:midPointStop
+ style="stop-color:#000000;stop-opacity:0"
+ offset="1" /></linearGradient><linearGradient
+ y2="155.3275"
+ x2="474.83691"
+ y1="239.7637"
+ x1="474.83691"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient4191"><stop
+ id="stop4193"
+ style="stop-color:#000000"
+ offset="0" /><stop
+ id="stop4195"
+ style="stop-color:#000000;stop-opacity:0"
+ offset="1" /><a:midPointStop
+ style="stop-color:#000000"
+ offset="0" /><a:midPointStop
+ style="stop-color:#000000"
+ offset="0.6933" /><a:midPointStop
+ style="stop-color:#000000;stop-opacity:0"
+ offset="1" /></linearGradient><linearGradient
+ y2="155.3277"
+ x2="512.28223"
+ y1="239.7637"
+ x1="512.28223"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient4199"><stop
+ id="stop4201"
+ style="stop-color:#000000"
+ offset="0" /><stop
+ id="stop4203"
+ style="stop-color:#000000;stop-opacity:0"
+ offset="1" /><a:midPointStop
+ style="stop-color:#000000"
+ offset="0" /><a:midPointStop
+ style="stop-color:#000000"
+ offset="0.6933" /><a:midPointStop
+ style="stop-color:#000000;stop-opacity:0"
+ offset="1" /></linearGradient><linearGradient
+ y2="155.32719"
+ x2="546.65918"
+ y1="239.7637"
+ x1="546.65918"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient4207"><stop
+ id="stop4209"
+ style="stop-color:#000000"
+ offset="0" /><stop
+ id="stop4211"
+ style="stop-color:#000000;stop-opacity:0"
+ offset="1" /><a:midPointStop
+ style="stop-color:#000000"
+ offset="0" /><a:midPointStop
+ style="stop-color:#000000"
+ offset="0.6933" /><a:midPointStop
+ style="stop-color:#000000;stop-opacity:0"
+ offset="1" /></linearGradient><linearGradient
+ y2="155.32719"
+ x2="580.69629"
+ y1="239.7637"
+ x1="580.69629"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient4215"><stop
+ id="stop4217"
+ style="stop-color:#000000"
+ offset="0" /><stop
+ id="stop4219"
+ style="stop-color:#000000;stop-opacity:0"
+ offset="1" /><a:midPointStop
+ style="stop-color:#000000"
+ offset="0" /><a:midPointStop
+ style="stop-color:#000000"
+ offset="0.6933" /><a:midPointStop
+ style="stop-color:#000000;stop-opacity:0"
+ offset="1" /></linearGradient><linearGradient
+ y2="155.3268"
+ x2="622.7832"
+ y1="239.7637"
+ x1="622.7832"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient4223"><stop
+ id="stop4225"
+ style="stop-color:#000000"
+ offset="0" /><stop
+ id="stop4227"
+ style="stop-color:#000000;stop-opacity:0"
+ offset="1" /><a:midPointStop
+ style="stop-color:#000000"
+ offset="0" /><a:midPointStop
+ style="stop-color:#000000"
+ offset="0.6933" /><a:midPointStop
+ style="stop-color:#000000;stop-opacity:0"
+ offset="1" /></linearGradient><linearGradient
+ y2="155.3275"
+ x2="655.6709"
+ y1="239.7637"
+ x1="655.6709"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient4231"><stop
+ id="stop4233"
+ style="stop-color:#000000"
+ offset="0" /><stop
+ id="stop4235"
+ style="stop-color:#000000;stop-opacity:0"
+ offset="1" /><a:midPointStop
+ style="stop-color:#000000"
+ offset="0" /><a:midPointStop
+ style="stop-color:#000000"
+ offset="0.6933" /><a:midPointStop
+ style="stop-color:#000000;stop-opacity:0"
+ offset="1" /></linearGradient><linearGradient
+ y2="155.3277"
+ x2="697.92969"
+ y1="239.7637"
+ x1="697.92969"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient4239"><stop
+ id="stop4241"
+ style="stop-color:#000000"
+ offset="0" /><stop
+ id="stop4243"
+ style="stop-color:#000000;stop-opacity:0"
+ offset="1" /><a:midPointStop
+ style="stop-color:#000000"
+ offset="0" /><a:midPointStop
+ style="stop-color:#000000"
+ offset="0.6933" /><a:midPointStop
+ style="stop-color:#000000;stop-opacity:0"
+ offset="1" /></linearGradient></g></g></svg>
+ </a>
<div class="spinner" id='spinner'></div>
<div class="emscripten" id="status">Downloading...</div>
@@ -689,7 +1222,7 @@ SUVORK5CYII=" transform="matrix(0.24 0 0 0.24 243.7749 230.2217)"></image><g><ra
postRun: [],
print: (function() {
var element = document.getElementById('output');
- element.value = ''; // clear browser cache
+ if (element) element.value = ''; // clear browser cache
return function(text) {
text = Array.prototype.slice.call(arguments).join(' ');
// These replacements are necessary if you render to raw HTML
@@ -697,8 +1230,11 @@ SUVORK5CYII=" transform="matrix(0.24 0 0 0.24 243.7749 230.2217)"></image><g><ra
//text = text.replace(/</g, "&lt;");
//text = text.replace(/>/g, "&gt;");
//text = text.replace('\n', '<br>', 'g');
- element.value += text + "\n";
- element.scrollTop = element.scrollHeight; // focus on bottom
+ console.log(text);
+ if (element) {
+ element.value += text + "\n";
+ element.scrollTop = element.scrollHeight; // focus on bottom
+ }
};
})(),
printErr: function(text) {
@@ -706,7 +1242,7 @@ SUVORK5CYII=" transform="matrix(0.24 0 0 0.24 243.7749 230.2217)"></image><g><ra
if (0) { // XXX disabled for safety typeof dump == 'function') {
dump(text + '\n'); // fast, straight to the real console
} else {
- console.log(text);
+ console.error(text);
}
},
canvas: document.getElementById('canvas'),
diff --git a/src/shell.js b/src/shell.js
index 84844c85..e1c0eb54 100644
--- a/src/shell.js
+++ b/src/shell.js
@@ -14,7 +14,11 @@
// before the code. Then that object will be used in the code, and you
// can continue to use Module afterwards as well.
var Module;
+#if CLOSURE_COMPILER
if (!Module) Module = eval('(function() { try { return {{{ EXPORT_NAME }}} || {} } catch(e) { return {} } })()');
+#else
+if (!Module) Module = (typeof {{{ EXPORT_NAME }}} !== 'undefined' ? {{{ EXPORT_NAME }}} : null) || {};
+#endif
// Sometimes an existing Module object exists with properties
// meant to overwrite the default module functionality. Here
@@ -124,7 +128,7 @@ else if (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) {
}
if (ENVIRONMENT_IS_WEB) {
- this['{{{ EXPORT_NAME }}}'] = Module;
+ window['{{{ EXPORT_NAME }}}'] = Module;
} else {
Module['load'] = importScripts;
}
diff --git a/src/shell_minimal.html b/src/shell_minimal.html
index 7a3a8d08..6f483719 100644
--- a/src/shell_minimal.html
+++ b/src/shell_minimal.html
@@ -78,7 +78,7 @@
postRun: [],
print: (function() {
var element = document.getElementById('output');
- element.value = ''; // clear browser cache
+ if (element) element.value = ''; // clear browser cache
return function(text) {
text = Array.prototype.slice.call(arguments).join(' ');
// These replacements are necessary if you render to raw HTML
@@ -86,8 +86,11 @@
//text = text.replace(/</g, "&lt;");
//text = text.replace(/>/g, "&gt;");
//text = text.replace('\n', '<br>', 'g');
- element.value += text + "\n";
- element.scrollTop = element.scrollHeight; // focus on bottom
+ console.log(text);
+ if (element) {
+ element.value += text + "\n";
+ element.scrollTop = element.scrollHeight; // focus on bottom
+ }
};
})(),
printErr: function(text) {
@@ -95,7 +98,7 @@
if (0) { // XXX disabled for safety typeof dump == 'function') {
dump(text + '\n'); // fast, straight to the real console
} else {
- console.log(text);
+ console.error(text);
}
},
canvas: document.getElementById('canvas'),
diff --git a/src/struct_info.json b/src/struct_info.json
index 2aeffc9c..f762bf2b 100644
--- a/src/struct_info.json
+++ b/src/struct_info.json
@@ -948,11 +948,10 @@
],
"SDL_MouseMotionEvent": [
"type",
+ "timestamp",
"windowID",
+ "which",
"state",
- "padding1",
- "padding2",
- "padding3",
"x",
"y",
"xrel",
@@ -960,7 +959,9 @@
],
"SDL_MouseButtonEvent": [
"type",
+ "timestamp",
"windowID",
+ "which",
"button",
"state",
"padding1",
@@ -983,6 +984,17 @@
"state",
"padding1"
],
+ "SDL_TouchFingerEvent": [
+ "type",
+ "timestamp",
+ "touchId",
+ "fingerId",
+ "x",
+ "y",
+ "dx",
+ "dy",
+ "pressure"
+ ],
"SDL_ResizeEvent": [
"type",
"w",
@@ -991,6 +1003,11 @@
}
},
{
+ "file": "SDL/SDL_touch.h",
+ "defines": ["SDL_TOUCH_MOUSEID"],
+ "structs": {}
+ },
+ {
"file": "SDL/SDL_audio.h",
"defines": [
"SDL_AUDIO_MASK_BITSIZE",
@@ -1207,7 +1224,11 @@
"isFullscreen",
"fullscreenEnabled",
"nodeName",
- "id"
+ "id",
+ "elementWidth",
+ "elementHeight",
+ "screenWidth",
+ "screenHeight"
],
"EmscriptenPointerlockChangeEvent": [
"isActive",
diff --git a/system/include/EGL/eglplatform.h b/system/include/EGL/eglplatform.h
index 2db2cc47..77e885a8 100644
--- a/system/include/EGL/eglplatform.h
+++ b/system/include/EGL/eglplatform.h
@@ -75,7 +75,7 @@ typedef HDC EGLNativeDisplayType;
typedef HBITMAP EGLNativePixmapType;
typedef HWND EGLNativeWindowType;
-#elif defined(EMSCRIPTEN)
+#elif defined(__EMSCRIPTEN__)
typedef int EGLNativeDisplayType;
typedef int EGLNativeWindowType;
diff --git a/system/include/SDL/COPYING b/system/include/SDL/COPYING
index 15639581..71cc7e42 100644
--- a/system/include/SDL/COPYING
+++ b/system/include/SDL/COPYING
@@ -17,3 +17,8 @@ freely, subject to the following restrictions:
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
+
+---
+
+ Portions of these headers taken from SDL2 (where noted)
+ Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
diff --git a/system/include/SDL/SDL_config_minimal.h b/system/include/SDL/SDL_config_minimal.h
index ea0cec10..18951f18 100644
--- a/system/include/SDL/SDL_config_minimal.h
+++ b/system/include/SDL/SDL_config_minimal.h
@@ -33,7 +33,7 @@
#include <stddef.h>
#include <stdarg.h>
-#if !defined(EMSCRIPTEN) && !defined(_STDINT_H_) && (!defined(HAVE_STDINT_H) || !_HAVE_STDINT_H)
+#if !defined(__EMSCRIPTEN__) && !defined(_STDINT_H_) && (!defined(HAVE_STDINT_H) || !_HAVE_STDINT_H)
typedef unsigned int size_t;
typedef signed char int8_t;
typedef unsigned char uint8_t;
diff --git a/system/include/SDL/SDL_events.h b/system/include/SDL/SDL_events.h
index 8be00ceb..183ea4b2 100644
--- a/system/include/SDL/SDL_events.h
+++ b/system/include/SDL/SDL_events.h
@@ -2,6 +2,9 @@
Simple DirectMedia Layer
Copyright (C) 1997-2011 Sam Lantinga <slouken@libsdl.org>
+ Portions of these headers taken from SDL2 (where noted)
+ Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
+
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
@@ -182,33 +185,43 @@ typedef struct SDL_TextInputEvent
/**
* \brief Mouse motion event structure (event.motion.*)
*/
+/*================================= IMPORTANT ================================
+ The version of SDL_MouseMotionEvent that comes in these (emscripten)
+ headers is taken from the finalized version of SDL2
+ ============================================================================*/
+
typedef struct SDL_MouseMotionEvent
{
Uint32 type; /**< ::SDL_MOUSEMOTION */
+ Uint32 timestamp;
Uint32 windowID; /**< The window with mouse focus, if any */
- Uint8 state; /**< The current button state */
- Uint8 padding1;
- Uint8 padding2;
- Uint8 padding3;
- int x; /**< X coordinate, relative to window */
- int y; /**< Y coordinate, relative to window */
- int xrel; /**< The relative motion in the X direction */
- int yrel; /**< The relative motion in the Y direction */
+ Uint32 which; /**< The mouse instance id, or SDL_TOUCH_MOUSEID */
+ Uint32 state; /**< The current button state */
+ Sint32 x; /**< X coordinate, relative to window */
+ Sint32 y; /**< Y coordinate, relative to window */
+ Sint32 xrel; /**< The relative motion in the X direction */
+ Sint32 yrel; /**< The relative motion in the Y direction */
} SDL_MouseMotionEvent;
/**
* \brief Mouse button event structure (event.button.*)
*/
+/*================================= IMPORTANT ================================
+ The version of SDL_MouseButtonEvent that comes in these (emscripten)
+ headers is taken from the finalized version of SDL2
+ ============================================================================*/
typedef struct SDL_MouseButtonEvent
{
Uint32 type; /**< ::SDL_MOUSEBUTTONDOWN or ::SDL_MOUSEBUTTONUP */
+ Uint32 timestamp;
Uint32 windowID; /**< The window with mouse focus, if any */
+ Uint32 which; /**< The mouse instance id, or SDL_TOUCH_MOUSEID */
Uint8 button; /**< The mouse button index */
Uint8 state; /**< ::SDL_PRESSED or ::SDL_RELEASED */
Uint8 padding1;
Uint8 padding2;
- int x; /**< X coordinate, relative to window */
- int y; /**< Y coordinate, relative to window */
+ Sint32 x; /**< X coordinate, relative to window */
+ Sint32 y; /**< Y coordinate, relative to window */
} SDL_MouseButtonEvent;
/**
@@ -217,9 +230,11 @@ typedef struct SDL_MouseButtonEvent
typedef struct SDL_MouseWheelEvent
{
Uint32 type; /**< ::SDL_MOUSEWHEEL */
+ Uint32 timestamp;
Uint32 windowID; /**< The window with mouse focus, if any */
- int x; /**< The amount scrolled horizontally */
- int y; /**< The amount scrolled vertically */
+ Uint32 which; /**< The mouse instance id, or SDL_TOUCH_MOUSEID */
+ Sint32 x; /**< The amount scrolled horizontally */
+ Sint32 y; /**< The amount scrolled vertically */
} SDL_MouseWheelEvent;
/**
@@ -281,24 +296,25 @@ typedef struct SDL_JoyButtonEvent
/**
- * \brief Touch finger motion/finger event structure (event.tmotion.*)
+ * \brief Touch finger motion/finger event structure (event.tfinger.*)
*/
+
+/*================================= IMPORTANT ================================
+ The version of SDL_TouchFingerEvent that comes in these (emscripten)
+ headers is taken from the finalized version of SDL2
+ ============================================================================*/
+
typedef struct SDL_TouchFingerEvent
{
- Uint32 type; /**< ::SDL_FINGERMOTION OR
- SDL_FINGERDOWN OR SDL_FINGERUP*/
- Uint32 windowID; /**< The window with mouse focus, if any */
- SDL_TouchID touchId; /**< The touch device id */
+ Uint32 type; /**< ::SDL_FINGERMOTION or ::SDL_FINGERDOWN or ::SDL_FINGERUP */
+ Uint32 timestamp;
+ SDL_TouchID touchId; /**< The touch device id */
SDL_FingerID fingerId;
- Uint8 state; /**< The current button state */
- Uint8 padding1;
- Uint8 padding2;
- Uint8 padding3;
- Uint16 x;
- Uint16 y;
- Sint16 dx;
- Sint16 dy;
- Uint16 pressure;
+ float x; /**< Normalized in the range 0...1 */
+ float y; /**< Normalized in the range 0...1 */
+ float dx; /**< Normalized in the range 0...1 */
+ float dy; /**< Normalized in the range 0...1 */
+ float pressure; /**< Normalized in the range 0...1 */
} SDL_TouchFingerEvent;
@@ -434,7 +450,7 @@ typedef union SDL_Event
SDL_QuitEvent quit; /**< Quit request event data */
SDL_UserEvent user; /**< Custom event data */
SDL_SysWMEvent syswm; /**< System dependent window event data */
- SDL_TouchFingerEvent tfinger; /**< Touch finger event data */
+ SDL_TouchFingerEvent tfinger; /**< SDL2 Touch finger event data */
SDL_TouchButtonEvent tbutton; /**< Touch button event data */
SDL_MultiGestureEvent mgesture; /**< Multi Finger Gesture data */
SDL_DollarGestureEvent dgesture; /**< Multi Finger Gesture data */
diff --git a/system/include/SDL/SDL_stdinc.h b/system/include/SDL/SDL_stdinc.h
index c4ce7ccd..508ecdb4 100644
--- a/system/include/SDL/SDL_stdinc.h
+++ b/system/include/SDL/SDL_stdinc.h
@@ -65,7 +65,7 @@
#endif
#if defined(HAVE_INTTYPES_H)
# include <inttypes.h>
-#elif defined(EMSCRIPTEN) || defined(HAVE_STDINT_H)
+#elif defined(__EMSCRIPTEN__) || defined(HAVE_STDINT_H)
# include <stdint.h>
#endif
#ifdef HAVE_CTYPE_H
diff --git a/system/include/SDL/SDL_touch.h b/system/include/SDL/SDL_touch.h
index 587efcbf..fe238f10 100644
--- a/system/include/SDL/SDL_touch.h
+++ b/system/include/SDL/SDL_touch.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2011 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -19,9 +19,15 @@
3. This notice may not be removed or altered from any source distribution.
*/
+/*
+ ================================= IMPORTANT ================================
+ This header taken from SDL2
+ ============================================================================
+*/
+
/**
* \file SDL_touch.h
- *
+ *
* Include file for SDL touch event handling.
*/
@@ -35,90 +41,52 @@
#include "begin_code.h"
/* Set up for C function definitions, even when using C++ */
#ifdef __cplusplus
-/* *INDENT-OFF* */
extern "C" {
-/* *INDENT-ON* */
#endif
-
typedef Sint64 SDL_TouchID;
typedef Sint64 SDL_FingerID;
+typedef struct SDL_Finger
+{
+ SDL_FingerID id;
+ float x;
+ float y;
+ float pressure;
+} SDL_Finger;
-struct SDL_Finger {
- SDL_FingerID id;
- Uint16 x;
- Uint16 y;
- Uint16 pressure;
- Uint16 xdelta;
- Uint16 ydelta;
- Uint16 last_x, last_y,last_pressure; /* the last reported coordinates */
- SDL_bool down;
-};
-
-typedef struct SDL_Touch SDL_Touch;
-typedef struct SDL_Finger SDL_Finger;
-
-
-struct SDL_Touch {
-
- /* Free the touch when it's time */
- void (*FreeTouch) (SDL_Touch * touch);
-
- /* data common for tablets */
- float pressure_max, pressure_min;
- float x_max,x_min;
- float y_max,y_min;
- Uint16 xres,yres,pressureres;
- float native_xres,native_yres,native_pressureres;
- float tilt; /* for future use */
- float rotation; /* for future use */
-
- /* Data common to all touch */
- SDL_TouchID id;
- SDL_Window *focus;
-
- char *name;
- Uint8 buttonstate;
- SDL_bool relative_mode;
- SDL_bool flush_motion;
-
- int num_fingers;
- int max_fingers;
- SDL_Finger** fingers;
-
- void *driverdata;
-};
-
+/* Used as the device ID for mouse events simulated with touch input */
+#define SDL_TOUCH_MOUSEID ((Uint32)-1)
/* Function prototypes */
/**
- * \brief Get the touch object at the given id.
- *
- *
+ * \brief Get the number of registered touch devices.
*/
- extern DECLSPEC SDL_Touch* SDLCALL SDL_GetTouch(SDL_TouchID id);
+extern DECLSPEC int SDLCALL SDL_GetNumTouchDevices(void);
+/**
+ * \brief Get the touch ID with the given index, or 0 if the index is invalid.
+ */
+extern DECLSPEC SDL_TouchID SDLCALL SDL_GetTouchDevice(int index);
+/**
+ * \brief Get the number of active fingers for a given touch device.
+ */
+extern DECLSPEC int SDLCALL SDL_GetNumTouchFingers(SDL_TouchID touchID);
/**
- * \brief Get the finger object of the given touch, at the given id.
- *
- *
+ * \brief Get the finger object of the given touch, with the given index.
*/
- extern
- DECLSPEC SDL_Finger* SDLCALL SDL_GetFinger(SDL_Touch *touch, SDL_FingerID id);
+extern DECLSPEC SDL_Finger * SDLCALL SDL_GetTouchFinger(SDL_TouchID touchID, int index);
/* Ends C function definitions when using C++ */
#ifdef __cplusplus
-/* *INDENT-OFF* */
}
-/* *INDENT-ON* */
#endif
#include "close_code.h"
-#endif /* _SDL_mouse_h */
+#endif /* _SDL_touch_h */
/* vi: set ts=4 sw=4 expandtab: */
diff --git a/system/include/emscripten/bind.h b/system/include/emscripten/bind.h
index 390533f3..0699715c 100644
--- a/system/include/emscripten/bind.h
+++ b/system/include/emscripten/bind.h
@@ -17,8 +17,6 @@ namespace emscripten {
BY_EMVAL = 2,
};
-#define EMSCRIPTEN_ALWAYS_INLINE __attribute__((always_inline))
-
namespace internal {
typedef long GenericEnumValue;
@@ -35,18 +33,21 @@ namespace emscripten {
void _embind_register_bool(
TYPEID boolType,
const char* name,
+ size_t size,
bool trueValue,
bool falseValue);
void _embind_register_integer(
TYPEID integerType,
const char* name,
+ size_t size,
long minRange,
unsigned long maxRange);
void _embind_register_float(
TYPEID floatType,
- const char* name);
+ const char* name,
+ size_t size);
void _embind_register_std_string(
TYPEID stringType,
@@ -163,7 +164,9 @@ namespace emscripten {
void _embind_register_enum(
TYPEID enumType,
- const char* name);
+ const char* name,
+ size_t size,
+ bool isSigned);
void _embind_register_enum_value(
TYPEID enumType,
@@ -810,7 +813,7 @@ namespace emscripten {
// NOTE: this returns the class type, not the pointer type
template<typename T>
inline TYPEID getActualType(T* ptr) {
- return reinterpret_cast<TYPEID>(&typeid(*ptr));
+ return getLightTypeID(*ptr);
};
}
@@ -848,15 +851,15 @@ namespace emscripten {
template<typename T>
struct SmartPtrIfNeeded {
template<typename U>
- SmartPtrIfNeeded(U& cls) {
- cls.template smart_ptr<T>();
+ SmartPtrIfNeeded(U& cls, const char* smartPtrName) {
+ cls.template smart_ptr<T>(smartPtrName);
}
};
template<typename T>
struct SmartPtrIfNeeded<T*> {
template<typename U>
- SmartPtrIfNeeded(U&) {
+ SmartPtrIfNeeded(U&, const char*) {
}
};
};
@@ -887,7 +890,7 @@ namespace emscripten {
}
template<typename PointerType>
- const class_& smart_ptr() const {
+ const class_& smart_ptr(const char* name) const {
using namespace internal;
typedef smart_ptr_trait<PointerType> PointerTrait;
@@ -898,7 +901,7 @@ namespace emscripten {
_embind_register_smart_ptr(
TypeID<PointerType>::get(),
TypeID<PointeeType>::get(),
- typeid(PointerType).name(),
+ name,
PointerTrait::get_sharing_policy(),
reinterpret_cast<GenericFunction>(&PointerTrait::get),
reinterpret_cast<GenericFunction>(&PointerTrait::construct_null),
@@ -930,10 +933,10 @@ namespace emscripten {
}
template<typename SmartPtr, typename... Args, typename... Policies>
- const class_& smart_ptr_constructor(SmartPtr (*factory)(Args...), Policies...) const {
+ const class_& smart_ptr_constructor(const char* smartPtrName, SmartPtr (*factory)(Args...), Policies...) const {
using namespace internal;
- smart_ptr<SmartPtr>();
+ smart_ptr<SmartPtr>(smartPtrName);
typename WithPolicies<Policies...>::template ArgTypeList<SmartPtr, Args...> args;
_embind_register_class_constructor(
@@ -946,12 +949,12 @@ namespace emscripten {
}
template<typename WrapperType, typename PointerType = WrapperType*>
- const class_& allow_subclass() const {
+ const class_& allow_subclass(const char* wrapperClassName, const char* pointerName = "<UnknownPointerName>") const {
using namespace internal;
- auto cls = class_<WrapperType, base<ClassType>>(typeid(WrapperType).name())
+ auto cls = class_<WrapperType, base<ClassType>>(wrapperClassName)
;
- SmartPtrIfNeeded<PointerType> _(cls);
+ SmartPtrIfNeeded<PointerType> _(cls, pointerName);
return class_function(
"implement",
@@ -1182,7 +1185,9 @@ namespace emscripten {
enum_(const char* name) {
_embind_register_enum(
internal::TypeID<EnumType>::get(),
- name);
+ name,
+ sizeof(EnumType),
+ std::is_signed<typename std::underlying_type<EnumType>::type>::value);
}
enum_& value(const char* name, EnumType value) {
diff --git a/system/include/emscripten/emscripten.h b/system/include/emscripten/emscripten.h
index b92d920c..73836018 100644
--- a/system/include/emscripten/emscripten.h
+++ b/system/include/emscripten/emscripten.h
@@ -14,7 +14,7 @@
extern "C" {
#endif
-#if !EMSCRIPTEN
+#if !__EMSCRIPTEN__
#include <SDL/SDL.h> /* for SDL_Delay in async_call */
#endif
@@ -40,10 +40,15 @@ extern "C" {
#define EM_ASM(...) emscripten_asm_const(#__VA_ARGS__)
/*
- * Input-output versions of EM_ASM. EM_ASM_INT receives arguments of
- * either int or double type and returns an int; EM_ASM_DOUBLE
- * receives similar arguments (int or double) but returns a double.
- * Arguments arrive as $0, $1 etc; output value should be returned:
+ * Input-output versions of EM_ASM.
+ *
+ * EM_ASM_ (an extra _ is added) or EM_ASM_ARGS allow sending values
+ * (ints or doubles) into the code. If you also want a return value,
+ * EM_ASM_INT receives arguments (of int or double type)
+ * and returns an int; EM_ASM_DOUBLE does the same and returns
+ * a double.
+ *
+ * Arguments arrive as $0, $1 etc. The output value should be returned:
*
* int x = EM_ASM_INT({
* console.log('I received: ' + [$0, $1]);
@@ -54,18 +59,16 @@ extern "C" {
* (int or double) but *not* to pass any values, you can use
* EM_ASM_INT_V and EM_ASM_DOUBLE_V respectively.
*/
+#define EM_ASM_(code, ...) emscripten_asm_const_int(#code, __VA_ARGS__)
+#define EM_ASM_ARGS(code, ...) emscripten_asm_const_int(#code, __VA_ARGS__)
#define EM_ASM_INT(code, ...) emscripten_asm_const_int(#code, __VA_ARGS__)
#define EM_ASM_DOUBLE(code, ...) emscripten_asm_const_double(#code, __VA_ARGS__)
#define EM_ASM_INT_V(code) emscripten_asm_const_int(#code)
#define EM_ASM_DOUBLE_V(code) emscripten_asm_const_double(#code)
/*
- * Forces LLVM to not dead-code-eliminate a function. Note that
- * you still need to use EXPORTED_FUNCTIONS so it stays alive
- * in JS, e.g.
- * emcc -s EXPORTED_FUNCTIONS=["_main", "_myfunc"]
- * and in the source file
- * void EMSCRIPTEN_KEEPALIVE myfunc() {..}
+ * Forces LLVM to not dead-code-eliminate a function. This also
+ * exports the function, as if you added it to EXPORTED_FUNCTIONS.
*/
#define EMSCRIPTEN_KEEPALIVE __attribute__((used))
@@ -94,7 +97,7 @@ extern void emscripten_async_run_script(const char *script, int millis);
* for this is to load an asset module, that is, the output of the
* file packager.
*/
-extern void emscripten_async_load_script(const char *script, void (*onload)(), void (*onerror)());
+extern void emscripten_async_load_script(const char *script, void (*onload)(void), void (*onerror)(void));
/*
* Set a C function as the main event loop. The JS environment
@@ -135,12 +138,12 @@ extern void emscripten_async_load_script(const char *script, void (*onload)(), v
* you created an object on the stack, it will be cleaned up
* before the main loop will be called the first time.
*/
-#if EMSCRIPTEN
-extern void emscripten_set_main_loop(void (*func)(), int fps, int simulate_infinite_loop);
+#if __EMSCRIPTEN__
+extern void emscripten_set_main_loop(void (*func)(void), int fps, int simulate_infinite_loop);
extern void emscripten_set_main_loop_arg(void (*func)(void*), void *arg, int fps, int simulate_infinite_loop);
-extern void emscripten_pause_main_loop();
-extern void emscripten_resume_main_loop();
-extern void emscripten_cancel_main_loop();
+extern void emscripten_pause_main_loop(void);
+extern void emscripten_resume_main_loop(void);
+extern void emscripten_cancel_main_loop(void);
#else
#define emscripten_set_main_loop(func, fps, simulateInfiniteLoop) \
while (1) { func(); usleep(1000000/fps); }
@@ -160,7 +163,7 @@ extern void emscripten_cancel_main_loop();
* are not counted, do not block the main loop, and can fire
* at specific time in the future.
*/
-#if EMSCRIPTEN
+#if __EMSCRIPTEN__
extern void _emscripten_push_main_loop_blocker(void (*func)(void *), void *arg, const char *name);
extern void _emscripten_push_uncounted_main_loop_blocker(void (*func)(void *), void *arg, const char *name);
#else
@@ -182,7 +185,7 @@ inline void _emscripten_push_uncounted_main_loop_blocker(void (*func)(void *), v
* to 10, then push 10 blockers, as they complete the user will
* see x/10 and so forth.
*/
-#if EMSCRIPTEN
+#if __EMSCRIPTEN__
extern void emscripten_set_main_loop_expected_blockers(int num);
#else
inline void emscripten_set_main_loop_expected_blockers(int num) {}
@@ -197,7 +200,7 @@ inline void emscripten_set_main_loop_expected_blockers(int num) {}
* If millis is negative, the browser's requestAnimationFrame
* mechanism is used.
*/
-#if EMSCRIPTEN
+#if __EMSCRIPTEN__
extern void emscripten_async_call(void (*func)(void *), void *arg, int millis);
#else
inline void emscripten_async_call(void (*func)(void *), void *arg, int millis) {
@@ -212,7 +215,7 @@ inline void emscripten_async_call(void (*func)(void *), void *arg, int millis) {
* etc. are not run). This is implicitly performed when you do
* an asynchronous operation like emscripten_async_call.
*/
-extern void emscripten_exit_with_live_runtime();
+extern void emscripten_exit_with_live_runtime(void);
/*
* Hide the OS mouse cursor over the canvas. Note that SDL's
@@ -220,7 +223,7 @@ extern void emscripten_exit_with_live_runtime();
* the OS one. This command is useful to hide the OS cursor
* if your app draws its own cursor.
*/
-void emscripten_hide_mouse();
+void emscripten_hide_mouse(void);
/*
* Resizes the pixel width and height of the <canvas> element
@@ -241,11 +244,11 @@ void emscripten_get_canvas_size(int *width, int *height, int *isFullscreen);
* absolute time, and is only meaningful in comparison to
* other calls to this function. The unit is ms.
*/
-#if EMSCRIPTEN
-double emscripten_get_now();
+#if __EMSCRIPTEN__
+double emscripten_get_now(void);
#else
#include <time.h>
-double emscripten_get_now() {
+double emscripten_get_now(void) {
return (1000*clock())/(double)CLOCKS_PER_SEC;
}
#endif
@@ -253,7 +256,7 @@ double emscripten_get_now() {
/*
* Simple random number generation in [0, 1), maps to Math.random().
*/
-float emscripten_random();
+float emscripten_random(void);
/*
* This macro-looking function will cause Emscripten to
@@ -321,6 +324,28 @@ void emscripten_async_wget_data(const char* url, void *arg, void (*onload)(void*
void emscripten_async_wget2(const char* url, const char* file, const char* requesttype, const char* param, void *arg, void (*onload)(void*, const char*), void (*onerror)(void*, int), void (*onprogress)(void*, int));
/*
+ * More feature-complete version of emscripten_async_wget_data. Note:
+ * this version is experimental.
+ *
+ * The requesttype is 'GET' or 'POST',
+ * If is post request, param is the post parameter
+ * like key=value&key2=value2.
+ * The param 'arg' is a pointer will be pass to the callback
+ * The free param tells the runtime whether to free the returned buffer
+ after onload is complete. If false freeing the buffer is the receiver's
+ responsibility.
+ * The callbacks are called with an object pointer give in parameter.
+ * When file is ready then 'onload' callback will called with a pointer to
+ the buffer in memory and the size in bytes.
+ * During the download 'onprogress' callback will called. The first argument is
+ the number of bytes loaded. The second argument is the total size in bytes,
+ or zero if the size is unavailable.
+ * If any error occurred 'onerror' will called with the HTTP status code
+ and a string with the status description.
+ */
+void emscripten_async_wget2_data(const char* url, const char* requesttype, const char* param, void *arg, int free, void (*onload)(void*, void*, unsigned), void (*onerror)(void*, int, const char*), void (*onprogress)(void*, int, int));
+
+/*
* Prepare a file in asynchronous way. This does just the
* preparation part of emscripten_async_wget, that is, it
* works on file data already present, and asynchronously
@@ -398,10 +423,17 @@ void emscripten_destroy_worker(worker_handle worker);
void emscripten_call_worker(worker_handle worker, const char *funcname, char *data, int size, void (*callback)(char *, int, void*), void *arg);
/*
- * Sends a response when in a worker call. Should only be
- * called once in each call.
+ * Sends a response when in a worker call. Both functions post a message
+ * back to the thread which called the worker. The _respond_provisionally
+ * variant can be invoked multiple times, which will queue up messages to
+ * be posted to the worker's creator. Eventually, the _respond variant must
+ * be invoked, which will disallow further messages and free framework
+ * resources previously allocated for this worker call. (Calling the
+ * provisional version is optional, but you must call the non-provisional
+ * one to avoid leaks.)
*/
void emscripten_worker_respond(char *data, int size);
+void emscripten_worker_respond_provisionally(char *data, int size);
/*
* Checks how many responses are being waited for from a worker. This
@@ -445,7 +477,18 @@ void emscripten_set_network_backend(int backend);
*/
int emscripten_get_compiler_setting(const char *name);
+/*
+ * Emits
+ * debugger;
+ * inline in the code, which tells the JS engine to invoke
+ * the debugger if it gets there.
+ */
+void emscripten_debugger();
+
+
+/* ===================================== */
/* Internal APIs. Be careful with these. */
+/* ===================================== */
/*
* Profiling tools.
diff --git a/system/include/emscripten/html5.h b/system/include/emscripten/html5.h
index 06c647bf..db81725a 100644
--- a/system/include/emscripten/html5.h
+++ b/system/include/emscripten/html5.h
@@ -123,6 +123,10 @@ extern "C" {
/*
* The event structure passed in keyboard events keypress, keydown and keyup.
* https://dvcs.w3.org/hg/dom3events/raw-file/tip/html/DOM3-Events.html#keys
+ *
+ * Note that since the DOM Level 3 Events spec is very recent at the time of writing (2014-03), uniform
+ * support for the different fields in the spec is still in flux. Be sure to check the results in multiple
+ * browsers. See the unmerged pull request #2222 for an example way on how to interpret the legacy key events.
*/
typedef struct EmscriptenKeyboardEvent {
// The printed representation of the pressed key.
@@ -144,14 +148,18 @@ typedef struct EmscriptenKeyboardEvent {
EM_UTF8 locale[32];
// The following fields are values from previous versions of the DOM key events specifications.
// See https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent?redirectlocale=en-US&redirectslug=DOM%2FKeyboardEvent
- // The character representation of the key.
+ // The character representation of the key. This is the field 'char' from the docs, but renamed to charValue to avoid a C reserved word.
+ // Warning: This attribute has been dropped from DOM Level 3 events.
EM_UTF8 charValue[32];
// The Unicode reference number of the key; this attribute is used only by the keypress event. For keys whose char attribute
// contains multiple characters, this is the Unicode value of the first character in that attribute.
+ // Warning: This attribute is deprecated, you should use the field 'key' instead, if available.
unsigned long charCode;
// A system and implementation dependent numerical code identifying the unmodified value of the pressed key.
+ // Warning: This attribute is deprecated, you should use the field 'key' instead, if available.
unsigned long keyCode;
// A system and implementation dependent numeric code identifying the unmodified value of the pressed key; this is usually the same as keyCode.
+ // Warning: This attribute is deprecated, you should use the field 'key' instead, if available.
unsigned long which;
} EmscriptenKeyboardEvent;
@@ -376,7 +384,7 @@ extern EMSCRIPTEN_RESULT emscripten_lock_orientation(int allowedOrientations);
/*
* Allows the screen to turn again into any orientation.
*/
-extern EMSCRIPTEN_RESULT emscripten_unlock_orientation();
+extern EMSCRIPTEN_RESULT emscripten_unlock_orientation(void);
/*
* The event structure passed in the fullscreenchange event.
@@ -388,9 +396,16 @@ typedef struct EmscriptenFullscreenChangeEvent {
// Specifies if the current page has the ability to display elements fullscreen.
EM_BOOL fullscreenEnabled;
// The nodeName of the target HTML Element that is in full screen mode. See https://developer.mozilla.org/en-US/docs/Web/API/Node.nodeName
+ // If isFullscreen is false, then nodeName, id and elementWidth/Height specify information about the element that just exited fullscreen mode.
EM_UTF8 nodeName[128];
// The HTML Element ID of the target HTML element that is in full screen mode.
EM_UTF8 id[128];
+ // The new pixel size of the element that changed fullscreen status.
+ int elementWidth;
+ int elementHeight;
+ // The size of the whole screen, in pixels.
+ int screenWidth;
+ int screenHeight;
} EmscriptenFullscreenChangeEvent;
/*
@@ -413,7 +428,7 @@ extern EMSCRIPTEN_RESULT emscripten_request_fullscreen(const char *target, int d
/*
* Returns back to windowed browsing mode.
*/
-extern EMSCRIPTEN_RESULT emscripten_exit_fullscreen();
+extern EMSCRIPTEN_RESULT emscripten_exit_fullscreen(void);
/*
* The event structure passed in the pointerlockchange event.
@@ -449,7 +464,7 @@ extern EMSCRIPTEN_RESULT emscripten_request_pointerlock(const char *target, int
/*
* Exits pointer lock state and restores the mouse cursor to be visible again.
*/
-extern EMSCRIPTEN_RESULT emscripten_exit_pointerlock();
+extern EMSCRIPTEN_RESULT emscripten_exit_pointerlock(void);
#define EMSCRIPTEN_VISIBILITY_HIDDEN 0
#define EMSCRIPTEN_VISIBILITY_VISIBLE 1
@@ -566,7 +581,7 @@ extern EMSCRIPTEN_RESULT emscripten_set_gamepaddisconnected_callback(void *userD
* Returns the number of gamepads connected to the system or EMSCRIPTEN_RESULT_NOT_SUPPORTED if the current browser does not support gamepads.
* Note: A gamepad does not show up as connected until a button on it is pressed.
*/
-extern int emscripten_get_num_gamepads();
+extern int emscripten_get_num_gamepads(void);
/*
* Returns a snapshot of the current gamepad state.
*/
diff --git a/system/include/emscripten/val.h b/system/include/emscripten/val.h
index 19b1beb1..e217c959 100644
--- a/system/include/emscripten/val.h
+++ b/system/include/emscripten/val.h
@@ -2,6 +2,7 @@
#include <stdint.h> // uintptr_t
#include <emscripten/wire.h>
+#include <array>
#include <vector>
namespace emscripten {
@@ -12,12 +13,10 @@ namespace emscripten {
typedef struct _EM_VAL* EM_VAL;
typedef struct _EM_DESTRUCTORS* EM_DESTRUCTORS;
+ typedef struct _EM_METHOD_CALLER* EM_METHOD_CALLER;
+ typedef double EM_GENERIC_WIRE_TYPE;
+ typedef const void* EM_VAR_ARGS;
- // TODO: functions returning this are reinterpret_cast
- // into the correct return type. this needs some thought
- // for asm.js.
- typedef void _POLYMORPHIC_RESULT;
-
void _emval_incref(EM_VAL value);
void _emval_decref(EM_VAL value);
@@ -28,37 +27,45 @@ namespace emscripten {
EM_VAL _emval_undefined();
EM_VAL _emval_null();
EM_VAL _emval_new_cstring(const char*);
- void _emval_take_value(TYPEID type/*, ...*/);
+
+ EM_VAL _emval_take_value(TYPEID type, EM_VAR_ARGS argv);
EM_VAL _emval_new(
EM_VAL value,
unsigned argCount,
- internal::TYPEID argTypes[]
- /*, ... */);
+ internal::TYPEID argTypes[],
+ EM_VAR_ARGS argv);
EM_VAL _emval_get_global(const char* name);
EM_VAL _emval_get_module_property(const char* name);
EM_VAL _emval_get_property(EM_VAL object, EM_VAL key);
void _emval_set_property(EM_VAL object, EM_VAL key, EM_VAL value);
- _POLYMORPHIC_RESULT _emval_as(EM_VAL value, TYPEID returnType, EM_DESTRUCTORS* runDestructors);
+ EM_GENERIC_WIRE_TYPE _emval_as(EM_VAL value, TYPEID returnType, EM_DESTRUCTORS* destructors);
EM_VAL _emval_call(
EM_VAL value,
unsigned argCount,
- internal::TYPEID argTypes[]
- /*, ... */);
+ internal::TYPEID argTypes[],
+ EM_VAR_ARGS argv);
- // DO NOT call this more than once per signature. It will leak function pointer offsets!
- GenericFunction _emval_get_method_caller(
+ // DO NOT call this more than once per signature. It will
+ // leak generated function objects!
+ EM_METHOD_CALLER _emval_get_method_caller(
unsigned argCount, // including return value
internal::TYPEID argTypes[]);
+ EM_GENERIC_WIRE_TYPE _emval_call_method(
+ EM_METHOD_CALLER caller,
+ EM_VAL handle,
+ const char* methodName,
+ EM_DESTRUCTORS* destructors,
+ EM_VAR_ARGS argv);
bool _emval_has_function(
EM_VAL value,
const char* methodName);
}
template<const char* address>
- struct symbol_registrar {
+ struct symbol_registrar {
symbol_registrar() {
internal::_emval_register_symbol(address);
}
@@ -66,19 +73,21 @@ namespace emscripten {
template<typename ReturnType, typename... Args>
struct Signature {
+ /*
typedef typename BindingType<ReturnType>::WireType (*MethodCaller)(
EM_VAL value,
const char* methodName,
EM_DESTRUCTORS* destructors,
typename BindingType<Args>::WireType...);
+ */
- static MethodCaller get_method_caller() {
- static MethodCaller fp = reinterpret_cast<MethodCaller>(init_method_caller());
- return fp;
+ static EM_METHOD_CALLER get_method_caller() {
+ static EM_METHOD_CALLER mc = init_method_caller();
+ return mc;
}
private:
- static GenericFunction init_method_caller() {
+ static EM_METHOD_CALLER init_method_caller() {
WithPolicies<>::ArgTypeList<ReturnType, Args...> args;
return _emval_get_method_caller(args.count, args.types);
}
@@ -100,19 +109,119 @@ namespace emscripten {
EM_DESTRUCTORS destructors;
};
+ template<typename WireType>
+ struct GenericWireTypeConverter {
+ static WireType from(double wt) {
+ return static_cast<WireType>(wt);
+ }
+ };
+
+ template<typename Pointee>
+ struct GenericWireTypeConverter<Pointee*> {
+ static Pointee* from(double wt) {
+ return reinterpret_cast<Pointee*>(static_cast<uintptr_t>(wt));
+ }
+ };
+
+ template<typename T>
+ T fromGenericWireType(double g) {
+ typedef typename BindingType<T>::WireType WireType;
+ WireType wt = GenericWireTypeConverter<WireType>::from(g);
+ return BindingType<T>::fromWireType(wt);
+ }
+
+ template<typename... Args>
+ struct PackSize;
+
+ template<>
+ struct PackSize<> {
+ static constexpr size_t value = 0;
+ };
+
+ template<typename Arg, typename... Args>
+ struct PackSize<Arg, Args...> {
+ static constexpr size_t value = (sizeof(typename BindingType<Arg>::WireType) + 7) / 8 + PackSize<Args...>::value;
+ };
+
+ union GenericWireType {
+ union {
+ unsigned u;
+ float f;
+ const void* p;
+ } w[2];
+ double d;
+ };
+ static_assert(sizeof(GenericWireType) == 8, "GenericWireType must be 8 bytes");
+ static_assert(alignof(GenericWireType) == 8, "GenericWireType must be 8-byte-aligned");
+
+ inline void writeGenericWireType(GenericWireType*& cursor, float wt) {
+ cursor->w[0].f = wt;
+ ++cursor;
+ }
+
+ inline void writeGenericWireType(GenericWireType*& cursor, double wt) {
+ cursor->d = wt;
+ ++cursor;
+ }
+
+ template<typename T>
+ void writeGenericWireType(GenericWireType*& cursor, T* wt) {
+ cursor->w[0].p = wt;
+ ++cursor;
+ }
+
+ inline void writeGenericWireType(GenericWireType*& cursor, const memory_view& wt) {
+ cursor[0].w[0].u = static_cast<unsigned>(wt.type);
+ cursor[0].w[1].u = wt.size;
+ cursor[1].w[0].p = wt.data;
+ cursor += 2;
+ }
+
+ template<typename T>
+ void writeGenericWireType(GenericWireType*& cursor, T wt) {
+ cursor->w[0].u = static_cast<unsigned>(wt);
+ ++cursor;
+ }
+
+ inline void writeGenericWireTypes(GenericWireType*&) {
+ }
+
+ template<typename First, typename... Rest>
+ EMSCRIPTEN_ALWAYS_INLINE void writeGenericWireTypes(GenericWireType*& cursor, First&& first, Rest&&... rest) {
+ writeGenericWireType(cursor, BindingType<First>::toWireType(std::forward<First>(first)));
+ writeGenericWireTypes(cursor, std::forward<Rest>(rest)...);
+ }
+
+ template<typename... Args>
+ struct WireTypePack {
+ WireTypePack(Args&&... args) {
+ GenericWireType* cursor = elements.data();
+ writeGenericWireTypes(cursor, std::forward<Args>(args)...);
+ }
+
+ operator EM_VAR_ARGS() const {
+ return elements.data();
+ }
+
+ private:
+ std::array<GenericWireType, PackSize<Args...>::value> elements;
+ };
+
template<typename ReturnType, typename... Args>
struct MethodCaller {
static ReturnType call(EM_VAL handle, const char* methodName, Args&&... args) {
auto caller = Signature<ReturnType, Args...>::get_method_caller();
+ WireTypePack<Args...> argv(std::forward<Args>(args)...);
EM_DESTRUCTORS destructors;
- auto wireType = caller(
+ EM_GENERIC_WIRE_TYPE result = _emval_call_method(
+ caller,
handle,
methodName,
&destructors,
- toWireType(std::forward<Args>(args))...);
+ argv);
DestructorsRunner rd(destructors);
- return BindingType<ReturnType>::fromWireType(wireType);
+ return fromGenericWireType<ReturnType>(result);
}
};
@@ -121,12 +230,14 @@ namespace emscripten {
static void call(EM_VAL handle, const char* methodName, Args&&... args) {
auto caller = Signature<void, Args...>::get_method_caller();
+ WireTypePack<Args...> argv(std::forward<Args>(args)...);
EM_DESTRUCTORS destructors;
- caller(
+ _emval_call_method(
+ caller,
handle,
methodName,
&destructors,
- toWireType(std::forward<Args>(args))...);
+ argv);
DestructorsRunner rd(destructors);
// void requires no translation
}
@@ -185,9 +296,13 @@ namespace emscripten {
template<typename T>
explicit val(T&& value) {
+ using namespace internal;
+
typedef internal::BindingType<T> BT;
- auto taker = reinterpret_cast<internal::EM_VAL (*)(internal::TYPEID, typename BT::WireType)>(&internal::_emval_take_value);
- handle = taker(internal::TypeID<T>::get(), BT::toWireType(std::forward<T>(value)));
+ WireTypePack<T> argv(std::forward<T>(value));
+ handle = _emval_take_value(
+ internal::TypeID<T>::get(),
+ argv);
}
val() = delete;
@@ -235,20 +350,15 @@ namespace emscripten {
using namespace internal;
WithPolicies<>::ArgTypeList<Args...> argList;
+ WireTypePack<Args...> argv(std::forward<Args>(args)...);
// todo: this is awfully similar to operator(), can we
// merge them somehow?
- typedef EM_VAL (*TypedNew)(
- EM_VAL,
- unsigned,
- TYPEID argTypes[],
- typename BindingType<Args>::WireType...);
- TypedNew typedNew = reinterpret_cast<TypedNew>(&_emval_new);
return val(
- typedNew(
+ _emval_new(
handle,
argList.count,
argList.types,
- toWireType(std::forward<Args>(args))...));
+ argv));
}
template<typename T>
@@ -266,18 +376,13 @@ namespace emscripten {
using namespace internal;
WithPolicies<>::ArgTypeList<Args...> argList;
- typedef EM_VAL (*TypedCall)(
- EM_VAL,
- unsigned,
- TYPEID argTypes[],
- typename BindingType<Args>::WireType...);
- TypedCall typedCall = reinterpret_cast<TypedCall>(&_emval_call);
+ WireTypePack<Args...> argv(std::forward<Args>(args)...);
return val(
- typedCall(
+ _emval_call(
handle,
argList.count,
argList.types,
- toWireType(std::forward<Args>(args))...));
+ argv));
}
template<typename ReturnValue, typename... Args>
@@ -297,16 +402,13 @@ namespace emscripten {
typedef BindingType<T> BT;
- typedef typename BT::WireType (*TypedAs)(
- EM_VAL value,
- TYPEID returnType,
- EM_DESTRUCTORS* runDestructors);
- TypedAs typedAs = reinterpret_cast<TypedAs>(&_emval_as);
-
EM_DESTRUCTORS destructors;
- typename BT::WireType wt = typedAs(handle, TypeID<T>::get(), &destructors);
+ EM_GENERIC_WIRE_TYPE result = _emval_as(
+ handle,
+ TypeID<T>::get(),
+ &destructors);
DestructorsRunner dr(destructors);
- return BT::fromWireType(wt);
+ return fromGenericWireType<T>(result);
}
private:
diff --git a/system/include/emscripten/wire.h b/system/include/emscripten/wire.h
index c3ce8dd0..c20e2f55 100644
--- a/system/include/emscripten/wire.h
+++ b/system/include/emscripten/wire.h
@@ -12,23 +12,69 @@
#include <memory>
#include <string>
+#define EMSCRIPTEN_ALWAYS_INLINE __attribute__((always_inline))
+
namespace emscripten {
+ #ifndef EMSCRIPTEN_HAS_UNBOUND_TYPE_NAMES
+ #define EMSCRIPTEN_HAS_UNBOUND_TYPE_NAMES 1
+ #endif
+
+
+ #if EMSCRIPTEN_HAS_UNBOUND_TYPE_NAMES
+ constexpr bool has_unbound_type_names = true;
+ #else
+ constexpr bool has_unbound_type_names = false;
+ #endif
+
namespace internal {
typedef void (*GenericFunction)();
- typedef const struct _TYPEID* TYPEID;
+ typedef const struct _TYPEID {}* TYPEID;
+
+
+ // We don't need the full std::type_info implementation. We
+ // just need a unique identifier per type and polymorphic type
+ // identification.
+
+ template<typename T>
+ struct CanonicalizedID {
+ static TYPEID get() {
+ static _TYPEID c;
+ return &c;
+ }
+ };
+
+ template<typename T>
+ struct Canonicalized {
+ typedef typename std::remove_cv<typename std::remove_reference<T>::type>::type type;
+ };
+
+ template<typename T>
+ struct LightTypeID {
+ static TYPEID get() {
+ typedef typename Canonicalized<T>::type C;
+ if (has_unbound_type_names || std::is_polymorphic<C>::value) {
+ return reinterpret_cast<TYPEID>(&typeid(C));
+ } else {
+ return CanonicalizedID<C>::get();
+ }
+ }
+ };
+
+ template<typename T>
+ const TYPEID getLightTypeID(const T& value) {
+ typedef typename Canonicalized<T>::type C;
+ if (has_unbound_type_names || std::is_polymorphic<C>::value) {
+ return reinterpret_cast<TYPEID>(&typeid(value));
+ } else {
+ return LightTypeID<T>::get();
+ }
+ }
- // This implementation is technically not legal, as it's not
- // required that two calls to typeid produce the same exact
- // std::type_info instance. That said, it's likely to work
- // given Emscripten compiles everything into one binary.
- // Should it not work in the future: replace TypeID with an
- // int, and store all TypeInfo we see in a map, allocating new
- // TypeIDs as we add new items to the map.
template<typename T>
struct TypeID {
static TYPEID get() {
- return reinterpret_cast<TYPEID>(&typeid(T));
+ return LightTypeID<T>::get();
}
};
@@ -51,7 +97,7 @@ namespace emscripten {
template<typename T>
struct TypeID<AllowedRawPointer<T>> {
static TYPEID get() {
- return reinterpret_cast<TYPEID>(&typeid(T*));
+ return LightTypeID<T*>::get();
}
};
diff --git a/system/include/execinfo.h b/system/include/execinfo.h
deleted file mode 100644
index 17cda148..00000000
--- a/system/include/execinfo.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2003 Maxim Sobolev <sobomax@FreeBSD.org>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id: execinfo.h,v 1.2 2004/07/19 05:20:29 sobomax Exp $
- */
-
-#ifndef COMPAT_EXECINFO_H_INCLUDED
-#define COMPAT_EXECINFO_H_INCLUDED
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-int backtrace(void **, int);
-char ** backtrace_symbols(void *const *, int);
-void backtrace_symbols_fd(void *const *, int, int);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* COMPAT_EXECINFO_H_INCLUDED */
diff --git a/system/include/gc.h b/system/include/gc.h
index a21fd410..affa615f 100644
--- a/system/include/gc.h
+++ b/system/include/gc.h
@@ -1,5 +1,7 @@
/*
* Boehm-compatible GC API
+ *
+ * WARNING: this is deprecated. You should just build Boehm from source, it is much faster than the toy version written in emscripten
*/
#ifndef _GC_H_INCLUDED
#define _GC_H_INCLUDED
diff --git a/system/include/jansson.h b/system/include/jansson.h
index 04c345e9..53715fcc 100644
--- a/system/include/jansson.h
+++ b/system/include/jansson.h
@@ -82,7 +82,7 @@ typedef long long json_int_t;
typedef long json_int_t;
#endif /* JSON_INTEGER_IS_LONG_LONG */
-#ifdef EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
extern "C" bool json_typeof(const void *object);
extern "C" bool json_is_object(const void *object);
extern "C" bool json_is_array(const void *object);
diff --git a/system/include/unwind.h b/system/include/unwind.h
deleted file mode 100644
index f8d43d0d..00000000
--- a/system/include/unwind.h
+++ /dev/null
@@ -1,154 +0,0 @@
-/* libunwind - a platform-independent unwind library
- Copyright (C) 2003 Hewlett-Packard Co
- Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
-
-This file is part of libunwind.
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-
-#ifndef _UNWIND_H
-#define _UNWIND_H
-
-/* For uint64_t */
-#include <stdint.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* Minimal interface as per C++ ABI draft standard:
-
- http://www.codesourcery.com/cxx-abi/abi-eh.html */
-
-typedef enum
- {
- _URC_NO_REASON = 0,
- _URC_FOREIGN_EXCEPTION_CAUGHT = 1,
- _URC_FATAL_PHASE2_ERROR = 2,
- _URC_FATAL_PHASE1_ERROR = 3,
- _URC_NORMAL_STOP = 4,
- _URC_END_OF_STACK = 5,
- _URC_HANDLER_FOUND = 6,
- _URC_INSTALL_CONTEXT = 7,
- _URC_CONTINUE_UNWIND = 8
- }
-_Unwind_Reason_Code;
-
-typedef int _Unwind_Action;
-
-#define _UA_SEARCH_PHASE 1
-#define _UA_CLEANUP_PHASE 2
-#define _UA_HANDLER_FRAME 4
-#define _UA_FORCE_UNWIND 8
-
-struct _Unwind_Context; /* opaque data-structure */
-struct _Unwind_Exception; /* forward-declaration */
-
-typedef void (*_Unwind_Exception_Cleanup_Fn) (_Unwind_Reason_Code,
- struct _Unwind_Exception *);
-
-typedef _Unwind_Reason_Code (*_Unwind_Stop_Fn) (int, _Unwind_Action,
- uint64_t,
- struct _Unwind_Exception *,
- struct _Unwind_Context *,
- void *);
-
-/* The C++ ABI requires exception_class, private_1, and private_2 to
- be of type uint64 and the entire structure to be
- double-word-aligned. Please note that exception_class stays 64-bit
- even on 32-bit machines for gcc compatibility. */
-struct _Unwind_Exception
- {
- uint64_t exception_class;
- _Unwind_Exception_Cleanup_Fn exception_cleanup;
- unsigned long private_1;
- unsigned long private_2;
- } __attribute__((__aligned__));
-
-extern _Unwind_Reason_Code _Unwind_RaiseException (struct _Unwind_Exception *);
-extern _Unwind_Reason_Code _Unwind_ForcedUnwind (struct _Unwind_Exception *,
- _Unwind_Stop_Fn, void *);
-extern void _Unwind_Resume (struct _Unwind_Exception *);
-extern void _Unwind_DeleteException (struct _Unwind_Exception *);
-extern unsigned long _Unwind_GetGR (struct _Unwind_Context *, int);
-extern void _Unwind_SetGR (struct _Unwind_Context *, int, unsigned long);
-extern unsigned long _Unwind_GetIP (struct _Unwind_Context *);
-extern unsigned long _Unwind_GetIPInfo (struct _Unwind_Context *, int *);
-extern void _Unwind_SetIP (struct _Unwind_Context *, unsigned long);
-extern unsigned long _Unwind_GetLanguageSpecificData (struct _Unwind_Context*);
-extern unsigned long _Unwind_GetRegionStart (struct _Unwind_Context *);
-
-#ifdef _GNU_SOURCE
-
-/* Callback for _Unwind_Backtrace(). The backtrace stops immediately
- if the callback returns any value other than _URC_NO_REASON. */
-typedef _Unwind_Reason_Code (*_Unwind_Trace_Fn) (struct _Unwind_Context *,
- void *);
-
-/* See http://gcc.gnu.org/ml/gcc-patches/2001-09/msg00082.html for why
- _UA_END_OF_STACK exists. */
-# define _UA_END_OF_STACK 16
-
-/* If the unwind was initiated due to a forced unwind, resume that
- operation, else re-raise the exception. This is used by
- __cxa_rethrow(). */
-extern _Unwind_Reason_Code
- _Unwind_Resume_or_Rethrow (struct _Unwind_Exception *);
-
-/* See http://gcc.gnu.org/ml/gcc-patches/2003-09/msg00154.html for why
- _Unwind_GetBSP() exists. */
-extern unsigned long _Unwind_GetBSP (struct _Unwind_Context *);
-
-/* Return the "canonical frame address" for the given context.
- This is used by NPTL... */
-extern unsigned long _Unwind_GetCFA (struct _Unwind_Context *);
-
-/* Return the base-address for data references. */
-extern unsigned long _Unwind_GetDataRelBase (struct _Unwind_Context *);
-
-/* Return the base-address for text references. */
-extern unsigned long _Unwind_GetTextRelBase (struct _Unwind_Context *);
-
-/* Call _Unwind_Trace_Fn once for each stack-frame, without doing any
- cleanup. The first frame for which the callback is invoked is the
- one for the caller of _Unwind_Backtrace(). _Unwind_Backtrace()
- returns _URC_END_OF_STACK when the backtrace stopped due to
- reaching the end of the call-chain or _URC_FATAL_PHASE1_ERROR if it
- stops for any other reason. */
-extern _Unwind_Reason_Code _Unwind_Backtrace (_Unwind_Trace_Fn, void *);
-
-/* Find the start-address of the procedure containing the specified IP
- or NULL if it cannot be found (e.g., because the function has no
- unwind info). Note: there is not necessarily a one-to-one
- correspondence between source-level functions and procedures: some
- functions don't have unwind-info and others are split into multiple
- procedures. */
-extern void *_Unwind_FindEnclosingFunction (void *);
-
-/* See also Linux Standard Base Spec:
- http://www.linuxbase.org/spec/refspecs/LSB_1.3.0/gLSB/gLSB/libgcc-s.html */
-
-#endif /* _GNU_SOURCE */
-
-#ifdef __cplusplus
-};
-#endif
-
-#endif /* _UNWIND_H */
diff --git a/system/lib/compiler-rt/int_endianness.h b/system/lib/compiler-rt/int_endianness.h
index 17905355..fa294c49 100644
--- a/system/lib/compiler-rt/int_endianness.h
+++ b/system/lib/compiler-rt/int_endianness.h
@@ -100,7 +100,7 @@
#endif /* Windows */
-#if defined(EMSCRIPTEN)
+#if defined(__EMSCRIPTEN__)
#define _YUGA_LITTLE_ENDIAN 1
#define _YUGA_BIG_ENDIAN 0
diff --git a/system/lib/dlmalloc.c b/system/lib/dlmalloc.c
index ce2c25f1..04e9e47b 100644
--- a/system/lib/dlmalloc.c
+++ b/system/lib/dlmalloc.c
@@ -1,6 +1,6 @@
/* XXX Emscripten XXX */
-#if EMSCRIPTEN
+#if __EMSCRIPTEN__
#define DLMALLOC_EXPORT __attribute__((__weak__, __visibility__("default")))
/* mmap uses malloc, so malloc can't use mmap */
#define HAVE_MMAP 0
diff --git a/system/lib/embind/bind.cpp b/system/lib/embind/bind.cpp
index 12264dfd..37918050 100644
--- a/system/lib/embind/bind.cpp
+++ b/system/lib/embind/bind.cpp
@@ -8,31 +8,52 @@
#include <algorithm>
#include <emscripten/emscripten.h>
#include <climits>
+#include <limits>
using namespace emscripten;
extern "C" {
const char* __attribute__((used)) __getTypeName(const std::type_info* ti) {
+ if (has_unbound_type_names) {
#ifdef USE_CXA_DEMANGLE
- int stat;
- char* demangled = abi::__cxa_demangle(ti->name(), NULL, NULL, &stat);
- if (stat == 0 && demangled) {
- return demangled;
- }
+ int stat;
+ char* demangled = abi::__cxa_demangle(ti->name(), NULL, NULL, &stat);
+ if (stat == 0 && demangled) {
+ return demangled;
+ }
- switch (stat) {
- case -1:
- return strdup("<allocation failure>");
- case -2:
- return strdup("<invalid C++ symbol>");
- case -3:
- return strdup("<invalid argument>");
- default:
- return strdup("<unknown error>");
- }
+ switch (stat) {
+ case -1:
+ return strdup("<allocation failure>");
+ case -2:
+ return strdup("<invalid C++ symbol>");
+ case -3:
+ return strdup("<invalid argument>");
+ default:
+ return strdup("<unknown error>");
+ }
#else
- return strdup(ti->name());
+ return strdup(ti->name());
#endif
+ } else {
+ char str[80];
+ sprintf(str, "%p", ti);
+ return strdup(str);
+ }
+ }
+}
+
+namespace {
+ template<typename T>
+ static void register_integer(const char* name) {
+ using namespace internal;
+ _embind_register_integer(TypeID<T>::get(), name, sizeof(T), std::numeric_limits<T>::min(), std::numeric_limits<T>::max());
+ }
+
+ template<typename T>
+ static void register_float(const char* name) {
+ using namespace internal;
+ _embind_register_float(TypeID<T>::get(), name, sizeof(T));
}
}
@@ -41,20 +62,20 @@ EMSCRIPTEN_BINDINGS(native_and_builtin_types) {
_embind_register_void(TypeID<void>::get(), "void");
- _embind_register_bool(TypeID<bool>::get(), "bool", true, false);
-
- _embind_register_integer(TypeID<char>::get(), "char", CHAR_MIN, CHAR_MAX);
- _embind_register_integer(TypeID<signed char>::get(), "signed char", SCHAR_MIN, SCHAR_MAX);
- _embind_register_integer(TypeID<unsigned char>::get(), "unsigned char", 0, UCHAR_MAX);
- _embind_register_integer(TypeID<signed short>::get(), "short", SHRT_MIN, SHRT_MAX);
- _embind_register_integer(TypeID<unsigned short>::get(), "unsigned short", 0, USHRT_MAX);
- _embind_register_integer(TypeID<signed int>::get(), "int", INT_MIN, INT_MAX);
- _embind_register_integer(TypeID<unsigned int>::get(), "unsigned int", 0, UINT_MAX);
- _embind_register_integer(TypeID<signed long>::get(), "long", LONG_MIN, LONG_MAX);
- _embind_register_integer(TypeID<unsigned long>::get(), "unsigned long", 0, ULONG_MAX);
+ _embind_register_bool(TypeID<bool>::get(), "bool", sizeof(bool), true, false);
+
+ register_integer<char>("char");
+ register_integer<signed char>("signed char");
+ register_integer<unsigned char>("unsigned char");
+ register_integer<signed short>("short");
+ register_integer<unsigned short>("unsigned short");
+ register_integer<signed int>("int");
+ register_integer<unsigned int>("unsigned int");
+ register_integer<signed long>("long");
+ register_integer<unsigned long>("unsigned long");
- _embind_register_float(TypeID<float>::get(), "float");
- _embind_register_float(TypeID<double>::get(), "double");
+ register_float<float>("float");
+ register_float<double>("double");
_embind_register_std_string(TypeID<std::string>::get(), "std::string");
_embind_register_std_wstring(TypeID<std::wstring>::get(), sizeof(wchar_t), "std::wstring");
diff --git a/system/lib/libc.symbols b/system/lib/libc.symbols
index 53a27082..eb2053ce 100644
--- a/system/lib/libc.symbols
+++ b/system/lib/libc.symbols
@@ -50,6 +50,8 @@
T __towrite
T __uflow
T atof
+ T atoi
+ T atol
W bulk_free
W calloc
W free
diff --git a/system/lib/libc/musl/arch/js/atomic.h b/system/lib/libc/musl/arch/js/atomic.h
new file mode 100644
index 00000000..07d5d4b6
--- /dev/null
+++ b/system/lib/libc/musl/arch/js/atomic.h
@@ -0,0 +1,103 @@
+#ifndef _INTERNAL_ATOMIC_H
+#define _INTERNAL_ATOMIC_H
+
+#include <stdint.h>
+
+static inline int a_ctz_l(unsigned long x)
+{
+ if (x == 0)
+ return 32;
+ int nTrailingZeros = 0;
+ while(!(x&1))
+ {
+ ++nTrailingZeros;
+ x >>= 1;
+ }
+ return nTrailingZeros;
+}
+
+static inline int a_ctz_64(uint64_t x)
+{
+ uint32_t lo = (uint32_t)x;
+ if (lo == 0)
+ return a_ctz_l((unsigned long)(x >> 32)) + 32;
+ else
+ return a_ctz_l((unsigned long)lo);
+}
+
+static inline void a_and_64(volatile uint64_t *p, uint64_t v)
+{
+ *p &= v;
+}
+
+static inline void a_or_64(volatile uint64_t *p, uint64_t v)
+{
+ *p |= v;
+}
+
+static inline void a_store_l(volatile void *p, long x)
+{
+ *(long*)p = x;
+}
+
+static inline void a_or_l(volatile void *p, long v)
+{
+ *(long*)p |= v;
+}
+
+static inline void *a_cas_p(volatile void *p, void *t, void *s)
+{
+ if (*(long*)p == t)
+ *(long*)p = s;
+ return t;
+}
+
+static inline long a_cas_l(volatile void *p, long t, long s)
+{
+ if (*(long*)p == t)
+ *(long*)p = s;
+ return t;
+}
+
+static inline int a_cas(volatile int *p, int t, int s)
+{
+ if (*p == t)
+ *p = s;
+ return t;
+}
+
+static inline void a_or(volatile void *p, int v)
+{
+ *(int*)p |= v;
+}
+
+static inline void a_and(volatile void *p, int v)
+{
+ *(int*)p &= v;
+}
+
+static inline void a_inc(volatile int *x)
+{
+ ++*x;
+}
+
+static inline void a_dec(volatile int *x)
+{
+ --*x;
+}
+
+static inline void a_store(volatile int *p, int x)
+{
+ *p = x;
+}
+
+static inline void a_spin()
+{
+}
+
+static inline void a_crash()
+{
+}
+
+
+#endif
diff --git a/system/lib/libc/musl/src/stdlib/atoi.c b/system/lib/libc/musl/src/stdlib/atoi.c
new file mode 100644
index 00000000..9baca7b8
--- /dev/null
+++ b/system/lib/libc/musl/src/stdlib/atoi.c
@@ -0,0 +1,16 @@
+#include <stdlib.h>
+#include <ctype.h>
+
+int atoi(const char *s)
+{
+ int n=0, neg=0;
+ while (isspace(*s)) s++;
+ switch (*s) {
+ case '-': neg=1;
+ case '+': s++;
+ }
+ /* Compute n as a negative number to avoid overflow on INT_MIN */
+ while (isdigit(*s))
+ n = 10*n - (*s++ - '0');
+ return neg ? n : -n;
+}
diff --git a/system/lib/libc/musl/src/stdlib/atol.c b/system/lib/libc/musl/src/stdlib/atol.c
new file mode 100644
index 00000000..140ea3ea
--- /dev/null
+++ b/system/lib/libc/musl/src/stdlib/atol.c
@@ -0,0 +1,17 @@
+#include <stdlib.h>
+#include <ctype.h>
+
+long atol(const char *s)
+{
+ long n=0;
+ int neg=0;
+ while (isspace(*s)) s++;
+ switch (*s) {
+ case '-': neg=1;
+ case '+': s++;
+ }
+ /* Compute n as a negative number to avoid overflow on LONG_MIN */
+ while (isdigit(*s))
+ n = 10*n - (*s++ - '0');
+ return neg ? n : -n;
+}
diff --git a/system/lib/libc/musl/src/stdlib/atoll.c b/system/lib/libc/musl/src/stdlib/atoll.c
new file mode 100644
index 00000000..b6930489
--- /dev/null
+++ b/system/lib/libc/musl/src/stdlib/atoll.c
@@ -0,0 +1,17 @@
+#include <stdlib.h>
+#include <ctype.h>
+
+long long atoll(const char *s)
+{
+ long long n=0;
+ int neg=0;
+ while (isspace(*s)) s++;
+ switch (*s) {
+ case '-': neg=1;
+ case '+': s++;
+ }
+ /* Compute n as a negative number to avoid overflow on LLONG_MIN */
+ while (isdigit(*s))
+ n = 10*n - (*s++ - '0');
+ return neg ? n : -n;
+}
diff --git a/system/lib/libc/musl/src/stdlib/bsearch.c b/system/lib/libc/musl/src/stdlib/bsearch.c
new file mode 100644
index 00000000..61d89367
--- /dev/null
+++ b/system/lib/libc/musl/src/stdlib/bsearch.c
@@ -0,0 +1,20 @@
+#include <stdlib.h>
+
+void *bsearch(const void *key, const void *base, size_t nel, size_t width, int (*cmp)(const void *, const void *))
+{
+ void *try;
+ int sign;
+ while (nel > 0) {
+ try = (char *)base + width*(nel/2);
+ sign = cmp(key, try);
+ if (!sign) return try;
+ else if (nel == 1) break;
+ else if (sign < 0)
+ nel /= 2;
+ else {
+ base = try;
+ nel -= nel/2;
+ }
+ }
+ return NULL;
+}
diff --git a/system/lib/libc/musl/src/stdlib/qsort.c b/system/lib/libc/musl/src/stdlib/qsort.c
new file mode 100644
index 00000000..434d9350
--- /dev/null
+++ b/system/lib/libc/musl/src/stdlib/qsort.c
@@ -0,0 +1,215 @@
+/* Copyright (C) 2011 by Valentin Ochs
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+/* Minor changes by Rich Felker for integration in musl, 2011-04-27. */
+
+#include <stdint.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "atomic.h"
+#define ntz(x) a_ctz_l((x))
+
+typedef int (*cmpfun)(const void *, const void *);
+
+static inline int pntz(size_t p[2]) {
+ int r = ntz(p[0] - 1);
+ if(r != 0 || (r = 8*sizeof(size_t) + ntz(p[1])) != 8*sizeof(size_t)) {
+ return r;
+ }
+ return 0;
+}
+
+static void cycle(size_t width, unsigned char* ar[], int n)
+{
+ unsigned char tmp[256];
+ size_t l;
+ int i;
+
+ if(n < 2) {
+ return;
+ }
+
+ ar[n] = tmp;
+ while(width) {
+ l = sizeof(tmp) < width ? sizeof(tmp) : width;
+ memcpy(ar[n], ar[0], l);
+ for(i = 0; i < n; i++) {
+ memcpy(ar[i], ar[i + 1], l);
+ ar[i] += l;
+ }
+ width -= l;
+ }
+}
+
+/* shl() and shr() need n > 0 */
+static inline void shl(size_t p[2], int n)
+{
+ if(n >= 8 * sizeof(size_t)) {
+ n -= 8 * sizeof(size_t);
+ p[1] = p[0];
+ p[0] = 0;
+ }
+ p[1] <<= n;
+ p[1] |= p[0] >> (sizeof(size_t) * 8 - n);
+ p[0] <<= n;
+}
+
+static inline void shr(size_t p[2], int n)
+{
+ if(n >= 8 * sizeof(size_t)) {
+ n -= 8 * sizeof(size_t);
+ p[0] = p[1];
+ p[1] = 0;
+ }
+ p[0] >>= n;
+ p[0] |= p[1] << (sizeof(size_t) * 8 - n);
+ p[1] >>= n;
+}
+
+static void sift(unsigned char *head, size_t width, cmpfun cmp, int pshift, size_t lp[])
+{
+ unsigned char *rt, *lf;
+ unsigned char *ar[14 * sizeof(size_t) + 1];
+ int i = 1;
+
+ ar[0] = head;
+ while(pshift > 1) {
+ rt = head - width;
+ lf = head - width - lp[pshift - 2];
+
+ if((*cmp)(ar[0], lf) >= 0 && (*cmp)(ar[0], rt) >= 0) {
+ break;
+ }
+ if((*cmp)(lf, rt) >= 0) {
+ ar[i++] = lf;
+ head = lf;
+ pshift -= 1;
+ } else {
+ ar[i++] = rt;
+ head = rt;
+ pshift -= 2;
+ }
+ }
+ cycle(width, ar, i);
+}
+
+static void trinkle(unsigned char *head, size_t width, cmpfun cmp, size_t pp[2], int pshift, int trusty, size_t lp[])
+{
+ unsigned char *stepson,
+ *rt, *lf;
+ size_t p[2];
+ unsigned char *ar[14 * sizeof(size_t) + 1];
+ int i = 1;
+ int trail;
+
+ p[0] = pp[0];
+ p[1] = pp[1];
+
+ ar[0] = head;
+ while(p[0] != 1 || p[1] != 0) {
+ stepson = head - lp[pshift];
+ if((*cmp)(stepson, ar[0]) <= 0) {
+ break;
+ }
+ if(!trusty && pshift > 1) {
+ rt = head - width;
+ lf = head - width - lp[pshift - 2];
+ if((*cmp)(rt, stepson) >= 0 || (*cmp)(lf, stepson) >= 0) {
+ break;
+ }
+ }
+
+ ar[i++] = stepson;
+ head = stepson;
+ trail = pntz(p);
+ shr(p, trail);
+ pshift += trail;
+ trusty = 0;
+ }
+ if(!trusty) {
+ cycle(width, ar, i);
+ sift(head, width, cmp, pshift, lp);
+ }
+}
+
+void qsort(void *base, size_t nel, size_t width, cmpfun cmp)
+{
+ size_t lp[12*sizeof(size_t)];
+ size_t i, size = width * nel;
+ unsigned char *head, *high;
+ size_t p[2] = {1, 0};
+ int pshift = 1;
+ int trail;
+
+ if (!size) return;
+
+ head = base;
+ high = head + size - width;
+
+ /* Precompute Leonardo numbers, scaled by element width */
+ for(lp[0]=lp[1]=width, i=2; (lp[i]=lp[i-2]+lp[i-1]+width) < size; i++);
+
+ while(head < high) {
+ if((p[0] & 3) == 3) {
+ sift(head, width, cmp, pshift, lp);
+ shr(p, 2);
+ pshift += 2;
+ } else {
+ if(lp[pshift - 1] >= high - head) {
+ trinkle(head, width, cmp, p, pshift, 0, lp);
+ } else {
+ sift(head, width, cmp, pshift, lp);
+ }
+
+ if(pshift == 1) {
+ shl(p, 1);
+ pshift = 0;
+ } else {
+ shl(p, pshift - 1);
+ pshift = 1;
+ }
+ }
+
+ p[0] |= 1;
+ head += width;
+ }
+
+ trinkle(head, width, cmp, p, pshift, 0, lp);
+
+ while(pshift != 1 || p[0] != 1 || p[1] != 0) {
+ if(pshift <= 1) {
+ trail = pntz(p);
+ shr(p, trail);
+ pshift += trail;
+ } else {
+ shl(p, 2);
+ pshift -= 2;
+ p[0] ^= 7;
+ shr(p, 1);
+ trinkle(head - lp[pshift] - width, width, cmp, p, pshift + 1, 1, lp);
+ shl(p, 1);
+ p[0] |= 1;
+ trinkle(head - width, width, cmp, p, pshift, 1, lp);
+ }
+ head -= width;
+ }
+}
diff --git a/system/lib/libc/musl/src/string/bcmp.c b/system/lib/libc/musl/src/string/bcmp.c
new file mode 100644
index 00000000..5d6a388b
--- /dev/null
+++ b/system/lib/libc/musl/src/string/bcmp.c
@@ -0,0 +1,7 @@
+#include <string.h>
+#include <strings.h>
+
+int bcmp(const void *s1, const void *s2, size_t n)
+{
+ return memcmp(s1, s2, n);
+}
diff --git a/system/lib/libc/musl/src/string/bcopy.c b/system/lib/libc/musl/src/string/bcopy.c
new file mode 100644
index 00000000..e76272fc
--- /dev/null
+++ b/system/lib/libc/musl/src/string/bcopy.c
@@ -0,0 +1,7 @@
+#include <string.h>
+#include <strings.h>
+
+void bcopy(const void *s1, void *s2, size_t n)
+{
+ memmove(s2, s1, n);
+}
diff --git a/system/lib/libc/musl/src/string/bzero.c b/system/lib/libc/musl/src/string/bzero.c
new file mode 100644
index 00000000..0f98b4a5
--- /dev/null
+++ b/system/lib/libc/musl/src/string/bzero.c
@@ -0,0 +1,7 @@
+#include <string.h>
+#include <strings.h>
+
+void bzero(void *s, size_t n)
+{
+ memset(s, 0, n);
+}
diff --git a/system/lib/libc/musl/src/string/index.c b/system/lib/libc/musl/src/string/index.c
new file mode 100644
index 00000000..dd611251
--- /dev/null
+++ b/system/lib/libc/musl/src/string/index.c
@@ -0,0 +1,7 @@
+#include <string.h>
+#include <strings.h>
+
+char *index(const char *s, int c)
+{
+ return strchr(s, c);
+}
diff --git a/system/lib/libc/musl/src/string/memchr.c b/system/lib/libc/musl/src/string/memchr.c
new file mode 100644
index 00000000..a0472f78
--- /dev/null
+++ b/system/lib/libc/musl/src/string/memchr.c
@@ -0,0 +1,24 @@
+#include <string.h>
+#include <stdlib.h>
+#include <stdint.h>
+#include <limits.h>
+
+#define SS (sizeof(size_t))
+#define ALIGN (sizeof(size_t)-1)
+#define ONES ((size_t)-1/UCHAR_MAX)
+#define HIGHS (ONES * (UCHAR_MAX/2+1))
+#define HASZERO(x) ((x)-ONES & ~(x) & HIGHS)
+
+void *memchr(const void *src, int c, size_t n)
+{
+ const unsigned char *s = src;
+ c = (unsigned char)c;
+ for (; ((uintptr_t)s & ALIGN) && n && *s != c; s++, n--);
+ if (n && *s != c) {
+ const size_t *w;
+ size_t k = ONES * c;
+ for (w = (const void *)s; n>=SS && !HASZERO(*w^k); w++, n-=SS);
+ for (s = (const void *)w; n && *s != c; s++, n--);
+ }
+ return n ? (void *)s : 0;
+}
diff --git a/system/lib/libc/musl/src/string/rindex.c b/system/lib/libc/musl/src/string/rindex.c
new file mode 100644
index 00000000..17df2bf2
--- /dev/null
+++ b/system/lib/libc/musl/src/string/rindex.c
@@ -0,0 +1,7 @@
+#include <string.h>
+#include <strings.h>
+
+char *rindex(const char *s, int c)
+{
+ return strrchr(s, c);
+}
diff --git a/system/lib/libc/musl/src/string/stpcpy.c b/system/lib/libc/musl/src/string/stpcpy.c
new file mode 100644
index 00000000..feb9eb81
--- /dev/null
+++ b/system/lib/libc/musl/src/string/stpcpy.c
@@ -0,0 +1,29 @@
+#include <string.h>
+#include <stdlib.h>
+#include <stdint.h>
+#include <limits.h>
+#include "libc.h"
+
+#define ALIGN (sizeof(size_t))
+#define ONES ((size_t)-1/UCHAR_MAX)
+#define HIGHS (ONES * (UCHAR_MAX/2+1))
+#define HASZERO(x) ((x)-ONES & ~(x) & HIGHS)
+
+char *__stpcpy(char *restrict d, const char *restrict s)
+{
+ size_t *wd;
+ const size_t *ws;
+
+ if ((uintptr_t)s % ALIGN == (uintptr_t)d % ALIGN) {
+ for (; (uintptr_t)s % ALIGN; s++, d++)
+ if (!(*d=*s)) return d;
+ wd=(void *)d; ws=(const void *)s;
+ for (; !HASZERO(*ws); *wd++ = *ws++);
+ d=(void *)wd; s=(const void *)ws;
+ }
+ for (; (*d=*s); s++, d++);
+
+ return d;
+}
+
+weak_alias(__stpcpy, stpcpy);
diff --git a/system/lib/libc/musl/src/string/strchr.c b/system/lib/libc/musl/src/string/strchr.c
new file mode 100644
index 00000000..bfae8f9f
--- /dev/null
+++ b/system/lib/libc/musl/src/string/strchr.c
@@ -0,0 +1,9 @@
+#include <string.h>
+
+char *__strchrnul(const char *, int);
+
+char *strchr(const char *s, int c)
+{
+ char *r = __strchrnul(s, c);
+ return *(unsigned char *)r == (unsigned char)c ? r : 0;
+}
diff --git a/system/lib/libc/musl/src/string/strcspn.c b/system/lib/libc/musl/src/string/strcspn.c
new file mode 100644
index 00000000..cfdba114
--- /dev/null
+++ b/system/lib/libc/musl/src/string/strcspn.c
@@ -0,0 +1,19 @@
+#include <string.h>
+
+#define BITOP(a,b,op) \
+ ((a)[(size_t)(b)/(8*sizeof *(a))] op (size_t)1<<((size_t)(b)%(8*sizeof *(a))))
+
+char *__strchrnul(const char *, int);
+
+size_t strcspn(const char *s, const char *c)
+{
+ const char *a = s;
+ size_t byteset[32/sizeof(size_t)];
+
+ if (!c[0] || !c[1]) return __strchrnul(s, *c)-a;
+
+ memset(byteset, 0, sizeof byteset);
+ for (; *c && BITOP(byteset, *(unsigned char *)c, |=); c++);
+ for (; *s && !BITOP(byteset, *(unsigned char *)s, &); s++);
+ return s-a;
+}
diff --git a/system/lib/libc/musl/src/string/strdup.c b/system/lib/libc/musl/src/string/strdup.c
new file mode 100644
index 00000000..dd5f80c1
--- /dev/null
+++ b/system/lib/libc/musl/src/string/strdup.c
@@ -0,0 +1,13 @@
+#include <stdlib.h>
+#include <string.h>
+#include "libc.h"
+
+char *__strdup(const char *s)
+{
+ size_t l = strlen(s);
+ char *d = malloc(l+1);
+ if (!d) return NULL;
+ return memcpy(d, s, l+1);
+}
+
+weak_alias(__strdup, strdup);
diff --git a/system/lib/libc/musl/src/string/strncat.c b/system/lib/libc/musl/src/string/strncat.c
new file mode 100644
index 00000000..01ca2a23
--- /dev/null
+++ b/system/lib/libc/musl/src/string/strncat.c
@@ -0,0 +1,10 @@
+#include <string.h>
+
+char *strncat(char *restrict d, const char *restrict s, size_t n)
+{
+ char *a = d;
+ d += strlen(d);
+ while (n && *s) n--, *d++ = *s++;
+ *d++ = 0;
+ return a;
+}
diff --git a/system/lib/libc/musl/src/string/strndup.c b/system/lib/libc/musl/src/string/strndup.c
new file mode 100644
index 00000000..617d27ba
--- /dev/null
+++ b/system/lib/libc/musl/src/string/strndup.c
@@ -0,0 +1,12 @@
+#include <stdlib.h>
+#include <string.h>
+
+char *strndup(const char *s, size_t n)
+{
+ size_t l = strnlen(s, n);
+ char *d = malloc(l+1);
+ if (!d) return NULL;
+ memcpy(d, s, l);
+ d[l] = 0;
+ return d;
+}
diff --git a/system/lib/libc/musl/src/string/strnlen.c b/system/lib/libc/musl/src/string/strnlen.c
new file mode 100644
index 00000000..6442eb79
--- /dev/null
+++ b/system/lib/libc/musl/src/string/strnlen.c
@@ -0,0 +1,7 @@
+#include <string.h>
+
+size_t strnlen(const char *s, size_t n)
+{
+ const char *p = memchr(s, 0, n);
+ return p ? p-s : n;
+}
diff --git a/system/lib/libc/musl/src/string/strpbrk.c b/system/lib/libc/musl/src/string/strpbrk.c
new file mode 100644
index 00000000..55947c64
--- /dev/null
+++ b/system/lib/libc/musl/src/string/strpbrk.c
@@ -0,0 +1,7 @@
+#include <string.h>
+
+char *strpbrk(const char *s, const char *b)
+{
+ s += strcspn(s, b);
+ return *s ? (char *)s : 0;
+}
diff --git a/system/lib/libc/musl/src/string/strrchr.c b/system/lib/libc/musl/src/string/strrchr.c
new file mode 100644
index 00000000..635fb3c1
--- /dev/null
+++ b/system/lib/libc/musl/src/string/strrchr.c
@@ -0,0 +1,8 @@
+#include <string.h>
+
+void *__memrchr(const void *, int, size_t);
+
+char *strrchr(const char *s, int c)
+{
+ return __memrchr(s, c, strlen(s) + 1);
+}
diff --git a/system/lib/libc/musl/src/string/strspn.c b/system/lib/libc/musl/src/string/strspn.c
new file mode 100644
index 00000000..9543dad0
--- /dev/null
+++ b/system/lib/libc/musl/src/string/strspn.c
@@ -0,0 +1,20 @@
+#include <string.h>
+
+#define BITOP(a,b,op) \
+ ((a)[(size_t)(b)/(8*sizeof *(a))] op (size_t)1<<((size_t)(b)%(8*sizeof *(a))))
+
+size_t strspn(const char *s, const char *c)
+{
+ const char *a = s;
+ size_t byteset[32/sizeof(size_t)] = { 0 };
+
+ if (!c[0]) return 0;
+ if (!c[1]) {
+ for (; *s == *c; s++);
+ return s-a;
+ }
+
+ for (; *c && BITOP(byteset, *(unsigned char *)c, |=); c++);
+ for (; *s && BITOP(byteset, *(unsigned char *)s, &); s++);
+ return s-a;
+}
diff --git a/system/lib/libc/musl/src/string/strstr.c b/system/lib/libc/musl/src/string/strstr.c
new file mode 100644
index 00000000..06491748
--- /dev/null
+++ b/system/lib/libc/musl/src/string/strstr.c
@@ -0,0 +1,156 @@
+#include <string.h>
+#include <stdlib.h>
+#include <stdint.h>
+
+static char *twobyte_strstr(const unsigned char *h, const unsigned char *n)
+{
+ uint16_t nw = n[0]<<8 | n[1], hw = h[0]<<8 | h[1];
+ for (h++; *h && hw != nw; hw = hw<<8 | *++h);
+ return *h ? (char *)h-1 : 0;
+}
+
+static char *threebyte_strstr(const unsigned char *h, const unsigned char *n)
+{
+ uint32_t nw = n[0]<<24 | n[1]<<16 | n[2]<<8;
+ uint32_t hw = h[0]<<24 | h[1]<<16 | h[2]<<8;
+ for (h+=2; *h && hw != nw; hw = (hw|*++h)<<8);
+ return *h ? (char *)h-2 : 0;
+}
+
+static char *fourbyte_strstr(const unsigned char *h, const unsigned char *n)
+{
+ uint32_t nw = n[0]<<24 | n[1]<<16 | n[2]<<8 | n[3];
+ uint32_t hw = h[0]<<24 | h[1]<<16 | h[2]<<8 | h[3];
+ for (h+=3; *h && hw != nw; hw = hw<<8 | *++h);
+ return *h ? (char *)h-3 : 0;
+}
+
+#define MAX(a,b) ((a)>(b)?(a):(b))
+#define MIN(a,b) ((a)<(b)?(a):(b))
+
+#define BITOP(a,b,op) \
+ ((a)[(size_t)(b)/(8*sizeof *(a))] op (size_t)1<<((size_t)(b)%(8*sizeof *(a))))
+
+static char *twoway_strstr(const unsigned char *h, const unsigned char *n)
+{
+ const unsigned char *z;
+ size_t l, ip, jp, k, p, ms, p0, mem, mem0;
+ size_t byteset[32 / sizeof(size_t)] = { 0 };
+ size_t shift[256];
+
+ /* Computing length of needle and fill shift table */
+ for (l=0; n[l] && h[l]; l++)
+ BITOP(byteset, n[l], |=), shift[n[l]] = l+1;
+ if (n[l]) return 0; /* hit the end of h */
+
+ /* Compute maximal suffix */
+ ip = -1; jp = 0; k = p = 1;
+ while (jp+k<l) {
+ if (n[ip+k] == n[jp+k]) {
+ if (k == p) {
+ jp += p;
+ k = 1;
+ } else k++;
+ } else if (n[ip+k] > n[jp+k]) {
+ jp += k;
+ k = 1;
+ p = jp - ip;
+ } else {
+ ip = jp++;
+ k = p = 1;
+ }
+ }
+ ms = ip;
+ p0 = p;
+
+ /* And with the opposite comparison */
+ ip = -1; jp = 0; k = p = 1;
+ while (jp+k<l) {
+ if (n[ip+k] == n[jp+k]) {
+ if (k == p) {
+ jp += p;
+ k = 1;
+ } else k++;
+ } else if (n[ip+k] < n[jp+k]) {
+ jp += k;
+ k = 1;
+ p = jp - ip;
+ } else {
+ ip = jp++;
+ k = p = 1;
+ }
+ }
+ if (ip+1 > ms+1) ms = ip;
+ else p = p0;
+
+ /* Periodic needle? */
+ if (memcmp(n, n+p, ms+1)) {
+ mem0 = 0;
+ p = MAX(ms, l-ms-1) + 1;
+ } else mem0 = l-p;
+ mem = 0;
+
+ /* Initialize incremental end-of-haystack pointer */
+ z = h;
+
+ /* Search loop */
+ for (;;) {
+ /* Update incremental end-of-haystack pointer */
+ if (z-h < l) {
+ /* Fast estimate for MIN(l,63) */
+ size_t grow = l | 63;
+ const unsigned char *z2 = memchr(z, 0, grow);
+ if (z2) {
+ z = z2;
+ if (z-h < l) return 0;
+ } else z += grow;
+ }
+
+ /* Check last byte first; advance by shift on mismatch */
+ if (BITOP(byteset, h[l-1], &)) {
+ k = l-shift[h[l-1]];
+ //printf("adv by %zu (on %c) at [%s] (%zu;l=%zu)\n", k, h[l-1], h, shift[h[l-1]], l);
+ if (k) {
+ if (mem0 && mem && k < p) k = l-p;
+ h += k;
+ mem = 0;
+ continue;
+ }
+ } else {
+ h += l;
+ mem = 0;
+ continue;
+ }
+
+ /* Compare right half */
+ for (k=MAX(ms+1,mem); n[k] && n[k] == h[k]; k++);
+ if (n[k]) {
+ h += k-ms;
+ mem = 0;
+ continue;
+ }
+ /* Compare left half */
+ for (k=ms+1; k>mem && n[k-1] == h[k-1]; k--);
+ if (k == mem) return (char *)h;
+ h += p;
+ mem = mem0;
+ }
+}
+
+char *strstr(const char *h, const char *n)
+{
+ /* Return immediately on empty needle */
+ if (!n[0]) return (char *)h;
+
+ /* Use faster algorithms for short needles */
+ h = strchr(h, *n);
+ if (!h || !n[1]) return (char *)h;
+ if (!h[1]) return 0;
+ if (!n[2]) return twobyte_strstr((void *)h, (void *)n);
+ if (!h[2]) return 0;
+ if (!n[3]) return threebyte_strstr((void *)h, (void *)n);
+ if (!h[3]) return 0;
+ if (!n[4]) return fourbyte_strstr((void *)h, (void *)n);
+
+ return twoway_strstr((void *)h, (void *)n);
+}
diff --git a/system/lib/libc/musl/src/string/strtok.c b/system/lib/libc/musl/src/string/strtok.c
new file mode 100644
index 00000000..35087902
--- /dev/null
+++ b/system/lib/libc/musl/src/string/strtok.c
@@ -0,0 +1,13 @@
+#include <string.h>
+
+char *strtok(char *restrict s, const char *restrict sep)
+{
+ static char *p;
+ if (!s && !(s = p)) return NULL;
+ s += strspn(s, sep);
+ if (!*s) return p = 0;
+ p = s + strcspn(s, sep);
+ if (*p) *p++ = 0;
+ else p = 0;
+ return s;
+}
diff --git a/system/lib/libc/musl/src/string/strtok_r.c b/system/lib/libc/musl/src/string/strtok_r.c
new file mode 100644
index 00000000..862d4fe4
--- /dev/null
+++ b/system/lib/libc/musl/src/string/strtok_r.c
@@ -0,0 +1,12 @@
+#include <string.h>
+
+char *strtok_r(char *restrict s, const char *restrict sep, char **restrict p)
+{
+ if (!s && !(s = *p)) return NULL;
+ s += strspn(s, sep);
+ if (!*s) return *p = 0;
+ *p = s + strcspn(s, sep);
+ if (**p) *(*p)++ = 0;
+ else *p = 0;
+ return s;
+}
diff --git a/system/lib/libcextra.symbols b/system/lib/libcextra.symbols
index 54176b1d..64ba670a 100644
--- a/system/lib/libcextra.symbols
+++ b/system/lib/libcextra.symbols
@@ -22,6 +22,11 @@
T __wcscoll_l
T __wcsxfrm_l
W __wctype_l
+ T atoll
+ T bcmp
+ T bcopy
+ T bzero
+ T bsearch
T btowc
T ecvt
T err
@@ -40,6 +45,7 @@
T ilogb
T ilogbf
T ilogbl
+ T index
T iswalnum
T iswalnum_l
T iswalpha
@@ -87,6 +93,7 @@
T mbstowcs
T mbtowc
T memccpy
+ T memchr
T memmem
T mempcpy
W memrchr
@@ -96,21 +103,36 @@
C optopt
W optreset
W putwc_unlocked
+ T qsort
T regcomp
T regerror
T regexec
T regfree
+ T rindex
T scalbnf
D signgam
+ T stpcpy
T strcasecmp_l
T strcasestr
W strchrnul
+ T strchr
+ T strcspn
+ T strdup
T strfmon
T strfmon_l
T strlcat
T strlcpy
T strncasecmp_l
+ T strncat
+ T strndup
+ T strnlen
+ T strpbrk
+ T strrchr
T strsep
+ T strspn
+ T strstr
+ T strtok
+ T strtok_r
T strverscmp
T strxfrm
W strxfrm_l
diff --git a/tests/799.cpp b/tests/799.cpp
index 6c4c9b18..aa3213af 100644
--- a/tests/799.cpp
+++ b/tests/799.cpp
@@ -6,7 +6,7 @@
#include <sys/socket.h>
#include <netinet/in.h>
-#ifdef EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
#include <arpa/inet.h>
#endif
diff --git a/tests/aniso.c b/tests/aniso.c
index 443e50aa..b925149d 100644
--- a/tests/aniso.c
+++ b/tests/aniso.c
@@ -208,7 +208,7 @@ int main(int argc, char *argv[])
*/
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
// Wait for 3 seconds to give us a chance to see the image
SDL_Delay(2000);
#endif
diff --git a/tests/asmjs-unknown-emscripten.c b/tests/asmjs-unknown-emscripten.c
new file mode 100644
index 00000000..36071964
--- /dev/null
+++ b/tests/asmjs-unknown-emscripten.c
@@ -0,0 +1,98 @@
+#ifndef __EMSCRIPTEN__
+#error __EMSCRIPTEN__ is not defined
+#endif
+#ifndef __asmjs__
+#error __asmjs__ is not defined
+#endif
+#ifdef __cplusplus
+#ifndef _GNU_SOURCE
+#error _GNU_SOURCE is not defined in C++
+#endif
+#endif
+#ifndef __unix__
+#error __unix__ is not defined
+#endif
+#ifndef __LITTLE_ENDIAN__
+#error __LITTLE_ENDIAN__ is not defined
+#endif
+
+#ifdef __clang__
+#if __has_feature(pnacl)
+#error has feature pnacl
+#endif
+#endif
+
+#ifdef __native_client__
+#error __native_client__ is defined
+#endif
+#ifdef __pnacl__
+#error __pnacl__ is defined
+#endif
+#ifdef __ELF__
+#error __ELF__ is defined
+#endif
+#ifdef __i386__
+#error __i386__ is defined
+#endif
+#ifdef __i386
+#error __i386 is defined
+#endif
+#ifdef i386
+#error i386 is defined
+#endif
+#ifdef __SSE__
+#error __SSE__ is defined
+#endif
+#ifdef __SSE2__
+#error __SSE2__ is defined
+#endif
+#ifdef __SSE_MATH__
+#error __SSE_MATH__ is defined
+#endif
+#ifdef __SSE2_MATH__
+#error __SSE2_MATH__ is defined
+#endif
+#ifdef __MMX__
+#error __MMX__ is defined
+#endif
+#ifdef __APPLE__
+#error __APPLE__ is defined
+#endif
+#ifdef __linux__
+#error __linux__ is defined
+#endif
+#ifdef __BIG_ENDIAN__
+#error __BIG_ENDIAN__ is defined
+#endif
+#ifdef __LP64__
+#error __LP64__ is defined
+#endif
+
+// We prefer to use __EMSCRIPTEN__, but for compatibility, we define
+// EMSCRIPTEN too.
+#ifndef EMSCRIPTEN
+#error EMSCRIPTEN is not defined
+#endif
+
+#include <stdint.h>
+#include <stddef.h>
+#include <string.h>
+#include <assert.h>
+
+#define STRINGIZE_HELPER(x) #x
+#define STRINGIZE(x) STRINGIZE_HELPER(x)
+
+int main() {
+ assert(sizeof(void*) == 4);
+ assert(sizeof(long) == 4);
+ assert(sizeof(intmax_t) == 8);
+ assert(__alignof(double) == 8);
+ assert(sizeof(long double) == 8);
+ assert(__alignof(long double) == 8);
+ assert(sizeof(intptr_t) == 4);
+ assert(sizeof(size_t) == 4);
+ assert(sizeof(ptrdiff_t) == 4);
+ assert(__FLT_EVAL_METHOD__ == 0);
+ assert(strcmp(STRINGIZE(__USER_LABEL_PREFIX__), "") == 0);
+ return 0;
+}
diff --git a/tests/box2d/Benchmark.cpp b/tests/box2d/Benchmark.cpp
index 4fd79651..6c9b3c5b 100644
--- a/tests/box2d/Benchmark.cpp
+++ b/tests/box2d/Benchmark.cpp
@@ -25,7 +25,7 @@ typedef struct {
#include <time.h>
#include <math.h>
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
#include <emscripten.h>
#endif
@@ -131,7 +131,7 @@ int main(int argc, char **argv) {
world->Step(1.0f/60.0f, 3, 3);
}
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
responsive_main_loop = argc > 2 ? argv[2][0] - '0' : 0;
if (responsive_main_loop) {
printf("responsive main loop\n");
@@ -141,7 +141,7 @@ int main(int argc, char **argv) {
do {
iter();
} while (frameCounter <= FRAMES);
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
}
#endif
@@ -173,7 +173,7 @@ void iter() {
printf("frame averages: %.3f +- %.3f, range: %.3f to %.3f \n", result.mean, result.stddev, float(minn)/CLOCKS_PER_SEC * 1000, float(maxx)/CLOCKS_PER_SEC * 1000);
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
emscripten_run_script("if (Module.reportCompletion) Module.reportCompletion()");
if (responsive_main_loop) emscripten_cancel_main_loop();
#endif
diff --git a/tests/cases/2xi40.ll b/tests/cases/2xi40.ll
index 592f1ba4..fe249528 100644
--- a/tests/cases/2xi40.ll
+++ b/tests/cases/2xi40.ll
@@ -1,6 +1,6 @@
; ModuleID = '/tmp/tmpe4Pk1F/a.out.bc'
-target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
-target triple = "le32-unknown-nacl"
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:128-n32-S128"
+target triple = "asmjs-unknown-emscripten"
%struct.pair = type { [5 x i8], [5 x i8] }
diff --git a/tests/cases/514_ta2.ll b/tests/cases/514_ta2.ll
index ab363242..caf69fb5 100644
--- a/tests/cases/514_ta2.ll
+++ b/tests/cases/514_ta2.ll
@@ -1,6 +1,6 @@
; ModuleID = '/tmp/tmpxFUbAg/test_emcc1.bc'
-target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
-target triple = "le32-unknown-nacl"
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:128-n32-S128"
+target triple = "asmjs-unknown-emscripten"
%struct.c_s = type { i8, float, i32 }
diff --git a/tests/cases/aliasbitcast.ll b/tests/cases/aliasbitcast.ll
index 5e5f13aa..926b386d 100644
--- a/tests/cases/aliasbitcast.ll
+++ b/tests/cases/aliasbitcast.ll
@@ -1,6 +1,6 @@
; ModuleID = '/tmp/emscripten/tmp/src.cpp.o'
-target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
-target triple = "le32-unknown-nacl"
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:128-n32-S128"
+target triple = "asmjs-unknown-emscripten"
@.str = private constant [14 x i8] c"hello, world!\00", align 1 ; [#uses=1]
diff --git a/tests/cases/aliasbitcast2_noasm.ll b/tests/cases/aliasbitcast2_noasm.ll
index 8537e272..5387f2c0 100644
--- a/tests/cases/aliasbitcast2_noasm.ll
+++ b/tests/cases/aliasbitcast2_noasm.ll
@@ -9,7 +9,7 @@ target triple = "i386-pc-linux-gnu"
; [#uses=2]
define void @original() {
entry:
- %0 = call i32 bitcast (i32 (i8*)* @puts to i32 (i32*)*)(i8* getelementptr inbounds ([14 x i8]* @.str, i32 0, i32 0)) ; [#uses=0]
+ %0 = call i32 bitcast (i32 (i8*)* @puts to i32 (i32*)*)(i32* bitcast (i8* getelementptr inbounds ([14 x i8]* @.str, i32 0, i32 0) to i32*)) ; [#uses=0]
br label %return
return: ; preds = %entry
diff --git a/tests/cases/aliasbitcast3_noasm.ll b/tests/cases/aliasbitcast3_noasm.ll
index 4ff969e3..19d3ff14 100644
--- a/tests/cases/aliasbitcast3_noasm.ll
+++ b/tests/cases/aliasbitcast3_noasm.ll
@@ -11,7 +11,7 @@ target triple = "i386-pc-linux-gnu"
; [#uses=2]
define void @original() {
entry:
- %0 = call i32 bitcast (i32 (i8*)* @puts to i32 (i32*)*)(i8* getelementptr inbounds ([14 x i8]* @.str, i32 0, i32 0)) ; [#uses=0]
+ %0 = call i32 bitcast (i32 (i8*)* @puts to i32 (i32*)*)(i32* bitcast (i8* getelementptr inbounds ([14 x i8]* @.str, i32 0, i32 0) to i32*)) ; [#uses=0]
br label %return
return: ; preds = %entry
@@ -24,6 +24,6 @@ declare i32 @puts(i8*)
; [#uses=0]
define i32 @main() {
entry:
- call void @thriceremoved()
+ call void @thriceremoved(i32 0)
ret i32 0
}
diff --git a/tests/cases/aliasbitcastdollar_noasm.ll b/tests/cases/aliasbitcastdollar_noasm.ll
index 1ecf6047..558289b7 100644
--- a/tests/cases/aliasbitcastdollar_noasm.ll
+++ b/tests/cases/aliasbitcastdollar_noasm.ll
@@ -9,7 +9,7 @@ target triple = "i386-pc-linux-gnu"
; [#uses=2]
define void @original() {
entry:
- %0 = call i32 bitcast (i32 (i8*)* @puts to i32 (i32*)*)(i8* getelementptr inbounds ([14 x i8]* @.str, i32 0, i32 0)) ; [#uses=0]
+ %0 = call i32 bitcast (i32 (i8*)* @puts to i32 (i32*)*)(i32* bitcast (i8* getelementptr inbounds ([14 x i8]* @.str, i32 0, i32 0) to i32*)) ; [#uses=0]
br label %return
return: ; preds = %entry
diff --git a/tests/cases/aliases_fastcomp.ll b/tests/cases/aliases_fastcomp.ll
new file mode 100644
index 00000000..2b8746eb
--- /dev/null
+++ b/tests/cases/aliases_fastcomp.ll
@@ -0,0 +1,41 @@
+; ModuleID = 'tests/hello_world.bc'
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:128-n32-S128"
+target triple = "asmjs-unknown-emscripten"
+
+@.str = private unnamed_addr constant [18 x i8] c"hello, world! %d\0A\00", align 1 ; [#uses=1 type=[18 x i8]*]
+
+@othername = alias internal void (i32)* @doit
+@othername2 = alias internal void (i32)* @othername
+@othername3 = alias internal void (i32)* @othername2
+
+@value = global i32 17
+@value2 = alias i32* @value
+@value3 = alias i32* @value
+
+define internal void @doit(i32 %x) {
+ %call = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([18 x i8]* @.str, i32 0, i32 0), i32 %x) ; [#uses=0 type=i32]
+ ret void
+}
+
+define i32 @main() {
+entry:
+ %fp = ptrtoint void (i32)* @othername3 to i32
+ %fp1 = add i32 %fp, 0
+ %pf = inttoptr i32 %fp1 to void (i32)*
+ %x = load i32* @value3
+ call void (i32)* %pf(i32 %x)
+ %x1 = load i32* @value2
+ call void (i32)* @othername3(i32 %x1)
+ %x2 = load i32* @value
+ call void (i32)* @othername2(i32 %x2)
+ store i32 18, i32* @value
+ %x3 = load i32* @value
+ call void (i32)* @othername(i32 %x3)
+ store i32 19, i32* @value3
+ %x4 = load i32* @value3
+ call void (i32)* @doit(i32 %x4)
+ ret i32 1
+}
+
+declare i32 @printf(i8*, ...)
+
diff --git a/tests/cases/aliases_fastcomp.txt b/tests/cases/aliases_fastcomp.txt
new file mode 100644
index 00000000..ae30c63c
--- /dev/null
+++ b/tests/cases/aliases_fastcomp.txt
@@ -0,0 +1,5 @@
+hello, world! 17
+hello, world! 17
+hello, world! 17
+hello, world! 18
+hello, world! 19
diff --git a/tests/cases/atomicrmw.ll b/tests/cases/atomicrmw.ll
index 31529250..20a68baa 100644
--- a/tests/cases/atomicrmw.ll
+++ b/tests/cases/atomicrmw.ll
@@ -1,6 +1,6 @@
; ModuleID = 'tests/hello_world.bc'
-target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
-target triple = "le32-unknown-nacl"
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:128-n32-S128"
+target triple = "asmjs-unknown-emscripten"
@.str = private unnamed_addr constant [15 x i8] c"hello, %d,%d!\0A\00", align 1 ; [#uses=1 type=[15 x i8]*]
diff --git a/tests/cases/atomicrmw_dec.ll b/tests/cases/atomicrmw_dec.ll
index 0ff08a5d..819c3a2a 100644
--- a/tests/cases/atomicrmw_dec.ll
+++ b/tests/cases/atomicrmw_dec.ll
@@ -1,6 +1,6 @@
; ModuleID = 'tests/hello_world.bc'
-target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
-target triple = "le32-unknown-nacl"
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:128-n32-S128"
+target triple = "asmjs-unknown-emscripten"
@.str = private unnamed_addr constant [15 x i8] c"hello, %d,%d!\0A\00", align 1 ; [#uses=1 type=[15 x i8]*]
diff --git a/tests/cases/atomicrmw_unaligned.ll b/tests/cases/atomicrmw_unaligned.ll
index 31529250..20a68baa 100644
--- a/tests/cases/atomicrmw_unaligned.ll
+++ b/tests/cases/atomicrmw_unaligned.ll
@@ -1,6 +1,6 @@
; ModuleID = 'tests/hello_world.bc'
-target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
-target triple = "le32-unknown-nacl"
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:128-n32-S128"
+target triple = "asmjs-unknown-emscripten"
@.str = private unnamed_addr constant [15 x i8] c"hello, %d,%d!\0A\00", align 1 ; [#uses=1 type=[15 x i8]*]
diff --git a/tests/cases/bigdouble.ll b/tests/cases/bigdouble.ll
index cd58c08b..472adadd 100644
--- a/tests/cases/bigdouble.ll
+++ b/tests/cases/bigdouble.ll
@@ -1,6 +1,6 @@
; ModuleID = '/tmp/tmpijH2sB/a.out.bc'
-target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
-target triple = "le32-unknown-nacl"
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:128-n32-S128"
+target triple = "asmjs-unknown-emscripten"
@.str = private unnamed_addr constant [4 x i8] c"%f\0A\00", align 1
diff --git a/tests/cases/boolret_fastcomp.ll b/tests/cases/boolret_fastcomp.ll
index a20cd001..e6320bab 100644
--- a/tests/cases/boolret_fastcomp.ll
+++ b/tests/cases/boolret_fastcomp.ll
@@ -1,6 +1,6 @@
; ModuleID = 'tests/hello_world.bc'
-target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
-target triple = "le32-unknown-nacl"
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:128-n32-S128"
+target triple = "asmjs-unknown-emscripten"
@.str = private unnamed_addr constant [15 x i8] c"helloworld%d.\0A\00", align 1
diff --git a/tests/cases/breakinthemiddle.ll b/tests/cases/breakinthemiddle.ll
index 6e05b853..39aaa922 100644
--- a/tests/cases/breakinthemiddle.ll
+++ b/tests/cases/breakinthemiddle.ll
@@ -1,5 +1,5 @@
-target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
-target triple = "le32-unknown-nacl"
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:128-n32-S128"
+target triple = "asmjs-unknown-emscripten"
@.str = private constant [15 x i8] c"hello, world!\0A\00", align 1 ; [#uses=1]
diff --git a/tests/cases/breakinthemiddle2.ll b/tests/cases/breakinthemiddle2.ll
index 2f8c1c91..db1cb7b6 100644
--- a/tests/cases/breakinthemiddle2.ll
+++ b/tests/cases/breakinthemiddle2.ll
@@ -1,5 +1,5 @@
-target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
-target triple = "le32-unknown-nacl"
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:128-n32-S128"
+target triple = "asmjs-unknown-emscripten"
@.str = private constant [15 x i8] c"hello, world!\0A\00", align 1 ; [#uses=1]
diff --git a/tests/cases/caall.ll b/tests/cases/caall.ll
index 2cc231ec..0d92a498 100644
--- a/tests/cases/caall.ll
+++ b/tests/cases/caall.ll
@@ -1,6 +1,6 @@
; ModuleID = 'tests/hello_world.bc'
-target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
-target triple = "le32-unknown-nacl"
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:128-n32-S128"
+target triple = "asmjs-unknown-emscripten"
@.str = private unnamed_addr constant [15 x i8] c"hello, world!\0A\00", align 1 ; [#uses=1 type=[15 x i8]*]
diff --git a/tests/cases/callwithstructural64_ta2.ll b/tests/cases/callwithstructural64_ta2.ll
index d16b0e87..103adcd0 100644
--- a/tests/cases/callwithstructural64_ta2.ll
+++ b/tests/cases/callwithstructural64_ta2.ll
@@ -1,6 +1,6 @@
; ModuleID = 'foo.bc'
-target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
-target triple = "le32-unknown-nacl"
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:128-n32-S128"
+target triple = "asmjs-unknown-emscripten"
%ac = type { i8*, i64 }
diff --git a/tests/cases/callwithstructural_ta2.ll b/tests/cases/callwithstructural_ta2.ll
index bc6f852a..00cde791 100644
--- a/tests/cases/callwithstructural_ta2.ll
+++ b/tests/cases/callwithstructural_ta2.ll
@@ -1,6 +1,6 @@
; ModuleID = 'foo.bc'
-target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
-target triple = "le32-unknown-nacl"
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:128-n32-S128"
+target triple = "asmjs-unknown-emscripten"
%ac = type { i8*, i32 }
diff --git a/tests/cases/complexphi.ll b/tests/cases/complexphi.ll
index e79e6f1b..871cbe27 100644
--- a/tests/cases/complexphi.ll
+++ b/tests/cases/complexphi.ll
@@ -1,6 +1,6 @@
; ModuleID = '/dev/shm/tmp/src.cpp.o'
-target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
-target triple = "le32-unknown-nacl"
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:128-n32-S128"
+target triple = "asmjs-unknown-emscripten"
@.str = private unnamed_addr constant [15 x i8] c"hello, world!\0A\00", align 1 ; [#uses=1 type=[15 x i8]*]
@_dispatchTable = internal global i64 0
diff --git a/tests/cases/ctors_cast.ll b/tests/cases/ctors_cast.ll
index d94b1d63..69baa17d 100644
--- a/tests/cases/ctors_cast.ll
+++ b/tests/cases/ctors_cast.ll
@@ -1,6 +1,6 @@
; ModuleID = '/tmp/tmpHcVUBJ/a.out.bc'
-target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
-target triple = "le32-unknown-nacl"
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:128-n32-S128"
+target triple = "asmjs-unknown-emscripten"
%struct.Other = type { i8 }
diff --git a/tests/cases/dash.ll b/tests/cases/dash.ll
index 6833a42e..0104cf7c 100644
--- a/tests/cases/dash.ll
+++ b/tests/cases/dash.ll
@@ -1,6 +1,6 @@
; ModuleID = '/tmp/tmpqfApGD/a.out.bc'
-target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
-target triple = "le32-unknown-nacl"
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:128-n32-S128"
+target triple = "asmjs-unknown-emscripten"
@other-name = alias i32 ()* @main
diff --git a/tests/cases/dollar.ll b/tests/cases/dollar.ll
index 7d730d6a..3bd203cf 100644
--- a/tests/cases/dollar.ll
+++ b/tests/cases/dollar.ll
@@ -1,6 +1,6 @@
; ModuleID = 'tests/hello_world.bc'
-target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
-target triple = "le32-unknown-nacl"
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:128-n32-S128"
+target triple = "asmjs-unknown-emscripten"
@.str = private unnamed_addr constant [15 x i8] c"hello, world!\0A\00", align 1 ; [#uses=1 type=[15 x i8]*]
diff --git a/tests/cases/emptyalloca.ll b/tests/cases/emptyalloca.ll
index f12a4161..59ff2955 100644
--- a/tests/cases/emptyalloca.ll
+++ b/tests/cases/emptyalloca.ll
@@ -1,6 +1,6 @@
; ModuleID = '/tmp/tmpjSNiky/a.out.bc'
-target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
-target triple = "le32-unknown-nacl"
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:128-n32-S128"
+target triple = "asmjs-unknown-emscripten"
@.str = private unnamed_addr constant [30 x i8] c"Module.print('hello, world!')\00", align 1
diff --git a/tests/cases/emptyasm_le32.ll b/tests/cases/emptyasm_aue.ll
index 8f6b606e..24805591 100644
--- a/tests/cases/emptyasm_le32.ll
+++ b/tests/cases/emptyasm_aue.ll
@@ -1,5 +1,5 @@
-target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
-target triple = "le32-unknown-nacl"
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:128-n32-S128"
+target triple = "asmjs-unknown-emscripten"
; ModuleID = 'tests/hello_world.bc'
diff --git a/tests/cases/emptystruct.ll b/tests/cases/emptystruct.ll
index ecf0e295..b32ac803 100644
--- a/tests/cases/emptystruct.ll
+++ b/tests/cases/emptystruct.ll
@@ -13,7 +13,7 @@ entry:
%z = alloca %struct.s, align 4
%0 = bitcast %struct.s* %z to i8*
call void @llvm.memset.p0i8.i32(i8* %0, i8 0, i32 4, i32 4, i1 false)
- %1 = call i32 bitcast (i32 (i8*)* @puts to i32 (i32*)*)(i8* getelementptr inbounds ([14 x i8]* @.str, i32 0, i32 0)) ; [#uses=0]
+ %1 = call i32 bitcast (i32 (i8*)* @puts to i32 (i32*)*)(i32* bitcast (i8* getelementptr inbounds ([14 x i8]* @.str, i32 0, i32 0) to i32*)) ; [#uses=0]
ret i32 0
}
diff --git a/tests/cases/entry3.ll b/tests/cases/entry3.ll
index 6888d0a8..822e6b7f 100644
--- a/tests/cases/entry3.ll
+++ b/tests/cases/entry3.ll
@@ -1,6 +1,6 @@
; ModuleID = '/tmp/tmpKnA2D3/a.out.bc'
-target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
-target triple = "le32-unknown-nacl"
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:128-n32-S128"
+target triple = "asmjs-unknown-emscripten"
@.str = private unnamed_addr constant [11 x i8] c"getgid=%d\0A\00", align 1
@.str1 = private unnamed_addr constant [6 x i8] c"f=%d\0A\00", align 1
diff --git a/tests/cases/fixablebadcasts_fastcomp.ll b/tests/cases/fixablebadcasts_fastcomp.ll
new file mode 100644
index 00000000..3870e0e0
--- /dev/null
+++ b/tests/cases/fixablebadcasts_fastcomp.ll
@@ -0,0 +1,27 @@
+; ModuleID = 'tests/hello_world.bc'
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:128-n32-S128"
+target triple = "asmjs-unknown-emscripten"
+
+@.str = private unnamed_addr constant [18 x i8] c"hello, world %d!\0A\00", align 1
+
+; [#uses=0]
+define i32 @main() {
+entry:
+ %retval = alloca i32, align 4 ; [#uses=1 type=i32*]
+ store i32 0, i32* %retval
+ %a = call i32 bitcast (i32 (i32)* @twoparam to i32 (i32, i32)*)(i32 5, i32 6)
+ %call = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([18 x i8]* @.str, i32 0, i32 0), i32 %a) ; [#uses=0 type=i32]
+ call void bitcast (void (i32, i32*, i32*)* @_ZN7WebCore33signedPublicKeyAndChallengeStringEjRKN3WTF6StringERKNS_3URLE to void (i32*, i32, i32*, i32*)*)(i32* sret null, i32 0, i32* null, i32* null)
+ ret i32 1
+}
+
+define i32 @twoparam(i32 %x) {
+ ret i32 %x
+}
+
+define void @_ZN7WebCore33signedPublicKeyAndChallengeStringEjRKN3WTF6StringERKNS_3URLE(i32, i32* nocapture, i32* nocapture) {
+ ret void
+}
+
+; [#uses=1]
+declare i32 @printf(i8*, ...)
diff --git a/tests/cases/fixablebadcasts_fastcomp.txt b/tests/cases/fixablebadcasts_fastcomp.txt
new file mode 100644
index 00000000..47abd748
--- /dev/null
+++ b/tests/cases/fixablebadcasts_fastcomp.txt
@@ -0,0 +1 @@
+hello, world 5!
diff --git a/tests/cases/fptosi.ll b/tests/cases/fptosi.ll
index 71bc6af8..5c6477bf 100644
--- a/tests/cases/fptosi.ll
+++ b/tests/cases/fptosi.ll
@@ -1,6 +1,6 @@
; ModuleID = '/dev/shm/tmp/src.cpp.o'
-target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
-target triple = "le32-unknown-nacl"
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:128-n32-S128"
+target triple = "asmjs-unknown-emscripten"
@.str = private unnamed_addr constant [8 x i8] c"*%.3f*\0A\00", align 1 ; [#uses=1 type=[8 x i8]*]
@.str2 = private unnamed_addr constant [6 x i8] c"*%d*\0A\00", align 1 ; [#uses=1 type=[6 x i8]*]
diff --git a/tests/cases/funcptr.ll b/tests/cases/funcptr.ll
index ef869c33..4c1c9990 100644
--- a/tests/cases/funcptr.ll
+++ b/tests/cases/funcptr.ll
@@ -1,6 +1,6 @@
; ModuleID = 'tests/hello_world.bc'
-target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
-target triple = "le32-unknown-nacl"
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:128-n32-S128"
+target triple = "asmjs-unknown-emscripten"
@.str = private unnamed_addr constant [17 x i8] c"hello %d world!\0A\00", align 1 ; [#uses=1 type=[17 x i8]*]
diff --git a/tests/cases/fuzz6_ta2.ll b/tests/cases/fuzz6_ta2.ll
index dea3a21d..a30bf61f 100644
--- a/tests/cases/fuzz6_ta2.ll
+++ b/tests/cases/fuzz6_ta2.ll
@@ -1,6 +1,6 @@
; ModuleID = 'emcc-0-basebc.bc'
-target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
-target triple = "le32-unknown-nacl"
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:128-n32-S128"
+target triple = "asmjs-unknown-emscripten"
%struct.S3 = type { i32, i32 }
%struct.S1 = type { i32, i32, i8, i16 }
diff --git a/tests/cases/gepaddoverflow.ll b/tests/cases/gepaddoverflow.ll
index 11246c1d..4346ce20 100644
--- a/tests/cases/gepaddoverflow.ll
+++ b/tests/cases/gepaddoverflow.ll
@@ -1,6 +1,6 @@
; ModuleID = 'new.o'
-target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
-target triple = "le32-unknown-nacl"
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:128-n32-S128"
+target triple = "asmjs-unknown-emscripten"
declare i32 @printf(i8* noalias, ...) nounwind
diff --git a/tests/cases/i24_ce_fastcomp.ll b/tests/cases/i24_ce_fastcomp.ll
new file mode 100644
index 00000000..69b580a2
--- /dev/null
+++ b/tests/cases/i24_ce_fastcomp.ll
@@ -0,0 +1,11393 @@
+; ModuleID = 'emcc-0-basebc.bc'
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:128-n32-S128"
+target triple = "asmjs-unknown-emscripten"
+
+; Tests i24 constantExprs nested heavily
+
+%struct.S0 = type { i16, i8, i32 }
+%struct.malloc_state = type { i32, i32, i32, i32, i8*, %struct.malloc_chunk*, %struct.malloc_chunk*, i32, i32, i32, [66 x %struct.malloc_chunk*], [32 x %struct.malloc_tree_chunk*], i32, i32, i32, i32, %struct.malloc_segment, i8*, i32 }
+%struct.malloc_chunk = type { i32, i32, %struct.malloc_chunk*, %struct.malloc_chunk* }
+%struct.malloc_tree_chunk = type { i32, i32, %struct.malloc_tree_chunk*, %struct.malloc_tree_chunk*, [2 x %struct.malloc_tree_chunk*], %struct.malloc_tree_chunk*, i32 }
+%struct.malloc_segment = type { i8*, i32, %struct.malloc_segment*, i32 }
+%struct.malloc_params = type { i32, i32, i32, i32, i32, i32 }
+%struct._IO_FILE = type { i32, i8*, i8*, i32 (%struct._IO_FILE*)*, i8*, i8*, i8*, i8*, i32 (%struct._IO_FILE*, i8*, i32)*, i32 (%struct._IO_FILE*, i8*, i32)*, i32 (%struct._IO_FILE*, i32, i32)*, i8*, i32, %struct._IO_FILE*, %struct._IO_FILE*, i32, i32, i32, i16, i8, i8, i32, i32, i8*, i32, i8*, i8*, i8*, i32, i32 }
+%"struct.std::nothrow_t" = type { i8 }
+%"class.std::bad_alloc" = type { %"class.std::exception" }
+%"class.std::exception" = type { i32 (...)** }
+%"class.std::bad_array_new_length" = type { %"class.std::bad_alloc" }
+%"class.std::bad_array_length" = type { %"class.std::bad_alloc" }
+%struct.__locale_struct = type opaque
+%struct.__locale_struct.0 = type opaque
+%struct.__locale_struct.1 = type opaque
+%union.U1 = type { i8* }
+%struct.mallinfo = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
+%struct._IO_FILE.3 = type { i32, i8*, i8*, {}*, i8*, i8*, i8*, i8*, i32 (%struct._IO_FILE.3*, i8*, i32)*, i32 (%struct._IO_FILE.3*, i8*, i32)*, i32 (%struct._IO_FILE.3*, i32, i32)*, i8*, i32, %struct._IO_FILE.3*, %struct._IO_FILE.3*, i32, i32, i32, i16, i8, i8, i32, i32, i8*, i32, i8*, i8*, i8*, i32, i32 }
+%struct._IO_FILE.4 = type { i32, i8*, i8*, {}*, i8*, i8*, i8*, i8*, i32 (%struct._IO_FILE.4*, i8*, i32)*, i32 (%struct._IO_FILE.4*, i8*, i32)*, i32 (%struct._IO_FILE.4*, i32, i32)*, i8*, i32, %struct._IO_FILE.4*, %struct._IO_FILE.4*, i32, i32, i32, i16, i8, i8, i32, i32, i8*, i32, i8*, i8*, i8*, i32, i32 }
+
+@.str = private unnamed_addr constant [2 x i8] c"1\00", align 1
+@_ZL3g_2 = internal global i32 -8, align 4
+@.str1 = private unnamed_addr constant [4 x i8] c"g_2\00", align 1
+@_ZL4g_52 = internal global [4 x [6 x [6 x i8]]] [[6 x [6 x i8]] [[6 x i8] c"\00\02Q\07\07Q", [6 x i8] c"\09\09\8F\01\00\00", [6 x i8] c"\FFO\09\07\00\8F", [6 x i8] c"\D1\FF\09\02\09\00", [6 x i8] c"\FD\02\8FE\FFQ", [6 x i8] c"E\FFQ\01\D1\D1"], [6 x [6 x i8]] [[6 x i8] c"EOOE\FD\8F", [6 x i8] c"\FD\09\01\02E\D1", [6 x i8] c"\D1\02M\07EQ", [6 x i8] c"\FF\09\01\01\FD\00", [6 x i8] c"\09O\02\07\D1\8F", [6 x i8] c"\00\FF\02\02\FF\00"], [6 x [6 x i8]] [[6 x i8] c"\00\02\01E\09Q", [6 x i8] c"\07\FFM\01\00\D1", [6 x i8] c"\07O\01E\00\8F", [6 x i8] c"\00\09O\02\07\D1", [6 x i8] c"\00\02Q\07\07Q", [6 x i8] c"\09\09\8F\01\00\00"], [6 x [6 x i8]] [[6 x i8] c"\FFO\09\07\00\8F", [6 x i8] c"\D1\FF\09\02\09\00", [6 x i8] c"\FD\02\8FE\FFQ", [6 x i8] c"E\FFQ\01\D1\D1", [6 x i8] c"EOOE\FD\8F", [6 x i8] c"\FD\09\01\02E\D1"]], align 1
+@.str2 = private unnamed_addr constant [14 x i8] c"g_52[i][j][k]\00", align 1
+@.str3 = private unnamed_addr constant [22 x i8] c"index = [%d][%d][%d]\0A\00", align 1
+@_ZL4g_53 = internal global i32 -1550080695, align 4
+@.str4 = private unnamed_addr constant [5 x i8] c"g_53\00", align 1
+@.str5 = private unnamed_addr constant [8 x i8] c"g_74.f0\00", align 1
+@.str6 = private unnamed_addr constant [8 x i8] c"g_74.f4\00", align 1
+@_ZL4g_77 = internal global i16 1, align 2
+@.str7 = private unnamed_addr constant [5 x i8] c"g_77\00", align 1
+@_ZL4g_79 = internal global i16 -1, align 2
+@.str8 = private unnamed_addr constant [5 x i8] c"g_79\00", align 1
+@_ZL4g_82 = internal global i16 -4597, align 2
+@.str9 = private unnamed_addr constant [5 x i8] c"g_82\00", align 1
+@_ZL4g_83 = internal global %struct.S0 { i16 -20724, i8 -72, i32 1 }, align 8
+@.str10 = private unnamed_addr constant [8 x i8] c"g_83.f0\00", align 1
+@.str11 = private unnamed_addr constant [8 x i8] c"g_83.f1\00", align 1
+@.str12 = private unnamed_addr constant [8 x i8] c"g_83.f2\00", align 1
+@_ZL4g_93 = internal global i32 -911546352, align 4
+@.str13 = private unnamed_addr constant [5 x i8] c"g_93\00", align 1
+@_ZL5g_103 = internal global i16 -1, align 2
+@.str14 = private unnamed_addr constant [6 x i8] c"g_103\00", align 1
+@_ZL5g_126 = internal global i8 6, align 1
+@.str15 = private unnamed_addr constant [6 x i8] c"g_126\00", align 1
+@_ZL5g_132 = internal global i32 -782244254, align 4
+@.str16 = private unnamed_addr constant [6 x i8] c"g_132\00", align 1
+@_ZL5g_133 = internal unnamed_addr global i8 -17, align 1
+@.str17 = private unnamed_addr constant [6 x i8] c"g_133\00", align 1
+@_ZL5g_135 = internal global i32 -3, align 4
+@.str18 = private unnamed_addr constant [6 x i8] c"g_135\00", align 1
+@_ZL5g_136 = internal global i8 -1, align 1
+@.str19 = private unnamed_addr constant [6 x i8] c"g_136\00", align 1
+@_ZL5g_138 = internal global i32 1083335064, align 4
+@.str20 = private unnamed_addr constant [6 x i8] c"g_138\00", align 1
+@_ZL5g_162 = internal global i16 17495, align 2
+@.str21 = private unnamed_addr constant [6 x i8] c"g_162\00", align 1
+@_ZL5g_168 = internal global i16 8, align 2
+@.str22 = private unnamed_addr constant [6 x i8] c"g_168\00", align 1
+@_ZL5g_170 = internal global i8 -109, align 1
+@.str23 = private unnamed_addr constant [6 x i8] c"g_170\00", align 1
+@_ZL5g_171 = internal global [8 x i8] c"\FF\FF\FF\FF\FF\FF\FF\FF", align 1
+@.str24 = private unnamed_addr constant [9 x i8] c"g_171[i]\00", align 1
+@.str25 = private unnamed_addr constant [14 x i8] c"index = [%d]\0A\00", align 1
+@_ZL5g_172 = internal global i16 0, align 2
+@.str26 = private unnamed_addr constant [6 x i8] c"g_172\00", align 1
+@_ZL5g_257 = internal global i32 2067456055, align 4
+@.str27 = private unnamed_addr constant [6 x i8] c"g_257\00", align 1
+@_ZL5g_304 = internal global i8 1, align 1
+@.str28 = private unnamed_addr constant [6 x i8] c"g_304\00", align 1
+@_ZL5g_308 = internal global i16 -3, align 2
+@.str29 = private unnamed_addr constant [6 x i8] c"g_308\00", align 1
+@_ZL5g_361 = internal global i16 1, align 2
+@.str30 = private unnamed_addr constant [6 x i8] c"g_361\00", align 1
+@_ZL5g_400 = internal global i32 711639049, align 4
+@.str31 = private unnamed_addr constant [6 x i8] c"g_400\00", align 1
+@.str32 = private unnamed_addr constant [6 x i8] c"g_428\00", align 1
+@_ZL5g_471 = internal global %struct.S0 { i16 0, i8 6, i32 1033957816 }, align 8
+@.str33 = private unnamed_addr constant [9 x i8] c"g_471.f0\00", align 1
+@.str34 = private unnamed_addr constant [9 x i8] c"g_471.f1\00", align 1
+@.str35 = private unnamed_addr constant [9 x i8] c"g_471.f2\00", align 1
+@_ZL5g_546 = internal global i32 1, align 4
+@.str36 = private unnamed_addr constant [6 x i8] c"g_546\00", align 1
+@.str37 = private unnamed_addr constant [6 x i8] c"g_687\00", align 1
+@.str38 = private unnamed_addr constant [6 x i8] c"g_711\00", align 1
+@_ZL5g_935 = internal unnamed_addr constant [10 x i32] [i32 -533036994, i32 -533036994, i32 1950933783, i32 -533036994, i32 -533036994, i32 1950933783, i32 -533036994, i32 -533036994, i32 1950933783, i32 -533036994], align 4
+@.str39 = private unnamed_addr constant [9 x i8] c"g_935[i]\00", align 1
+@_ZL6g_1010 = internal global i8 1, align 1
+@.str40 = private unnamed_addr constant [7 x i8] c"g_1010\00", align 1
+@_ZL6g_1025 = internal unnamed_addr global i8 -7, align 1
+@.str41 = private unnamed_addr constant [7 x i8] c"g_1025\00", align 1
+@_ZL6g_1136 = internal unnamed_addr global i8 -108, align 1
+@.str42 = private unnamed_addr constant [7 x i8] c"g_1136\00", align 1
+@.str43 = private unnamed_addr constant [7 x i8] c"g_1165\00", align 1
+@.str44 = private unnamed_addr constant [7 x i8] c"g_1176\00", align 1
+@_ZL6g_1198 = internal global i32 1, align 4
+@.str45 = private unnamed_addr constant [7 x i8] c"g_1198\00", align 1
+@_ZL6g_1442 = internal unnamed_addr constant [8 x i32] [i32 -3, i32 -1424736723, i32 -1424736723, i32 -3, i32 -1424736723, i32 -1424736723, i32 -3, i32 -1424736723], align 4
+@.str46 = private unnamed_addr constant [10 x i8] c"g_1442[i]\00", align 1
+@_ZL13crc32_context = internal unnamed_addr global i32 -1, align 4
+@.str47 = private unnamed_addr constant [15 x i8] c"checksum = %X\0A\00", align 1
+@_ZL4g_74 = internal global { i8, [3 x i8] } { i8 -4, [3 x i8] undef }, align 4
+@.str48 = private unnamed_addr constant [36 x i8] c"...checksum after hashing %s : %lX\0A\00", align 1
+@_ZL9crc32_tab = internal unnamed_addr global [256 x i32] zeroinitializer, align 4
+@_ZZL6func_1vE6l_1011 = private unnamed_addr constant [7 x [1 x [7 x %struct.S0]]] [[1 x [7 x %struct.S0]] [[7 x %struct.S0] [%struct.S0 { i16 7185, i8 -3, i32 -2 }, %struct.S0 { i16 -25965, i8 -51, i32 7 }, %struct.S0 { i16 7185, i8 -3, i32 -2 }, %struct.S0 { i16 -4, i8 -5, i32 879602046 }, %struct.S0 { i16 32067, i8 -3, i32 -1554043524 }, %struct.S0 { i16 32067, i8 -3, i32 -1554043524 }, %struct.S0 { i16 -4, i8 -5, i32 879602046 }]], [1 x [7 x %struct.S0]] [[7 x %struct.S0] [%struct.S0 { i16 9338, i8 45, i32 -5 }, %struct.S0 { i16 -9, i8 50, i32 -865011421 }, %struct.S0 { i16 9338, i8 45, i32 -5 }, %struct.S0 { i16 10188, i8 44, i32 -40550910 }, %struct.S0 { i16 -15215, i8 -5, i32 -963383367 }, %struct.S0 { i16 -15215, i8 -5, i32 -963383367 }, %struct.S0 { i16 10188, i8 44, i32 -40550910 }]], [1 x [7 x %struct.S0]] [[7 x %struct.S0] [%struct.S0 { i16 7185, i8 -3, i32 -2 }, %struct.S0 { i16 -25965, i8 -51, i32 7 }, %struct.S0 { i16 7185, i8 -3, i32 -2 }, %struct.S0 { i16 -4, i8 -5, i32 879602046 }, %struct.S0 { i16 32067, i8 -3, i32 -1554043524 }, %struct.S0 { i16 32067, i8 -3, i32 -1554043524 }, %struct.S0 { i16 -4, i8 -5, i32 879602046 }]], [1 x [7 x %struct.S0]] [[7 x %struct.S0] [%struct.S0 { i16 9338, i8 45, i32 -5 }, %struct.S0 { i16 -9, i8 50, i32 -865011421 }, %struct.S0 { i16 9338, i8 45, i32 -5 }, %struct.S0 { i16 10188, i8 44, i32 -40550910 }, %struct.S0 { i16 -15215, i8 -5, i32 -963383367 }, %struct.S0 { i16 -15215, i8 -5, i32 -963383367 }, %struct.S0 { i16 10188, i8 44, i32 -40550910 }]], [1 x [7 x %struct.S0]] [[7 x %struct.S0] [%struct.S0 { i16 7185, i8 -3, i32 -2 }, %struct.S0 { i16 -25965, i8 -51, i32 7 }, %struct.S0 { i16 7185, i8 -3, i32 -2 }, %struct.S0 { i16 -4, i8 -5, i32 879602046 }, %struct.S0 { i16 32067, i8 -3, i32 -1554043524 }, %struct.S0 { i16 32067, i8 -3, i32 -1554043524 }, %struct.S0 { i16 -4, i8 -5, i32 879602046 }]], [1 x [7 x %struct.S0]] [[7 x %struct.S0] [%struct.S0 { i16 9338, i8 45, i32 -5 }, %struct.S0 { i16 -9, i8 50, i32 -865011421 }, %struct.S0 { i16 9338, i8 45, i32 -5 }, %struct.S0 { i16 10188, i8 44, i32 -40550910 }, %struct.S0 { i16 -15215, i8 -5, i32 -963383367 }, %struct.S0 { i16 -15215, i8 -5, i32 -963383367 }, %struct.S0 { i16 10188, i8 44, i32 -40550910 }]], [1 x [7 x %struct.S0]] [[7 x %struct.S0] [%struct.S0 { i16 7185, i8 -3, i32 -2 }, %struct.S0 { i16 -25965, i8 -51, i32 7 }, %struct.S0 { i16 7185, i8 -3, i32 -2 }, %struct.S0 { i16 -4, i8 -5, i32 879602046 }, %struct.S0 { i16 32067, i8 -3, i32 -1554043524 }, %struct.S0 { i16 -25965, i8 -51, i32 7 }, %struct.S0 { i16 32067, i8 -3, i32 -1554043524 }]]], align 8
+@_ZL5g_984 = internal global i8** @_ZL5g_985, align 4
+@_ZZL6func_1vE6l_1499 = private unnamed_addr constant [9 x i8] c"\98\98\98\98\98\98\98\98\98", align 1
+@_ZZL6func_1vE6l_1006 = private unnamed_addr constant [10 x [7 x [3 x i32]]] [[7 x [3 x i32]] [[3 x i32] [i32 1841884517, i32 -1, i32 -1613798643], [3 x i32] [i32 2091444926, i32 -2138639918, i32 0], [3 x i32] [i32 283017736, i32 -7, i32 1698185546], [3 x i32] [i32 1628157269, i32 0, i32 1044216359], [3 x i32] [i32 1547065395, i32 -1, i32 -7], [3 x i32] [i32 8, i32 -1, i32 1], [3 x i32] [i32 1841884517, i32 0, i32 2]], [7 x [3 x i32]] [[3 x i32] [i32 7, i32 -7, i32 2087377514], [3 x i32] [i32 834421965, i32 -2138639918, i32 2], [3 x i32] [i32 1, i32 -1, i32 1044216359], [3 x i32] [i32 7, i32 -10, i32 -1], [3 x i32] [i32 7, i32 -1, i32 -328727838], [3 x i32] [i32 360433363, i32 -2138639918, i32 -1613798643], [3 x i32] [i32 1547065395, i32 -7, i32 -1]], [7 x [3 x i32]] [[3 x i32] [i32 0, i32 0, i32 -1129666350], [3 x i32] [i32 -1120699426, i32 -1, i32 -8], [3 x i32] [i32 2091444926, i32 -1, i32 2087377514], [3 x i32] [i32 7, i32 0, i32 -5], [3 x i32] [i32 679230240, i32 -7, i32 -5], [3 x i32] [i32 1, i32 -2138639918, i32 -7], [3 x i32] [i32 834421965, i32 -1, i32 -1129666350]], [7 x [3 x i32]] [[3 x i32] [i32 679230240, i32 -10, i32 -4], [3 x i32] [i32 -1, i32 -1, i32 0], [3 x i32] [i32 8, i32 -2138639918, i32 -328727838], [3 x i32] [i32 -1120699426, i32 -7, i32 -4], [3 x i32] [i32 1, i32 0, i32 -1], [3 x i32] [i32 283017736, i32 -1, i32 2], [3 x i32] [i32 360433363, i32 -1, i32 -5]], [7 x [3 x i32]] [[3 x i32] [i32 -1, i32 0, i32 0], [3 x i32] [i32 555482698, i32 -7, i32 1], [3 x i32] [i32 1, i32 -2138639918, i32 -8], [3 x i32] [i32 1, i32 -1, i32 -1], [3 x i32] [i32 555482698, i32 -10, i32 1698185546], [3 x i32] [i32 1841884517, i32 -1, i32 -1613798643], [3 x i32] [i32 2091444926, i32 -2138639918, i32 0]], [7 x [3 x i32]] [[3 x i32] [i32 283017736, i32 -7, i32 1698185546], [3 x i32] [i32 1628157269, i32 0, i32 1044216359], [3 x i32] [i32 1547065395, i32 -1, i32 -7], [3 x i32] [i32 8, i32 -1, i32 1], [3 x i32] [i32 1841884517, i32 0, i32 2], [3 x i32] [i32 7, i32 -7, i32 2087377514], [3 x i32] [i32 834421965, i32 -2138639918, i32 2]], [7 x [3 x i32]] [[3 x i32] [i32 1, i32 1023954582, i32 -1], [3 x i32] [i32 -1, i32 -1579985206, i32 8], [3 x i32] [i32 2, i32 1023954582, i32 -1425719182], [3 x i32] [i32 87909934, i32 0, i32 0], [3 x i32] [i32 0, i32 7, i32 8], [3 x i32] [i32 702414371, i32 0, i32 2], [3 x i32] [i32 -328727838, i32 -2, i32 -2]], [7 x [3 x i32]] [[3 x i32] [i32 -10, i32 -2, i32 96667756], [3 x i32] [i32 2, i32 0, i32 1924945160], [3 x i32] [i32 -1, i32 7, i32 -1402097775], [3 x i32] [i32 -1, i32 0, i32 7], [3 x i32] [i32 -4, i32 1023954582, i32 2], [3 x i32] [i32 -1, i32 -1579985206, i32 73780325], [3 x i32] [i32 0, i32 1023954582, i32 -1893771394]], [7 x [3 x i32]] [[3 x i32] [i32 4, i32 0, i32 -1425719182], [3 x i32] [i32 -328727838, i32 7, i32 73780325], [3 x i32] [i32 6, i32 0, i32 -2], [3 x i32] [i32 -1613798643, i32 -2, i32 -1986717165], [3 x i32] [i32 87909934, i32 -2, i32 -1402097775], [3 x i32] zeroinitializer, [3 x i32] [i32 320804302, i32 7, i32 -2139698281]], [7 x [3 x i32]] [[3 x i32] [i32 1698185546, i32 0, i32 -2], [3 x i32] [i32 -1, i32 1023954582, i32 -2], [3 x i32] [i32 320804302, i32 -1579985206, i32 -1878118873], [3 x i32] [i32 -5, i32 1023954582, i32 0], [3 x i32] [i32 -10, i32 0, i32 -1893771394], [3 x i32] [i32 -1613798643, i32 7, i32 -1878118873], [3 x i32] [i32 653753375, i32 0, i32 -1]]], align 4
+@_ZL5g_983 = internal global i8*** @_ZL5g_984, align 4
+@_ZZL6func_1vE6l_1324 = private unnamed_addr constant [7 x [3 x [10 x i8****]]] [[3 x [10 x i8****]] [[10 x i8****] [i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983], [10 x i8****] [i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983], [10 x i8****] [i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983]], [3 x [10 x i8****]] [[10 x i8****] [i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983], [10 x i8****] [i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983], [10 x i8****] [i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983]], [3 x [10 x i8****]] [[10 x i8****] [i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983], [10 x i8****] [i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983], [10 x i8****] [i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983]], [3 x [10 x i8****]] [[10 x i8****] [i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983], [10 x i8****] [i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983], [10 x i8****] [i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983]], [3 x [10 x i8****]] [[10 x i8****] [i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983], [10 x i8****] [i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983], [10 x i8****] [i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** null, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** null, i8**** @_ZL5g_983, i8**** @_ZL5g_983]], [3 x [10 x i8****]] [[10 x i8****] [i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983], [10 x i8****] [i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983], [10 x i8****] [i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983]], [3 x [10 x i8****]] [[10 x i8****] [i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983], [10 x i8****] [i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** null, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** null, i8**** @_ZL5g_983, i8**** @_ZL5g_983], [10 x i8****] [i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983, i8**** @_ZL5g_983]]], align 4
+@_ZZL6func_1vE6l_1346 = private unnamed_addr constant [10 x i32] [i32 -2, i32 -2, i32 -2, i32 -2, i32 -2, i32 -2, i32 -2, i32 -2, i32 -2, i32 -2], align 4
+@_ZZL6func_1vE6l_1519 = private unnamed_addr constant [10 x %struct.S0] [%struct.S0 { i16 1, i8 91, i32 1 }, %struct.S0 { i16 1, i8 91, i32 1 }, %struct.S0 { i16 1, i8 91, i32 1 }, %struct.S0 { i16 1, i8 91, i32 1 }, %struct.S0 { i16 1, i8 91, i32 1 }, %struct.S0 { i16 1, i8 91, i32 1 }, %struct.S0 { i16 1, i8 91, i32 1 }, %struct.S0 { i16 1, i8 91, i32 1 }, %struct.S0 { i16 1, i8 91, i32 1 }, %struct.S0 { i16 1, i8 91, i32 1 }], align 8
+@_ZL5g_189 = internal constant %struct.S0* @_ZL4g_83, align 4
+@_ZZL6func_1vE6l_1263 = private unnamed_addr constant [2 x [1 x [8 x i32]]] [[1 x [8 x i32]] [[8 x i32] [i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1]], [1 x [8 x i32]] [[8 x i32] [i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1]]], align 4
+@_ZZL6func_1vE6l_1364 = private unnamed_addr constant %struct.S0 { i16 12857, i8 -1, i32 103472530 }, align 4
+@_ZZL6func_1vE6l_1204 = private unnamed_addr constant [10 x i32*] [i32* @_ZL5g_138, i32* bitcast (i8* getelementptr (i8* bitcast (%struct.S0* @_ZL5g_471 to i8*), i64 4) to i32*), i32* bitcast (i8* getelementptr (i8* bitcast (%struct.S0* @_ZL5g_471 to i8*), i64 4) to i32*), i32* @_ZL5g_138, i32* bitcast (i8* getelementptr (i8* bitcast (%struct.S0* @_ZL5g_471 to i8*), i64 4) to i32*), i32* bitcast (i8* getelementptr (i8* bitcast (%struct.S0* @_ZL5g_471 to i8*), i64 4) to i32*), i32* @_ZL5g_138, i32* bitcast (i8* getelementptr (i8* bitcast (%struct.S0* @_ZL5g_471 to i8*), i64 4) to i32*), i32* bitcast (i8* getelementptr (i8* bitcast (%struct.S0* @_ZL5g_471 to i8*), i64 4) to i32*), i32* @_ZL5g_138], align 4
+@_ZZL6func_1vE6l_1278 = private unnamed_addr constant [7 x [9 x [4 x i32]]] [[9 x [4 x i32]] [[4 x i32] [i32 0, i32 -9, i32 -608911817, i32 -1137618830], [4 x i32] [i32 -1673477626, i32 1178455578, i32 -1, i32 1], [4 x i32] [i32 1749634172, i32 -608911817, i32 -1750306944, i32 5], [4 x i32] [i32 -1, i32 -267173613, i32 1, i32 -267173613], [4 x i32] [i32 342924466, i32 -1137618830, i32 5, i32 0], [4 x i32] [i32 -1, i32 5, i32 -2032672910, i32 2], [4 x i32] [i32 -267173613, i32 1687884857, i32 -7, i32 0], [4 x i32] [i32 -267173613, i32 60247711, i32 -2032672910, i32 -829052586], [4 x i32] [i32 -1, i32 0, i32 5, i32 -9]], [9 x [4 x i32]] [[4 x i32] [i32 342924466, i32 6, i32 1, i32 -1750306944], [4 x i32] [i32 -1, i32 -2032672910, i32 -1750306944, i32 1], [4 x i32] [i32 1749634172, i32 -1, i32 -1, i32 1749634172], [4 x i32] [i32 -1673477626, i32 -920516504, i32 -608911817, i32 -5], [4 x i32] [i32 0, i32 -1, i32 1687884857, i32 0], [4 x i32] [i32 -829052586, i32 -1750306944, i32 1749634172, i32 0], [4 x i32] [i32 -1137618830, i32 -1, i32 342924466, i32 -5], [4 x i32] [i32 6, i32 -920516504, i32 -829052586, i32 1749634172], [4 x i32] [i32 1178455578, i32 -1, i32 1, i32 1]], [9 x [4 x i32]] [[4 x i32] [i32 0, i32 -2032672910, i32 -920516504, i32 -1750306944], [4 x i32] [i32 -852752877, i32 6, i32 -852752877, i32 -9], [4 x i32] [i32 1, i32 0, i32 6, i32 -829052586], [4 x i32] [i32 2, i32 60247711, i32 1, i32 0], [4 x i32] [i32 -608911817, i32 6, i32 -7, i32 -5], [4 x i32] [i32 -5, i32 0, i32 1749634172, i32 -1750306944], [4 x i32] [i32 -2032672910, i32 -1, i32 2, i32 -608911817], [4 x i32] [i32 2, i32 -608911817, i32 -1673477626, i32 0], [4 x i32] [i32 -267173613, i32 1, i32 -920516504, i32 -920516504]], [9 x [4 x i32]] [[4 x i32] [i32 -1692884230, i32 -1692884230, i32 1178455578, i32 -1], [4 x i32] [i32 1749634172, i32 1687884857, i32 0, i32 -1673477626], [4 x i32] [i32 -1, i32 -1750306944, i32 -1, i32 0], [4 x i32] [i32 1178455578, i32 -1750306944, i32 6, i32 -1673477626], [4 x i32] [i32 -1750306944, i32 1687884857, i32 1, i32 -1], [4 x i32] [i32 5, i32 -1692884230, i32 -1, i32 -920516504], [4 x i32] [i32 -1, i32 1, i32 1, i32 0], [4 x i32] [i32 -1, i32 -608911817, i32 -2032672910, i32 -608911817], [4 x i32] [i32 0, i32 -1, i32 0, i32 -1750306944]], [9 x [4 x i32]] [[4 x i32] [i32 -829052586, i32 0, i32 0, i32 -5], [4 x i32] [i32 -608911817, i32 6, i32 -1137618830, i32 -267173613], [4 x i32] [i32 -608911817, i32 -9, i32 0, i32 1178455578], [4 x i32] [i32 -829052586, i32 -267173613, i32 0, i32 1687884857], [4 x i32] [i32 0, i32 1749634172, i32 -2032672910, i32 1], [4 x i32] [i32 -1, i32 0, i32 1, i32 -7], [4 x i32] [i32 -1, i32 -1, i32 -1, i32 -1], [4 x i32] [i32 5, i32 -1673477626, i32 1, i32 0], [4 x i32] [i32 -1750306944, i32 1, i32 6, i32 342924466]], [9 x [4 x i32]] [[4 x i32] [i32 1178455578, i32 1, i32 -1, i32 342924466], [4 x i32] [i32 -1, i32 1, i32 0, i32 0], [4 x i32] [i32 1749634172, i32 -1673477626, i32 1178455578, i32 -1], [4 x i32] [i32 -1692884230, i32 -1, i32 -920516504, i32 -7], [4 x i32] [i32 -267173613, i32 0, i32 -1673477626, i32 1], [4 x i32] [i32 2, i32 1749634172, i32 2, i32 1687884857], [4 x i32] [i32 -2032672910, i32 -267173613, i32 1749634172, i32 1178455578], [4 x i32] [i32 -5, i32 -9, i32 -7, i32 -267173613], [4 x i32] [i32 1, i32 6, i32 -7, i32 -5]], [9 x [4 x i32]] [[4 x i32] [i32 -5, i32 0, i32 1749634172, i32 -1750306944], [4 x i32] [i32 -2032672910, i32 -1, i32 2, i32 -608911817], [4 x i32] [i32 2, i32 -608911817, i32 -1673477626, i32 0], [4 x i32] [i32 -267173613, i32 1, i32 -920516504, i32 -920516504], [4 x i32] [i32 -1692884230, i32 -1692884230, i32 1178455578, i32 -1], [4 x i32] [i32 1749634172, i32 1687884857, i32 0, i32 -1673477626], [4 x i32] [i32 -1, i32 -1750306944, i32 -1, i32 0], [4 x i32] [i32 1178455578, i32 -1750306944, i32 6, i32 -1673477626], [4 x i32] [i32 -1750306944, i32 1687884857, i32 1, i32 -1]]], align 4
+@_ZZL6func_1vE6l_1365 = private unnamed_addr constant [8 x [3 x [5 x i16]]] [[3 x [5 x i16]] [[5 x i16] [i16 -1, i16 -10870, i16 20658, i16 0, i16 3], [5 x i16] [i16 22073, i16 24925, i16 -13292, i16 -10870, i16 -1459], [5 x i16] [i16 1, i16 138, i16 7, i16 -26288, i16 7]], [3 x [5 x i16]] [[5 x i16] [i16 1, i16 1, i16 7, i16 5, i16 24925], [5 x i16] [i16 -30784, i16 0, i16 -13292, i16 -1, i16 -26288], [5 x i16] [i16 1, i16 9699, i16 20658, i16 5708, i16 1]], [3 x [5 x i16]] [[5 x i16] [i16 22073, i16 1, i16 20658, i16 -13292, i16 7], [5 x i16] [i16 0, i16 -1459, i16 5708, i16 -1459, i16 0], [5 x i16] [i16 0, i16 22073, i16 2965, i16 1, i16 -1459]], [3 x [5 x i16]] [[5 x i16] [i16 22073, i16 5, i16 -30784, i16 2965, i16 5708], [5 x i16] [i16 2965, i16 -30784, i16 5, i16 22073, i16 -1459], [5 x i16] [i16 1, i16 2965, i16 22073, i16 0, i16 0]], [3 x [5 x i16]] [[5 x i16] [i16 -1459, i16 5708, i16 -1459, i16 0, i16 7], [5 x i16] [i16 -13292, i16 20658, i16 1, i16 22073, i16 1], [5 x i16] [i16 5708, i16 7, i16 -1, i16 2965, i16 1]], [3 x [5 x i16]] [[5 x i16] [i16 31974, i16 -10870, i16 1, i16 1, i16 5], [5 x i16] [i16 1, i16 9699, i16 -1459, i16 -1459, i16 9699], [5 x i16] [i16 1, i16 9699, i16 22073, i16 -13292, i16 3]], [3 x [5 x i16]] [[5 x i16] [i16 -30784, i16 -10870, i16 5, i16 5708, i16 138], [5 x i16] [i16 1, i16 7, i16 -30784, i16 31974, i16 -26288], [5 x i16] [i16 -30784, i16 20658, i16 2965, i16 1, i16 22073]], [3 x [5 x i16]] [[5 x i16] [i16 1, i16 5708, i16 5708, i16 1, i16 22073], [5 x i16] [i16 1, i16 2965, i16 20658, i16 -30784, i16 -26288], [5 x i16] [i16 31974, i16 -30784, i16 7, i16 1, i16 138]]], align 2
+@_ZL5g_985 = internal global i8* @_ZL5g_304, align 4
+@_ZZL6func_1vE6l_1320 = private unnamed_addr constant <{ <{ { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] } }>, <{ { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] } }>, <{ { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] } }>, <{ { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] } }>, <{ { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] } }>, <{ { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] } }>, <{ { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] } }> }> <{ <{ { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] } }> <{ { i8, [3 x i8] } { i8 -38, [3 x i8] undef }, { i8, [3 x i8] } { i8 -5, [3 x i8] undef }, { i8, [3 x i8] } { i8 -71, [3 x i8] undef }, { i8, [3 x i8] } { i8 19, [3 x i8] undef }, { i8, [3 x i8] } { i8 126, [3 x i8] undef }, { i8, [3 x i8] } { i8 -87, [3 x i8] undef }, { i8, [3 x i8] } { i8 1, [3 x i8] undef }, { i8, [3 x i8] } { i8 -4, [3 x i8] undef }, { i8, [3 x i8] } { i8 8, [3 x i8] undef } }>, <{ { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] } }> <{ { i8, [3 x i8] } { i8 -4, [3 x i8] undef }, { i8, [3 x i8] } { i8 -4, [3 x i8] undef }, { i8, [3 x i8] } { i8 -5, [3 x i8] undef }, { i8, [3 x i8] } { i8 8, [3 x i8] undef }, { i8, [3 x i8] } { i8 8, [3 x i8] undef }, { i8, [3 x i8] } { i8 -5, [3 x i8] undef }, { i8, [3 x i8] } { i8 -4, [3 x i8] undef }, { i8, [3 x i8] } { i8 -4, [3 x i8] undef }, { i8, [3 x i8] } { i8 -87, [3 x i8] undef } }>, <{ { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] } }> <{ { i8, [3 x i8] } { i8 3, [3 x i8] undef }, { i8, [3 x i8] } { i8 43, [3 x i8] undef }, { i8, [3 x i8] } { i8 -125, [3 x i8] undef }, { i8, [3 x i8] } { i8 1, [3 x i8] undef }, { i8, [3 x i8] } { i8 1, [3 x i8] undef }, { i8, [3 x i8] } { i8 19, [3 x i8] undef }, { i8, [3 x i8] } { i8 -87, [3 x i8] undef }, { i8, [3 x i8] } { i8 -4, [3 x i8] undef }, { i8, [3 x i8] } { i8 -1, [3 x i8] undef } }>, <{ { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] } }> <{ { i8, [3 x i8] } { i8 3, [3 x i8] undef }, { i8, [3 x i8] } { i8 1, [3 x i8] undef }, { i8, [3 x i8] } { i8 -21, [3 x i8] undef }, { i8, [3 x i8] } { i8 118, [3 x i8] undef }, { i8, [3 x i8] } { i8 1, [3 x i8] undef }, { i8, [3 x i8] } { i8 -4, [3 x i8] undef }, { i8, [3 x i8] } { i8 0, [3 x i8] undef }, { i8, [3 x i8] } { i8 -1, [3 x i8] undef }, { i8, [3 x i8] } { i8 -87, [3 x i8] undef } }>, <{ { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] } }> <{ { i8, [3 x i8] } { i8 -1, [3 x i8] undef }, { i8, [3 x i8] } { i8 8, [3 x i8] undef }, { i8, [3 x i8] } { i8 1, [3 x i8] undef }, { i8, [3 x i8] } { i8 3, [3 x i8] undef }, { i8, [3 x i8] } { i8 0, [3 x i8] undef }, { i8, [3 x i8] } { i8 0, [3 x i8] undef }, { i8, [3 x i8] } { i8 3, [3 x i8] undef }, { i8, [3 x i8] } { i8 1, [3 x i8] undef }, { i8, [3 x i8] } { i8 8, [3 x i8] undef } }>, <{ { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] } }> <{ { i8, [3 x i8] } { i8 -1, [3 x i8] undef }, { i8, [3 x i8] } { i8 -87, [3 x i8] undef }, { i8, [3 x i8] } { i8 -1, [3 x i8] undef }, { i8, [3 x i8] } { i8 0, [3 x i8] undef }, { i8, [3 x i8] } { i8 -4, [3 x i8] undef }, { i8, [3 x i8] } { i8 1, [3 x i8] undef }, { i8, [3 x i8] } { i8 118, [3 x i8] undef }, { i8, [3 x i8] } { i8 -21, [3 x i8] undef }, { i8, [3 x i8] } { i8 1, [3 x i8] undef } }>, <{ { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] } }> <{ { i8, [3 x i8] } { i8 3, [3 x i8] undef }, { i8, [3 x i8] } { i8 -1, [3 x i8] undef }, { i8, [3 x i8] } { i8 -4, [3 x i8] undef }, { i8, [3 x i8] } { i8 -87, [3 x i8] undef }, { i8, [3 x i8] } { i8 19, [3 x i8] undef }, { i8, [3 x i8] } { i8 1, [3 x i8] undef }, { i8, [3 x i8] } { i8 1, [3 x i8] undef }, { i8, [3 x i8] } { i8 -125, [3 x i8] undef }, { i8, [3 x i8] } { i8 43, [3 x i8] undef } }> }>, align 4
+@_ZZL6func_1vE6l_1423 = private unnamed_addr constant %struct.S0 { i16 -14979, i8 -56, i32 1 }, align 4
+@_ZZL6func_1vE6l_1460 = private unnamed_addr constant [5 x [10 x i32]] [[10 x i32] [i32 -1, i32 -1, i32 -2111769585, i32 -10, i32 3, i32 -1, i32 -7, i32 -1, i32 -1, i32 -7], [10 x i32] [i32 -88107511, i32 -1, i32 -10, i32 -10, i32 -1, i32 -88107511, i32 -392857583, i32 -1, i32 1, i32 9], [10 x i32] [i32 9, i32 -1, i32 -1, i32 1, i32 -2111769585, i32 1, i32 -88107511, i32 1, i32 -2111769585, i32 1], [10 x i32] [i32 9, i32 1, i32 9, i32 -2, i32 -7, i32 -88107511, i32 -88107511, i32 -10, i32 1, i32 -2], [10 x i32] [i32 -1, i32 -88107511, i32 -10, i32 1, i32 -2, i32 -2, i32 1, i32 -10, i32 -88107511, i32 -1]], align 4
+@_ZL5g_197 = internal global [2 x [10 x i32*]] [[10 x i32*] [i32* @_ZL4g_93, i32* @_ZL4g_93, i32* @_ZL4g_93, i32* @_ZL4g_93, i32* @_ZL4g_93, i32* @_ZL4g_93, i32* @_ZL4g_93, i32* @_ZL4g_93, i32* @_ZL4g_93, i32* @_ZL4g_93], [10 x i32*] [i32* @_ZL4g_93, i32* @_ZL4g_93, i32* @_ZL4g_93, i32* @_ZL4g_93, i32* @_ZL4g_93, i32* @_ZL4g_93, i32* @_ZL4g_93, i32* @_ZL4g_93, i32* @_ZL4g_93, i32* @_ZL4g_93]], align 4
+@_ZZL6func_1vE6l_1443 = private unnamed_addr constant [7 x [5 x i32]] [[5 x i32] [i32 520842546, i32 -856207067, i32 2, i32 -3, i32 -1686173722], [5 x i32] [i32 1184089122, i32 -1017155828, i32 -3, i32 -691016572, i32 -3], [5 x i32] [i32 -3, i32 -3, i32 0, i32 2, i32 8], [5 x i32] [i32 -3, i32 -10, i32 8, i32 9, i32 7], [5 x i32] [i32 1184089122, i32 -1176025092, i32 -1686173722, i32 -8, i32 -1], [5 x i32] [i32 520842546, i32 -10, i32 -10, i32 520842546, i32 1752169706], [5 x i32] [i32 -856207067, i32 -3, i32 -10, i32 8, i32 9]], align 4
+@_ZZL6func_1vE6l_1461 = private unnamed_addr constant [10 x [1 x i32]] [[1 x i32] [i32 1], [1 x i32] [i32 -1], [1 x i32] [i32 1], [1 x i32] [i32 -1], [1 x i32] [i32 1], [1 x i32] [i32 -1], [1 x i32] [i32 1], [1 x i32] [i32 -1], [1 x i32] [i32 1], [1 x i32] [i32 -1]], align 4
+@_ZZL6func_1vE6l_1470 = private unnamed_addr constant %struct.S0 { i16 -30104, i8 -1, i32 6 }, align 4
+@_ZL6g_1353 = internal constant %struct.S0*** @_ZL6g_1354, align 4
+@_ZL6g_1354 = internal global %struct.S0** @_ZL6g_1355, align 4
+@_ZL6g_1355 = internal global %struct.S0* null, align 4
+@_ZL6g_1393 = internal global i32** @_ZL6g_1394, align 4
+@_ZL6g_1394 = internal global i32* @_ZL5g_546, align 4
+@_ZL5g_931 = internal global i32* @_ZL4g_53, align 4
+@_ZL6g_1162 = internal unnamed_addr global { i8, [3 x i8] } { i8 0, [3 x i8] undef }, align 4
+@_ZZL7func_20iitE4l_60 = private unnamed_addr constant %struct.S0 { i16 26262, i8 73, i32 1210384164 }, align 4
+@_ZZL7func_20iitE5l_757 = private unnamed_addr constant [1 x [9 x [4 x i16]]] [[9 x [4 x i16]] [[4 x i16] [i16 -1, i16 0, i16 0, i16 -1], [4 x i16] [i16 0, i16 -1, i16 0, i16 8], [4 x i16] [i16 0, i16 0, i16 -1, i16 0], [4 x i16] [i16 0, i16 8, i16 8, i16 0], [4 x i16] [i16 8, i16 0, i16 8, i16 8], [4 x i16] [i16 0, i16 0, i16 -1, i16 0], [4 x i16] [i16 0, i16 8, i16 8, i16 0], [4 x i16] [i16 8, i16 0, i16 8, i16 8], [4 x i16] [i16 0, i16 0, i16 -1, i16 0]]], align 2
+@_ZZL7func_20iitE5l_876 = private unnamed_addr constant [10 x i16] [i16 5, i16 0, i16 0, i16 5, i16 -9, i16 5, i16 0, i16 0, i16 5, i16 -9], align 2
+@_ZZL7func_20iitE5l_403 = private unnamed_addr constant [1 x [4 x i32*]] [[4 x i32*] [i32* @_ZL5g_135, i32* @_ZL5g_135, i32* @_ZL5g_135, i32* @_ZL5g_135]], align 4
+@_ZZL7func_20iitE5l_422 = private unnamed_addr constant %struct.S0 { i16 8, i8 95, i32 -1317782521 }, align 4
+@_ZZL7func_20iitE5l_516 = private unnamed_addr constant <{ { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] } }> <{ { i8, [3 x i8] } { i8 118, [3 x i8] undef }, { i8, [3 x i8] } { i8 118, [3 x i8] undef }, { i8, [3 x i8] } { i8 118, [3 x i8] undef }, { i8, [3 x i8] } { i8 118, [3 x i8] undef }, { i8, [3 x i8] } { i8 118, [3 x i8] undef }, { i8, [3 x i8] } { i8 118, [3 x i8] undef }, { i8, [3 x i8] } { i8 118, [3 x i8] undef }, { i8, [3 x i8] } { i8 118, [3 x i8] undef }, { i8, [3 x i8] } { i8 118, [3 x i8] undef } }>, align 4
+@_ZZL7func_20iitE5l_519 = private unnamed_addr constant %struct.S0 { i16 -1, i8 9, i32 -1103229061 }, align 4
+@_ZZL7func_20iitE5l_548 = private unnamed_addr constant [8 x [8 x i32]] [[8 x i32] [i32 6, i32 -1608903715, i32 -2, i32 -1608903715, i32 6, i32 -2, i32 2, i32 2], [8 x i32] [i32 3, i32 -1608903715, i32 -1, i32 -1, i32 -1608903715, i32 3, i32 7, i32 -1608903715], [8 x i32] [i32 2, i32 7, i32 -1, i32 2, i32 -1, i32 7, i32 2, i32 3], [8 x i32] [i32 -1608903715, i32 6, i32 -2, i32 2, i32 2, i32 -2, i32 6, i32 -1608903715], [8 x i32] [i32 3, i32 2, i32 7, i32 -1, i32 2, i32 -1, i32 7, i32 2], [8 x i32] [i32 -1608903715, i32 7, i32 3, i32 -1608903715, i32 -1, i32 -1, i32 -1608903715, i32 3], [8 x i32] [i32 2, i32 2, i32 -2, i32 6, i32 -1608903715, i32 -2, i32 -1608903715, i32 6], [8 x i32] [i32 3, i32 6, i32 3, i32 -1, i32 6, i32 7, i32 7, i32 6]], align 4
+@_ZZL7func_20iitE5l_495 = private unnamed_addr constant %struct.S0 { i16 -5, i8 -1, i32 -768235975 }, align 4
+@_ZZL7func_20iitE5l_467 = private unnamed_addr constant [6 x i32] [i32 1631231813, i32 1631231813, i32 1631231813, i32 1631231813, i32 1631231813, i32 1631231813], align 4
+@_ZZL7func_20iitE5l_513 = private unnamed_addr constant [2 x [3 x [9 x i16*]]] [[3 x [9 x i16*]] [[9 x i16*] [i16* @_ZL4g_79, i16* @_ZL4g_79, i16* @_ZL5g_103, i16* @_ZL4g_77, i16* @_ZL5g_361, i16* @_ZL5g_172, i16* @_ZL4g_77, i16* @_ZL5g_172, i16* @_ZL5g_361], [9 x i16*] [i16* @_ZL5g_361, i16* @_ZL5g_172, i16* @_ZL5g_172, i16* @_ZL5g_361, i16* @_ZL4g_79, i16* @_ZL5g_103, i16* null, i16* @_ZL4g_77, i16* null], [9 x i16*] [i16* @_ZL4g_77, i16* null, i16* @_ZL5g_103, i16* @_ZL5g_103, i16* null, i16* @_ZL4g_77, i16* @_ZL5g_308, i16* @_ZL4g_79, i16* null]], [3 x [9 x i16*]] [[9 x i16*] [i16* @_ZL5g_308, i16* @_ZL5g_103, i16* @_ZL4g_77, i16* @_ZL4g_79, i16* @_ZL4g_79, i16* @_ZL4g_77, i16* @_ZL5g_103, i16* @_ZL5g_308, i16* @_ZL5g_172], [9 x i16*] [i16* null, i16* @_ZL5g_103, i16* @_ZL4g_82, i16* @_ZL5g_361, i16* null, i16* null, i16* @_ZL5g_361, i16* @_ZL4g_82, i16* @_ZL4g_79], [9 x i16*] [i16* @_ZL5g_172, i16* @_ZL5g_308, i16* @_ZL4g_77, i16* @_ZL5g_361, i16* null, i16* @_ZL5g_308, i16* @_ZL5g_308, i16* null, i16* @_ZL5g_361]]], align 4
+@_ZZL7func_20iitE5l_589 = private unnamed_addr constant <{ { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] }, { i8, [3 x i8] } }> <{ { i8, [3 x i8] } { i8 -1, [3 x i8] undef }, { i8, [3 x i8] } { i8 -19, [3 x i8] undef }, { i8, [3 x i8] } { i8 -1, [3 x i8] undef }, { i8, [3 x i8] } { i8 -1, [3 x i8] undef }, { i8, [3 x i8] } { i8 -19, [3 x i8] undef }, { i8, [3 x i8] } { i8 -1, [3 x i8] undef } }>, align 4
+@_ZZL7func_20iitE5l_598 = private unnamed_addr constant [2 x [10 x %struct.S0]] [[10 x %struct.S0] [%struct.S0 { i16 23086, i8 -45, i32 -648996750 }, %struct.S0 { i16 -6, i8 -105, i32 -1 }, %struct.S0 { i16 23086, i8 -45, i32 -648996750 }, %struct.S0 { i16 23086, i8 -45, i32 -648996750 }, %struct.S0 { i16 -6, i8 -105, i32 -1 }, %struct.S0 { i16 23086, i8 -45, i32 -648996750 }, %struct.S0 { i16 23086, i8 -45, i32 -648996750 }, %struct.S0 { i16 -6, i8 -105, i32 -1 }, %struct.S0 { i16 23086, i8 -45, i32 -648996750 }, %struct.S0 { i16 23086, i8 -45, i32 -648996750 }], [10 x %struct.S0] [%struct.S0 { i16 -6, i8 -105, i32 -1 }, %struct.S0 { i16 -6, i8 -105, i32 -1 }, %struct.S0 { i16 -25976, i8 0, i32 1 }, %struct.S0 { i16 -6, i8 -105, i32 -1 }, %struct.S0 { i16 -6, i8 -105, i32 -1 }, %struct.S0 { i16 -25976, i8 0, i32 1 }, %struct.S0 { i16 -6, i8 -105, i32 -1 }, %struct.S0 { i16 -6, i8 -105, i32 -1 }, %struct.S0 { i16 -25976, i8 0, i32 1 }, %struct.S0 { i16 -6, i8 -105, i32 -1 }]], align 4
+@_ZZL7func_492S0E5l_178 = private unnamed_addr constant [3 x [5 x [9 x i16*]]] [[5 x [9 x i16*]] [[9 x i16*] [i16* getelementptr inbounds (%struct.S0* @_ZL4g_83, i32 0, i32 0), i16* @_ZL5g_162, i16* getelementptr inbounds (%struct.S0* @_ZL4g_83, i32 0, i32 0), i16* @_ZL5g_168, i16* @_ZL5g_168, i16* @_ZL5g_168, i16* @_ZL5g_168, i16* getelementptr inbounds (%struct.S0* @_ZL4g_83, i32 0, i32 0), i16* @_ZL5g_162], [9 x i16*] [i16* null, i16* @_ZL5g_168, i16* getelementptr inbounds (%struct.S0* @_ZL4g_83, i32 0, i32 0), i16* @_ZL5g_168, i16* getelementptr inbounds (%struct.S0* @_ZL4g_83, i32 0, i32 0), i16* getelementptr inbounds (%struct.S0* @_ZL4g_83, i32 0, i32 0), i16* @_ZL5g_162, i16* getelementptr inbounds (%struct.S0* @_ZL4g_83, i32 0, i32 0), i16* null], [9 x i16*] [i16* @_ZL5g_162, i16* @_ZL5g_168, i16* null, i16* null, i16* getelementptr inbounds (%struct.S0* @_ZL4g_83, i32 0, i32 0), i16* null, i16* null, i16* @_ZL5g_168, i16* getelementptr inbounds (%struct.S0* @_ZL4g_83, i32 0, i32 0)], [9 x i16*] [i16* @_ZL5g_162, i16* @_ZL5g_168, i16* getelementptr inbounds (%struct.S0* @_ZL4g_83, i32 0, i32 0), i16* @_ZL5g_162, i16* @_ZL5g_168, i16* @_ZL5g_162, i16* getelementptr inbounds (%struct.S0* @_ZL4g_83, i32 0, i32 0), i16* @_ZL5g_162, i16* getelementptr inbounds (%struct.S0* @_ZL4g_83, i32 0, i32 0)], [9 x i16*] [i16* null, i16* @_ZL5g_162, i16* null, i16* @_ZL5g_168, i16* @_ZL5g_162, i16* @_ZL5g_168, i16* getelementptr inbounds (%struct.S0* @_ZL4g_83, i32 0, i32 0), i16* null, i16* getelementptr inbounds (%struct.S0* @_ZL4g_83, i32 0, i32 0)]], [5 x [9 x i16*]] [[9 x i16*] [i16* null, i16* @_ZL5g_162, i16* null, i16* getelementptr inbounds (%struct.S0* @_ZL4g_83, i32 0, i32 0), i16* @_ZL5g_168, i16* @_ZL5g_162, i16* @_ZL5g_168, i16* @_ZL5g_168, i16* @_ZL5g_168], [9 x i16*] [i16* null, i16* @_ZL5g_168, i16* getelementptr inbounds (%struct.S0* @_ZL4g_83, i32 0, i32 0), i16* @_ZL5g_162, i16* getelementptr inbounds (%struct.S0* @_ZL4g_83, i32 0, i32 0), i16* @_ZL5g_162, i16* @_ZL5g_162, i16* @_ZL5g_162, i16* @_ZL5g_168], [9 x i16*] [i16* null, i16* null, i16* getelementptr inbounds (%struct.S0* @_ZL4g_83, i32 0, i32 0), i16* @_ZL5g_168, i16* @_ZL5g_168, i16* getelementptr inbounds (%struct.S0* @_ZL4g_83, i32 0, i32 0), i16* null, i16* null, i16* null], [9 x i16*] [i16* @_ZL5g_162, i16* @_ZL5g_168, i16* null, i16* null, i16* @_ZL5g_162, i16* null, i16* @_ZL5g_168, i16* @_ZL5g_162, i16* @_ZL5g_168], [9 x i16*] [i16* @_ZL5g_162, i16* getelementptr inbounds (%struct.S0* @_ZL4g_83, i32 0, i32 0), i16* getelementptr inbounds (%struct.S0* @_ZL4g_83, i32 0, i32 0), i16* getelementptr inbounds (%struct.S0* @_ZL4g_83, i32 0, i32 0), i16* @_ZL5g_168, i16* null, i16* getelementptr inbounds (%struct.S0* @_ZL4g_83, i32 0, i32 0), i16* @_ZL5g_168, i16* null]], [5 x [9 x i16*]] [[9 x i16*] [i16* null, i16* @_ZL5g_168, i16* null, i16* getelementptr inbounds (%struct.S0* @_ZL4g_83, i32 0, i32 0), i16* @_ZL5g_162, i16* null, i16* @_ZL5g_162, i16* @_ZL5g_162, i16* @_ZL5g_168], [9 x i16*] [i16* getelementptr inbounds (%struct.S0* @_ZL4g_83, i32 0, i32 0), i16* getelementptr inbounds (%struct.S0* @_ZL4g_83, i32 0, i32 0), i16* @_ZL5g_168, i16* @_ZL5g_168, i16* getelementptr inbounds (%struct.S0* @_ZL4g_83, i32 0, i32 0), i16* null, i16* @_ZL5g_162, i16* @_ZL5g_168, i16* @_ZL5g_168], [9 x i16*] [i16* getelementptr inbounds (%struct.S0* @_ZL4g_83, i32 0, i32 0), i16* null, i16* null, i16* @_ZL5g_168, i16* getelementptr inbounds (%struct.S0* @_ZL4g_83, i32 0, i32 0), i16* null, i16* null, i16* getelementptr inbounds (%struct.S0* @_ZL4g_83, i32 0, i32 0), i16* @_ZL5g_168], [9 x i16*] [i16* getelementptr inbounds (%struct.S0* @_ZL4g_83, i32 0, i32 0), i16* null, i16* getelementptr inbounds (%struct.S0* @_ZL4g_83, i32 0, i32 0), i16* getelementptr inbounds (%struct.S0* @_ZL4g_83, i32 0, i32 0), i16* null, i16* @_ZL5g_168, i16* @_ZL5g_168, i16* getelementptr inbounds (%struct.S0* @_ZL4g_83, i32 0, i32 0), i16* @_ZL5g_168], [9 x i16*] [i16* @_ZL5g_162, i16* @_ZL5g_168, i16* @_ZL5g_168, i16* @_ZL5g_168, i16* @_ZL5g_168, i16* @_ZL5g_162, i16* @_ZL5g_168, i16* @_ZL5g_168, i16* null]]], align 4
+@_ZZL7func_492S0E5l_198 = private unnamed_addr constant [4 x [1 x i32**]] [[1 x i32**] [i32** bitcast (i8* getelementptr (i8* bitcast ([2 x [10 x i32*]]* @_ZL5g_197 to i8*), i64 76) to i32**)], [1 x i32**] zeroinitializer, [1 x i32**] [i32** bitcast (i8* getelementptr (i8* bitcast ([2 x [10 x i32*]]* @_ZL5g_197 to i8*), i64 76) to i32**)], [1 x i32**] zeroinitializer], align 4
+@_ZZL7func_492S0E5l_119 = private unnamed_addr constant { i8, [3 x i8] } { i8 -3, [3 x i8] undef }, align 4
+@_ZZL7func_492S0E5l_125 = private unnamed_addr constant [8 x [4 x [6 x i32]]] [[4 x [6 x i32]] [[6 x i32] [i32 1, i32 -9, i32 2, i32 585837050, i32 1, i32 9], [6 x i32] [i32 -9, i32 0, i32 -5, i32 9, i32 1, i32 585837050], [6 x i32] [i32 735221361, i32 -9, i32 -626661945, i32 0, i32 -875020938, i32 -9], [6 x i32] [i32 -875020938, i32 -1969890654, i32 -5, i32 -1, i32 -1, i32 -5]], [4 x [6 x i32]] [[6 x i32] [i32 -875020938, i32 -875020938, i32 2, i32 0, i32 0, i32 1], [6 x i32] [i32 735221361, i32 -626661945, i32 -1969890654, i32 9, i32 -1, i32 2], [6 x i32] [i32 -9, i32 735221361, i32 -1969890654, i32 585837050, i32 -875020938, i32 1], [6 x i32] [i32 1, i32 585837050, i32 2, i32 -9, i32 1, i32 -5]], [4 x [6 x i32]] [[6 x i32] [i32 -9, i32 1, i32 -5, i32 -5, i32 1, i32 -9], [6 x i32] [i32 735221361, i32 585837050, i32 -626661945, i32 1, i32 -875020938, i32 585837050], [6 x i32] [i32 -875020938, i32 735221361, i32 -5, i32 2, i32 -1, i32 9], [6 x i32] [i32 -875020938, i32 -626661945, i32 2, i32 1, i32 0, i32 0]], [4 x [6 x i32]] [[6 x i32] [i32 735221361, i32 0, i32 0, i32 2, i32 -875020938, i32 -875020938], [6 x i32] [i32 735221361, i32 0, i32 0, i32 735221361, i32 0, i32 -5], [6 x i32] [i32 9, i32 735221361, i32 -626661945, i32 -1969890654, i32 9, i32 -1], [6 x i32] [i32 735221361, i32 -5, i32 2, i32 -1, i32 9, i32 -1969890654]], [4 x [6 x i32]] [[6 x i32] [i32 1, i32 735221361, i32 459562963, i32 -5, i32 0, i32 735221361], [6 x i32] [i32 0, i32 0, i32 2, i32 -875020938, i32 -875020938, i32 2], [6 x i32] [i32 0, i32 0, i32 -626661945, i32 -5, i32 -9, i32 9], [6 x i32] [i32 1, i32 459562963, i32 0, i32 -1, i32 -875020938, i32 -626661945]], [4 x [6 x i32]] [[6 x i32] [i32 735221361, i32 1, i32 0, i32 -1969890654, i32 0, i32 9], [6 x i32] [i32 9, i32 -1969890654, i32 -626661945, i32 735221361, i32 9, i32 2], [6 x i32] [i32 735221361, i32 9, i32 2, i32 2, i32 9, i32 735221361], [6 x i32] [i32 1, i32 -1969890654, i32 459562963, i32 9, i32 0, i32 -1969890654]], [4 x [6 x i32]] [[6 x i32] [i32 0, i32 1, i32 2, i32 -626661945, i32 -875020938, i32 -1], [6 x i32] [i32 0, i32 459562963, i32 -626661945, i32 9, i32 -9, i32 -5], [6 x i32] [i32 1, i32 0, i32 0, i32 2, i32 -875020938, i32 -875020938], [6 x i32] [i32 735221361, i32 0, i32 0, i32 735221361, i32 0, i32 -5]], [4 x [6 x i32]] [[6 x i32] [i32 9, i32 735221361, i32 -626661945, i32 -1969890654, i32 9, i32 -1], [6 x i32] [i32 735221361, i32 -5, i32 2, i32 -1, i32 9, i32 -1969890654], [6 x i32] [i32 1, i32 735221361, i32 459562963, i32 -5, i32 0, i32 735221361], [6 x i32] [i32 0, i32 0, i32 2, i32 -875020938, i32 -875020938, i32 2]]], align 4
+@_ZZL7func_492S0E5l_296 = private unnamed_addr constant [6 x [2 x [4 x i32]]] [[2 x [4 x i32]] [[4 x i32] [i32 -2, i32 5, i32 161729879, i32 884294967], [4 x i32] [i32 -1, i32 0, i32 -3, i32 884294967]], [2 x [4 x i32]] [[4 x i32] [i32 -1769297005, i32 5, i32 1, i32 0], [4 x i32] [i32 1136616794, i32 -1, i32 -1591181149, i32 -1]], [2 x [4 x i32]] [[4 x i32] [i32 5, i32 62548300, i32 -3, i32 -6], [4 x i32] [i32 59636063, i32 -2, i32 62548300, i32 59636063]], [2 x [4 x i32]] [[4 x i32] [i32 -2, i32 -1, i32 1, i32 1136616794], [4 x i32] [i32 -2, i32 -1769297005, i32 62548300, i32 884294967]], [2 x [4 x i32]] [[4 x i32] [i32 59636063, i32 1136616794, i32 -3, i32 -3], [4 x i32] [i32 5, i32 5, i32 -1591181149, i32 1136616794]], [2 x [4 x i32]] [[4 x i32] [i32 1136616794, i32 59636063, i32 1, i32 -1], [4 x i32] [i32 -1769297005, i32 -2, i32 -3, i32 1]]], align 4
+@_ZZL7func_40iaE5l_359 = private unnamed_addr constant [2 x [6 x [10 x i32*]]] [[6 x [10 x i32*]] [[10 x i32*] [i32* @_ZL3g_2, i32* @_ZL3g_2, i32* @_ZL5g_135, i32* @_ZL4g_93, i32* @_ZL3g_2, i32* null, i32* @_ZL3g_2, i32* @_ZL5g_132, i32* @_ZL5g_132, i32* @_ZL3g_2], [10 x i32*] [i32* @_ZL5g_257, i32* @_ZL4g_93, i32* @_ZL3g_2, i32* @_ZL3g_2, i32* @_ZL4g_93, i32* @_ZL5g_257, i32* @_ZL5g_132, i32* null, i32* @_ZL3g_2, i32* @_ZL5g_132], [10 x i32*] [i32* @_ZL5g_135, i32* null, i32* null, i32* @_ZL5g_135, i32* @_ZL4g_93, i32* @_ZL3g_2, i32* @_ZL3g_2, i32* @_ZL3g_2, i32* @_ZL3g_2, i32* @_ZL5g_257], [10 x i32*] [i32* @_ZL5g_135, i32* @_ZL3g_2, i32* null, i32* @_ZL5g_135, i32* @_ZL4g_93, i32* @_ZL5g_257, i32* null, i32* null, i32* @_ZL5g_132, i32* @_ZL3g_2], [10 x i32*] [i32* null, i32* null, i32* null, i32* @_ZL5g_132, i32* @_ZL3g_2, i32* @_ZL3g_2, i32* @_ZL4g_93, i32* @_ZL3g_2, i32* @_ZL5g_132, i32* @_ZL5g_257], [10 x i32*] [i32* @_ZL5g_257, i32* @_ZL5g_132, i32* @_ZL3g_2, i32* @_ZL5g_132, i32* @_ZL3g_2, i32* @_ZL3g_2, i32* @_ZL4g_93, i32* @_ZL3g_2, i32* @_ZL3g_2, i32* @_ZL3g_2]], [6 x [10 x i32*]] [[10 x i32*] [i32* @_ZL4g_93, i32* null, i32* null, i32* @_ZL5g_135, i32* @_ZL5g_132, i32* @_ZL5g_132, i32* @_ZL5g_135, i32* null, i32* null, i32* @_ZL4g_93], [10 x i32*] [i32* @_ZL5g_257, i32* @_ZL5g_257, i32* @_ZL3g_2, i32* @_ZL5g_132, i32* @_ZL3g_2, i32* @_ZL3g_2, i32* @_ZL4g_93, i32* @_ZL5g_257, i32* null, i32* @_ZL5g_257], [10 x i32*] [i32* @_ZL5g_135, i32* @_ZL3g_2, i32* @_ZL3g_2, i32* @_ZL5g_257, i32* @_ZL3g_2, i32* @_ZL3g_2, i32* @_ZL5g_132, i32* @_ZL4g_93, i32* @_ZL4g_93, i32* @_ZL4g_93], [10 x i32*] [i32* @_ZL3g_2, i32* @_ZL4g_93, i32* @_ZL5g_132, i32* @_ZL5g_132, i32* @_ZL5g_132, i32* @_ZL4g_93, i32* @_ZL3g_2, i32* @_ZL5g_257, i32* @_ZL5g_257, i32* @_ZL3g_2], [10 x i32*] [i32* null, i32* @_ZL3g_2, i32* @_ZL3g_2, i32* @_ZL5g_132, i32* @_ZL3g_2, i32* @_ZL5g_257, i32* null, i32* @_ZL5g_135, i32* @_ZL3g_2, i32* @_ZL5g_257], [10 x i32*] [i32* @_ZL5g_132, i32* @_ZL3g_2, i32* @_ZL3g_2, i32* @_ZL4g_93, i32* @_ZL3g_2, i32* @_ZL3g_2, i32* @_ZL3g_2, i32* @_ZL3g_2, i32* @_ZL3g_2, i32* @_ZL3g_2]]], align 4
+@_ZZL7func_32tiPaE5l_369 = private unnamed_addr constant %struct.S0 { i16 -4, i8 1, i32 -4 }, align 4
+@_ZZL7func_32tiPaE5l_382 = private unnamed_addr constant [6 x [1 x i16*]] [[1 x i16*] [i16* @_ZL5g_308], [1 x i16*] zeroinitializer, [1 x i16*] zeroinitializer, [1 x i16*] [i16* @_ZL5g_308], [1 x i16*] zeroinitializer, [1 x i16*] zeroinitializer], align 4
+@_ZZL7func_32tiPaE5l_387 = private unnamed_addr constant %struct.S0 { i16 16776, i8 55, i32 1410444512 }, align 4
+@_ZZL7func_32tiPaE5l_392 = private unnamed_addr constant [10 x [8 x i8]] [[8 x i8] c"\06\83r\00r\83\06\00", [8 x i8] c"\06\C7r\00r\C7\06\00", [8 x i8] c"\06\83r\00r\83\06\00", [8 x i8] c"\06\C7r\00r\C7\06\00", [8 x i8] c"\06\83r\00r\83\06\00", [8 x i8] c"\06\C7r\00r\C7\06\00", [8 x i8] c"\06\83r\00r\83\06\00", [8 x i8] c"\06\C7r\00r\C7\06\00", [8 x i8] c"\06\83r\00r\83\06\00", [8 x i8] c"\06\C7r\00r\C7\06\00"], align 1
+@_ZZL7func_26jPKaPaS1_iE5l_398 = private unnamed_addr constant [9 x [8 x i8]] [[8 x i8] c"c\9E\00\9Eco\00o", [8 x i8] c"co\00oc\9E\00\9E", [8 x i8] c"c\9E\00\9Eco\00o", [8 x i8] c"co\00oc\9E\00\9E", [8 x i8] c"c\9E\00\9Eco\00o", [8 x i8] c"co\00oc\9E\00\9E", [8 x i8] c"c\9E\00\9Eco\00o", [8 x i8] c"co\00oc\9E\00\9E", [8 x i8] c"c\9E\00\9Eco\00o"], align 1
+@_ZZL6func_8ijPasS_E6l_1016 = private unnamed_addr constant [5 x [3 x i32*]] [[3 x i32*] [i32* @_ZL5g_257, i32* @_ZL4g_93, i32* @_ZL4g_93], [3 x i32*] [i32* @_ZL5g_257, i32* @_ZL4g_93, i32* @_ZL4g_93], [3 x i32*] [i32* @_ZL5g_257, i32* @_ZL4g_93, i32* @_ZL4g_93], [3 x i32*] [i32* @_ZL5g_257, i32* @_ZL4g_93, i32* @_ZL4g_93], [3 x i32*] [i32* @_ZL5g_257, i32* @_ZL4g_93, i32* @_ZL4g_93]], align 4
+@_ZZL6func_5PahE6l_1024 = private unnamed_addr constant [6 x i32*] [i32* null, i32* @_ZL3g_2, i32* @_ZL3g_2, i32* null, i32* @_ZL3g_2, i32* @_ZL3g_2], align 4
+@_gm_ = internal global %struct.malloc_state zeroinitializer, align 4
+@mparams = internal global %struct.malloc_params zeroinitializer, align 4
+@stderr = external constant %struct._IO_FILE*
+@.str49 = private unnamed_addr constant [26 x i8] c"max system bytes = %10lu\0A\00", align 1
+@.str150 = private unnamed_addr constant [26 x i8] c"system bytes = %10lu\0A\00", align 1
+@.str251 = private unnamed_addr constant [26 x i8] c"in use bytes = %10lu\0A\00", align 1
+@_ZSt7nothrow = constant %"struct.std::nothrow_t" undef, align 1
+@_ZL13__new_handler = internal global void ()* null, align 4
+@_ZTVSt9bad_alloc = unnamed_addr constant [5 x i8*] [i8* null, i8* bitcast ({ i8*, i8*, i8* }* @_ZTISt9bad_alloc to i8*), i8* bitcast (void (%"class.std::bad_alloc"*)* @_ZNSt9bad_allocD2Ev to i8*), i8* bitcast (void (%"class.std::bad_alloc"*)* @_ZNSt9bad_allocD0Ev to i8*), i8* bitcast (i8* (%"class.std::bad_alloc"*)* @_ZNKSt9bad_alloc4whatEv to i8*)]
+@.str352 = private unnamed_addr constant [15 x i8] c"std::bad_alloc\00", align 1
+@_ZTVSt20bad_array_new_length = unnamed_addr constant [5 x i8*] [i8* null, i8* bitcast ({ i8*, i8*, i8* }* @_ZTISt20bad_array_new_length to i8*), i8* bitcast (void (%"class.std::bad_alloc"*)* @_ZNSt9bad_allocD2Ev to i8*), i8* bitcast (void (%"class.std::bad_array_new_length"*)* @_ZNSt20bad_array_new_lengthD0Ev to i8*), i8* bitcast (i8* (%"class.std::bad_array_new_length"*)* @_ZNKSt20bad_array_new_length4whatEv to i8*)]
+@.str1453 = private unnamed_addr constant [17 x i8] c"bad_array_length\00", align 1
+@_ZTVSt16bad_array_length = unnamed_addr constant [5 x i8*] [i8* null, i8* bitcast ({ i8*, i8*, i8* }* @_ZTISt16bad_array_length to i8*), i8* bitcast (void (%"class.std::bad_alloc"*)* @_ZNSt9bad_allocD2Ev to i8*), i8* bitcast (void (%"class.std::bad_array_length"*)* @_ZNSt16bad_array_lengthD0Ev to i8*), i8* bitcast (i8* (%"class.std::bad_array_length"*)* @_ZNKSt16bad_array_length4whatEv to i8*)]
+@.str2554 = private unnamed_addr constant [21 x i8] c"bad_array_new_length\00", align 1
+@_ZTVN10__cxxabiv120__si_class_type_infoE = external global i8*
+@_ZTSSt9bad_alloc = constant [13 x i8] c"St9bad_alloc\00"
+@_ZTISt9exception = external constant i8*
+@_ZTISt9bad_alloc = unnamed_addr constant { i8*, i8*, i8* } { i8* bitcast (i8** getelementptr inbounds (i8** @_ZTVN10__cxxabiv120__si_class_type_infoE, i32 2) to i8*), i8* getelementptr inbounds ([13 x i8]* @_ZTSSt9bad_alloc, i32 0, i32 0), i8* bitcast (i8** @_ZTISt9exception to i8*) }
+@_ZTSSt20bad_array_new_length = constant [25 x i8] c"St20bad_array_new_length\00"
+@_ZTISt20bad_array_new_length = unnamed_addr constant { i8*, i8*, i8* } { i8* bitcast (i8** getelementptr inbounds (i8** @_ZTVN10__cxxabiv120__si_class_type_infoE, i32 2) to i8*), i8* getelementptr inbounds ([25 x i8]* @_ZTSSt20bad_array_new_length, i32 0, i32 0), i8* bitcast ({ i8*, i8*, i8* }* @_ZTISt9bad_alloc to i8*) }
+@_ZTSSt16bad_array_length = constant [21 x i8] c"St16bad_array_length\00"
+@_ZTISt16bad_array_length = unnamed_addr constant { i8*, i8*, i8* } { i8* bitcast (i8** getelementptr inbounds (i8** @_ZTVN10__cxxabiv120__si_class_type_infoE, i32 2) to i8*), i8* getelementptr inbounds ([21 x i8]* @_ZTSSt16bad_array_length, i32 0, i32 0), i8* bitcast ({ i8*, i8*, i8* }* @_ZTISt9bad_alloc to i8*) }
+@.str655 = private unnamed_addr constant [9 x i8] c"infinity\00", align 1
+@.str1756 = private unnamed_addr constant [4 x i8] c"nan\00", align 1
+@decfloat.th = internal unnamed_addr constant [2 x i32] [i32 9007199, i32 254740991], align 4
+@decfloat.p10s = internal unnamed_addr constant [8 x i32] [i32 10, i32 100, i32 1000, i32 10000, i32 100000, i32 1000000, i32 10000000, i32 100000000], align 4
+
+@_ZNSt9bad_allocC1Ev = alias void (%"class.std::bad_alloc"*)* @_ZNSt9bad_allocC2Ev
+@_ZNSt9bad_allocD1Ev = alias void (%"class.std::bad_alloc"*)* @_ZNSt9bad_allocD2Ev
+@_ZNSt20bad_array_new_lengthC1Ev = alias void (%"class.std::bad_array_new_length"*)* @_ZNSt20bad_array_new_lengthC2Ev
+@_ZNSt20bad_array_new_lengthD1Ev = alias bitcast (void (%"class.std::bad_alloc"*)* @_ZNSt9bad_allocD2Ev to void (%"class.std::bad_array_new_length"*)*)
+@_ZNSt20bad_array_new_lengthD2Ev = alias bitcast (void (%"class.std::bad_alloc"*)* @_ZNSt9bad_allocD2Ev to void (%"class.std::bad_array_new_length"*)*)
+@_ZNSt16bad_array_lengthC1Ev = alias void (%"class.std::bad_array_length"*)* @_ZNSt16bad_array_lengthC2Ev
+@_ZNSt16bad_array_lengthD1Ev = alias bitcast (void (%"class.std::bad_alloc"*)* @_ZNSt9bad_allocD2Ev to void (%"class.std::bad_array_length"*)*)
+@_ZNSt16bad_array_lengthD2Ev = alias bitcast (void (%"class.std::bad_alloc"*)* @_ZNSt9bad_allocD2Ev to void (%"class.std::bad_array_length"*)*)
+@__strtof_l = alias weak float (i8*, i8**, %struct.__locale_struct*)* @strtof_l
+@__strtod_l = alias weak double (i8*, i8**, %struct.__locale_struct.0*)* @strtod_l
+@__strtold_l = alias weak double (i8*, i8**, %struct.__locale_struct.1*)* @strtold_l
+
+; Function Attrs: nounwind
+define i32 @main(i32 %argc, i8** nocapture %argv) #0 {
+entry:
+ %cmp = icmp eq i32 %argc, 2
+ br i1 %cmp, label %land.lhs.true, label %if.end
+
+land.lhs.true: ; preds = %entry
+ %arrayidx = getelementptr inbounds i8** %argv, i32 1
+ %0 = load i8** %arrayidx, align 4, !tbaa !0
+ %call = tail call i32 @strcmp(i8* %0, i8* getelementptr inbounds ([2 x i8]* @.str, i32 0, i32 0))
+ %cmp1 = icmp eq i32 %call, 0
+ %. = zext i1 %cmp1 to i32
+ br label %if.end
+
+if.end: ; preds = %land.lhs.true, %entry
+ %print_hash_value.0 = phi i32 [ 0, %entry ], [ %., %land.lhs.true ]
+ tail call fastcc void @_ZL12crc32_gentabv()
+ tail call fastcc void @_ZL6func_1v()
+ %1 = load i32* @_ZL3g_2, align 4, !tbaa !3
+ %conv = sext i32 %1 to i64
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 %conv, i8* getelementptr inbounds ([4 x i8]* @.str1, i32 0, i32 0), i32 %print_hash_value.0)
+ %tobool = icmp eq i32 %print_hash_value.0, 0
+ br label %for.cond4.preheader
+
+for.cond4.preheader: ; preds = %for.inc20, %if.end
+ %i.075 = phi i32 [ 0, %if.end ], [ %inc21, %for.inc20 ]
+ br label %for.body9
+
+for.body9: ; preds = %for.inc.5, %for.cond4.preheader
+ %j.074 = phi i32 [ 0, %for.cond4.preheader ], [ %inc18, %for.inc.5 ]
+ %arrayidx12 = getelementptr inbounds [4 x [6 x [6 x i8]]]* @_ZL4g_52, i32 0, i32 %i.075, i32 %j.074, i32 0
+ %2 = load i8* %arrayidx12, align 1, !tbaa !1
+ %conv13 = sext i8 %2 to i64
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 %conv13, i8* getelementptr inbounds ([14 x i8]* @.str2, i32 0, i32 0), i32 %print_hash_value.0)
+ br i1 %tobool, label %for.inc.1.critedge, label %if.then14
+
+if.then14: ; preds = %for.body9
+ %call15 = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([22 x i8]* @.str3, i32 0, i32 0), i32 %i.075, i32 %j.074, i32 0)
+ %arrayidx12.1 = getelementptr inbounds [4 x [6 x [6 x i8]]]* @_ZL4g_52, i32 0, i32 %i.075, i32 %j.074, i32 1
+ %3 = load i8* %arrayidx12.1, align 1, !tbaa !1
+ %conv13.1 = sext i8 %3 to i64
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 %conv13.1, i8* getelementptr inbounds ([14 x i8]* @.str2, i32 0, i32 0), i32 %print_hash_value.0)
+ %call15.1 = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([22 x i8]* @.str3, i32 0, i32 0), i32 %i.075, i32 %j.074, i32 1)
+ br label %for.inc.1
+
+for.inc20: ; preds = %for.inc.5
+ %inc21 = add nsw i32 %i.075, 1
+ %exitcond76 = icmp eq i32 %inc21, 4
+ br i1 %exitcond76, label %for.body45, label %for.cond4.preheader
+
+for.body45: ; preds = %for.inc20
+ %4 = load i32* @_ZL4g_53, align 4, !tbaa !3
+ %conv23 = sext i32 %4 to i64
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 %conv23, i8* getelementptr inbounds ([5 x i8]* @.str4, i32 0, i32 0), i32 %print_hash_value.0)
+ %5 = load i8* getelementptr inbounds ({ i8, [3 x i8] }* @_ZL4g_74, i32 0, i32 0), align 4, !tbaa !1
+ %conv24 = zext i8 %5 to i64
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 %conv24, i8* getelementptr inbounds ([8 x i8]* @.str5, i32 0, i32 0), i32 %print_hash_value.0)
+ %6 = load i8* getelementptr inbounds ({ i8, [3 x i8] }* @_ZL4g_74, i32 0, i32 0), align 4, !tbaa !1
+ %conv25 = sext i8 %6 to i64
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 %conv25, i8* getelementptr inbounds ([8 x i8]* @.str6, i32 0, i32 0), i32 %print_hash_value.0)
+ %7 = load i16* @_ZL4g_77, align 2, !tbaa !4
+ %conv26 = zext i16 %7 to i64
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 %conv26, i8* getelementptr inbounds ([5 x i8]* @.str7, i32 0, i32 0), i32 %print_hash_value.0)
+ %8 = load i16* @_ZL4g_79, align 2, !tbaa !4
+ %conv27 = zext i16 %8 to i64
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 %conv27, i8* getelementptr inbounds ([5 x i8]* @.str8, i32 0, i32 0), i32 %print_hash_value.0)
+ %9 = load i16* @_ZL4g_82, align 2, !tbaa !4
+ %conv28 = zext i16 %9 to i64
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 %conv28, i8* getelementptr inbounds ([5 x i8]* @.str9, i32 0, i32 0), i32 %print_hash_value.0)
+ %10 = load i16* getelementptr inbounds (%struct.S0* @_ZL4g_83, i32 0, i32 0), align 8, !tbaa !4
+ %conv29 = sext i16 %10 to i64
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 %conv29, i8* getelementptr inbounds ([8 x i8]* @.str10, i32 0, i32 0), i32 %print_hash_value.0)
+ %11 = load i8* getelementptr inbounds (%struct.S0* @_ZL4g_83, i32 0, i32 1), align 2, !tbaa !1
+ %conv30 = sext i8 %11 to i64
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 %conv30, i8* getelementptr inbounds ([8 x i8]* @.str11, i32 0, i32 0), i32 %print_hash_value.0)
+ %12 = load i32* getelementptr inbounds (%struct.S0* @_ZL4g_83, i32 0, i32 2), align 4, !tbaa !3
+ %conv31 = zext i32 %12 to i64
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 %conv31, i8* getelementptr inbounds ([8 x i8]* @.str12, i32 0, i32 0), i32 %print_hash_value.0)
+ %13 = load i32* @_ZL4g_93, align 4, !tbaa !3
+ %conv32 = sext i32 %13 to i64
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 %conv32, i8* getelementptr inbounds ([5 x i8]* @.str13, i32 0, i32 0), i32 %print_hash_value.0)
+ %14 = load i16* @_ZL5g_103, align 2, !tbaa !4
+ %conv33 = zext i16 %14 to i64
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 %conv33, i8* getelementptr inbounds ([6 x i8]* @.str14, i32 0, i32 0), i32 %print_hash_value.0)
+ %15 = load i8* @_ZL5g_126, align 1, !tbaa !1
+ %conv34 = sext i8 %15 to i64
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 %conv34, i8* getelementptr inbounds ([6 x i8]* @.str15, i32 0, i32 0), i32 %print_hash_value.0)
+ %16 = load i32* @_ZL5g_132, align 4, !tbaa !3
+ %conv35 = sext i32 %16 to i64
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 %conv35, i8* getelementptr inbounds ([6 x i8]* @.str16, i32 0, i32 0), i32 %print_hash_value.0)
+ %17 = load i8* @_ZL5g_133, align 1, !tbaa !1
+ %conv36 = sext i8 %17 to i64
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 %conv36, i8* getelementptr inbounds ([6 x i8]* @.str17, i32 0, i32 0), i32 %print_hash_value.0)
+ %18 = load i32* @_ZL5g_135, align 4, !tbaa !3
+ %conv37 = sext i32 %18 to i64
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 %conv37, i8* getelementptr inbounds ([6 x i8]* @.str18, i32 0, i32 0), i32 %print_hash_value.0)
+ %19 = load i8* @_ZL5g_136, align 1, !tbaa !1
+ %conv38 = sext i8 %19 to i64
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 %conv38, i8* getelementptr inbounds ([6 x i8]* @.str19, i32 0, i32 0), i32 %print_hash_value.0)
+ %20 = load i32* @_ZL5g_138, align 4, !tbaa !3
+ %conv39 = zext i32 %20 to i64
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 %conv39, i8* getelementptr inbounds ([6 x i8]* @.str20, i32 0, i32 0), i32 %print_hash_value.0)
+ %21 = load i16* @_ZL5g_162, align 2, !tbaa !4
+ %conv40 = sext i16 %21 to i64
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 %conv40, i8* getelementptr inbounds ([6 x i8]* @.str21, i32 0, i32 0), i32 %print_hash_value.0)
+ %22 = load i16* @_ZL5g_168, align 2, !tbaa !4
+ %conv41 = sext i16 %22 to i64
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 %conv41, i8* getelementptr inbounds ([6 x i8]* @.str22, i32 0, i32 0), i32 %print_hash_value.0)
+ %23 = load i8* @_ZL5g_170, align 1, !tbaa !1
+ %conv42 = zext i8 %23 to i64
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 %conv42, i8* getelementptr inbounds ([6 x i8]* @.str23, i32 0, i32 0), i32 %print_hash_value.0)
+ %tobool48 = icmp eq i32 %print_hash_value.0, 0
+ %24 = load i8* getelementptr inbounds ([8 x i8]* @_ZL5g_171, i32 0, i32 0), align 1, !tbaa !1
+ %conv47 = sext i8 %24 to i64
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 %conv47, i8* getelementptr inbounds ([9 x i8]* @.str24, i32 0, i32 0), i32 %print_hash_value.0)
+ br i1 %tobool48, label %for.inc52.6.thread, label %if.then49.7
+
+for.inc52.6.thread: ; preds = %for.body45
+ %25 = load i8* getelementptr inbounds ([8 x i8]* @_ZL5g_171, i32 0, i32 1), align 1, !tbaa !1
+ %conv47.177 = sext i8 %25 to i64
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 %conv47.177, i8* getelementptr inbounds ([9 x i8]* @.str24, i32 0, i32 0), i32 %print_hash_value.0)
+ %26 = load i8* getelementptr inbounds ([8 x i8]* @_ZL5g_171, i32 0, i32 2), align 1, !tbaa !1
+ %conv47.278 = sext i8 %26 to i64
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 %conv47.278, i8* getelementptr inbounds ([9 x i8]* @.str24, i32 0, i32 0), i32 %print_hash_value.0)
+ %27 = load i8* getelementptr inbounds ([8 x i8]* @_ZL5g_171, i32 0, i32 3), align 1, !tbaa !1
+ %conv47.379 = sext i8 %27 to i64
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 %conv47.379, i8* getelementptr inbounds ([9 x i8]* @.str24, i32 0, i32 0), i32 %print_hash_value.0)
+ %28 = load i8* getelementptr inbounds ([8 x i8]* @_ZL5g_171, i32 0, i32 4), align 1, !tbaa !1
+ %conv47.480 = sext i8 %28 to i64
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 %conv47.480, i8* getelementptr inbounds ([9 x i8]* @.str24, i32 0, i32 0), i32 %print_hash_value.0)
+ %29 = load i8* getelementptr inbounds ([8 x i8]* @_ZL5g_171, i32 0, i32 5), align 1, !tbaa !1
+ %conv47.581 = sext i8 %29 to i64
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 %conv47.581, i8* getelementptr inbounds ([9 x i8]* @.str24, i32 0, i32 0), i32 %print_hash_value.0)
+ %30 = load i8* getelementptr inbounds ([8 x i8]* @_ZL5g_171, i32 0, i32 6), align 1, !tbaa !1
+ %conv47.682 = sext i8 %30 to i64
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 %conv47.682, i8* getelementptr inbounds ([9 x i8]* @.str24, i32 0, i32 0), i32 %print_hash_value.0)
+ %31 = load i8* getelementptr inbounds ([8 x i8]* @_ZL5g_171, i32 0, i32 7), align 1, !tbaa !1
+ %conv47.783 = sext i8 %31 to i64
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 %conv47.783, i8* getelementptr inbounds ([9 x i8]* @.str24, i32 0, i32 0), i32 %print_hash_value.0)
+ br label %for.body70
+
+for.body70: ; preds = %if.then49.7, %for.inc52.6.thread
+ %32 = load i16* @_ZL5g_172, align 2, !tbaa !4
+ %conv55 = zext i16 %32 to i64
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 %conv55, i8* getelementptr inbounds ([6 x i8]* @.str26, i32 0, i32 0), i32 %print_hash_value.0)
+ %33 = load i32* @_ZL5g_257, align 4, !tbaa !3
+ %conv56 = sext i32 %33 to i64
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 %conv56, i8* getelementptr inbounds ([6 x i8]* @.str27, i32 0, i32 0), i32 %print_hash_value.0)
+ %34 = load i8* @_ZL5g_304, align 1, !tbaa !1
+ %conv57 = sext i8 %34 to i64
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 %conv57, i8* getelementptr inbounds ([6 x i8]* @.str28, i32 0, i32 0), i32 %print_hash_value.0)
+ %35 = load i16* @_ZL5g_308, align 2, !tbaa !4
+ %conv58 = zext i16 %35 to i64
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 %conv58, i8* getelementptr inbounds ([6 x i8]* @.str29, i32 0, i32 0), i32 %print_hash_value.0)
+ %36 = load i16* @_ZL5g_361, align 2, !tbaa !4
+ %conv59 = zext i16 %36 to i64
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 %conv59, i8* getelementptr inbounds ([6 x i8]* @.str30, i32 0, i32 0), i32 %print_hash_value.0)
+ %37 = load i32* @_ZL5g_400, align 4, !tbaa !3
+ %conv60 = sext i32 %37 to i64
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 %conv60, i8* getelementptr inbounds ([6 x i8]* @.str31, i32 0, i32 0), i32 %print_hash_value.0)
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 -1, i8* getelementptr inbounds ([6 x i8]* @.str32, i32 0, i32 0), i32 %print_hash_value.0)
+ %38 = load i16* getelementptr inbounds (%struct.S0* @_ZL5g_471, i32 0, i32 0), align 8, !tbaa !4
+ %conv62 = sext i16 %38 to i64
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 %conv62, i8* getelementptr inbounds ([9 x i8]* @.str33, i32 0, i32 0), i32 %print_hash_value.0)
+ %39 = load i8* getelementptr inbounds (%struct.S0* @_ZL5g_471, i32 0, i32 1), align 2, !tbaa !1
+ %conv63 = sext i8 %39 to i64
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 %conv63, i8* getelementptr inbounds ([9 x i8]* @.str34, i32 0, i32 0), i32 %print_hash_value.0)
+ %40 = load i32* getelementptr inbounds (%struct.S0* @_ZL5g_471, i32 0, i32 2), align 4, !tbaa !3
+ %conv64 = zext i32 %40 to i64
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 %conv64, i8* getelementptr inbounds ([9 x i8]* @.str35, i32 0, i32 0), i32 %print_hash_value.0)
+ %41 = load i32* @_ZL5g_546, align 4, !tbaa !3
+ %conv65 = sext i32 %41 to i64
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 %conv65, i8* getelementptr inbounds ([6 x i8]* @.str36, i32 0, i32 0), i32 %print_hash_value.0)
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 2891502546, i8* getelementptr inbounds ([6 x i8]* @.str37, i32 0, i32 0), i32 %print_hash_value.0)
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 255, i8* getelementptr inbounds ([6 x i8]* @.str38, i32 0, i32 0), i32 %print_hash_value.0)
+ %tobool73 = icmp eq i32 %print_hash_value.0, 0
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 3761930302, i8* getelementptr inbounds ([9 x i8]* @.str39, i32 0, i32 0), i32 %print_hash_value.0)
+ br i1 %tobool73, label %for.inc77.8.thread, label %if.then74.9
+
+for.inc77.8.thread: ; preds = %for.body70
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 3761930302, i8* getelementptr inbounds ([9 x i8]* @.str39, i32 0, i32 0), i32 %print_hash_value.0)
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 1950933783, i8* getelementptr inbounds ([9 x i8]* @.str39, i32 0, i32 0), i32 %print_hash_value.0)
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 3761930302, i8* getelementptr inbounds ([9 x i8]* @.str39, i32 0, i32 0), i32 %print_hash_value.0)
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 3761930302, i8* getelementptr inbounds ([9 x i8]* @.str39, i32 0, i32 0), i32 %print_hash_value.0)
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 1950933783, i8* getelementptr inbounds ([9 x i8]* @.str39, i32 0, i32 0), i32 %print_hash_value.0)
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 3761930302, i8* getelementptr inbounds ([9 x i8]* @.str39, i32 0, i32 0), i32 %print_hash_value.0)
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 3761930302, i8* getelementptr inbounds ([9 x i8]* @.str39, i32 0, i32 0), i32 %print_hash_value.0)
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 1950933783, i8* getelementptr inbounds ([9 x i8]* @.str39, i32 0, i32 0), i32 %print_hash_value.0)
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 3761930302, i8* getelementptr inbounds ([9 x i8]* @.str39, i32 0, i32 0), i32 %print_hash_value.0)
+ br label %for.body88
+
+for.body88: ; preds = %if.then74.9, %for.inc77.8.thread
+ %42 = load i8* @_ZL6g_1010, align 1, !tbaa !1
+ %conv80 = sext i8 %42 to i64
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 %conv80, i8* getelementptr inbounds ([7 x i8]* @.str40, i32 0, i32 0), i32 %print_hash_value.0)
+ %43 = load i8* @_ZL6g_1025, align 1, !tbaa !1
+ %conv81 = zext i8 %43 to i64
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 %conv81, i8* getelementptr inbounds ([7 x i8]* @.str41, i32 0, i32 0), i32 %print_hash_value.0)
+ %44 = load i8* @_ZL6g_1136, align 1, !tbaa !1
+ %conv82 = zext i8 %44 to i64
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 %conv82, i8* getelementptr inbounds ([7 x i8]* @.str42, i32 0, i32 0), i32 %print_hash_value.0)
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 1, i8* getelementptr inbounds ([7 x i8]* @.str43, i32 0, i32 0), i32 %print_hash_value.0)
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 7, i8* getelementptr inbounds ([7 x i8]* @.str44, i32 0, i32 0), i32 %print_hash_value.0)
+ %45 = load i32* @_ZL6g_1198, align 4, !tbaa !3
+ %conv85 = sext i32 %45 to i64
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 %conv85, i8* getelementptr inbounds ([7 x i8]* @.str45, i32 0, i32 0), i32 %print_hash_value.0)
+ %tobool91 = icmp eq i32 %print_hash_value.0, 0
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 4294967293, i8* getelementptr inbounds ([10 x i8]* @.str46, i32 0, i32 0), i32 %print_hash_value.0)
+ br i1 %tobool91, label %for.inc95.6.thread, label %if.then92.7
+
+for.inc95.6.thread: ; preds = %for.body88
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 2870230573, i8* getelementptr inbounds ([10 x i8]* @.str46, i32 0, i32 0), i32 %print_hash_value.0)
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 2870230573, i8* getelementptr inbounds ([10 x i8]* @.str46, i32 0, i32 0), i32 %print_hash_value.0)
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 4294967293, i8* getelementptr inbounds ([10 x i8]* @.str46, i32 0, i32 0), i32 %print_hash_value.0)
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 2870230573, i8* getelementptr inbounds ([10 x i8]* @.str46, i32 0, i32 0), i32 %print_hash_value.0)
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 2870230573, i8* getelementptr inbounds ([10 x i8]* @.str46, i32 0, i32 0), i32 %print_hash_value.0)
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 4294967293, i8* getelementptr inbounds ([10 x i8]* @.str46, i32 0, i32 0), i32 %print_hash_value.0)
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 2870230573, i8* getelementptr inbounds ([10 x i8]* @.str46, i32 0, i32 0), i32 %print_hash_value.0)
+ br label %for.inc95.7
+
+if.then92.7: ; preds = %for.body88
+ %call93 = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([14 x i8]* @.str25, i32 0, i32 0), i32 0)
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 2870230573, i8* getelementptr inbounds ([10 x i8]* @.str46, i32 0, i32 0), i32 %print_hash_value.0)
+ %call93.1 = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([14 x i8]* @.str25, i32 0, i32 0), i32 1)
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 2870230573, i8* getelementptr inbounds ([10 x i8]* @.str46, i32 0, i32 0), i32 %print_hash_value.0)
+ %call93.2 = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([14 x i8]* @.str25, i32 0, i32 0), i32 2)
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 4294967293, i8* getelementptr inbounds ([10 x i8]* @.str46, i32 0, i32 0), i32 %print_hash_value.0)
+ %call93.3 = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([14 x i8]* @.str25, i32 0, i32 0), i32 3)
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 2870230573, i8* getelementptr inbounds ([10 x i8]* @.str46, i32 0, i32 0), i32 %print_hash_value.0)
+ %call93.4 = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([14 x i8]* @.str25, i32 0, i32 0), i32 4)
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 2870230573, i8* getelementptr inbounds ([10 x i8]* @.str46, i32 0, i32 0), i32 %print_hash_value.0)
+ %call93.5 = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([14 x i8]* @.str25, i32 0, i32 0), i32 5)
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 4294967293, i8* getelementptr inbounds ([10 x i8]* @.str46, i32 0, i32 0), i32 %print_hash_value.0)
+ %call93.6 = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([14 x i8]* @.str25, i32 0, i32 0), i32 6)
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 2870230573, i8* getelementptr inbounds ([10 x i8]* @.str46, i32 0, i32 0), i32 %print_hash_value.0)
+ %call93.7 = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([14 x i8]* @.str25, i32 0, i32 0), i32 7)
+ br label %for.inc95.7
+
+for.inc95.7: ; preds = %if.then92.7, %for.inc95.6.thread
+ %46 = load i32* @_ZL13crc32_context, align 4, !tbaa !3
+ %xor = xor i32 %46, -1
+ tail call fastcc void @_ZL17platform_main_endji(i32 %xor)
+ ret i32 0
+
+if.then74.9: ; preds = %for.body70
+ %call75 = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([14 x i8]* @.str25, i32 0, i32 0), i32 0)
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 3761930302, i8* getelementptr inbounds ([9 x i8]* @.str39, i32 0, i32 0), i32 %print_hash_value.0)
+ %call75.1 = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([14 x i8]* @.str25, i32 0, i32 0), i32 1)
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 1950933783, i8* getelementptr inbounds ([9 x i8]* @.str39, i32 0, i32 0), i32 %print_hash_value.0)
+ %call75.2 = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([14 x i8]* @.str25, i32 0, i32 0), i32 2)
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 3761930302, i8* getelementptr inbounds ([9 x i8]* @.str39, i32 0, i32 0), i32 %print_hash_value.0)
+ %call75.3 = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([14 x i8]* @.str25, i32 0, i32 0), i32 3)
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 3761930302, i8* getelementptr inbounds ([9 x i8]* @.str39, i32 0, i32 0), i32 %print_hash_value.0)
+ %call75.4 = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([14 x i8]* @.str25, i32 0, i32 0), i32 4)
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 1950933783, i8* getelementptr inbounds ([9 x i8]* @.str39, i32 0, i32 0), i32 %print_hash_value.0)
+ %call75.5 = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([14 x i8]* @.str25, i32 0, i32 0), i32 5)
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 3761930302, i8* getelementptr inbounds ([9 x i8]* @.str39, i32 0, i32 0), i32 %print_hash_value.0)
+ %call75.6 = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([14 x i8]* @.str25, i32 0, i32 0), i32 6)
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 3761930302, i8* getelementptr inbounds ([9 x i8]* @.str39, i32 0, i32 0), i32 %print_hash_value.0)
+ %call75.7 = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([14 x i8]* @.str25, i32 0, i32 0), i32 7)
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 1950933783, i8* getelementptr inbounds ([9 x i8]* @.str39, i32 0, i32 0), i32 %print_hash_value.0)
+ %call75.8 = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([14 x i8]* @.str25, i32 0, i32 0), i32 8)
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 3761930302, i8* getelementptr inbounds ([9 x i8]* @.str39, i32 0, i32 0), i32 %print_hash_value.0)
+ %call75.9 = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([14 x i8]* @.str25, i32 0, i32 0), i32 9)
+ br label %for.body88
+
+if.then49.7: ; preds = %for.body45
+ %call50 = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([14 x i8]* @.str25, i32 0, i32 0), i32 0)
+ %47 = load i8* getelementptr inbounds ([8 x i8]* @_ZL5g_171, i32 0, i32 1), align 1, !tbaa !1
+ %conv47.1 = sext i8 %47 to i64
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 %conv47.1, i8* getelementptr inbounds ([9 x i8]* @.str24, i32 0, i32 0), i32 %print_hash_value.0)
+ %call50.1 = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([14 x i8]* @.str25, i32 0, i32 0), i32 1)
+ %48 = load i8* getelementptr inbounds ([8 x i8]* @_ZL5g_171, i32 0, i32 2), align 1, !tbaa !1
+ %conv47.2 = sext i8 %48 to i64
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 %conv47.2, i8* getelementptr inbounds ([9 x i8]* @.str24, i32 0, i32 0), i32 %print_hash_value.0)
+ %call50.2 = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([14 x i8]* @.str25, i32 0, i32 0), i32 2)
+ %49 = load i8* getelementptr inbounds ([8 x i8]* @_ZL5g_171, i32 0, i32 3), align 1, !tbaa !1
+ %conv47.3 = sext i8 %49 to i64
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 %conv47.3, i8* getelementptr inbounds ([9 x i8]* @.str24, i32 0, i32 0), i32 %print_hash_value.0)
+ %call50.3 = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([14 x i8]* @.str25, i32 0, i32 0), i32 3)
+ %50 = load i8* getelementptr inbounds ([8 x i8]* @_ZL5g_171, i32 0, i32 4), align 1, !tbaa !1
+ %conv47.4 = sext i8 %50 to i64
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 %conv47.4, i8* getelementptr inbounds ([9 x i8]* @.str24, i32 0, i32 0), i32 %print_hash_value.0)
+ %call50.4 = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([14 x i8]* @.str25, i32 0, i32 0), i32 4)
+ %51 = load i8* getelementptr inbounds ([8 x i8]* @_ZL5g_171, i32 0, i32 5), align 1, !tbaa !1
+ %conv47.5 = sext i8 %51 to i64
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 %conv47.5, i8* getelementptr inbounds ([9 x i8]* @.str24, i32 0, i32 0), i32 %print_hash_value.0)
+ %call50.5 = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([14 x i8]* @.str25, i32 0, i32 0), i32 5)
+ %52 = load i8* getelementptr inbounds ([8 x i8]* @_ZL5g_171, i32 0, i32 6), align 1, !tbaa !1
+ %conv47.6 = sext i8 %52 to i64
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 %conv47.6, i8* getelementptr inbounds ([9 x i8]* @.str24, i32 0, i32 0), i32 %print_hash_value.0)
+ %call50.6 = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([14 x i8]* @.str25, i32 0, i32 0), i32 6)
+ %53 = load i8* getelementptr inbounds ([8 x i8]* @_ZL5g_171, i32 0, i32 7), align 1, !tbaa !1
+ %conv47.7 = sext i8 %53 to i64
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 %conv47.7, i8* getelementptr inbounds ([9 x i8]* @.str24, i32 0, i32 0), i32 %print_hash_value.0)
+ %call50.7 = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([14 x i8]* @.str25, i32 0, i32 0), i32 7)
+ br label %for.body70
+
+for.inc.1.critedge: ; preds = %for.body9
+ %arrayidx12.1.c = getelementptr inbounds [4 x [6 x [6 x i8]]]* @_ZL4g_52, i32 0, i32 %i.075, i32 %j.074, i32 1
+ %54 = load i8* %arrayidx12.1.c, align 1, !tbaa !1
+ %conv13.1.c = sext i8 %54 to i64
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 %conv13.1.c, i8* getelementptr inbounds ([14 x i8]* @.str2, i32 0, i32 0), i32 %print_hash_value.0)
+ br label %for.inc.1
+
+for.inc.1: ; preds = %for.inc.1.critedge, %if.then14
+ %arrayidx12.2 = getelementptr inbounds [4 x [6 x [6 x i8]]]* @_ZL4g_52, i32 0, i32 %i.075, i32 %j.074, i32 2
+ %55 = load i8* %arrayidx12.2, align 1, !tbaa !1
+ %conv13.2 = sext i8 %55 to i64
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 %conv13.2, i8* getelementptr inbounds ([14 x i8]* @.str2, i32 0, i32 0), i32 %print_hash_value.0)
+ br i1 %tobool, label %for.inc.3.critedge, label %if.then14.2
+
+if.then14.2: ; preds = %for.inc.1
+ %call15.2 = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([22 x i8]* @.str3, i32 0, i32 0), i32 %i.075, i32 %j.074, i32 2)
+ %arrayidx12.3 = getelementptr inbounds [4 x [6 x [6 x i8]]]* @_ZL4g_52, i32 0, i32 %i.075, i32 %j.074, i32 3
+ %56 = load i8* %arrayidx12.3, align 1, !tbaa !1
+ %conv13.3 = sext i8 %56 to i64
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 %conv13.3, i8* getelementptr inbounds ([14 x i8]* @.str2, i32 0, i32 0), i32 %print_hash_value.0)
+ %call15.3 = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([22 x i8]* @.str3, i32 0, i32 0), i32 %i.075, i32 %j.074, i32 3)
+ br label %for.inc.3
+
+for.inc.3.critedge: ; preds = %for.inc.1
+ %arrayidx12.3.c = getelementptr inbounds [4 x [6 x [6 x i8]]]* @_ZL4g_52, i32 0, i32 %i.075, i32 %j.074, i32 3
+ %57 = load i8* %arrayidx12.3.c, align 1, !tbaa !1
+ %conv13.3.c = sext i8 %57 to i64
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 %conv13.3.c, i8* getelementptr inbounds ([14 x i8]* @.str2, i32 0, i32 0), i32 %print_hash_value.0)
+ br label %for.inc.3
+
+for.inc.3: ; preds = %for.inc.3.critedge, %if.then14.2
+ %arrayidx12.4 = getelementptr inbounds [4 x [6 x [6 x i8]]]* @_ZL4g_52, i32 0, i32 %i.075, i32 %j.074, i32 4
+ %58 = load i8* %arrayidx12.4, align 1, !tbaa !1
+ %conv13.4 = sext i8 %58 to i64
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 %conv13.4, i8* getelementptr inbounds ([14 x i8]* @.str2, i32 0, i32 0), i32 %print_hash_value.0)
+ br i1 %tobool, label %for.inc.5.critedge, label %if.then14.4
+
+if.then14.4: ; preds = %for.inc.3
+ %call15.4 = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([22 x i8]* @.str3, i32 0, i32 0), i32 %i.075, i32 %j.074, i32 4)
+ %arrayidx12.5 = getelementptr inbounds [4 x [6 x [6 x i8]]]* @_ZL4g_52, i32 0, i32 %i.075, i32 %j.074, i32 5
+ %59 = load i8* %arrayidx12.5, align 1, !tbaa !1
+ %conv13.5 = sext i8 %59 to i64
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 %conv13.5, i8* getelementptr inbounds ([14 x i8]* @.str2, i32 0, i32 0), i32 %print_hash_value.0)
+ %call15.5 = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([22 x i8]* @.str3, i32 0, i32 0), i32 %i.075, i32 %j.074, i32 5)
+ br label %for.inc.5
+
+for.inc.5.critedge: ; preds = %for.inc.3
+ %arrayidx12.5.c = getelementptr inbounds [4 x [6 x [6 x i8]]]* @_ZL4g_52, i32 0, i32 %i.075, i32 %j.074, i32 5
+ %60 = load i8* %arrayidx12.5.c, align 1, !tbaa !1
+ %conv13.5.c = sext i8 %60 to i64
+ tail call fastcc void @_ZL15transparent_crcyPci(i64 %conv13.5.c, i8* getelementptr inbounds ([14 x i8]* @.str2, i32 0, i32 0), i32 %print_hash_value.0)
+ br label %for.inc.5
+
+for.inc.5: ; preds = %for.inc.5.critedge, %if.then14.4
+ %inc18 = add nsw i32 %j.074, 1
+ %exitcond = icmp eq i32 %inc18, 6
+ br i1 %exitcond, label %for.inc20, label %for.body9
+}
+
+; Function Attrs: nounwind
+define internal fastcc void @_ZL12crc32_gentabv() #0 {
+entry:
+ br label %for.body3
+
+for.body3: ; preds = %for.body3, %entry
+ %i.08 = phi i32 [ 0, %entry ], [ %inc, %for.body3 ]
+ %and = and i32 %i.08, 1
+ %tobool = icmp eq i32 %and, 0
+ %shr = lshr i32 %i.08, 1
+ %xor = xor i32 %shr, -306674912
+ %crc.1 = select i1 %tobool, i32 %shr, i32 %xor
+ %and.1 = and i32 %crc.1, 1
+ %tobool.1 = icmp eq i32 %and.1, 0
+ %shr.1 = lshr i32 %crc.1, 1
+ %xor.1 = xor i32 %shr.1, -306674912
+ %crc.1.1 = select i1 %tobool.1, i32 %shr.1, i32 %xor.1
+ %and.2 = and i32 %crc.1.1, 1
+ %tobool.2 = icmp eq i32 %and.2, 0
+ %shr.2 = lshr i32 %crc.1.1, 1
+ %xor.2 = xor i32 %shr.2, -306674912
+ %crc.1.2 = select i1 %tobool.2, i32 %shr.2, i32 %xor.2
+ %and.3 = and i32 %crc.1.2, 1
+ %tobool.3 = icmp eq i32 %and.3, 0
+ %shr.3 = lshr i32 %crc.1.2, 1
+ %xor.3 = xor i32 %shr.3, -306674912
+ %crc.1.3 = select i1 %tobool.3, i32 %shr.3, i32 %xor.3
+ %and.4 = and i32 %crc.1.3, 1
+ %tobool.4 = icmp eq i32 %and.4, 0
+ %shr.4 = lshr i32 %crc.1.3, 1
+ %xor.4 = xor i32 %shr.4, -306674912
+ %crc.1.4 = select i1 %tobool.4, i32 %shr.4, i32 %xor.4
+ %and.5 = and i32 %crc.1.4, 1
+ %tobool.5 = icmp eq i32 %and.5, 0
+ %shr.5 = lshr i32 %crc.1.4, 1
+ %xor.5 = xor i32 %shr.5, -306674912
+ %crc.1.5 = select i1 %tobool.5, i32 %shr.5, i32 %xor.5
+ %and.6 = and i32 %crc.1.5, 1
+ %tobool.6 = icmp eq i32 %and.6, 0
+ %shr.6 = lshr i32 %crc.1.5, 1
+ %xor.6 = xor i32 %shr.6, -306674912
+ %crc.1.6 = select i1 %tobool.6, i32 %shr.6, i32 %xor.6
+ %and.7 = and i32 %crc.1.6, 1
+ %tobool.7 = icmp eq i32 %and.7, 0
+ %shr.7 = lshr i32 %crc.1.6, 1
+ %xor.7 = xor i32 %shr.7, -306674912
+ %crc.1.7 = select i1 %tobool.7, i32 %shr.7, i32 %xor.7
+ %arrayidx = getelementptr inbounds [256 x i32]* @_ZL9crc32_tab, i32 0, i32 %i.08
+ store i32 %crc.1.7, i32* %arrayidx, align 4, !tbaa !3
+ %inc = add nsw i32 %i.08, 1
+ %exitcond = icmp eq i32 %inc, 256
+ br i1 %exitcond, label %for.end6, label %for.body3
+
+for.end6: ; preds = %for.body3
+ ret void
+}
+
+; Function Attrs: nounwind
+define internal fastcc void @_ZL6func_1v() #0 {
+for.end97:
+ %agg.tmp = alloca i64, align 8
+ %tmpcast = bitcast i64* %agg.tmp to %struct.S0*
+ store i32 0, i32* @_ZL3g_2, align 4, !tbaa !3
+ %call = call fastcc zeroext i8 @_ZL7func_20iit(i32 0, i16 zeroext -16644)
+ %0 = load i32* @_ZL3g_2, align 4, !tbaa !3
+ %conv98 = trunc i32 %0 to i8
+ %call105 = call fastcc zeroext i16 @_ZL26safe_mul_func_uint16_t_u_utt(i16 zeroext 7, i16 zeroext 1)
+ %conv106 = zext i16 %call105 to i32
+ %call118 = call fastcc zeroext i8 @_ZL25safe_mul_func_uint8_t_u_uhh(i8 zeroext 1, i8 zeroext 23)
+ %conv119 = zext i8 %call118 to i32
+ %cmp120 = icmp uge i32 %conv106, %conv119
+ %conv121 = zext i1 %cmp120 to i32
+ %call122 = call fastcc zeroext i8 @_ZL28safe_rshift_func_uint8_t_u_shi(i8 zeroext %conv98, i32 %conv121)
+ %cmp124 = icmp ult i8 %call, %call122
+ %conv125 = zext i1 %cmp124 to i8
+ store i64 -21471878022, i64* %agg.tmp, align 8
+ call fastcc void @_ZL7func_14aPaS_2S0j(i8 signext %conv125, %struct.S0* byval align 4 %tmpcast)
+ call fastcc void @_ZL6func_5Pah()
+ %1 = load i32* @_ZL6g_1198, align 4, !tbaa !3
+ %tobool = icmp eq i32 %1, 0
+ br i1 %tobool, label %if.else1462, label %for.end311
+
+for.end311: ; preds = %for.end97
+ store i8 25, i8* @_ZL6g_1136, align 1, !tbaa !1
+ %bf.load = load i24* bitcast ({ i8, [3 x i8] }* @_ZL6g_1162 to i24*), align 4
+ %bf.clear = and i24 %bf.load, -262144
+ %bf.set = or i24 %bf.clear, zext (i1 icmp slt (i32 zext (i1 icmp sge (i32 zext (i1 icmp eq (i8* getelementptr inbounds (%struct.S0* @_ZL5g_471, i32 0, i32 1), i8* @_ZL6g_1010) to i32), i32 1) to i32), i32 710400751) to i24)
+ store i24 %bf.set, i24* bitcast ({ i8, [3 x i8] }* @_ZL6g_1162 to i24*), align 4
+ store i16 1, i16* @_ZL5g_162, align 2, !tbaa !4
+ br label %cleanup1590
+
+if.else1462: ; preds = %for.end97
+ %2 = load i8*** @_ZL5g_984, align 4, !tbaa !0
+ %3 = load i8** %2, align 4, !tbaa !0
+ store i8 0, i8* %3, align 1, !tbaa !1
+ %call1515 = call fastcc signext i8 @_ZL24safe_div_func_int8_t_s_saa(i8 signext 0, i8 signext 1)
+ %call1517 = call fastcc zeroext i8 @_ZL28safe_lshift_func_uint8_t_u_shi(i8 zeroext %call1515, i32 58)
+ %conv1518 = zext i8 %call1517 to i16
+ %call1519 = call fastcc zeroext i16 @_ZL29safe_lshift_func_uint16_t_u_utj(i16 zeroext %conv1518, i32 14)
+ %cmp1522 = icmp eq i16 %call1519, 4
+ %conv1523 = zext i1 %cmp1522 to i32
+ %xor15271 = or i32 %conv1523, 4
+ store i32 %xor15271, i32* @_ZL5g_135, align 4, !tbaa !3
+ %4 = load i8* @_ZL5g_136, align 1, !tbaa !1
+ %5 = load i8* @_ZL5g_133, align 1, !tbaa !1
+ %and15422 = and i8 %5, %4
+ %cmp1543 = icmp ne i8 %and15422, 1
+ %conv1544 = zext i1 %cmp1543 to i8
+ store i8 %conv1544, i8* @_ZL6g_1010, align 1, !tbaa !1
+ %6 = load i32* @_ZL5g_135, align 4, !tbaa !3
+ %call1565 = call fastcc i32 @_ZL25safe_sub_func_int32_t_s_sii(i32 1, i32 %6)
+ %conv1566 = trunc i32 %call1565 to i8
+ %7 = load i8** @_ZL5g_985, align 4, !tbaa !0
+ store i8 %conv1566, i8* %7, align 1, !tbaa !1
+ br label %cleanup1590
+
+cleanup1590: ; preds = %if.else1462, %for.end311
+ ret void
+}
+
+; Function Attrs: nounwind
+define internal fastcc void @_ZL15transparent_crcyPci(i64 %val, i8* %vname, i32 %flag) #0 {
+entry:
+ tail call fastcc void @_ZL12crc32_8bytesy(i64 %val)
+ %tobool = icmp eq i32 %flag, 0
+ br i1 %tobool, label %if.end, label %if.then
+
+if.then: ; preds = %entry
+ %0 = load i32* @_ZL13crc32_context, align 4, !tbaa !3
+ %xor = xor i32 %0, -1
+ %call = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([36 x i8]* @.str48, i32 0, i32 0), i8* %vname, i32 %xor)
+ br label %if.end
+
+if.end: ; preds = %if.then, %entry
+ ret void
+}
+
+; Function Attrs: nounwind
+declare i32 @printf(i8* nocapture, ...) #0
+
+; Function Attrs: nounwind
+define internal fastcc void @_ZL17platform_main_endji(i32 %crc) #0 {
+entry:
+ %call = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([15 x i8]* @.str47, i32 0, i32 0), i32 %crc)
+ ret void
+}
+
+; Function Attrs: nounwind
+define internal fastcc void @_ZL12crc32_8bytesy(i64 %val) #0 {
+entry:
+ %conv = trunc i64 %val to i8
+ tail call fastcc void @_ZL10crc32_byteh(i8 zeroext %conv)
+ %shr1 = lshr i64 %val, 8
+ %conv3 = trunc i64 %shr1 to i8
+ tail call fastcc void @_ZL10crc32_byteh(i8 zeroext %conv3)
+ %shr4 = lshr i64 %val, 16
+ %conv6 = trunc i64 %shr4 to i8
+ tail call fastcc void @_ZL10crc32_byteh(i8 zeroext %conv6)
+ %shr7 = lshr i64 %val, 24
+ %conv9 = trunc i64 %shr7 to i8
+ tail call fastcc void @_ZL10crc32_byteh(i8 zeroext %conv9)
+ %shr10 = lshr i64 %val, 32
+ %conv12 = trunc i64 %shr10 to i8
+ tail call fastcc void @_ZL10crc32_byteh(i8 zeroext %conv12)
+ %shr13 = lshr i64 %val, 40
+ %conv15 = trunc i64 %shr13 to i8
+ tail call fastcc void @_ZL10crc32_byteh(i8 zeroext %conv15)
+ %shr16 = lshr i64 %val, 48
+ %conv18 = trunc i64 %shr16 to i8
+ tail call fastcc void @_ZL10crc32_byteh(i8 zeroext %conv18)
+ %shr19 = lshr i64 %val, 56
+ %conv21 = trunc i64 %shr19 to i8
+ tail call fastcc void @_ZL10crc32_byteh(i8 zeroext %conv21)
+ ret void
+}
+
+; Function Attrs: nounwind
+define internal fastcc void @_ZL10crc32_byteh(i8 zeroext %b) #0 {
+entry:
+ %0 = load i32* @_ZL13crc32_context, align 4, !tbaa !3
+ %shr = lshr i32 %0, 8
+ %conv = zext i8 %b to i32
+ %.masked = and i32 %0, 255
+ %and1 = xor i32 %.masked, %conv
+ %arrayidx = getelementptr inbounds [256 x i32]* @_ZL9crc32_tab, i32 0, i32 %and1
+ %1 = load i32* %arrayidx, align 4, !tbaa !3
+ %xor2 = xor i32 %shr, %1
+ store i32 %xor2, i32* @_ZL13crc32_context, align 4, !tbaa !3
+ ret void
+}
+
+; Function Attrs: nounwind
+declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) #1
+
+; Function Attrs: nounwind
+define internal fastcc void @_ZL6func_5Pah() #0 {
+for.end14:
+ %0 = load i8* @_ZL6g_1025, align 1, !tbaa !1
+ %inc15 = add i8 %0, 1
+ store i8 %inc15, i8* @_ZL6g_1025, align 1, !tbaa !1
+ %1 = load i32* @_ZL5g_400, align 4, !tbaa !3
+ %tobool = icmp eq i32 %1, 0
+ br i1 %tobool, label %if.else, label %if.then
+
+if.then: ; preds = %for.end14
+ %2 = load i64* bitcast (%struct.S0* @_ZL4g_83 to i64*), align 8
+ store i64 %2, i64* bitcast (%struct.S0* @_ZL5g_471 to i64*), align 8
+ br label %if.end
+
+if.else: ; preds = %for.end14
+ %and = and i32 %1, 23
+ store i32 %and, i32* @_ZL5g_400, align 4, !tbaa !3
+ br label %if.end
+
+if.end: ; preds = %if.else, %if.then
+ ret void
+}
+
+; Function Attrs: nounwind readonly
+define internal fastcc i8* @_ZL6func_8ijPasS_(i16 signext %p_12) #2 {
+entry:
+ %0 = load i8*** @_ZL5g_984, align 4, !tbaa !0
+ %1 = load i8** %0, align 4, !tbaa !0
+ ret i8* %1
+}
+
+; Function Attrs: nounwind
+define internal fastcc void @_ZL7func_14aPaS_2S0j(i8 signext %p_15, %struct.S0* byval nocapture align 4 %p_18) #0 {
+entry:
+ store i16 0, i16* @_ZL5g_172, align 2, !tbaa !4
+ %0 = load i32* @_ZL4g_53, align 4, !tbaa !3
+ %f0 = getelementptr inbounds %struct.S0* %p_18, i32 0, i32 0
+ %1 = load i16* %f0, align 4, !tbaa !4
+ %conv1 = sext i16 %1 to i32
+ %f2 = getelementptr inbounds %struct.S0* %p_18, i32 0, i32 2
+ %2 = load i32* %f2, align 4, !tbaa !3
+ %3 = load i32* @_ZL4g_93, align 4, !tbaa !3
+ %cmp2 = icmp ne i32 %2, %3
+ %conv3 = zext i1 %cmp2 to i32
+ %cmp4 = icmp sgt i32 %conv1, %conv3
+ %conv5 = zext i1 %cmp4 to i32
+ %cmp6 = icmp sge i32 %0, %conv5
+ %conv7 = zext i1 %cmp6 to i16
+ %call = tail call fastcc zeroext i16 @_ZL29safe_rshift_func_uint16_t_u_sti(i16 zeroext %conv7, i32 10)
+ %conv8 = zext i16 %call to i32
+ store i32 %conv8, i32* @_ZL5g_132, align 4, !tbaa !3
+ ret void
+}
+
+; Function Attrs: nounwind
+define internal fastcc zeroext i8 @_ZL7func_20iit(i32 %p_22, i16 zeroext %p_23) #0 {
+for.end7:
+ %agg.tmp = alloca %union.U1, align 4
+ %agg.tmp9 = alloca %struct.S0, align 4
+ %0 = load i32* @_ZL3g_2, align 4, !tbaa !3
+ %conv = trunc i32 %0 to i16
+ %conv11 = trunc i32 %p_22 to i8
+ store i8 %conv11, i8* getelementptr inbounds ([4 x [6 x [6 x i8]]]* @_ZL4g_52, i32 0, i32 1, i32 3, i32 1), align 1, !tbaa !1
+ %dec = add i16 %p_23, -1
+ %l_60.sroa.0.0.idx = getelementptr inbounds %struct.S0* %agg.tmp9, i32 0, i32 0
+ store i16 26262, i16* %l_60.sroa.0.0.idx, align 4
+ %l_60.sroa.1.2.idx = getelementptr inbounds %struct.S0* %agg.tmp9, i32 0, i32 1
+ store i8 73, i8* %l_60.sroa.1.2.idx, align 2
+ %l_60.sroa.2.3.raw_cast = bitcast %struct.S0* %agg.tmp9 to i8*
+ %l_60.sroa.2.3.raw_idx = getelementptr inbounds i8* %l_60.sroa.2.3.raw_cast, i32 3
+ call void @llvm.memcpy.p0i8.p0i8.i32(i8* %l_60.sroa.2.3.raw_idx, i8* getelementptr ([5 x i8]* bitcast (i8* getelementptr (i8* bitcast (%struct.S0* @_ZZL7func_20iitE4l_60 to i8*), i32 3) to [5 x i8]*), i32 0, i32 0), i32 5, i32 1, i1 false)
+ call fastcc void @_ZL7func_492S0(%union.U1* sret %agg.tmp, %struct.S0* byval align 4 %agg.tmp9)
+ %.lobit = lshr i32 %0, 31
+ %1 = trunc i32 %.lobit to i8
+ %call33 = call fastcc signext i16 @_ZL7func_40ia(i8 signext %1)
+ %cmp35 = icmp eq i16 %call33, 3880
+ %conv36 = zext i1 %cmp35 to i32
+ %2 = load i16* @_ZL5g_361, align 2, !tbaa !4
+ %conv37 = zext i16 %2 to i32
+ %xor = xor i32 %conv37, %conv36
+ %conv38 = trunc i32 %xor to i16
+ store i16 %conv38, i16* @_ZL5g_361, align 2, !tbaa !4
+ %call43 = call fastcc signext i8 @_ZL24safe_sub_func_int8_t_s_saa(i8 signext -1)
+ %conv44 = sext i8 %call43 to i32
+ %call45 = call fastcc signext i16 @_ZL7func_32tiPa(i16 zeroext %conv, i32 %conv44)
+ %3 = load i32* @_ZL5g_400, align 4, !tbaa !3
+ %and53 = and i32 %3, -98
+ store i32 %and53, i32* @_ZL5g_400, align 4, !tbaa !3
+ %4 = load i8* getelementptr inbounds ([4 x [6 x [6 x i8]]]* @_ZL4g_52, i32 0, i32 0, i32 4, i32 5), align 1, !tbaa !1
+ %call104 = call fastcc zeroext i8 @_ZL28safe_rshift_func_uint8_t_u_shi(i8 zeroext %4, i32 1)
+ %call105 = call fastcc zeroext i8 @_ZL28safe_lshift_func_uint8_t_u_shi(i8 zeroext %call104, i32 1)
+ %cmp124 = icmp ne i8 %call105, 0
+ %conv125 = zext i1 %cmp124 to i32
+ %5 = load i16* @_ZL4g_77, align 2, !tbaa !4
+ %conv571 = trunc i16 %5 to i8
+ %6 = load i32* @_ZL4g_53, align 4, !tbaa !3
+ %7 = load i8* getelementptr inbounds ([8 x i8]* @_ZL5g_171, i32 0, i32 6), align 1, !tbaa !1
+ %conv432 = sext i8 %7 to i32
+ %xor434 = xor i32 %conv432, %6
+ br label %lbl_496
+
+lbl_496.loopexit: ; preds = %for.body302
+ store i16 %call312.lobit, i16* @_ZL5g_162, align 2, !tbaa !4
+ store i32 %conv357, i32* @_ZL5g_400, align 4, !tbaa !3
+ %phitmp38 = add i32 %l_404.0, -1
+ br label %lbl_496
+
+lbl_496: ; preds = %lbl_496.loopexit, %for.end7
+ %l_404.0 = phi i32 [ -1124763087, %for.end7 ], [ %phitmp38, %lbl_496.loopexit ]
+ %p_23.addr.0 = phi i16 [ %dec, %for.end7 ], [ %conv332, %lbl_496.loopexit ]
+ %p_22.addr.0 = phi i32 [ %p_22, %for.end7 ], [ %p_22.addr.235, %lbl_496.loopexit ]
+ store i32 0, i32* getelementptr inbounds (%struct.S0* @_ZL4g_83, i32 0, i32 2), align 4, !tbaa !3
+ %tobool156 = icmp ne i32 %p_22.addr.0, 0
+ %phitmp = zext i1 %tobool156 to i8
+ %conv428 = trunc i32 %p_22.addr.0 to i8
+ %8 = load i16* getelementptr inbounds (%struct.S0* @_ZL5g_471, i32 0, i32 0), align 8, !tbaa !4
+ %conv438 = sext i16 %8 to i32
+ %_ZL5g_400.promoted = load i32* @_ZL5g_400, align 4, !tbaa !3
+ %_ZL5g_138.promoted = load i32* @_ZL5g_138, align 4, !tbaa !3
+ br label %for.body59
+
+for.body59: ; preds = %lor.end440.3, %lbl_496
+ %and12827 = phi i32 [ %_ZL5g_138.promoted, %lbl_496 ], [ %and128, %lor.end440.3 ]
+ %9 = phi i32 [ %_ZL5g_400.promoted, %lbl_496 ], [ 0, %lor.end440.3 ]
+ %cmp107 = icmp ult i32 %9, 255
+ br i1 %cmp107, label %lor.end, label %lor.rhs
+
+lor.rhs: ; preds = %for.body59
+ %conv117 = trunc i32 %9 to i8
+ %call118 = call fastcc zeroext i8 @_ZL25safe_add_func_uint8_t_u_uhh(i8 zeroext -15, i8 zeroext %conv117)
+ %conv119 = zext i8 %call118 to i16
+ store i16 %conv119, i16* @_ZL5g_361, align 2, !tbaa !4
+ br label %lor.end
+
+lor.end: ; preds = %lor.rhs, %for.body59
+ %10 = load i32* @_ZL4g_93, align 4, !tbaa !3
+ %or127 = or i32 %9, %10
+ %and128 = and i32 %and12827, %or127
+ br i1 %tobool156, label %if.then, label %for.body191
+
+if.then: ; preds = %lor.end
+ %call158 = call fastcc signext i8 @_ZL24safe_add_func_int8_t_s_saa(i8 signext -8, i8 signext -1)
+ %conv159 = sext i8 %call158 to i16
+ store i8 -1, i8* getelementptr inbounds ([4 x [6 x [6 x i8]]]* @_ZL4g_52, i32 0, i32 1, i32 3, i32 1), align 1, !tbaa !1
+ store i16 8, i16* @_ZL5g_361, align 2, !tbaa !4
+ %call183 = call fastcc signext i16 @_ZL25safe_mul_func_int16_t_s_sss(i16 signext %conv159, i16 signext 1)
+ %conv184 = sext i16 %call183 to i32
+ %11 = load i32* @_ZL4g_93, align 4, !tbaa !3
+ %xor185 = xor i32 %11, %conv184
+ store i32 %xor185, i32* @_ZL4g_93, align 4, !tbaa !3
+ %tobool198 = icmp eq i32 %or127, 0
+ br i1 %tobool198, label %for.body412, label %land.lhs.true
+
+for.body191: ; preds = %lor.end
+ store i32 %or127, i32* @_ZL5g_400, align 4, !tbaa !3
+ store i32 %and128, i32* @_ZL5g_138, align 4, !tbaa !3
+ %conv192 = trunc i32 %or127 to i8
+ br label %cleanup583
+
+land.lhs.true: ; preds = %if.then
+ %12 = load i16* @_ZL5g_361, align 2, !tbaa !4
+ %conv201 = zext i16 %12 to i32
+ %xor202 = xor i32 %conv201, 57244
+ %conv203 = trunc i32 %xor202 to i16
+ store i16 %conv203, i16* @_ZL5g_361, align 2, !tbaa !4
+ %call204 = call fastcc zeroext i16 @_ZL26safe_mul_func_uint16_t_u_utt(i16 zeroext 0, i16 zeroext %conv203)
+ %13 = load i16* @_ZL5g_168, align 2, !tbaa !4
+ %conv207 = sext i16 %13 to i32
+ %cmp209 = icmp ne i16 %call204, 0
+ %conv210 = zext i1 %cmp209 to i32
+ %cmp212 = icmp slt i32 %conv210, %conv207
+ %conv213 = zext i1 %cmp212 to i16
+ store i16 %conv213, i16* @_ZL5g_168, align 2, !tbaa !4
+ br i1 %cmp212, label %if.then214, label %for.body412
+
+if.then214: ; preds = %land.lhs.true
+ store i32 %or127, i32* @_ZL5g_400, align 4, !tbaa !3
+ store i32 %and128, i32* @_ZL5g_138, align 4, !tbaa !3
+ %tobool295 = icmp eq i32 %or127, 0
+ br i1 %tobool295, label %for.cond300.preheader, label %cleanup583
+
+for.cond300.preheader: ; preds = %if.then214
+ %14 = load i64* bitcast (%struct.S0* @_ZL4g_83 to i64*), align 8
+ %15 = load i16* @_ZL5g_168, align 2, !tbaa !4
+ %call312 = call fastcc signext i16 @_ZL28safe_lshift_func_int16_t_s_usj(i16 signext %15, i32 -1)
+ %call312.lobit = lshr i16 %call312, 15
+ %call331 = call fastcc signext i8 @_ZL24safe_div_func_int8_t_s_saa(i8 signext 1, i8 signext -7)
+ %conv332 = sext i8 %call331 to i16
+ %call354 = call fastcc signext i16 @_ZL28safe_lshift_func_int16_t_s_usj(i16 signext 1, i32 1631231813)
+ %call356 = call fastcc signext i16 @_ZL25safe_mul_func_int16_t_s_sss(i16 signext %call354, i16 signext 0)
+ %conv357 = sext i16 %call356 to i32
+ %tobool358 = icmp eq i32 %l_404.0, 0
+ br label %for.body302
+
+for.cond300: ; preds = %for.body302
+ %sub = add nsw i32 %p_22.addr.235, -1
+ %cmp301 = icmp sgt i32 %p_22.addr.235, 0
+ br i1 %cmp301, label %for.body302, label %cleanup583.loopexit32
+
+for.body302: ; preds = %for.cond300, %for.cond300.preheader
+ %p_22.addr.235 = phi i32 [ 3, %for.cond300.preheader ], [ %sub, %for.cond300 ]
+ store i64 %14, i64* bitcast (%struct.S0* @_ZL5g_471 to i64*), align 8
+ store i32 1, i32* getelementptr inbounds (%struct.S0* @_ZL5g_471, i32 0, i32 2), align 4, !tbaa !3
+ br i1 %tobool358, label %for.cond300, label %lbl_496.loopexit
+
+for.body412: ; preds = %land.lhs.true, %if.then
+ %16 = load i16* @_ZL5g_168, align 2, !tbaa !4
+ %call568 = call fastcc i32 @_ZL26safe_mod_func_uint32_t_u_ujj(i32 0, i32 -13150355)
+ %cmp569 = icmp ne i32 %call568, 0
+ %conv570 = zext i1 %cmp569 to i8
+ %call572 = call fastcc signext i8 @_ZL24safe_mul_func_int8_t_s_saa(i8 signext %conv570, i8 signext %conv571)
+ %conv433 = sext i16 %16 to i32
+ %xor435 = xor i32 %xor434, %conv433
+ %cmp436 = icmp slt i32 %xor435, %p_22.addr.0
+ %conv437 = zext i1 %cmp436 to i32
+ %cmp439 = icmp sgt i32 %conv437, %conv438
+ %_ZL5g_361.promoted = load i16* @_ZL5g_361, align 2, !tbaa !4
+ br i1 %tobool156, label %lor.end440.2.thread, label %lor.rhs421.3
+
+lor.end440.2.thread: ; preds = %for.body412
+ %conv44250 = zext i16 %_ZL5g_361.promoted to i32
+ %xor443.257 = xor i32 %conv44250, 1
+ br label %lor.end440.3
+
+cleanup583.loopexit: ; preds = %lor.end440.3
+ store i32 0, i32* @_ZL5g_400, align 4, !tbaa !3
+ store i32 %and128, i32* @_ZL5g_138, align 4, !tbaa !3
+ br label %cleanup583
+
+cleanup583.loopexit32: ; preds = %for.cond300
+ store i16 %call312.lobit, i16* @_ZL5g_162, align 2, !tbaa !4
+ store i32 %conv357, i32* @_ZL5g_400, align 4, !tbaa !3
+ br label %cleanup583
+
+cleanup583: ; preds = %cleanup583.loopexit32, %cleanup583.loopexit, %if.then214, %for.body191
+ %cleanup.dest.slot.2 = phi i1 [ false, %for.body191 ], [ true, %cleanup583.loopexit ], [ false, %cleanup583.loopexit32 ], [ true, %if.then214 ]
+ %retval.6 = phi i8 [ %conv192, %for.body191 ], [ undef, %cleanup583.loopexit ], [ -100, %cleanup583.loopexit32 ], [ undef, %if.then214 ]
+ %17 = load i8* @_ZL5g_170, align 1, !tbaa !1
+ %.retval.6 = select i1 %cleanup.dest.slot.2, i8 %17, i8 %retval.6
+ ret i8 %.retval.6
+
+lor.rhs421.3: ; preds = %for.body412
+ %conv441 = zext i1 %cmp439 to i32
+ %conv442 = zext i16 %_ZL5g_361.promoted to i32
+ %xor443 = xor i32 %conv442, %conv441
+ %conv441.1 = zext i1 %cmp439 to i32
+ %xor533.1 = xor i32 %xor443, %conv441.1
+ %conv441.2 = zext i1 %cmp439 to i32
+ %xor443.2 = xor i32 %xor533.1, %conv441.2
+ %call422.3 = call fastcc signext i16 @_ZL25safe_mul_func_int16_t_s_sss(i16 signext %16, i16 signext %p_23.addr.0)
+ %tobool423.3 = icmp eq i16 %call422.3, 0
+ %phitmp..3 = select i1 %tobool423.3, i8 %phitmp, i8 1
+ %call429.3 = call fastcc zeroext i8 @_ZL25safe_sub_func_uint8_t_u_uhh(i8 zeroext %phitmp..3, i8 zeroext %conv428)
+ %conv430.3 = zext i8 %call429.3 to i32
+ %xor431.3 = xor i32 %conv430.3, %conv125
+ store i32 %xor431.3, i32* @_ZL5g_546, align 4, !tbaa !3
+ br label %lor.end440.3
+
+lor.end440.3: ; preds = %lor.rhs421.3, %lor.end440.2.thread
+ %xor443.258 = phi i32 [ %xor443.2, %lor.rhs421.3 ], [ %xor443.257, %lor.end440.2.thread ]
+ %18 = phi i1 [ %cmp439, %lor.rhs421.3 ], [ true, %lor.end440.2.thread ]
+ %conv441.3 = zext i1 %18 to i32
+ %xor533.3 = xor i32 %xor443.258, %conv441.3
+ %conv534.3 = trunc i32 %xor533.3 to i16
+ %conv573 = sext i8 %call572 to i32
+ store i32 %conv573, i32* @_ZL4g_93, align 4, !tbaa !3
+ store i16 %conv534.3, i16* @_ZL5g_361, align 2, !tbaa !4
+ store i8 0, i8* getelementptr inbounds ({ i8, [3 x i8] }* @_ZL4g_74, i32 0, i32 0), align 4, !tbaa !1
+ store i16 %16, i16* getelementptr inbounds (%struct.S0* @_ZL4g_83, i32 0, i32 0), align 8, !tbaa !4
+ %19 = load i32* getelementptr inbounds (%struct.S0* @_ZL4g_83, i32 0, i32 2), align 4, !tbaa !3
+ %add581 = add i32 %19, 1
+ store i32 %add581, i32* getelementptr inbounds (%struct.S0* @_ZL4g_83, i32 0, i32 2), align 4, !tbaa !3
+ %cmp58 = icmp eq i32 %add581, 0
+ br i1 %cmp58, label %for.body59, label %cleanup583.loopexit
+}
+
+; Function Attrs: nounwind readnone
+define internal fastcc zeroext i8 @_ZL28safe_rshift_func_uint8_t_u_shi(i8 zeroext %left, i32 %right) #3 {
+entry:
+ %0 = icmp ugt i32 %right, 31
+ %conv = zext i8 %left to i32
+ %shr = select i1 %0, i32 0, i32 %right
+ %conv.shr = lshr i32 %conv, %shr
+ %conv3 = trunc i32 %conv.shr to i8
+ ret i8 %conv3
+}
+
+; Function Attrs: nounwind readnone
+define internal fastcc zeroext i16 @_ZL26safe_mul_func_uint16_t_u_utt(i16 zeroext %ui1, i16 zeroext %ui2) #3 {
+entry:
+ %conv = zext i16 %ui1 to i32
+ %conv1 = zext i16 %ui2 to i32
+ %mul = mul i32 %conv1, %conv
+ %conv2 = trunc i32 %mul to i16
+ ret i16 %conv2
+}
+
+; Function Attrs: nounwind readnone
+define internal fastcc zeroext i8 @_ZL25safe_mul_func_uint8_t_u_uhh(i8 zeroext %ui1, i8 zeroext %ui2) #3 {
+entry:
+ %conv = zext i8 %ui1 to i32
+ %conv1 = zext i8 %ui2 to i32
+ %mul = mul i32 %conv1, %conv
+ %conv2 = trunc i32 %mul to i8
+ ret i8 %conv2
+}
+
+; Function Attrs: nounwind readnone
+define internal fastcc zeroext i8 @_ZL25safe_sub_func_uint8_t_u_uhh(i8 zeroext %ui1, i8 zeroext %ui2) #3 {
+entry:
+ %conv = zext i8 %ui1 to i32
+ %conv1 = zext i8 %ui2 to i32
+ %sub = sub nsw i32 %conv, %conv1
+ %conv2 = trunc i32 %sub to i8
+ ret i8 %conv2
+}
+
+; Function Attrs: nounwind readnone
+define internal fastcc i32 @_ZL26safe_div_func_uint32_t_u_ujj(i32 %ui1, i32 %ui2) #3 {
+entry:
+ %cmp = icmp eq i32 %ui2, 0
+ br i1 %cmp, label %cond.end, label %cond.false
+
+cond.false: ; preds = %entry
+ %div = udiv i32 %ui1, %ui2
+ br label %cond.end
+
+cond.end: ; preds = %cond.false, %entry
+ %cond = phi i32 [ %div, %cond.false ], [ %ui1, %entry ]
+ ret i32 %cond
+}
+
+; Function Attrs: nounwind readnone
+define internal fastcc zeroext i16 @_ZL26safe_mod_func_uint16_t_u_utt(i16 zeroext %ui1, i16 zeroext %ui2) #3 {
+entry:
+ %cmp = icmp eq i16 %ui2, 0
+ %conv1 = zext i16 %ui1 to i32
+ br i1 %cmp, label %cond.end, label %cond.false
+
+cond.false: ; preds = %entry
+ %0 = urem i16 %ui1, %ui2
+ %rem = zext i16 %0 to i32
+ br label %cond.end
+
+cond.end: ; preds = %cond.false, %entry
+ %cond = phi i32 [ %rem, %cond.false ], [ %conv1, %entry ]
+ %conv4 = trunc i32 %cond to i16
+ ret i16 %conv4
+}
+
+; Function Attrs: nounwind readnone
+define internal fastcc zeroext i8 @_ZL28safe_lshift_func_uint8_t_u_shi(i8 zeroext %left, i32 %right) #3 {
+entry:
+ %0 = icmp ugt i32 %right, 31
+ br i1 %0, label %cond.true, label %lor.lhs.false2
+
+lor.lhs.false2: ; preds = %entry
+ %conv = zext i8 %left to i32
+ %shr = lshr i32 255, %right
+ %cmp3 = icmp sgt i32 %conv, %shr
+ br i1 %cmp3, label %cond.true, label %cond.false
+
+cond.true: ; preds = %lor.lhs.false2, %entry
+ %conv4 = zext i8 %left to i32
+ br label %cond.end
+
+cond.false: ; preds = %lor.lhs.false2
+ %shl = shl i32 %conv, %right
+ br label %cond.end
+
+cond.end: ; preds = %cond.false, %cond.true
+ %cond = phi i32 [ %conv4, %cond.true ], [ %shl, %cond.false ]
+ %conv6 = trunc i32 %cond to i8
+ ret i8 %conv6
+}
+
+; Function Attrs: nounwind readnone
+define internal fastcc i32 @_ZL25safe_sub_func_int32_t_s_sii(i32 %si1, i32 %si2) #3 {
+entry:
+ %xor = xor i32 %si2, %si1
+ %and = and i32 %xor, -2147483648
+ %xor2 = xor i32 %and, %si1
+ %sub = sub nsw i32 %xor2, %si2
+ %xor3 = xor i32 %sub, %si2
+ %and4 = and i32 %xor3, %xor
+ %cmp = icmp slt i32 %and4, 0
+ %sub5 = select i1 %cmp, i32 0, i32 %si2
+ %si1.sub5 = sub nsw i32 %si1, %sub5
+ ret i32 %si1.sub5
+}
+
+; Function Attrs: nounwind readnone
+define internal fastcc signext i16 @_ZL25safe_mul_func_int16_t_s_sss(i16 signext %si1, i16 signext %si2) #3 {
+entry:
+ %conv = sext i16 %si1 to i32
+ %conv1 = sext i16 %si2 to i32
+ %mul = mul nsw i32 %conv1, %conv
+ %conv2 = trunc i32 %mul to i16
+ ret i16 %conv2
+}
+
+; Function Attrs: nounwind readnone
+define internal fastcc zeroext i16 @_ZL29safe_lshift_func_uint16_t_u_utj(i16 zeroext %left, i32 %right) #3 {
+entry:
+ %cmp = icmp ugt i32 %right, 31
+ br i1 %cmp, label %cond.true, label %lor.lhs.false
+
+lor.lhs.false: ; preds = %entry
+ %conv = zext i16 %left to i32
+ %shr = lshr i32 65535, %right
+ %cmp1 = icmp sgt i32 %conv, %shr
+ br i1 %cmp1, label %cond.true, label %cond.false
+
+cond.true: ; preds = %lor.lhs.false, %entry
+ %conv2 = zext i16 %left to i32
+ br label %cond.end
+
+cond.false: ; preds = %lor.lhs.false
+ %shl = shl i32 %conv, %right
+ br label %cond.end
+
+cond.end: ; preds = %cond.false, %cond.true
+ %cond = phi i32 [ %conv2, %cond.true ], [ %shl, %cond.false ]
+ %conv4 = trunc i32 %cond to i16
+ ret i16 %conv4
+}
+
+; Function Attrs: nounwind readnone
+define internal fastcc signext i16 @_ZL28safe_lshift_func_int16_t_s_usj(i16 signext %left, i32 %right) #3 {
+entry:
+ %conv = sext i16 %left to i32
+ %cmp = icmp slt i16 %left, 0
+ %cmp1 = icmp ugt i32 %right, 31
+ %or.cond = or i1 %cmp, %cmp1
+ %shr = lshr i32 32767, %right
+ %cmp4 = icmp sgt i32 %conv, %shr
+ %or.cond6 = or i1 %or.cond, %cmp4
+ %shl = select i1 %or.cond6, i32 0, i32 %right
+ %cond = shl i32 %conv, %shl
+ %conv7 = trunc i32 %cond to i16
+ ret i16 %conv7
+}
+
+; Function Attrs: nounwind readnone
+define internal fastcc signext i16 @_ZL25safe_sub_func_int16_t_s_sss(i16 signext %si2) #3 {
+entry:
+ %conv11 = zext i16 %si2 to i32
+ %sub = sub nsw i32 1, %conv11
+ %conv2 = trunc i32 %sub to i16
+ ret i16 %conv2
+}
+
+; Function Attrs: nounwind
+define internal fastcc void @_ZL29safe_rshift_func_uint16_t_u_utj() #0 {
+entry:
+ unreachable
+}
+
+; Function Attrs: nounwind readnone
+define internal fastcc signext i16 @_ZL25safe_add_func_int16_t_s_sss(i16 signext %si1, i16 signext %si2) #3 {
+entry:
+ %conv3 = zext i16 %si1 to i32
+ %conv14 = zext i16 %si2 to i32
+ %add = add nsw i32 %conv14, %conv3
+ %conv2 = trunc i32 %add to i16
+ ret i16 %conv2
+}
+
+; Function Attrs: nounwind
+define internal fastcc void @_ZL26safe_sub_func_uint32_t_u_ujj() #0 {
+entry:
+ unreachable
+}
+
+; Function Attrs: nounwind readnone
+define internal fastcc i32 @_ZL25safe_mod_func_int32_t_s_sii(i32 %si1, i32 %si2) #3 {
+entry:
+ %cmp = icmp eq i32 %si2, 0
+ br i1 %cmp, label %cond.end, label %lor.lhs.false
+
+lor.lhs.false: ; preds = %entry
+ %cmp1 = icmp eq i32 %si1, -2147483648
+ %cmp2 = icmp eq i32 %si2, -1
+ %or.cond = and i1 %cmp1, %cmp2
+ br i1 %or.cond, label %cond.end, label %cond.false
+
+cond.false: ; preds = %lor.lhs.false
+ %rem = srem i32 %si1, %si2
+ br label %cond.end
+
+cond.end: ; preds = %cond.false, %lor.lhs.false, %entry
+ %cond = phi i32 [ %rem, %cond.false ], [ %si1, %lor.lhs.false ], [ %si1, %entry ]
+ ret i32 %cond
+}
+
+; Function Attrs: nounwind readnone
+define internal fastcc i32 @_ZL25safe_add_func_int32_t_s_sii(i32 %si1) #3 {
+entry:
+ %cmp3 = icmp sgt i32 %si1, 1806657196
+ %add = add nsw i32 %si1, 340826451
+ %si1.add = select i1 %cmp3, i32 %si1, i32 %add
+ ret i32 %si1.add
+}
+
+; Function Attrs: nounwind readnone
+define internal fastcc zeroext i16 @_ZL29safe_rshift_func_uint16_t_u_sti(i16 zeroext %left, i32 %right) #3 {
+entry:
+ %0 = icmp ugt i32 %right, 31
+ %conv = zext i16 %left to i32
+ %shr = select i1 %0, i32 0, i32 %right
+ %conv.shr = lshr i32 %conv, %shr
+ %conv3 = trunc i32 %conv.shr to i16
+ ret i16 %conv3
+}
+
+; Function Attrs: nounwind
+define internal fastcc void @_ZL31safe_unary_minus_func_int16_t_ss() #0 {
+entry:
+ unreachable
+}
+
+; Function Attrs: nounwind readnone
+define internal fastcc i32 @_ZL26safe_mod_func_uint32_t_u_ujj(i32 %ui1, i32 %ui2) #3 {
+entry:
+ %cmp = icmp eq i32 %ui2, 0
+ br i1 %cmp, label %cond.end, label %cond.false
+
+cond.false: ; preds = %entry
+ %rem = urem i32 %ui1, %ui2
+ br label %cond.end
+
+cond.end: ; preds = %cond.false, %entry
+ %cond = phi i32 [ %rem, %cond.false ], [ %ui1, %entry ]
+ ret i32 %cond
+}
+
+; Function Attrs: nounwind readnone
+define internal fastcc zeroext i16 @_ZL26safe_add_func_uint16_t_u_utt(i16 zeroext %ui1, i16 zeroext %ui2) #3 {
+entry:
+ %conv = zext i16 %ui1 to i32
+ %conv1 = zext i16 %ui2 to i32
+ %add = add nsw i32 %conv1, %conv
+ %conv2 = trunc i32 %add to i16
+ ret i16 %conv2
+}
+
+; Function Attrs: nounwind readnone
+define internal fastcc zeroext i8 @_ZL25safe_add_func_uint8_t_u_uhh(i8 zeroext %ui1, i8 zeroext %ui2) #3 {
+entry:
+ %conv = zext i8 %ui1 to i32
+ %conv1 = zext i8 %ui2 to i32
+ %add = add nsw i32 %conv1, %conv
+ %conv2 = trunc i32 %add to i8
+ ret i8 %conv2
+}
+
+; Function Attrs: nounwind
+define internal fastcc void @_ZL25safe_div_func_int32_t_s_sii() #0 {
+entry:
+ unreachable
+}
+
+; Function Attrs: nounwind readnone
+define internal fastcc signext i8 @_ZL27safe_lshift_func_int8_t_s_sai(i32 %right) #3 {
+entry:
+ %0 = icmp ugt i32 %right, 31
+ %shr = lshr i32 127, %right
+ %cmp6 = icmp slt i32 %shr, 1
+ %or.cond = or i1 %0, %cmp6
+ br i1 %or.cond, label %cond.end, label %cond.false
+
+cond.false: ; preds = %entry
+ %shl = shl i32 1, %right
+ %phitmp = trunc i32 %shl to i8
+ br label %cond.end
+
+cond.end: ; preds = %cond.false, %entry
+ %cond = phi i8 [ %phitmp, %cond.false ], [ 1, %entry ]
+ ret i8 %cond
+}
+
+; Function Attrs: nounwind readnone
+define internal fastcc signext i8 @_ZL24safe_sub_func_int8_t_s_saa(i8 signext %si1) #3 {
+entry:
+ %conv1 = zext i8 %si1 to i32
+ %sub = add nsw i32 %conv1, 183
+ %conv2 = trunc i32 %sub to i8
+ ret i8 %conv2
+}
+
+; Function Attrs: nounwind
+define internal fastcc void @_ZL26safe_div_func_uint16_t_u_utt() #0 {
+entry:
+ unreachable
+}
+
+; Function Attrs: nounwind readnone
+define internal fastcc signext i16 @_ZL28safe_rshift_func_int16_t_s_usj(i16 signext %left, i32 %right) #3 {
+entry:
+ %conv = sext i16 %left to i32
+ %cmp = icmp slt i16 %left, 0
+ %cmp1 = icmp ugt i32 %right, 31
+ %or.cond = or i1 %cmp, %cmp1
+ %shr = select i1 %or.cond, i32 0, i32 %right
+ %cond = ashr i32 %conv, %shr
+ %conv4 = trunc i32 %cond to i16
+ ret i16 %conv4
+}
+
+; Function Attrs: nounwind
+define internal fastcc void @_ZL28safe_lshift_func_uint8_t_u_uhj() #0 {
+entry:
+ unreachable
+}
+
+; Function Attrs: nounwind readnone
+define internal fastcc signext i8 @_ZL24safe_mod_func_int8_t_s_saa(i8 signext %si1, i8 signext %si2) #3 {
+entry:
+ %conv = sext i8 %si2 to i32
+ %cmp = icmp eq i8 %si2, 0
+ br i1 %cmp, label %cond.true, label %lor.lhs.false
+
+lor.lhs.false: ; preds = %entry
+ %cmp2 = icmp eq i8 %si1, -128
+ %cmp4 = icmp eq i8 %si2, -1
+ %or.cond = and i1 %cmp2, %cmp4
+ br i1 %or.cond, label %cond.true, label %cond.false
+
+cond.true: ; preds = %lor.lhs.false, %entry
+ %conv5 = sext i8 %si1 to i32
+ br label %cond.end
+
+cond.false: ; preds = %lor.lhs.false
+ %conv1 = sext i8 %si1 to i32
+ %rem = srem i32 %conv1, %conv
+ br label %cond.end
+
+cond.end: ; preds = %cond.false, %cond.true
+ %cond = phi i32 [ %conv5, %cond.true ], [ %rem, %cond.false ]
+ %conv8 = trunc i32 %cond to i8
+ ret i8 %conv8
+}
+
+; Function Attrs: nounwind readnone
+define internal fastcc signext i8 @_ZL24safe_div_func_int8_t_s_saa(i8 signext %si1, i8 signext %si2) #3 {
+entry:
+ %conv = sext i8 %si2 to i32
+ %cmp = icmp eq i8 %si2, 0
+ br i1 %cmp, label %cond.true, label %lor.lhs.false
+
+lor.lhs.false: ; preds = %entry
+ %cmp2 = icmp eq i8 %si1, -128
+ %cmp4 = icmp eq i8 %si2, -1
+ %or.cond = and i1 %cmp2, %cmp4
+ br i1 %or.cond, label %cond.true, label %cond.false
+
+cond.true: ; preds = %lor.lhs.false, %entry
+ %conv5 = sext i8 %si1 to i32
+ br label %cond.end
+
+cond.false: ; preds = %lor.lhs.false
+ %conv1 = sext i8 %si1 to i32
+ %div = sdiv i32 %conv1, %conv
+ br label %cond.end
+
+cond.end: ; preds = %cond.false, %cond.true
+ %cond = phi i32 [ %conv5, %cond.true ], [ %div, %cond.false ]
+ %conv8 = trunc i32 %cond to i8
+ ret i8 %conv8
+}
+
+; Function Attrs: nounwind readnone
+define internal fastcc zeroext i16 @_ZL29safe_lshift_func_uint16_t_u_sti(i16 zeroext %left, i32 %right) #3 {
+entry:
+ %0 = icmp ugt i32 %right, 31
+ br i1 %0, label %cond.true, label %lor.lhs.false2
+
+lor.lhs.false2: ; preds = %entry
+ %conv = zext i16 %left to i32
+ %shr = lshr i32 65535, %right
+ %cmp3 = icmp sgt i32 %conv, %shr
+ br i1 %cmp3, label %cond.true, label %cond.false
+
+cond.true: ; preds = %lor.lhs.false2, %entry
+ %conv4 = zext i16 %left to i32
+ br label %cond.end
+
+cond.false: ; preds = %lor.lhs.false2
+ %shl = shl i32 %conv, %right
+ br label %cond.end
+
+cond.end: ; preds = %cond.false, %cond.true
+ %cond = phi i32 [ %conv4, %cond.true ], [ %shl, %cond.false ]
+ %conv6 = trunc i32 %cond to i16
+ ret i16 %conv6
+}
+
+; Function Attrs: nounwind
+define internal fastcc signext i16 @_ZL7func_32tiPa(i16 zeroext %p_33, i32 %p_34) #0 {
+return:
+ store i32 1, i32* @_ZL5g_135, align 4, !tbaa !3
+ %0 = load i8* @_ZL5g_126, align 1, !tbaa !1
+ %call8 = tail call fastcc signext i8 @_ZL24safe_mod_func_int8_t_s_saa(i8 signext %0, i8 signext 0)
+ %conv9 = sext i8 %call8 to i32
+ %1 = load i16* @_ZL5g_168, align 2, !tbaa !4
+ %conv10 = sext i16 %1 to i32
+ %cmp11 = icmp eq i32 %conv9, %conv10
+ %conv12 = zext i1 %cmp11 to i32
+ %2 = load i8* @_ZL5g_136, align 1, !tbaa !1
+ %conv131 = zext i8 %2 to i32
+ %or = or i32 %conv12, %conv131
+ %conv14 = trunc i32 %or to i8
+ store i8 %conv14, i8* @_ZL5g_136, align 1, !tbaa !1
+ %3 = load i32* @_ZL5g_132, align 4, !tbaa !3
+ %or27 = or i32 %3, 1
+ %call28 = tail call fastcc i32 @_ZL26safe_div_func_uint32_t_u_ujj(i32 -10, i32 %or27)
+ %conv29 = trunc i32 %call28 to i16
+ store i16 %conv29, i16* @_ZL4g_82, align 2, !tbaa !4
+ %conv34 = zext i16 %p_33 to i32
+ store i8 0, i8* @_ZL5g_133, align 1, !tbaa !1
+ %4 = load i8* getelementptr inbounds ({ i8, [3 x i8] }* @_ZL4g_74, i32 0, i32 0), align 4, !tbaa !1
+ %not.tobool68 = icmp ne i8 %4, 0
+ %5 = zext i1 %not.tobool68 to i32
+ %or82 = or i32 %5, %conv34
+ %6 = load i8* @_ZL5g_126, align 1, !tbaa !1
+ %conv832 = zext i8 %6 to i32
+ %xor = xor i32 %or82, %conv832
+ %conv84 = trunc i32 %xor to i8
+ store i8 %conv84, i8* @_ZL5g_126, align 1, !tbaa !1
+ %lnot = icmp ne i8 %conv84, 0
+ %xor87 = zext i1 %lnot to i32
+ store i32 %xor87, i32* @_ZL5g_132, align 4, !tbaa !3
+ ret i16 -20646
+}
+
+; Function Attrs: nounwind
+define internal fastcc signext i16 @_ZL7func_40ia(i8 signext %p_42) #0 {
+entry:
+ %call = tail call fastcc signext i8 @_ZL24safe_mod_func_int8_t_s_saa(i8 signext 0, i8 signext 7)
+ %conv2 = sext i8 %call to i32
+ %0 = load i32* @_ZL3g_2, align 4, !tbaa !3
+ %conv3 = trunc i32 %0 to i8
+ %call4 = tail call fastcc signext i8 @_ZL30safe_unary_minus_func_int8_t_sa(i8 signext %conv3)
+ %conv5 = sext i8 %call4 to i16
+ store i16 %conv5, i16* bitcast ({ i8, [3 x i8] }* @_ZL4g_74 to i16*), align 4, !tbaa !4
+ %conv6 = sext i8 %call4 to i32
+ %cmp8 = icmp sgt i32 %conv6, zext (i1 icmp ne (i8* getelementptr inbounds ([8 x i8]* @_ZL5g_171, i32 0, i32 5), i8* @_ZL5g_304) to i32)
+ %conv9 = zext i1 %cmp8 to i32
+ %cmp10 = icmp ne i32 %conv2, %conv9
+ %conv11 = zext i1 %cmp10 to i16
+ %call12 = tail call fastcc signext i16 @_ZL28safe_lshift_func_int16_t_s_usj(i16 signext %conv11, i32 7)
+ %conv13 = sext i16 %call12 to i32
+ store i32 %conv13, i32* @_ZL5g_257, align 4, !tbaa !3
+ %tobool = icmp eq i16 %call12, 0
+ br i1 %tobool, label %land.end, label %land.rhs
+
+land.rhs: ; preds = %entry
+ %1 = load i16* @_ZL5g_308, align 2, !tbaa !4
+ %conv17 = zext i16 %1 to i32
+ %xor = xor i32 %conv17, %conv13
+ %conv18 = trunc i32 %xor to i16
+ store i16 %conv18, i16* @_ZL5g_308, align 2, !tbaa !4
+ %lnot = icmp eq i16 %conv18, 0
+ %conv20 = zext i1 %lnot to i32
+ %2 = load i16* @_ZL4g_79, align 2, !tbaa !4
+ %conv21 = zext i16 %2 to i32
+ %xor22 = xor i32 %conv20, %conv21
+ %conv23 = trunc i32 %xor22 to i16
+ store i16 %conv23, i16* @_ZL4g_79, align 2, !tbaa !4
+ %tobool24 = icmp ne i16 %conv23, 0
+ %phitmp = zext i1 %tobool24 to i16
+ br label %land.end
+
+land.end: ; preds = %land.rhs, %entry
+ %3 = phi i16 [ 0, %entry ], [ %phitmp, %land.rhs ]
+ store i16 %3, i16* bitcast ({ i8, [3 x i8] }* @_ZL4g_74 to i16*), align 4, !tbaa !4
+ %conv31 = sext i8 %p_42 to i16
+ ret i16 %conv31
+}
+
+; Function Attrs: nounwind
+define internal fastcc void @_ZL7func_492S0(%union.U1* noalias nocapture sret %agg.result, %struct.S0* byval nocapture align 4 %p_50) #0 {
+entry:
+ %l_131 = alloca i32, align 4
+ %l_129 = alloca i32, align 4
+ store i32 1179615507, i32* %l_131, align 4, !tbaa !3
+ store i32 3, i32* @_ZL4g_53, align 4, !tbaa !3
+ %f1 = getelementptr inbounds %struct.S0* %p_50, i32 0, i32 1
+ %f0 = getelementptr inbounds %struct.S0* %p_50, i32 0, i32 0
+ %f2 = getelementptr inbounds %struct.S0* %p_50, i32 0, i32 2
+ br label %for.end86
+
+for.end86: ; preds = %for.inc1370, %entry
+ store i32 1795078696, i32* %l_129, align 4, !tbaa !3
+ store i8 0, i8* %f1, align 2, !tbaa !1
+ br label %for.body90
+
+for.body90: ; preds = %for.inc1329, %for.end86
+ %0 = load i16* %f0, align 4, !tbaa !4
+ %conv110 = sext i16 %0 to i32
+ %call111 = call fastcc i32 @_ZL26safe_div_func_uint32_t_u_ujj(i32 0, i32 %conv110)
+ %1 = load i32* @_ZL4g_53, align 4, !tbaa !3
+ %call112 = call fastcc i32 @_ZL25safe_mod_func_int32_t_s_sii(i32 %call111, i32 %1)
+ %cmp113 = icmp ult i32 %call112, -1508745334
+ %conv114 = zext i1 %cmp113 to i32
+ %2 = load i16* @_ZL4g_77, align 2, !tbaa !4
+ %conv116 = zext i16 %2 to i32
+ %xor117 = xor i32 %conv116, %conv114
+ %conv118 = trunc i32 %xor117 to i16
+ store i16 %conv118, i16* @_ZL4g_77, align 2, !tbaa !4
+ store i16 %conv118, i16* @_ZL4g_79, align 2, !tbaa !4
+ %and120 = and i32 %xor117, 1
+ %3 = load i32* @_ZL4g_53, align 4, !tbaa !3
+ %cmp121 = icmp eq i32 %and120, %3
+ %conv122 = zext i1 %cmp121 to i16
+ store i16 %conv122, i16* @_ZL4g_82, align 2, !tbaa !4
+ %4 = load i32* %f2, align 4, !tbaa !3
+ %conv127 = trunc i32 %4 to i8
+ %call128 = call fastcc zeroext i8 @_ZL25safe_sub_func_uint8_t_u_uhh(i8 zeroext -5, i8 zeroext %conv127)
+ %tobool129 = icmp eq i8 %call128, 0
+ br i1 %tobool129, label %cleanup1367, label %land.lhs.true
+
+land.lhs.true: ; preds = %for.body90
+ %5 = load i8* %f1, align 2, !tbaa !1
+ %tobool131 = icmp eq i8 %5, 0
+ br i1 %tobool131, label %cleanup1367, label %for.end139
+
+for.end139: ; preds = %land.lhs.true
+ %6 = load i8* getelementptr inbounds ([4 x [6 x [6 x i8]]]* @_ZL4g_52, i32 0, i32 1, i32 3, i32 1), align 1, !tbaa !1
+ %tobool140 = icmp eq i8 %6, 0
+ br i1 %tobool140, label %for.end582, label %for.inc1370
+
+for.end582: ; preds = %for.end139
+ %7 = load i8* %f1, align 2, !tbaa !1
+ %conv554 = sext i8 %7 to i32
+ %add = add nsw i32 %conv554, 1
+ %8 = load i32* @_ZL4g_53, align 4, !tbaa !3
+ %add555 = add nsw i32 %8, 1
+ %arrayidx559 = getelementptr inbounds [4 x [6 x [6 x i8]]]* @_ZL4g_52, i32 0, i32 %conv554, i32 %add555, i32 %add
+ %9 = load i8* %arrayidx559, align 1, !tbaa !1
+ %conv560 = sext i8 %9 to i32
+ %10 = load i32* %f2, align 4, !tbaa !3
+ %xor561 = xor i32 %conv560, %and120
+ %or563 = or i32 %xor561, %10
+ %xor561.1 = xor i32 %conv560, %or563
+ %or563.1 = or i32 %xor561.1, %10
+ %xor561.2 = xor i32 %conv560, %or563.1
+ %or563.2 = or i32 %xor561.2, %10
+ %xor561.3 = xor i32 %conv560, %or563.2
+ %or563.3 = or i32 %xor561.3, %10
+ store i32 %or563.3, i32* @_ZL4g_93, align 4, !tbaa !3
+ store i16 0, i16* %f0, align 4, !tbaa !4
+ %11 = load i32* getelementptr inbounds (%struct.S0* @_ZL4g_83, i32 0, i32 2), align 4, !tbaa !3
+ %conv637 = trunc i32 %11 to i16
+ %call638 = call fastcc signext i16 @_ZL25safe_sub_func_int16_t_s_sss(i16 signext %conv637)
+ %tobool639 = icmp eq i16 %call638, 0
+ br i1 %tobool639, label %if.else1214, label %if.then640
+
+if.then640: ; preds = %for.end582
+ %12 = load i32* @_ZL5g_138, align 4, !tbaa !3
+ %inc733 = add i32 %12, 1
+ store i32 %inc733, i32* @_ZL5g_138, align 4, !tbaa !3
+ %13 = load i8* getelementptr inbounds ([4 x [6 x [6 x i8]]]* @_ZL4g_52, i32 0, i32 0, i32 1, i32 2), align 1, !tbaa !1
+ %tobool734 = icmp eq i8 %13, 0
+ br i1 %tobool734, label %if.end1219.loopexit, label %for.inc1329
+
+if.else1214: ; preds = %for.end582
+ %14 = load i8* %f1, align 2, !tbaa !1
+ %tobool1216 = icmp eq i8 %14, 0
+ br i1 %tobool1216, label %if.end1219, label %for.inc1370
+
+if.end1219.loopexit: ; preds = %if.then640
+ store i16 -28, i16* @_ZL4g_77, align 2, !tbaa !4
+ br label %if.end1219
+
+if.end1219: ; preds = %if.end1219.loopexit, %if.else1214
+ store i32 0, i32* %l_129, align 4, !tbaa !3
+ store i32 1, i32* %l_131, align 4, !tbaa !3
+ %15 = load i8* %f1, align 2, !tbaa !1
+ %tobool1257 = icmp eq i8 %15, 0
+ br i1 %tobool1257, label %lor.lhs.false, label %for.end1334.loopexit742
+
+lor.lhs.false: ; preds = %if.end1219
+ %16 = load i16* %f0, align 4, !tbaa !4
+ %tobool1259 = icmp eq i16 %16, 0
+ br i1 %tobool1259, label %if.else1312, label %for.end1334.loopexit742
+
+if.else1312: ; preds = %lor.lhs.false
+ store i32* %l_129, i32** getelementptr inbounds ([2 x [10 x i32*]]* @_ZL5g_197, i32 0, i32 1, i32 9), align 4, !tbaa !0
+ br label %for.inc1370
+
+for.inc1329: ; preds = %if.then640
+ %17 = load i8* %f1, align 2, !tbaa !1
+ %conv1331700 = zext i8 %17 to i32
+ %add1332 = add nsw i32 %conv1331700, 1
+ %conv1333 = trunc i32 %add1332 to i8
+ store i8 %conv1333, i8* %f1, align 2, !tbaa !1
+ %cmp89 = icmp slt i8 %conv1333, 4
+ br i1 %cmp89, label %for.body90, label %for.inc1370
+
+for.end1334.loopexit742: ; preds = %lor.lhs.false, %if.end1219
+ store i8 13, i8* @_ZL5g_170, align 1, !tbaa !1
+ br label %for.inc1370
+
+cleanup1367: ; preds = %land.lhs.true, %for.body90
+ %18 = load i32* @_ZL4g_93, align 4, !tbaa !3
+ %and635 = and i32 %18, -6
+ store i32 %and635, i32* @_ZL4g_93, align 4, !tbaa !3
+ %19 = load i8** bitcast ({ i8, [3 x i8] }* @_ZZL7func_492S0E5l_119 to i8**), align 4
+ %20 = getelementptr inbounds %union.U1* %agg.result, i32 0, i32 0
+ store i8* %19, i8** %20, align 4
+ br label %cleanup1381
+
+for.inc1370: ; preds = %for.end1334.loopexit742, %for.inc1329, %if.else1312, %if.else1214, %for.end139
+ store i32* %l_131, i32** getelementptr inbounds ([2 x [10 x i32*]]* @_ZL5g_197, i32 0, i32 1, i32 7), align 4, !tbaa !0
+ store i8 -1, i8* @_ZL5g_136, align 1, !tbaa !1
+ %21 = load i32* @_ZL4g_53, align 4, !tbaa !3
+ %sub1371 = add nsw i32 %21, -1
+ store i32 %sub1371, i32* @_ZL4g_53, align 4, !tbaa !3
+ %cmp = icmp sgt i32 %21, 0
+ br i1 %cmp, label %for.end86, label %for.end1372
+
+for.end1372: ; preds = %for.inc1370
+ store i8 0, i8* getelementptr inbounds ([8 x i8]* @_ZL5g_171, i32 0, i32 6), align 1, !tbaa !1
+ %22 = load i8** bitcast ({ i8, [3 x i8] }* @_ZL4g_74 to i8**), align 4
+ %23 = getelementptr inbounds %union.U1* %agg.result, i32 0, i32 0
+ store i8* %22, i8** %23, align 4
+ br label %cleanup1381
+
+cleanup1381: ; preds = %for.end1372, %cleanup1367
+ ret void
+}
+
+; Function Attrs: nounwind readnone
+define internal fastcc signext i8 @_ZL24safe_add_func_int8_t_s_saa(i8 signext %si1, i8 signext %si2) #3 {
+entry:
+ %conv3 = zext i8 %si1 to i32
+ %conv14 = zext i8 %si2 to i32
+ %add = add nsw i32 %conv14, %conv3
+ %conv2 = trunc i32 %add to i8
+ ret i8 %conv2
+}
+
+; Function Attrs: nounwind readnone
+define internal fastcc signext i8 @_ZL24safe_mul_func_int8_t_s_saa(i8 signext %si1, i8 signext %si2) #3 {
+entry:
+ %conv = sext i8 %si1 to i32
+ %conv1 = sext i8 %si2 to i32
+ %mul = mul nsw i32 %conv1, %conv
+ %conv2 = trunc i32 %mul to i8
+ ret i8 %conv2
+}
+
+; Function Attrs: nounwind readnone
+define internal fastcc signext i16 @_ZL28safe_rshift_func_int16_t_s_ssi(i16 signext %left) #3 {
+entry:
+ %conv = sext i16 %left to i32
+ %left.lobit = lshr i16 %left, 15
+ %0 = zext i16 %left.lobit to i32
+ %.not = xor i32 %0, 1
+ %cond = ashr i32 %conv, %.not
+ %conv6 = trunc i32 %cond to i16
+ ret i16 %conv6
+}
+
+; Function Attrs: nounwind readnone
+define internal fastcc signext i8 @_ZL30safe_unary_minus_func_int8_t_sa(i8 signext %si) #3 {
+entry:
+ %conv2 = zext i8 %si to i32
+ %sub = sub nsw i32 0, %conv2
+ %conv1 = trunc i32 %sub to i8
+ ret i8 %conv1
+}
+
+; Function Attrs: nounwind readnone
+define internal fastcc i32 @_ZL31safe_unary_minus_func_int32_t_si(i32 %si) #3 {
+entry:
+ %sub = sub nsw i32 0, %si
+ ret i32 %sub
+}
+
+; Function Attrs: nounwind readnone
+define internal fastcc i32 @_ZL26safe_add_func_uint32_t_u_ujj(i32 %ui1, i32 %ui2) #3 {
+entry:
+ %add = add i32 %ui2, %ui1
+ ret i32 %add
+}
+
+; Function Attrs: nounwind
+define weak i8* @malloc(i32 %bytes) #0 {
+entry:
+ %cmp = icmp ult i32 %bytes, 245
+ br i1 %cmp, label %if.then, label %if.else137
+
+if.then: ; preds = %entry
+ %cmp1 = icmp ult i32 %bytes, 11
+ br i1 %cmp1, label %cond.end, label %cond.false
+
+cond.false: ; preds = %if.then
+ %add2 = add i32 %bytes, 11
+ %and = and i32 %add2, -8
+ br label %cond.end
+
+cond.end: ; preds = %cond.false, %if.then
+ %cond = phi i32 [ %and, %cond.false ], [ 16, %if.then ]
+ %shr = lshr exact i32 %cond, 3
+ %0 = load i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 0), align 4, !tbaa !3
+ %shr3 = lshr i32 %0, %shr
+ %and4 = and i32 %shr3, 3
+ %cmp5 = icmp eq i32 %and4, 0
+ br i1 %cmp5, label %if.else28, label %if.then6
+
+if.then6: ; preds = %cond.end
+ %neg = and i32 %shr3, 1
+ %and7 = xor i32 %neg, 1
+ %add8 = add i32 %and7, %shr
+ %shl = shl nsw i32 %add8, 1
+ %arrayidx = getelementptr inbounds %struct.malloc_state* @_gm_, i32 0, i32 10, i32 %shl
+ %1 = bitcast %struct.malloc_chunk** %arrayidx to %struct.malloc_chunk*
+ %arrayidx.sum = add i32 %shl, 2
+ %2 = getelementptr inbounds %struct.malloc_state* @_gm_, i32 0, i32 10, i32 %arrayidx.sum
+ %3 = load %struct.malloc_chunk** %2, align 4, !tbaa !0
+ %fd9 = getelementptr inbounds %struct.malloc_chunk* %3, i32 0, i32 2
+ %4 = load %struct.malloc_chunk** %fd9, align 4, !tbaa !0
+ %cmp10 = icmp eq %struct.malloc_chunk* %1, %4
+ br i1 %cmp10, label %if.then11, label %if.else
+
+if.then11: ; preds = %if.then6
+ %shl12 = shl i32 1, %add8
+ %neg13 = xor i32 %shl12, -1
+ %and14 = and i32 %0, %neg13
+ store i32 %and14, i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 0), align 4, !tbaa !3
+ br label %if.end21
+
+if.else: ; preds = %if.then6
+ %5 = bitcast %struct.malloc_chunk* %4 to i8*
+ %6 = load i8** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 4), align 4, !tbaa !0
+ %cmp15 = icmp ult i8* %5, %6
+ br i1 %cmp15, label %if.else20, label %land.rhs
+
+land.rhs: ; preds = %if.else
+ %bk = getelementptr inbounds %struct.malloc_chunk* %4, i32 0, i32 3
+ %7 = load %struct.malloc_chunk** %bk, align 4, !tbaa !0
+ %cmp16 = icmp eq %struct.malloc_chunk* %7, %3
+ br i1 %cmp16, label %if.then17, label %if.else20, !prof !5
+
+if.then17: ; preds = %land.rhs
+ store %struct.malloc_chunk* %1, %struct.malloc_chunk** %bk, align 4, !tbaa !0
+ store %struct.malloc_chunk* %4, %struct.malloc_chunk** %2, align 4, !tbaa !0
+ br label %if.end21
+
+if.else20: ; preds = %land.rhs, %if.else
+ tail call void @abort() #6
+ unreachable
+
+if.end21: ; preds = %if.then17, %if.then11
+ %shl22 = shl i32 %add8, 3
+ %or23 = or i32 %shl22, 3
+ %head = getelementptr inbounds %struct.malloc_chunk* %3, i32 0, i32 1
+ store i32 %or23, i32* %head, align 4, !tbaa !3
+ %8 = bitcast %struct.malloc_chunk* %3 to i8*
+ %add.ptr.sum104 = or i32 %shl22, 4
+ %head25 = getelementptr inbounds i8* %8, i32 %add.ptr.sum104
+ %9 = bitcast i8* %head25 to i32*
+ %10 = load i32* %9, align 4, !tbaa !3
+ %or26 = or i32 %10, 1
+ store i32 %or26, i32* %9, align 4, !tbaa !3
+ %11 = bitcast %struct.malloc_chunk** %fd9 to i8*
+ br label %postaction
+
+if.else28: ; preds = %cond.end
+ %12 = load i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 2), align 4, !tbaa !3
+ %cmp29 = icmp ugt i32 %cond, %12
+ br i1 %cmp29, label %if.then30, label %if.end154
+
+if.then30: ; preds = %if.else28
+ %cmp31 = icmp eq i32 %shr3, 0
+ br i1 %cmp31, label %if.else127, label %if.then32
+
+if.then32: ; preds = %if.then30
+ %shl35 = shl i32 %shr3, %shr
+ %shl37 = shl i32 2, %shr
+ %sub = sub i32 0, %shl37
+ %or40 = or i32 %shl37, %sub
+ %and41 = and i32 %shl35, %or40
+ %sub42 = sub i32 0, %and41
+ %and43 = and i32 %and41, %sub42
+ %sub44 = add i32 %and43, -1
+ %shr45 = lshr i32 %sub44, 12
+ %and46 = and i32 %shr45, 16
+ %shr47 = lshr i32 %sub44, %and46
+ %shr48 = lshr i32 %shr47, 5
+ %and49 = and i32 %shr48, 8
+ %add50 = or i32 %and49, %and46
+ %shr51 = lshr i32 %shr47, %and49
+ %shr52 = lshr i32 %shr51, 2
+ %and53 = and i32 %shr52, 4
+ %add54 = or i32 %add50, %and53
+ %shr55 = lshr i32 %shr51, %and53
+ %shr56 = lshr i32 %shr55, 1
+ %and57 = and i32 %shr56, 2
+ %add58 = or i32 %add54, %and57
+ %shr59 = lshr i32 %shr55, %and57
+ %shr60 = lshr i32 %shr59, 1
+ %and61 = and i32 %shr60, 1
+ %add62 = or i32 %add58, %and61
+ %shr63 = lshr i32 %shr59, %and61
+ %add64 = add i32 %add62, %shr63
+ %shl65 = shl i32 %add64, 1
+ %arrayidx66 = getelementptr inbounds %struct.malloc_state* @_gm_, i32 0, i32 10, i32 %shl65
+ %13 = bitcast %struct.malloc_chunk** %arrayidx66 to %struct.malloc_chunk*
+ %arrayidx66.sum = add i32 %shl65, 2
+ %14 = getelementptr inbounds %struct.malloc_state* @_gm_, i32 0, i32 10, i32 %arrayidx66.sum
+ %15 = load %struct.malloc_chunk** %14, align 4, !tbaa !0
+ %fd69 = getelementptr inbounds %struct.malloc_chunk* %15, i32 0, i32 2
+ %16 = load %struct.malloc_chunk** %fd69, align 4, !tbaa !0
+ %cmp70 = icmp eq %struct.malloc_chunk* %13, %16
+ br i1 %cmp70, label %if.then71, label %if.else75
+
+if.then71: ; preds = %if.then32
+ %shl72 = shl i32 1, %add64
+ %neg73 = xor i32 %shl72, -1
+ %and74 = and i32 %0, %neg73
+ store i32 %and74, i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 0), align 4, !tbaa !3
+ br label %if.end89
+
+if.else75: ; preds = %if.then32
+ %17 = bitcast %struct.malloc_chunk* %16 to i8*
+ %18 = load i8** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 4), align 4, !tbaa !0
+ %cmp76 = icmp ult i8* %17, %18
+ br i1 %cmp76, label %if.else87, label %land.rhs77
+
+land.rhs77: ; preds = %if.else75
+ %bk78 = getelementptr inbounds %struct.malloc_chunk* %16, i32 0, i32 3
+ %19 = load %struct.malloc_chunk** %bk78, align 4, !tbaa !0
+ %cmp79 = icmp eq %struct.malloc_chunk* %19, %15
+ br i1 %cmp79, label %if.then84, label %if.else87, !prof !5
+
+if.then84: ; preds = %land.rhs77
+ store %struct.malloc_chunk* %13, %struct.malloc_chunk** %bk78, align 4, !tbaa !0
+ store %struct.malloc_chunk* %16, %struct.malloc_chunk** %14, align 4, !tbaa !0
+ br label %if.end89
+
+if.else87: ; preds = %land.rhs77, %if.else75
+ tail call void @abort() #6
+ unreachable
+
+if.end89: ; preds = %if.then84, %if.then71
+ %shl90 = shl i32 %add64, 3
+ %sub91 = sub i32 %shl90, %cond
+ %or93 = or i32 %cond, 3
+ %head94 = getelementptr inbounds %struct.malloc_chunk* %15, i32 0, i32 1
+ store i32 %or93, i32* %head94, align 4, !tbaa !3
+ %20 = bitcast %struct.malloc_chunk* %15 to i8*
+ %add.ptr95 = getelementptr inbounds i8* %20, i32 %cond
+ %21 = bitcast i8* %add.ptr95 to %struct.malloc_chunk*
+ %or96 = or i32 %sub91, 1
+ %add.ptr95.sum102 = or i32 %cond, 4
+ %head97 = getelementptr inbounds i8* %20, i32 %add.ptr95.sum102
+ %22 = bitcast i8* %head97 to i32*
+ store i32 %or96, i32* %22, align 4, !tbaa !3
+ %add.ptr98 = getelementptr inbounds i8* %20, i32 %shl90
+ %prev_foot = bitcast i8* %add.ptr98 to i32*
+ store i32 %sub91, i32* %prev_foot, align 4, !tbaa !3
+ %23 = load i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 2), align 4, !tbaa !3
+ %cmp99 = icmp eq i32 %23, 0
+ br i1 %cmp99, label %if.end125, label %if.then100
+
+if.then100: ; preds = %if.end89
+ %24 = load %struct.malloc_chunk** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 5), align 4, !tbaa !0
+ %shr101 = lshr i32 %23, 3
+ %shl102 = shl nuw nsw i32 %shr101, 1
+ %arrayidx103 = getelementptr inbounds %struct.malloc_state* @_gm_, i32 0, i32 10, i32 %shl102
+ %25 = bitcast %struct.malloc_chunk** %arrayidx103 to %struct.malloc_chunk*
+ %26 = load i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 0), align 4, !tbaa !3
+ %shl105 = shl i32 1, %shr101
+ %and106 = and i32 %26, %shl105
+ %tobool107 = icmp eq i32 %and106, 0
+ br i1 %tobool107, label %if.then108, label %if.else111
+
+if.then108: ; preds = %if.then100
+ %or110 = or i32 %26, %shl105
+ store i32 %or110, i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 0), align 4, !tbaa !3
+ %arrayidx103.sum.pre = add i32 %shl102, 2
+ %.pre = getelementptr inbounds %struct.malloc_state* @_gm_, i32 0, i32 10, i32 %arrayidx103.sum.pre
+ br label %if.end120
+
+if.else111: ; preds = %if.then100
+ %arrayidx103.sum103 = add i32 %shl102, 2
+ %27 = getelementptr inbounds %struct.malloc_state* @_gm_, i32 0, i32 10, i32 %arrayidx103.sum103
+ %28 = load %struct.malloc_chunk** %27, align 4, !tbaa !0
+ %29 = bitcast %struct.malloc_chunk* %28 to i8*
+ %30 = load i8** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 4), align 4, !tbaa !0
+ %cmp113 = icmp ult i8* %29, %30
+ br i1 %cmp113, label %if.else118, label %if.end120, !prof !6
+
+if.else118: ; preds = %if.else111
+ tail call void @abort() #6
+ unreachable
+
+if.end120: ; preds = %if.else111, %if.then108
+ %.pre-phi = phi %struct.malloc_chunk** [ %27, %if.else111 ], [ %.pre, %if.then108 ]
+ %F104.0 = phi %struct.malloc_chunk* [ %28, %if.else111 ], [ %25, %if.then108 ]
+ store %struct.malloc_chunk* %24, %struct.malloc_chunk** %.pre-phi, align 4, !tbaa !0
+ %bk122 = getelementptr inbounds %struct.malloc_chunk* %F104.0, i32 0, i32 3
+ store %struct.malloc_chunk* %24, %struct.malloc_chunk** %bk122, align 4, !tbaa !0
+ %fd123 = getelementptr inbounds %struct.malloc_chunk* %24, i32 0, i32 2
+ store %struct.malloc_chunk* %F104.0, %struct.malloc_chunk** %fd123, align 4, !tbaa !0
+ %bk124 = getelementptr inbounds %struct.malloc_chunk* %24, i32 0, i32 3
+ store %struct.malloc_chunk* %25, %struct.malloc_chunk** %bk124, align 4, !tbaa !0
+ br label %if.end125
+
+if.end125: ; preds = %if.end120, %if.end89
+ store i32 %sub91, i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 2), align 4, !tbaa !3
+ store %struct.malloc_chunk* %21, %struct.malloc_chunk** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 5), align 4, !tbaa !0
+ %31 = bitcast %struct.malloc_chunk** %fd69 to i8*
+ br label %postaction
+
+if.else127: ; preds = %if.then30
+ %32 = load i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 1), align 4, !tbaa !3
+ %cmp128 = icmp eq i32 %32, 0
+ br i1 %cmp128, label %if.end154, label %land.lhs.true
+
+land.lhs.true: ; preds = %if.else127
+ %sub.i = sub i32 0, %32
+ %and.i = and i32 %32, %sub.i
+ %sub2.i = add i32 %and.i, -1
+ %shr.i = lshr i32 %sub2.i, 12
+ %and3.i = and i32 %shr.i, 16
+ %shr4.i = lshr i32 %sub2.i, %and3.i
+ %shr5.i = lshr i32 %shr4.i, 5
+ %and6.i = and i32 %shr5.i, 8
+ %add.i = or i32 %and6.i, %and3.i
+ %shr7.i = lshr i32 %shr4.i, %and6.i
+ %shr8.i = lshr i32 %shr7.i, 2
+ %and9.i = and i32 %shr8.i, 4
+ %add10.i = or i32 %add.i, %and9.i
+ %shr11.i = lshr i32 %shr7.i, %and9.i
+ %shr12.i = lshr i32 %shr11.i, 1
+ %and13.i = and i32 %shr12.i, 2
+ %add14.i = or i32 %add10.i, %and13.i
+ %shr15.i = lshr i32 %shr11.i, %and13.i
+ %shr16.i = lshr i32 %shr15.i, 1
+ %and17.i = and i32 %shr16.i, 1
+ %add18.i = or i32 %add14.i, %and17.i
+ %shr19.i = lshr i32 %shr15.i, %and17.i
+ %add20.i = add i32 %add18.i, %shr19.i
+ %arrayidx.i = getelementptr inbounds %struct.malloc_state* @_gm_, i32 0, i32 11, i32 %add20.i
+ %33 = load %struct.malloc_tree_chunk** %arrayidx.i, align 4, !tbaa !0
+ %head.i = getelementptr inbounds %struct.malloc_tree_chunk* %33, i32 0, i32 1
+ %34 = load i32* %head.i, align 4, !tbaa !3
+ %and21.i = and i32 %34, -8
+ %sub22.i = sub i32 %and21.i, %cond
+ br label %while.cond.i
+
+while.cond.i: ; preds = %while.body.i, %land.lhs.true
+ %rsize.0.i = phi i32 [ %sub22.i, %land.lhs.true ], [ %sub31.rsize.0.i, %while.body.i ]
+ %v.0.i = phi %struct.malloc_tree_chunk* [ %33, %land.lhs.true ], [ %cond.v.0.i, %while.body.i ]
+ %t.0.i = phi %struct.malloc_tree_chunk* [ %33, %land.lhs.true ], [ %cond6.i, %while.body.i ]
+ %arrayidx23.i = getelementptr inbounds %struct.malloc_tree_chunk* %t.0.i, i32 0, i32 4, i32 0
+ %35 = load %struct.malloc_tree_chunk** %arrayidx23.i, align 4, !tbaa !0
+ %cmp.i = icmp eq %struct.malloc_tree_chunk* %35, null
+ br i1 %cmp.i, label %cond.end.i, label %while.body.i
+
+cond.end.i: ; preds = %while.cond.i
+ %arrayidx27.i = getelementptr inbounds %struct.malloc_tree_chunk* %t.0.i, i32 0, i32 4, i32 1
+ %36 = load %struct.malloc_tree_chunk** %arrayidx27.i, align 4, !tbaa !0
+ %cmp28.i = icmp eq %struct.malloc_tree_chunk* %36, null
+ br i1 %cmp28.i, label %while.end.i, label %while.body.i
+
+while.body.i: ; preds = %cond.end.i, %while.cond.i
+ %cond6.i = phi %struct.malloc_tree_chunk* [ %36, %cond.end.i ], [ %35, %while.cond.i ]
+ %head29.i = getelementptr inbounds %struct.malloc_tree_chunk* %cond6.i, i32 0, i32 1
+ %37 = load i32* %head29.i, align 4, !tbaa !3
+ %and30.i = and i32 %37, -8
+ %sub31.i = sub i32 %and30.i, %cond
+ %cmp32.i = icmp ult i32 %sub31.i, %rsize.0.i
+ %sub31.rsize.0.i = select i1 %cmp32.i, i32 %sub31.i, i32 %rsize.0.i
+ %cond.v.0.i = select i1 %cmp32.i, %struct.malloc_tree_chunk* %cond6.i, %struct.malloc_tree_chunk* %v.0.i
+ br label %while.cond.i
+
+while.end.i: ; preds = %cond.end.i
+ %38 = bitcast %struct.malloc_tree_chunk* %v.0.i to i8*
+ %39 = load i8** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 4), align 4, !tbaa !0
+ %cmp33.i = icmp ult i8* %38, %39
+ br i1 %cmp33.i, label %if.end227.i, label %if.then34.i, !prof !6
+
+if.then34.i: ; preds = %while.end.i
+ %add.ptr.i = getelementptr inbounds i8* %38, i32 %cond
+ %40 = bitcast i8* %add.ptr.i to %struct.malloc_chunk*
+ %cmp35.i = icmp ult i8* %38, %add.ptr.i
+ br i1 %cmp35.i, label %if.then39.i, label %if.end227.i, !prof !5
+
+if.then39.i: ; preds = %if.then34.i
+ %parent.i = getelementptr inbounds %struct.malloc_tree_chunk* %v.0.i, i32 0, i32 5
+ %41 = load %struct.malloc_tree_chunk** %parent.i, align 4, !tbaa !0
+ %bk.i = getelementptr inbounds %struct.malloc_tree_chunk* %v.0.i, i32 0, i32 3
+ %42 = load %struct.malloc_tree_chunk** %bk.i, align 4, !tbaa !0
+ %cmp40.i = icmp eq %struct.malloc_tree_chunk* %42, %v.0.i
+ br i1 %cmp40.i, label %if.else59.i, label %if.then42.i
+
+if.then42.i: ; preds = %if.then39.i
+ %fd.i = getelementptr inbounds %struct.malloc_tree_chunk* %v.0.i, i32 0, i32 2
+ %43 = load %struct.malloc_tree_chunk** %fd.i, align 4, !tbaa !0
+ %44 = bitcast %struct.malloc_tree_chunk* %43 to i8*
+ %cmp45.i = icmp ult i8* %44, %39
+ br i1 %cmp45.i, label %if.else.i, label %land.lhs.true.i
+
+land.lhs.true.i: ; preds = %if.then42.i
+ %bk47.i = getelementptr inbounds %struct.malloc_tree_chunk* %43, i32 0, i32 3
+ %45 = load %struct.malloc_tree_chunk** %bk47.i, align 4, !tbaa !0
+ %cmp48.i = icmp eq %struct.malloc_tree_chunk* %45, %v.0.i
+ br i1 %cmp48.i, label %land.rhs.i, label %if.else.i
+
+land.rhs.i: ; preds = %land.lhs.true.i
+ %fd50.i = getelementptr inbounds %struct.malloc_tree_chunk* %42, i32 0, i32 2
+ %46 = load %struct.malloc_tree_chunk** %fd50.i, align 4, !tbaa !0
+ %cmp51.i = icmp eq %struct.malloc_tree_chunk* %46, %v.0.i
+ br i1 %cmp51.i, label %if.then55.i, label %if.else.i, !prof !5
+
+if.then55.i: ; preds = %land.rhs.i
+ store %struct.malloc_tree_chunk* %42, %struct.malloc_tree_chunk** %bk47.i, align 4, !tbaa !0
+ store %struct.malloc_tree_chunk* %43, %struct.malloc_tree_chunk** %fd50.i, align 4, !tbaa !0
+ br label %if.end89.i
+
+if.else.i: ; preds = %land.rhs.i, %land.lhs.true.i, %if.then42.i
+ tail call void @abort() #6
+ unreachable
+
+if.else59.i: ; preds = %if.then39.i
+ %arrayidx61.i = getelementptr inbounds %struct.malloc_tree_chunk* %v.0.i, i32 0, i32 4, i32 1
+ %47 = load %struct.malloc_tree_chunk** %arrayidx61.i, align 4, !tbaa !0
+ %cmp62.i = icmp eq %struct.malloc_tree_chunk* %47, null
+ br i1 %cmp62.i, label %lor.lhs.false.i, label %while.cond69.i
+
+lor.lhs.false.i: ; preds = %if.else59.i
+ %arrayidx65.i = getelementptr inbounds %struct.malloc_tree_chunk* %v.0.i, i32 0, i32 4, i32 0
+ %48 = load %struct.malloc_tree_chunk** %arrayidx65.i, align 4, !tbaa !0
+ %cmp66.i = icmp eq %struct.malloc_tree_chunk* %48, null
+ br i1 %cmp66.i, label %if.end89.i, label %while.cond69.i
+
+while.cond69.i: ; preds = %lor.rhs.i, %while.cond69.i, %lor.lhs.false.i, %if.else59.i
+ %RP.0.i = phi %struct.malloc_tree_chunk** [ %arrayidx65.i, %lor.lhs.false.i ], [ %arrayidx61.i, %if.else59.i ], [ %arrayidx71.i, %while.cond69.i ], [ %arrayidx75.i, %lor.rhs.i ]
+ %R.0.i = phi %struct.malloc_tree_chunk* [ %48, %lor.lhs.false.i ], [ %47, %if.else59.i ], [ %49, %while.cond69.i ], [ %50, %lor.rhs.i ]
+ %arrayidx71.i = getelementptr inbounds %struct.malloc_tree_chunk* %R.0.i, i32 0, i32 4, i32 1
+ %49 = load %struct.malloc_tree_chunk** %arrayidx71.i, align 4, !tbaa !0
+ %cmp72.i = icmp eq %struct.malloc_tree_chunk* %49, null
+ br i1 %cmp72.i, label %lor.rhs.i, label %while.cond69.i
+
+lor.rhs.i: ; preds = %while.cond69.i
+ %arrayidx75.i = getelementptr inbounds %struct.malloc_tree_chunk* %R.0.i, i32 0, i32 4, i32 0
+ %50 = load %struct.malloc_tree_chunk** %arrayidx75.i, align 4, !tbaa !0
+ %cmp76.i = icmp eq %struct.malloc_tree_chunk* %50, null
+ br i1 %cmp76.i, label %while.end79.i, label %while.cond69.i
+
+while.end79.i: ; preds = %lor.rhs.i
+ %51 = bitcast %struct.malloc_tree_chunk** %RP.0.i to i8*
+ %cmp81.i = icmp ult i8* %51, %39
+ br i1 %cmp81.i, label %if.else86.i, label %if.then85.i, !prof !6
+
+if.then85.i: ; preds = %while.end79.i
+ store %struct.malloc_tree_chunk* null, %struct.malloc_tree_chunk** %RP.0.i, align 4, !tbaa !0
+ br label %if.end89.i
+
+if.else86.i: ; preds = %while.end79.i
+ tail call void @abort() #6
+ unreachable
+
+if.end89.i: ; preds = %if.then85.i, %lor.lhs.false.i, %if.then55.i
+ %R.1.i = phi %struct.malloc_tree_chunk* [ %42, %if.then55.i ], [ %R.0.i, %if.then85.i ], [ null, %lor.lhs.false.i ]
+ %cmp90.i = icmp eq %struct.malloc_tree_chunk* %41, null
+ br i1 %cmp90.i, label %if.end173.i, label %if.then92.i
+
+if.then92.i: ; preds = %if.end89.i
+ %index.i = getelementptr inbounds %struct.malloc_tree_chunk* %v.0.i, i32 0, i32 6
+ %52 = load i32* %index.i, align 4, !tbaa !3
+ %arrayidx94.i = getelementptr inbounds %struct.malloc_state* @_gm_, i32 0, i32 11, i32 %52
+ %53 = load %struct.malloc_tree_chunk** %arrayidx94.i, align 4, !tbaa !0
+ %cmp95.i = icmp eq %struct.malloc_tree_chunk* %v.0.i, %53
+ br i1 %cmp95.i, label %if.then97.i, label %if.else105.i
+
+if.then97.i: ; preds = %if.then92.i
+ store %struct.malloc_tree_chunk* %R.1.i, %struct.malloc_tree_chunk** %arrayidx94.i, align 4, !tbaa !0
+ %cond4.i = icmp eq %struct.malloc_tree_chunk* %R.1.i, null
+ br i1 %cond4.i, label %if.end125.thread.i, label %if.then128.i
+
+if.end125.thread.i: ; preds = %if.then97.i
+ %shl.i = shl i32 1, %52
+ %neg.i = xor i32 %shl.i, -1
+ %54 = load i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 1), align 4, !tbaa !3
+ %and103.i = and i32 %54, %neg.i
+ store i32 %and103.i, i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 1), align 4, !tbaa !3
+ br label %if.end173.i
+
+if.else105.i: ; preds = %if.then92.i
+ %55 = bitcast %struct.malloc_tree_chunk* %41 to i8*
+ %56 = load i8** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 4), align 4, !tbaa !0
+ %cmp107.i = icmp ult i8* %55, %56
+ br i1 %cmp107.i, label %if.else123.i, label %if.then111.i, !prof !6
+
+if.then111.i: ; preds = %if.else105.i
+ %arrayidx113.i = getelementptr inbounds %struct.malloc_tree_chunk* %41, i32 0, i32 4, i32 0
+ %57 = load %struct.malloc_tree_chunk** %arrayidx113.i, align 4, !tbaa !0
+ %cmp114.i = icmp eq %struct.malloc_tree_chunk* %57, %v.0.i
+ br i1 %cmp114.i, label %if.then116.i, label %if.else119.i
+
+if.then116.i: ; preds = %if.then111.i
+ store %struct.malloc_tree_chunk* %R.1.i, %struct.malloc_tree_chunk** %arrayidx113.i, align 4, !tbaa !0
+ br label %if.end125.i
+
+if.else119.i: ; preds = %if.then111.i
+ %arrayidx121.i = getelementptr inbounds %struct.malloc_tree_chunk* %41, i32 0, i32 4, i32 1
+ store %struct.malloc_tree_chunk* %R.1.i, %struct.malloc_tree_chunk** %arrayidx121.i, align 4, !tbaa !0
+ br label %if.end125.i
+
+if.else123.i: ; preds = %if.else105.i
+ tail call void @abort() #6
+ unreachable
+
+if.end125.i: ; preds = %if.else119.i, %if.then116.i
+ %cmp126.i = icmp eq %struct.malloc_tree_chunk* %R.1.i, null
+ br i1 %cmp126.i, label %if.end173.i, label %if.then128.i
+
+if.then128.i: ; preds = %if.end125.i, %if.then97.i
+ %58 = bitcast %struct.malloc_tree_chunk* %R.1.i to i8*
+ %59 = load i8** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 4), align 4, !tbaa !0
+ %cmp130.i = icmp ult i8* %58, %59
+ br i1 %cmp130.i, label %if.else170.i, label %if.then134.i, !prof !6
+
+if.then134.i: ; preds = %if.then128.i
+ %parent135.i = getelementptr inbounds %struct.malloc_tree_chunk* %R.1.i, i32 0, i32 5
+ store %struct.malloc_tree_chunk* %41, %struct.malloc_tree_chunk** %parent135.i, align 4, !tbaa !0
+ %arrayidx137.i = getelementptr inbounds %struct.malloc_tree_chunk* %v.0.i, i32 0, i32 4, i32 0
+ %60 = load %struct.malloc_tree_chunk** %arrayidx137.i, align 4, !tbaa !0
+ %cmp138.i = icmp eq %struct.malloc_tree_chunk* %60, null
+ br i1 %cmp138.i, label %if.end152.i, label %if.then140.i
+
+if.then140.i: ; preds = %if.then134.i
+ %61 = bitcast %struct.malloc_tree_chunk* %60 to i8*
+ %62 = load i8** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 4), align 4, !tbaa !0
+ %cmp142.i = icmp ult i8* %61, %62
+ br i1 %cmp142.i, label %if.else150.i, label %if.then146.i, !prof !6
+
+if.then146.i: ; preds = %if.then140.i
+ %arrayidx148.i = getelementptr inbounds %struct.malloc_tree_chunk* %R.1.i, i32 0, i32 4, i32 0
+ store %struct.malloc_tree_chunk* %60, %struct.malloc_tree_chunk** %arrayidx148.i, align 4, !tbaa !0
+ %parent149.i = getelementptr inbounds %struct.malloc_tree_chunk* %60, i32 0, i32 5
+ store %struct.malloc_tree_chunk* %R.1.i, %struct.malloc_tree_chunk** %parent149.i, align 4, !tbaa !0
+ br label %if.end152.i
+
+if.else150.i: ; preds = %if.then140.i
+ tail call void @abort() #6
+ unreachable
+
+if.end152.i: ; preds = %if.then146.i, %if.then134.i
+ %arrayidx154.i = getelementptr inbounds %struct.malloc_tree_chunk* %v.0.i, i32 0, i32 4, i32 1
+ %63 = load %struct.malloc_tree_chunk** %arrayidx154.i, align 4, !tbaa !0
+ %cmp155.i = icmp eq %struct.malloc_tree_chunk* %63, null
+ br i1 %cmp155.i, label %if.end173.i, label %if.then157.i
+
+if.then157.i: ; preds = %if.end152.i
+ %64 = bitcast %struct.malloc_tree_chunk* %63 to i8*
+ %65 = load i8** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 4), align 4, !tbaa !0
+ %cmp159.i = icmp ult i8* %64, %65
+ br i1 %cmp159.i, label %if.else167.i, label %if.then163.i, !prof !6
+
+if.then163.i: ; preds = %if.then157.i
+ %arrayidx165.i = getelementptr inbounds %struct.malloc_tree_chunk* %R.1.i, i32 0, i32 4, i32 1
+ store %struct.malloc_tree_chunk* %63, %struct.malloc_tree_chunk** %arrayidx165.i, align 4, !tbaa !0
+ %parent166.i = getelementptr inbounds %struct.malloc_tree_chunk* %63, i32 0, i32 5
+ store %struct.malloc_tree_chunk* %R.1.i, %struct.malloc_tree_chunk** %parent166.i, align 4, !tbaa !0
+ br label %if.end173.i
+
+if.else167.i: ; preds = %if.then157.i
+ tail call void @abort() #6
+ unreachable
+
+if.else170.i: ; preds = %if.then128.i
+ tail call void @abort() #6
+ unreachable
+
+if.end173.i: ; preds = %if.then163.i, %if.end152.i, %if.end125.i, %if.end125.thread.i, %if.end89.i
+ %cmp174.i = icmp ult i32 %rsize.0.i, 16
+ br i1 %cmp174.i, label %if.then176.i, label %if.else184.i
+
+if.then176.i: ; preds = %if.end173.i
+ %add177.i = add i32 %rsize.0.i, %cond
+ %or178.i = or i32 %add177.i, 3
+ %head179.i = getelementptr inbounds %struct.malloc_tree_chunk* %v.0.i, i32 0, i32 1
+ store i32 %or178.i, i32* %head179.i, align 4, !tbaa !3
+ %add.ptr181.sum.i = add i32 %add177.i, 4
+ %head182.i = getelementptr inbounds i8* %38, i32 %add.ptr181.sum.i
+ %66 = bitcast i8* %head182.i to i32*
+ %67 = load i32* %66, align 4, !tbaa !3
+ %or183.i = or i32 %67, 1
+ store i32 %or183.i, i32* %66, align 4, !tbaa !3
+ br label %tmalloc_small.exit
+
+if.else184.i: ; preds = %if.end173.i
+ %or186.i = or i32 %cond, 3
+ %head187.i = getelementptr inbounds %struct.malloc_tree_chunk* %v.0.i, i32 0, i32 1
+ store i32 %or186.i, i32* %head187.i, align 4, !tbaa !3
+ %or188.i = or i32 %rsize.0.i, 1
+ %add.ptr.sum.i173 = or i32 %cond, 4
+ %head189.i = getelementptr inbounds i8* %38, i32 %add.ptr.sum.i173
+ %68 = bitcast i8* %head189.i to i32*
+ store i32 %or188.i, i32* %68, align 4, !tbaa !3
+ %add.ptr.sum1.i = add i32 %rsize.0.i, %cond
+ %add.ptr190.i = getelementptr inbounds i8* %38, i32 %add.ptr.sum1.i
+ %prev_foot.i = bitcast i8* %add.ptr190.i to i32*
+ store i32 %rsize.0.i, i32* %prev_foot.i, align 4, !tbaa !3
+ %69 = load i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 2), align 4, !tbaa !3
+ %cmp191.i = icmp eq i32 %69, 0
+ br i1 %cmp191.i, label %if.end221.i, label %if.then193.i
+
+if.then193.i: ; preds = %if.else184.i
+ %70 = load %struct.malloc_chunk** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 5), align 4, !tbaa !0
+ %shr194.i = lshr i32 %69, 3
+ %shl195.i = shl nuw nsw i32 %shr194.i, 1
+ %arrayidx196.i = getelementptr inbounds %struct.malloc_state* @_gm_, i32 0, i32 10, i32 %shl195.i
+ %71 = bitcast %struct.malloc_chunk** %arrayidx196.i to %struct.malloc_chunk*
+ %72 = load i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 0), align 4, !tbaa !3
+ %shl198.i = shl i32 1, %shr194.i
+ %and199.i = and i32 %72, %shl198.i
+ %tobool200.i = icmp eq i32 %and199.i, 0
+ br i1 %tobool200.i, label %if.then201.i, label %if.else205.i
+
+if.then201.i: ; preds = %if.then193.i
+ %or204.i = or i32 %72, %shl198.i
+ store i32 %or204.i, i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 0), align 4, !tbaa !3
+ %arrayidx196.sum.pre.i = add i32 %shl195.i, 2
+ %.pre.i = getelementptr inbounds %struct.malloc_state* @_gm_, i32 0, i32 10, i32 %arrayidx196.sum.pre.i
+ br label %if.end216.i
+
+if.else205.i: ; preds = %if.then193.i
+ %arrayidx196.sum2.i = add i32 %shl195.i, 2
+ %73 = getelementptr inbounds %struct.malloc_state* @_gm_, i32 0, i32 10, i32 %arrayidx196.sum2.i
+ %74 = load %struct.malloc_chunk** %73, align 4, !tbaa !0
+ %75 = bitcast %struct.malloc_chunk* %74 to i8*
+ %76 = load i8** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 4), align 4, !tbaa !0
+ %cmp208.i = icmp ult i8* %75, %76
+ br i1 %cmp208.i, label %if.else214.i, label %if.end216.i, !prof !6
+
+if.else214.i: ; preds = %if.else205.i
+ tail call void @abort() #6
+ unreachable
+
+if.end216.i: ; preds = %if.else205.i, %if.then201.i
+ %.pre-phi.i = phi %struct.malloc_chunk** [ %73, %if.else205.i ], [ %.pre.i, %if.then201.i ]
+ %F197.0.i = phi %struct.malloc_chunk* [ %74, %if.else205.i ], [ %71, %if.then201.i ]
+ store %struct.malloc_chunk* %70, %struct.malloc_chunk** %.pre-phi.i, align 4, !tbaa !0
+ %bk218.i = getelementptr inbounds %struct.malloc_chunk* %F197.0.i, i32 0, i32 3
+ store %struct.malloc_chunk* %70, %struct.malloc_chunk** %bk218.i, align 4, !tbaa !0
+ %fd219.i = getelementptr inbounds %struct.malloc_chunk* %70, i32 0, i32 2
+ store %struct.malloc_chunk* %F197.0.i, %struct.malloc_chunk** %fd219.i, align 4, !tbaa !0
+ %bk220.i = getelementptr inbounds %struct.malloc_chunk* %70, i32 0, i32 3
+ store %struct.malloc_chunk* %71, %struct.malloc_chunk** %bk220.i, align 4, !tbaa !0
+ br label %if.end221.i
+
+if.end221.i: ; preds = %if.end216.i, %if.else184.i
+ store i32 %rsize.0.i, i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 2), align 4, !tbaa !3
+ store %struct.malloc_chunk* %40, %struct.malloc_chunk** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 5), align 4, !tbaa !0
+ br label %tmalloc_small.exit
+
+if.end227.i: ; preds = %if.then34.i, %while.end.i
+ tail call void @abort() #6
+ unreachable
+
+tmalloc_small.exit: ; preds = %if.end221.i, %if.then176.i
+ %add.ptr225.i = getelementptr inbounds %struct.malloc_tree_chunk* %v.0.i, i32 0, i32 2
+ %77 = bitcast %struct.malloc_tree_chunk** %add.ptr225.i to i8*
+ br label %postaction
+
+if.else137: ; preds = %entry
+ %cmp138 = icmp ugt i32 %bytes, -65
+ br i1 %cmp138, label %if.end154, label %if.else141
+
+if.else141: ; preds = %if.else137
+ %add143 = add i32 %bytes, 11
+ %and144 = and i32 %add143, -8
+ %78 = load i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 1), align 4, !tbaa !3
+ %cmp145 = icmp eq i32 %78, 0
+ br i1 %cmp145, label %if.end154, label %land.lhs.true147
+
+land.lhs.true147: ; preds = %if.else141
+ %sub.i105 = sub i32 0, %and144
+ %shr.i106 = lshr i32 %add143, 8
+ %cmp.i107 = icmp eq i32 %shr.i106, 0
+ br i1 %cmp.i107, label %if.end23.i, label %if.else.i108
+
+if.else.i108: ; preds = %land.lhs.true147
+ %cmp1.i = icmp ugt i32 %and144, 16777215
+ br i1 %cmp1.i, label %if.end23.i, label %if.else3.i
+
+if.else3.i: ; preds = %if.else.i108
+ %sub4.i = add i32 %shr.i106, 1048320
+ %shr5.i109 = lshr i32 %sub4.i, 16
+ %and.i110 = and i32 %shr5.i109, 8
+ %shl.i111 = shl i32 %shr.i106, %and.i110
+ %sub6.i = add i32 %shl.i111, 520192
+ %shr7.i112 = lshr i32 %sub6.i, 16
+ %and8.i = and i32 %shr7.i112, 4
+ %add.i113 = or i32 %and8.i, %and.i110
+ %shl9.i = shl i32 %shl.i111, %and8.i
+ %sub10.i = add i32 %shl9.i, 245760
+ %shr11.i114 = lshr i32 %sub10.i, 16
+ %and12.i = and i32 %shr11.i114, 2
+ %add13.i = or i32 %add.i113, %and12.i
+ %sub14.i = sub i32 14, %add13.i
+ %shl15.i = shl i32 %shl9.i, %and12.i
+ %shr16.i115 = lshr i32 %shl15.i, 15
+ %add17.i = add i32 %sub14.i, %shr16.i115
+ %shl18.i = shl nsw i32 %add17.i, 1
+ %add19.i = add i32 %add17.i, 7
+ %shr20.i = lshr i32 %and144, %add19.i
+ %and21.i116 = and i32 %shr20.i, 1
+ %add22.i = or i32 %and21.i116, %shl18.i
+ br label %if.end23.i
+
+if.end23.i: ; preds = %if.else3.i, %if.else.i108, %land.lhs.true147
+ %idx.0.i = phi i32 [ %add22.i, %if.else3.i ], [ 0, %land.lhs.true147 ], [ 31, %if.else.i108 ]
+ %arrayidx.i117 = getelementptr inbounds %struct.malloc_state* @_gm_, i32 0, i32 11, i32 %idx.0.i
+ %79 = load %struct.malloc_tree_chunk** %arrayidx.i117, align 4, !tbaa !0
+ %cmp24.i = icmp eq %struct.malloc_tree_chunk* %79, null
+ br i1 %cmp24.i, label %if.end53.i, label %if.then25.i
+
+if.then25.i: ; preds = %if.end23.i
+ %cmp26.i = icmp eq i32 %idx.0.i, 31
+ br i1 %cmp26.i, label %cond.end.i118, label %cond.false.i
+
+cond.false.i: ; preds = %if.then25.i
+ %shr27.i = lshr i32 %idx.0.i, 1
+ %sub30.i = sub i32 25, %shr27.i
+ br label %cond.end.i118
+
+cond.end.i118: ; preds = %cond.false.i, %if.then25.i
+ %cond.i = phi i32 [ %sub30.i, %cond.false.i ], [ 0, %if.then25.i ]
+ %shl31.i = shl i32 %and144, %cond.i
+ br label %for.cond.i
+
+for.cond.i: ; preds = %if.end39.i, %cond.end.i118
+ %rst.0.i = phi %struct.malloc_tree_chunk* [ null, %cond.end.i118 ], [ %rst.1.i, %if.end39.i ]
+ %sizebits.0.i = phi i32 [ %shl31.i, %cond.end.i118 ], [ %shl52.i, %if.end39.i ]
+ %t.0.i119 = phi %struct.malloc_tree_chunk* [ %79, %cond.end.i118 ], [ %82, %if.end39.i ]
+ %rsize.0.i120 = phi i32 [ %sub.i105, %cond.end.i118 ], [ %rsize.1.i, %if.end39.i ]
+ %v.0.i121 = phi %struct.malloc_tree_chunk* [ null, %cond.end.i118 ], [ %v.1.i, %if.end39.i ]
+ %head.i122 = getelementptr inbounds %struct.malloc_tree_chunk* %t.0.i119, i32 0, i32 1
+ %80 = load i32* %head.i122, align 4, !tbaa !3
+ %and32.i = and i32 %80, -8
+ %sub33.i = sub i32 %and32.i, %and144
+ %cmp34.i = icmp ult i32 %sub33.i, %rsize.0.i120
+ br i1 %cmp34.i, label %if.then35.i, label %if.end39.i
+
+if.then35.i: ; preds = %for.cond.i
+ %cmp36.i = icmp eq i32 %and32.i, %and144
+ br i1 %cmp36.i, label %if.end53.i, label %if.end39.i
+
+if.end39.i: ; preds = %if.then35.i, %for.cond.i
+ %rsize.1.i = phi i32 [ %sub33.i, %if.then35.i ], [ %rsize.0.i120, %for.cond.i ]
+ %v.1.i = phi %struct.malloc_tree_chunk* [ %t.0.i119, %if.then35.i ], [ %v.0.i121, %for.cond.i ]
+ %arrayidx40.i = getelementptr inbounds %struct.malloc_tree_chunk* %t.0.i119, i32 0, i32 4, i32 1
+ %81 = load %struct.malloc_tree_chunk** %arrayidx40.i, align 4, !tbaa !0
+ %shr41.i = lshr i32 %sizebits.0.i, 31
+ %arrayidx44.i = getelementptr inbounds %struct.malloc_tree_chunk* %t.0.i119, i32 0, i32 4, i32 %shr41.i
+ %82 = load %struct.malloc_tree_chunk** %arrayidx44.i, align 4, !tbaa !0
+ %cmp45.i123 = icmp eq %struct.malloc_tree_chunk* %81, null
+ %cmp46.i = icmp eq %struct.malloc_tree_chunk* %81, %82
+ %or.cond.i = or i1 %cmp45.i123, %cmp46.i
+ %rst.1.i = select i1 %or.cond.i, %struct.malloc_tree_chunk* %rst.0.i, %struct.malloc_tree_chunk* %81
+ %cmp49.i = icmp eq %struct.malloc_tree_chunk* %82, null
+ %shl52.i = shl i32 %sizebits.0.i, 1
+ br i1 %cmp49.i, label %if.end53.i, label %for.cond.i
+
+if.end53.i: ; preds = %if.end39.i, %if.then35.i, %if.end23.i
+ %t.1.i = phi %struct.malloc_tree_chunk* [ null, %if.end23.i ], [ %rst.1.i, %if.end39.i ], [ %t.0.i119, %if.then35.i ]
+ %rsize.2.i = phi i32 [ %sub.i105, %if.end23.i ], [ %rsize.1.i, %if.end39.i ], [ %sub33.i, %if.then35.i ]
+ %v.2.i = phi %struct.malloc_tree_chunk* [ null, %if.end23.i ], [ %v.1.i, %if.end39.i ], [ %t.0.i119, %if.then35.i ]
+ %cmp54.i = icmp eq %struct.malloc_tree_chunk* %t.1.i, null
+ %cmp56.i = icmp eq %struct.malloc_tree_chunk* %v.2.i, null
+ %or.cond16.i = and i1 %cmp54.i, %cmp56.i
+ br i1 %or.cond16.i, label %if.then57.i, label %while.cond.preheader.i
+
+if.then57.i: ; preds = %if.end53.i
+ %shl59.i = shl i32 2, %idx.0.i
+ %sub62.i = sub i32 0, %shl59.i
+ %or.i = or i32 %shl59.i, %sub62.i
+ %and63.i = and i32 %78, %or.i
+ %cmp64.i = icmp eq i32 %and63.i, 0
+ br i1 %cmp64.i, label %if.end154, label %if.then65.i
+
+if.then65.i: ; preds = %if.then57.i
+ %sub66.i = sub i32 0, %and63.i
+ %and67.i = and i32 %and63.i, %sub66.i
+ %sub69.i = add i32 %and67.i, -1
+ %shr71.i = lshr i32 %sub69.i, 12
+ %and72.i = and i32 %shr71.i, 16
+ %shr74.i = lshr i32 %sub69.i, %and72.i
+ %shr75.i = lshr i32 %shr74.i, 5
+ %and76.i = and i32 %shr75.i, 8
+ %add77.i = or i32 %and76.i, %and72.i
+ %shr78.i = lshr i32 %shr74.i, %and76.i
+ %shr79.i = lshr i32 %shr78.i, 2
+ %and80.i = and i32 %shr79.i, 4
+ %add81.i = or i32 %add77.i, %and80.i
+ %shr82.i = lshr i32 %shr78.i, %and80.i
+ %shr83.i = lshr i32 %shr82.i, 1
+ %and84.i = and i32 %shr83.i, 2
+ %add85.i = or i32 %add81.i, %and84.i
+ %shr86.i = lshr i32 %shr82.i, %and84.i
+ %shr87.i = lshr i32 %shr86.i, 1
+ %and88.i = and i32 %shr87.i, 1
+ %add89.i = or i32 %add85.i, %and88.i
+ %shr90.i = lshr i32 %shr86.i, %and88.i
+ %add91.i = add i32 %add89.i, %shr90.i
+ %arrayidx93.i = getelementptr inbounds %struct.malloc_state* @_gm_, i32 0, i32 11, i32 %add91.i
+ %83 = load %struct.malloc_tree_chunk** %arrayidx93.i, align 4, !tbaa !0
+ br label %while.cond.preheader.i
+
+while.cond.preheader.i: ; preds = %if.then65.i, %if.end53.i
+ %t.2.ph.i = phi %struct.malloc_tree_chunk* [ %t.1.i, %if.end53.i ], [ %83, %if.then65.i ]
+ %cmp9626.i = icmp eq %struct.malloc_tree_chunk* %t.2.ph.i, null
+ br i1 %cmp9626.i, label %while.end.i125, label %while.body.i124
+
+while.body.i124: ; preds = %while.cond.backedge.i, %while.body.i124, %while.cond.preheader.i
+ %v.329.i = phi %struct.malloc_tree_chunk* [ %v.2.i, %while.cond.preheader.i ], [ %t.2.v.3.i, %while.body.i124 ], [ %t.2.v.3.i, %while.cond.backedge.i ]
+ %rsize.328.i = phi i32 [ %rsize.2.i, %while.cond.preheader.i ], [ %sub100.rsize.3.i, %while.body.i124 ], [ %sub100.rsize.3.i, %while.cond.backedge.i ]
+ %t.227.i = phi %struct.malloc_tree_chunk* [ %t.2.ph.i, %while.cond.preheader.i ], [ %85, %while.body.i124 ], [ %86, %while.cond.backedge.i ]
+ %head98.i = getelementptr inbounds %struct.malloc_tree_chunk* %t.227.i, i32 0, i32 1
+ %84 = load i32* %head98.i, align 4, !tbaa !3
+ %and99.i = and i32 %84, -8
+ %sub100.i = sub i32 %and99.i, %and144
+ %cmp101.i = icmp ult i32 %sub100.i, %rsize.328.i
+ %sub100.rsize.3.i = select i1 %cmp101.i, i32 %sub100.i, i32 %rsize.328.i
+ %t.2.v.3.i = select i1 %cmp101.i, %struct.malloc_tree_chunk* %t.227.i, %struct.malloc_tree_chunk* %v.329.i
+ %arrayidx105.i = getelementptr inbounds %struct.malloc_tree_chunk* %t.227.i, i32 0, i32 4, i32 0
+ %85 = load %struct.malloc_tree_chunk** %arrayidx105.i, align 4, !tbaa !0
+ %cmp106.i = icmp eq %struct.malloc_tree_chunk* %85, null
+ br i1 %cmp106.i, label %while.cond.backedge.i, label %while.body.i124
+
+while.cond.backedge.i: ; preds = %while.body.i124
+ %arrayidx112.i = getelementptr inbounds %struct.malloc_tree_chunk* %t.227.i, i32 0, i32 4, i32 1
+ %86 = load %struct.malloc_tree_chunk** %arrayidx112.i, align 4, !tbaa !0
+ %cmp96.i = icmp eq %struct.malloc_tree_chunk* %86, null
+ br i1 %cmp96.i, label %while.end.i125, label %while.body.i124
+
+while.end.i125: ; preds = %while.cond.backedge.i, %while.cond.preheader.i
+ %v.3.lcssa.i = phi %struct.malloc_tree_chunk* [ %v.2.i, %while.cond.preheader.i ], [ %t.2.v.3.i, %while.cond.backedge.i ]
+ %rsize.3.lcssa.i = phi i32 [ %rsize.2.i, %while.cond.preheader.i ], [ %sub100.rsize.3.i, %while.cond.backedge.i ]
+ %cmp115.i = icmp eq %struct.malloc_tree_chunk* %v.3.lcssa.i, null
+ br i1 %cmp115.i, label %if.end154, label %land.lhs.true116.i
+
+land.lhs.true116.i: ; preds = %while.end.i125
+ %87 = load i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 2), align 4, !tbaa !3
+ %sub117.i = sub i32 %87, %and144
+ %cmp118.i = icmp ult i32 %rsize.3.lcssa.i, %sub117.i
+ br i1 %cmp118.i, label %if.then119.i, label %if.end154
+
+if.then119.i: ; preds = %land.lhs.true116.i
+ %88 = bitcast %struct.malloc_tree_chunk* %v.3.lcssa.i to i8*
+ %89 = load i8** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 4), align 4, !tbaa !0
+ %cmp120.i = icmp ult i8* %88, %89
+ br i1 %cmp120.i, label %if.end438.i, label %if.then121.i, !prof !6
+
+if.then121.i: ; preds = %if.then119.i
+ %add.ptr.i126 = getelementptr inbounds i8* %88, i32 %and144
+ %90 = bitcast i8* %add.ptr.i126 to %struct.malloc_chunk*
+ %cmp122.i = icmp ult i8* %88, %add.ptr.i126
+ br i1 %cmp122.i, label %if.then126.i, label %if.end438.i, !prof !5
+
+if.then126.i: ; preds = %if.then121.i
+ %parent.i127 = getelementptr inbounds %struct.malloc_tree_chunk* %v.3.lcssa.i, i32 0, i32 5
+ %91 = load %struct.malloc_tree_chunk** %parent.i127, align 4, !tbaa !0
+ %bk.i128 = getelementptr inbounds %struct.malloc_tree_chunk* %v.3.lcssa.i, i32 0, i32 3
+ %92 = load %struct.malloc_tree_chunk** %bk.i128, align 4, !tbaa !0
+ %cmp127.i = icmp eq %struct.malloc_tree_chunk* %92, %v.3.lcssa.i
+ br i1 %cmp127.i, label %if.else148.i, label %if.then129.i
+
+if.then129.i: ; preds = %if.then126.i
+ %fd.i129 = getelementptr inbounds %struct.malloc_tree_chunk* %v.3.lcssa.i, i32 0, i32 2
+ %93 = load %struct.malloc_tree_chunk** %fd.i129, align 4, !tbaa !0
+ %94 = bitcast %struct.malloc_tree_chunk* %93 to i8*
+ %cmp132.i = icmp ult i8* %94, %89
+ br i1 %cmp132.i, label %if.else146.i, label %land.lhs.true134.i
+
+land.lhs.true134.i: ; preds = %if.then129.i
+ %bk135.i = getelementptr inbounds %struct.malloc_tree_chunk* %93, i32 0, i32 3
+ %95 = load %struct.malloc_tree_chunk** %bk135.i, align 4, !tbaa !0
+ %cmp136.i = icmp eq %struct.malloc_tree_chunk* %95, %v.3.lcssa.i
+ br i1 %cmp136.i, label %land.rhs.i130, label %if.else146.i
+
+land.rhs.i130: ; preds = %land.lhs.true134.i
+ %fd138.i = getelementptr inbounds %struct.malloc_tree_chunk* %92, i32 0, i32 2
+ %96 = load %struct.malloc_tree_chunk** %fd138.i, align 4, !tbaa !0
+ %cmp139.i = icmp eq %struct.malloc_tree_chunk* %96, %v.3.lcssa.i
+ br i1 %cmp139.i, label %if.then143.i, label %if.else146.i, !prof !5
+
+if.then143.i: ; preds = %land.rhs.i130
+ store %struct.malloc_tree_chunk* %92, %struct.malloc_tree_chunk** %bk135.i, align 4, !tbaa !0
+ store %struct.malloc_tree_chunk* %93, %struct.malloc_tree_chunk** %fd138.i, align 4, !tbaa !0
+ br label %if.end178.i
+
+if.else146.i: ; preds = %land.rhs.i130, %land.lhs.true134.i, %if.then129.i
+ tail call void @abort() #6
+ unreachable
+
+if.else148.i: ; preds = %if.then126.i
+ %arrayidx150.i = getelementptr inbounds %struct.malloc_tree_chunk* %v.3.lcssa.i, i32 0, i32 4, i32 1
+ %97 = load %struct.malloc_tree_chunk** %arrayidx150.i, align 4, !tbaa !0
+ %cmp151.i = icmp eq %struct.malloc_tree_chunk* %97, null
+ br i1 %cmp151.i, label %lor.lhs.false.i133, label %while.cond158.i
+
+lor.lhs.false.i133: ; preds = %if.else148.i
+ %arrayidx154.i131 = getelementptr inbounds %struct.malloc_tree_chunk* %v.3.lcssa.i, i32 0, i32 4, i32 0
+ %98 = load %struct.malloc_tree_chunk** %arrayidx154.i131, align 4, !tbaa !0
+ %cmp155.i132 = icmp eq %struct.malloc_tree_chunk* %98, null
+ br i1 %cmp155.i132, label %if.end178.i, label %while.cond158.i
+
+while.cond158.i: ; preds = %lor.rhs.i136, %while.cond158.i, %lor.lhs.false.i133, %if.else148.i
+ %RP.0.i134 = phi %struct.malloc_tree_chunk** [ %arrayidx154.i131, %lor.lhs.false.i133 ], [ %arrayidx150.i, %if.else148.i ], [ %arrayidx160.i, %while.cond158.i ], [ %arrayidx164.i, %lor.rhs.i136 ]
+ %R.0.i135 = phi %struct.malloc_tree_chunk* [ %98, %lor.lhs.false.i133 ], [ %97, %if.else148.i ], [ %99, %while.cond158.i ], [ %100, %lor.rhs.i136 ]
+ %arrayidx160.i = getelementptr inbounds %struct.malloc_tree_chunk* %R.0.i135, i32 0, i32 4, i32 1
+ %99 = load %struct.malloc_tree_chunk** %arrayidx160.i, align 4, !tbaa !0
+ %cmp161.i = icmp eq %struct.malloc_tree_chunk* %99, null
+ br i1 %cmp161.i, label %lor.rhs.i136, label %while.cond158.i
+
+lor.rhs.i136: ; preds = %while.cond158.i
+ %arrayidx164.i = getelementptr inbounds %struct.malloc_tree_chunk* %R.0.i135, i32 0, i32 4, i32 0
+ %100 = load %struct.malloc_tree_chunk** %arrayidx164.i, align 4, !tbaa !0
+ %cmp165.i = icmp eq %struct.malloc_tree_chunk* %100, null
+ br i1 %cmp165.i, label %while.end168.i, label %while.cond158.i
+
+while.end168.i: ; preds = %lor.rhs.i136
+ %101 = bitcast %struct.malloc_tree_chunk** %RP.0.i134 to i8*
+ %cmp170.i = icmp ult i8* %101, %89
+ br i1 %cmp170.i, label %if.else175.i, label %if.then174.i, !prof !6
+
+if.then174.i: ; preds = %while.end168.i
+ store %struct.malloc_tree_chunk* null, %struct.malloc_tree_chunk** %RP.0.i134, align 4, !tbaa !0
+ br label %if.end178.i
+
+if.else175.i: ; preds = %while.end168.i
+ tail call void @abort() #6
+ unreachable
+
+if.end178.i: ; preds = %if.then174.i, %lor.lhs.false.i133, %if.then143.i
+ %R.1.i137 = phi %struct.malloc_tree_chunk* [ %92, %if.then143.i ], [ %R.0.i135, %if.then174.i ], [ null, %lor.lhs.false.i133 ]
+ %cmp179.i = icmp eq %struct.malloc_tree_chunk* %91, null
+ br i1 %cmp179.i, label %if.end263.i, label %if.then181.i
+
+if.then181.i: ; preds = %if.end178.i
+ %index.i138 = getelementptr inbounds %struct.malloc_tree_chunk* %v.3.lcssa.i, i32 0, i32 6
+ %102 = load i32* %index.i138, align 4, !tbaa !3
+ %arrayidx183.i = getelementptr inbounds %struct.malloc_state* @_gm_, i32 0, i32 11, i32 %102
+ %103 = load %struct.malloc_tree_chunk** %arrayidx183.i, align 4, !tbaa !0
+ %cmp184.i = icmp eq %struct.malloc_tree_chunk* %v.3.lcssa.i, %103
+ br i1 %cmp184.i, label %if.then186.i, label %if.else195.i
+
+if.then186.i: ; preds = %if.then181.i
+ store %struct.malloc_tree_chunk* %R.1.i137, %struct.malloc_tree_chunk** %arrayidx183.i, align 4, !tbaa !0
+ %cond18.i = icmp eq %struct.malloc_tree_chunk* %R.1.i137, null
+ br i1 %cond18.i, label %if.end215.thread.i, label %if.then218.i
+
+if.end215.thread.i: ; preds = %if.then186.i
+ %shl191.i = shl i32 1, %102
+ %neg.i139 = xor i32 %shl191.i, -1
+ %104 = load i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 1), align 4, !tbaa !3
+ %and193.i = and i32 %104, %neg.i139
+ store i32 %and193.i, i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 1), align 4, !tbaa !3
+ br label %if.end263.i
+
+if.else195.i: ; preds = %if.then181.i
+ %105 = bitcast %struct.malloc_tree_chunk* %91 to i8*
+ %106 = load i8** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 4), align 4, !tbaa !0
+ %cmp197.i = icmp ult i8* %105, %106
+ br i1 %cmp197.i, label %if.else213.i, label %if.then201.i140, !prof !6
+
+if.then201.i140: ; preds = %if.else195.i
+ %arrayidx203.i = getelementptr inbounds %struct.malloc_tree_chunk* %91, i32 0, i32 4, i32 0
+ %107 = load %struct.malloc_tree_chunk** %arrayidx203.i, align 4, !tbaa !0
+ %cmp204.i = icmp eq %struct.malloc_tree_chunk* %107, %v.3.lcssa.i
+ br i1 %cmp204.i, label %if.then206.i, label %if.else209.i
+
+if.then206.i: ; preds = %if.then201.i140
+ store %struct.malloc_tree_chunk* %R.1.i137, %struct.malloc_tree_chunk** %arrayidx203.i, align 4, !tbaa !0
+ br label %if.end215.i
+
+if.else209.i: ; preds = %if.then201.i140
+ %arrayidx211.i = getelementptr inbounds %struct.malloc_tree_chunk* %91, i32 0, i32 4, i32 1
+ store %struct.malloc_tree_chunk* %R.1.i137, %struct.malloc_tree_chunk** %arrayidx211.i, align 4, !tbaa !0
+ br label %if.end215.i
+
+if.else213.i: ; preds = %if.else195.i
+ tail call void @abort() #6
+ unreachable
+
+if.end215.i: ; preds = %if.else209.i, %if.then206.i
+ %cmp216.i = icmp eq %struct.malloc_tree_chunk* %R.1.i137, null
+ br i1 %cmp216.i, label %if.end263.i, label %if.then218.i
+
+if.then218.i: ; preds = %if.end215.i, %if.then186.i
+ %108 = bitcast %struct.malloc_tree_chunk* %R.1.i137 to i8*
+ %109 = load i8** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 4), align 4, !tbaa !0
+ %cmp220.i = icmp ult i8* %108, %109
+ br i1 %cmp220.i, label %if.else260.i, label %if.then224.i, !prof !6
+
+if.then224.i: ; preds = %if.then218.i
+ %parent225.i = getelementptr inbounds %struct.malloc_tree_chunk* %R.1.i137, i32 0, i32 5
+ store %struct.malloc_tree_chunk* %91, %struct.malloc_tree_chunk** %parent225.i, align 4, !tbaa !0
+ %arrayidx227.i = getelementptr inbounds %struct.malloc_tree_chunk* %v.3.lcssa.i, i32 0, i32 4, i32 0
+ %110 = load %struct.malloc_tree_chunk** %arrayidx227.i, align 4, !tbaa !0
+ %cmp228.i = icmp eq %struct.malloc_tree_chunk* %110, null
+ br i1 %cmp228.i, label %if.end242.i, label %if.then230.i
+
+if.then230.i: ; preds = %if.then224.i
+ %111 = bitcast %struct.malloc_tree_chunk* %110 to i8*
+ %112 = load i8** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 4), align 4, !tbaa !0
+ %cmp232.i = icmp ult i8* %111, %112
+ br i1 %cmp232.i, label %if.else240.i, label %if.then236.i, !prof !6
+
+if.then236.i: ; preds = %if.then230.i
+ %arrayidx238.i = getelementptr inbounds %struct.malloc_tree_chunk* %R.1.i137, i32 0, i32 4, i32 0
+ store %struct.malloc_tree_chunk* %110, %struct.malloc_tree_chunk** %arrayidx238.i, align 4, !tbaa !0
+ %parent239.i = getelementptr inbounds %struct.malloc_tree_chunk* %110, i32 0, i32 5
+ store %struct.malloc_tree_chunk* %R.1.i137, %struct.malloc_tree_chunk** %parent239.i, align 4, !tbaa !0
+ br label %if.end242.i
+
+if.else240.i: ; preds = %if.then230.i
+ tail call void @abort() #6
+ unreachable
+
+if.end242.i: ; preds = %if.then236.i, %if.then224.i
+ %arrayidx244.i = getelementptr inbounds %struct.malloc_tree_chunk* %v.3.lcssa.i, i32 0, i32 4, i32 1
+ %113 = load %struct.malloc_tree_chunk** %arrayidx244.i, align 4, !tbaa !0
+ %cmp245.i = icmp eq %struct.malloc_tree_chunk* %113, null
+ br i1 %cmp245.i, label %if.end263.i, label %if.then247.i
+
+if.then247.i: ; preds = %if.end242.i
+ %114 = bitcast %struct.malloc_tree_chunk* %113 to i8*
+ %115 = load i8** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 4), align 4, !tbaa !0
+ %cmp249.i = icmp ult i8* %114, %115
+ br i1 %cmp249.i, label %if.else257.i, label %if.then253.i, !prof !6
+
+if.then253.i: ; preds = %if.then247.i
+ %arrayidx255.i = getelementptr inbounds %struct.malloc_tree_chunk* %R.1.i137, i32 0, i32 4, i32 1
+ store %struct.malloc_tree_chunk* %113, %struct.malloc_tree_chunk** %arrayidx255.i, align 4, !tbaa !0
+ %parent256.i = getelementptr inbounds %struct.malloc_tree_chunk* %113, i32 0, i32 5
+ store %struct.malloc_tree_chunk* %R.1.i137, %struct.malloc_tree_chunk** %parent256.i, align 4, !tbaa !0
+ br label %if.end263.i
+
+if.else257.i: ; preds = %if.then247.i
+ tail call void @abort() #6
+ unreachable
+
+if.else260.i: ; preds = %if.then218.i
+ tail call void @abort() #6
+ unreachable
+
+if.end263.i: ; preds = %if.then253.i, %if.end242.i, %if.end215.i, %if.end215.thread.i, %if.end178.i
+ %cmp264.i = icmp ult i32 %rsize.3.lcssa.i, 16
+ br i1 %cmp264.i, label %if.then266.i, label %if.else275.i
+
+if.then266.i: ; preds = %if.end263.i
+ %add267.i = add i32 %rsize.3.lcssa.i, %and144
+ %or269.i = or i32 %add267.i, 3
+ %head270.i = getelementptr inbounds %struct.malloc_tree_chunk* %v.3.lcssa.i, i32 0, i32 1
+ store i32 %or269.i, i32* %head270.i, align 4, !tbaa !3
+ %add.ptr272.sum.i = add i32 %add267.i, 4
+ %head273.i = getelementptr inbounds i8* %88, i32 %add.ptr272.sum.i
+ %116 = bitcast i8* %head273.i to i32*
+ %117 = load i32* %116, align 4, !tbaa !3
+ %or274.i = or i32 %117, 1
+ store i32 %or274.i, i32* %116, align 4, !tbaa !3
+ br label %tmalloc_large.exit
+
+if.else275.i: ; preds = %if.end263.i
+ %or277.i = or i32 %and144, 3
+ %head278.i = getelementptr inbounds %struct.malloc_tree_chunk* %v.3.lcssa.i, i32 0, i32 1
+ store i32 %or277.i, i32* %head278.i, align 4, !tbaa !3
+ %or279.i = or i32 %rsize.3.lcssa.i, 1
+ %add.ptr.sum.i141172 = or i32 %and144, 4
+ %head280.i = getelementptr inbounds i8* %88, i32 %add.ptr.sum.i141172
+ %118 = bitcast i8* %head280.i to i32*
+ store i32 %or279.i, i32* %118, align 4, !tbaa !3
+ %add.ptr.sum1.i142 = add i32 %rsize.3.lcssa.i, %and144
+ %add.ptr281.i = getelementptr inbounds i8* %88, i32 %add.ptr.sum1.i142
+ %prev_foot.i143 = bitcast i8* %add.ptr281.i to i32*
+ store i32 %rsize.3.lcssa.i, i32* %prev_foot.i143, align 4, !tbaa !3
+ %shr282.i = lshr i32 %rsize.3.lcssa.i, 3
+ %cmp283.i = icmp ult i32 %rsize.3.lcssa.i, 256
+ br i1 %cmp283.i, label %if.then285.i, label %if.else313.i
+
+if.then285.i: ; preds = %if.else275.i
+ %shl287.i = shl nuw nsw i32 %shr282.i, 1
+ %arrayidx288.i = getelementptr inbounds %struct.malloc_state* @_gm_, i32 0, i32 10, i32 %shl287.i
+ %119 = bitcast %struct.malloc_chunk** %arrayidx288.i to %struct.malloc_chunk*
+ %120 = load i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 0), align 4, !tbaa !3
+ %shl290.i = shl i32 1, %shr282.i
+ %and291.i = and i32 %120, %shl290.i
+ %tobool292.i = icmp eq i32 %and291.i, 0
+ br i1 %tobool292.i, label %if.then293.i, label %if.else297.i
+
+if.then293.i: ; preds = %if.then285.i
+ %or296.i = or i32 %120, %shl290.i
+ store i32 %or296.i, i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 0), align 4, !tbaa !3
+ %arrayidx288.sum.pre.i = add i32 %shl287.i, 2
+ %.pre.i144 = getelementptr inbounds %struct.malloc_state* @_gm_, i32 0, i32 10, i32 %arrayidx288.sum.pre.i
+ br label %if.end308.i
+
+if.else297.i: ; preds = %if.then285.i
+ %arrayidx288.sum15.i = add i32 %shl287.i, 2
+ %121 = getelementptr inbounds %struct.malloc_state* @_gm_, i32 0, i32 10, i32 %arrayidx288.sum15.i
+ %122 = load %struct.malloc_chunk** %121, align 4, !tbaa !0
+ %123 = bitcast %struct.malloc_chunk* %122 to i8*
+ %124 = load i8** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 4), align 4, !tbaa !0
+ %cmp300.i = icmp ult i8* %123, %124
+ br i1 %cmp300.i, label %if.else306.i, label %if.end308.i, !prof !6
+
+if.else306.i: ; preds = %if.else297.i
+ tail call void @abort() #6
+ unreachable
+
+if.end308.i: ; preds = %if.else297.i, %if.then293.i
+ %.pre-phi.i145 = phi %struct.malloc_chunk** [ %121, %if.else297.i ], [ %.pre.i144, %if.then293.i ]
+ %F289.0.i = phi %struct.malloc_chunk* [ %122, %if.else297.i ], [ %119, %if.then293.i ]
+ store %struct.malloc_chunk* %90, %struct.malloc_chunk** %.pre-phi.i145, align 4, !tbaa !0
+ %bk310.i = getelementptr inbounds %struct.malloc_chunk* %F289.0.i, i32 0, i32 3
+ store %struct.malloc_chunk* %90, %struct.malloc_chunk** %bk310.i, align 4, !tbaa !0
+ %add.ptr.sum13.i = add i32 %and144, 8
+ %fd311.i = getelementptr inbounds i8* %88, i32 %add.ptr.sum13.i
+ %125 = bitcast i8* %fd311.i to %struct.malloc_chunk**
+ store %struct.malloc_chunk* %F289.0.i, %struct.malloc_chunk** %125, align 4, !tbaa !0
+ %add.ptr.sum14.i = add i32 %and144, 12
+ %bk312.i = getelementptr inbounds i8* %88, i32 %add.ptr.sum14.i
+ %126 = bitcast i8* %bk312.i to %struct.malloc_chunk**
+ store %struct.malloc_chunk* %119, %struct.malloc_chunk** %126, align 4, !tbaa !0
+ br label %tmalloc_large.exit
+
+if.else313.i: ; preds = %if.else275.i
+ %127 = bitcast i8* %add.ptr.i126 to %struct.malloc_tree_chunk*
+ %shr317.i = lshr i32 %rsize.3.lcssa.i, 8
+ %cmp318.i = icmp eq i32 %shr317.i, 0
+ br i1 %cmp318.i, label %if.end352.i, label %if.else321.i
+
+if.else321.i: ; preds = %if.else313.i
+ %cmp322.i = icmp ugt i32 %rsize.3.lcssa.i, 16777215
+ br i1 %cmp322.i, label %if.end352.i, label %if.else325.i
+
+if.else325.i: ; preds = %if.else321.i
+ %sub328.i = add i32 %shr317.i, 1048320
+ %shr329.i = lshr i32 %sub328.i, 16
+ %and330.i = and i32 %shr329.i, 8
+ %shl332.i = shl i32 %shr317.i, %and330.i
+ %sub333.i = add i32 %shl332.i, 520192
+ %shr334.i = lshr i32 %sub333.i, 16
+ %and335.i = and i32 %shr334.i, 4
+ %add336.i = or i32 %and335.i, %and330.i
+ %shl337.i = shl i32 %shl332.i, %and335.i
+ %sub338.i = add i32 %shl337.i, 245760
+ %shr339.i = lshr i32 %sub338.i, 16
+ %and340.i = and i32 %shr339.i, 2
+ %add341.i = or i32 %add336.i, %and340.i
+ %sub342.i = sub i32 14, %add341.i
+ %shl343.i = shl i32 %shl337.i, %and340.i
+ %shr344.i = lshr i32 %shl343.i, 15
+ %add345.i = add i32 %sub342.i, %shr344.i
+ %shl346.i = shl nsw i32 %add345.i, 1
+ %add347.i = add i32 %add345.i, 7
+ %shr348.i = lshr i32 %rsize.3.lcssa.i, %add347.i
+ %and349.i = and i32 %shr348.i, 1
+ %add350.i = or i32 %and349.i, %shl346.i
+ br label %if.end352.i
+
+if.end352.i: ; preds = %if.else325.i, %if.else321.i, %if.else313.i
+ %I315.0.i = phi i32 [ %add350.i, %if.else325.i ], [ 0, %if.else313.i ], [ 31, %if.else321.i ]
+ %arrayidx354.i = getelementptr inbounds %struct.malloc_state* @_gm_, i32 0, i32 11, i32 %I315.0.i
+ %add.ptr.sum2.i = add i32 %and144, 28
+ %index355.i = getelementptr inbounds i8* %88, i32 %add.ptr.sum2.i
+ %128 = bitcast i8* %index355.i to i32*
+ store i32 %I315.0.i, i32* %128, align 4, !tbaa !3
+ %add.ptr.sum3.i = add i32 %and144, 16
+ %child356.i = getelementptr inbounds i8* %88, i32 %add.ptr.sum3.i
+ %child356.sum.i = add i32 %and144, 20
+ %arrayidx357.i = getelementptr inbounds i8* %88, i32 %child356.sum.i
+ %129 = bitcast i8* %arrayidx357.i to %struct.malloc_tree_chunk**
+ store %struct.malloc_tree_chunk* null, %struct.malloc_tree_chunk** %129, align 4, !tbaa !0
+ %arrayidx359.i = bitcast i8* %child356.i to %struct.malloc_tree_chunk**
+ store %struct.malloc_tree_chunk* null, %struct.malloc_tree_chunk** %arrayidx359.i, align 4, !tbaa !0
+ %130 = load i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 1), align 4, !tbaa !3
+ %shl361.i = shl i32 1, %I315.0.i
+ %and362.i = and i32 %130, %shl361.i
+ %tobool363.i = icmp eq i32 %and362.i, 0
+ br i1 %tobool363.i, label %if.then364.i, label %if.else371.i
+
+if.then364.i: ; preds = %if.end352.i
+ %or367.i = or i32 %130, %shl361.i
+ store i32 %or367.i, i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 1), align 4, !tbaa !3
+ store %struct.malloc_tree_chunk* %127, %struct.malloc_tree_chunk** %arrayidx354.i, align 4, !tbaa !0
+ %131 = bitcast %struct.malloc_tree_chunk** %arrayidx354.i to %struct.malloc_tree_chunk*
+ %add.ptr.sum4.i = add i32 %and144, 24
+ %parent368.i = getelementptr inbounds i8* %88, i32 %add.ptr.sum4.i
+ %132 = bitcast i8* %parent368.i to %struct.malloc_tree_chunk**
+ store %struct.malloc_tree_chunk* %131, %struct.malloc_tree_chunk** %132, align 4, !tbaa !0
+ %add.ptr.sum5.i = add i32 %and144, 12
+ %bk369.i = getelementptr inbounds i8* %88, i32 %add.ptr.sum5.i
+ %133 = bitcast i8* %bk369.i to %struct.malloc_tree_chunk**
+ store %struct.malloc_tree_chunk* %127, %struct.malloc_tree_chunk** %133, align 4, !tbaa !0
+ %add.ptr.sum6.i = add i32 %and144, 8
+ %fd370.i = getelementptr inbounds i8* %88, i32 %add.ptr.sum6.i
+ %134 = bitcast i8* %fd370.i to %struct.malloc_tree_chunk**
+ store %struct.malloc_tree_chunk* %127, %struct.malloc_tree_chunk** %134, align 4, !tbaa !0
+ br label %tmalloc_large.exit
+
+if.else371.i: ; preds = %if.end352.i
+ %135 = load %struct.malloc_tree_chunk** %arrayidx354.i, align 4, !tbaa !0
+ %cmp373.i = icmp eq i32 %I315.0.i, 31
+ br i1 %cmp373.i, label %cond.end381.i, label %cond.false376.i
+
+cond.false376.i: ; preds = %if.else371.i
+ %shr377.i = lshr i32 %I315.0.i, 1
+ %sub380.i = sub i32 25, %shr377.i
+ br label %cond.end381.i
+
+cond.end381.i: ; preds = %cond.false376.i, %if.else371.i
+ %cond382.i = phi i32 [ %sub380.i, %cond.false376.i ], [ 0, %if.else371.i ]
+ %head38520.i = getelementptr inbounds %struct.malloc_tree_chunk* %135, i32 0, i32 1
+ %136 = load i32* %head38520.i, align 4, !tbaa !3
+ %and38621.i = and i32 %136, -8
+ %cmp38722.i = icmp eq i32 %and38621.i, %rsize.3.lcssa.i
+ br i1 %cmp38722.i, label %if.else410.i, label %if.then389.lr.ph.i
+
+if.then389.lr.ph.i: ; preds = %cond.end381.i
+ %shl383.i = shl i32 %rsize.3.lcssa.i, %cond382.i
+ br label %if.then389.i
+
+for.cond384.i: ; preds = %if.then389.i
+ %shl394.i = shl i32 %K372.024.i, 1
+ %head385.i = getelementptr inbounds %struct.malloc_tree_chunk* %138, i32 0, i32 1
+ %137 = load i32* %head385.i, align 4, !tbaa !3
+ %and386.i = and i32 %137, -8
+ %cmp387.i = icmp eq i32 %and386.i, %rsize.3.lcssa.i
+ br i1 %cmp387.i, label %if.else410.i, label %if.then389.i
+
+if.then389.i: ; preds = %for.cond384.i, %if.then389.lr.ph.i
+ %K372.024.i = phi i32 [ %shl383.i, %if.then389.lr.ph.i ], [ %shl394.i, %for.cond384.i ]
+ %T.023.i = phi %struct.malloc_tree_chunk* [ %135, %if.then389.lr.ph.i ], [ %138, %for.cond384.i ]
+ %shr390.i = lshr i32 %K372.024.i, 31
+ %arrayidx393.i = getelementptr inbounds %struct.malloc_tree_chunk* %T.023.i, i32 0, i32 4, i32 %shr390.i
+ %138 = load %struct.malloc_tree_chunk** %arrayidx393.i, align 4, !tbaa !0
+ %cmp395.i = icmp eq %struct.malloc_tree_chunk* %138, null
+ br i1 %cmp395.i, label %if.else398.i, label %for.cond384.i
+
+if.else398.i: ; preds = %if.then389.i
+ %139 = bitcast %struct.malloc_tree_chunk** %arrayidx393.i to i8*
+ %140 = load i8** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 4), align 4, !tbaa !0
+ %cmp400.i = icmp ult i8* %139, %140
+ br i1 %cmp400.i, label %if.else408.i, label %if.then404.i, !prof !6
+
+if.then404.i: ; preds = %if.else398.i
+ store %struct.malloc_tree_chunk* %127, %struct.malloc_tree_chunk** %arrayidx393.i, align 4, !tbaa !0
+ %add.ptr.sum10.i = add i32 %and144, 24
+ %parent405.i = getelementptr inbounds i8* %88, i32 %add.ptr.sum10.i
+ %141 = bitcast i8* %parent405.i to %struct.malloc_tree_chunk**
+ store %struct.malloc_tree_chunk* %T.023.i, %struct.malloc_tree_chunk** %141, align 4, !tbaa !0
+ %add.ptr.sum11.i = add i32 %and144, 12
+ %bk406.i = getelementptr inbounds i8* %88, i32 %add.ptr.sum11.i
+ %142 = bitcast i8* %bk406.i to %struct.malloc_tree_chunk**
+ store %struct.malloc_tree_chunk* %127, %struct.malloc_tree_chunk** %142, align 4, !tbaa !0
+ %add.ptr.sum12.i = add i32 %and144, 8
+ %fd407.i = getelementptr inbounds i8* %88, i32 %add.ptr.sum12.i
+ %143 = bitcast i8* %fd407.i to %struct.malloc_tree_chunk**
+ store %struct.malloc_tree_chunk* %127, %struct.malloc_tree_chunk** %143, align 4, !tbaa !0
+ br label %tmalloc_large.exit
+
+if.else408.i: ; preds = %if.else398.i
+ tail call void @abort() #6
+ unreachable
+
+if.else410.i: ; preds = %for.cond384.i, %cond.end381.i
+ %T.0.lcssa.i = phi %struct.malloc_tree_chunk* [ %135, %cond.end381.i ], [ %138, %for.cond384.i ]
+ %fd412.i = getelementptr inbounds %struct.malloc_tree_chunk* %T.0.lcssa.i, i32 0, i32 2
+ %144 = load %struct.malloc_tree_chunk** %fd412.i, align 4, !tbaa !0
+ %145 = bitcast %struct.malloc_tree_chunk* %T.0.lcssa.i to i8*
+ %146 = load i8** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 4), align 4, !tbaa !0
+ %cmp414.i = icmp ult i8* %145, %146
+ br i1 %cmp414.i, label %if.else430.i, label %land.rhs416.i
+
+land.rhs416.i: ; preds = %if.else410.i
+ %147 = bitcast %struct.malloc_tree_chunk* %144 to i8*
+ %cmp418.i = icmp ult i8* %147, %146
+ br i1 %cmp418.i, label %if.else430.i, label %if.then424.i, !prof !6
+
+if.then424.i: ; preds = %land.rhs416.i
+ %bk425.i = getelementptr inbounds %struct.malloc_tree_chunk* %144, i32 0, i32 3
+ store %struct.malloc_tree_chunk* %127, %struct.malloc_tree_chunk** %bk425.i, align 4, !tbaa !0
+ store %struct.malloc_tree_chunk* %127, %struct.malloc_tree_chunk** %fd412.i, align 4, !tbaa !0
+ %add.ptr.sum7.i = add i32 %and144, 8
+ %fd427.i = getelementptr inbounds i8* %88, i32 %add.ptr.sum7.i
+ %148 = bitcast i8* %fd427.i to %struct.malloc_tree_chunk**
+ store %struct.malloc_tree_chunk* %144, %struct.malloc_tree_chunk** %148, align 4, !tbaa !0
+ %add.ptr.sum8.i = add i32 %and144, 12
+ %bk428.i = getelementptr inbounds i8* %88, i32 %add.ptr.sum8.i
+ %149 = bitcast i8* %bk428.i to %struct.malloc_tree_chunk**
+ store %struct.malloc_tree_chunk* %T.0.lcssa.i, %struct.malloc_tree_chunk** %149, align 4, !tbaa !0
+ %add.ptr.sum9.i = add i32 %and144, 24
+ %parent429.i = getelementptr inbounds i8* %88, i32 %add.ptr.sum9.i
+ %150 = bitcast i8* %parent429.i to %struct.malloc_tree_chunk**
+ store %struct.malloc_tree_chunk* null, %struct.malloc_tree_chunk** %150, align 4, !tbaa !0
+ br label %tmalloc_large.exit
+
+if.else430.i: ; preds = %land.rhs416.i, %if.else410.i
+ tail call void @abort() #6
+ unreachable
+
+if.end438.i: ; preds = %if.then121.i, %if.then119.i
+ tail call void @abort() #6
+ unreachable
+
+tmalloc_large.exit: ; preds = %if.then424.i, %if.then404.i, %if.then364.i, %if.end308.i, %if.then266.i
+ %add.ptr436.i = getelementptr inbounds %struct.malloc_tree_chunk* %v.3.lcssa.i, i32 0, i32 2
+ %151 = bitcast %struct.malloc_tree_chunk** %add.ptr436.i to i8*
+ br label %postaction
+
+if.end154: ; preds = %land.lhs.true116.i, %while.end.i125, %if.then57.i, %if.else141, %if.else137, %if.else127, %if.else28
+ %nb.0 = phi i32 [ %cond, %if.else127 ], [ %cond, %if.else28 ], [ -1, %if.else137 ], [ %and144, %if.else141 ], [ %and144, %while.end.i125 ], [ %and144, %land.lhs.true116.i ], [ %and144, %if.then57.i ]
+ %152 = load i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 2), align 4, !tbaa !3
+ %cmp155 = icmp ugt i32 %nb.0, %152
+ br i1 %cmp155, label %if.else182, label %if.then157
+
+if.then157: ; preds = %if.end154
+ %sub159 = sub i32 %152, %nb.0
+ %153 = load %struct.malloc_chunk** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 5), align 4, !tbaa !0
+ %cmp161 = icmp ugt i32 %sub159, 15
+ br i1 %cmp161, label %if.then163, label %if.else173
+
+if.then163: ; preds = %if.then157
+ %154 = bitcast %struct.malloc_chunk* %153 to i8*
+ %add.ptr165 = getelementptr inbounds i8* %154, i32 %nb.0
+ %155 = bitcast i8* %add.ptr165 to %struct.malloc_chunk*
+ store %struct.malloc_chunk* %155, %struct.malloc_chunk** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 5), align 4, !tbaa !0
+ store i32 %sub159, i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 2), align 4, !tbaa !3
+ %or166 = or i32 %sub159, 1
+ %add.ptr165.sum = add i32 %nb.0, 4
+ %head167 = getelementptr inbounds i8* %154, i32 %add.ptr165.sum
+ %156 = bitcast i8* %head167 to i32*
+ store i32 %or166, i32* %156, align 4, !tbaa !3
+ %add.ptr168 = getelementptr inbounds i8* %154, i32 %152
+ %prev_foot169 = bitcast i8* %add.ptr168 to i32*
+ store i32 %sub159, i32* %prev_foot169, align 4, !tbaa !3
+ %or171 = or i32 %nb.0, 3
+ %head172 = getelementptr inbounds %struct.malloc_chunk* %153, i32 0, i32 1
+ store i32 %or171, i32* %head172, align 4, !tbaa !3
+ br label %if.end180
+
+if.else173: ; preds = %if.then157
+ store i32 0, i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 2), align 4, !tbaa !3
+ store %struct.malloc_chunk* null, %struct.malloc_chunk** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 5), align 4, !tbaa !0
+ %or175 = or i32 %152, 3
+ %head176 = getelementptr inbounds %struct.malloc_chunk* %153, i32 0, i32 1
+ store i32 %or175, i32* %head176, align 4, !tbaa !3
+ %157 = bitcast %struct.malloc_chunk* %153 to i8*
+ %add.ptr177.sum = add i32 %152, 4
+ %head178 = getelementptr inbounds i8* %157, i32 %add.ptr177.sum
+ %158 = bitcast i8* %head178 to i32*
+ %159 = load i32* %158, align 4, !tbaa !3
+ %or179 = or i32 %159, 1
+ store i32 %or179, i32* %158, align 4, !tbaa !3
+ br label %if.end180
+
+if.end180: ; preds = %if.else173, %if.then163
+ %add.ptr181 = getelementptr inbounds %struct.malloc_chunk* %153, i32 0, i32 2
+ %160 = bitcast %struct.malloc_chunk** %add.ptr181 to i8*
+ br label %postaction
+
+if.else182: ; preds = %if.end154
+ %161 = load i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 3), align 4, !tbaa !3
+ %cmp183 = icmp ult i32 %nb.0, %161
+ br i1 %cmp183, label %if.then185, label %if.end198
+
+if.then185: ; preds = %if.else182
+ %sub187 = sub i32 %161, %nb.0
+ store i32 %sub187, i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 3), align 4, !tbaa !3
+ %162 = load %struct.malloc_chunk** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 6), align 4, !tbaa !0
+ %163 = bitcast %struct.malloc_chunk* %162 to i8*
+ %add.ptr190 = getelementptr inbounds i8* %163, i32 %nb.0
+ %164 = bitcast i8* %add.ptr190 to %struct.malloc_chunk*
+ store %struct.malloc_chunk* %164, %struct.malloc_chunk** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 6), align 4, !tbaa !0
+ %or191 = or i32 %sub187, 1
+ %add.ptr190.sum = add i32 %nb.0, 4
+ %head192 = getelementptr inbounds i8* %163, i32 %add.ptr190.sum
+ %165 = bitcast i8* %head192 to i32*
+ store i32 %or191, i32* %165, align 4, !tbaa !3
+ %or194 = or i32 %nb.0, 3
+ %head195 = getelementptr inbounds %struct.malloc_chunk* %162, i32 0, i32 1
+ store i32 %or194, i32* %head195, align 4, !tbaa !3
+ %add.ptr196 = getelementptr inbounds %struct.malloc_chunk* %162, i32 0, i32 2
+ %166 = bitcast %struct.malloc_chunk** %add.ptr196 to i8*
+ br label %postaction
+
+if.end198: ; preds = %if.else182
+ %167 = load i32* getelementptr inbounds (%struct.malloc_params* @mparams, i32 0, i32 0), align 4, !tbaa !3
+ %cmp.i146 = icmp eq i32 %167, 0
+ br i1 %cmp.i146, label %if.then.i.i, label %if.end8.i
+
+if.then.i.i: ; preds = %if.end198
+ %call.i.i = tail call i32 @sysconf(i32 30) #1
+ %sub.i.i = add i32 %call.i.i, -1
+ %and.i.i = and i32 %sub.i.i, %call.i.i
+ %cmp1.i.i = icmp eq i32 %and.i.i, 0
+ br i1 %cmp1.i.i, label %init_mparams.exit.i, label %if.then5.i.i
+
+if.then5.i.i: ; preds = %if.then.i.i
+ tail call void @abort() #6
+ unreachable
+
+init_mparams.exit.i: ; preds = %if.then.i.i
+ store i32 %call.i.i, i32* getelementptr inbounds (%struct.malloc_params* @mparams, i32 0, i32 2), align 4, !tbaa !3
+ store i32 %call.i.i, i32* getelementptr inbounds (%struct.malloc_params* @mparams, i32 0, i32 1), align 4, !tbaa !3
+ store i32 -1, i32* getelementptr inbounds (%struct.malloc_params* @mparams, i32 0, i32 3), align 4, !tbaa !3
+ store i32 -1, i32* getelementptr inbounds (%struct.malloc_params* @mparams, i32 0, i32 4), align 4, !tbaa !3
+ store i32 0, i32* getelementptr inbounds (%struct.malloc_params* @mparams, i32 0, i32 5), align 4, !tbaa !3
+ store i32 0, i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 15), align 4, !tbaa !3
+ %call6.i.i = tail call i32 @time(i32* null) #1
+ %xor.i.i = and i32 %call6.i.i, -16
+ %and7.i.i = xor i32 %xor.i.i, 1431655768
+ store volatile i32 %and7.i.i, i32* getelementptr inbounds (%struct.malloc_params* @mparams, i32 0, i32 0), align 4, !tbaa !3
+ br label %if.end8.i
+
+if.end8.i: ; preds = %init_mparams.exit.i, %if.end198
+ %add.i147 = add i32 %nb.0, 48
+ %168 = load i32* getelementptr inbounds (%struct.malloc_params* @mparams, i32 0, i32 2), align 4, !tbaa !3
+ %sub.i148 = add i32 %nb.0, 47
+ %add9.i = add i32 %168, %sub.i148
+ %neg.i149 = sub i32 0, %168
+ %and11.i = and i32 %add9.i, %neg.i149
+ %cmp12.i = icmp ugt i32 %and11.i, %nb.0
+ br i1 %cmp12.i, label %if.end14.i, label %postaction
+
+if.end14.i: ; preds = %if.end8.i
+ %169 = load i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 14), align 4, !tbaa !3
+ %cmp15.i = icmp eq i32 %169, 0
+ br i1 %cmp15.i, label %if.end24.i, label %if.then16.i
+
+if.then16.i: ; preds = %if.end14.i
+ %170 = load i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 12), align 4, !tbaa !3
+ %add17.i150 = add i32 %170, %and11.i
+ %cmp19.i = icmp ule i32 %add17.i150, %170
+ %cmp21.i = icmp ugt i32 %add17.i150, %169
+ %or.cond1.i = or i1 %cmp19.i, %cmp21.i
+ br i1 %or.cond1.i, label %postaction, label %if.end24.i
+
+if.end24.i: ; preds = %if.then16.i, %if.end14.i
+ %171 = load i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 15), align 4, !tbaa !3
+ %and26.i = and i32 %171, 4
+ %tobool27.i = icmp eq i32 %and26.i, 0
+ br i1 %tobool27.i, label %if.then28.i, label %if.end121.i
+
+if.then28.i: ; preds = %if.end24.i
+ %172 = load %struct.malloc_chunk** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 6), align 4, !tbaa !0
+ %cmp29.i = icmp eq %struct.malloc_chunk* %172, null
+ br i1 %cmp29.i, label %if.then33.i, label %cond.false.i151
+
+cond.false.i151: ; preds = %if.then28.i
+ %173 = bitcast %struct.malloc_chunk* %172 to i8*
+ br label %for.cond.i.i
+
+for.cond.i.i: ; preds = %if.end.i10.i, %cond.false.i151
+ %sp.0.i.i = phi %struct.malloc_segment* [ getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 16), %cond.false.i151 ], [ %176, %if.end.i10.i ]
+ %base.i.i = getelementptr inbounds %struct.malloc_segment* %sp.0.i.i, i32 0, i32 0
+ %174 = load i8** %base.i.i, align 4, !tbaa !0
+ %cmp.i9.i = icmp ugt i8* %174, %173
+ br i1 %cmp.i9.i, label %if.end.i10.i, label %land.lhs.true.i.i
+
+land.lhs.true.i.i: ; preds = %for.cond.i.i
+ %size.i.i = getelementptr inbounds %struct.malloc_segment* %sp.0.i.i, i32 0, i32 1
+ %175 = load i32* %size.i.i, align 4, !tbaa !3
+ %add.ptr.i.i = getelementptr inbounds i8* %174, i32 %175
+ %cmp2.i.i = icmp ugt i8* %add.ptr.i.i, %173
+ br i1 %cmp2.i.i, label %cond.end.i153, label %if.end.i10.i
+
+if.end.i10.i: ; preds = %land.lhs.true.i.i, %for.cond.i.i
+ %next.i.i = getelementptr inbounds %struct.malloc_segment* %sp.0.i.i, i32 0, i32 2
+ %176 = load %struct.malloc_segment** %next.i.i, align 4, !tbaa !0
+ %cmp3.i.i = icmp eq %struct.malloc_segment* %176, null
+ br i1 %cmp3.i.i, label %if.then33.i, label %for.cond.i.i
+
+cond.end.i153: ; preds = %land.lhs.true.i.i
+ %cmp32.i152 = icmp eq %struct.malloc_segment* %sp.0.i.i, null
+ br i1 %cmp32.i152, label %if.then33.i, label %if.else.i159
+
+if.then33.i: ; preds = %cond.end.i153, %if.end.i10.i, %if.then28.i
+ %call34.i = tail call i8* @sbrk(i32 0) #1
+ %cmp35.i154 = icmp eq i8* %call34.i, inttoptr (i32 -1 to i8*)
+ br i1 %cmp35.i154, label %if.else117.i, label %if.then36.i
+
+if.then36.i: ; preds = %if.then33.i
+ %177 = ptrtoint i8* %call34.i to i32
+ %178 = load i32* getelementptr inbounds (%struct.malloc_params* @mparams, i32 0, i32 1), align 4, !tbaa !3
+ %sub38.i = add i32 %178, -1
+ %and39.i = and i32 %sub38.i, %177
+ %cmp40.i155 = icmp eq i32 %and39.i, 0
+ br i1 %cmp40.i155, label %if.end49.i, label %if.then41.i
+
+if.then41.i: ; preds = %if.then36.i
+ %add43.i = add i32 %sub38.i, %177
+ %neg45.i = sub i32 0, %178
+ %and46.i = and i32 %add43.i, %neg45.i
+ %sub47.i = sub i32 %and11.i, %177
+ %add48.i = add i32 %sub47.i, %and46.i
+ br label %if.end49.i
+
+if.end49.i: ; preds = %if.then41.i, %if.then36.i
+ %ssize.0.i = phi i32 [ %and11.i, %if.then36.i ], [ %add48.i, %if.then41.i ]
+ %179 = load i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 12), align 4, !tbaa !3
+ %add51.i = add i32 %179, %ssize.0.i
+ %cmp52.i = icmp ugt i32 %ssize.0.i, %nb.0
+ %cmp54.i156 = icmp ult i32 %ssize.0.i, 2147483647
+ %or.cond.i157 = and i1 %cmp52.i, %cmp54.i156
+ br i1 %or.cond.i157, label %land.lhs.true55.i, label %if.else117.i
+
+land.lhs.true55.i: ; preds = %if.end49.i
+ %180 = load i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 14), align 4, !tbaa !3
+ %cmp57.i = icmp eq i32 %180, 0
+ br i1 %cmp57.i, label %land.lhs.true64.i, label %lor.lhs.false58.i
+
+lor.lhs.false58.i: ; preds = %land.lhs.true55.i
+ %cmp60.i = icmp ule i32 %add51.i, %179
+ %cmp63.i = icmp ugt i32 %add51.i, %180
+ %or.cond2.i = or i1 %cmp60.i, %cmp63.i
+ br i1 %or.cond2.i, label %if.else117.i, label %land.lhs.true64.i
+
+land.lhs.true64.i: ; preds = %lor.lhs.false58.i, %land.lhs.true55.i
+ %call65.i = tail call i8* @sbrk(i32 %ssize.0.i) #1
+ %cmp66.i158 = icmp eq i8* %call65.i, %call34.i
+ %ssize.0..i = select i1 %cmp66.i158, i32 %ssize.0.i, i32 0
+ %call34..i = select i1 %cmp66.i158, i8* %call34.i, i8* inttoptr (i32 -1 to i8*)
+ br label %if.end85.i
+
+if.else.i159: ; preds = %cond.end.i153
+ %181 = load i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 3), align 4, !tbaa !3
+ %add74.i = sub i32 %add9.i, %181
+ %and77.i = and i32 %add74.i, %neg.i149
+ %cmp78.i = icmp ult i32 %and77.i, 2147483647
+ br i1 %cmp78.i, label %land.lhs.true79.i, label %if.else117.i
+
+land.lhs.true79.i: ; preds = %if.else.i159
+ %call80.i = tail call i8* @sbrk(i32 %and77.i) #1
+ %182 = load i8** %base.i.i, align 4, !tbaa !0
+ %183 = load i32* %size.i.i, align 4, !tbaa !3
+ %add.ptr.i160 = getelementptr inbounds i8* %182, i32 %183
+ %cmp82.i = icmp eq i8* %call80.i, %add.ptr.i160
+ %and77..i = select i1 %cmp82.i, i32 %and77.i, i32 0
+ %call80..i = select i1 %cmp82.i, i8* %call80.i, i8* inttoptr (i32 -1 to i8*)
+ br label %if.end85.i
+
+if.end85.i: ; preds = %land.lhs.true79.i, %land.lhs.true64.i
+ %ssize.1.i = phi i32 [ %ssize.0.i, %land.lhs.true64.i ], [ %and77.i, %land.lhs.true79.i ]
+ %br.0.i = phi i8* [ %call65.i, %land.lhs.true64.i ], [ %call80.i, %land.lhs.true79.i ]
+ %tsize.0.i = phi i32 [ %ssize.0..i, %land.lhs.true64.i ], [ %and77..i, %land.lhs.true79.i ]
+ %tbase.0.i = phi i8* [ %call34..i, %land.lhs.true64.i ], [ %call80..i, %land.lhs.true79.i ]
+ %sub109.i = sub i32 0, %ssize.1.i
+ %cmp86.i = icmp eq i8* %tbase.0.i, inttoptr (i32 -1 to i8*)
+ br i1 %cmp86.i, label %if.then87.i, label %if.then145.i
+
+if.then87.i: ; preds = %if.end85.i
+ %cmp88.i = icmp ne i8* %br.0.i, inttoptr (i32 -1 to i8*)
+ %cmp90.i161 = icmp ult i32 %ssize.1.i, 2147483647
+ %or.cond3.i = and i1 %cmp88.i, %cmp90.i161
+ %cmp93.i = icmp ult i32 %ssize.1.i, %add.i147
+ %or.cond4.i = and i1 %or.cond3.i, %cmp93.i
+ br i1 %or.cond4.i, label %if.then94.i, label %if.end114.i
+
+if.then94.i: ; preds = %if.then87.i
+ %184 = load i32* getelementptr inbounds (%struct.malloc_params* @mparams, i32 0, i32 2), align 4, !tbaa !3
+ %sub96.i = sub i32 %sub.i148, %ssize.1.i
+ %add98.i = add i32 %sub96.i, %184
+ %neg100.i = sub i32 0, %184
+ %and101.i = and i32 %add98.i, %neg100.i
+ %cmp102.i = icmp ult i32 %and101.i, 2147483647
+ br i1 %cmp102.i, label %if.then103.i, label %if.end114.i
+
+if.then103.i: ; preds = %if.then94.i
+ %call104.i = tail call i8* @sbrk(i32 %and101.i) #1
+ %cmp105.i = icmp eq i8* %call104.i, inttoptr (i32 -1 to i8*)
+ br i1 %cmp105.i, label %if.else108.i, label %if.then106.i
+
+if.then106.i: ; preds = %if.then103.i
+ %add107.i = add i32 %and101.i, %ssize.1.i
+ br label %if.end114.i
+
+if.else108.i: ; preds = %if.then103.i
+ %call110.i = tail call i8* @sbrk(i32 %sub109.i) #1
+ br label %if.else117.i
+
+if.end114.i: ; preds = %if.then106.i, %if.then94.i, %if.then87.i
+ %ssize.2.i = phi i32 [ %add107.i, %if.then106.i ], [ %ssize.1.i, %if.then94.i ], [ %ssize.1.i, %if.then87.i ]
+ %cmp115.i162 = icmp eq i8* %br.0.i, inttoptr (i32 -1 to i8*)
+ br i1 %cmp115.i162, label %if.else117.i, label %if.then145.i
+
+if.else117.i: ; preds = %if.end114.i, %if.else108.i, %if.else.i159, %lor.lhs.false58.i, %if.end49.i, %if.then33.i
+ %tsize.0748284.i = phi i32 [ %tsize.0.i, %if.else108.i ], [ 0, %if.else.i159 ], [ 0, %if.then33.i ], [ 0, %if.end49.i ], [ 0, %lor.lhs.false58.i ], [ %tsize.0.i, %if.end114.i ]
+ %185 = load i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 15), align 4, !tbaa !3
+ %or.i163 = or i32 %185, 4
+ store i32 %or.i163, i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 15), align 4, !tbaa !3
+ br label %if.end121.i
+
+if.end121.i: ; preds = %if.else117.i, %if.end24.i
+ %tsize.1.i = phi i32 [ 0, %if.end24.i ], [ %tsize.0748284.i, %if.else117.i ]
+ %cmp124.i = icmp ult i32 %and11.i, 2147483647
+ br i1 %cmp124.i, label %if.then125.i, label %if.end264.i
+
+if.then125.i: ; preds = %if.end121.i
+ %call128.i = tail call i8* @sbrk(i32 %and11.i) #1
+ %call129.i = tail call i8* @sbrk(i32 0) #1
+ %notlhs.i = icmp ne i8* %call128.i, inttoptr (i32 -1 to i8*)
+ %notrhs.i = icmp ne i8* %call129.i, inttoptr (i32 -1 to i8*)
+ %or.cond6.not.i = and i1 %notrhs.i, %notlhs.i
+ %cmp134.i = icmp ult i8* %call128.i, %call129.i
+ %or.cond7.i = and i1 %or.cond6.not.i, %cmp134.i
+ br i1 %or.cond7.i, label %if.end143.i, label %if.end264.i
+
+if.end143.i: ; preds = %if.then125.i
+ %sub.ptr.lhs.cast.i = ptrtoint i8* %call129.i to i32
+ %sub.ptr.rhs.cast.i = ptrtoint i8* %call128.i to i32
+ %sub.ptr.sub.i = sub i32 %sub.ptr.lhs.cast.i, %sub.ptr.rhs.cast.i
+ %add137.i = add i32 %nb.0, 40
+ %cmp138.i164 = icmp ugt i32 %sub.ptr.sub.i, %add137.i
+ %sub.ptr.sub.tsize.1.i = select i1 %cmp138.i164, i32 %sub.ptr.sub.i, i32 %tsize.1.i
+ br i1 %cmp138.i164, label %if.then145.i, label %if.end264.i
+
+if.then145.i: ; preds = %if.end143.i, %if.end114.i, %if.end85.i
+ %tbase.291.i = phi i8* [ %tbase.0.i, %if.end85.i ], [ %br.0.i, %if.end114.i ], [ %call128.i, %if.end143.i ]
+ %tsize.290.i = phi i32 [ %tsize.0.i, %if.end85.i ], [ %ssize.2.i, %if.end114.i ], [ %sub.ptr.sub.tsize.1.i, %if.end143.i ]
+ %186 = load i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 12), align 4, !tbaa !3
+ %add147.i = add i32 %186, %tsize.290.i
+ store i32 %add147.i, i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 12), align 4, !tbaa !3
+ %187 = load i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 13), align 4, !tbaa !3
+ %cmp148.i = icmp ugt i32 %add147.i, %187
+ br i1 %cmp148.i, label %if.then149.i, label %if.end152.i165
+
+if.then149.i: ; preds = %if.then145.i
+ store i32 %add147.i, i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 13), align 4, !tbaa !3
+ br label %if.end152.i165
+
+if.end152.i165: ; preds = %if.then149.i, %if.then145.i
+ %188 = load %struct.malloc_chunk** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 6), align 4, !tbaa !0
+ %cmp154.i = icmp eq %struct.malloc_chunk* %188, null
+ br i1 %cmp154.i, label %if.then155.i, label %land.rhs.i167
+
+if.then155.i: ; preds = %if.end152.i165
+ %189 = load i8** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 4), align 4, !tbaa !0
+ %cmp156.i = icmp eq i8* %189, null
+ %cmp159.i166 = icmp ult i8* %tbase.291.i, %189
+ %or.cond8.i = or i1 %cmp156.i, %cmp159.i166
+ br i1 %or.cond8.i, label %if.then160.i, label %if.end162.i
+
+if.then160.i: ; preds = %if.then155.i
+ store i8* %tbase.291.i, i8** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 4), align 4, !tbaa !0
+ br label %if.end162.i
+
+if.end162.i: ; preds = %if.then160.i, %if.then155.i
+ store i8* %tbase.291.i, i8** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 16, i32 0), align 4, !tbaa !0
+ store i32 %tsize.290.i, i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 16, i32 1), align 4, !tbaa !3
+ store i32 0, i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 16, i32 3), align 4, !tbaa !3
+ %190 = load i32* getelementptr inbounds (%struct.malloc_params* @mparams, i32 0, i32 0), align 4, !tbaa !3
+ store i32 %190, i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 9), align 4, !tbaa !3
+ store i32 -1, i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 8), align 4, !tbaa !3
+ br label %for.body.i.i
+
+for.body.i.i: ; preds = %for.body.i.i, %if.end162.i
+ %i.02.i.i = phi i32 [ 0, %if.end162.i ], [ %inc.i.i, %for.body.i.i ]
+ %shl.i.i = shl i32 %i.02.i.i, 1
+ %arrayidx.i.i = getelementptr inbounds %struct.malloc_state* @_gm_, i32 0, i32 10, i32 %shl.i.i
+ %191 = bitcast %struct.malloc_chunk** %arrayidx.i.i to %struct.malloc_chunk*
+ %arrayidx.sum.i.i = add i32 %shl.i.i, 3
+ %192 = getelementptr inbounds %struct.malloc_state* @_gm_, i32 0, i32 10, i32 %arrayidx.sum.i.i
+ store %struct.malloc_chunk* %191, %struct.malloc_chunk** %192, align 4, !tbaa !0
+ %arrayidx.sum1.i.i = add i32 %shl.i.i, 2
+ %193 = getelementptr inbounds %struct.malloc_state* @_gm_, i32 0, i32 10, i32 %arrayidx.sum1.i.i
+ store %struct.malloc_chunk* %191, %struct.malloc_chunk** %193, align 4, !tbaa !0
+ %inc.i.i = add i32 %i.02.i.i, 1
+ %exitcond.i.i = icmp eq i32 %inc.i.i, 32
+ br i1 %exitcond.i.i, label %init_bins.exit.i, label %for.body.i.i
+
+init_bins.exit.i: ; preds = %for.body.i.i
+ %sub169.i = add i32 %tsize.290.i, -40
+ %add.ptr.i11.i = getelementptr inbounds i8* %tbase.291.i, i32 8
+ %194 = ptrtoint i8* %add.ptr.i11.i to i32
+ %and.i12.i = and i32 %194, 7
+ %cmp.i13.i = icmp eq i32 %and.i12.i, 0
+ br i1 %cmp.i13.i, label %init_top.exit.i, label %cond.false.i.i
+
+cond.false.i.i: ; preds = %init_bins.exit.i
+ %195 = sub i32 0, %194
+ %and3.i.i = and i32 %195, 7
+ br label %init_top.exit.i
+
+init_top.exit.i: ; preds = %cond.false.i.i, %init_bins.exit.i
+ %cond.i.i = phi i32 [ %and3.i.i, %cond.false.i.i ], [ 0, %init_bins.exit.i ]
+ %add.ptr4.i.i = getelementptr inbounds i8* %tbase.291.i, i32 %cond.i.i
+ %196 = bitcast i8* %add.ptr4.i.i to %struct.malloc_chunk*
+ %sub5.i.i = sub i32 %sub169.i, %cond.i.i
+ store %struct.malloc_chunk* %196, %struct.malloc_chunk** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 6), align 4, !tbaa !0
+ store i32 %sub5.i.i, i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 3), align 4, !tbaa !3
+ %or.i.i = or i32 %sub5.i.i, 1
+ %add.ptr4.sum.i.i = add i32 %cond.i.i, 4
+ %head.i.i = getelementptr inbounds i8* %tbase.291.i, i32 %add.ptr4.sum.i.i
+ %197 = bitcast i8* %head.i.i to i32*
+ store i32 %or.i.i, i32* %197, align 4, !tbaa !3
+ %add.ptr6.sum.i.i = add i32 %tsize.290.i, -36
+ %head7.i.i = getelementptr inbounds i8* %tbase.291.i, i32 %add.ptr6.sum.i.i
+ %198 = bitcast i8* %head7.i.i to i32*
+ store i32 40, i32* %198, align 4, !tbaa !3
+ %199 = load i32* getelementptr inbounds (%struct.malloc_params* @mparams, i32 0, i32 4), align 4, !tbaa !3
+ store i32 %199, i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 7), align 4, !tbaa !3
+ br label %if.end248.i
+
+land.rhs.i167: ; preds = %while.body.i168, %if.end152.i165
+ %sp.0109.i = phi %struct.malloc_segment* [ %202, %while.body.i168 ], [ getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 16), %if.end152.i165 ]
+ %base184.i = getelementptr inbounds %struct.malloc_segment* %sp.0109.i, i32 0, i32 0
+ %200 = load i8** %base184.i, align 4, !tbaa !0
+ %size185.i = getelementptr inbounds %struct.malloc_segment* %sp.0109.i, i32 0, i32 1
+ %201 = load i32* %size185.i, align 4, !tbaa !3
+ %add.ptr186.i = getelementptr inbounds i8* %200, i32 %201
+ %cmp187.i = icmp eq i8* %tbase.291.i, %add.ptr186.i
+ br i1 %cmp187.i, label %land.lhs.true189.i, label %while.body.i168
+
+while.body.i168: ; preds = %land.rhs.i167
+ %next.i = getelementptr inbounds %struct.malloc_segment* %sp.0109.i, i32 0, i32 2
+ %202 = load %struct.malloc_segment** %next.i, align 4, !tbaa !0
+ %cmp183.i = icmp eq %struct.malloc_segment* %202, null
+ br i1 %cmp183.i, label %if.else213.i169, label %land.rhs.i167
+
+land.lhs.true189.i: ; preds = %land.rhs.i167
+ %sflags190.i = getelementptr inbounds %struct.malloc_segment* %sp.0109.i, i32 0, i32 3
+ %203 = load i32* %sflags190.i, align 4, !tbaa !3
+ %and191.i = and i32 %203, 8
+ %tobool192.i = icmp eq i32 %and191.i, 0
+ br i1 %tobool192.i, label %land.lhs.true197.i, label %if.else213.i169
+
+land.lhs.true197.i: ; preds = %land.lhs.true189.i
+ %204 = bitcast %struct.malloc_chunk* %188 to i8*
+ %cmp200.i = icmp uge i8* %204, %200
+ %cmp206.i = icmp ult i8* %204, %tbase.291.i
+ %or.cond93.i = and i1 %cmp200.i, %cmp206.i
+ br i1 %or.cond93.i, label %if.then207.i, label %if.else213.i169
+
+if.then207.i: ; preds = %land.lhs.true197.i
+ %add209.i = add i32 %201, %tsize.290.i
+ store i32 %add209.i, i32* %size185.i, align 4, !tbaa !3
+ %205 = load i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 3), align 4, !tbaa !3
+ %add212.i = add i32 %205, %tsize.290.i
+ %add.ptr.i22.i = getelementptr inbounds %struct.malloc_chunk* %188, i32 0, i32 2
+ %206 = ptrtoint %struct.malloc_chunk** %add.ptr.i22.i to i32
+ %and.i23.i = and i32 %206, 7
+ %cmp.i24.i = icmp eq i32 %and.i23.i, 0
+ br i1 %cmp.i24.i, label %init_top.exit36.i, label %cond.false.i26.i
+
+cond.false.i26.i: ; preds = %if.then207.i
+ %207 = sub i32 0, %206
+ %and3.i25.i = and i32 %207, 7
+ br label %init_top.exit36.i
+
+init_top.exit36.i: ; preds = %cond.false.i26.i, %if.then207.i
+ %cond.i27.i = phi i32 [ %and3.i25.i, %cond.false.i26.i ], [ 0, %if.then207.i ]
+ %add.ptr4.i28.i = getelementptr inbounds i8* %204, i32 %cond.i27.i
+ %208 = bitcast i8* %add.ptr4.i28.i to %struct.malloc_chunk*
+ %sub5.i29.i = sub i32 %add212.i, %cond.i27.i
+ store %struct.malloc_chunk* %208, %struct.malloc_chunk** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 6), align 4, !tbaa !0
+ store i32 %sub5.i29.i, i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 3), align 4, !tbaa !3
+ %or.i30.i = or i32 %sub5.i29.i, 1
+ %add.ptr4.sum.i31.i = add i32 %cond.i27.i, 4
+ %head.i32.i = getelementptr inbounds i8* %204, i32 %add.ptr4.sum.i31.i
+ %209 = bitcast i8* %head.i32.i to i32*
+ store i32 %or.i30.i, i32* %209, align 4, !tbaa !3
+ %add.ptr6.sum.i33.i = add i32 %add212.i, 4
+ %head7.i34.i = getelementptr inbounds i8* %204, i32 %add.ptr6.sum.i33.i
+ %210 = bitcast i8* %head7.i34.i to i32*
+ store i32 40, i32* %210, align 4, !tbaa !3
+ %211 = load i32* getelementptr inbounds (%struct.malloc_params* @mparams, i32 0, i32 4), align 4, !tbaa !3
+ store i32 %211, i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 7), align 4, !tbaa !3
+ br label %if.end248.i
+
+if.else213.i169: ; preds = %land.lhs.true197.i, %land.lhs.true189.i, %while.body.i168
+ %212 = load i8** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 4), align 4, !tbaa !0
+ %cmp215.i = icmp ult i8* %tbase.291.i, %212
+ br i1 %cmp215.i, label %if.then216.i, label %while.cond220.preheader.i
+
+if.then216.i: ; preds = %if.else213.i169
+ store i8* %tbase.291.i, i8** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 4), align 4, !tbaa !0
+ br label %while.cond220.preheader.i
+
+while.cond220.preheader.i: ; preds = %if.then216.i, %if.else213.i169
+ %add.ptr224.i = getelementptr inbounds i8* %tbase.291.i, i32 %tsize.290.i
+ br label %land.rhs222.i
+
+land.rhs222.i: ; preds = %while.body227.i, %while.cond220.preheader.i
+ %sp.1105.i = phi %struct.malloc_segment* [ getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 16), %while.cond220.preheader.i ], [ %214, %while.body227.i ]
+ %base223.i = getelementptr inbounds %struct.malloc_segment* %sp.1105.i, i32 0, i32 0
+ %213 = load i8** %base223.i, align 4, !tbaa !0
+ %cmp225.i = icmp eq i8* %213, %add.ptr224.i
+ br i1 %cmp225.i, label %land.lhs.true231.i, label %while.body227.i
+
+while.body227.i: ; preds = %land.rhs222.i
+ %next228.i = getelementptr inbounds %struct.malloc_segment* %sp.1105.i, i32 0, i32 2
+ %214 = load %struct.malloc_segment** %next228.i, align 4, !tbaa !0
+ %cmp221.i = icmp eq %struct.malloc_segment* %214, null
+ br i1 %cmp221.i, label %if.else245.i, label %land.rhs222.i
+
+land.lhs.true231.i: ; preds = %land.rhs222.i
+ %sflags232.i = getelementptr inbounds %struct.malloc_segment* %sp.1105.i, i32 0, i32 3
+ %215 = load i32* %sflags232.i, align 4, !tbaa !3
+ %and233.i = and i32 %215, 8
+ %tobool234.i = icmp eq i32 %and233.i, 0
+ br i1 %tobool234.i, label %if.then239.i, label %if.else245.i
+
+if.then239.i: ; preds = %land.lhs.true231.i
+ store i8* %tbase.291.i, i8** %base223.i, align 4, !tbaa !0
+ %size242.i = getelementptr inbounds %struct.malloc_segment* %sp.1105.i, i32 0, i32 1
+ %216 = load i32* %size242.i, align 4, !tbaa !3
+ %add243.i = add i32 %216, %tsize.290.i
+ store i32 %add243.i, i32* %size242.i, align 4, !tbaa !3
+ %add.ptr.i37.i = getelementptr inbounds i8* %tbase.291.i, i32 8
+ %217 = ptrtoint i8* %add.ptr.i37.i to i32
+ %and.i38.i = and i32 %217, 7
+ %cmp.i39.i = icmp eq i32 %and.i38.i, 0
+ br i1 %cmp.i39.i, label %cond.end.i45.i, label %cond.false.i41.i
+
+cond.false.i41.i: ; preds = %if.then239.i
+ %218 = sub i32 0, %217
+ %and3.i40.i = and i32 %218, 7
+ br label %cond.end.i45.i
+
+cond.end.i45.i: ; preds = %cond.false.i41.i, %if.then239.i
+ %cond.i42.i = phi i32 [ %and3.i40.i, %cond.false.i41.i ], [ 0, %if.then239.i ]
+ %add.ptr4.i43.i = getelementptr inbounds i8* %tbase.291.i, i32 %cond.i42.i
+ %add.ptr224.sum.i = add i32 %tsize.290.i, 8
+ %add.ptr5.i.i = getelementptr inbounds i8* %tbase.291.i, i32 %add.ptr224.sum.i
+ %219 = ptrtoint i8* %add.ptr5.i.i to i32
+ %and6.i44.i = and i32 %219, 7
+ %cmp7.i.i = icmp eq i32 %and6.i44.i, 0
+ br i1 %cmp7.i.i, label %cond.end14.i.i, label %cond.false9.i.i
+
+cond.false9.i.i: ; preds = %cond.end.i45.i
+ %220 = sub i32 0, %219
+ %and13.i.i = and i32 %220, 7
+ br label %cond.end14.i.i
+
+cond.end14.i.i: ; preds = %cond.false9.i.i, %cond.end.i45.i
+ %cond15.i.i = phi i32 [ %and13.i.i, %cond.false9.i.i ], [ 0, %cond.end.i45.i ]
+ %add.ptr224.sum131.i = add i32 %cond15.i.i, %tsize.290.i
+ %add.ptr16.i.i = getelementptr inbounds i8* %tbase.291.i, i32 %add.ptr224.sum131.i
+ %221 = bitcast i8* %add.ptr16.i.i to %struct.malloc_chunk*
+ %sub.ptr.lhs.cast.i46.i = ptrtoint i8* %add.ptr16.i.i to i32
+ %sub.ptr.rhs.cast.i47.i = ptrtoint i8* %add.ptr4.i43.i to i32
+ %sub.ptr.sub.i48.i = sub i32 %sub.ptr.lhs.cast.i46.i, %sub.ptr.rhs.cast.i47.i
+ %add.ptr4.sum.i49.i = add i32 %cond.i42.i, %nb.0
+ %add.ptr17.i.i = getelementptr inbounds i8* %tbase.291.i, i32 %add.ptr4.sum.i49.i
+ %222 = bitcast i8* %add.ptr17.i.i to %struct.malloc_chunk*
+ %sub18.i.i = sub i32 %sub.ptr.sub.i48.i, %nb.0
+ %or19.i.i = or i32 %nb.0, 3
+ %add.ptr4.sum1.i.i = add i32 %cond.i42.i, 4
+ %head.i50.i = getelementptr inbounds i8* %tbase.291.i, i32 %add.ptr4.sum1.i.i
+ %223 = bitcast i8* %head.i50.i to i32*
+ store i32 %or19.i.i, i32* %223, align 4, !tbaa !3
+ %224 = load %struct.malloc_chunk** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 6), align 4, !tbaa !0
+ %cmp20.i.i = icmp eq %struct.malloc_chunk* %221, %224
+ br i1 %cmp20.i.i, label %if.then.i51.i, label %if.else.i.i
+
+if.then.i51.i: ; preds = %cond.end14.i.i
+ %225 = load i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 3), align 4, !tbaa !3
+ %add.i.i = add i32 %225, %sub18.i.i
+ store i32 %add.i.i, i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 3), align 4, !tbaa !3
+ store %struct.malloc_chunk* %222, %struct.malloc_chunk** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 6), align 4, !tbaa !0
+ %or22.i.i = or i32 %add.i.i, 1
+ %add.ptr17.sum35.i.i = add i32 %add.ptr4.sum.i49.i, 4
+ %head23.i.i = getelementptr inbounds i8* %tbase.291.i, i32 %add.ptr17.sum35.i.i
+ %226 = bitcast i8* %head23.i.i to i32*
+ store i32 %or22.i.i, i32* %226, align 4, !tbaa !3
+ br label %prepend_alloc.exit.i
+
+if.else.i.i: ; preds = %cond.end14.i.i
+ %227 = load %struct.malloc_chunk** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 5), align 4, !tbaa !0
+ %cmp24.i.i = icmp eq %struct.malloc_chunk* %221, %227
+ br i1 %cmp24.i.i, label %if.then25.i.i, label %if.else31.i.i
+
+if.then25.i.i: ; preds = %if.else.i.i
+ %228 = load i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 2), align 4, !tbaa !3
+ %add26.i.i = add i32 %228, %sub18.i.i
+ store i32 %add26.i.i, i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 2), align 4, !tbaa !3
+ store %struct.malloc_chunk* %222, %struct.malloc_chunk** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 5), align 4, !tbaa !0
+ %or28.i.i = or i32 %add26.i.i, 1
+ %add.ptr17.sum33.i.i = add i32 %add.ptr4.sum.i49.i, 4
+ %head29.i.i = getelementptr inbounds i8* %tbase.291.i, i32 %add.ptr17.sum33.i.i
+ %229 = bitcast i8* %head29.i.i to i32*
+ store i32 %or28.i.i, i32* %229, align 4, !tbaa !3
+ %add.ptr17.sum34.i.i = add i32 %add26.i.i, %add.ptr4.sum.i49.i
+ %add.ptr30.i52.i = getelementptr inbounds i8* %tbase.291.i, i32 %add.ptr17.sum34.i.i
+ %prev_foot.i53.i = bitcast i8* %add.ptr30.i52.i to i32*
+ store i32 %add26.i.i, i32* %prev_foot.i53.i, align 4, !tbaa !3
+ br label %prepend_alloc.exit.i
+
+if.else31.i.i: ; preds = %if.else.i.i
+ %add.ptr16.sum.i.i = add i32 %tsize.290.i, 4
+ %add.ptr224.sum132.i = add i32 %add.ptr16.sum.i.i, %cond15.i.i
+ %head32.i.i = getelementptr inbounds i8* %tbase.291.i, i32 %add.ptr224.sum132.i
+ %230 = bitcast i8* %head32.i.i to i32*
+ %231 = load i32* %230, align 4, !tbaa !3
+ %and33.i.i = and i32 %231, 3
+ %cmp34.i.i = icmp eq i32 %and33.i.i, 1
+ br i1 %cmp34.i.i, label %if.then35.i.i, label %if.end207.i.i
+
+if.then35.i.i: ; preds = %if.else31.i.i
+ %and37.i.i = and i32 %231, -8
+ %shr.i54.i = lshr i32 %231, 3
+ %cmp38.i.i = icmp ult i32 %231, 256
+ br i1 %cmp38.i.i, label %if.then39.i.i, label %if.else73.i.i
+
+if.then39.i.i: ; preds = %if.then35.i.i
+ %add.ptr16.sum3031.i.i = or i32 %cond15.i.i, 8
+ %add.ptr224.sum142.i = add i32 %add.ptr16.sum3031.i.i, %tsize.290.i
+ %fd.i.i = getelementptr inbounds i8* %tbase.291.i, i32 %add.ptr224.sum142.i
+ %232 = bitcast i8* %fd.i.i to %struct.malloc_chunk**
+ %233 = load %struct.malloc_chunk** %232, align 4, !tbaa !0
+ %add.ptr16.sum32.i.i = add i32 %tsize.290.i, 12
+ %add.ptr224.sum143.i = add i32 %add.ptr16.sum32.i.i, %cond15.i.i
+ %bk.i55.i = getelementptr inbounds i8* %tbase.291.i, i32 %add.ptr224.sum143.i
+ %234 = bitcast i8* %bk.i55.i to %struct.malloc_chunk**
+ %235 = load %struct.malloc_chunk** %234, align 4, !tbaa !0
+ %shl.i56.i = shl nuw nsw i32 %shr.i54.i, 1
+ %arrayidx.i57.i = getelementptr inbounds %struct.malloc_state* @_gm_, i32 0, i32 10, i32 %shl.i56.i
+ %236 = bitcast %struct.malloc_chunk** %arrayidx.i57.i to %struct.malloc_chunk*
+ %cmp41.i.i = icmp eq %struct.malloc_chunk* %233, %236
+ br i1 %cmp41.i.i, label %if.then45.i.i, label %lor.rhs.i.i
+
+lor.rhs.i.i: ; preds = %if.then39.i.i
+ %237 = bitcast %struct.malloc_chunk* %233 to i8*
+ %238 = load i8** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 4), align 4, !tbaa !0
+ %cmp42.i.i = icmp ult i8* %237, %238
+ br i1 %cmp42.i.i, label %if.else71.i.i, label %land.rhs.i58.i
+
+land.rhs.i58.i: ; preds = %lor.rhs.i.i
+ %bk43.i.i = getelementptr inbounds %struct.malloc_chunk* %233, i32 0, i32 3
+ %239 = load %struct.malloc_chunk** %bk43.i.i, align 4, !tbaa !0
+ %cmp44.i.i = icmp eq %struct.malloc_chunk* %239, %221
+ br i1 %cmp44.i.i, label %if.then45.i.i, label %if.else71.i.i, !prof !5
+
+if.then45.i.i: ; preds = %land.rhs.i58.i, %if.then39.i.i
+ %cmp46.i59.i = icmp eq %struct.malloc_chunk* %235, %233
+ br i1 %cmp46.i59.i, label %if.then47.i.i, label %if.else50.i60.i
+
+if.then47.i.i: ; preds = %if.then45.i.i
+ %shl48.i.i = shl i32 1, %shr.i54.i
+ %neg.i.i = xor i32 %shl48.i.i, -1
+ %240 = load i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 0), align 4, !tbaa !3
+ %and49.i.i = and i32 %240, %neg.i.i
+ store i32 %and49.i.i, i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 0), align 4, !tbaa !3
+ br label %if.end204.i.i
+
+if.else50.i60.i: ; preds = %if.then45.i.i
+ %cmp54.i.i = icmp eq %struct.malloc_chunk* %235, %236
+ br i1 %cmp54.i.i, label %if.else50.if.then66_crit_edge.i.i, label %lor.rhs55.i.i
+
+if.else50.if.then66_crit_edge.i.i: ; preds = %if.else50.i60.i
+ %fd68.pre.i.i = getelementptr inbounds %struct.malloc_chunk* %235, i32 0, i32 2
+ br label %if.then66.i.i
+
+lor.rhs55.i.i: ; preds = %if.else50.i60.i
+ %241 = bitcast %struct.malloc_chunk* %235 to i8*
+ %242 = load i8** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 4), align 4, !tbaa !0
+ %cmp57.i.i = icmp ult i8* %241, %242
+ br i1 %cmp57.i.i, label %if.else69.i.i, label %land.rhs58.i.i
+
+land.rhs58.i.i: ; preds = %lor.rhs55.i.i
+ %fd59.i.i = getelementptr inbounds %struct.malloc_chunk* %235, i32 0, i32 2
+ %243 = load %struct.malloc_chunk** %fd59.i.i, align 4, !tbaa !0
+ %cmp60.i.i = icmp eq %struct.malloc_chunk* %243, %221
+ br i1 %cmp60.i.i, label %if.then66.i.i, label %if.else69.i.i, !prof !5
+
+if.then66.i.i: ; preds = %land.rhs58.i.i, %if.else50.if.then66_crit_edge.i.i
+ %fd68.pre-phi.i.i = phi %struct.malloc_chunk** [ %fd68.pre.i.i, %if.else50.if.then66_crit_edge.i.i ], [ %fd59.i.i, %land.rhs58.i.i ]
+ %bk67.i.i = getelementptr inbounds %struct.malloc_chunk* %233, i32 0, i32 3
+ store %struct.malloc_chunk* %235, %struct.malloc_chunk** %bk67.i.i, align 4, !tbaa !0
+ store %struct.malloc_chunk* %233, %struct.malloc_chunk** %fd68.pre-phi.i.i, align 4, !tbaa !0
+ br label %if.end204.i.i
+
+if.else69.i.i: ; preds = %land.rhs58.i.i, %lor.rhs55.i.i
+ tail call void @abort() #6
+ unreachable
+
+if.else71.i.i: ; preds = %land.rhs.i58.i, %lor.rhs.i.i
+ tail call void @abort() #6
+ unreachable
+
+if.else73.i.i: ; preds = %if.then35.i.i
+ %244 = bitcast i8* %add.ptr16.i.i to %struct.malloc_tree_chunk*
+ %add.ptr16.sum23.i.i = or i32 %cond15.i.i, 24
+ %add.ptr224.sum133.i = add i32 %add.ptr16.sum23.i.i, %tsize.290.i
+ %parent.i61.i = getelementptr inbounds i8* %tbase.291.i, i32 %add.ptr224.sum133.i
+ %245 = bitcast i8* %parent.i61.i to %struct.malloc_tree_chunk**
+ %246 = load %struct.malloc_tree_chunk** %245, align 4, !tbaa !0
+ %add.ptr16.sum4.i.i = add i32 %tsize.290.i, 12
+ %add.ptr224.sum134.i = add i32 %add.ptr16.sum4.i.i, %cond15.i.i
+ %bk74.i.i = getelementptr inbounds i8* %tbase.291.i, i32 %add.ptr224.sum134.i
+ %247 = bitcast i8* %bk74.i.i to %struct.malloc_tree_chunk**
+ %248 = load %struct.malloc_tree_chunk** %247, align 4, !tbaa !0
+ %cmp75.i.i = icmp eq %struct.malloc_tree_chunk* %248, %244
+ br i1 %cmp75.i.i, label %if.else95.i.i, label %if.then76.i.i
+
+if.then76.i.i: ; preds = %if.else73.i.i
+ %add.ptr16.sum2829.i.i = or i32 %cond15.i.i, 8
+ %add.ptr224.sum135.i = add i32 %add.ptr16.sum2829.i.i, %tsize.290.i
+ %fd78.i.i = getelementptr inbounds i8* %tbase.291.i, i32 %add.ptr224.sum135.i
+ %249 = bitcast i8* %fd78.i.i to %struct.malloc_tree_chunk**
+ %250 = load %struct.malloc_tree_chunk** %249, align 4, !tbaa !0
+ %251 = bitcast %struct.malloc_tree_chunk* %250 to i8*
+ %252 = load i8** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 4), align 4, !tbaa !0
+ %cmp81.i.i = icmp ult i8* %251, %252
+ br i1 %cmp81.i.i, label %if.else93.i.i, label %land.lhs.true.i62.i
+
+land.lhs.true.i62.i: ; preds = %if.then76.i.i
+ %bk82.i.i = getelementptr inbounds %struct.malloc_tree_chunk* %250, i32 0, i32 3
+ %253 = load %struct.malloc_tree_chunk** %bk82.i.i, align 4, !tbaa !0
+ %cmp83.i.i = icmp eq %struct.malloc_tree_chunk* %253, %244
+ br i1 %cmp83.i.i, label %land.rhs84.i.i, label %if.else93.i.i
+
+land.rhs84.i.i: ; preds = %land.lhs.true.i62.i
+ %fd85.i.i = getelementptr inbounds %struct.malloc_tree_chunk* %248, i32 0, i32 2
+ %254 = load %struct.malloc_tree_chunk** %fd85.i.i, align 4, !tbaa !0
+ %cmp86.i.i = icmp eq %struct.malloc_tree_chunk* %254, %244
+ br i1 %cmp86.i.i, label %if.then90.i.i, label %if.else93.i.i, !prof !5
+
+if.then90.i.i: ; preds = %land.rhs84.i.i
+ store %struct.malloc_tree_chunk* %248, %struct.malloc_tree_chunk** %bk82.i.i, align 4, !tbaa !0
+ store %struct.malloc_tree_chunk* %250, %struct.malloc_tree_chunk** %fd85.i.i, align 4, !tbaa !0
+ br label %if.end119.i.i
+
+if.else93.i.i: ; preds = %land.rhs84.i.i, %land.lhs.true.i62.i, %if.then76.i.i
+ tail call void @abort() #6
+ unreachable
+
+if.else95.i.i: ; preds = %if.else73.i.i
+ %add.ptr16.sum56.i.i = or i32 %cond15.i.i, 16
+ %add.ptr224.sum140.i = add i32 %add.ptr16.sum.i.i, %add.ptr16.sum56.i.i
+ %arrayidx96.i.i = getelementptr inbounds i8* %tbase.291.i, i32 %add.ptr224.sum140.i
+ %255 = bitcast i8* %arrayidx96.i.i to %struct.malloc_tree_chunk**
+ %256 = load %struct.malloc_tree_chunk** %255, align 4, !tbaa !0
+ %cmp97.i.i = icmp eq %struct.malloc_tree_chunk* %256, null
+ br i1 %cmp97.i.i, label %lor.lhs.false.i.i, label %while.cond.i.i
+
+lor.lhs.false.i.i: ; preds = %if.else95.i.i
+ %add.ptr224.sum141.i = add i32 %add.ptr16.sum56.i.i, %tsize.290.i
+ %child.i.i = getelementptr inbounds i8* %tbase.291.i, i32 %add.ptr224.sum141.i
+ %arrayidx99.i.i = bitcast i8* %child.i.i to %struct.malloc_tree_chunk**
+ %257 = load %struct.malloc_tree_chunk** %arrayidx99.i.i, align 4, !tbaa !0
+ %cmp100.i.i = icmp eq %struct.malloc_tree_chunk* %257, null
+ br i1 %cmp100.i.i, label %if.end119.i.i, label %while.cond.i.i
+
+while.cond.i.i: ; preds = %lor.rhs105.i.i, %while.cond.i.i, %lor.lhs.false.i.i, %if.else95.i.i
+ %RP.0.i.i = phi %struct.malloc_tree_chunk** [ %arrayidx99.i.i, %lor.lhs.false.i.i ], [ %255, %if.else95.i.i ], [ %arrayidx103.i.i, %while.cond.i.i ], [ %arrayidx107.i.i, %lor.rhs105.i.i ]
+ %R.0.i.i = phi %struct.malloc_tree_chunk* [ %257, %lor.lhs.false.i.i ], [ %256, %if.else95.i.i ], [ %258, %while.cond.i.i ], [ %259, %lor.rhs105.i.i ]
+ %arrayidx103.i.i = getelementptr inbounds %struct.malloc_tree_chunk* %R.0.i.i, i32 0, i32 4, i32 1
+ %258 = load %struct.malloc_tree_chunk** %arrayidx103.i.i, align 4, !tbaa !0
+ %cmp104.i.i = icmp eq %struct.malloc_tree_chunk* %258, null
+ br i1 %cmp104.i.i, label %lor.rhs105.i.i, label %while.cond.i.i
+
+lor.rhs105.i.i: ; preds = %while.cond.i.i
+ %arrayidx107.i.i = getelementptr inbounds %struct.malloc_tree_chunk* %R.0.i.i, i32 0, i32 4, i32 0
+ %259 = load %struct.malloc_tree_chunk** %arrayidx107.i.i, align 4, !tbaa !0
+ %cmp108.i.i = icmp eq %struct.malloc_tree_chunk* %259, null
+ br i1 %cmp108.i.i, label %while.end.i.i, label %while.cond.i.i
+
+while.end.i.i: ; preds = %lor.rhs105.i.i
+ %260 = bitcast %struct.malloc_tree_chunk** %RP.0.i.i to i8*
+ %261 = load i8** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 4), align 4, !tbaa !0
+ %cmp112.i.i = icmp ult i8* %260, %261
+ br i1 %cmp112.i.i, label %if.else116.i.i, label %if.then115.i.i, !prof !6
+
+if.then115.i.i: ; preds = %while.end.i.i
+ store %struct.malloc_tree_chunk* null, %struct.malloc_tree_chunk** %RP.0.i.i, align 4, !tbaa !0
+ br label %if.end119.i.i
+
+if.else116.i.i: ; preds = %while.end.i.i
+ tail call void @abort() #6
+ unreachable
+
+if.end119.i.i: ; preds = %if.then115.i.i, %lor.lhs.false.i.i, %if.then90.i.i
+ %R.1.i.i = phi %struct.malloc_tree_chunk* [ %248, %if.then90.i.i ], [ %R.0.i.i, %if.then115.i.i ], [ null, %lor.lhs.false.i.i ]
+ %cmp120.i63.i = icmp eq %struct.malloc_tree_chunk* %246, null
+ br i1 %cmp120.i63.i, label %if.end204.i.i, label %if.then122.i65.i
+
+if.then122.i65.i: ; preds = %if.end119.i.i
+ %add.ptr16.sum25.i.i = add i32 %tsize.290.i, 28
+ %add.ptr224.sum136.i = add i32 %add.ptr16.sum25.i.i, %cond15.i.i
+ %index.i64.i = getelementptr inbounds i8* %tbase.291.i, i32 %add.ptr224.sum136.i
+ %262 = bitcast i8* %index.i64.i to i32*
+ %263 = load i32* %262, align 4, !tbaa !3
+ %arrayidx123.i.i = getelementptr inbounds %struct.malloc_state* @_gm_, i32 0, i32 11, i32 %263
+ %264 = load %struct.malloc_tree_chunk** %arrayidx123.i.i, align 4, !tbaa !0
+ %cmp124.i.i = icmp eq %struct.malloc_tree_chunk* %244, %264
+ br i1 %cmp124.i.i, label %if.then126.i.i, label %if.else135.i.i
+
+if.then126.i.i: ; preds = %if.then122.i65.i
+ store %struct.malloc_tree_chunk* %R.1.i.i, %struct.malloc_tree_chunk** %arrayidx123.i.i, align 4, !tbaa !0
+ %cond37.i.i = icmp eq %struct.malloc_tree_chunk* %R.1.i.i, null
+ br i1 %cond37.i.i, label %if.end155.thread.i.i, label %if.then158.i.i
+
+if.end155.thread.i.i: ; preds = %if.then126.i.i
+ %shl131.i.i = shl i32 1, %263
+ %neg132.i.i = xor i32 %shl131.i.i, -1
+ %265 = load i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 1), align 4, !tbaa !3
+ %and133.i.i = and i32 %265, %neg132.i.i
+ store i32 %and133.i.i, i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 1), align 4, !tbaa !3
+ br label %if.end204.i.i
+
+if.else135.i.i: ; preds = %if.then122.i65.i
+ %266 = bitcast %struct.malloc_tree_chunk* %246 to i8*
+ %267 = load i8** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 4), align 4, !tbaa !0
+ %cmp137.i.i = icmp ult i8* %266, %267
+ br i1 %cmp137.i.i, label %if.else153.i.i, label %if.then141.i.i, !prof !6
+
+if.then141.i.i: ; preds = %if.else135.i.i
+ %arrayidx143.i.i = getelementptr inbounds %struct.malloc_tree_chunk* %246, i32 0, i32 4, i32 0
+ %268 = load %struct.malloc_tree_chunk** %arrayidx143.i.i, align 4, !tbaa !0
+ %cmp144.i.i = icmp eq %struct.malloc_tree_chunk* %268, %244
+ br i1 %cmp144.i.i, label %if.then146.i.i, label %if.else149.i.i
+
+if.then146.i.i: ; preds = %if.then141.i.i
+ store %struct.malloc_tree_chunk* %R.1.i.i, %struct.malloc_tree_chunk** %arrayidx143.i.i, align 4, !tbaa !0
+ br label %if.end155.i.i
+
+if.else149.i.i: ; preds = %if.then141.i.i
+ %arrayidx151.i.i = getelementptr inbounds %struct.malloc_tree_chunk* %246, i32 0, i32 4, i32 1
+ store %struct.malloc_tree_chunk* %R.1.i.i, %struct.malloc_tree_chunk** %arrayidx151.i.i, align 4, !tbaa !0
+ br label %if.end155.i.i
+
+if.else153.i.i: ; preds = %if.else135.i.i
+ tail call void @abort() #6
+ unreachable
+
+if.end155.i.i: ; preds = %if.else149.i.i, %if.then146.i.i
+ %cmp156.i.i = icmp eq %struct.malloc_tree_chunk* %R.1.i.i, null
+ br i1 %cmp156.i.i, label %if.end204.i.i, label %if.then158.i.i
+
+if.then158.i.i: ; preds = %if.end155.i.i, %if.then126.i.i
+ %269 = bitcast %struct.malloc_tree_chunk* %R.1.i.i to i8*
+ %270 = load i8** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 4), align 4, !tbaa !0
+ %cmp160.i.i = icmp ult i8* %269, %270
+ br i1 %cmp160.i.i, label %if.else200.i.i, label %if.then164.i.i, !prof !6
+
+if.then164.i.i: ; preds = %if.then158.i.i
+ %parent165.i.i = getelementptr inbounds %struct.malloc_tree_chunk* %R.1.i.i, i32 0, i32 5
+ store %struct.malloc_tree_chunk* %246, %struct.malloc_tree_chunk** %parent165.i.i, align 4, !tbaa !0
+ %add.ptr16.sum2627.i.i = or i32 %cond15.i.i, 16
+ %add.ptr224.sum137.i = add i32 %add.ptr16.sum2627.i.i, %tsize.290.i
+ %child166.i.i = getelementptr inbounds i8* %tbase.291.i, i32 %add.ptr224.sum137.i
+ %arrayidx167.i.i = bitcast i8* %child166.i.i to %struct.malloc_tree_chunk**
+ %271 = load %struct.malloc_tree_chunk** %arrayidx167.i.i, align 4, !tbaa !0
+ %cmp168.i.i = icmp eq %struct.malloc_tree_chunk* %271, null
+ br i1 %cmp168.i.i, label %if.end182.i.i, label %if.then170.i.i
+
+if.then170.i.i: ; preds = %if.then164.i.i
+ %272 = bitcast %struct.malloc_tree_chunk* %271 to i8*
+ %273 = load i8** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 4), align 4, !tbaa !0
+ %cmp172.i.i = icmp ult i8* %272, %273
+ br i1 %cmp172.i.i, label %if.else180.i.i, label %if.then176.i.i, !prof !6
+
+if.then176.i.i: ; preds = %if.then170.i.i
+ %arrayidx178.i.i = getelementptr inbounds %struct.malloc_tree_chunk* %R.1.i.i, i32 0, i32 4, i32 0
+ store %struct.malloc_tree_chunk* %271, %struct.malloc_tree_chunk** %arrayidx178.i.i, align 4, !tbaa !0
+ %parent179.i.i = getelementptr inbounds %struct.malloc_tree_chunk* %271, i32 0, i32 5
+ store %struct.malloc_tree_chunk* %R.1.i.i, %struct.malloc_tree_chunk** %parent179.i.i, align 4, !tbaa !0
+ br label %if.end182.i.i
+
+if.else180.i.i: ; preds = %if.then170.i.i
+ tail call void @abort() #6
+ unreachable
+
+if.end182.i.i: ; preds = %if.then176.i.i, %if.then164.i.i
+ %add.ptr224.sum138.i = add i32 %add.ptr16.sum.i.i, %add.ptr16.sum2627.i.i
+ %arrayidx184.i.i = getelementptr inbounds i8* %tbase.291.i, i32 %add.ptr224.sum138.i
+ %274 = bitcast i8* %arrayidx184.i.i to %struct.malloc_tree_chunk**
+ %275 = load %struct.malloc_tree_chunk** %274, align 4, !tbaa !0
+ %cmp185.i.i = icmp eq %struct.malloc_tree_chunk* %275, null
+ br i1 %cmp185.i.i, label %if.end204.i.i, label %if.then187.i.i
+
+if.then187.i.i: ; preds = %if.end182.i.i
+ %276 = bitcast %struct.malloc_tree_chunk* %275 to i8*
+ %277 = load i8** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 4), align 4, !tbaa !0
+ %cmp189.i.i = icmp ult i8* %276, %277
+ br i1 %cmp189.i.i, label %if.else197.i.i, label %if.then193.i.i, !prof !6
+
+if.then193.i.i: ; preds = %if.then187.i.i
+ %arrayidx195.i.i = getelementptr inbounds %struct.malloc_tree_chunk* %R.1.i.i, i32 0, i32 4, i32 1
+ store %struct.malloc_tree_chunk* %275, %struct.malloc_tree_chunk** %arrayidx195.i.i, align 4, !tbaa !0
+ %parent196.i.i = getelementptr inbounds %struct.malloc_tree_chunk* %275, i32 0, i32 5
+ store %struct.malloc_tree_chunk* %R.1.i.i, %struct.malloc_tree_chunk** %parent196.i.i, align 4, !tbaa !0
+ br label %if.end204.i.i
+
+if.else197.i.i: ; preds = %if.then187.i.i
+ tail call void @abort() #6
+ unreachable
+
+if.else200.i.i: ; preds = %if.then158.i.i
+ tail call void @abort() #6
+ unreachable
+
+if.end204.i.i: ; preds = %if.then193.i.i, %if.end182.i.i, %if.end155.i.i, %if.end155.thread.i.i, %if.end119.i.i, %if.then66.i.i, %if.then47.i.i
+ %add.ptr16.sum7.i.i = or i32 %and37.i.i, %cond15.i.i
+ %add.ptr224.sum139.i = add i32 %add.ptr16.sum7.i.i, %tsize.290.i
+ %add.ptr205.i.i = getelementptr inbounds i8* %tbase.291.i, i32 %add.ptr224.sum139.i
+ %278 = bitcast i8* %add.ptr205.i.i to %struct.malloc_chunk*
+ %add206.i.i = add i32 %and37.i.i, %sub18.i.i
+ br label %if.end207.i.i
+
+if.end207.i.i: ; preds = %if.end204.i.i, %if.else31.i.i
+ %qsize.0.i.i = phi i32 [ %sub18.i.i, %if.else31.i.i ], [ %add206.i.i, %if.end204.i.i ]
+ %oldfirst.0.i.i = phi %struct.malloc_chunk* [ %221, %if.else31.i.i ], [ %278, %if.end204.i.i ]
+ %head208.i.i = getelementptr inbounds %struct.malloc_chunk* %oldfirst.0.i.i, i32 0, i32 1
+ %279 = load i32* %head208.i.i, align 4, !tbaa !3
+ %and209.i.i = and i32 %279, -2
+ store i32 %and209.i.i, i32* %head208.i.i, align 4, !tbaa !3
+ %or210.i.i = or i32 %qsize.0.i.i, 1
+ %add.ptr17.sum.i.i = add i32 %add.ptr4.sum.i49.i, 4
+ %head211.i.i = getelementptr inbounds i8* %tbase.291.i, i32 %add.ptr17.sum.i.i
+ %280 = bitcast i8* %head211.i.i to i32*
+ store i32 %or210.i.i, i32* %280, align 4, !tbaa !3
+ %add.ptr17.sum8.i.i = add i32 %qsize.0.i.i, %add.ptr4.sum.i49.i
+ %add.ptr212.i.i = getelementptr inbounds i8* %tbase.291.i, i32 %add.ptr17.sum8.i.i
+ %prev_foot213.i.i = bitcast i8* %add.ptr212.i.i to i32*
+ store i32 %qsize.0.i.i, i32* %prev_foot213.i.i, align 4, !tbaa !3
+ %shr214.i.i = lshr i32 %qsize.0.i.i, 3
+ %cmp215.i.i = icmp ult i32 %qsize.0.i.i, 256
+ br i1 %cmp215.i.i, label %if.then217.i.i, label %if.else249.i.i
+
+if.then217.i.i: ; preds = %if.end207.i.i
+ %shl221.i.i = shl nuw nsw i32 %shr214.i.i, 1
+ %arrayidx223.i.i = getelementptr inbounds %struct.malloc_state* @_gm_, i32 0, i32 10, i32 %shl221.i.i
+ %281 = bitcast %struct.malloc_chunk** %arrayidx223.i.i to %struct.malloc_chunk*
+ %282 = load i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 0), align 4, !tbaa !3
+ %shl226.i.i = shl i32 1, %shr214.i.i
+ %and227.i.i = and i32 %282, %shl226.i.i
+ %tobool228.i.i = icmp eq i32 %and227.i.i, 0
+ br i1 %tobool228.i.i, label %if.then229.i.i, label %if.else233.i.i
+
+if.then229.i.i: ; preds = %if.then217.i.i
+ %or232.i.i = or i32 %282, %shl226.i.i
+ store i32 %or232.i.i, i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 0), align 4, !tbaa !3
+ %arrayidx223.sum.pre.i.i = add i32 %shl221.i.i, 2
+ %.pre.i66.i = getelementptr inbounds %struct.malloc_state* @_gm_, i32 0, i32 10, i32 %arrayidx223.sum.pre.i.i
+ br label %if.end244.i.i
+
+if.else233.i.i: ; preds = %if.then217.i.i
+ %arrayidx223.sum24.i.i = add i32 %shl221.i.i, 2
+ %283 = getelementptr inbounds %struct.malloc_state* @_gm_, i32 0, i32 10, i32 %arrayidx223.sum24.i.i
+ %284 = load %struct.malloc_chunk** %283, align 4, !tbaa !0
+ %285 = bitcast %struct.malloc_chunk* %284 to i8*
+ %286 = load i8** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 4), align 4, !tbaa !0
+ %cmp236.i.i = icmp ult i8* %285, %286
+ br i1 %cmp236.i.i, label %if.else242.i.i, label %if.end244.i.i, !prof !6
+
+if.else242.i.i: ; preds = %if.else233.i.i
+ tail call void @abort() #6
+ unreachable
+
+if.end244.i.i: ; preds = %if.else233.i.i, %if.then229.i.i
+ %.pre-phi.i67.i = phi %struct.malloc_chunk** [ %283, %if.else233.i.i ], [ %.pre.i66.i, %if.then229.i.i ]
+ %F224.0.i.i = phi %struct.malloc_chunk* [ %284, %if.else233.i.i ], [ %281, %if.then229.i.i ]
+ store %struct.malloc_chunk* %222, %struct.malloc_chunk** %.pre-phi.i67.i, align 4, !tbaa !0
+ %bk246.i.i = getelementptr inbounds %struct.malloc_chunk* %F224.0.i.i, i32 0, i32 3
+ store %struct.malloc_chunk* %222, %struct.malloc_chunk** %bk246.i.i, align 4, !tbaa !0
+ %add.ptr17.sum22.i.i = add i32 %add.ptr4.sum.i49.i, 8
+ %fd247.i.i = getelementptr inbounds i8* %tbase.291.i, i32 %add.ptr17.sum22.i.i
+ %287 = bitcast i8* %fd247.i.i to %struct.malloc_chunk**
+ store %struct.malloc_chunk* %F224.0.i.i, %struct.malloc_chunk** %287, align 4, !tbaa !0
+ %add.ptr17.sum23.i.i = add i32 %add.ptr4.sum.i49.i, 12
+ %bk248.i.i = getelementptr inbounds i8* %tbase.291.i, i32 %add.ptr17.sum23.i.i
+ %288 = bitcast i8* %bk248.i.i to %struct.malloc_chunk**
+ store %struct.malloc_chunk* %281, %struct.malloc_chunk** %288, align 4, !tbaa !0
+ br label %prepend_alloc.exit.i
+
+if.else249.i.i: ; preds = %if.end207.i.i
+ %289 = bitcast i8* %add.ptr17.i.i to %struct.malloc_tree_chunk*
+ %shr253.i.i = lshr i32 %qsize.0.i.i, 8
+ %cmp254.i.i = icmp eq i32 %shr253.i.i, 0
+ br i1 %cmp254.i.i, label %if.end285.i.i, label %if.else257.i.i
+
+if.else257.i.i: ; preds = %if.else249.i.i
+ %cmp258.i.i = icmp ugt i32 %qsize.0.i.i, 16777215
+ br i1 %cmp258.i.i, label %if.end285.i.i, label %if.else261.i.i
+
+if.else261.i.i: ; preds = %if.else257.i.i
+ %sub262.i.i = add i32 %shr253.i.i, 1048320
+ %shr263.i.i = lshr i32 %sub262.i.i, 16
+ %and264.i.i = and i32 %shr263.i.i, 8
+ %shl265.i.i = shl i32 %shr253.i.i, %and264.i.i
+ %sub266.i.i = add i32 %shl265.i.i, 520192
+ %shr267.i.i = lshr i32 %sub266.i.i, 16
+ %and268.i.i = and i32 %shr267.i.i, 4
+ %add269.i.i = or i32 %and268.i.i, %and264.i.i
+ %shl270.i.i = shl i32 %shl265.i.i, %and268.i.i
+ %sub271.i.i = add i32 %shl270.i.i, 245760
+ %shr272.i.i = lshr i32 %sub271.i.i, 16
+ %and273.i.i = and i32 %shr272.i.i, 2
+ %add274.i.i = or i32 %add269.i.i, %and273.i.i
+ %sub275.i.i = sub i32 14, %add274.i.i
+ %shl276.i.i = shl i32 %shl270.i.i, %and273.i.i
+ %shr277.i.i = lshr i32 %shl276.i.i, 15
+ %add278.i.i = add i32 %sub275.i.i, %shr277.i.i
+ %shl279.i.i = shl nsw i32 %add278.i.i, 1
+ %add280.i.i = add i32 %add278.i.i, 7
+ %shr281.i.i = lshr i32 %qsize.0.i.i, %add280.i.i
+ %and282.i.i = and i32 %shr281.i.i, 1
+ %add283.i.i = or i32 %and282.i.i, %shl279.i.i
+ br label %if.end285.i.i
+
+if.end285.i.i: ; preds = %if.else261.i.i, %if.else257.i.i, %if.else249.i.i
+ %I252.0.i.i = phi i32 [ %add283.i.i, %if.else261.i.i ], [ 0, %if.else249.i.i ], [ 31, %if.else257.i.i ]
+ %arrayidx287.i.i = getelementptr inbounds %struct.malloc_state* @_gm_, i32 0, i32 11, i32 %I252.0.i.i
+ %add.ptr17.sum9.i.i = add i32 %add.ptr4.sum.i49.i, 28
+ %index288.i.i = getelementptr inbounds i8* %tbase.291.i, i32 %add.ptr17.sum9.i.i
+ %290 = bitcast i8* %index288.i.i to i32*
+ store i32 %I252.0.i.i, i32* %290, align 4, !tbaa !3
+ %add.ptr17.sum10.i.i = add i32 %add.ptr4.sum.i49.i, 16
+ %child289.i.i = getelementptr inbounds i8* %tbase.291.i, i32 %add.ptr17.sum10.i.i
+ %child289.sum.i.i = add i32 %add.ptr4.sum.i49.i, 20
+ %arrayidx290.i.i = getelementptr inbounds i8* %tbase.291.i, i32 %child289.sum.i.i
+ %291 = bitcast i8* %arrayidx290.i.i to %struct.malloc_tree_chunk**
+ store %struct.malloc_tree_chunk* null, %struct.malloc_tree_chunk** %291, align 4, !tbaa !0
+ %arrayidx292.i.i = bitcast i8* %child289.i.i to %struct.malloc_tree_chunk**
+ store %struct.malloc_tree_chunk* null, %struct.malloc_tree_chunk** %arrayidx292.i.i, align 4, !tbaa !0
+ %292 = load i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 1), align 4, !tbaa !3
+ %shl294.i.i = shl i32 1, %I252.0.i.i
+ %and295.i.i = and i32 %292, %shl294.i.i
+ %tobool296.i.i = icmp eq i32 %and295.i.i, 0
+ br i1 %tobool296.i.i, label %if.then297.i.i, label %if.else304.i.i
+
+if.then297.i.i: ; preds = %if.end285.i.i
+ %or300.i.i = or i32 %292, %shl294.i.i
+ store i32 %or300.i.i, i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 1), align 4, !tbaa !3
+ store %struct.malloc_tree_chunk* %289, %struct.malloc_tree_chunk** %arrayidx287.i.i, align 4, !tbaa !0
+ %293 = bitcast %struct.malloc_tree_chunk** %arrayidx287.i.i to %struct.malloc_tree_chunk*
+ %add.ptr17.sum11.i.i = add i32 %add.ptr4.sum.i49.i, 24
+ %parent301.i.i = getelementptr inbounds i8* %tbase.291.i, i32 %add.ptr17.sum11.i.i
+ %294 = bitcast i8* %parent301.i.i to %struct.malloc_tree_chunk**
+ store %struct.malloc_tree_chunk* %293, %struct.malloc_tree_chunk** %294, align 4, !tbaa !0
+ %add.ptr17.sum12.i.i = add i32 %add.ptr4.sum.i49.i, 12
+ %bk302.i.i = getelementptr inbounds i8* %tbase.291.i, i32 %add.ptr17.sum12.i.i
+ %295 = bitcast i8* %bk302.i.i to %struct.malloc_tree_chunk**
+ store %struct.malloc_tree_chunk* %289, %struct.malloc_tree_chunk** %295, align 4, !tbaa !0
+ %add.ptr17.sum13.i.i = add i32 %add.ptr4.sum.i49.i, 8
+ %fd303.i.i = getelementptr inbounds i8* %tbase.291.i, i32 %add.ptr17.sum13.i.i
+ %296 = bitcast i8* %fd303.i.i to %struct.malloc_tree_chunk**
+ store %struct.malloc_tree_chunk* %289, %struct.malloc_tree_chunk** %296, align 4, !tbaa !0
+ br label %prepend_alloc.exit.i
+
+if.else304.i.i: ; preds = %if.end285.i.i
+ %297 = load %struct.malloc_tree_chunk** %arrayidx287.i.i, align 4, !tbaa !0
+ %cmp306.i.i = icmp eq i32 %I252.0.i.i, 31
+ br i1 %cmp306.i.i, label %cond.end314.i.i, label %cond.false309.i.i
+
+cond.false309.i.i: ; preds = %if.else304.i.i
+ %shr310.i.i = lshr i32 %I252.0.i.i, 1
+ %sub313.i.i = sub i32 25, %shr310.i.i
+ br label %cond.end314.i.i
+
+cond.end314.i.i: ; preds = %cond.false309.i.i, %if.else304.i.i
+ %cond315.i.i = phi i32 [ %sub313.i.i, %cond.false309.i.i ], [ 0, %if.else304.i.i ]
+ %head31739.i.i = getelementptr inbounds %struct.malloc_tree_chunk* %297, i32 0, i32 1
+ %298 = load i32* %head31739.i.i, align 4, !tbaa !3
+ %and31840.i.i = and i32 %298, -8
+ %cmp31941.i.i = icmp eq i32 %and31840.i.i, %qsize.0.i.i
+ br i1 %cmp31941.i.i, label %if.else342.i.i, label %if.then321.lr.ph.i.i
+
+if.then321.lr.ph.i.i: ; preds = %cond.end314.i.i
+ %shl316.i.i = shl i32 %qsize.0.i.i, %cond315.i.i
+ br label %if.then321.i.i
+
+for.cond.i68.i: ; preds = %if.then321.i.i
+ %shl326.i.i = shl i32 %K305.043.i.i, 1
+ %head317.i.i = getelementptr inbounds %struct.malloc_tree_chunk* %300, i32 0, i32 1
+ %299 = load i32* %head317.i.i, align 4, !tbaa !3
+ %and318.i.i = and i32 %299, -8
+ %cmp319.i.i = icmp eq i32 %and318.i.i, %qsize.0.i.i
+ br i1 %cmp319.i.i, label %if.else342.i.i, label %if.then321.i.i
+
+if.then321.i.i: ; preds = %for.cond.i68.i, %if.then321.lr.ph.i.i
+ %K305.043.i.i = phi i32 [ %shl316.i.i, %if.then321.lr.ph.i.i ], [ %shl326.i.i, %for.cond.i68.i ]
+ %T.042.i.i = phi %struct.malloc_tree_chunk* [ %297, %if.then321.lr.ph.i.i ], [ %300, %for.cond.i68.i ]
+ %shr322.i.i = lshr i32 %K305.043.i.i, 31
+ %arrayidx325.i.i = getelementptr inbounds %struct.malloc_tree_chunk* %T.042.i.i, i32 0, i32 4, i32 %shr322.i.i
+ %300 = load %struct.malloc_tree_chunk** %arrayidx325.i.i, align 4, !tbaa !0
+ %cmp327.i.i = icmp eq %struct.malloc_tree_chunk* %300, null
+ br i1 %cmp327.i.i, label %if.else330.i.i, label %for.cond.i68.i
+
+if.else330.i.i: ; preds = %if.then321.i.i
+ %301 = bitcast %struct.malloc_tree_chunk** %arrayidx325.i.i to i8*
+ %302 = load i8** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 4), align 4, !tbaa !0
+ %cmp332.i.i = icmp ult i8* %301, %302
+ br i1 %cmp332.i.i, label %if.else340.i.i, label %if.then336.i.i, !prof !6
+
+if.then336.i.i: ; preds = %if.else330.i.i
+ store %struct.malloc_tree_chunk* %289, %struct.malloc_tree_chunk** %arrayidx325.i.i, align 4, !tbaa !0
+ %add.ptr17.sum19.i.i = add i32 %add.ptr4.sum.i49.i, 24
+ %parent337.i.i = getelementptr inbounds i8* %tbase.291.i, i32 %add.ptr17.sum19.i.i
+ %303 = bitcast i8* %parent337.i.i to %struct.malloc_tree_chunk**
+ store %struct.malloc_tree_chunk* %T.042.i.i, %struct.malloc_tree_chunk** %303, align 4, !tbaa !0
+ %add.ptr17.sum20.i.i = add i32 %add.ptr4.sum.i49.i, 12
+ %bk338.i.i = getelementptr inbounds i8* %tbase.291.i, i32 %add.ptr17.sum20.i.i
+ %304 = bitcast i8* %bk338.i.i to %struct.malloc_tree_chunk**
+ store %struct.malloc_tree_chunk* %289, %struct.malloc_tree_chunk** %304, align 4, !tbaa !0
+ %add.ptr17.sum21.i.i = add i32 %add.ptr4.sum.i49.i, 8
+ %fd339.i.i = getelementptr inbounds i8* %tbase.291.i, i32 %add.ptr17.sum21.i.i
+ %305 = bitcast i8* %fd339.i.i to %struct.malloc_tree_chunk**
+ store %struct.malloc_tree_chunk* %289, %struct.malloc_tree_chunk** %305, align 4, !tbaa !0
+ br label %prepend_alloc.exit.i
+
+if.else340.i.i: ; preds = %if.else330.i.i
+ tail call void @abort() #6
+ unreachable
+
+if.else342.i.i: ; preds = %for.cond.i68.i, %cond.end314.i.i
+ %T.0.lcssa.i69.i = phi %struct.malloc_tree_chunk* [ %297, %cond.end314.i.i ], [ %300, %for.cond.i68.i ]
+ %fd344.i.i = getelementptr inbounds %struct.malloc_tree_chunk* %T.0.lcssa.i69.i, i32 0, i32 2
+ %306 = load %struct.malloc_tree_chunk** %fd344.i.i, align 4, !tbaa !0
+ %307 = bitcast %struct.malloc_tree_chunk* %T.0.lcssa.i69.i to i8*
+ %308 = load i8** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 4), align 4, !tbaa !0
+ %cmp346.i.i = icmp ult i8* %307, %308
+ br i1 %cmp346.i.i, label %if.else362.i.i, label %land.rhs348.i.i
+
+land.rhs348.i.i: ; preds = %if.else342.i.i
+ %309 = bitcast %struct.malloc_tree_chunk* %306 to i8*
+ %cmp350.i.i = icmp ult i8* %309, %308
+ br i1 %cmp350.i.i, label %if.else362.i.i, label %if.then356.i.i, !prof !6
+
+if.then356.i.i: ; preds = %land.rhs348.i.i
+ %bk357.i.i = getelementptr inbounds %struct.malloc_tree_chunk* %306, i32 0, i32 3
+ store %struct.malloc_tree_chunk* %289, %struct.malloc_tree_chunk** %bk357.i.i, align 4, !tbaa !0
+ store %struct.malloc_tree_chunk* %289, %struct.malloc_tree_chunk** %fd344.i.i, align 4, !tbaa !0
+ %add.ptr17.sum16.i.i = add i32 %add.ptr4.sum.i49.i, 8
+ %fd359.i.i = getelementptr inbounds i8* %tbase.291.i, i32 %add.ptr17.sum16.i.i
+ %310 = bitcast i8* %fd359.i.i to %struct.malloc_tree_chunk**
+ store %struct.malloc_tree_chunk* %306, %struct.malloc_tree_chunk** %310, align 4, !tbaa !0
+ %add.ptr17.sum17.i.i = add i32 %add.ptr4.sum.i49.i, 12
+ %bk360.i.i = getelementptr inbounds i8* %tbase.291.i, i32 %add.ptr17.sum17.i.i
+ %311 = bitcast i8* %bk360.i.i to %struct.malloc_tree_chunk**
+ store %struct.malloc_tree_chunk* %T.0.lcssa.i69.i, %struct.malloc_tree_chunk** %311, align 4, !tbaa !0
+ %add.ptr17.sum18.i.i = add i32 %add.ptr4.sum.i49.i, 24
+ %parent361.i.i = getelementptr inbounds i8* %tbase.291.i, i32 %add.ptr17.sum18.i.i
+ %312 = bitcast i8* %parent361.i.i to %struct.malloc_tree_chunk**
+ store %struct.malloc_tree_chunk* null, %struct.malloc_tree_chunk** %312, align 4, !tbaa !0
+ br label %prepend_alloc.exit.i
+
+if.else362.i.i: ; preds = %land.rhs348.i.i, %if.else342.i.i
+ tail call void @abort() #6
+ unreachable
+
+prepend_alloc.exit.i: ; preds = %if.then356.i.i, %if.then336.i.i, %if.then297.i.i, %if.end244.i.i, %if.then25.i.i, %if.then.i51.i
+ %add.ptr4.sum1415.i.i = or i32 %cond.i42.i, 8
+ %add.ptr368.i.i = getelementptr inbounds i8* %tbase.291.i, i32 %add.ptr4.sum1415.i.i
+ br label %postaction
+
+if.else245.i: ; preds = %land.lhs.true231.i, %while.body227.i
+ %313 = bitcast %struct.malloc_chunk* %188 to i8*
+ br label %for.cond.i.i.i
+
+for.cond.i.i.i: ; preds = %if.end.i.i.i, %if.else245.i
+ %sp.0.i.i.i = phi %struct.malloc_segment* [ getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 16), %if.else245.i ], [ %316, %if.end.i.i.i ]
+ %base.i.i.i = getelementptr inbounds %struct.malloc_segment* %sp.0.i.i.i, i32 0, i32 0
+ %314 = load i8** %base.i.i.i, align 4, !tbaa !0
+ %cmp.i.i.i = icmp ugt i8* %314, %313
+ br i1 %cmp.i.i.i, label %if.end.i.i.i, label %land.lhs.true.i.i.i
+
+land.lhs.true.i.i.i: ; preds = %for.cond.i.i.i
+ %size.i.i.i = getelementptr inbounds %struct.malloc_segment* %sp.0.i.i.i, i32 0, i32 1
+ %315 = load i32* %size.i.i.i, align 4, !tbaa !3
+ %add.ptr.i.i.i = getelementptr inbounds i8* %314, i32 %315
+ %cmp2.i.i.i = icmp ugt i8* %add.ptr.i.i.i, %313
+ br i1 %cmp2.i.i.i, label %segment_holding.exit.i.i, label %if.end.i.i.i
+
+if.end.i.i.i: ; preds = %land.lhs.true.i.i.i, %for.cond.i.i.i
+ %next.i.i.i = getelementptr inbounds %struct.malloc_segment* %sp.0.i.i.i, i32 0, i32 2
+ %316 = load %struct.malloc_segment** %next.i.i.i, align 4, !tbaa !0
+ br label %for.cond.i.i.i
+
+segment_holding.exit.i.i: ; preds = %land.lhs.true.i.i.i
+ %add.ptr.sum.i.i = add i32 %315, -47
+ %add.ptr2.sum.i.i = add i32 %315, -39
+ %add.ptr3.i.i = getelementptr inbounds i8* %314, i32 %add.ptr2.sum.i.i
+ %317 = ptrtoint i8* %add.ptr3.i.i to i32
+ %and.i14.i = and i32 %317, 7
+ %cmp.i15.i = icmp eq i32 %and.i14.i, 0
+ br i1 %cmp.i15.i, label %cond.end.i.i, label %cond.false.i16.i
+
+cond.false.i16.i: ; preds = %segment_holding.exit.i.i
+ %318 = sub i32 0, %317
+ %and6.i.i = and i32 %318, 7
+ br label %cond.end.i.i
+
+cond.end.i.i: ; preds = %cond.false.i16.i, %segment_holding.exit.i.i
+ %cond.i17.i = phi i32 [ %and6.i.i, %cond.false.i16.i ], [ 0, %segment_holding.exit.i.i ]
+ %add.ptr2.sum1.i.i = add i32 %add.ptr.sum.i.i, %cond.i17.i
+ %add.ptr7.i.i = getelementptr inbounds i8* %314, i32 %add.ptr2.sum1.i.i
+ %add.ptr82.i.i = getelementptr inbounds %struct.malloc_chunk* %188, i32 1
+ %add.ptr8.i.i = bitcast %struct.malloc_chunk* %add.ptr82.i.i to i8*
+ %cmp9.i.i = icmp ult i8* %add.ptr7.i.i, %add.ptr8.i.i
+ %cond13.i.i = select i1 %cmp9.i.i, i8* %313, i8* %add.ptr7.i.i
+ %add.ptr14.i.i = getelementptr inbounds i8* %cond13.i.i, i32 8
+ %319 = bitcast i8* %add.ptr14.i.i to %struct.malloc_segment*
+ %sub16.i.i = add i32 %tsize.290.i, -40
+ %add.ptr.i10.i.i = getelementptr inbounds i8* %tbase.291.i, i32 8
+ %320 = ptrtoint i8* %add.ptr.i10.i.i to i32
+ %and.i.i.i = and i32 %320, 7
+ %cmp.i11.i.i = icmp eq i32 %and.i.i.i, 0
+ br i1 %cmp.i11.i.i, label %init_top.exit.i.i, label %cond.false.i.i.i
+
+cond.false.i.i.i: ; preds = %cond.end.i.i
+ %321 = sub i32 0, %320
+ %and3.i.i.i = and i32 %321, 7
+ br label %init_top.exit.i.i
+
+init_top.exit.i.i: ; preds = %cond.false.i.i.i, %cond.end.i.i
+ %cond.i.i.i = phi i32 [ %and3.i.i.i, %cond.false.i.i.i ], [ 0, %cond.end.i.i ]
+ %add.ptr4.i.i.i = getelementptr inbounds i8* %tbase.291.i, i32 %cond.i.i.i
+ %322 = bitcast i8* %add.ptr4.i.i.i to %struct.malloc_chunk*
+ %sub5.i.i.i = sub i32 %sub16.i.i, %cond.i.i.i
+ store %struct.malloc_chunk* %322, %struct.malloc_chunk** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 6), align 4, !tbaa !0
+ store i32 %sub5.i.i.i, i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 3), align 4, !tbaa !3
+ %or.i.i.i = or i32 %sub5.i.i.i, 1
+ %add.ptr4.sum.i.i.i = add i32 %cond.i.i.i, 4
+ %head.i.i.i = getelementptr inbounds i8* %tbase.291.i, i32 %add.ptr4.sum.i.i.i
+ %323 = bitcast i8* %head.i.i.i to i32*
+ store i32 %or.i.i.i, i32* %323, align 4, !tbaa !3
+ %add.ptr6.sum.i.i.i = add i32 %tsize.290.i, -36
+ %head7.i.i.i = getelementptr inbounds i8* %tbase.291.i, i32 %add.ptr6.sum.i.i.i
+ %324 = bitcast i8* %head7.i.i.i to i32*
+ store i32 40, i32* %324, align 4, !tbaa !3
+ %325 = load i32* getelementptr inbounds (%struct.malloc_params* @mparams, i32 0, i32 4), align 4, !tbaa !3
+ store i32 %325, i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 7), align 4, !tbaa !3
+ %head.i18.i = getelementptr inbounds i8* %cond13.i.i, i32 4
+ %326 = bitcast i8* %head.i18.i to i32*
+ store i32 27, i32* %326, align 4, !tbaa !3
+ tail call void @llvm.memcpy.p0i8.p0i8.i32(i8* %add.ptr14.i.i, i8* bitcast (%struct.malloc_segment* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 16) to i8*), i32 16, i32 4, i1 false) #1, !tbaa.struct !7
+ store i8* %tbase.291.i, i8** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 16, i32 0), align 4, !tbaa !0
+ store i32 %tsize.290.i, i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 16, i32 1), align 4, !tbaa !3
+ store i32 0, i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 16, i32 3), align 4, !tbaa !3
+ store %struct.malloc_segment* %319, %struct.malloc_segment** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 16, i32 2), align 4, !tbaa !0
+ %add.ptr2418.i.i = getelementptr inbounds i8* %cond13.i.i, i32 28
+ %327 = bitcast i8* %add.ptr2418.i.i to i32*
+ store i32 7, i32* %327, align 4, !tbaa !3
+ %328 = getelementptr inbounds i8* %cond13.i.i, i32 32
+ %cmp2719.i.i = icmp ult i8* %328, %add.ptr.i.i.i
+ br i1 %cmp2719.i.i, label %if.then.i19.i, label %for.end.i.i
+
+if.then.i19.i: ; preds = %if.then.i19.i, %init_top.exit.i.i
+ %add.ptr2420.i.i = phi i32* [ %329, %if.then.i19.i ], [ %327, %init_top.exit.i.i ]
+ %329 = getelementptr inbounds i32* %add.ptr2420.i.i, i32 1
+ store i32 7, i32* %329, align 4, !tbaa !3
+ %330 = getelementptr inbounds i32* %add.ptr2420.i.i, i32 2
+ %331 = bitcast i32* %330 to i8*
+ %cmp27.i.i = icmp ult i8* %331, %add.ptr.i.i.i
+ br i1 %cmp27.i.i, label %if.then.i19.i, label %for.end.i.i
+
+for.end.i.i: ; preds = %if.then.i19.i, %init_top.exit.i.i
+ %cmp28.i.i = icmp eq i8* %cond13.i.i, %313
+ br i1 %cmp28.i.i, label %if.end248.i, label %if.then29.i.i
+
+if.then29.i.i: ; preds = %for.end.i.i
+ %sub.ptr.lhs.cast.i.i = ptrtoint i8* %cond13.i.i to i32
+ %sub.ptr.rhs.cast.i.i = ptrtoint %struct.malloc_chunk* %188 to i32
+ %sub.ptr.sub.i.i = sub i32 %sub.ptr.lhs.cast.i.i, %sub.ptr.rhs.cast.i.i
+ %add.ptr30.i.i = getelementptr inbounds i8* %313, i32 %sub.ptr.sub.i.i
+ %add.ptr30.sum.i.i = add i32 %sub.ptr.sub.i.i, 4
+ %head31.i.i = getelementptr inbounds i8* %313, i32 %add.ptr30.sum.i.i
+ %332 = bitcast i8* %head31.i.i to i32*
+ %333 = load i32* %332, align 4, !tbaa !3
+ %and32.i.i = and i32 %333, -2
+ store i32 %and32.i.i, i32* %332, align 4, !tbaa !3
+ %or33.i.i = or i32 %sub.ptr.sub.i.i, 1
+ %head34.i.i = getelementptr inbounds %struct.malloc_chunk* %188, i32 0, i32 1
+ store i32 %or33.i.i, i32* %head34.i.i, align 4, !tbaa !3
+ %prev_foot.i.i = bitcast i8* %add.ptr30.i.i to i32*
+ store i32 %sub.ptr.sub.i.i, i32* %prev_foot.i.i, align 4, !tbaa !3
+ %shr.i.i = lshr i32 %sub.ptr.sub.i.i, 3
+ %cmp36.i.i = icmp ult i32 %sub.ptr.sub.i.i, 256
+ br i1 %cmp36.i.i, label %if.then37.i.i, label %if.else56.i.i
+
+if.then37.i.i: ; preds = %if.then29.i.i
+ %shl.i20.i = shl nuw nsw i32 %shr.i.i, 1
+ %arrayidx.i21.i = getelementptr inbounds %struct.malloc_state* @_gm_, i32 0, i32 10, i32 %shl.i20.i
+ %334 = bitcast %struct.malloc_chunk** %arrayidx.i21.i to %struct.malloc_chunk*
+ %335 = load i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 0), align 4, !tbaa !3
+ %shl39.i.i = shl i32 1, %shr.i.i
+ %and40.i.i = and i32 %335, %shl39.i.i
+ %tobool.i.i = icmp eq i32 %and40.i.i, 0
+ br i1 %tobool.i.i, label %if.then41.i.i, label %if.else45.i.i
+
+if.then41.i.i: ; preds = %if.then37.i.i
+ %or44.i.i = or i32 %335, %shl39.i.i
+ store i32 %or44.i.i, i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 0), align 4, !tbaa !3
+ %arrayidx.sum.pre.i.i = add i32 %shl.i20.i, 2
+ %.pre.i.i = getelementptr inbounds %struct.malloc_state* @_gm_, i32 0, i32 10, i32 %arrayidx.sum.pre.i.i
+ br label %if.end52.i.i
+
+if.else45.i.i: ; preds = %if.then37.i.i
+ %arrayidx.sum9.i.i = add i32 %shl.i20.i, 2
+ %336 = getelementptr inbounds %struct.malloc_state* @_gm_, i32 0, i32 10, i32 %arrayidx.sum9.i.i
+ %337 = load %struct.malloc_chunk** %336, align 4, !tbaa !0
+ %338 = bitcast %struct.malloc_chunk* %337 to i8*
+ %339 = load i8** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 4), align 4, !tbaa !0
+ %cmp46.i.i = icmp ult i8* %338, %339
+ br i1 %cmp46.i.i, label %if.else50.i.i, label %if.end52.i.i, !prof !6
+
+if.else50.i.i: ; preds = %if.else45.i.i
+ tail call void @abort() #6
+ unreachable
+
+if.end52.i.i: ; preds = %if.else45.i.i, %if.then41.i.i
+ %.pre-phi.i.i = phi %struct.malloc_chunk** [ %336, %if.else45.i.i ], [ %.pre.i.i, %if.then41.i.i ]
+ %F.0.i.i = phi %struct.malloc_chunk* [ %337, %if.else45.i.i ], [ %334, %if.then41.i.i ]
+ store %struct.malloc_chunk* %188, %struct.malloc_chunk** %.pre-phi.i.i, align 4, !tbaa !0
+ %bk.i.i = getelementptr inbounds %struct.malloc_chunk* %F.0.i.i, i32 0, i32 3
+ store %struct.malloc_chunk* %188, %struct.malloc_chunk** %bk.i.i, align 4, !tbaa !0
+ %fd54.i.i = getelementptr inbounds %struct.malloc_chunk* %188, i32 0, i32 2
+ store %struct.malloc_chunk* %F.0.i.i, %struct.malloc_chunk** %fd54.i.i, align 4, !tbaa !0
+ %bk55.i.i = getelementptr inbounds %struct.malloc_chunk* %188, i32 0, i32 3
+ store %struct.malloc_chunk* %334, %struct.malloc_chunk** %bk55.i.i, align 4, !tbaa !0
+ br label %if.end248.i
+
+if.else56.i.i: ; preds = %if.then29.i.i
+ %340 = bitcast %struct.malloc_chunk* %188 to %struct.malloc_tree_chunk*
+ %shr58.i.i = lshr i32 %sub.ptr.sub.i.i, 8
+ %cmp59.i.i = icmp eq i32 %shr58.i.i, 0
+ br i1 %cmp59.i.i, label %if.end90.i.i, label %if.else62.i.i
+
+if.else62.i.i: ; preds = %if.else56.i.i
+ %cmp63.i.i = icmp ugt i32 %sub.ptr.sub.i.i, 16777215
+ br i1 %cmp63.i.i, label %if.end90.i.i, label %if.else66.i.i
+
+if.else66.i.i: ; preds = %if.else62.i.i
+ %sub67.i.i = add i32 %shr58.i.i, 1048320
+ %shr68.i.i = lshr i32 %sub67.i.i, 16
+ %and69.i.i = and i32 %shr68.i.i, 8
+ %shl70.i.i = shl i32 %shr58.i.i, %and69.i.i
+ %sub71.i.i = add i32 %shl70.i.i, 520192
+ %shr72.i.i = lshr i32 %sub71.i.i, 16
+ %and73.i.i = and i32 %shr72.i.i, 4
+ %add74.i.i = or i32 %and73.i.i, %and69.i.i
+ %shl75.i.i = shl i32 %shl70.i.i, %and73.i.i
+ %sub76.i.i = add i32 %shl75.i.i, 245760
+ %shr77.i.i = lshr i32 %sub76.i.i, 16
+ %and78.i.i = and i32 %shr77.i.i, 2
+ %add79.i.i = or i32 %add74.i.i, %and78.i.i
+ %sub80.i.i = sub i32 14, %add79.i.i
+ %shl81.i.i = shl i32 %shl75.i.i, %and78.i.i
+ %shr82.i.i = lshr i32 %shl81.i.i, 15
+ %add83.i.i = add i32 %sub80.i.i, %shr82.i.i
+ %shl84.i.i = shl nsw i32 %add83.i.i, 1
+ %add85.i.i = add i32 %add83.i.i, 7
+ %shr86.i.i = lshr i32 %sub.ptr.sub.i.i, %add85.i.i
+ %and87.i.i = and i32 %shr86.i.i, 1
+ %add88.i.i = or i32 %and87.i.i, %shl84.i.i
+ br label %if.end90.i.i
+
+if.end90.i.i: ; preds = %if.else66.i.i, %if.else62.i.i, %if.else56.i.i
+ %I57.0.i.i = phi i32 [ %add88.i.i, %if.else66.i.i ], [ 0, %if.else56.i.i ], [ 31, %if.else62.i.i ]
+ %arrayidx91.i.i = getelementptr inbounds %struct.malloc_state* @_gm_, i32 0, i32 11, i32 %I57.0.i.i
+ %index.i.i = getelementptr inbounds %struct.malloc_chunk* %188, i32 1, i32 3
+ %I57.0.c.i.i = inttoptr i32 %I57.0.i.i to %struct.malloc_chunk*
+ store %struct.malloc_chunk* %I57.0.c.i.i, %struct.malloc_chunk** %index.i.i, align 4, !tbaa !3
+ %arrayidx92.i.i = getelementptr inbounds %struct.malloc_chunk* %188, i32 1, i32 1
+ store i32 0, i32* %arrayidx92.i.i, align 4, !tbaa !0
+ %341 = getelementptr inbounds %struct.malloc_chunk* %188, i32 1, i32 0
+ store i32 0, i32* %341, align 4, !tbaa !0
+ %342 = load i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 1), align 4, !tbaa !3
+ %shl95.i.i = shl i32 1, %I57.0.i.i
+ %and96.i.i = and i32 %342, %shl95.i.i
+ %tobool97.i.i = icmp eq i32 %and96.i.i, 0
+ br i1 %tobool97.i.i, label %if.then98.i.i, label %if.else104.i.i
+
+if.then98.i.i: ; preds = %if.end90.i.i
+ %or101.i.i = or i32 %342, %shl95.i.i
+ store i32 %or101.i.i, i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 1), align 4, !tbaa !3
+ store %struct.malloc_tree_chunk* %340, %struct.malloc_tree_chunk** %arrayidx91.i.i, align 4, !tbaa !0
+ %parent.i.i = getelementptr inbounds %struct.malloc_chunk* %188, i32 1, i32 2
+ %.c.i.i = bitcast %struct.malloc_tree_chunk** %arrayidx91.i.i to %struct.malloc_chunk*
+ store %struct.malloc_chunk* %.c.i.i, %struct.malloc_chunk** %parent.i.i, align 4, !tbaa !0
+ %bk102.i.i = getelementptr inbounds %struct.malloc_chunk* %188, i32 0, i32 3
+ store %struct.malloc_chunk* %188, %struct.malloc_chunk** %bk102.i.i, align 4, !tbaa !0
+ %fd103.i.i = getelementptr inbounds %struct.malloc_chunk* %188, i32 0, i32 2
+ store %struct.malloc_chunk* %188, %struct.malloc_chunk** %fd103.i.i, align 4, !tbaa !0
+ br label %if.end248.i
+
+if.else104.i.i: ; preds = %if.end90.i.i
+ %343 = load %struct.malloc_tree_chunk** %arrayidx91.i.i, align 4, !tbaa !0
+ %cmp106.i.i = icmp eq i32 %I57.0.i.i, 31
+ br i1 %cmp106.i.i, label %cond.end114.i.i, label %cond.false109.i.i
+
+cond.false109.i.i: ; preds = %if.else104.i.i
+ %shr110.i.i = lshr i32 %I57.0.i.i, 1
+ %sub113.i.i = sub i32 25, %shr110.i.i
+ br label %cond.end114.i.i
+
+cond.end114.i.i: ; preds = %cond.false109.i.i, %if.else104.i.i
+ %cond115.i.i = phi i32 [ %sub113.i.i, %cond.false109.i.i ], [ 0, %if.else104.i.i ]
+ %head11813.i.i = getelementptr inbounds %struct.malloc_tree_chunk* %343, i32 0, i32 1
+ %344 = load i32* %head11813.i.i, align 4, !tbaa !3
+ %and11914.i.i = and i32 %344, -8
+ %cmp12015.i.i = icmp eq i32 %and11914.i.i, %sub.ptr.sub.i.i
+ br i1 %cmp12015.i.i, label %if.else143.i.i, label %if.then122.lr.ph.i.i
+
+if.then122.lr.ph.i.i: ; preds = %cond.end114.i.i
+ %shl116.i.i = shl i32 %sub.ptr.sub.i.i, %cond115.i.i
+ br label %if.then122.i.i
+
+for.cond117.i.i: ; preds = %if.then122.i.i
+ %shl127.i.i = shl i32 %K105.017.i.i, 1
+ %head118.i.i = getelementptr inbounds %struct.malloc_tree_chunk* %346, i32 0, i32 1
+ %345 = load i32* %head118.i.i, align 4, !tbaa !3
+ %and119.i.i = and i32 %345, -8
+ %cmp120.i.i = icmp eq i32 %and119.i.i, %sub.ptr.sub.i.i
+ br i1 %cmp120.i.i, label %if.else143.i.i, label %if.then122.i.i
+
+if.then122.i.i: ; preds = %for.cond117.i.i, %if.then122.lr.ph.i.i
+ %K105.017.i.i = phi i32 [ %shl116.i.i, %if.then122.lr.ph.i.i ], [ %shl127.i.i, %for.cond117.i.i ]
+ %T.016.i.i = phi %struct.malloc_tree_chunk* [ %343, %if.then122.lr.ph.i.i ], [ %346, %for.cond117.i.i ]
+ %shr123.i.i = lshr i32 %K105.017.i.i, 31
+ %arrayidx126.i.i = getelementptr inbounds %struct.malloc_tree_chunk* %T.016.i.i, i32 0, i32 4, i32 %shr123.i.i
+ %346 = load %struct.malloc_tree_chunk** %arrayidx126.i.i, align 4, !tbaa !0
+ %cmp128.i.i = icmp eq %struct.malloc_tree_chunk* %346, null
+ br i1 %cmp128.i.i, label %if.else131.i.i, label %for.cond117.i.i
+
+if.else131.i.i: ; preds = %if.then122.i.i
+ %347 = bitcast %struct.malloc_tree_chunk** %arrayidx126.i.i to i8*
+ %348 = load i8** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 4), align 4, !tbaa !0
+ %cmp133.i.i = icmp ult i8* %347, %348
+ br i1 %cmp133.i.i, label %if.else141.i.i, label %if.then137.i.i, !prof !6
+
+if.then137.i.i: ; preds = %if.else131.i.i
+ store %struct.malloc_tree_chunk* %340, %struct.malloc_tree_chunk** %arrayidx126.i.i, align 4, !tbaa !0
+ %parent138.i.i = getelementptr inbounds %struct.malloc_chunk* %188, i32 1, i32 2
+ %T.0.c6.i.i = bitcast %struct.malloc_tree_chunk* %T.016.i.i to %struct.malloc_chunk*
+ store %struct.malloc_chunk* %T.0.c6.i.i, %struct.malloc_chunk** %parent138.i.i, align 4, !tbaa !0
+ %bk139.i.i = getelementptr inbounds %struct.malloc_chunk* %188, i32 0, i32 3
+ store %struct.malloc_chunk* %188, %struct.malloc_chunk** %bk139.i.i, align 4, !tbaa !0
+ %fd140.i.i = getelementptr inbounds %struct.malloc_chunk* %188, i32 0, i32 2
+ store %struct.malloc_chunk* %188, %struct.malloc_chunk** %fd140.i.i, align 4, !tbaa !0
+ br label %if.end248.i
+
+if.else141.i.i: ; preds = %if.else131.i.i
+ tail call void @abort() #6
+ unreachable
+
+if.else143.i.i: ; preds = %for.cond117.i.i, %cond.end114.i.i
+ %T.0.lcssa.i.i = phi %struct.malloc_tree_chunk* [ %343, %cond.end114.i.i ], [ %346, %for.cond117.i.i ]
+ %fd145.i.i = getelementptr inbounds %struct.malloc_tree_chunk* %T.0.lcssa.i.i, i32 0, i32 2
+ %349 = load %struct.malloc_tree_chunk** %fd145.i.i, align 4, !tbaa !0
+ %350 = bitcast %struct.malloc_tree_chunk* %T.0.lcssa.i.i to i8*
+ %351 = load i8** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 4), align 4, !tbaa !0
+ %cmp147.i.i = icmp ult i8* %350, %351
+ br i1 %cmp147.i.i, label %if.else160.i.i, label %land.rhs.i.i
+
+land.rhs.i.i: ; preds = %if.else143.i.i
+ %352 = bitcast %struct.malloc_tree_chunk* %349 to i8*
+ %cmp150.i.i = icmp ult i8* %352, %351
+ br i1 %cmp150.i.i, label %if.else160.i.i, label %if.then154.i.i, !prof !6
+
+if.then154.i.i: ; preds = %land.rhs.i.i
+ %bk155.i.i = getelementptr inbounds %struct.malloc_tree_chunk* %349, i32 0, i32 3
+ store %struct.malloc_tree_chunk* %340, %struct.malloc_tree_chunk** %bk155.i.i, align 4, !tbaa !0
+ store %struct.malloc_tree_chunk* %340, %struct.malloc_tree_chunk** %fd145.i.i, align 4, !tbaa !0
+ %fd157.i.i = getelementptr inbounds %struct.malloc_chunk* %188, i32 0, i32 2
+ %.c5.i.i = bitcast %struct.malloc_tree_chunk* %349 to %struct.malloc_chunk*
+ store %struct.malloc_chunk* %.c5.i.i, %struct.malloc_chunk** %fd157.i.i, align 4, !tbaa !0
+ %bk158.i.i = getelementptr inbounds %struct.malloc_chunk* %188, i32 0, i32 3
+ %T.0.c.i.i = bitcast %struct.malloc_tree_chunk* %T.0.lcssa.i.i to %struct.malloc_chunk*
+ store %struct.malloc_chunk* %T.0.c.i.i, %struct.malloc_chunk** %bk158.i.i, align 4, !tbaa !0
+ %parent159.i.i = getelementptr inbounds %struct.malloc_chunk* %188, i32 1, i32 2
+ store %struct.malloc_chunk* null, %struct.malloc_chunk** %parent159.i.i, align 4, !tbaa !0
+ br label %if.end248.i
+
+if.else160.i.i: ; preds = %land.rhs.i.i, %if.else143.i.i
+ tail call void @abort() #6
+ unreachable
+
+if.end248.i: ; preds = %if.then154.i.i, %if.then137.i.i, %if.then98.i.i, %if.end52.i.i, %for.end.i.i, %init_top.exit36.i, %init_top.exit.i
+ %353 = load i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 3), align 4, !tbaa !3
+ %cmp250.i = icmp ugt i32 %353, %nb.0
+ br i1 %cmp250.i, label %if.then251.i, label %if.end264.i
+
+if.then251.i: ; preds = %if.end248.i
+ %sub253.i = sub i32 %353, %nb.0
+ store i32 %sub253.i, i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 3), align 4, !tbaa !3
+ %354 = load %struct.malloc_chunk** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 6), align 4, !tbaa !0
+ %355 = bitcast %struct.malloc_chunk* %354 to i8*
+ %add.ptr255.i = getelementptr inbounds i8* %355, i32 %nb.0
+ %356 = bitcast i8* %add.ptr255.i to %struct.malloc_chunk*
+ store %struct.malloc_chunk* %356, %struct.malloc_chunk** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 6), align 4, !tbaa !0
+ %or257.i = or i32 %sub253.i, 1
+ %add.ptr255.sum.i = add i32 %nb.0, 4
+ %head258.i = getelementptr inbounds i8* %355, i32 %add.ptr255.sum.i
+ %357 = bitcast i8* %head258.i to i32*
+ store i32 %or257.i, i32* %357, align 4, !tbaa !3
+ %or260.i = or i32 %nb.0, 3
+ %head261.i = getelementptr inbounds %struct.malloc_chunk* %354, i32 0, i32 1
+ store i32 %or260.i, i32* %head261.i, align 4, !tbaa !3
+ %add.ptr262.i = getelementptr inbounds %struct.malloc_chunk* %354, i32 0, i32 2
+ %358 = bitcast %struct.malloc_chunk** %add.ptr262.i to i8*
+ br label %postaction
+
+if.end264.i: ; preds = %if.end248.i, %if.end143.i, %if.then125.i, %if.end121.i
+ %call265.i = tail call i32* @__errno_location() #7
+ store i32 12, i32* %call265.i, align 4, !tbaa !3
+ br label %postaction
+
+postaction: ; preds = %if.end264.i, %if.then251.i, %prepend_alloc.exit.i, %if.then16.i, %if.end8.i, %if.then185, %if.end180, %tmalloc_large.exit, %tmalloc_small.exit, %if.end125, %if.end21
+ %mem.0 = phi i8* [ %11, %if.end21 ], [ %31, %if.end125 ], [ %77, %tmalloc_small.exit ], [ %160, %if.end180 ], [ %166, %if.then185 ], [ %151, %tmalloc_large.exit ], [ %358, %if.then251.i ], [ null, %if.end264.i ], [ %add.ptr368.i.i, %prepend_alloc.exit.i ], [ null, %if.end8.i ], [ null, %if.then16.i ]
+ ret i8* %mem.0
+}
+
+; Function Attrs: noreturn
+declare void @abort() #4
+
+; Function Attrs: nounwind
+define weak void @free(i8* %mem) #0 {
+entry:
+ %cmp = icmp eq i8* %mem, null
+ br i1 %cmp, label %if.end635, label %if.then
+
+if.then: ; preds = %entry
+ %add.ptr = getelementptr inbounds i8* %mem, i32 -8
+ %0 = bitcast i8* %add.ptr to %struct.malloc_chunk*
+ %1 = load i8** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 4), align 4, !tbaa !0
+ %cmp1 = icmp ult i8* %add.ptr, %1
+ br i1 %cmp1, label %erroraction, label %land.rhs
+
+land.rhs: ; preds = %if.then
+ %head = getelementptr inbounds i8* %mem, i32 -4
+ %2 = bitcast i8* %head to i32*
+ %3 = load i32* %2, align 4, !tbaa !3
+ %and = and i32 %3, 3
+ %cmp2 = icmp eq i32 %and, 1
+ br i1 %cmp2, label %erroraction, label %if.then3, !prof !6
+
+if.then3: ; preds = %land.rhs
+ %and5 = and i32 %3, -8
+ %add.ptr.sum = add i32 %and5, -8
+ %add.ptr6 = getelementptr inbounds i8* %mem, i32 %add.ptr.sum
+ %4 = bitcast i8* %add.ptr6 to %struct.malloc_chunk*
+ %and8 = and i32 %3, 1
+ %tobool9 = icmp eq i32 %and8, 0
+ br i1 %tobool9, label %if.then10, label %if.end224
+
+if.then10: ; preds = %if.then3
+ %prev_foot = bitcast i8* %add.ptr to i32*
+ %5 = load i32* %prev_foot, align 4, !tbaa !3
+ %cmp13 = icmp eq i32 %and, 0
+ br i1 %cmp13, label %if.end635, label %if.else
+
+if.else: ; preds = %if.then10
+ %add.ptr.sum230 = sub i32 -8, %5
+ %add.ptr16 = getelementptr inbounds i8* %mem, i32 %add.ptr.sum230
+ %6 = bitcast i8* %add.ptr16 to %struct.malloc_chunk*
+ %add17 = add i32 %5, %and5
+ %cmp18 = icmp ult i8* %add.ptr16, %1
+ br i1 %cmp18, label %erroraction, label %if.then21, !prof !6
+
+if.then21: ; preds = %if.else
+ %7 = load %struct.malloc_chunk** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 5), align 4, !tbaa !0
+ %cmp22 = icmp eq %struct.malloc_chunk* %6, %7
+ br i1 %cmp22, label %if.else208, label %if.then24
+
+if.then24: ; preds = %if.then21
+ %shr = lshr i32 %5, 3
+ %cmp25 = icmp ult i32 %5, 256
+ br i1 %cmp25, label %if.then27, label %if.else72
+
+if.then27: ; preds = %if.then24
+ %add.ptr16.sum257 = add i32 %add.ptr.sum230, 8
+ %fd = getelementptr inbounds i8* %mem, i32 %add.ptr16.sum257
+ %8 = bitcast i8* %fd to %struct.malloc_chunk**
+ %9 = load %struct.malloc_chunk** %8, align 4, !tbaa !0
+ %add.ptr16.sum258 = add i32 %add.ptr.sum230, 12
+ %bk = getelementptr inbounds i8* %mem, i32 %add.ptr16.sum258
+ %10 = bitcast i8* %bk to %struct.malloc_chunk**
+ %11 = load %struct.malloc_chunk** %10, align 4, !tbaa !0
+ %shl = shl nuw nsw i32 %shr, 1
+ %arrayidx = getelementptr inbounds %struct.malloc_state* @_gm_, i32 0, i32 10, i32 %shl
+ %12 = bitcast %struct.malloc_chunk** %arrayidx to %struct.malloc_chunk*
+ %cmp29 = icmp eq %struct.malloc_chunk* %9, %12
+ br i1 %cmp29, label %if.then41, label %lor.rhs
+
+lor.rhs: ; preds = %if.then27
+ %13 = bitcast %struct.malloc_chunk* %9 to i8*
+ %cmp31 = icmp ult i8* %13, %1
+ br i1 %cmp31, label %if.else70, label %land.rhs33
+
+land.rhs33: ; preds = %lor.rhs
+ %bk34 = getelementptr inbounds %struct.malloc_chunk* %9, i32 0, i32 3
+ %14 = load %struct.malloc_chunk** %bk34, align 4, !tbaa !0
+ %cmp35 = icmp eq %struct.malloc_chunk* %14, %6
+ br i1 %cmp35, label %if.then41, label %if.else70, !prof !5
+
+if.then41: ; preds = %land.rhs33, %if.then27
+ %cmp42 = icmp eq %struct.malloc_chunk* %11, %9
+ br i1 %cmp42, label %if.then44, label %if.else47
+
+if.then44: ; preds = %if.then41
+ %shl45 = shl i32 1, %shr
+ %neg = xor i32 %shl45, -1
+ %15 = load i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 0), align 4, !tbaa !3
+ %and46 = and i32 %15, %neg
+ store i32 %and46, i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 0), align 4, !tbaa !3
+ br label %if.end224
+
+if.else47: ; preds = %if.then41
+ %cmp50 = icmp eq %struct.malloc_chunk* %11, %12
+ br i1 %cmp50, label %if.else47.if.then65_crit_edge, label %lor.rhs52
+
+if.else47.if.then65_crit_edge: ; preds = %if.else47
+ %fd67.pre = getelementptr inbounds %struct.malloc_chunk* %11, i32 0, i32 2
+ br label %if.then65
+
+lor.rhs52: ; preds = %if.else47
+ %16 = bitcast %struct.malloc_chunk* %11 to i8*
+ %cmp53 = icmp ult i8* %16, %1
+ br i1 %cmp53, label %if.else68, label %land.rhs55
+
+land.rhs55: ; preds = %lor.rhs52
+ %fd56 = getelementptr inbounds %struct.malloc_chunk* %11, i32 0, i32 2
+ %17 = load %struct.malloc_chunk** %fd56, align 4, !tbaa !0
+ %cmp57 = icmp eq %struct.malloc_chunk* %17, %6
+ br i1 %cmp57, label %if.then65, label %if.else68, !prof !5
+
+if.then65: ; preds = %land.rhs55, %if.else47.if.then65_crit_edge
+ %fd67.pre-phi = phi %struct.malloc_chunk** [ %fd67.pre, %if.else47.if.then65_crit_edge ], [ %fd56, %land.rhs55 ]
+ %bk66 = getelementptr inbounds %struct.malloc_chunk* %9, i32 0, i32 3
+ store %struct.malloc_chunk* %11, %struct.malloc_chunk** %bk66, align 4, !tbaa !0
+ store %struct.malloc_chunk* %9, %struct.malloc_chunk** %fd67.pre-phi, align 4, !tbaa !0
+ br label %if.end224
+
+if.else68: ; preds = %land.rhs55, %lor.rhs52
+ tail call void @abort() #6
+ unreachable
+
+if.else70: ; preds = %land.rhs33, %lor.rhs
+ tail call void @abort() #6
+ unreachable
+
+if.else72: ; preds = %if.then24
+ %18 = bitcast i8* %add.ptr16 to %struct.malloc_tree_chunk*
+ %add.ptr16.sum251 = add i32 %add.ptr.sum230, 24
+ %parent = getelementptr inbounds i8* %mem, i32 %add.ptr16.sum251
+ %19 = bitcast i8* %parent to %struct.malloc_tree_chunk**
+ %20 = load %struct.malloc_tree_chunk** %19, align 4, !tbaa !0
+ %add.ptr16.sum252 = add i32 %add.ptr.sum230, 12
+ %bk73 = getelementptr inbounds i8* %mem, i32 %add.ptr16.sum252
+ %21 = bitcast i8* %bk73 to %struct.malloc_tree_chunk**
+ %22 = load %struct.malloc_tree_chunk** %21, align 4, !tbaa !0
+ %cmp74 = icmp eq %struct.malloc_tree_chunk* %22, %18
+ br i1 %cmp74, label %if.else98, label %if.then76
+
+if.then76: ; preds = %if.else72
+ %add.ptr16.sum256 = add i32 %add.ptr.sum230, 8
+ %fd78 = getelementptr inbounds i8* %mem, i32 %add.ptr16.sum256
+ %23 = bitcast i8* %fd78 to %struct.malloc_tree_chunk**
+ %24 = load %struct.malloc_tree_chunk** %23, align 4, !tbaa !0
+ %25 = bitcast %struct.malloc_tree_chunk* %24 to i8*
+ %cmp80 = icmp ult i8* %25, %1
+ br i1 %cmp80, label %if.else96, label %land.lhs.true
+
+land.lhs.true: ; preds = %if.then76
+ %bk82 = getelementptr inbounds %struct.malloc_tree_chunk* %24, i32 0, i32 3
+ %26 = load %struct.malloc_tree_chunk** %bk82, align 4, !tbaa !0
+ %cmp83 = icmp eq %struct.malloc_tree_chunk* %26, %18
+ br i1 %cmp83, label %land.rhs85, label %if.else96
+
+land.rhs85: ; preds = %land.lhs.true
+ %fd86 = getelementptr inbounds %struct.malloc_tree_chunk* %22, i32 0, i32 2
+ %27 = load %struct.malloc_tree_chunk** %fd86, align 4, !tbaa !0
+ %cmp87 = icmp eq %struct.malloc_tree_chunk* %27, %18
+ br i1 %cmp87, label %if.then93, label %if.else96, !prof !5
+
+if.then93: ; preds = %land.rhs85
+ store %struct.malloc_tree_chunk* %22, %struct.malloc_tree_chunk** %bk82, align 4, !tbaa !0
+ store %struct.malloc_tree_chunk* %24, %struct.malloc_tree_chunk** %fd86, align 4, !tbaa !0
+ br label %if.end126
+
+if.else96: ; preds = %land.rhs85, %land.lhs.true, %if.then76
+ tail call void @abort() #6
+ unreachable
+
+if.else98: ; preds = %if.else72
+ %child.sum = add i32 %add.ptr.sum230, 20
+ %arrayidx99 = getelementptr inbounds i8* %mem, i32 %child.sum
+ %28 = bitcast i8* %arrayidx99 to %struct.malloc_tree_chunk**
+ %29 = load %struct.malloc_tree_chunk** %28, align 4, !tbaa !0
+ %cmp100 = icmp eq %struct.malloc_tree_chunk* %29, null
+ br i1 %cmp100, label %lor.lhs.false, label %while.cond
+
+lor.lhs.false: ; preds = %if.else98
+ %add.ptr16.sum253 = add i32 %add.ptr.sum230, 16
+ %child = getelementptr inbounds i8* %mem, i32 %add.ptr16.sum253
+ %arrayidx103 = bitcast i8* %child to %struct.malloc_tree_chunk**
+ %30 = load %struct.malloc_tree_chunk** %arrayidx103, align 4, !tbaa !0
+ %cmp104 = icmp eq %struct.malloc_tree_chunk* %30, null
+ br i1 %cmp104, label %if.end126, label %while.cond
+
+while.cond: ; preds = %lor.rhs111, %while.cond, %lor.lhs.false, %if.else98
+ %RP.0 = phi %struct.malloc_tree_chunk** [ %arrayidx103, %lor.lhs.false ], [ %28, %if.else98 ], [ %arrayidx108, %while.cond ], [ %arrayidx113, %lor.rhs111 ]
+ %R.0 = phi %struct.malloc_tree_chunk* [ %30, %lor.lhs.false ], [ %29, %if.else98 ], [ %31, %while.cond ], [ %32, %lor.rhs111 ]
+ %arrayidx108 = getelementptr inbounds %struct.malloc_tree_chunk* %R.0, i32 0, i32 4, i32 1
+ %31 = load %struct.malloc_tree_chunk** %arrayidx108, align 4, !tbaa !0
+ %cmp109 = icmp eq %struct.malloc_tree_chunk* %31, null
+ br i1 %cmp109, label %lor.rhs111, label %while.cond
+
+lor.rhs111: ; preds = %while.cond
+ %arrayidx113 = getelementptr inbounds %struct.malloc_tree_chunk* %R.0, i32 0, i32 4, i32 0
+ %32 = load %struct.malloc_tree_chunk** %arrayidx113, align 4, !tbaa !0
+ %cmp114 = icmp eq %struct.malloc_tree_chunk* %32, null
+ br i1 %cmp114, label %while.end, label %while.cond
+
+while.end: ; preds = %lor.rhs111
+ %33 = bitcast %struct.malloc_tree_chunk** %RP.0 to i8*
+ %cmp118 = icmp ult i8* %33, %1
+ br i1 %cmp118, label %if.else123, label %if.then122, !prof !6
+
+if.then122: ; preds = %while.end
+ store %struct.malloc_tree_chunk* null, %struct.malloc_tree_chunk** %RP.0, align 4, !tbaa !0
+ br label %if.end126
+
+if.else123: ; preds = %while.end
+ tail call void @abort() #6
+ unreachable
+
+if.end126: ; preds = %if.then122, %lor.lhs.false, %if.then93
+ %R.1 = phi %struct.malloc_tree_chunk* [ %22, %if.then93 ], [ %R.0, %if.then122 ], [ null, %lor.lhs.false ]
+ %cmp127 = icmp eq %struct.malloc_tree_chunk* %20, null
+ br i1 %cmp127, label %if.end224, label %if.then129
+
+if.then129: ; preds = %if.end126
+ %add.ptr16.sum254 = add i32 %add.ptr.sum230, 28
+ %index = getelementptr inbounds i8* %mem, i32 %add.ptr16.sum254
+ %34 = bitcast i8* %index to i32*
+ %35 = load i32* %34, align 4, !tbaa !3
+ %arrayidx130 = getelementptr inbounds %struct.malloc_state* @_gm_, i32 0, i32 11, i32 %35
+ %36 = load %struct.malloc_tree_chunk** %arrayidx130, align 4, !tbaa !0
+ %cmp131 = icmp eq %struct.malloc_tree_chunk* %18, %36
+ br i1 %cmp131, label %if.then133, label %if.else142
+
+if.then133: ; preds = %if.then129
+ store %struct.malloc_tree_chunk* %R.1, %struct.malloc_tree_chunk** %arrayidx130, align 4, !tbaa !0
+ %cond263 = icmp eq %struct.malloc_tree_chunk* %R.1, null
+ br i1 %cond263, label %if.end161.thread, label %if.then164
+
+if.end161.thread: ; preds = %if.then133
+ %shl138 = shl i32 1, %35
+ %neg139 = xor i32 %shl138, -1
+ %37 = load i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 1), align 4, !tbaa !3
+ %and140 = and i32 %37, %neg139
+ store i32 %and140, i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 1), align 4, !tbaa !3
+ br label %if.end224
+
+if.else142: ; preds = %if.then129
+ %38 = bitcast %struct.malloc_tree_chunk* %20 to i8*
+ %39 = load i8** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 4), align 4, !tbaa !0
+ %cmp143 = icmp ult i8* %38, %39
+ br i1 %cmp143, label %if.else159, label %if.then147, !prof !6
+
+if.then147: ; preds = %if.else142
+ %arrayidx149 = getelementptr inbounds %struct.malloc_tree_chunk* %20, i32 0, i32 4, i32 0
+ %40 = load %struct.malloc_tree_chunk** %arrayidx149, align 4, !tbaa !0
+ %cmp150 = icmp eq %struct.malloc_tree_chunk* %40, %18
+ br i1 %cmp150, label %if.then152, label %if.else155
+
+if.then152: ; preds = %if.then147
+ store %struct.malloc_tree_chunk* %R.1, %struct.malloc_tree_chunk** %arrayidx149, align 4, !tbaa !0
+ br label %if.end161
+
+if.else155: ; preds = %if.then147
+ %arrayidx157 = getelementptr inbounds %struct.malloc_tree_chunk* %20, i32 0, i32 4, i32 1
+ store %struct.malloc_tree_chunk* %R.1, %struct.malloc_tree_chunk** %arrayidx157, align 4, !tbaa !0
+ br label %if.end161
+
+if.else159: ; preds = %if.else142
+ tail call void @abort() #6
+ unreachable
+
+if.end161: ; preds = %if.else155, %if.then152
+ %cmp162 = icmp eq %struct.malloc_tree_chunk* %R.1, null
+ br i1 %cmp162, label %if.end224, label %if.then164
+
+if.then164: ; preds = %if.end161, %if.then133
+ %41 = bitcast %struct.malloc_tree_chunk* %R.1 to i8*
+ %42 = load i8** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 4), align 4, !tbaa !0
+ %cmp165 = icmp ult i8* %41, %42
+ br i1 %cmp165, label %if.else203, label %if.then169, !prof !6
+
+if.then169: ; preds = %if.then164
+ %parent170 = getelementptr inbounds %struct.malloc_tree_chunk* %R.1, i32 0, i32 5
+ store %struct.malloc_tree_chunk* %20, %struct.malloc_tree_chunk** %parent170, align 4, !tbaa !0
+ %add.ptr16.sum255 = add i32 %add.ptr.sum230, 16
+ %child171 = getelementptr inbounds i8* %mem, i32 %add.ptr16.sum255
+ %arrayidx172 = bitcast i8* %child171 to %struct.malloc_tree_chunk**
+ %43 = load %struct.malloc_tree_chunk** %arrayidx172, align 4, !tbaa !0
+ %cmp173 = icmp eq %struct.malloc_tree_chunk* %43, null
+ br i1 %cmp173, label %if.end186, label %if.then175
+
+if.then175: ; preds = %if.then169
+ %44 = bitcast %struct.malloc_tree_chunk* %43 to i8*
+ %45 = load i8** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 4), align 4, !tbaa !0
+ %cmp176 = icmp ult i8* %44, %45
+ br i1 %cmp176, label %if.else184, label %if.then180, !prof !6
+
+if.then180: ; preds = %if.then175
+ %arrayidx182 = getelementptr inbounds %struct.malloc_tree_chunk* %R.1, i32 0, i32 4, i32 0
+ store %struct.malloc_tree_chunk* %43, %struct.malloc_tree_chunk** %arrayidx182, align 4, !tbaa !0
+ %parent183 = getelementptr inbounds %struct.malloc_tree_chunk* %43, i32 0, i32 5
+ store %struct.malloc_tree_chunk* %R.1, %struct.malloc_tree_chunk** %parent183, align 4, !tbaa !0
+ br label %if.end186
+
+if.else184: ; preds = %if.then175
+ tail call void @abort() #6
+ unreachable
+
+if.end186: ; preds = %if.then180, %if.then169
+ %child171.sum = add i32 %add.ptr.sum230, 20
+ %arrayidx188 = getelementptr inbounds i8* %mem, i32 %child171.sum
+ %46 = bitcast i8* %arrayidx188 to %struct.malloc_tree_chunk**
+ %47 = load %struct.malloc_tree_chunk** %46, align 4, !tbaa !0
+ %cmp189 = icmp eq %struct.malloc_tree_chunk* %47, null
+ br i1 %cmp189, label %if.end224, label %if.then191
+
+if.then191: ; preds = %if.end186
+ %48 = bitcast %struct.malloc_tree_chunk* %47 to i8*
+ %49 = load i8** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 4), align 4, !tbaa !0
+ %cmp192 = icmp ult i8* %48, %49
+ br i1 %cmp192, label %if.else200, label %if.then196, !prof !6
+
+if.then196: ; preds = %if.then191
+ %arrayidx198 = getelementptr inbounds %struct.malloc_tree_chunk* %R.1, i32 0, i32 4, i32 1
+ store %struct.malloc_tree_chunk* %47, %struct.malloc_tree_chunk** %arrayidx198, align 4, !tbaa !0
+ %parent199 = getelementptr inbounds %struct.malloc_tree_chunk* %47, i32 0, i32 5
+ store %struct.malloc_tree_chunk* %R.1, %struct.malloc_tree_chunk** %parent199, align 4, !tbaa !0
+ br label %if.end224
+
+if.else200: ; preds = %if.then191
+ tail call void @abort() #6
+ unreachable
+
+if.else203: ; preds = %if.then164
+ tail call void @abort() #6
+ unreachable
+
+if.else208: ; preds = %if.then21
+ %add.ptr6.sum = add i32 %and5, -4
+ %head209 = getelementptr inbounds i8* %mem, i32 %add.ptr6.sum
+ %50 = bitcast i8* %head209 to i32*
+ %51 = load i32* %50, align 4, !tbaa !3
+ %and210 = and i32 %51, 3
+ %cmp211 = icmp eq i32 %and210, 3
+ br i1 %cmp211, label %if.then213, label %if.end224
+
+if.then213: ; preds = %if.else208
+ store i32 %add17, i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 2), align 4, !tbaa !3
+ %52 = load i32* %50, align 4, !tbaa !3
+ %and215 = and i32 %52, -2
+ store i32 %and215, i32* %50, align 4, !tbaa !3
+ %or = or i32 %add17, 1
+ %add.ptr16.sum = add i32 %add.ptr.sum230, 4
+ %head216 = getelementptr inbounds i8* %mem, i32 %add.ptr16.sum
+ %53 = bitcast i8* %head216 to i32*
+ store i32 %or, i32* %53, align 4, !tbaa !3
+ %prev_foot218 = bitcast i8* %add.ptr6 to i32*
+ store i32 %add17, i32* %prev_foot218, align 4, !tbaa !3
+ br label %if.end635
+
+if.end224: ; preds = %if.else208, %if.then196, %if.end186, %if.end161, %if.end161.thread, %if.end126, %if.then65, %if.then44, %if.then3
+ %psize.0 = phi i32 [ %and5, %if.then3 ], [ %add17, %if.then44 ], [ %add17, %if.then65 ], [ %add17, %if.then196 ], [ %add17, %if.end186 ], [ %add17, %if.end161 ], [ %add17, %if.end126 ], [ %add17, %if.else208 ], [ %add17, %if.end161.thread ]
+ %p.0 = phi %struct.malloc_chunk* [ %0, %if.then3 ], [ %6, %if.then44 ], [ %6, %if.then65 ], [ %6, %if.then196 ], [ %6, %if.end186 ], [ %6, %if.end161 ], [ %6, %if.end126 ], [ %6, %if.else208 ], [ %6, %if.end161.thread ]
+ %54 = bitcast %struct.malloc_chunk* %p.0 to i8*
+ %cmp225 = icmp ult i8* %54, %add.ptr6
+ br i1 %cmp225, label %land.rhs227, label %erroraction
+
+land.rhs227: ; preds = %if.end224
+ %add.ptr6.sum249 = add i32 %and5, -4
+ %head228 = getelementptr inbounds i8* %mem, i32 %add.ptr6.sum249
+ %55 = bitcast i8* %head228 to i32*
+ %56 = load i32* %55, align 4, !tbaa !3
+ %and229 = and i32 %56, 1
+ %tobool230 = icmp eq i32 %and229, 0
+ br i1 %tobool230, label %erroraction, label %if.then235, !prof !6
+
+if.then235: ; preds = %land.rhs227
+ %and237 = and i32 %56, 2
+ %tobool238 = icmp eq i32 %and237, 0
+ br i1 %tobool238, label %if.then239, label %if.else485
+
+if.then239: ; preds = %if.then235
+ %57 = load %struct.malloc_chunk** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 6), align 4, !tbaa !0
+ %cmp240 = icmp eq %struct.malloc_chunk* %4, %57
+ br i1 %cmp240, label %if.then242, label %if.else250
+
+if.then242: ; preds = %if.then239
+ %58 = load i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 3), align 4, !tbaa !3
+ %add243 = add i32 %58, %psize.0
+ store i32 %add243, i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 3), align 4, !tbaa !3
+ store %struct.malloc_chunk* %p.0, %struct.malloc_chunk** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 6), align 4, !tbaa !0
+ %or244 = or i32 %add243, 1
+ %head245 = getelementptr inbounds %struct.malloc_chunk* %p.0, i32 0, i32 1
+ store i32 %or244, i32* %head245, align 4, !tbaa !3
+ %59 = load %struct.malloc_chunk** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 5), align 4, !tbaa !0
+ %cmp246 = icmp eq %struct.malloc_chunk* %p.0, %59
+ br i1 %cmp246, label %if.then248, label %if.end635
+
+if.then248: ; preds = %if.then242
+ store %struct.malloc_chunk* null, %struct.malloc_chunk** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 5), align 4, !tbaa !0
+ store i32 0, i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 2), align 4, !tbaa !3
+ br label %if.end635
+
+if.else250: ; preds = %if.then239
+ %60 = load %struct.malloc_chunk** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 5), align 4, !tbaa !0
+ %cmp251 = icmp eq %struct.malloc_chunk* %4, %60
+ br i1 %cmp251, label %if.then253, label %if.else259
+
+if.then253: ; preds = %if.else250
+ %61 = load i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 2), align 4, !tbaa !3
+ %add254 = add i32 %61, %psize.0
+ store i32 %add254, i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 2), align 4, !tbaa !3
+ store %struct.malloc_chunk* %p.0, %struct.malloc_chunk** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 5), align 4, !tbaa !0
+ %or255 = or i32 %add254, 1
+ %head256 = getelementptr inbounds %struct.malloc_chunk* %p.0, i32 0, i32 1
+ store i32 %or255, i32* %head256, align 4, !tbaa !3
+ %add.ptr257 = getelementptr inbounds i8* %54, i32 %add254
+ %prev_foot258 = bitcast i8* %add.ptr257 to i32*
+ store i32 %add254, i32* %prev_foot258, align 4, !tbaa !3
+ br label %if.end635
+
+if.else259: ; preds = %if.else250
+ %and261 = and i32 %56, -8
+ %add262 = add i32 %and261, %psize.0
+ %shr263 = lshr i32 %56, 3
+ %cmp264 = icmp ult i32 %56, 256
+ br i1 %cmp264, label %if.then266, label %if.else323
+
+if.then266: ; preds = %if.else259
+ %fd268 = getelementptr inbounds i8* %mem, i32 %and5
+ %62 = bitcast i8* %fd268 to %struct.malloc_chunk**
+ %63 = load %struct.malloc_chunk** %62, align 4, !tbaa !0
+ %add.ptr6.sum247248 = or i32 %and5, 4
+ %bk270 = getelementptr inbounds i8* %mem, i32 %add.ptr6.sum247248
+ %64 = bitcast i8* %bk270 to %struct.malloc_chunk**
+ %65 = load %struct.malloc_chunk** %64, align 4, !tbaa !0
+ %shl273 = shl nuw nsw i32 %shr263, 1
+ %arrayidx274 = getelementptr inbounds %struct.malloc_state* @_gm_, i32 0, i32 10, i32 %shl273
+ %66 = bitcast %struct.malloc_chunk** %arrayidx274 to %struct.malloc_chunk*
+ %cmp275 = icmp eq %struct.malloc_chunk* %63, %66
+ br i1 %cmp275, label %if.then290, label %lor.rhs277
+
+lor.rhs277: ; preds = %if.then266
+ %67 = bitcast %struct.malloc_chunk* %63 to i8*
+ %68 = load i8** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 4), align 4, !tbaa !0
+ %cmp278 = icmp ult i8* %67, %68
+ br i1 %cmp278, label %if.else321, label %land.rhs280
+
+land.rhs280: ; preds = %lor.rhs277
+ %bk281 = getelementptr inbounds %struct.malloc_chunk* %63, i32 0, i32 3
+ %69 = load %struct.malloc_chunk** %bk281, align 4, !tbaa !0
+ %cmp282 = icmp eq %struct.malloc_chunk* %69, %4
+ br i1 %cmp282, label %if.then290, label %if.else321, !prof !5
+
+if.then290: ; preds = %land.rhs280, %if.then266
+ %cmp291 = icmp eq %struct.malloc_chunk* %65, %63
+ br i1 %cmp291, label %if.then293, label %if.else297
+
+if.then293: ; preds = %if.then290
+ %shl294 = shl i32 1, %shr263
+ %neg295 = xor i32 %shl294, -1
+ %70 = load i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 0), align 4, !tbaa !3
+ %and296 = and i32 %70, %neg295
+ store i32 %and296, i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 0), align 4, !tbaa !3
+ br label %if.end474
+
+if.else297: ; preds = %if.then290
+ %cmp300 = icmp eq %struct.malloc_chunk* %65, %66
+ br i1 %cmp300, label %if.else297.if.then315_crit_edge, label %lor.rhs302
+
+if.else297.if.then315_crit_edge: ; preds = %if.else297
+ %fd317.pre = getelementptr inbounds %struct.malloc_chunk* %65, i32 0, i32 2
+ br label %if.then315
+
+lor.rhs302: ; preds = %if.else297
+ %71 = bitcast %struct.malloc_chunk* %65 to i8*
+ %72 = load i8** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 4), align 4, !tbaa !0
+ %cmp303 = icmp ult i8* %71, %72
+ br i1 %cmp303, label %if.else318, label %land.rhs305
+
+land.rhs305: ; preds = %lor.rhs302
+ %fd306 = getelementptr inbounds %struct.malloc_chunk* %65, i32 0, i32 2
+ %73 = load %struct.malloc_chunk** %fd306, align 4, !tbaa !0
+ %cmp307 = icmp eq %struct.malloc_chunk* %73, %4
+ br i1 %cmp307, label %if.then315, label %if.else318, !prof !5
+
+if.then315: ; preds = %land.rhs305, %if.else297.if.then315_crit_edge
+ %fd317.pre-phi = phi %struct.malloc_chunk** [ %fd317.pre, %if.else297.if.then315_crit_edge ], [ %fd306, %land.rhs305 ]
+ %bk316 = getelementptr inbounds %struct.malloc_chunk* %63, i32 0, i32 3
+ store %struct.malloc_chunk* %65, %struct.malloc_chunk** %bk316, align 4, !tbaa !0
+ store %struct.malloc_chunk* %63, %struct.malloc_chunk** %fd317.pre-phi, align 4, !tbaa !0
+ br label %if.end474
+
+if.else318: ; preds = %land.rhs305, %lor.rhs302
+ tail call void @abort() #6
+ unreachable
+
+if.else321: ; preds = %land.rhs280, %lor.rhs277
+ tail call void @abort() #6
+ unreachable
+
+if.else323: ; preds = %if.else259
+ %74 = bitcast i8* %add.ptr6 to %struct.malloc_tree_chunk*
+ %add.ptr6.sum232 = add i32 %and5, 16
+ %parent326 = getelementptr inbounds i8* %mem, i32 %add.ptr6.sum232
+ %75 = bitcast i8* %parent326 to %struct.malloc_tree_chunk**
+ %76 = load %struct.malloc_tree_chunk** %75, align 4, !tbaa !0
+ %add.ptr6.sum233234 = or i32 %and5, 4
+ %bk328 = getelementptr inbounds i8* %mem, i32 %add.ptr6.sum233234
+ %77 = bitcast i8* %bk328 to %struct.malloc_tree_chunk**
+ %78 = load %struct.malloc_tree_chunk** %77, align 4, !tbaa !0
+ %cmp329 = icmp eq %struct.malloc_tree_chunk* %78, %74
+ br i1 %cmp329, label %if.else354, label %if.then331
+
+if.then331: ; preds = %if.else323
+ %fd333 = getelementptr inbounds i8* %mem, i32 %and5
+ %79 = bitcast i8* %fd333 to %struct.malloc_tree_chunk**
+ %80 = load %struct.malloc_tree_chunk** %79, align 4, !tbaa !0
+ %81 = bitcast %struct.malloc_tree_chunk* %80 to i8*
+ %82 = load i8** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 4), align 4, !tbaa !0
+ %cmp335 = icmp ult i8* %81, %82
+ br i1 %cmp335, label %if.else352, label %land.lhs.true337
+
+land.lhs.true337: ; preds = %if.then331
+ %bk338 = getelementptr inbounds %struct.malloc_tree_chunk* %80, i32 0, i32 3
+ %83 = load %struct.malloc_tree_chunk** %bk338, align 4, !tbaa !0
+ %cmp339 = icmp eq %struct.malloc_tree_chunk* %83, %74
+ br i1 %cmp339, label %land.rhs341, label %if.else352
+
+land.rhs341: ; preds = %land.lhs.true337
+ %fd342 = getelementptr inbounds %struct.malloc_tree_chunk* %78, i32 0, i32 2
+ %84 = load %struct.malloc_tree_chunk** %fd342, align 4, !tbaa !0
+ %cmp343 = icmp eq %struct.malloc_tree_chunk* %84, %74
+ br i1 %cmp343, label %if.then349, label %if.else352, !prof !5
+
+if.then349: ; preds = %land.rhs341
+ store %struct.malloc_tree_chunk* %78, %struct.malloc_tree_chunk** %bk338, align 4, !tbaa !0
+ store %struct.malloc_tree_chunk* %80, %struct.malloc_tree_chunk** %fd342, align 4, !tbaa !0
+ br label %if.end389
+
+if.else352: ; preds = %land.rhs341, %land.lhs.true337, %if.then331
+ tail call void @abort() #6
+ unreachable
+
+if.else354: ; preds = %if.else323
+ %child356.sum = add i32 %and5, 12
+ %arrayidx357 = getelementptr inbounds i8* %mem, i32 %child356.sum
+ %85 = bitcast i8* %arrayidx357 to %struct.malloc_tree_chunk**
+ %86 = load %struct.malloc_tree_chunk** %85, align 4, !tbaa !0
+ %cmp358 = icmp eq %struct.malloc_tree_chunk* %86, null
+ br i1 %cmp358, label %lor.lhs.false360, label %while.cond367
+
+lor.lhs.false360: ; preds = %if.else354
+ %add.ptr6.sum235 = add i32 %and5, 8
+ %child356 = getelementptr inbounds i8* %mem, i32 %add.ptr6.sum235
+ %arrayidx362 = bitcast i8* %child356 to %struct.malloc_tree_chunk**
+ %87 = load %struct.malloc_tree_chunk** %arrayidx362, align 4, !tbaa !0
+ %cmp363 = icmp eq %struct.malloc_tree_chunk* %87, null
+ br i1 %cmp363, label %if.end389, label %while.cond367
+
+while.cond367: ; preds = %lor.rhs372, %while.cond367, %lor.lhs.false360, %if.else354
+ %RP355.0 = phi %struct.malloc_tree_chunk** [ %arrayidx362, %lor.lhs.false360 ], [ %85, %if.else354 ], [ %arrayidx369, %while.cond367 ], [ %arrayidx374, %lor.rhs372 ]
+ %R327.0 = phi %struct.malloc_tree_chunk* [ %87, %lor.lhs.false360 ], [ %86, %if.else354 ], [ %88, %while.cond367 ], [ %89, %lor.rhs372 ]
+ %arrayidx369 = getelementptr inbounds %struct.malloc_tree_chunk* %R327.0, i32 0, i32 4, i32 1
+ %88 = load %struct.malloc_tree_chunk** %arrayidx369, align 4, !tbaa !0
+ %cmp370 = icmp eq %struct.malloc_tree_chunk* %88, null
+ br i1 %cmp370, label %lor.rhs372, label %while.cond367
+
+lor.rhs372: ; preds = %while.cond367
+ %arrayidx374 = getelementptr inbounds %struct.malloc_tree_chunk* %R327.0, i32 0, i32 4, i32 0
+ %89 = load %struct.malloc_tree_chunk** %arrayidx374, align 4, !tbaa !0
+ %cmp375 = icmp eq %struct.malloc_tree_chunk* %89, null
+ br i1 %cmp375, label %while.end380, label %while.cond367
+
+while.end380: ; preds = %lor.rhs372
+ %90 = bitcast %struct.malloc_tree_chunk** %RP355.0 to i8*
+ %91 = load i8** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 4), align 4, !tbaa !0
+ %cmp381 = icmp ult i8* %90, %91
+ br i1 %cmp381, label %if.else386, label %if.then385, !prof !6
+
+if.then385: ; preds = %while.end380
+ store %struct.malloc_tree_chunk* null, %struct.malloc_tree_chunk** %RP355.0, align 4, !tbaa !0
+ br label %if.end389
+
+if.else386: ; preds = %while.end380
+ tail call void @abort() #6
+ unreachable
+
+if.end389: ; preds = %if.then385, %lor.lhs.false360, %if.then349
+ %R327.1 = phi %struct.malloc_tree_chunk* [ %78, %if.then349 ], [ %R327.0, %if.then385 ], [ null, %lor.lhs.false360 ]
+ %cmp390 = icmp eq %struct.malloc_tree_chunk* %76, null
+ br i1 %cmp390, label %if.end474, label %if.then392
+
+if.then392: ; preds = %if.end389
+ %add.ptr6.sum243 = add i32 %and5, 20
+ %index394 = getelementptr inbounds i8* %mem, i32 %add.ptr6.sum243
+ %92 = bitcast i8* %index394 to i32*
+ %93 = load i32* %92, align 4, !tbaa !3
+ %arrayidx395 = getelementptr inbounds %struct.malloc_state* @_gm_, i32 0, i32 11, i32 %93
+ %94 = load %struct.malloc_tree_chunk** %arrayidx395, align 4, !tbaa !0
+ %cmp396 = icmp eq %struct.malloc_tree_chunk* %74, %94
+ br i1 %cmp396, label %if.then398, label %if.else407
+
+if.then398: ; preds = %if.then392
+ store %struct.malloc_tree_chunk* %R327.1, %struct.malloc_tree_chunk** %arrayidx395, align 4, !tbaa !0
+ %cond264 = icmp eq %struct.malloc_tree_chunk* %R327.1, null
+ br i1 %cond264, label %if.end426.thread, label %if.then429
+
+if.end426.thread: ; preds = %if.then398
+ %shl403 = shl i32 1, %93
+ %neg404 = xor i32 %shl403, -1
+ %95 = load i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 1), align 4, !tbaa !3
+ %and405 = and i32 %95, %neg404
+ store i32 %and405, i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 1), align 4, !tbaa !3
+ br label %if.end474
+
+if.else407: ; preds = %if.then392
+ %96 = bitcast %struct.malloc_tree_chunk* %76 to i8*
+ %97 = load i8** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 4), align 4, !tbaa !0
+ %cmp408 = icmp ult i8* %96, %97
+ br i1 %cmp408, label %if.else424, label %if.then412, !prof !6
+
+if.then412: ; preds = %if.else407
+ %arrayidx414 = getelementptr inbounds %struct.malloc_tree_chunk* %76, i32 0, i32 4, i32 0
+ %98 = load %struct.malloc_tree_chunk** %arrayidx414, align 4, !tbaa !0
+ %cmp415 = icmp eq %struct.malloc_tree_chunk* %98, %74
+ br i1 %cmp415, label %if.then417, label %if.else420
+
+if.then417: ; preds = %if.then412
+ store %struct.malloc_tree_chunk* %R327.1, %struct.malloc_tree_chunk** %arrayidx414, align 4, !tbaa !0
+ br label %if.end426
+
+if.else420: ; preds = %if.then412
+ %arrayidx422 = getelementptr inbounds %struct.malloc_tree_chunk* %76, i32 0, i32 4, i32 1
+ store %struct.malloc_tree_chunk* %R327.1, %struct.malloc_tree_chunk** %arrayidx422, align 4, !tbaa !0
+ br label %if.end426
+
+if.else424: ; preds = %if.else407
+ tail call void @abort() #6
+ unreachable
+
+if.end426: ; preds = %if.else420, %if.then417
+ %cmp427 = icmp eq %struct.malloc_tree_chunk* %R327.1, null
+ br i1 %cmp427, label %if.end474, label %if.then429
+
+if.then429: ; preds = %if.end426, %if.then398
+ %99 = bitcast %struct.malloc_tree_chunk* %R327.1 to i8*
+ %100 = load i8** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 4), align 4, !tbaa !0
+ %cmp430 = icmp ult i8* %99, %100
+ br i1 %cmp430, label %if.else470, label %if.then434, !prof !6
+
+if.then434: ; preds = %if.then429
+ %parent437 = getelementptr inbounds %struct.malloc_tree_chunk* %R327.1, i32 0, i32 5
+ store %struct.malloc_tree_chunk* %76, %struct.malloc_tree_chunk** %parent437, align 4, !tbaa !0
+ %add.ptr6.sum244 = add i32 %and5, 8
+ %child438 = getelementptr inbounds i8* %mem, i32 %add.ptr6.sum244
+ %arrayidx439 = bitcast i8* %child438 to %struct.malloc_tree_chunk**
+ %101 = load %struct.malloc_tree_chunk** %arrayidx439, align 4, !tbaa !0
+ %cmp440 = icmp eq %struct.malloc_tree_chunk* %101, null
+ br i1 %cmp440, label %if.end453, label %if.then442
+
+if.then442: ; preds = %if.then434
+ %102 = bitcast %struct.malloc_tree_chunk* %101 to i8*
+ %103 = load i8** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 4), align 4, !tbaa !0
+ %cmp443 = icmp ult i8* %102, %103
+ br i1 %cmp443, label %if.else451, label %if.then447, !prof !6
+
+if.then447: ; preds = %if.then442
+ %arrayidx449 = getelementptr inbounds %struct.malloc_tree_chunk* %R327.1, i32 0, i32 4, i32 0
+ store %struct.malloc_tree_chunk* %101, %struct.malloc_tree_chunk** %arrayidx449, align 4, !tbaa !0
+ %parent450 = getelementptr inbounds %struct.malloc_tree_chunk* %101, i32 0, i32 5
+ store %struct.malloc_tree_chunk* %R327.1, %struct.malloc_tree_chunk** %parent450, align 4, !tbaa !0
+ br label %if.end453
+
+if.else451: ; preds = %if.then442
+ tail call void @abort() #6
+ unreachable
+
+if.end453: ; preds = %if.then447, %if.then434
+ %child438.sum = add i32 %and5, 12
+ %arrayidx455 = getelementptr inbounds i8* %mem, i32 %child438.sum
+ %104 = bitcast i8* %arrayidx455 to %struct.malloc_tree_chunk**
+ %105 = load %struct.malloc_tree_chunk** %104, align 4, !tbaa !0
+ %cmp456 = icmp eq %struct.malloc_tree_chunk* %105, null
+ br i1 %cmp456, label %if.end474, label %if.then458
+
+if.then458: ; preds = %if.end453
+ %106 = bitcast %struct.malloc_tree_chunk* %105 to i8*
+ %107 = load i8** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 4), align 4, !tbaa !0
+ %cmp459 = icmp ult i8* %106, %107
+ br i1 %cmp459, label %if.else467, label %if.then463, !prof !6
+
+if.then463: ; preds = %if.then458
+ %arrayidx465 = getelementptr inbounds %struct.malloc_tree_chunk* %R327.1, i32 0, i32 4, i32 1
+ store %struct.malloc_tree_chunk* %105, %struct.malloc_tree_chunk** %arrayidx465, align 4, !tbaa !0
+ %parent466 = getelementptr inbounds %struct.malloc_tree_chunk* %105, i32 0, i32 5
+ store %struct.malloc_tree_chunk* %R327.1, %struct.malloc_tree_chunk** %parent466, align 4, !tbaa !0
+ br label %if.end474
+
+if.else467: ; preds = %if.then458
+ tail call void @abort() #6
+ unreachable
+
+if.else470: ; preds = %if.then429
+ tail call void @abort() #6
+ unreachable
+
+if.end474: ; preds = %if.then463, %if.end453, %if.end426, %if.end426.thread, %if.end389, %if.then315, %if.then293
+ %or475 = or i32 %add262, 1
+ %head476 = getelementptr inbounds %struct.malloc_chunk* %p.0, i32 0, i32 1
+ store i32 %or475, i32* %head476, align 4, !tbaa !3
+ %add.ptr477 = getelementptr inbounds i8* %54, i32 %add262
+ %prev_foot478 = bitcast i8* %add.ptr477 to i32*
+ store i32 %add262, i32* %prev_foot478, align 4, !tbaa !3
+ %108 = load %struct.malloc_chunk** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 5), align 4, !tbaa !0
+ %cmp479 = icmp eq %struct.malloc_chunk* %p.0, %108
+ br i1 %cmp479, label %if.then481, label %if.end492
+
+if.then481: ; preds = %if.end474
+ store i32 %add262, i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 2), align 4, !tbaa !3
+ br label %if.end635
+
+if.else485: ; preds = %if.then235
+ %and487 = and i32 %56, -2
+ store i32 %and487, i32* %55, align 4, !tbaa !3
+ %or488 = or i32 %psize.0, 1
+ %head489 = getelementptr inbounds %struct.malloc_chunk* %p.0, i32 0, i32 1
+ store i32 %or488, i32* %head489, align 4, !tbaa !3
+ %add.ptr490 = getelementptr inbounds i8* %54, i32 %psize.0
+ %prev_foot491 = bitcast i8* %add.ptr490 to i32*
+ store i32 %psize.0, i32* %prev_foot491, align 4, !tbaa !3
+ br label %if.end492
+
+if.end492: ; preds = %if.else485, %if.end474
+ %psize.1 = phi i32 [ %psize.0, %if.else485 ], [ %add262, %if.end474 ]
+ %shr493 = lshr i32 %psize.1, 3
+ %cmp494 = icmp ult i32 %psize.1, 256
+ br i1 %cmp494, label %if.then496, label %if.else524
+
+if.then496: ; preds = %if.end492
+ %shl500 = shl nuw nsw i32 %shr493, 1
+ %arrayidx501 = getelementptr inbounds %struct.malloc_state* @_gm_, i32 0, i32 10, i32 %shl500
+ %109 = bitcast %struct.malloc_chunk** %arrayidx501 to %struct.malloc_chunk*
+ %110 = load i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 0), align 4, !tbaa !3
+ %shl503 = shl i32 1, %shr493
+ %and504 = and i32 %110, %shl503
+ %tobool505 = icmp eq i32 %and504, 0
+ br i1 %tobool505, label %if.then506, label %if.else509
+
+if.then506: ; preds = %if.then496
+ %or508 = or i32 %110, %shl503
+ store i32 %or508, i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 0), align 4, !tbaa !3
+ %arrayidx501.sum.pre = add i32 %shl500, 2
+ %.pre = getelementptr inbounds %struct.malloc_state* @_gm_, i32 0, i32 10, i32 %arrayidx501.sum.pre
+ br label %if.end519
+
+if.else509: ; preds = %if.then496
+ %arrayidx501.sum242 = add i32 %shl500, 2
+ %111 = getelementptr inbounds %struct.malloc_state* @_gm_, i32 0, i32 10, i32 %arrayidx501.sum242
+ %112 = load %struct.malloc_chunk** %111, align 4, !tbaa !0
+ %113 = bitcast %struct.malloc_chunk* %112 to i8*
+ %114 = load i8** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 4), align 4, !tbaa !0
+ %cmp511 = icmp ult i8* %113, %114
+ br i1 %cmp511, label %if.else517, label %if.end519, !prof !6
+
+if.else517: ; preds = %if.else509
+ tail call void @abort() #6
+ unreachable
+
+if.end519: ; preds = %if.else509, %if.then506
+ %.pre-phi = phi %struct.malloc_chunk** [ %111, %if.else509 ], [ %.pre, %if.then506 ]
+ %F502.0 = phi %struct.malloc_chunk* [ %112, %if.else509 ], [ %109, %if.then506 ]
+ store %struct.malloc_chunk* %p.0, %struct.malloc_chunk** %.pre-phi, align 4, !tbaa !0
+ %bk521 = getelementptr inbounds %struct.malloc_chunk* %F502.0, i32 0, i32 3
+ store %struct.malloc_chunk* %p.0, %struct.malloc_chunk** %bk521, align 4, !tbaa !0
+ %fd522 = getelementptr inbounds %struct.malloc_chunk* %p.0, i32 0, i32 2
+ store %struct.malloc_chunk* %F502.0, %struct.malloc_chunk** %fd522, align 4, !tbaa !0
+ %bk523 = getelementptr inbounds %struct.malloc_chunk* %p.0, i32 0, i32 3
+ store %struct.malloc_chunk* %109, %struct.malloc_chunk** %bk523, align 4, !tbaa !0
+ br label %if.end635
+
+if.else524: ; preds = %if.end492
+ %115 = bitcast %struct.malloc_chunk* %p.0 to %struct.malloc_tree_chunk*
+ %shr527 = lshr i32 %psize.1, 8
+ %cmp528 = icmp eq i32 %shr527, 0
+ br i1 %cmp528, label %if.end558, label %if.else531
+
+if.else531: ; preds = %if.else524
+ %cmp532 = icmp ugt i32 %psize.1, 16777215
+ br i1 %cmp532, label %if.end558, label %if.else535
+
+if.else535: ; preds = %if.else531
+ %sub = add i32 %shr527, 1048320
+ %shr536 = lshr i32 %sub, 16
+ %and537 = and i32 %shr536, 8
+ %shl538 = shl i32 %shr527, %and537
+ %sub539 = add i32 %shl538, 520192
+ %shr540 = lshr i32 %sub539, 16
+ %and541 = and i32 %shr540, 4
+ %add542 = or i32 %and541, %and537
+ %shl543 = shl i32 %shl538, %and541
+ %sub544 = add i32 %shl543, 245760
+ %shr545 = lshr i32 %sub544, 16
+ %and546 = and i32 %shr545, 2
+ %add547 = or i32 %add542, %and546
+ %sub548 = sub i32 14, %add547
+ %shl549 = shl i32 %shl543, %and546
+ %shr550 = lshr i32 %shl549, 15
+ %add551 = add i32 %sub548, %shr550
+ %shl552 = shl nsw i32 %add551, 1
+ %add553 = add i32 %add551, 7
+ %shr554 = lshr i32 %psize.1, %add553
+ %and555 = and i32 %shr554, 1
+ %add556 = or i32 %and555, %shl552
+ br label %if.end558
+
+if.end558: ; preds = %if.else535, %if.else531, %if.else524
+ %I526.0 = phi i32 [ %add556, %if.else535 ], [ 0, %if.else524 ], [ 31, %if.else531 ]
+ %arrayidx559 = getelementptr inbounds %struct.malloc_state* @_gm_, i32 0, i32 11, i32 %I526.0
+ %index560 = getelementptr inbounds %struct.malloc_chunk* %p.0, i32 1, i32 3
+ %I526.0.c = inttoptr i32 %I526.0 to %struct.malloc_chunk*
+ store %struct.malloc_chunk* %I526.0.c, %struct.malloc_chunk** %index560, align 4, !tbaa !3
+ %arrayidx562 = getelementptr inbounds %struct.malloc_chunk* %p.0, i32 1, i32 1
+ store i32 0, i32* %arrayidx562, align 4, !tbaa !0
+ %116 = getelementptr inbounds %struct.malloc_chunk* %p.0, i32 1, i32 0
+ store i32 0, i32* %116, align 4, !tbaa !0
+ %117 = load i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 1), align 4, !tbaa !3
+ %shl565 = shl i32 1, %I526.0
+ %and566 = and i32 %117, %shl565
+ %tobool567 = icmp eq i32 %and566, 0
+ br i1 %tobool567, label %if.then568, label %if.else574
+
+if.then568: ; preds = %if.end558
+ %or570 = or i32 %117, %shl565
+ store i32 %or570, i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 1), align 4, !tbaa !3
+ store %struct.malloc_tree_chunk* %115, %struct.malloc_tree_chunk** %arrayidx559, align 4, !tbaa !0
+ %parent571 = getelementptr inbounds %struct.malloc_chunk* %p.0, i32 1, i32 2
+ %.c = bitcast %struct.malloc_tree_chunk** %arrayidx559 to %struct.malloc_chunk*
+ store %struct.malloc_chunk* %.c, %struct.malloc_chunk** %parent571, align 4, !tbaa !0
+ %bk572 = getelementptr inbounds %struct.malloc_chunk* %p.0, i32 0, i32 3
+ store %struct.malloc_chunk* %p.0, %struct.malloc_chunk** %bk572, align 4, !tbaa !0
+ %fd573 = getelementptr inbounds %struct.malloc_chunk* %p.0, i32 0, i32 2
+ store %struct.malloc_chunk* %p.0, %struct.malloc_chunk** %fd573, align 4, !tbaa !0
+ br label %if.end627
+
+if.else574: ; preds = %if.end558
+ %118 = load %struct.malloc_tree_chunk** %arrayidx559, align 4, !tbaa !0
+ %cmp576 = icmp eq i32 %I526.0, 31
+ br i1 %cmp576, label %cond.end, label %cond.false
+
+cond.false: ; preds = %if.else574
+ %shr578 = lshr i32 %I526.0, 1
+ %sub581 = sub i32 25, %shr578
+ br label %cond.end
+
+cond.end: ; preds = %cond.false, %if.else574
+ %cond = phi i32 [ %sub581, %cond.false ], [ 0, %if.else574 ]
+ %head583266 = getelementptr inbounds %struct.malloc_tree_chunk* %118, i32 0, i32 1
+ %119 = load i32* %head583266, align 4, !tbaa !3
+ %and584267 = and i32 %119, -8
+ %cmp585268 = icmp eq i32 %and584267, %psize.1
+ br i1 %cmp585268, label %if.else607, label %if.then587.lr.ph
+
+if.then587.lr.ph: ; preds = %cond.end
+ %shl582 = shl i32 %psize.1, %cond
+ br label %if.then587
+
+for.cond: ; preds = %if.then587
+ %shl592 = shl i32 %K575.0270, 1
+ %head583 = getelementptr inbounds %struct.malloc_tree_chunk* %121, i32 0, i32 1
+ %120 = load i32* %head583, align 4, !tbaa !3
+ %and584 = and i32 %120, -8
+ %cmp585 = icmp eq i32 %and584, %psize.1
+ br i1 %cmp585, label %if.else607, label %if.then587
+
+if.then587: ; preds = %for.cond, %if.then587.lr.ph
+ %K575.0270 = phi i32 [ %shl582, %if.then587.lr.ph ], [ %shl592, %for.cond ]
+ %T.0269 = phi %struct.malloc_tree_chunk* [ %118, %if.then587.lr.ph ], [ %121, %for.cond ]
+ %shr588 = lshr i32 %K575.0270, 31
+ %arrayidx591 = getelementptr inbounds %struct.malloc_tree_chunk* %T.0269, i32 0, i32 4, i32 %shr588
+ %121 = load %struct.malloc_tree_chunk** %arrayidx591, align 4, !tbaa !0
+ %cmp593 = icmp eq %struct.malloc_tree_chunk* %121, null
+ br i1 %cmp593, label %if.else596, label %for.cond
+
+if.else596: ; preds = %if.then587
+ %122 = bitcast %struct.malloc_tree_chunk** %arrayidx591 to i8*
+ %123 = load i8** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 4), align 4, !tbaa !0
+ %cmp597 = icmp ult i8* %122, %123
+ br i1 %cmp597, label %if.else605, label %if.then601, !prof !6
+
+if.then601: ; preds = %if.else596
+ store %struct.malloc_tree_chunk* %115, %struct.malloc_tree_chunk** %arrayidx591, align 4, !tbaa !0
+ %parent602 = getelementptr inbounds %struct.malloc_chunk* %p.0, i32 1, i32 2
+ %T.0.c239 = bitcast %struct.malloc_tree_chunk* %T.0269 to %struct.malloc_chunk*
+ store %struct.malloc_chunk* %T.0.c239, %struct.malloc_chunk** %parent602, align 4, !tbaa !0
+ %bk603 = getelementptr inbounds %struct.malloc_chunk* %p.0, i32 0, i32 3
+ store %struct.malloc_chunk* %p.0, %struct.malloc_chunk** %bk603, align 4, !tbaa !0
+ %fd604 = getelementptr inbounds %struct.malloc_chunk* %p.0, i32 0, i32 2
+ store %struct.malloc_chunk* %p.0, %struct.malloc_chunk** %fd604, align 4, !tbaa !0
+ br label %if.end627
+
+if.else605: ; preds = %if.else596
+ tail call void @abort() #6
+ unreachable
+
+if.else607: ; preds = %for.cond, %cond.end
+ %T.0.lcssa = phi %struct.malloc_tree_chunk* [ %118, %cond.end ], [ %121, %for.cond ]
+ %fd609 = getelementptr inbounds %struct.malloc_tree_chunk* %T.0.lcssa, i32 0, i32 2
+ %124 = load %struct.malloc_tree_chunk** %fd609, align 4, !tbaa !0
+ %125 = bitcast %struct.malloc_tree_chunk* %T.0.lcssa to i8*
+ %126 = load i8** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 4), align 4, !tbaa !0
+ %cmp610 = icmp ult i8* %125, %126
+ br i1 %cmp610, label %if.else625, label %land.rhs612
+
+land.rhs612: ; preds = %if.else607
+ %127 = bitcast %struct.malloc_tree_chunk* %124 to i8*
+ %cmp613 = icmp ult i8* %127, %126
+ br i1 %cmp613, label %if.else625, label %if.then619, !prof !6
+
+if.then619: ; preds = %land.rhs612
+ %bk620 = getelementptr inbounds %struct.malloc_tree_chunk* %124, i32 0, i32 3
+ store %struct.malloc_tree_chunk* %115, %struct.malloc_tree_chunk** %bk620, align 4, !tbaa !0
+ store %struct.malloc_tree_chunk* %115, %struct.malloc_tree_chunk** %fd609, align 4, !tbaa !0
+ %fd622 = getelementptr inbounds %struct.malloc_chunk* %p.0, i32 0, i32 2
+ %.c238 = bitcast %struct.malloc_tree_chunk* %124 to %struct.malloc_chunk*
+ store %struct.malloc_chunk* %.c238, %struct.malloc_chunk** %fd622, align 4, !tbaa !0
+ %bk623 = getelementptr inbounds %struct.malloc_chunk* %p.0, i32 0, i32 3
+ %T.0.c = bitcast %struct.malloc_tree_chunk* %T.0.lcssa to %struct.malloc_chunk*
+ store %struct.malloc_chunk* %T.0.c, %struct.malloc_chunk** %bk623, align 4, !tbaa !0
+ %parent624 = getelementptr inbounds %struct.malloc_chunk* %p.0, i32 1, i32 2
+ store %struct.malloc_chunk* null, %struct.malloc_chunk** %parent624, align 4, !tbaa !0
+ br label %if.end627
+
+if.else625: ; preds = %land.rhs612, %if.else607
+ tail call void @abort() #6
+ unreachable
+
+if.end627: ; preds = %if.then619, %if.then601, %if.then568
+ %128 = load i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 8), align 4, !tbaa !3
+ %dec = add i32 %128, -1
+ store i32 %dec, i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 8), align 4, !tbaa !3
+ %cmp628 = icmp eq i32 %dec, 0
+ br i1 %cmp628, label %while.cond.i, label %if.end635
+
+while.cond.i: ; preds = %while.cond.i, %if.end627
+ %sp.0.in.i = phi %struct.malloc_segment** [ %next4.i, %while.cond.i ], [ getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 16, i32 2), %if.end627 ]
+ %sp.0.i = load %struct.malloc_segment** %sp.0.in.i, align 4
+ %cmp.i = icmp eq %struct.malloc_segment* %sp.0.i, null
+ %next4.i = getelementptr inbounds %struct.malloc_segment* %sp.0.i, i32 0, i32 2
+ br i1 %cmp.i, label %release_unused_segments.exit, label %while.cond.i
+
+release_unused_segments.exit: ; preds = %while.cond.i
+ store i32 -1, i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 8), align 4, !tbaa !3
+ br label %if.end635
+
+erroraction: ; preds = %land.rhs227, %if.end224, %if.else, %land.rhs, %if.then
+ tail call void @abort() #6
+ unreachable
+
+if.end635: ; preds = %release_unused_segments.exit, %if.end627, %if.end519, %if.then481, %if.then253, %if.then248, %if.then242, %if.then213, %if.then10, %entry
+ ret void
+}
+
+; Function Attrs: nounwind
+define weak i8* @calloc(i32 %n_elements, i32 %elem_size) #0 {
+entry:
+ %cmp = icmp eq i32 %n_elements, 0
+ br i1 %cmp, label %if.end3, label %if.then
+
+if.then: ; preds = %entry
+ %mul = mul i32 %elem_size, %n_elements
+ %or = or i32 %elem_size, %n_elements
+ %tobool = icmp ugt i32 %or, 65535
+ br i1 %tobool, label %land.lhs.true, label %if.end3
+
+land.lhs.true: ; preds = %if.then
+ %div = udiv i32 %mul, %n_elements
+ %cmp1 = icmp eq i32 %div, %elem_size
+ %mul. = select i1 %cmp1, i32 %mul, i32 -1
+ br label %if.end3
+
+if.end3: ; preds = %land.lhs.true, %if.then, %entry
+ %req.0 = phi i32 [ %mul, %if.then ], [ 0, %entry ], [ %mul., %land.lhs.true ]
+ %call = tail call i8* @malloc(i32 %req.0)
+ %cmp4 = icmp eq i8* %call, null
+ br i1 %cmp4, label %if.end9, label %land.lhs.true5
+
+land.lhs.true5: ; preds = %if.end3
+ %head = getelementptr inbounds i8* %call, i32 -4
+ %0 = bitcast i8* %head to i32*
+ %1 = load i32* %0, align 4, !tbaa !3
+ %and6 = and i32 %1, 3
+ %cmp7 = icmp eq i32 %and6, 0
+ br i1 %cmp7, label %if.end9, label %if.then8
+
+if.then8: ; preds = %land.lhs.true5
+ tail call void @llvm.memset.p0i8.i32(i8* %call, i8 0, i32 %req.0, i32 1, i1 false)
+ br label %if.end9
+
+if.end9: ; preds = %if.then8, %land.lhs.true5, %if.end3
+ ret i8* %call
+}
+
+; Function Attrs: nounwind
+declare void @llvm.memset.p0i8.i32(i8* nocapture, i8, i32, i32, i1) #1
+
+; Function Attrs: nounwind
+define weak i8* @realloc(i8* %oldmem, i32 %bytes) #0 {
+entry:
+ %cmp = icmp eq i8* %oldmem, null
+ br i1 %cmp, label %if.then, label %if.else
+
+if.then: ; preds = %entry
+ %call = tail call i8* @malloc(i32 %bytes)
+ br label %if.end27
+
+if.else: ; preds = %entry
+ %cmp1 = icmp ugt i32 %bytes, -65
+ br i1 %cmp1, label %if.then2, label %if.else4
+
+if.then2: ; preds = %if.else
+ %call3 = tail call i32* @__errno_location() #7
+ store i32 12, i32* %call3, align 4, !tbaa !3
+ br label %if.end27
+
+if.else4: ; preds = %if.else
+ %cmp5 = icmp ult i32 %bytes, 11
+ br i1 %cmp5, label %cond.end, label %cond.false
+
+cond.false: ; preds = %if.else4
+ %add6 = add i32 %bytes, 11
+ %and = and i32 %add6, -8
+ br label %cond.end
+
+cond.end: ; preds = %cond.false, %if.else4
+ %cond = phi i32 [ %and, %cond.false ], [ 16, %if.else4 ]
+ %add.ptr = getelementptr inbounds i8* %oldmem, i32 -8
+ %0 = bitcast i8* %add.ptr to %struct.malloc_chunk*
+ %call7 = tail call fastcc %struct.malloc_chunk* @try_realloc_chunk(%struct.malloc_chunk* %0, i32 %cond)
+ %cmp8 = icmp eq %struct.malloc_chunk* %call7, null
+ br i1 %cmp8, label %if.else11, label %if.then9
+
+if.then9: ; preds = %cond.end
+ %add.ptr10 = getelementptr inbounds %struct.malloc_chunk* %call7, i32 0, i32 2
+ %1 = bitcast %struct.malloc_chunk** %add.ptr10 to i8*
+ br label %if.end27
+
+if.else11: ; preds = %cond.end
+ %call12 = tail call i8* @malloc(i32 %bytes)
+ %cmp13 = icmp eq i8* %call12, null
+ br i1 %cmp13, label %if.end27, label %if.then14
+
+if.then14: ; preds = %if.else11
+ %head = getelementptr inbounds i8* %oldmem, i32 -4
+ %2 = bitcast i8* %head to i32*
+ %3 = load i32* %2, align 4, !tbaa !3
+ %and15 = and i32 %3, -8
+ %and17 = and i32 %3, 3
+ %cmp18 = icmp eq i32 %and17, 0
+ %cond19 = select i1 %cmp18, i32 8, i32 4
+ %sub = sub i32 %and15, %cond19
+ %cmp20 = icmp ult i32 %sub, %bytes
+ %cond24 = select i1 %cmp20, i32 %sub, i32 %bytes
+ tail call void @llvm.memcpy.p0i8.p0i8.i32(i8* %call12, i8* %oldmem, i32 %cond24, i32 1, i1 false)
+ tail call void @free(i8* %oldmem)
+ br label %if.end27
+
+if.end27: ; preds = %if.then14, %if.else11, %if.then9, %if.then2, %if.then
+ %mem.0 = phi i8* [ %call, %if.then ], [ null, %if.then2 ], [ %1, %if.then9 ], [ %call12, %if.then14 ], [ null, %if.else11 ]
+ ret i8* %mem.0
+}
+
+; Function Attrs: nounwind readnone
+declare i32* @__errno_location() #3
+
+; Function Attrs: nounwind
+define internal fastcc %struct.malloc_chunk* @try_realloc_chunk(%struct.malloc_chunk* %p, i32 %nb) #0 {
+entry:
+ %head = getelementptr inbounds %struct.malloc_chunk* %p, i32 0, i32 1
+ %0 = load i32* %head, align 4, !tbaa !3
+ %and = and i32 %0, -8
+ %1 = bitcast %struct.malloc_chunk* %p to i8*
+ %add.ptr = getelementptr inbounds i8* %1, i32 %and
+ %2 = bitcast i8* %add.ptr to %struct.malloc_chunk*
+ %3 = load i8** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 4), align 4, !tbaa !0
+ %cmp = icmp ult i8* %1, %3
+ br i1 %cmp, label %if.else327, label %land.lhs.true
+
+land.lhs.true: ; preds = %entry
+ %and2 = and i32 %0, 3
+ %cmp3 = icmp ne i32 %and2, 1
+ %cmp5 = icmp ult i8* %1, %add.ptr
+ %or.cond = and i1 %cmp3, %cmp5
+ br i1 %or.cond, label %land.rhs, label %if.else327
+
+land.rhs: ; preds = %land.lhs.true
+ %add.ptr.sum1516 = or i32 %and, 4
+ %head6 = getelementptr inbounds i8* %1, i32 %add.ptr.sum1516
+ %4 = bitcast i8* %head6 to i32*
+ %5 = load i32* %4, align 4, !tbaa !3
+ %and7 = and i32 %5, 1
+ %tobool = icmp eq i32 %and7, 0
+ br i1 %tobool, label %if.else327, label %if.then, !prof !6
+
+if.then: ; preds = %land.rhs
+ %cmp11 = icmp eq i32 %and2, 0
+ br i1 %cmp11, label %if.then12, label %if.else
+
+if.then12: ; preds = %if.then
+ %cmp.i = icmp ult i32 %nb, 256
+ br i1 %cmp.i, label %if.end328, label %if.end.i
+
+if.end.i: ; preds = %if.then12
+ %add.i = add i32 %nb, 4
+ %cmp1.i = icmp ult i32 %and, %add.i
+ br i1 %cmp1.i, label %if.end34.i, label %land.lhs.true.i
+
+land.lhs.true.i: ; preds = %if.end.i
+ %sub.i = sub i32 %and, %nb
+ %6 = load i32* getelementptr inbounds (%struct.malloc_params* @mparams, i32 0, i32 2), align 4, !tbaa !3
+ %shl.i = shl i32 %6, 1
+ %cmp2.i = icmp ugt i32 %sub.i, %shl.i
+ br i1 %cmp2.i, label %if.end34.i, label %if.end328
+
+if.end34.i: ; preds = %land.lhs.true.i, %if.end.i
+ br label %if.end328
+
+if.else: ; preds = %if.then
+ %cmp13 = icmp ult i32 %and, %nb
+ br i1 %cmp13, label %if.else33, label %if.then14
+
+if.then14: ; preds = %if.else
+ %sub = sub i32 %and, %nb
+ %cmp15 = icmp ugt i32 %sub, 15
+ br i1 %cmp15, label %if.then16, label %if.end328
+
+if.then16: ; preds = %if.then14
+ %add.ptr17 = getelementptr inbounds i8* %1, i32 %nb
+ %7 = bitcast i8* %add.ptr17 to %struct.malloc_chunk*
+ %and19 = and i32 %0, 1
+ %or = or i32 %and19, %nb
+ %or20 = or i32 %or, 2
+ store i32 %or20, i32* %head, align 4, !tbaa !3
+ %add.ptr17.sum = add i32 %nb, 4
+ %head23 = getelementptr inbounds i8* %1, i32 %add.ptr17.sum
+ %8 = bitcast i8* %head23 to i32*
+ %or28 = or i32 %sub, 3
+ store i32 %or28, i32* %8, align 4, !tbaa !3
+ %9 = load i32* %4, align 4, !tbaa !3
+ %or32 = or i32 %9, 1
+ store i32 %or32, i32* %4, align 4, !tbaa !3
+ tail call fastcc void @dispose_chunk(%struct.malloc_chunk* %7, i32 %sub)
+ br label %if.end328
+
+if.else33: ; preds = %if.else
+ %10 = load %struct.malloc_chunk** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 6), align 4, !tbaa !0
+ %cmp34 = icmp eq %struct.malloc_chunk* %2, %10
+ br i1 %cmp34, label %if.then35, label %if.else55
+
+if.then35: ; preds = %if.else33
+ %11 = load i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 3), align 4, !tbaa !3
+ %add = add i32 %11, %and
+ %cmp36 = icmp ugt i32 %add, %nb
+ br i1 %cmp36, label %if.then37, label %if.end328
+
+if.then37: ; preds = %if.then35
+ %sub40 = sub i32 %add, %nb
+ %add.ptr41 = getelementptr inbounds i8* %1, i32 %nb
+ %12 = bitcast i8* %add.ptr41 to %struct.malloc_chunk*
+ %and43 = and i32 %0, 1
+ %or44 = or i32 %and43, %nb
+ %or45 = or i32 %or44, 2
+ store i32 %or45, i32* %head, align 4, !tbaa !3
+ %add.ptr41.sum = add i32 %nb, 4
+ %head48 = getelementptr inbounds i8* %1, i32 %add.ptr41.sum
+ %13 = bitcast i8* %head48 to i32*
+ %or50 = or i32 %sub40, 1
+ store i32 %or50, i32* %13, align 4, !tbaa !3
+ store %struct.malloc_chunk* %12, %struct.malloc_chunk** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 6), align 4, !tbaa !0
+ store i32 %sub40, i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 3), align 4, !tbaa !3
+ br label %if.end328
+
+if.else55: ; preds = %if.else33
+ %14 = load %struct.malloc_chunk** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 5), align 4, !tbaa !0
+ %cmp56 = icmp eq %struct.malloc_chunk* %2, %14
+ br i1 %cmp56, label %if.then57, label %if.else98
+
+if.then57: ; preds = %if.else55
+ %15 = load i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 2), align 4, !tbaa !3
+ %add58 = add i32 %15, %and
+ %cmp59 = icmp ult i32 %add58, %nb
+ br i1 %cmp59, label %if.end328, label %if.then60
+
+if.then60: ; preds = %if.then57
+ %sub62 = sub i32 %add58, %nb
+ %cmp63 = icmp ugt i32 %sub62, 15
+ br i1 %cmp63, label %if.then64, label %if.else83
+
+if.then64: ; preds = %if.then60
+ %add.ptr66 = getelementptr inbounds i8* %1, i32 %nb
+ %16 = bitcast i8* %add.ptr66 to %struct.malloc_chunk*
+ %add.ptr67 = getelementptr inbounds i8* %1, i32 %add58
+ %and69 = and i32 %0, 1
+ %or70 = or i32 %and69, %nb
+ %or71 = or i32 %or70, 2
+ store i32 %or71, i32* %head, align 4, !tbaa !3
+ %add.ptr66.sum = add i32 %nb, 4
+ %head74 = getelementptr inbounds i8* %1, i32 %add.ptr66.sum
+ %17 = bitcast i8* %head74 to i32*
+ %or76 = or i32 %sub62, 1
+ store i32 %or76, i32* %17, align 4, !tbaa !3
+ %prev_foot = bitcast i8* %add.ptr67 to i32*
+ store i32 %sub62, i32* %prev_foot, align 4, !tbaa !3
+ %add.ptr67.sum = add i32 %add58, 4
+ %head79 = getelementptr inbounds i8* %1, i32 %add.ptr67.sum
+ %18 = bitcast i8* %head79 to i32*
+ %19 = load i32* %18, align 4, !tbaa !3
+ %and80 = and i32 %19, -2
+ store i32 %and80, i32* %18, align 4, !tbaa !3
+ br label %if.end96
+
+if.else83: ; preds = %if.then60
+ %and87 = and i32 %0, 1
+ %or88 = or i32 %and87, %add58
+ %or89 = or i32 %or88, 2
+ store i32 %or89, i32* %head, align 4, !tbaa !3
+ %add.ptr91.sum = add i32 %add58, 4
+ %head92 = getelementptr inbounds i8* %1, i32 %add.ptr91.sum
+ %20 = bitcast i8* %head92 to i32*
+ %21 = load i32* %20, align 4, !tbaa !3
+ %or93 = or i32 %21, 1
+ store i32 %or93, i32* %20, align 4, !tbaa !3
+ br label %if.end96
+
+if.end96: ; preds = %if.else83, %if.then64
+ %storemerge12 = phi i32 [ %sub62, %if.then64 ], [ 0, %if.else83 ]
+ %storemerge = phi %struct.malloc_chunk* [ %16, %if.then64 ], [ null, %if.else83 ]
+ store i32 %storemerge12, i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 2), align 4, !tbaa !3
+ store %struct.malloc_chunk* %storemerge, %struct.malloc_chunk** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 5), align 4, !tbaa !0
+ br label %if.end328
+
+if.else98: ; preds = %if.else55
+ %and100 = and i32 %5, 2
+ %tobool101 = icmp eq i32 %and100, 0
+ br i1 %tobool101, label %if.then102, label %if.end328
+
+if.then102: ; preds = %if.else98
+ %and104 = and i32 %5, -8
+ %add105 = add i32 %and104, %and
+ %cmp106 = icmp ult i32 %add105, %nb
+ br i1 %cmp106, label %if.end328, label %if.then107
+
+if.then107: ; preds = %if.then102
+ %sub110 = sub i32 %add105, %nb
+ %shr = lshr i32 %5, 3
+ %cmp111 = icmp ult i32 %5, 256
+ br i1 %cmp111, label %if.then112, label %if.else154
+
+if.then112: ; preds = %if.then107
+ %add.ptr.sum10 = add i32 %and, 8
+ %fd = getelementptr inbounds i8* %1, i32 %add.ptr.sum10
+ %22 = bitcast i8* %fd to %struct.malloc_chunk**
+ %23 = load %struct.malloc_chunk** %22, align 4, !tbaa !0
+ %add.ptr.sum11 = add i32 %and, 12
+ %bk = getelementptr inbounds i8* %1, i32 %add.ptr.sum11
+ %24 = bitcast i8* %bk to %struct.malloc_chunk**
+ %25 = load %struct.malloc_chunk** %24, align 4, !tbaa !0
+ %shl = shl nuw nsw i32 %shr, 1
+ %arrayidx = getelementptr inbounds %struct.malloc_state* @_gm_, i32 0, i32 10, i32 %shl
+ %26 = bitcast %struct.malloc_chunk** %arrayidx to %struct.malloc_chunk*
+ %cmp114 = icmp eq %struct.malloc_chunk* %23, %26
+ br i1 %cmp114, label %if.then124, label %lor.rhs
+
+lor.rhs: ; preds = %if.then112
+ %27 = bitcast %struct.malloc_chunk* %23 to i8*
+ %cmp116 = icmp ult i8* %27, %3
+ br i1 %cmp116, label %if.else152, label %land.rhs117
+
+land.rhs117: ; preds = %lor.rhs
+ %bk118 = getelementptr inbounds %struct.malloc_chunk* %23, i32 0, i32 3
+ %28 = load %struct.malloc_chunk** %bk118, align 4, !tbaa !0
+ %cmp119 = icmp eq %struct.malloc_chunk* %28, %2
+ br i1 %cmp119, label %if.then124, label %if.else152, !prof !5
+
+if.then124: ; preds = %land.rhs117, %if.then112
+ %cmp125 = icmp eq %struct.malloc_chunk* %25, %23
+ br i1 %cmp125, label %if.then126, label %if.else129
+
+if.then126: ; preds = %if.then124
+ %shl127 = shl i32 1, %shr
+ %neg = xor i32 %shl127, -1
+ %29 = load i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 0), align 4, !tbaa !3
+ %and128 = and i32 %29, %neg
+ store i32 %and128, i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 0), align 4, !tbaa !3
+ br label %if.end287
+
+if.else129: ; preds = %if.then124
+ %cmp133 = icmp eq %struct.malloc_chunk* %25, %26
+ br i1 %cmp133, label %if.else129.if.then146_crit_edge, label %lor.rhs134
+
+if.else129.if.then146_crit_edge: ; preds = %if.else129
+ %fd148.pre = getelementptr inbounds %struct.malloc_chunk* %25, i32 0, i32 2
+ br label %if.then146
+
+lor.rhs134: ; preds = %if.else129
+ %30 = bitcast %struct.malloc_chunk* %25 to i8*
+ %cmp136 = icmp ult i8* %30, %3
+ br i1 %cmp136, label %if.else149, label %land.rhs137
+
+land.rhs137: ; preds = %lor.rhs134
+ %fd138 = getelementptr inbounds %struct.malloc_chunk* %25, i32 0, i32 2
+ %31 = load %struct.malloc_chunk** %fd138, align 4, !tbaa !0
+ %cmp139 = icmp eq %struct.malloc_chunk* %31, %2
+ br i1 %cmp139, label %if.then146, label %if.else149, !prof !5
+
+if.then146: ; preds = %land.rhs137, %if.else129.if.then146_crit_edge
+ %fd148.pre-phi = phi %struct.malloc_chunk** [ %fd148.pre, %if.else129.if.then146_crit_edge ], [ %fd138, %land.rhs137 ]
+ %bk147 = getelementptr inbounds %struct.malloc_chunk* %23, i32 0, i32 3
+ store %struct.malloc_chunk* %25, %struct.malloc_chunk** %bk147, align 4, !tbaa !0
+ store %struct.malloc_chunk* %23, %struct.malloc_chunk** %fd148.pre-phi, align 4, !tbaa !0
+ br label %if.end287
+
+if.else149: ; preds = %land.rhs137, %lor.rhs134
+ tail call void @abort() #6
+ unreachable
+
+if.else152: ; preds = %land.rhs117, %lor.rhs
+ tail call void @abort() #6
+ unreachable
+
+if.else154: ; preds = %if.then107
+ %32 = bitcast i8* %add.ptr to %struct.malloc_tree_chunk*
+ %add.ptr.sum = add i32 %and, 24
+ %parent = getelementptr inbounds i8* %1, i32 %add.ptr.sum
+ %33 = bitcast i8* %parent to %struct.malloc_tree_chunk**
+ %34 = load %struct.malloc_tree_chunk** %33, align 4, !tbaa !0
+ %add.ptr.sum2 = add i32 %and, 12
+ %bk155 = getelementptr inbounds i8* %1, i32 %add.ptr.sum2
+ %35 = bitcast i8* %bk155 to %struct.malloc_tree_chunk**
+ %36 = load %struct.malloc_tree_chunk** %35, align 4, !tbaa !0
+ %cmp156 = icmp eq %struct.malloc_tree_chunk* %36, %32
+ br i1 %cmp156, label %if.else178, label %if.then157
+
+if.then157: ; preds = %if.else154
+ %add.ptr.sum9 = add i32 %and, 8
+ %fd159 = getelementptr inbounds i8* %1, i32 %add.ptr.sum9
+ %37 = bitcast i8* %fd159 to %struct.malloc_tree_chunk**
+ %38 = load %struct.malloc_tree_chunk** %37, align 4, !tbaa !0
+ %39 = bitcast %struct.malloc_tree_chunk* %38 to i8*
+ %cmp162 = icmp ult i8* %39, %3
+ br i1 %cmp162, label %if.else176, label %land.lhs.true163
+
+land.lhs.true163: ; preds = %if.then157
+ %bk164 = getelementptr inbounds %struct.malloc_tree_chunk* %38, i32 0, i32 3
+ %40 = load %struct.malloc_tree_chunk** %bk164, align 4, !tbaa !0
+ %cmp165 = icmp eq %struct.malloc_tree_chunk* %40, %32
+ br i1 %cmp165, label %land.rhs166, label %if.else176
+
+land.rhs166: ; preds = %land.lhs.true163
+ %fd167 = getelementptr inbounds %struct.malloc_tree_chunk* %36, i32 0, i32 2
+ %41 = load %struct.malloc_tree_chunk** %fd167, align 4, !tbaa !0
+ %cmp168 = icmp eq %struct.malloc_tree_chunk* %41, %32
+ br i1 %cmp168, label %if.then173, label %if.else176, !prof !5
+
+if.then173: ; preds = %land.rhs166
+ store %struct.malloc_tree_chunk* %36, %struct.malloc_tree_chunk** %bk164, align 4, !tbaa !0
+ store %struct.malloc_tree_chunk* %38, %struct.malloc_tree_chunk** %fd167, align 4, !tbaa !0
+ br label %if.end202
+
+if.else176: ; preds = %land.rhs166, %land.lhs.true163, %if.then157
+ tail call void @abort() #6
+ unreachable
+
+if.else178: ; preds = %if.else154
+ %child.sum = add i32 %and, 20
+ %arrayidx179 = getelementptr inbounds i8* %1, i32 %child.sum
+ %42 = bitcast i8* %arrayidx179 to %struct.malloc_tree_chunk**
+ %43 = load %struct.malloc_tree_chunk** %42, align 4, !tbaa !0
+ %cmp180 = icmp eq %struct.malloc_tree_chunk* %43, null
+ br i1 %cmp180, label %lor.lhs.false, label %while.cond
+
+lor.lhs.false: ; preds = %if.else178
+ %add.ptr.sum3 = add i32 %and, 16
+ %child = getelementptr inbounds i8* %1, i32 %add.ptr.sum3
+ %arrayidx182 = bitcast i8* %child to %struct.malloc_tree_chunk**
+ %44 = load %struct.malloc_tree_chunk** %arrayidx182, align 4, !tbaa !0
+ %cmp183 = icmp eq %struct.malloc_tree_chunk* %44, null
+ br i1 %cmp183, label %if.end202, label %while.cond
+
+while.cond: ; preds = %lor.rhs188, %while.cond, %lor.lhs.false, %if.else178
+ %RP.0 = phi %struct.malloc_tree_chunk** [ %arrayidx182, %lor.lhs.false ], [ %42, %if.else178 ], [ %arrayidx186, %while.cond ], [ %arrayidx190, %lor.rhs188 ]
+ %R.0 = phi %struct.malloc_tree_chunk* [ %44, %lor.lhs.false ], [ %43, %if.else178 ], [ %45, %while.cond ], [ %46, %lor.rhs188 ]
+ %arrayidx186 = getelementptr inbounds %struct.malloc_tree_chunk* %R.0, i32 0, i32 4, i32 1
+ %45 = load %struct.malloc_tree_chunk** %arrayidx186, align 4, !tbaa !0
+ %cmp187 = icmp eq %struct.malloc_tree_chunk* %45, null
+ br i1 %cmp187, label %lor.rhs188, label %while.cond
+
+lor.rhs188: ; preds = %while.cond
+ %arrayidx190 = getelementptr inbounds %struct.malloc_tree_chunk* %R.0, i32 0, i32 4, i32 0
+ %46 = load %struct.malloc_tree_chunk** %arrayidx190, align 4, !tbaa !0
+ %cmp191 = icmp eq %struct.malloc_tree_chunk* %46, null
+ br i1 %cmp191, label %while.end, label %while.cond
+
+while.end: ; preds = %lor.rhs188
+ %47 = bitcast %struct.malloc_tree_chunk** %RP.0 to i8*
+ %cmp195 = icmp ult i8* %47, %3
+ br i1 %cmp195, label %if.else199, label %if.then198, !prof !6
+
+if.then198: ; preds = %while.end
+ store %struct.malloc_tree_chunk* null, %struct.malloc_tree_chunk** %RP.0, align 4, !tbaa !0
+ br label %if.end202
+
+if.else199: ; preds = %while.end
+ tail call void @abort() #6
+ unreachable
+
+if.end202: ; preds = %if.then198, %lor.lhs.false, %if.then173
+ %R.1 = phi %struct.malloc_tree_chunk* [ %36, %if.then173 ], [ %R.0, %if.then198 ], [ null, %lor.lhs.false ]
+ %cmp203 = icmp eq %struct.malloc_tree_chunk* %34, null
+ br i1 %cmp203, label %if.end287, label %if.then205
+
+if.then205: ; preds = %if.end202
+ %add.ptr.sum7 = add i32 %and, 28
+ %index = getelementptr inbounds i8* %1, i32 %add.ptr.sum7
+ %48 = bitcast i8* %index to i32*
+ %49 = load i32* %48, align 4, !tbaa !3
+ %arrayidx206 = getelementptr inbounds %struct.malloc_state* @_gm_, i32 0, i32 11, i32 %49
+ %50 = load %struct.malloc_tree_chunk** %arrayidx206, align 4, !tbaa !0
+ %cmp207 = icmp eq %struct.malloc_tree_chunk* %32, %50
+ br i1 %cmp207, label %if.then209, label %if.else218
+
+if.then209: ; preds = %if.then205
+ store %struct.malloc_tree_chunk* %R.1, %struct.malloc_tree_chunk** %arrayidx206, align 4, !tbaa !0
+ %cond = icmp eq %struct.malloc_tree_chunk* %R.1, null
+ br i1 %cond, label %if.end238.thread, label %if.then241
+
+if.end238.thread: ; preds = %if.then209
+ %shl214 = shl i32 1, %49
+ %neg215 = xor i32 %shl214, -1
+ %51 = load i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 1), align 4, !tbaa !3
+ %and216 = and i32 %51, %neg215
+ store i32 %and216, i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 1), align 4, !tbaa !3
+ br label %if.end287
+
+if.else218: ; preds = %if.then205
+ %52 = bitcast %struct.malloc_tree_chunk* %34 to i8*
+ %53 = load i8** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 4), align 4, !tbaa !0
+ %cmp220 = icmp ult i8* %52, %53
+ br i1 %cmp220, label %if.else236, label %if.then224, !prof !6
+
+if.then224: ; preds = %if.else218
+ %arrayidx226 = getelementptr inbounds %struct.malloc_tree_chunk* %34, i32 0, i32 4, i32 0
+ %54 = load %struct.malloc_tree_chunk** %arrayidx226, align 4, !tbaa !0
+ %cmp227 = icmp eq %struct.malloc_tree_chunk* %54, %32
+ br i1 %cmp227, label %if.then229, label %if.else232
+
+if.then229: ; preds = %if.then224
+ store %struct.malloc_tree_chunk* %R.1, %struct.malloc_tree_chunk** %arrayidx226, align 4, !tbaa !0
+ br label %if.end238
+
+if.else232: ; preds = %if.then224
+ %arrayidx234 = getelementptr inbounds %struct.malloc_tree_chunk* %34, i32 0, i32 4, i32 1
+ store %struct.malloc_tree_chunk* %R.1, %struct.malloc_tree_chunk** %arrayidx234, align 4, !tbaa !0
+ br label %if.end238
+
+if.else236: ; preds = %if.else218
+ tail call void @abort() #6
+ unreachable
+
+if.end238: ; preds = %if.else232, %if.then229
+ %cmp239 = icmp eq %struct.malloc_tree_chunk* %R.1, null
+ br i1 %cmp239, label %if.end287, label %if.then241
+
+if.then241: ; preds = %if.end238, %if.then209
+ %55 = bitcast %struct.malloc_tree_chunk* %R.1 to i8*
+ %56 = load i8** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 4), align 4, !tbaa !0
+ %cmp243 = icmp ult i8* %55, %56
+ br i1 %cmp243, label %if.else283, label %if.then247, !prof !6
+
+if.then247: ; preds = %if.then241
+ %parent248 = getelementptr inbounds %struct.malloc_tree_chunk* %R.1, i32 0, i32 5
+ store %struct.malloc_tree_chunk* %34, %struct.malloc_tree_chunk** %parent248, align 4, !tbaa !0
+ %add.ptr.sum8 = add i32 %and, 16
+ %child249 = getelementptr inbounds i8* %1, i32 %add.ptr.sum8
+ %arrayidx250 = bitcast i8* %child249 to %struct.malloc_tree_chunk**
+ %57 = load %struct.malloc_tree_chunk** %arrayidx250, align 4, !tbaa !0
+ %cmp251 = icmp eq %struct.malloc_tree_chunk* %57, null
+ br i1 %cmp251, label %if.end265, label %if.then253
+
+if.then253: ; preds = %if.then247
+ %58 = bitcast %struct.malloc_tree_chunk* %57 to i8*
+ %59 = load i8** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 4), align 4, !tbaa !0
+ %cmp255 = icmp ult i8* %58, %59
+ br i1 %cmp255, label %if.else263, label %if.then259, !prof !6
+
+if.then259: ; preds = %if.then253
+ %arrayidx261 = getelementptr inbounds %struct.malloc_tree_chunk* %R.1, i32 0, i32 4, i32 0
+ store %struct.malloc_tree_chunk* %57, %struct.malloc_tree_chunk** %arrayidx261, align 4, !tbaa !0
+ %parent262 = getelementptr inbounds %struct.malloc_tree_chunk* %57, i32 0, i32 5
+ store %struct.malloc_tree_chunk* %R.1, %struct.malloc_tree_chunk** %parent262, align 4, !tbaa !0
+ br label %if.end265
+
+if.else263: ; preds = %if.then253
+ tail call void @abort() #6
+ unreachable
+
+if.end265: ; preds = %if.then259, %if.then247
+ %child249.sum = add i32 %and, 20
+ %arrayidx267 = getelementptr inbounds i8* %1, i32 %child249.sum
+ %60 = bitcast i8* %arrayidx267 to %struct.malloc_tree_chunk**
+ %61 = load %struct.malloc_tree_chunk** %60, align 4, !tbaa !0
+ %cmp268 = icmp eq %struct.malloc_tree_chunk* %61, null
+ br i1 %cmp268, label %if.end287, label %if.then270
+
+if.then270: ; preds = %if.end265
+ %62 = bitcast %struct.malloc_tree_chunk* %61 to i8*
+ %63 = load i8** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 4), align 4, !tbaa !0
+ %cmp272 = icmp ult i8* %62, %63
+ br i1 %cmp272, label %if.else280, label %if.then276, !prof !6
+
+if.then276: ; preds = %if.then270
+ %arrayidx278 = getelementptr inbounds %struct.malloc_tree_chunk* %R.1, i32 0, i32 4, i32 1
+ store %struct.malloc_tree_chunk* %61, %struct.malloc_tree_chunk** %arrayidx278, align 4, !tbaa !0
+ %parent279 = getelementptr inbounds %struct.malloc_tree_chunk* %61, i32 0, i32 5
+ store %struct.malloc_tree_chunk* %R.1, %struct.malloc_tree_chunk** %parent279, align 4, !tbaa !0
+ br label %if.end287
+
+if.else280: ; preds = %if.then270
+ tail call void @abort() #6
+ unreachable
+
+if.else283: ; preds = %if.then241
+ tail call void @abort() #6
+ unreachable
+
+if.end287: ; preds = %if.then276, %if.end265, %if.end238, %if.end238.thread, %if.end202, %if.then146, %if.then126
+ %cmp288 = icmp ult i32 %sub110, 16
+ br i1 %cmp288, label %if.then290, label %if.else301
+
+if.then290: ; preds = %if.end287
+ %64 = load i32* %head, align 4, !tbaa !3
+ %and294 = and i32 %64, 1
+ %or295 = or i32 %add105, %and294
+ %or296 = or i32 %or295, 2
+ store i32 %or296, i32* %head, align 4, !tbaa !3
+ %add.ptr298.sum6 = or i32 %add105, 4
+ %head299 = getelementptr inbounds i8* %1, i32 %add.ptr298.sum6
+ %65 = bitcast i8* %head299 to i32*
+ %66 = load i32* %65, align 4, !tbaa !3
+ %or300 = or i32 %66, 1
+ store i32 %or300, i32* %65, align 4, !tbaa !3
+ br label %if.end328
+
+if.else301: ; preds = %if.end287
+ %add.ptr303 = getelementptr inbounds i8* %1, i32 %nb
+ %67 = bitcast i8* %add.ptr303 to %struct.malloc_chunk*
+ %68 = load i32* %head, align 4, !tbaa !3
+ %and305 = and i32 %68, 1
+ %or306 = or i32 %and305, %nb
+ %or307 = or i32 %or306, 2
+ store i32 %or307, i32* %head, align 4, !tbaa !3
+ %add.ptr303.sum = add i32 %nb, 4
+ %head310 = getelementptr inbounds i8* %1, i32 %add.ptr303.sum
+ %69 = bitcast i8* %head310 to i32*
+ %or315 = or i32 %sub110, 3
+ store i32 %or315, i32* %69, align 4, !tbaa !3
+ %add.ptr317.sum5 = or i32 %add105, 4
+ %head318 = getelementptr inbounds i8* %1, i32 %add.ptr317.sum5
+ %70 = bitcast i8* %head318 to i32*
+ %71 = load i32* %70, align 4, !tbaa !3
+ %or319 = or i32 %71, 1
+ store i32 %or319, i32* %70, align 4, !tbaa !3
+ tail call fastcc void @dispose_chunk(%struct.malloc_chunk* %67, i32 %sub110)
+ br label %if.end328
+
+if.else327: ; preds = %land.rhs, %land.lhs.true, %entry
+ tail call void @abort() #6
+ unreachable
+
+if.end328: ; preds = %if.else301, %if.then290, %if.then102, %if.else98, %if.end96, %if.then57, %if.then37, %if.then35, %if.then16, %if.then14, %if.end34.i, %land.lhs.true.i, %if.then12
+ %newp.0 = phi %struct.malloc_chunk* [ %p, %if.then37 ], [ null, %if.then35 ], [ %p, %if.end96 ], [ null, %if.then57 ], [ null, %if.else98 ], [ null, %if.then102 ], [ %p, %if.then16 ], [ %p, %if.then14 ], [ %p, %if.else301 ], [ %p, %if.then290 ], [ null, %if.end34.i ], [ null, %if.then12 ], [ %p, %land.lhs.true.i ]
+ ret %struct.malloc_chunk* %newp.0
+}
+
+; Function Attrs: nounwind
+define weak i8* @realloc_in_place(i8* %oldmem, i32 %bytes) #0 {
+entry:
+ %cmp = icmp eq i8* %oldmem, null
+ br i1 %cmp, label %if.end9, label %if.then
+
+if.then: ; preds = %entry
+ %cmp1 = icmp ugt i32 %bytes, -65
+ br i1 %cmp1, label %if.then2, label %if.else
+
+if.then2: ; preds = %if.then
+ %call = tail call i32* @__errno_location() #7
+ store i32 12, i32* %call, align 4, !tbaa !3
+ br label %if.end9
+
+if.else: ; preds = %if.then
+ %cmp3 = icmp ult i32 %bytes, 11
+ br i1 %cmp3, label %cond.end, label %cond.false
+
+cond.false: ; preds = %if.else
+ %add4 = add i32 %bytes, 11
+ %and = and i32 %add4, -8
+ br label %cond.end
+
+cond.end: ; preds = %cond.false, %if.else
+ %cond = phi i32 [ %and, %cond.false ], [ 16, %if.else ]
+ %add.ptr = getelementptr inbounds i8* %oldmem, i32 -8
+ %0 = bitcast i8* %add.ptr to %struct.malloc_chunk*
+ %call5 = tail call fastcc %struct.malloc_chunk* @try_realloc_chunk(%struct.malloc_chunk* %0, i32 %cond)
+ %cmp6 = icmp eq %struct.malloc_chunk* %call5, %0
+ %oldmem. = select i1 %cmp6, i8* %oldmem, i8* null
+ ret i8* %oldmem.
+
+if.end9: ; preds = %if.then2, %entry
+ ret i8* null
+}
+
+; Function Attrs: nounwind
+define weak i8* @memalign(i32 %alignment, i32 %bytes) #0 {
+entry:
+ %cmp = icmp ult i32 %alignment, 9
+ br i1 %cmp, label %if.then, label %if.end
+
+if.then: ; preds = %entry
+ %call = tail call i8* @malloc(i32 %bytes)
+ br label %return
+
+if.end: ; preds = %entry
+ %call1 = tail call fastcc i8* @internal_memalign(i32 %alignment, i32 %bytes)
+ br label %return
+
+return: ; preds = %if.end, %if.then
+ %retval.0 = phi i8* [ %call, %if.then ], [ %call1, %if.end ]
+ ret i8* %retval.0
+}
+
+; Function Attrs: nounwind
+define internal fastcc i8* @internal_memalign(i32 %alignment, i32 %bytes) #0 {
+entry:
+ %cmp = icmp ult i32 %alignment, 16
+ %.alignment = select i1 %cmp, i32 16, i32 %alignment
+ %sub = add i32 %.alignment, -1
+ %and = and i32 %sub, %.alignment
+ %cmp1 = icmp eq i32 %and, 0
+ br i1 %cmp1, label %if.end4, label %while.cond
+
+while.cond: ; preds = %while.cond, %entry
+ %a.0 = phi i32 [ %shl, %while.cond ], [ 16, %entry ]
+ %cmp3 = icmp ult i32 %a.0, %.alignment
+ %shl = shl i32 %a.0, 1
+ br i1 %cmp3, label %while.cond, label %if.end4
+
+if.end4: ; preds = %while.cond, %entry
+ %alignment.addr.1 = phi i32 [ %.alignment, %entry ], [ %a.0, %while.cond ]
+ %sub5 = sub i32 -64, %alignment.addr.1
+ %cmp6 = icmp ugt i32 %sub5, %bytes
+ br i1 %cmp6, label %if.else, label %if.then9
+
+if.then9: ; preds = %if.end4
+ %call = tail call i32* @__errno_location() #7
+ store i32 12, i32* %call, align 4, !tbaa !3
+ br label %if.end96
+
+if.else: ; preds = %if.end4
+ %cmp11 = icmp ult i32 %bytes, 11
+ br i1 %cmp11, label %cond.end, label %cond.false
+
+cond.false: ; preds = %if.else
+ %add12 = add i32 %bytes, 11
+ %and13 = and i32 %add12, -8
+ br label %cond.end
+
+cond.end: ; preds = %cond.false, %if.else
+ %cond = phi i32 [ %and13, %cond.false ], [ 16, %if.else ]
+ %add14 = add i32 %alignment.addr.1, 12
+ %sub16 = add i32 %add14, %cond
+ %call17 = tail call i8* @malloc(i32 %sub16)
+ %cmp18 = icmp eq i8* %call17, null
+ br i1 %cmp18, label %if.end96, label %if.then19
+
+if.then19: ; preds = %cond.end
+ %add.ptr = getelementptr inbounds i8* %call17, i32 -8
+ %0 = bitcast i8* %add.ptr to %struct.malloc_chunk*
+ %1 = ptrtoint i8* %call17 to i32
+ %sub20 = add i32 %alignment.addr.1, -1
+ %and21 = and i32 %1, %sub20
+ %cmp22 = icmp eq i32 %and21, 0
+ br i1 %cmp22, label %if.end64, label %if.then23
+
+if.then23: ; preds = %if.then19
+ %add.ptr25 = getelementptr inbounds i8* %call17, i32 %sub20
+ %2 = ptrtoint i8* %add.ptr25 to i32
+ %sub26 = sub i32 0, %alignment.addr.1
+ %and27 = and i32 %2, %sub26
+ %3 = inttoptr i32 %and27 to i8*
+ %add.ptr28 = getelementptr inbounds i8* %3, i32 -8
+ %sub.ptr.lhs.cast = ptrtoint i8* %add.ptr28 to i32
+ %sub.ptr.rhs.cast = ptrtoint i8* %add.ptr to i32
+ %sub.ptr.sub = sub i32 %sub.ptr.lhs.cast, %sub.ptr.rhs.cast
+ %cmp29 = icmp ugt i32 %sub.ptr.sub, 15
+ br i1 %cmp29, label %cond.end33, label %cond.false31
+
+cond.false31: ; preds = %if.then23
+ %add.ptr28.sum = add i32 %alignment.addr.1, -8
+ %add.ptr32 = getelementptr inbounds i8* %3, i32 %add.ptr28.sum
+ br label %cond.end33
+
+cond.end33: ; preds = %cond.false31, %if.then23
+ %cond34 = phi i8* [ %add.ptr32, %cond.false31 ], [ %add.ptr28, %if.then23 ]
+ %4 = bitcast i8* %cond34 to %struct.malloc_chunk*
+ %sub.ptr.lhs.cast35 = ptrtoint i8* %cond34 to i32
+ %sub.ptr.sub37 = sub i32 %sub.ptr.lhs.cast35, %sub.ptr.rhs.cast
+ %head = getelementptr inbounds i8* %call17, i32 -4
+ %5 = bitcast i8* %head to i32*
+ %6 = load i32* %5, align 4, !tbaa !3
+ %and38 = and i32 %6, -8
+ %sub39 = sub i32 %and38, %sub.ptr.sub37
+ %and41 = and i32 %6, 3
+ %cmp42 = icmp eq i32 %and41, 0
+ br i1 %cmp42, label %if.then43, label %if.else47
+
+if.then43: ; preds = %cond.end33
+ %prev_foot = bitcast i8* %add.ptr to i32*
+ %7 = load i32* %prev_foot, align 4, !tbaa !3
+ %add44 = add i32 %7, %sub.ptr.sub37
+ %prev_foot45 = bitcast i8* %cond34 to i32*
+ store i32 %add44, i32* %prev_foot45, align 4, !tbaa !3
+ %head46 = getelementptr inbounds i8* %cond34, i32 4
+ %8 = bitcast i8* %head46 to i32*
+ store i32 %sub39, i32* %8, align 4, !tbaa !3
+ br label %if.end64
+
+if.else47: ; preds = %cond.end33
+ %head48 = getelementptr inbounds i8* %cond34, i32 4
+ %9 = bitcast i8* %head48 to i32*
+ %10 = load i32* %9, align 4, !tbaa !3
+ %and49 = and i32 %10, 1
+ %or = or i32 %sub39, %and49
+ %or50 = or i32 %or, 2
+ store i32 %or50, i32* %9, align 4, !tbaa !3
+ %add.ptr52.sum = add i32 %sub39, 4
+ %head53 = getelementptr inbounds i8* %cond34, i32 %add.ptr52.sum
+ %11 = bitcast i8* %head53 to i32*
+ %12 = load i32* %11, align 4, !tbaa !3
+ %or54 = or i32 %12, 1
+ store i32 %or54, i32* %11, align 4, !tbaa !3
+ %13 = load i32* %5, align 4, !tbaa !3
+ %and56 = and i32 %13, 1
+ %or57 = or i32 %sub.ptr.sub37, %and56
+ %or58 = or i32 %or57, 2
+ store i32 %or58, i32* %5, align 4, !tbaa !3
+ %add.ptr60.sum = add i32 %sub.ptr.sub37, -4
+ %head61 = getelementptr inbounds i8* %call17, i32 %add.ptr60.sum
+ %14 = bitcast i8* %head61 to i32*
+ %15 = load i32* %14, align 4, !tbaa !3
+ %or62 = or i32 %15, 1
+ store i32 %or62, i32* %14, align 4, !tbaa !3
+ tail call fastcc void @dispose_chunk(%struct.malloc_chunk* %0, i32 %sub.ptr.sub37)
+ br label %if.end64
+
+if.end64: ; preds = %if.else47, %if.then43, %if.then19
+ %p.0 = phi %struct.malloc_chunk* [ %0, %if.then19 ], [ %4, %if.else47 ], [ %4, %if.then43 ]
+ %head65 = getelementptr inbounds %struct.malloc_chunk* %p.0, i32 0, i32 1
+ %16 = load i32* %head65, align 4, !tbaa !3
+ %and66 = and i32 %16, 3
+ %cmp67 = icmp eq i32 %and66, 0
+ br i1 %cmp67, label %if.end93, label %if.then68
+
+if.then68: ; preds = %if.end64
+ %and70 = and i32 %16, -8
+ %add71 = add i32 %cond, 16
+ %cmp72 = icmp ugt i32 %and70, %add71
+ br i1 %cmp72, label %if.then73, label %if.end93
+
+if.then73: ; preds = %if.then68
+ %sub74 = sub i32 %and70, %cond
+ %17 = bitcast %struct.malloc_chunk* %p.0 to i8*
+ %add.ptr75 = getelementptr inbounds i8* %17, i32 %cond
+ %18 = bitcast i8* %add.ptr75 to %struct.malloc_chunk*
+ %and77 = and i32 %16, 1
+ %or78 = or i32 %cond, %and77
+ %or79 = or i32 %or78, 2
+ store i32 %or79, i32* %head65, align 4, !tbaa !3
+ %add.ptr75.sum1 = or i32 %cond, 4
+ %head82 = getelementptr inbounds i8* %17, i32 %add.ptr75.sum1
+ %19 = bitcast i8* %head82 to i32*
+ %or87 = or i32 %sub74, 3
+ store i32 %or87, i32* %19, align 4, !tbaa !3
+ %add.ptr89.sum2 = or i32 %and70, 4
+ %head90 = getelementptr inbounds i8* %17, i32 %add.ptr89.sum2
+ %20 = bitcast i8* %head90 to i32*
+ %21 = load i32* %20, align 4, !tbaa !3
+ %or91 = or i32 %21, 1
+ store i32 %or91, i32* %20, align 4, !tbaa !3
+ tail call fastcc void @dispose_chunk(%struct.malloc_chunk* %18, i32 %sub74)
+ br label %if.end93
+
+if.end93: ; preds = %if.then73, %if.then68, %if.end64
+ %add.ptr94 = getelementptr inbounds %struct.malloc_chunk* %p.0, i32 0, i32 2
+ %22 = bitcast %struct.malloc_chunk** %add.ptr94 to i8*
+ br label %if.end96
+
+if.end96: ; preds = %if.end93, %cond.end, %if.then9
+ %mem.0 = phi i8* [ null, %if.then9 ], [ %22, %if.end93 ], [ null, %cond.end ]
+ ret i8* %mem.0
+}
+
+; Function Attrs: nounwind
+define weak i32 @posix_memalign(i8** %pp, i32 %alignment, i32 %bytes) #0 {
+entry:
+ %cmp = icmp eq i32 %alignment, 8
+ br i1 %cmp, label %if.then, label %if.else
+
+if.then: ; preds = %entry
+ %call = tail call i8* @malloc(i32 %bytes)
+ br label %if.end15
+
+if.else: ; preds = %entry
+ %div = lshr i32 %alignment, 2
+ %rem = and i32 %alignment, 3
+ %cmp1 = icmp ne i32 %rem, 0
+ %cmp2 = icmp eq i32 %div, 0
+ %or.cond = or i1 %cmp1, %cmp2
+ br i1 %or.cond, label %return, label %lor.lhs.false3
+
+lor.lhs.false3: ; preds = %if.else
+ %sub = add i32 %div, 1073741823
+ %and = and i32 %sub, %div
+ %cmp4 = icmp eq i32 %and, 0
+ br i1 %cmp4, label %if.else6, label %return
+
+if.else6: ; preds = %lor.lhs.false3
+ %sub7 = sub i32 -64, %alignment
+ %cmp8 = icmp ult i32 %sub7, %bytes
+ br i1 %cmp8, label %return, label %if.then9
+
+if.then9: ; preds = %if.else6
+ %cmp10 = icmp ult i32 %alignment, 16
+ %.alignment = select i1 %cmp10, i32 16, i32 %alignment
+ %call12 = tail call fastcc i8* @internal_memalign(i32 %.alignment, i32 %bytes)
+ br label %if.end15
+
+if.end15: ; preds = %if.then9, %if.then
+ %mem.0 = phi i8* [ %call, %if.then ], [ %call12, %if.then9 ]
+ %cmp16 = icmp eq i8* %mem.0, null
+ br i1 %cmp16, label %return, label %if.else18
+
+if.else18: ; preds = %if.end15
+ store i8* %mem.0, i8** %pp, align 4, !tbaa !0
+ br label %return
+
+return: ; preds = %if.else18, %if.end15, %if.else6, %lor.lhs.false3, %if.else
+ %retval.0 = phi i32 [ 0, %if.else18 ], [ 22, %if.else ], [ 22, %lor.lhs.false3 ], [ 12, %if.end15 ], [ 12, %if.else6 ]
+ ret i32 %retval.0
+}
+
+; Function Attrs: nounwind
+define weak i8* @valloc(i32 %bytes) #0 {
+entry:
+ %0 = load i32* getelementptr inbounds (%struct.malloc_params* @mparams, i32 0, i32 0), align 4, !tbaa !3
+ %cmp = icmp eq i32 %0, 0
+ br i1 %cmp, label %if.then.i, label %lor.end
+
+if.then.i: ; preds = %entry
+ %call.i = tail call i32 @sysconf(i32 30) #1
+ %sub.i = add i32 %call.i, -1
+ %and.i = and i32 %sub.i, %call.i
+ %cmp1.i = icmp eq i32 %and.i, 0
+ br i1 %cmp1.i, label %init_mparams.exit, label %if.then5.i
+
+if.then5.i: ; preds = %if.then.i
+ tail call void @abort() #6
+ unreachable
+
+init_mparams.exit: ; preds = %if.then.i
+ store i32 %call.i, i32* getelementptr inbounds (%struct.malloc_params* @mparams, i32 0, i32 2), align 4, !tbaa !3
+ store i32 %call.i, i32* getelementptr inbounds (%struct.malloc_params* @mparams, i32 0, i32 1), align 4, !tbaa !3
+ store i32 -1, i32* getelementptr inbounds (%struct.malloc_params* @mparams, i32 0, i32 3), align 4, !tbaa !3
+ store i32 -1, i32* getelementptr inbounds (%struct.malloc_params* @mparams, i32 0, i32 4), align 4, !tbaa !3
+ store i32 0, i32* getelementptr inbounds (%struct.malloc_params* @mparams, i32 0, i32 5), align 4, !tbaa !3
+ store i32 0, i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 15), align 4, !tbaa !3
+ %call6.i = tail call i32 @time(i32* null) #1
+ %xor.i = and i32 %call6.i, -16
+ %and7.i = xor i32 %xor.i, 1431655768
+ store volatile i32 %and7.i, i32* getelementptr inbounds (%struct.malloc_params* @mparams, i32 0, i32 0), align 4, !tbaa !3
+ br label %lor.end
+
+lor.end: ; preds = %init_mparams.exit, %entry
+ %1 = load i32* getelementptr inbounds (%struct.malloc_params* @mparams, i32 0, i32 1), align 4, !tbaa !3
+ %call1 = tail call i8* @memalign(i32 %1, i32 %bytes)
+ ret i8* %call1
+}
+
+; Function Attrs: nounwind
+define weak i8* @pvalloc(i32 %bytes) #0 {
+entry:
+ %0 = load i32* getelementptr inbounds (%struct.malloc_params* @mparams, i32 0, i32 0), align 4, !tbaa !3
+ %cmp = icmp eq i32 %0, 0
+ br i1 %cmp, label %if.then.i, label %lor.end
+
+if.then.i: ; preds = %entry
+ %call.i = tail call i32 @sysconf(i32 30) #1
+ %sub.i = add i32 %call.i, -1
+ %and.i = and i32 %sub.i, %call.i
+ %cmp1.i = icmp eq i32 %and.i, 0
+ br i1 %cmp1.i, label %init_mparams.exit, label %if.then5.i
+
+if.then5.i: ; preds = %if.then.i
+ tail call void @abort() #6
+ unreachable
+
+init_mparams.exit: ; preds = %if.then.i
+ store i32 %call.i, i32* getelementptr inbounds (%struct.malloc_params* @mparams, i32 0, i32 2), align 4, !tbaa !3
+ store i32 %call.i, i32* getelementptr inbounds (%struct.malloc_params* @mparams, i32 0, i32 1), align 4, !tbaa !3
+ store i32 -1, i32* getelementptr inbounds (%struct.malloc_params* @mparams, i32 0, i32 3), align 4, !tbaa !3
+ store i32 -1, i32* getelementptr inbounds (%struct.malloc_params* @mparams, i32 0, i32 4), align 4, !tbaa !3
+ store i32 0, i32* getelementptr inbounds (%struct.malloc_params* @mparams, i32 0, i32 5), align 4, !tbaa !3
+ store i32 0, i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 15), align 4, !tbaa !3
+ %call6.i = tail call i32 @time(i32* null) #1
+ %xor.i = and i32 %call6.i, -16
+ %and7.i = xor i32 %xor.i, 1431655768
+ store volatile i32 %and7.i, i32* getelementptr inbounds (%struct.malloc_params* @mparams, i32 0, i32 0), align 4, !tbaa !3
+ br label %lor.end
+
+lor.end: ; preds = %init_mparams.exit, %entry
+ %1 = load i32* getelementptr inbounds (%struct.malloc_params* @mparams, i32 0, i32 1), align 4, !tbaa !3
+ %add = add i32 %bytes, -1
+ %sub = add i32 %add, %1
+ %neg = sub i32 0, %1
+ %and = and i32 %sub, %neg
+ %call2 = tail call i8* @memalign(i32 %1, i32 %and)
+ ret i8* %call2
+}
+
+; Function Attrs: nounwind
+define weak i8** @independent_calloc(i32 %n_elements, i32 %elem_size, i8** %chunks) #0 {
+entry:
+ %sz = alloca i32, align 4
+ store i32 %elem_size, i32* %sz, align 4, !tbaa !3
+ %call = call fastcc i8** @ialloc(i32 %n_elements, i32* %sz, i32 3, i8** %chunks)
+ ret i8** %call
+}
+
+; Function Attrs: nounwind
+define internal fastcc i8** @ialloc(i32 %n_elements, i32* nocapture %sizes, i32 %opts, i8** %chunks) #0 {
+entry:
+ %0 = load i32* getelementptr inbounds (%struct.malloc_params* @mparams, i32 0, i32 0), align 4, !tbaa !3
+ %cmp = icmp eq i32 %0, 0
+ br i1 %cmp, label %if.then.i, label %lor.end
+
+if.then.i: ; preds = %entry
+ %call.i = tail call i32 @sysconf(i32 30) #1
+ %sub.i = add i32 %call.i, -1
+ %and.i = and i32 %sub.i, %call.i
+ %cmp1.i = icmp eq i32 %and.i, 0
+ br i1 %cmp1.i, label %init_mparams.exit, label %if.then5.i
+
+if.then5.i: ; preds = %if.then.i
+ tail call void @abort() #6
+ unreachable
+
+init_mparams.exit: ; preds = %if.then.i
+ store i32 %call.i, i32* getelementptr inbounds (%struct.malloc_params* @mparams, i32 0, i32 2), align 4, !tbaa !3
+ store i32 %call.i, i32* getelementptr inbounds (%struct.malloc_params* @mparams, i32 0, i32 1), align 4, !tbaa !3
+ store i32 -1, i32* getelementptr inbounds (%struct.malloc_params* @mparams, i32 0, i32 3), align 4, !tbaa !3
+ store i32 -1, i32* getelementptr inbounds (%struct.malloc_params* @mparams, i32 0, i32 4), align 4, !tbaa !3
+ store i32 0, i32* getelementptr inbounds (%struct.malloc_params* @mparams, i32 0, i32 5), align 4, !tbaa !3
+ store i32 0, i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 15), align 4, !tbaa !3
+ %call6.i = tail call i32 @time(i32* null) #1
+ %xor.i = and i32 %call6.i, -16
+ %and7.i = xor i32 %xor.i, 1431655768
+ store volatile i32 %and7.i, i32* getelementptr inbounds (%struct.malloc_params* @mparams, i32 0, i32 0), align 4, !tbaa !3
+ br label %lor.end
+
+lor.end: ; preds = %init_mparams.exit, %entry
+ %cmp1 = icmp eq i8** %chunks, null
+ %cmp2 = icmp eq i32 %n_elements, 0
+ br i1 %cmp1, label %if.else, label %if.then
+
+if.then: ; preds = %lor.end
+ br i1 %cmp2, label %return, label %if.end11
+
+if.else: ; preds = %lor.end
+ br i1 %cmp2, label %if.then5, label %if.end7
+
+if.then5: ; preds = %if.else
+ %call6 = tail call i8* @malloc(i32 0)
+ %1 = bitcast i8* %call6 to i8**
+ br label %return
+
+if.end7: ; preds = %if.else
+ %mul = shl i32 %n_elements, 2
+ %cmp8 = icmp ult i32 %mul, 11
+ br i1 %cmp8, label %if.end11, label %cond.false
+
+cond.false: ; preds = %if.end7
+ %add10 = add i32 %mul, 11
+ %and = and i32 %add10, -8
+ br label %if.end11
+
+if.end11: ; preds = %cond.false, %if.end7, %if.then
+ %array_size.0 = phi i32 [ 0, %if.then ], [ %and, %cond.false ], [ 16, %if.end7 ]
+ %marray.0 = phi i8** [ %chunks, %if.then ], [ null, %cond.false ], [ null, %if.end7 ]
+ %and12 = and i32 %opts, 1
+ %tobool13 = icmp eq i32 %and12, 0
+ br i1 %tobool13, label %for.cond.preheader, label %if.then14
+
+for.cond.preheader: ; preds = %if.end11
+ br i1 %cmp2, label %if.end36, label %for.body
+
+if.then14: ; preds = %if.end11
+ %2 = load i32* %sizes, align 4, !tbaa !3
+ %cmp15 = icmp ult i32 %2, 11
+ br i1 %cmp15, label %cond.end21, label %cond.false17
+
+cond.false17: ; preds = %if.then14
+ %add19 = add i32 %2, 11
+ %and20 = and i32 %add19, -8
+ br label %cond.end21
+
+cond.end21: ; preds = %cond.false17, %if.then14
+ %cond22 = phi i32 [ %and20, %cond.false17 ], [ 16, %if.then14 ]
+ %mul23 = mul i32 %cond22, %n_elements
+ br label %if.end36
+
+for.body: ; preds = %cond.end33, %for.cond.preheader
+ %i.09 = phi i32 [ %inc, %cond.end33 ], [ 0, %for.cond.preheader ]
+ %contents_size.08 = phi i32 [ %add35, %cond.end33 ], [ 0, %for.cond.preheader ]
+ %arrayidx = getelementptr inbounds i32* %sizes, i32 %i.09
+ %3 = load i32* %arrayidx, align 4, !tbaa !3
+ %cmp26 = icmp ult i32 %3, 11
+ br i1 %cmp26, label %cond.end33, label %cond.false28
+
+cond.false28: ; preds = %for.body
+ %add31 = add i32 %3, 11
+ %and32 = and i32 %add31, -8
+ br label %cond.end33
+
+cond.end33: ; preds = %cond.false28, %for.body
+ %cond34 = phi i32 [ %and32, %cond.false28 ], [ 16, %for.body ]
+ %add35 = add i32 %cond34, %contents_size.08
+ %inc = add i32 %i.09, 1
+ %cmp25 = icmp eq i32 %inc, %n_elements
+ br i1 %cmp25, label %if.end36, label %for.body
+
+if.end36: ; preds = %cond.end33, %cond.end21, %for.cond.preheader
+ %contents_size.1 = phi i32 [ %mul23, %cond.end21 ], [ 0, %for.cond.preheader ], [ %add35, %cond.end33 ]
+ %element_size.0 = phi i32 [ %cond22, %cond.end21 ], [ 0, %for.cond.preheader ], [ 0, %cond.end33 ]
+ %add37 = add i32 %array_size.0, -4
+ %sub = add i32 %add37, %contents_size.1
+ %call39 = tail call i8* @malloc(i32 %sub)
+ %cmp44 = icmp eq i8* %call39, null
+ br i1 %cmp44, label %return, label %if.end46
+
+if.end46: ; preds = %if.end36
+ %add.ptr = getelementptr inbounds i8* %call39, i32 -8
+ %head = getelementptr inbounds i8* %call39, i32 -4
+ %4 = bitcast i8* %head to i32*
+ %5 = load i32* %4, align 4, !tbaa !3
+ %and47 = and i32 %5, -8
+ %and48 = and i32 %opts, 2
+ %tobool49 = icmp eq i32 %and48, 0
+ br i1 %tobool49, label %if.end53, label %if.then50
+
+if.then50: ; preds = %if.end46
+ %sub51 = sub i32 -4, %array_size.0
+ %sub52 = add i32 %sub51, %and47
+ tail call void @llvm.memset.p0i8.i32(i8* %call39, i8 0, i32 %sub52, i32 4, i1 false)
+ br label %if.end53
+
+if.end53: ; preds = %if.then50, %if.end46
+ %cmp54 = icmp eq i8** %marray.0, null
+ br i1 %cmp54, label %if.then55, label %if.end61
+
+if.then55: ; preds = %if.end53
+ %sub57 = sub i32 %and47, %contents_size.1
+ %add.ptr58 = getelementptr inbounds i8* %call39, i32 %contents_size.1
+ %6 = bitcast i8* %add.ptr58 to i8**
+ %or59 = or i32 %sub57, 3
+ %add.ptr56.sum = add i32 %contents_size.1, -4
+ %head60 = getelementptr inbounds i8* %call39, i32 %add.ptr56.sum
+ %7 = bitcast i8* %head60 to i32*
+ store i32 %or59, i32* %7, align 4, !tbaa !3
+ br label %if.end61
+
+if.end61: ; preds = %if.then55, %if.end53
+ %remainder_size.0 = phi i32 [ %contents_size.1, %if.then55 ], [ %and47, %if.end53 ]
+ %marray.1 = phi i8** [ %6, %if.then55 ], [ %marray.0, %if.end53 ]
+ store i8* %call39, i8** %marray.1, align 4, !tbaa !0
+ %sub65 = add i32 %n_elements, -1
+ %cmp662 = icmp eq i32 %sub65, 0
+ br i1 %cmp662, label %if.else87, label %if.then67.lr.ph
+
+if.then67.lr.ph: ; preds = %if.end61
+ %cmp68 = icmp eq i32 %element_size.0, 0
+ br i1 %cmp68, label %if.else70.us, label %if.end81
+
+if.else70.us: ; preds = %if.end81.us, %if.then67.lr.ph
+ %i.15.us = phi i32 [ %inc93.us, %if.end81.us ], [ 0, %if.then67.lr.ph ]
+ %remainder_size.14.us = phi i32 [ %sub82.us, %if.end81.us ], [ %remainder_size.0, %if.then67.lr.ph ]
+ %p.0.in3.us = phi i8* [ %add.ptr86.us, %if.end81.us ], [ %add.ptr, %if.then67.lr.ph ]
+ %arrayidx71.us = getelementptr inbounds i32* %sizes, i32 %i.15.us
+ %8 = load i32* %arrayidx71.us, align 4, !tbaa !3
+ %cmp72.us = icmp ult i32 %8, 11
+ br i1 %cmp72.us, label %if.end81.us, label %cond.false74.us
+
+cond.false74.us: ; preds = %if.else70.us
+ %add77.us = add i32 %8, 11
+ %and78.us = and i32 %add77.us, -8
+ br label %if.end81.us
+
+if.end81.us: ; preds = %cond.false74.us, %if.else70.us
+ %size.0.us = phi i32 [ %and78.us, %cond.false74.us ], [ 16, %if.else70.us ]
+ %sub82.us = sub i32 %remainder_size.14.us, %size.0.us
+ %or84.us = or i32 %size.0.us, 3
+ %head85.us = getelementptr inbounds i8* %p.0.in3.us, i32 4
+ %9 = bitcast i8* %head85.us to i32*
+ store i32 %or84.us, i32* %9, align 4, !tbaa !3
+ %add.ptr86.us = getelementptr inbounds i8* %p.0.in3.us, i32 %size.0.us
+ %inc93.us = add i32 %i.15.us, 1
+ %add.ptr86.us.sum = add i32 %size.0.us, 8
+ %add.ptr63.us = getelementptr inbounds i8* %p.0.in3.us, i32 %add.ptr86.us.sum
+ %arrayidx64.us = getelementptr inbounds i8** %marray.1, i32 %inc93.us
+ store i8* %add.ptr63.us, i8** %arrayidx64.us, align 4, !tbaa !0
+ %cmp66.us = icmp eq i32 %inc93.us, %sub65
+ br i1 %cmp66.us, label %if.else87, label %if.else70.us
+
+if.end81: ; preds = %if.end81, %if.then67.lr.ph
+ %i.15 = phi i32 [ %inc93, %if.end81 ], [ 0, %if.then67.lr.ph ]
+ %remainder_size.14 = phi i32 [ %sub82, %if.end81 ], [ %remainder_size.0, %if.then67.lr.ph ]
+ %p.0.in3 = phi i8* [ %add.ptr86, %if.end81 ], [ %add.ptr, %if.then67.lr.ph ]
+ %sub82 = sub i32 %remainder_size.14, %element_size.0
+ %or84 = or i32 %element_size.0, 3
+ %head85 = getelementptr inbounds i8* %p.0.in3, i32 4
+ %10 = bitcast i8* %head85 to i32*
+ store i32 %or84, i32* %10, align 4, !tbaa !3
+ %add.ptr86 = getelementptr inbounds i8* %p.0.in3, i32 %element_size.0
+ %inc93 = add i32 %i.15, 1
+ %add.ptr86.sum = add i32 %element_size.0, 8
+ %add.ptr63 = getelementptr inbounds i8* %p.0.in3, i32 %add.ptr86.sum
+ %arrayidx64 = getelementptr inbounds i8** %marray.1, i32 %inc93
+ store i8* %add.ptr63, i8** %arrayidx64, align 4, !tbaa !0
+ %cmp66 = icmp eq i32 %inc93, %sub65
+ br i1 %cmp66, label %if.else87, label %if.end81
+
+if.else87: ; preds = %if.end81, %if.end81.us, %if.end61
+ %remainder_size.1.lcssa = phi i32 [ %remainder_size.0, %if.end61 ], [ %sub82.us, %if.end81.us ], [ %sub82, %if.end81 ]
+ %p.0.in.lcssa = phi i8* [ %add.ptr, %if.end61 ], [ %add.ptr86.us, %if.end81.us ], [ %add.ptr86, %if.end81 ]
+ %or89 = or i32 %remainder_size.1.lcssa, 3
+ %head90 = getelementptr inbounds i8* %p.0.in.lcssa, i32 4
+ %11 = bitcast i8* %head90 to i32*
+ store i32 %or89, i32* %11, align 4, !tbaa !3
+ br label %return
+
+return: ; preds = %if.else87, %if.end36, %if.then5, %if.then
+ %retval.0 = phi i8** [ %marray.1, %if.else87 ], [ %1, %if.then5 ], [ %chunks, %if.then ], [ null, %if.end36 ]
+ ret i8** %retval.0
+}
+
+; Function Attrs: nounwind
+define weak i8** @independent_comalloc(i32 %n_elements, i32* %sizes, i8** %chunks) #0 {
+entry:
+ %call = tail call fastcc i8** @ialloc(i32 %n_elements, i32* %sizes, i32 0, i8** %chunks)
+ ret i8** %call
+}
+
+; Function Attrs: nounwind
+define weak i32 @bulk_free(i8** %array, i32 %nelem) #0 {
+entry:
+ %arrayidx.i = getelementptr inbounds i8** %array, i32 %nelem
+ %cmp6.i = icmp eq i32 %nelem, 0
+ br i1 %cmp6.i, label %internal_bulk_free.exit, label %for.body.i
+
+for.body.i: ; preds = %for.inc.i, %entry
+ %a.07.i = phi i8** [ %array, %entry ], [ %incdec.ptr.pre-phi.i, %for.inc.i ]
+ %0 = load i8** %a.07.i, align 4, !tbaa !0
+ %cmp1.i = icmp eq i8* %0, null
+ br i1 %cmp1.i, label %for.body.for.inc_crit_edge.i, label %if.then.i
+
+for.body.for.inc_crit_edge.i: ; preds = %for.body.i
+ %incdec.ptr.pre.i = getelementptr inbounds i8** %a.07.i, i32 1
+ br label %for.inc.i
+
+if.then.i: ; preds = %for.body.i
+ %add.ptr.i = getelementptr inbounds i8* %0, i32 -8
+ %1 = bitcast i8* %add.ptr.i to %struct.malloc_chunk*
+ %head.i = getelementptr inbounds i8* %0, i32 -4
+ %2 = bitcast i8* %head.i to i32*
+ %3 = load i32* %2, align 4, !tbaa !3
+ %and.i = and i32 %3, -8
+ store i8* null, i8** %a.07.i, align 4, !tbaa !0
+ %4 = load i8** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 4), align 4, !tbaa !0
+ %cmp2.i = icmp ult i8* %add.ptr.i, %4
+ br i1 %cmp2.i, label %if.else25.i, label %land.rhs.i
+
+land.rhs.i: ; preds = %if.then.i
+ %and4.i = and i32 %3, 3
+ %cmp5.i = icmp eq i32 %and4.i, 1
+ br i1 %cmp5.i, label %if.else25.i, label %if.then6.i, !prof !6
+
+if.then6.i: ; preds = %land.rhs.i
+ %add.ptr7.i = getelementptr inbounds i8** %a.07.i, i32 1
+ %and91.i = add i32 %3, -8
+ %add.ptr.sum.i = and i32 %and91.i, -8
+ %cmp11.i = icmp eq i8** %add.ptr7.i, %arrayidx.i
+ br i1 %cmp11.i, label %if.else.i, label %land.lhs.true.i
+
+land.lhs.true.i: ; preds = %if.then6.i
+ %5 = load i8** %add.ptr7.i, align 4, !tbaa !0
+ %add.ptr10.sum.i = add i32 %add.ptr.sum.i, 8
+ %add.ptr12.i = getelementptr inbounds i8* %0, i32 %add.ptr10.sum.i
+ %cmp13.i = icmp eq i8* %5, %add.ptr12.i
+ br i1 %cmp13.i, label %if.then14.i, label %if.else.i
+
+if.then14.i: ; preds = %land.lhs.true.i
+ %add.ptr10.sum23.i = or i32 %add.ptr.sum.i, 4
+ %head15.i = getelementptr inbounds i8* %0, i32 %add.ptr10.sum23.i
+ %6 = bitcast i8* %head15.i to i32*
+ %7 = load i32* %6, align 4, !tbaa !3
+ %and16.i = and i32 %7, -8
+ %add.i = add i32 %and16.i, %and.i
+ %and18.i = and i32 %3, 1
+ %or.i = or i32 %and18.i, %add.i
+ %or19.i = or i32 %or.i, 2
+ store i32 %or19.i, i32* %2, align 4, !tbaa !3
+ %add.ptr21.sum.i = add i32 %add.i, -4
+ %head22.i = getelementptr inbounds i8* %0, i32 %add.ptr21.sum.i
+ %8 = bitcast i8* %head22.i to i32*
+ %9 = load i32* %8, align 4, !tbaa !3
+ %or23.i = or i32 %9, 1
+ store i32 %or23.i, i32* %8, align 4, !tbaa !3
+ store i8* %0, i8** %add.ptr7.i, align 4, !tbaa !0
+ br label %for.inc.i
+
+if.else.i: ; preds = %land.lhs.true.i, %if.then6.i
+ tail call fastcc void @dispose_chunk(%struct.malloc_chunk* %1, i32 %and.i) #1
+ br label %for.inc.i
+
+if.else25.i: ; preds = %land.rhs.i, %if.then.i
+ tail call void @abort() #6
+ unreachable
+
+for.inc.i: ; preds = %if.else.i, %if.then14.i, %for.body.for.inc_crit_edge.i
+ %incdec.ptr.pre-phi.i = phi i8** [ %incdec.ptr.pre.i, %for.body.for.inc_crit_edge.i ], [ %add.ptr7.i, %if.then14.i ], [ %add.ptr7.i, %if.else.i ]
+ %cmp.i = icmp eq i8** %incdec.ptr.pre-phi.i, %arrayidx.i
+ br i1 %cmp.i, label %internal_bulk_free.exit, label %for.body.i
+
+internal_bulk_free.exit: ; preds = %for.inc.i, %entry
+ ret i32 0
+}
+
+; Function Attrs: nounwind
+define weak i32 @malloc_trim(i32 %pad) #0 {
+entry:
+ %0 = load i32* getelementptr inbounds (%struct.malloc_params* @mparams, i32 0, i32 0), align 4, !tbaa !3
+ %cmp = icmp eq i32 %0, 0
+ br i1 %cmp, label %if.then.i, label %lor.end.i
+
+if.then.i: ; preds = %entry
+ %call.i = tail call i32 @sysconf(i32 30) #1
+ %sub.i = add i32 %call.i, -1
+ %and.i = and i32 %sub.i, %call.i
+ %cmp1.i = icmp eq i32 %and.i, 0
+ br i1 %cmp1.i, label %init_mparams.exit, label %if.then5.i
+
+if.then5.i: ; preds = %if.then.i
+ tail call void @abort() #6
+ unreachable
+
+init_mparams.exit: ; preds = %if.then.i
+ store i32 %call.i, i32* getelementptr inbounds (%struct.malloc_params* @mparams, i32 0, i32 2), align 4, !tbaa !3
+ store i32 %call.i, i32* getelementptr inbounds (%struct.malloc_params* @mparams, i32 0, i32 1), align 4, !tbaa !3
+ store i32 -1, i32* getelementptr inbounds (%struct.malloc_params* @mparams, i32 0, i32 3), align 4, !tbaa !3
+ store i32 -1, i32* getelementptr inbounds (%struct.malloc_params* @mparams, i32 0, i32 4), align 4, !tbaa !3
+ store i32 0, i32* getelementptr inbounds (%struct.malloc_params* @mparams, i32 0, i32 5), align 4, !tbaa !3
+ store i32 0, i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 15), align 4, !tbaa !3
+ %call6.i = tail call i32 @time(i32* null) #1
+ %xor.i = and i32 %call6.i, -16
+ %and7.i = xor i32 %xor.i, 1431655768
+ store volatile i32 %and7.i, i32* getelementptr inbounds (%struct.malloc_params* @mparams, i32 0, i32 0), align 4, !tbaa !3
+ br label %lor.end.i
+
+lor.end.i: ; preds = %init_mparams.exit, %entry
+ %cmp1.i2 = icmp ult i32 %pad, -64
+ br i1 %cmp1.i2, label %land.lhs.true.i, label %sys_trim.exit
+
+land.lhs.true.i: ; preds = %lor.end.i
+ %1 = load %struct.malloc_chunk** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 6), align 4, !tbaa !0
+ %cmp2.i = icmp eq %struct.malloc_chunk* %1, null
+ br i1 %cmp2.i, label %sys_trim.exit, label %if.then.i3
+
+if.then.i3: ; preds = %land.lhs.true.i
+ %add.i = add i32 %pad, 40
+ %2 = load i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 3), align 4, !tbaa !3
+ %cmp3.i = icmp ugt i32 %2, %add.i
+ br i1 %cmp3.i, label %if.then4.i, label %land.lhs.true45.i
+
+if.then4.i: ; preds = %if.then.i3
+ %3 = load i32* getelementptr inbounds (%struct.malloc_params* @mparams, i32 0, i32 2), align 4, !tbaa !3
+ %sub6.i = sub i32 -41, %pad
+ %sub.i4 = add i32 %sub6.i, %2
+ %add7.i = add i32 %sub.i4, %3
+ %div.i = udiv i32 %add7.i, %3
+ %4 = bitcast %struct.malloc_chunk* %1 to i8*
+ br label %for.cond.i.i
+
+for.cond.i.i: ; preds = %if.end.i2.i, %if.then4.i
+ %sp.0.i.i = phi %struct.malloc_segment* [ getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 16), %if.then4.i ], [ %7, %if.end.i2.i ]
+ %base.i.i = getelementptr inbounds %struct.malloc_segment* %sp.0.i.i, i32 0, i32 0
+ %5 = load i8** %base.i.i, align 4, !tbaa !0
+ %cmp.i1.i = icmp ugt i8* %5, %4
+ br i1 %cmp.i1.i, label %if.end.i2.i, label %land.lhs.true.i.i
+
+land.lhs.true.i.i: ; preds = %for.cond.i.i
+ %size.i.i = getelementptr inbounds %struct.malloc_segment* %sp.0.i.i, i32 0, i32 1
+ %6 = load i32* %size.i.i, align 4, !tbaa !3
+ %add.ptr.i.i = getelementptr inbounds i8* %5, i32 %6
+ %cmp2.i.i = icmp ugt i8* %add.ptr.i.i, %4
+ br i1 %cmp2.i.i, label %segment_holding.exit.i, label %if.end.i2.i
+
+if.end.i2.i: ; preds = %land.lhs.true.i.i, %for.cond.i.i
+ %next.i.i = getelementptr inbounds %struct.malloc_segment* %sp.0.i.i, i32 0, i32 2
+ %7 = load %struct.malloc_segment** %next.i.i, align 4, !tbaa !0
+ br label %for.cond.i.i
+
+segment_holding.exit.i: ; preds = %land.lhs.true.i.i
+ %sub8.i = add i32 %div.i, -1
+ %mul.i = mul i32 %sub8.i, %3
+ %sflags.i = getelementptr inbounds %struct.malloc_segment* %sp.0.i.i, i32 0, i32 3
+ %8 = load i32* %sflags.i, align 4, !tbaa !3
+ %and.i5 = and i32 %8, 8
+ %tobool11.i = icmp eq i32 %and.i5, 0
+ br i1 %tobool11.i, label %if.else.i, label %land.lhs.true45.i
+
+if.else.i: ; preds = %segment_holding.exit.i
+ %call20.i = tail call i8* @sbrk(i32 0) #1
+ %9 = load i8** %base.i.i, align 4, !tbaa !0
+ %10 = load i32* %size.i.i, align 4, !tbaa !3
+ %add.ptr.i = getelementptr inbounds i8* %9, i32 %10
+ %cmp21.i = icmp eq i8* %call20.i, %add.ptr.i
+ br i1 %cmp21.i, label %if.then22.i, label %land.lhs.true45.i
+
+if.then22.i: ; preds = %if.else.i
+ %sub19.i = sub i32 -2147483648, %3
+ %cmp17.i = icmp ugt i32 %mul.i, 2147483646
+ %sub19.mul.i = select i1 %cmp17.i, i32 %sub19.i, i32 %mul.i
+ %sub23.i = sub i32 0, %sub19.mul.i
+ %call24.i = tail call i8* @sbrk(i32 %sub23.i) #1
+ %call25.i = tail call i8* @sbrk(i32 0) #1
+ %cmp26.i = icmp ne i8* %call24.i, inttoptr (i32 -1 to i8*)
+ %cmp28.i = icmp ult i8* %call25.i, %call20.i
+ %or.cond.i = and i1 %cmp26.i, %cmp28.i
+ br i1 %or.cond.i, label %if.end33.i, label %land.lhs.true45.i
+
+if.end33.i: ; preds = %if.then22.i
+ %sub.ptr.lhs.cast.i = ptrtoint i8* %call20.i to i32
+ %sub.ptr.rhs.cast.i = ptrtoint i8* %call25.i to i32
+ %sub.ptr.sub.i = sub i32 %sub.ptr.lhs.cast.i, %sub.ptr.rhs.cast.i
+ %cmp34.i = icmp eq i8* %call20.i, %call25.i
+ br i1 %cmp34.i, label %land.lhs.true45.i, label %if.then35.i
+
+if.then35.i: ; preds = %if.end33.i
+ %11 = load i32* %size.i.i, align 4, !tbaa !3
+ %sub37.i = sub i32 %11, %sub.ptr.sub.i
+ store i32 %sub37.i, i32* %size.i.i, align 4, !tbaa !3
+ %12 = load i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 12), align 4, !tbaa !3
+ %sub38.i = sub i32 %12, %sub.ptr.sub.i
+ store i32 %sub38.i, i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 12), align 4, !tbaa !3
+ %13 = load %struct.malloc_chunk** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 6), align 4, !tbaa !0
+ %14 = load i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 3), align 4, !tbaa !3
+ %sub41.i = sub i32 %14, %sub.ptr.sub.i
+ %15 = bitcast %struct.malloc_chunk* %13 to i8*
+ %add.ptr.i3.i = getelementptr inbounds %struct.malloc_chunk* %13, i32 0, i32 2
+ %16 = ptrtoint %struct.malloc_chunk** %add.ptr.i3.i to i32
+ %and.i4.i = and i32 %16, 7
+ %cmp.i5.i = icmp eq i32 %and.i4.i, 0
+ br i1 %cmp.i5.i, label %if.end43.i, label %cond.false.i.i
+
+cond.false.i.i: ; preds = %if.then35.i
+ %17 = sub i32 0, %16
+ %and3.i.i = and i32 %17, 7
+ br label %if.end43.i
+
+if.end43.i: ; preds = %cond.false.i.i, %if.then35.i
+ %cond.i.i = phi i32 [ %and3.i.i, %cond.false.i.i ], [ 0, %if.then35.i ]
+ %add.ptr4.i.i = getelementptr inbounds i8* %15, i32 %cond.i.i
+ %18 = bitcast i8* %add.ptr4.i.i to %struct.malloc_chunk*
+ %sub5.i.i = sub i32 %sub41.i, %cond.i.i
+ store %struct.malloc_chunk* %18, %struct.malloc_chunk** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 6), align 4, !tbaa !0
+ store i32 %sub5.i.i, i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 3), align 4, !tbaa !3
+ %or.i.i = or i32 %sub5.i.i, 1
+ %add.ptr4.sum.i.i = add i32 %cond.i.i, 4
+ %head.i.i = getelementptr inbounds i8* %15, i32 %add.ptr4.sum.i.i
+ %19 = bitcast i8* %head.i.i to i32*
+ store i32 %or.i.i, i32* %19, align 4, !tbaa !3
+ %add.ptr6.sum.i.i = add i32 %sub41.i, 4
+ %head7.i.i = getelementptr inbounds i8* %15, i32 %add.ptr6.sum.i.i
+ %20 = bitcast i8* %head7.i.i to i32*
+ store i32 40, i32* %20, align 4, !tbaa !3
+ %21 = load i32* getelementptr inbounds (%struct.malloc_params* @mparams, i32 0, i32 4), align 4, !tbaa !3
+ store i32 %21, i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 7), align 4, !tbaa !3
+ br label %sys_trim.exit
+
+land.lhs.true45.i: ; preds = %if.end33.i, %if.then22.i, %if.else.i, %segment_holding.exit.i, %if.then.i3
+ %22 = load i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 3), align 4, !tbaa !3
+ %23 = load i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 7), align 4, !tbaa !3
+ %cmp47.i = icmp ugt i32 %22, %23
+ br i1 %cmp47.i, label %if.then48.i, label %sys_trim.exit
+
+if.then48.i: ; preds = %land.lhs.true45.i
+ store i32 -1, i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 7), align 4, !tbaa !3
+ br label %sys_trim.exit
+
+sys_trim.exit: ; preds = %if.then48.i, %land.lhs.true45.i, %if.end43.i, %land.lhs.true.i, %lor.end.i
+ %released.2.i = phi i32 [ 0, %if.then48.i ], [ 0, %land.lhs.true45.i ], [ 1, %if.end43.i ], [ 0, %land.lhs.true.i ], [ 0, %lor.end.i ]
+ ret i32 %released.2.i
+}
+
+; Function Attrs: nounwind
+define weak i32 @malloc_footprint() #0 {
+entry:
+ %0 = load i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 12), align 4, !tbaa !3
+ ret i32 %0
+}
+
+; Function Attrs: nounwind
+define weak i32 @malloc_max_footprint() #0 {
+entry:
+ %0 = load i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 13), align 4, !tbaa !3
+ ret i32 %0
+}
+
+; Function Attrs: nounwind
+define weak i32 @malloc_footprint_limit() #0 {
+entry:
+ %0 = load i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 14), align 4, !tbaa !3
+ %cmp = icmp eq i32 %0, 0
+ %cond = select i1 %cmp, i32 -1, i32 %0
+ ret i32 %cond
+}
+
+; Function Attrs: nounwind
+define weak i32 @malloc_set_footprint_limit(i32 %bytes) #0 {
+entry:
+ %cmp2 = icmp eq i32 %bytes, -1
+ br i1 %cmp2, label %if.end9, label %if.else
+
+if.else: ; preds = %entry
+ %0 = load i32* getelementptr inbounds (%struct.malloc_params* @mparams, i32 0, i32 2), align 4, !tbaa !3
+ %sub4 = add i32 %bytes, -1
+ %add5 = add i32 %sub4, %0
+ %neg7 = sub i32 0, %0
+ %and8 = and i32 %add5, %neg7
+ br label %if.end9
+
+if.end9: ; preds = %if.else, %entry
+ %result.0 = phi i32 [ %and8, %if.else ], [ 0, %entry ]
+ store i32 %result.0, i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 14), align 4, !tbaa !3
+ ret i32 %result.0
+}
+
+; Function Attrs: nounwind
+define weak void @mallinfo(%struct.mallinfo* noalias sret %agg.result) #0 {
+entry:
+ %0 = load i32* getelementptr inbounds (%struct.malloc_params* @mparams, i32 0, i32 0), align 4, !tbaa !3
+ %cmp.i = icmp eq i32 %0, 0
+ br i1 %cmp.i, label %if.then.i.i, label %lor.end.i
+
+if.then.i.i: ; preds = %entry
+ %call.i.i = tail call i32 @sysconf(i32 30) #1
+ %sub.i.i = add i32 %call.i.i, -1
+ %and.i.i = and i32 %sub.i.i, %call.i.i
+ %cmp1.i.i = icmp eq i32 %and.i.i, 0
+ br i1 %cmp1.i.i, label %init_mparams.exit.i, label %if.then5.i.i
+
+if.then5.i.i: ; preds = %if.then.i.i
+ tail call void @abort() #6
+ unreachable
+
+init_mparams.exit.i: ; preds = %if.then.i.i
+ store i32 %call.i.i, i32* getelementptr inbounds (%struct.malloc_params* @mparams, i32 0, i32 2), align 4, !tbaa !3
+ store i32 %call.i.i, i32* getelementptr inbounds (%struct.malloc_params* @mparams, i32 0, i32 1), align 4, !tbaa !3
+ store i32 -1, i32* getelementptr inbounds (%struct.malloc_params* @mparams, i32 0, i32 3), align 4, !tbaa !3
+ store i32 -1, i32* getelementptr inbounds (%struct.malloc_params* @mparams, i32 0, i32 4), align 4, !tbaa !3
+ store i32 0, i32* getelementptr inbounds (%struct.malloc_params* @mparams, i32 0, i32 5), align 4, !tbaa !3
+ store i32 0, i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 15), align 4, !tbaa !3
+ %call6.i.i = tail call i32 @time(i32* null) #1
+ %xor.i.i = and i32 %call6.i.i, -16
+ %and7.i.i = xor i32 %xor.i.i, 1431655768
+ store volatile i32 %and7.i.i, i32* getelementptr inbounds (%struct.malloc_params* @mparams, i32 0, i32 0), align 4, !tbaa !3
+ br label %lor.end.i
+
+lor.end.i: ; preds = %init_mparams.exit.i, %entry
+ %1 = load %struct.malloc_chunk** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 6), align 4, !tbaa !0
+ %cmp1.i = icmp eq %struct.malloc_chunk* %1, null
+ br i1 %cmp1.i, label %internal_mallinfo.exit, label %if.then.i
+
+if.then.i: ; preds = %lor.end.i
+ %2 = load i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 3), align 4, !tbaa !3
+ %add.i = add i32 %2, 40
+ br label %while.body.i
+
+while.body.i: ; preds = %while.end.i, %if.then.i
+ %s.013.i = phi %struct.malloc_segment* [ getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 16), %if.then.i ], [ %9, %while.end.i ]
+ %sum.012.i = phi i32 [ %add.i, %if.then.i ], [ %sum.1.lcssa.i, %while.end.i ]
+ %mfree.011.i = phi i32 [ %add.i, %if.then.i ], [ %mfree.1.lcssa.i, %while.end.i ]
+ %nfree.010.i = phi i32 [ 1, %if.then.i ], [ %nfree.1.lcssa.i, %while.end.i ]
+ %base.i = getelementptr inbounds %struct.malloc_segment* %s.013.i, i32 0, i32 0
+ %3 = load i8** %base.i, align 4, !tbaa !0
+ %add.ptr.i = getelementptr inbounds i8* %3, i32 8
+ %4 = ptrtoint i8* %add.ptr.i to i32
+ %and.i = and i32 %4, 7
+ %cmp4.i = icmp eq i32 %and.i, 0
+ br i1 %cmp4.i, label %land.lhs.true.lr.ph.i, label %cond.false.i
+
+cond.false.i: ; preds = %while.body.i
+ %5 = sub i32 0, %4
+ %and8.i = and i32 %5, 7
+ br label %land.lhs.true.lr.ph.i
+
+land.lhs.true.lr.ph.i: ; preds = %cond.false.i, %while.body.i
+ %cond.i = phi i32 [ %and8.i, %cond.false.i ], [ 0, %while.body.i ]
+ %add.ptr9.i = getelementptr inbounds i8* %3, i32 %cond.i
+ %size.i = getelementptr inbounds %struct.malloc_segment* %s.013.i, i32 0, i32 1
+ %6 = load i32* %size.i, align 4, !tbaa !3
+ %add.ptr14.i = getelementptr inbounds i8* %3, i32 %6
+ br label %land.lhs.true.i
+
+land.lhs.true.i: ; preds = %if.end.i, %land.lhs.true.lr.ph.i
+ %q.0.in7.i = phi i8* [ %add.ptr9.i, %land.lhs.true.lr.ph.i ], [ %add.ptr31.i, %if.end.i ]
+ %sum.16.i = phi i32 [ %sum.012.i, %land.lhs.true.lr.ph.i ], [ %add23.i, %if.end.i ]
+ %mfree.15.i = phi i32 [ %mfree.011.i, %land.lhs.true.lr.ph.i ], [ %mfree.2.i, %if.end.i ]
+ %nfree.14.i = phi i32 [ %nfree.010.i, %land.lhs.true.lr.ph.i ], [ %nfree.2.i, %if.end.i ]
+ %q.0.i = bitcast i8* %q.0.in7.i to %struct.malloc_chunk*
+ %cmp15.i = icmp uge i8* %q.0.in7.i, %add.ptr14.i
+ %cmp18.i = icmp eq %struct.malloc_chunk* %q.0.i, %1
+ %or.cond.i = or i1 %cmp15.i, %cmp18.i
+ br i1 %or.cond.i, label %while.end.i, label %land.rhs.i
+
+land.rhs.i: ; preds = %land.lhs.true.i
+ %head.i = getelementptr inbounds i8* %q.0.in7.i, i32 4
+ %7 = bitcast i8* %head.i to i32*
+ %8 = load i32* %7, align 4, !tbaa !3
+ %cmp19.i = icmp eq i32 %8, 7
+ br i1 %cmp19.i, label %while.end.i, label %while.body20.i
+
+while.body20.i: ; preds = %land.rhs.i
+ %and22.i = and i32 %8, -8
+ %add23.i = add i32 %and22.i, %sum.16.i
+ %and25.i = and i32 %8, 3
+ %cmp26.i = icmp eq i32 %and25.i, 1
+ br i1 %cmp26.i, label %if.then27.i, label %if.end.i
+
+if.then27.i: ; preds = %while.body20.i
+ %add28.i = add i32 %and22.i, %mfree.15.i
+ %inc.i = add i32 %nfree.14.i, 1
+ br label %if.end.i
+
+if.end.i: ; preds = %if.then27.i, %while.body20.i
+ %nfree.2.i = phi i32 [ %nfree.14.i, %while.body20.i ], [ %inc.i, %if.then27.i ]
+ %mfree.2.i = phi i32 [ %mfree.15.i, %while.body20.i ], [ %add28.i, %if.then27.i ]
+ %add.ptr31.i = getelementptr inbounds i8* %q.0.in7.i, i32 %and22.i
+ %cmp12.i = icmp ult i8* %add.ptr31.i, %3
+ br i1 %cmp12.i, label %while.end.i, label %land.lhs.true.i
+
+while.end.i: ; preds = %if.end.i, %land.rhs.i, %land.lhs.true.i
+ %sum.1.lcssa.i = phi i32 [ %sum.16.i, %land.rhs.i ], [ %sum.16.i, %land.lhs.true.i ], [ %add23.i, %if.end.i ]
+ %mfree.1.lcssa.i = phi i32 [ %mfree.15.i, %land.rhs.i ], [ %mfree.15.i, %land.lhs.true.i ], [ %mfree.2.i, %if.end.i ]
+ %nfree.1.lcssa.i = phi i32 [ %nfree.14.i, %land.rhs.i ], [ %nfree.14.i, %land.lhs.true.i ], [ %nfree.2.i, %if.end.i ]
+ %next.i = getelementptr inbounds %struct.malloc_segment* %s.013.i, i32 0, i32 2
+ %9 = load %struct.malloc_segment** %next.i, align 4, !tbaa !0
+ %cmp2.i = icmp eq %struct.malloc_segment* %9, null
+ br i1 %cmp2.i, label %while.end32.i, label %while.body.i
+
+while.end32.i: ; preds = %while.end.i
+ %10 = load i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 12), align 4, !tbaa !3
+ %sub33.i = sub i32 %10, %sum.1.lcssa.i
+ %11 = load i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 13), align 4, !tbaa !3
+ %sub35.i = sub i32 %10, %mfree.1.lcssa.i
+ br label %internal_mallinfo.exit
+
+internal_mallinfo.exit: ; preds = %while.end32.i, %lor.end.i
+ %nm.sroa.6.0.i = phi i32 [ %sub35.i, %while.end32.i ], [ 0, %lor.end.i ]
+ %nm.sroa.4.0.i = phi i32 [ %11, %while.end32.i ], [ 0, %lor.end.i ]
+ %nm.sroa.3.0.i = phi i32 [ %sub33.i, %while.end32.i ], [ 0, %lor.end.i ]
+ %nm.sroa.1.0.i = phi i32 [ %nfree.1.lcssa.i, %while.end32.i ], [ 0, %lor.end.i ]
+ %nm.sroa.0.0.i = phi i32 [ %sum.1.lcssa.i, %while.end32.i ], [ 0, %lor.end.i ]
+ %nm.sroa.7.0.i = phi i32 [ %mfree.1.lcssa.i, %while.end32.i ], [ 0, %lor.end.i ]
+ %nm.sroa.8.0.i = phi i32 [ %2, %while.end32.i ], [ 0, %lor.end.i ]
+ %nm.sroa.0.0.idx.i = getelementptr inbounds %struct.mallinfo* %agg.result, i32 0, i32 0
+ store i32 %nm.sroa.0.0.i, i32* %nm.sroa.0.0.idx.i, align 4
+ %nm.sroa.1.4.idx25.i = getelementptr inbounds %struct.mallinfo* %agg.result, i32 0, i32 1
+ store i32 %nm.sroa.1.0.i, i32* %nm.sroa.1.4.idx25.i, align 4
+ %nm.sroa.2.8.idx.i = getelementptr inbounds %struct.mallinfo* %agg.result, i32 0, i32 2
+ %12 = bitcast i32* %nm.sroa.2.8.idx.i to i64*
+ store i64 0, i64* %12, align 4
+ %nm.sroa.3.16.idx31.i = getelementptr inbounds %struct.mallinfo* %agg.result, i32 0, i32 4
+ store i32 %nm.sroa.3.0.i, i32* %nm.sroa.3.16.idx31.i, align 4
+ %nm.sroa.4.20.idx33.i = getelementptr inbounds %struct.mallinfo* %agg.result, i32 0, i32 5
+ store i32 %nm.sroa.4.0.i, i32* %nm.sroa.4.20.idx33.i, align 4
+ %nm.sroa.5.24.idx35.i = getelementptr inbounds %struct.mallinfo* %agg.result, i32 0, i32 6
+ store i32 0, i32* %nm.sroa.5.24.idx35.i, align 4
+ %nm.sroa.6.28.idx37.i = getelementptr inbounds %struct.mallinfo* %agg.result, i32 0, i32 7
+ store i32 %nm.sroa.6.0.i, i32* %nm.sroa.6.28.idx37.i, align 4
+ %nm.sroa.7.32.idx39.i = getelementptr inbounds %struct.mallinfo* %agg.result, i32 0, i32 8
+ store i32 %nm.sroa.7.0.i, i32* %nm.sroa.7.32.idx39.i, align 4
+ %nm.sroa.8.36.idx41.i = getelementptr inbounds %struct.mallinfo* %agg.result, i32 0, i32 9
+ store i32 %nm.sroa.8.0.i, i32* %nm.sroa.8.36.idx41.i, align 4
+ ret void
+}
+
+; Function Attrs: nounwind
+define weak void @malloc_stats() #0 {
+entry:
+ %0 = load i32* getelementptr inbounds (%struct.malloc_params* @mparams, i32 0, i32 0), align 4, !tbaa !3
+ %cmp.i = icmp eq i32 %0, 0
+ br i1 %cmp.i, label %if.then.i.i, label %lor.end.i
+
+if.then.i.i: ; preds = %entry
+ %call.i.i = tail call i32 @sysconf(i32 30) #1
+ %sub.i.i = add i32 %call.i.i, -1
+ %and.i.i = and i32 %sub.i.i, %call.i.i
+ %cmp1.i.i = icmp eq i32 %and.i.i, 0
+ br i1 %cmp1.i.i, label %init_mparams.exit.i, label %if.then5.i.i
+
+if.then5.i.i: ; preds = %if.then.i.i
+ tail call void @abort() #6
+ unreachable
+
+init_mparams.exit.i: ; preds = %if.then.i.i
+ store i32 %call.i.i, i32* getelementptr inbounds (%struct.malloc_params* @mparams, i32 0, i32 2), align 4, !tbaa !3
+ store i32 %call.i.i, i32* getelementptr inbounds (%struct.malloc_params* @mparams, i32 0, i32 1), align 4, !tbaa !3
+ store i32 -1, i32* getelementptr inbounds (%struct.malloc_params* @mparams, i32 0, i32 3), align 4, !tbaa !3
+ store i32 -1, i32* getelementptr inbounds (%struct.malloc_params* @mparams, i32 0, i32 4), align 4, !tbaa !3
+ store i32 0, i32* getelementptr inbounds (%struct.malloc_params* @mparams, i32 0, i32 5), align 4, !tbaa !3
+ store i32 0, i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 15), align 4, !tbaa !3
+ %call6.i.i = tail call i32 @time(i32* null) #1
+ %xor.i.i = and i32 %call6.i.i, -16
+ %and7.i.i = xor i32 %xor.i.i, 1431655768
+ store volatile i32 %and7.i.i, i32* getelementptr inbounds (%struct.malloc_params* @mparams, i32 0, i32 0), align 4, !tbaa !3
+ br label %lor.end.i
+
+lor.end.i: ; preds = %init_mparams.exit.i, %entry
+ %1 = load %struct.malloc_chunk** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 6), align 4, !tbaa !0
+ %cmp1.i = icmp eq %struct.malloc_chunk* %1, null
+ br i1 %cmp1.i, label %internal_malloc_stats.exit, label %if.then.i
+
+if.then.i: ; preds = %lor.end.i
+ %2 = load i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 13), align 4, !tbaa !3
+ %3 = load i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 12), align 4, !tbaa !3
+ %4 = load i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 3), align 4, !tbaa !3
+ %add.neg.i = add i32 %3, -40
+ %sub.i = sub i32 %add.neg.i, %4
+ br label %while.body.i
+
+while.body.i: ; preds = %while.end.i, %if.then.i
+ %s.05.i = phi %struct.malloc_segment* [ getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 16), %if.then.i ], [ %11, %while.end.i ]
+ %used.04.i = phi i32 [ %sub.i, %if.then.i ], [ %used.1.lcssa.i, %while.end.i ]
+ %base.i = getelementptr inbounds %struct.malloc_segment* %s.05.i, i32 0, i32 0
+ %5 = load i8** %base.i, align 4, !tbaa !0
+ %add.ptr.i = getelementptr inbounds i8* %5, i32 8
+ %6 = ptrtoint i8* %add.ptr.i to i32
+ %and.i = and i32 %6, 7
+ %cmp4.i = icmp eq i32 %and.i, 0
+ br i1 %cmp4.i, label %land.lhs.true.lr.ph.i, label %cond.false.i
+
+cond.false.i: ; preds = %while.body.i
+ %7 = sub i32 0, %6
+ %and9.i = and i32 %7, 7
+ br label %land.lhs.true.lr.ph.i
+
+land.lhs.true.lr.ph.i: ; preds = %cond.false.i, %while.body.i
+ %cond.i = phi i32 [ %and9.i, %cond.false.i ], [ 0, %while.body.i ]
+ %add.ptr10.i = getelementptr inbounds i8* %5, i32 %cond.i
+ %size.i = getelementptr inbounds %struct.malloc_segment* %s.05.i, i32 0, i32 1
+ %8 = load i32* %size.i, align 4, !tbaa !3
+ %add.ptr15.i = getelementptr inbounds i8* %5, i32 %8
+ br label %land.lhs.true.i
+
+land.lhs.true.i: ; preds = %while.body21.i, %land.lhs.true.lr.ph.i
+ %q.0.in3.i = phi i8* [ %add.ptr10.i, %land.lhs.true.lr.ph.i ], [ %add.ptr31.i, %while.body21.i ]
+ %used.12.i = phi i32 [ %used.04.i, %land.lhs.true.lr.ph.i ], [ %used.2.i, %while.body21.i ]
+ %q.0.i = bitcast i8* %q.0.in3.i to %struct.malloc_chunk*
+ %cmp16.i = icmp uge i8* %q.0.in3.i, %add.ptr15.i
+ %cmp19.i = icmp eq %struct.malloc_chunk* %q.0.i, %1
+ %or.cond.i = or i1 %cmp16.i, %cmp19.i
+ br i1 %or.cond.i, label %while.end.i, label %land.rhs.i
+
+land.rhs.i: ; preds = %land.lhs.true.i
+ %head.i = getelementptr inbounds i8* %q.0.in3.i, i32 4
+ %9 = bitcast i8* %head.i to i32*
+ %10 = load i32* %9, align 4, !tbaa !3
+ %cmp20.i = icmp eq i32 %10, 7
+ br i1 %cmp20.i, label %while.end.i, label %while.body21.i
+
+while.body21.i: ; preds = %land.rhs.i
+ %and23.i = and i32 %10, 3
+ %cmp24.i = icmp eq i32 %and23.i, 1
+ %and27.i = and i32 %10, -8
+ %sub28.i = select i1 %cmp24.i, i32 %and27.i, i32 0
+ %used.2.i = sub i32 %used.12.i, %sub28.i
+ %add.ptr31.i = getelementptr inbounds i8* %q.0.in3.i, i32 %and27.i
+ %cmp13.i = icmp ult i8* %add.ptr31.i, %5
+ br i1 %cmp13.i, label %while.end.i, label %land.lhs.true.i
+
+while.end.i: ; preds = %while.body21.i, %land.rhs.i, %land.lhs.true.i
+ %used.1.lcssa.i = phi i32 [ %used.12.i, %land.rhs.i ], [ %used.12.i, %land.lhs.true.i ], [ %used.2.i, %while.body21.i ]
+ %next.i = getelementptr inbounds %struct.malloc_segment* %s.05.i, i32 0, i32 2
+ %11 = load %struct.malloc_segment** %next.i, align 4, !tbaa !0
+ %cmp2.i = icmp eq %struct.malloc_segment* %11, null
+ br i1 %cmp2.i, label %internal_malloc_stats.exit, label %while.body.i
+
+internal_malloc_stats.exit: ; preds = %while.end.i, %lor.end.i
+ %maxfp.0.i = phi i32 [ 0, %lor.end.i ], [ %2, %while.end.i ]
+ %fp.0.i = phi i32 [ 0, %lor.end.i ], [ %3, %while.end.i ]
+ %used.3.i = phi i32 [ 0, %lor.end.i ], [ %used.1.lcssa.i, %while.end.i ]
+ %12 = load %struct._IO_FILE** @stderr, align 4, !tbaa !0
+ %call34.i = tail call i32 (%struct._IO_FILE*, i8*, ...)* @fprintf(%struct._IO_FILE* %12, i8* getelementptr inbounds ([26 x i8]* @.str49, i32 0, i32 0), i32 %maxfp.0.i) #1
+ %call35.i = tail call i32 (%struct._IO_FILE*, i8*, ...)* @fprintf(%struct._IO_FILE* %12, i8* getelementptr inbounds ([26 x i8]* @.str150, i32 0, i32 0), i32 %fp.0.i) #1
+ %call36.i = tail call i32 (%struct._IO_FILE*, i8*, ...)* @fprintf(%struct._IO_FILE* %12, i8* getelementptr inbounds ([26 x i8]* @.str251, i32 0, i32 0), i32 %used.3.i) #1
+ ret void
+}
+
+; Function Attrs: nounwind
+define weak i32 @mallopt(i32 %param_number, i32 %value) #0 {
+entry:
+ %0 = load i32* getelementptr inbounds (%struct.malloc_params* @mparams, i32 0, i32 0), align 4, !tbaa !3
+ %cmp.i = icmp eq i32 %0, 0
+ br i1 %cmp.i, label %if.then.i.i, label %lor.end.i
+
+if.then.i.i: ; preds = %entry
+ %call.i.i = tail call i32 @sysconf(i32 30) #1
+ %sub.i.i = add i32 %call.i.i, -1
+ %and.i.i = and i32 %sub.i.i, %call.i.i
+ %cmp1.i.i = icmp eq i32 %and.i.i, 0
+ br i1 %cmp1.i.i, label %init_mparams.exit.i, label %if.then5.i.i
+
+if.then5.i.i: ; preds = %if.then.i.i
+ tail call void @abort() #6
+ unreachable
+
+init_mparams.exit.i: ; preds = %if.then.i.i
+ store i32 %call.i.i, i32* getelementptr inbounds (%struct.malloc_params* @mparams, i32 0, i32 2), align 4, !tbaa !3
+ store i32 %call.i.i, i32* getelementptr inbounds (%struct.malloc_params* @mparams, i32 0, i32 1), align 4, !tbaa !3
+ store i32 -1, i32* getelementptr inbounds (%struct.malloc_params* @mparams, i32 0, i32 3), align 4, !tbaa !3
+ store i32 -1, i32* getelementptr inbounds (%struct.malloc_params* @mparams, i32 0, i32 4), align 4, !tbaa !3
+ store i32 0, i32* getelementptr inbounds (%struct.malloc_params* @mparams, i32 0, i32 5), align 4, !tbaa !3
+ store i32 0, i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 15), align 4, !tbaa !3
+ %call6.i.i = tail call i32 @time(i32* null) #1
+ %xor.i.i = and i32 %call6.i.i, -16
+ %and7.i.i = xor i32 %xor.i.i, 1431655768
+ store volatile i32 %and7.i.i, i32* getelementptr inbounds (%struct.malloc_params* @mparams, i32 0, i32 0), align 4, !tbaa !3
+ br label %lor.end.i
+
+lor.end.i: ; preds = %init_mparams.exit.i, %entry
+ switch i32 %param_number, label %change_mparam.exit [
+ i32 -1, label %sw.bb.i
+ i32 -2, label %sw.bb2.i
+ i32 -3, label %sw.bb5.i
+ ]
+
+sw.bb.i: ; preds = %lor.end.i
+ store i32 %value, i32* getelementptr inbounds (%struct.malloc_params* @mparams, i32 0, i32 4), align 4, !tbaa !3
+ br label %change_mparam.exit
+
+sw.bb2.i: ; preds = %lor.end.i
+ %1 = load i32* getelementptr inbounds (%struct.malloc_params* @mparams, i32 0, i32 1), align 4, !tbaa !3
+ %cmp3.i = icmp ugt i32 %1, %value
+ br i1 %cmp3.i, label %change_mparam.exit, label %land.lhs.true.i
+
+land.lhs.true.i: ; preds = %sw.bb2.i
+ %sub.i = add i32 %value, -1
+ %and.i = and i32 %sub.i, %value
+ %cmp4.i = icmp eq i32 %and.i, 0
+ br i1 %cmp4.i, label %if.then.i, label %change_mparam.exit
+
+if.then.i: ; preds = %land.lhs.true.i
+ store i32 %value, i32* getelementptr inbounds (%struct.malloc_params* @mparams, i32 0, i32 2), align 4, !tbaa !3
+ br label %change_mparam.exit
+
+sw.bb5.i: ; preds = %lor.end.i
+ store i32 %value, i32* getelementptr inbounds (%struct.malloc_params* @mparams, i32 0, i32 3), align 4, !tbaa !3
+ br label %change_mparam.exit
+
+change_mparam.exit: ; preds = %sw.bb5.i, %if.then.i, %land.lhs.true.i, %sw.bb2.i, %sw.bb.i, %lor.end.i
+ %retval.0.i = phi i32 [ 1, %sw.bb5.i ], [ 1, %if.then.i ], [ 1, %sw.bb.i ], [ 0, %sw.bb2.i ], [ 0, %land.lhs.true.i ], [ 0, %lor.end.i ]
+ ret i32 %retval.0.i
+}
+
+; Function Attrs: nounwind
+define weak i32 @malloc_usable_size(i8* %mem) #0 {
+entry:
+ %cmp = icmp eq i8* %mem, null
+ br i1 %cmp, label %return, label %if.then
+
+if.then: ; preds = %entry
+ %head = getelementptr inbounds i8* %mem, i32 -4
+ %0 = bitcast i8* %head to i32*
+ %1 = load i32* %0, align 4, !tbaa !3
+ %and = and i32 %1, 3
+ %cmp1 = icmp eq i32 %and, 1
+ br i1 %cmp1, label %return, label %if.then2
+
+if.then2: ; preds = %if.then
+ %and4 = and i32 %1, -8
+ %cmp7 = icmp eq i32 %and, 0
+ %cond = select i1 %cmp7, i32 8, i32 4
+ %sub = sub i32 %and4, %cond
+ br label %return
+
+return: ; preds = %if.then2, %if.then, %entry
+ %retval.0 = phi i32 [ %sub, %if.then2 ], [ 0, %if.then ], [ 0, %entry ]
+ ret i32 %retval.0
+}
+
+; Function Attrs: nounwind
+declare i32 @fprintf(%struct._IO_FILE* nocapture, i8* nocapture, ...) #0
+
+declare i8* @sbrk(i32) #5
+
+; Function Attrs: nounwind
+define internal fastcc void @dispose_chunk(%struct.malloc_chunk* %p, i32 %psize) #0 {
+entry:
+ %0 = bitcast %struct.malloc_chunk* %p to i8*
+ %add.ptr = getelementptr inbounds i8* %0, i32 %psize
+ %1 = bitcast i8* %add.ptr to %struct.malloc_chunk*
+ %head = getelementptr inbounds %struct.malloc_chunk* %p, i32 0, i32 1
+ %2 = load i32* %head, align 4, !tbaa !3
+ %and = and i32 %2, 1
+ %tobool = icmp eq i32 %and, 0
+ br i1 %tobool, label %if.then, label %if.end215
+
+if.then: ; preds = %entry
+ %prev_foot = getelementptr inbounds %struct.malloc_chunk* %p, i32 0, i32 0
+ %3 = load i32* %prev_foot, align 4, !tbaa !3
+ %and2 = and i32 %2, 3
+ %cmp = icmp eq i32 %and2, 0
+ br i1 %cmp, label %if.end649, label %if.end
+
+if.end: ; preds = %if.then
+ %idx.neg = sub i32 0, %3
+ %add.ptr5 = getelementptr inbounds i8* %0, i32 %idx.neg
+ %4 = bitcast i8* %add.ptr5 to %struct.malloc_chunk*
+ %add6 = add i32 %3, %psize
+ %5 = load i8** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 4), align 4, !tbaa !0
+ %cmp7 = icmp ult i8* %add.ptr5, %5
+ br i1 %cmp7, label %if.else213, label %if.then9, !prof !6
+
+if.then9: ; preds = %if.end
+ %6 = load %struct.malloc_chunk** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 5), align 4, !tbaa !0
+ %cmp10 = icmp eq %struct.malloc_chunk* %4, %6
+ br i1 %cmp10, label %if.else200, label %if.then12
+
+if.then12: ; preds = %if.then9
+ %shr = lshr i32 %3, 3
+ %cmp13 = icmp ult i32 %3, 256
+ br i1 %cmp13, label %if.then15, label %if.else59
+
+if.then15: ; preds = %if.then12
+ %add.ptr5.sum24 = sub i32 8, %3
+ %fd = getelementptr inbounds i8* %0, i32 %add.ptr5.sum24
+ %7 = bitcast i8* %fd to %struct.malloc_chunk**
+ %8 = load %struct.malloc_chunk** %7, align 4, !tbaa !0
+ %add.ptr5.sum25 = sub i32 12, %3
+ %bk = getelementptr inbounds i8* %0, i32 %add.ptr5.sum25
+ %9 = bitcast i8* %bk to %struct.malloc_chunk**
+ %10 = load %struct.malloc_chunk** %9, align 4, !tbaa !0
+ %shl = shl nuw nsw i32 %shr, 1
+ %arrayidx = getelementptr inbounds %struct.malloc_state* @_gm_, i32 0, i32 10, i32 %shl
+ %11 = bitcast %struct.malloc_chunk** %arrayidx to %struct.malloc_chunk*
+ %cmp17 = icmp eq %struct.malloc_chunk* %8, %11
+ br i1 %cmp17, label %if.then27, label %lor.rhs
+
+lor.rhs: ; preds = %if.then15
+ %12 = bitcast %struct.malloc_chunk* %8 to i8*
+ %cmp20 = icmp ult i8* %12, %5
+ br i1 %cmp20, label %if.else57, label %land.rhs
+
+land.rhs: ; preds = %lor.rhs
+ %bk22 = getelementptr inbounds %struct.malloc_chunk* %8, i32 0, i32 3
+ %13 = load %struct.malloc_chunk** %bk22, align 4, !tbaa !0
+ %cmp23 = icmp eq %struct.malloc_chunk* %13, %4
+ br i1 %cmp23, label %if.then27, label %if.else57, !prof !5
+
+if.then27: ; preds = %land.rhs, %if.then15
+ %cmp28 = icmp eq %struct.malloc_chunk* %10, %8
+ br i1 %cmp28, label %if.then30, label %if.else
+
+if.then30: ; preds = %if.then27
+ %shl31 = shl i32 1, %shr
+ %neg = xor i32 %shl31, -1
+ %14 = load i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 0), align 4, !tbaa !3
+ %and32 = and i32 %14, %neg
+ store i32 %and32, i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 0), align 4, !tbaa !3
+ br label %if.end215
+
+if.else: ; preds = %if.then27
+ %cmp36 = icmp eq %struct.malloc_chunk* %10, %11
+ br i1 %cmp36, label %if.else.if.then51_crit_edge, label %lor.rhs38
+
+if.else.if.then51_crit_edge: ; preds = %if.else
+ %fd53.pre = getelementptr inbounds %struct.malloc_chunk* %10, i32 0, i32 2
+ br label %if.then51
+
+lor.rhs38: ; preds = %if.else
+ %15 = bitcast %struct.malloc_chunk* %10 to i8*
+ %cmp40 = icmp ult i8* %15, %5
+ br i1 %cmp40, label %if.else54, label %land.rhs42
+
+land.rhs42: ; preds = %lor.rhs38
+ %fd43 = getelementptr inbounds %struct.malloc_chunk* %10, i32 0, i32 2
+ %16 = load %struct.malloc_chunk** %fd43, align 4, !tbaa !0
+ %cmp44 = icmp eq %struct.malloc_chunk* %16, %4
+ br i1 %cmp44, label %if.then51, label %if.else54, !prof !5
+
+if.then51: ; preds = %land.rhs42, %if.else.if.then51_crit_edge
+ %fd53.pre-phi = phi %struct.malloc_chunk** [ %fd53.pre, %if.else.if.then51_crit_edge ], [ %fd43, %land.rhs42 ]
+ %bk52 = getelementptr inbounds %struct.malloc_chunk* %8, i32 0, i32 3
+ store %struct.malloc_chunk* %10, %struct.malloc_chunk** %bk52, align 4, !tbaa !0
+ store %struct.malloc_chunk* %8, %struct.malloc_chunk** %fd53.pre-phi, align 4, !tbaa !0
+ br label %if.end215
+
+if.else54: ; preds = %land.rhs42, %lor.rhs38
+ tail call void @abort() #6
+ unreachable
+
+if.else57: ; preds = %land.rhs, %lor.rhs
+ tail call void @abort() #6
+ unreachable
+
+if.else59: ; preds = %if.then12
+ %17 = bitcast i8* %add.ptr5 to %struct.malloc_tree_chunk*
+ %add.ptr5.sum18 = sub i32 24, %3
+ %parent = getelementptr inbounds i8* %0, i32 %add.ptr5.sum18
+ %18 = bitcast i8* %parent to %struct.malloc_tree_chunk**
+ %19 = load %struct.malloc_tree_chunk** %18, align 4, !tbaa !0
+ %add.ptr5.sum19 = sub i32 12, %3
+ %bk60 = getelementptr inbounds i8* %0, i32 %add.ptr5.sum19
+ %20 = bitcast i8* %bk60 to %struct.malloc_tree_chunk**
+ %21 = load %struct.malloc_tree_chunk** %20, align 4, !tbaa !0
+ %cmp61 = icmp eq %struct.malloc_tree_chunk* %21, %17
+ br i1 %cmp61, label %if.else85, label %if.then63
+
+if.then63: ; preds = %if.else59
+ %add.ptr5.sum23 = sub i32 8, %3
+ %fd65 = getelementptr inbounds i8* %0, i32 %add.ptr5.sum23
+ %22 = bitcast i8* %fd65 to %struct.malloc_tree_chunk**
+ %23 = load %struct.malloc_tree_chunk** %22, align 4, !tbaa !0
+ %24 = bitcast %struct.malloc_tree_chunk* %23 to i8*
+ %cmp68 = icmp ult i8* %24, %5
+ br i1 %cmp68, label %if.else83, label %land.lhs.true
+
+land.lhs.true: ; preds = %if.then63
+ %bk70 = getelementptr inbounds %struct.malloc_tree_chunk* %23, i32 0, i32 3
+ %25 = load %struct.malloc_tree_chunk** %bk70, align 4, !tbaa !0
+ %cmp71 = icmp eq %struct.malloc_tree_chunk* %25, %17
+ br i1 %cmp71, label %land.rhs73, label %if.else83
+
+land.rhs73: ; preds = %land.lhs.true
+ %fd74 = getelementptr inbounds %struct.malloc_tree_chunk* %21, i32 0, i32 2
+ %26 = load %struct.malloc_tree_chunk** %fd74, align 4, !tbaa !0
+ %cmp75 = icmp eq %struct.malloc_tree_chunk* %26, %17
+ br i1 %cmp75, label %if.then80, label %if.else83, !prof !5
+
+if.then80: ; preds = %land.rhs73
+ store %struct.malloc_tree_chunk* %21, %struct.malloc_tree_chunk** %bk70, align 4, !tbaa !0
+ store %struct.malloc_tree_chunk* %23, %struct.malloc_tree_chunk** %fd74, align 4, !tbaa !0
+ br label %if.end114
+
+if.else83: ; preds = %land.rhs73, %land.lhs.true, %if.then63
+ tail call void @abort() #6
+ unreachable
+
+if.else85: ; preds = %if.else59
+ %add.ptr5.sum20 = sub i32 16, %3
+ %child.sum = add i32 %add.ptr5.sum20, 4
+ %arrayidx86 = getelementptr inbounds i8* %0, i32 %child.sum
+ %27 = bitcast i8* %arrayidx86 to %struct.malloc_tree_chunk**
+ %28 = load %struct.malloc_tree_chunk** %27, align 4, !tbaa !0
+ %cmp87 = icmp eq %struct.malloc_tree_chunk* %28, null
+ br i1 %cmp87, label %lor.lhs.false, label %while.cond
+
+lor.lhs.false: ; preds = %if.else85
+ %child = getelementptr inbounds i8* %0, i32 %add.ptr5.sum20
+ %arrayidx90 = bitcast i8* %child to %struct.malloc_tree_chunk**
+ %29 = load %struct.malloc_tree_chunk** %arrayidx90, align 4, !tbaa !0
+ %cmp91 = icmp eq %struct.malloc_tree_chunk* %29, null
+ br i1 %cmp91, label %if.end114, label %while.cond
+
+while.cond: ; preds = %lor.rhs98, %while.cond, %lor.lhs.false, %if.else85
+ %RP.0 = phi %struct.malloc_tree_chunk** [ %arrayidx90, %lor.lhs.false ], [ %27, %if.else85 ], [ %arrayidx95, %while.cond ], [ %arrayidx100, %lor.rhs98 ]
+ %R.0 = phi %struct.malloc_tree_chunk* [ %29, %lor.lhs.false ], [ %28, %if.else85 ], [ %30, %while.cond ], [ %31, %lor.rhs98 ]
+ %arrayidx95 = getelementptr inbounds %struct.malloc_tree_chunk* %R.0, i32 0, i32 4, i32 1
+ %30 = load %struct.malloc_tree_chunk** %arrayidx95, align 4, !tbaa !0
+ %cmp96 = icmp eq %struct.malloc_tree_chunk* %30, null
+ br i1 %cmp96, label %lor.rhs98, label %while.cond
+
+lor.rhs98: ; preds = %while.cond
+ %arrayidx100 = getelementptr inbounds %struct.malloc_tree_chunk* %R.0, i32 0, i32 4, i32 0
+ %31 = load %struct.malloc_tree_chunk** %arrayidx100, align 4, !tbaa !0
+ %cmp101 = icmp eq %struct.malloc_tree_chunk* %31, null
+ br i1 %cmp101, label %while.end, label %while.cond
+
+while.end: ; preds = %lor.rhs98
+ %32 = bitcast %struct.malloc_tree_chunk** %RP.0 to i8*
+ %cmp106 = icmp ult i8* %32, %5
+ br i1 %cmp106, label %if.else111, label %if.then110, !prof !6
+
+if.then110: ; preds = %while.end
+ store %struct.malloc_tree_chunk* null, %struct.malloc_tree_chunk** %RP.0, align 4, !tbaa !0
+ br label %if.end114
+
+if.else111: ; preds = %while.end
+ tail call void @abort() #6
+ unreachable
+
+if.end114: ; preds = %if.then110, %lor.lhs.false, %if.then80
+ %R.1 = phi %struct.malloc_tree_chunk* [ %21, %if.then80 ], [ %R.0, %if.then110 ], [ null, %lor.lhs.false ]
+ %cmp115 = icmp eq %struct.malloc_tree_chunk* %19, null
+ br i1 %cmp115, label %if.end215, label %if.then117
+
+if.then117: ; preds = %if.end114
+ %add.ptr5.sum21 = sub i32 28, %3
+ %index = getelementptr inbounds i8* %0, i32 %add.ptr5.sum21
+ %33 = bitcast i8* %index to i32*
+ %34 = load i32* %33, align 4, !tbaa !3
+ %arrayidx118 = getelementptr inbounds %struct.malloc_state* @_gm_, i32 0, i32 11, i32 %34
+ %35 = load %struct.malloc_tree_chunk** %arrayidx118, align 4, !tbaa !0
+ %cmp119 = icmp eq %struct.malloc_tree_chunk* %17, %35
+ br i1 %cmp119, label %if.then121, label %if.else130
+
+if.then121: ; preds = %if.then117
+ store %struct.malloc_tree_chunk* %R.1, %struct.malloc_tree_chunk** %arrayidx118, align 4, !tbaa !0
+ %cond29 = icmp eq %struct.malloc_tree_chunk* %R.1, null
+ br i1 %cond29, label %if.end150.thread, label %if.then153
+
+if.end150.thread: ; preds = %if.then121
+ %shl126 = shl i32 1, %34
+ %neg127 = xor i32 %shl126, -1
+ %36 = load i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 1), align 4, !tbaa !3
+ %and128 = and i32 %36, %neg127
+ store i32 %and128, i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 1), align 4, !tbaa !3
+ br label %if.end215
+
+if.else130: ; preds = %if.then117
+ %37 = bitcast %struct.malloc_tree_chunk* %19 to i8*
+ %38 = load i8** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 4), align 4, !tbaa !0
+ %cmp132 = icmp ult i8* %37, %38
+ br i1 %cmp132, label %if.else148, label %if.then136, !prof !6
+
+if.then136: ; preds = %if.else130
+ %arrayidx138 = getelementptr inbounds %struct.malloc_tree_chunk* %19, i32 0, i32 4, i32 0
+ %39 = load %struct.malloc_tree_chunk** %arrayidx138, align 4, !tbaa !0
+ %cmp139 = icmp eq %struct.malloc_tree_chunk* %39, %17
+ br i1 %cmp139, label %if.then141, label %if.else144
+
+if.then141: ; preds = %if.then136
+ store %struct.malloc_tree_chunk* %R.1, %struct.malloc_tree_chunk** %arrayidx138, align 4, !tbaa !0
+ br label %if.end150
+
+if.else144: ; preds = %if.then136
+ %arrayidx146 = getelementptr inbounds %struct.malloc_tree_chunk* %19, i32 0, i32 4, i32 1
+ store %struct.malloc_tree_chunk* %R.1, %struct.malloc_tree_chunk** %arrayidx146, align 4, !tbaa !0
+ br label %if.end150
+
+if.else148: ; preds = %if.else130
+ tail call void @abort() #6
+ unreachable
+
+if.end150: ; preds = %if.else144, %if.then141
+ %cmp151 = icmp eq %struct.malloc_tree_chunk* %R.1, null
+ br i1 %cmp151, label %if.end215, label %if.then153
+
+if.then153: ; preds = %if.end150, %if.then121
+ %40 = bitcast %struct.malloc_tree_chunk* %R.1 to i8*
+ %41 = load i8** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 4), align 4, !tbaa !0
+ %cmp155 = icmp ult i8* %40, %41
+ br i1 %cmp155, label %if.else195, label %if.then159, !prof !6
+
+if.then159: ; preds = %if.then153
+ %parent160 = getelementptr inbounds %struct.malloc_tree_chunk* %R.1, i32 0, i32 5
+ store %struct.malloc_tree_chunk* %19, %struct.malloc_tree_chunk** %parent160, align 4, !tbaa !0
+ %add.ptr5.sum22 = sub i32 16, %3
+ %child161 = getelementptr inbounds i8* %0, i32 %add.ptr5.sum22
+ %arrayidx162 = bitcast i8* %child161 to %struct.malloc_tree_chunk**
+ %42 = load %struct.malloc_tree_chunk** %arrayidx162, align 4, !tbaa !0
+ %cmp163 = icmp eq %struct.malloc_tree_chunk* %42, null
+ br i1 %cmp163, label %if.end177, label %if.then165
+
+if.then165: ; preds = %if.then159
+ %43 = bitcast %struct.malloc_tree_chunk* %42 to i8*
+ %44 = load i8** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 4), align 4, !tbaa !0
+ %cmp167 = icmp ult i8* %43, %44
+ br i1 %cmp167, label %if.else175, label %if.then171, !prof !6
+
+if.then171: ; preds = %if.then165
+ %arrayidx173 = getelementptr inbounds %struct.malloc_tree_chunk* %R.1, i32 0, i32 4, i32 0
+ store %struct.malloc_tree_chunk* %42, %struct.malloc_tree_chunk** %arrayidx173, align 4, !tbaa !0
+ %parent174 = getelementptr inbounds %struct.malloc_tree_chunk* %42, i32 0, i32 5
+ store %struct.malloc_tree_chunk* %R.1, %struct.malloc_tree_chunk** %parent174, align 4, !tbaa !0
+ br label %if.end177
+
+if.else175: ; preds = %if.then165
+ tail call void @abort() #6
+ unreachable
+
+if.end177: ; preds = %if.then171, %if.then159
+ %child161.sum = add i32 %add.ptr5.sum22, 4
+ %arrayidx179 = getelementptr inbounds i8* %0, i32 %child161.sum
+ %45 = bitcast i8* %arrayidx179 to %struct.malloc_tree_chunk**
+ %46 = load %struct.malloc_tree_chunk** %45, align 4, !tbaa !0
+ %cmp180 = icmp eq %struct.malloc_tree_chunk* %46, null
+ br i1 %cmp180, label %if.end215, label %if.then182
+
+if.then182: ; preds = %if.end177
+ %47 = bitcast %struct.malloc_tree_chunk* %46 to i8*
+ %48 = load i8** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 4), align 4, !tbaa !0
+ %cmp184 = icmp ult i8* %47, %48
+ br i1 %cmp184, label %if.else192, label %if.then188, !prof !6
+
+if.then188: ; preds = %if.then182
+ %arrayidx190 = getelementptr inbounds %struct.malloc_tree_chunk* %R.1, i32 0, i32 4, i32 1
+ store %struct.malloc_tree_chunk* %46, %struct.malloc_tree_chunk** %arrayidx190, align 4, !tbaa !0
+ %parent191 = getelementptr inbounds %struct.malloc_tree_chunk* %46, i32 0, i32 5
+ store %struct.malloc_tree_chunk* %R.1, %struct.malloc_tree_chunk** %parent191, align 4, !tbaa !0
+ br label %if.end215
+
+if.else192: ; preds = %if.then182
+ tail call void @abort() #6
+ unreachable
+
+if.else195: ; preds = %if.then153
+ tail call void @abort() #6
+ unreachable
+
+if.else200: ; preds = %if.then9
+ %add.ptr.sum = add i32 %psize, 4
+ %head201 = getelementptr inbounds i8* %0, i32 %add.ptr.sum
+ %49 = bitcast i8* %head201 to i32*
+ %50 = load i32* %49, align 4, !tbaa !3
+ %and202 = and i32 %50, 3
+ %cmp203 = icmp eq i32 %and202, 3
+ br i1 %cmp203, label %if.then205, label %if.end215
+
+if.then205: ; preds = %if.else200
+ store i32 %add6, i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 2), align 4, !tbaa !3
+ %51 = load i32* %49, align 4, !tbaa !3
+ %and207 = and i32 %51, -2
+ store i32 %and207, i32* %49, align 4, !tbaa !3
+ %or = or i32 %add6, 1
+ %add.ptr5.sum = sub i32 4, %3
+ %head208 = getelementptr inbounds i8* %0, i32 %add.ptr5.sum
+ %52 = bitcast i8* %head208 to i32*
+ store i32 %or, i32* %52, align 4, !tbaa !3
+ %prev_foot210 = bitcast i8* %add.ptr to i32*
+ store i32 %add6, i32* %prev_foot210, align 4, !tbaa !3
+ br label %if.end649
+
+if.else213: ; preds = %if.end
+ tail call void @abort() #6
+ unreachable
+
+if.end215: ; preds = %if.else200, %if.then188, %if.end177, %if.end150, %if.end150.thread, %if.end114, %if.then51, %if.then30, %entry
+ %psize.addr.0 = phi i32 [ %add6, %if.then30 ], [ %add6, %if.then51 ], [ %add6, %if.then188 ], [ %add6, %if.else200 ], [ %psize, %entry ], [ %add6, %if.end114 ], [ %add6, %if.end150.thread ], [ %add6, %if.end150 ], [ %add6, %if.end177 ]
+ %p.addr.0 = phi %struct.malloc_chunk* [ %4, %if.then30 ], [ %4, %if.then51 ], [ %4, %if.then188 ], [ %4, %if.else200 ], [ %p, %entry ], [ %4, %if.end114 ], [ %4, %if.end150.thread ], [ %4, %if.end150 ], [ %4, %if.end177 ]
+ %53 = load i8** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 4), align 4, !tbaa !0
+ %cmp217 = icmp ult i8* %add.ptr, %53
+ br i1 %cmp217, label %if.else648, label %if.then221, !prof !6
+
+if.then221: ; preds = %if.end215
+ %add.ptr.sum1 = add i32 %psize, 4
+ %head222 = getelementptr inbounds i8* %0, i32 %add.ptr.sum1
+ %54 = bitcast i8* %head222 to i32*
+ %55 = load i32* %54, align 4, !tbaa !3
+ %and223 = and i32 %55, 2
+ %tobool224 = icmp eq i32 %and223, 0
+ br i1 %tobool224, label %if.then225, label %if.else493
+
+if.then225: ; preds = %if.then221
+ %56 = load %struct.malloc_chunk** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 6), align 4, !tbaa !0
+ %cmp226 = icmp eq %struct.malloc_chunk* %1, %56
+ br i1 %cmp226, label %if.then228, label %if.else240
+
+if.then228: ; preds = %if.then225
+ %57 = load i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 3), align 4, !tbaa !3
+ %add229 = add i32 %57, %psize.addr.0
+ store i32 %add229, i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 3), align 4, !tbaa !3
+ store %struct.malloc_chunk* %p.addr.0, %struct.malloc_chunk** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 6), align 4, !tbaa !0
+ %or231 = or i32 %add229, 1
+ %head232 = getelementptr inbounds %struct.malloc_chunk* %p.addr.0, i32 0, i32 1
+ store i32 %or231, i32* %head232, align 4, !tbaa !3
+ %58 = load %struct.malloc_chunk** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 5), align 4, !tbaa !0
+ %cmp234 = icmp eq %struct.malloc_chunk* %p.addr.0, %58
+ br i1 %cmp234, label %if.then236, label %if.end649
+
+if.then236: ; preds = %if.then228
+ store %struct.malloc_chunk* null, %struct.malloc_chunk** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 5), align 4, !tbaa !0
+ store i32 0, i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 2), align 4, !tbaa !3
+ br label %if.end649
+
+if.else240: ; preds = %if.then225
+ %59 = load %struct.malloc_chunk** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 5), align 4, !tbaa !0
+ %cmp242 = icmp eq %struct.malloc_chunk* %1, %59
+ br i1 %cmp242, label %if.then244, label %if.else252
+
+if.then244: ; preds = %if.else240
+ %60 = load i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 2), align 4, !tbaa !3
+ %add246 = add i32 %60, %psize.addr.0
+ store i32 %add246, i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 2), align 4, !tbaa !3
+ store %struct.malloc_chunk* %p.addr.0, %struct.malloc_chunk** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 5), align 4, !tbaa !0
+ %or248 = or i32 %add246, 1
+ %head249 = getelementptr inbounds %struct.malloc_chunk* %p.addr.0, i32 0, i32 1
+ store i32 %or248, i32* %head249, align 4, !tbaa !3
+ %61 = bitcast %struct.malloc_chunk* %p.addr.0 to i8*
+ %add.ptr250 = getelementptr inbounds i8* %61, i32 %add246
+ %prev_foot251 = bitcast i8* %add.ptr250 to i32*
+ store i32 %add246, i32* %prev_foot251, align 4, !tbaa !3
+ br label %if.end649
+
+if.else252: ; preds = %if.else240
+ %and254 = and i32 %55, -8
+ %add255 = add i32 %and254, %psize.addr.0
+ %shr256 = lshr i32 %55, 3
+ %cmp257 = icmp ult i32 %55, 256
+ br i1 %cmp257, label %if.then259, label %if.else321
+
+if.then259: ; preds = %if.else252
+ %add.ptr.sum15 = add i32 %psize, 8
+ %fd261 = getelementptr inbounds i8* %0, i32 %add.ptr.sum15
+ %62 = bitcast i8* %fd261 to %struct.malloc_chunk**
+ %63 = load %struct.malloc_chunk** %62, align 4, !tbaa !0
+ %add.ptr.sum16 = add i32 %psize, 12
+ %bk263 = getelementptr inbounds i8* %0, i32 %add.ptr.sum16
+ %64 = bitcast i8* %bk263 to %struct.malloc_chunk**
+ %65 = load %struct.malloc_chunk** %64, align 4, !tbaa !0
+ %shl266 = shl nuw nsw i32 %shr256, 1
+ %arrayidx268 = getelementptr inbounds %struct.malloc_state* @_gm_, i32 0, i32 10, i32 %shl266
+ %66 = bitcast %struct.malloc_chunk** %arrayidx268 to %struct.malloc_chunk*
+ %cmp269 = icmp eq %struct.malloc_chunk* %63, %66
+ br i1 %cmp269, label %if.then285, label %lor.rhs271
+
+lor.rhs271: ; preds = %if.then259
+ %67 = bitcast %struct.malloc_chunk* %63 to i8*
+ %cmp273 = icmp ult i8* %67, %53
+ br i1 %cmp273, label %if.else319, label %land.rhs275
+
+land.rhs275: ; preds = %lor.rhs271
+ %bk276 = getelementptr inbounds %struct.malloc_chunk* %63, i32 0, i32 3
+ %68 = load %struct.malloc_chunk** %bk276, align 4, !tbaa !0
+ %cmp277 = icmp eq %struct.malloc_chunk* %68, %1
+ br i1 %cmp277, label %if.then285, label %if.else319, !prof !5
+
+if.then285: ; preds = %land.rhs275, %if.then259
+ %cmp286 = icmp eq %struct.malloc_chunk* %65, %63
+ br i1 %cmp286, label %if.then288, label %if.else293
+
+if.then288: ; preds = %if.then285
+ %shl289 = shl i32 1, %shr256
+ %neg290 = xor i32 %shl289, -1
+ %69 = load i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 0), align 4, !tbaa !3
+ %and292 = and i32 %69, %neg290
+ store i32 %and292, i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 0), align 4, !tbaa !3
+ br label %if.end480
+
+if.else293: ; preds = %if.then285
+ %cmp297 = icmp eq %struct.malloc_chunk* %65, %66
+ br i1 %cmp297, label %if.else293.if.then313_crit_edge, label %lor.rhs299
+
+if.else293.if.then313_crit_edge: ; preds = %if.else293
+ %fd315.pre = getelementptr inbounds %struct.malloc_chunk* %65, i32 0, i32 2
+ br label %if.then313
+
+lor.rhs299: ; preds = %if.else293
+ %70 = bitcast %struct.malloc_chunk* %65 to i8*
+ %cmp301 = icmp ult i8* %70, %53
+ br i1 %cmp301, label %if.else316, label %land.rhs303
+
+land.rhs303: ; preds = %lor.rhs299
+ %fd304 = getelementptr inbounds %struct.malloc_chunk* %65, i32 0, i32 2
+ %71 = load %struct.malloc_chunk** %fd304, align 4, !tbaa !0
+ %cmp305 = icmp eq %struct.malloc_chunk* %71, %1
+ br i1 %cmp305, label %if.then313, label %if.else316, !prof !5
+
+if.then313: ; preds = %land.rhs303, %if.else293.if.then313_crit_edge
+ %fd315.pre-phi = phi %struct.malloc_chunk** [ %fd315.pre, %if.else293.if.then313_crit_edge ], [ %fd304, %land.rhs303 ]
+ %bk314 = getelementptr inbounds %struct.malloc_chunk* %63, i32 0, i32 3
+ store %struct.malloc_chunk* %65, %struct.malloc_chunk** %bk314, align 4, !tbaa !0
+ store %struct.malloc_chunk* %63, %struct.malloc_chunk** %fd315.pre-phi, align 4, !tbaa !0
+ br label %if.end480
+
+if.else316: ; preds = %land.rhs303, %lor.rhs299
+ tail call void @abort() #6
+ unreachable
+
+if.else319: ; preds = %land.rhs275, %lor.rhs271
+ tail call void @abort() #6
+ unreachable
+
+if.else321: ; preds = %if.else252
+ %72 = bitcast i8* %add.ptr to %struct.malloc_tree_chunk*
+ %add.ptr.sum2 = add i32 %psize, 24
+ %parent324 = getelementptr inbounds i8* %0, i32 %add.ptr.sum2
+ %73 = bitcast i8* %parent324 to %struct.malloc_tree_chunk**
+ %74 = load %struct.malloc_tree_chunk** %73, align 4, !tbaa !0
+ %add.ptr.sum3 = add i32 %psize, 12
+ %bk326 = getelementptr inbounds i8* %0, i32 %add.ptr.sum3
+ %75 = bitcast i8* %bk326 to %struct.malloc_tree_chunk**
+ %76 = load %struct.malloc_tree_chunk** %75, align 4, !tbaa !0
+ %cmp327 = icmp eq %struct.malloc_tree_chunk* %76, %72
+ br i1 %cmp327, label %if.else353, label %if.then329
+
+if.then329: ; preds = %if.else321
+ %add.ptr.sum14 = add i32 %psize, 8
+ %fd331 = getelementptr inbounds i8* %0, i32 %add.ptr.sum14
+ %77 = bitcast i8* %fd331 to %struct.malloc_tree_chunk**
+ %78 = load %struct.malloc_tree_chunk** %77, align 4, !tbaa !0
+ %79 = bitcast %struct.malloc_tree_chunk* %78 to i8*
+ %cmp334 = icmp ult i8* %79, %53
+ br i1 %cmp334, label %if.else351, label %land.lhs.true336
+
+land.lhs.true336: ; preds = %if.then329
+ %bk337 = getelementptr inbounds %struct.malloc_tree_chunk* %78, i32 0, i32 3
+ %80 = load %struct.malloc_tree_chunk** %bk337, align 4, !tbaa !0
+ %cmp338 = icmp eq %struct.malloc_tree_chunk* %80, %72
+ br i1 %cmp338, label %land.rhs340, label %if.else351
+
+land.rhs340: ; preds = %land.lhs.true336
+ %fd341 = getelementptr inbounds %struct.malloc_tree_chunk* %76, i32 0, i32 2
+ %81 = load %struct.malloc_tree_chunk** %fd341, align 4, !tbaa !0
+ %cmp342 = icmp eq %struct.malloc_tree_chunk* %81, %72
+ br i1 %cmp342, label %if.then348, label %if.else351, !prof !5
+
+if.then348: ; preds = %land.rhs340
+ store %struct.malloc_tree_chunk* %76, %struct.malloc_tree_chunk** %bk337, align 4, !tbaa !0
+ store %struct.malloc_tree_chunk* %78, %struct.malloc_tree_chunk** %fd341, align 4, !tbaa !0
+ br label %if.end389
+
+if.else351: ; preds = %land.rhs340, %land.lhs.true336, %if.then329
+ tail call void @abort() #6
+ unreachable
+
+if.else353: ; preds = %if.else321
+ %child355.sum = add i32 %psize, 20
+ %arrayidx356 = getelementptr inbounds i8* %0, i32 %child355.sum
+ %82 = bitcast i8* %arrayidx356 to %struct.malloc_tree_chunk**
+ %83 = load %struct.malloc_tree_chunk** %82, align 4, !tbaa !0
+ %cmp357 = icmp eq %struct.malloc_tree_chunk* %83, null
+ br i1 %cmp357, label %lor.lhs.false359, label %while.cond366
+
+lor.lhs.false359: ; preds = %if.else353
+ %add.ptr.sum4 = add i32 %psize, 16
+ %child355 = getelementptr inbounds i8* %0, i32 %add.ptr.sum4
+ %arrayidx361 = bitcast i8* %child355 to %struct.malloc_tree_chunk**
+ %84 = load %struct.malloc_tree_chunk** %arrayidx361, align 4, !tbaa !0
+ %cmp362 = icmp eq %struct.malloc_tree_chunk* %84, null
+ br i1 %cmp362, label %if.end389, label %while.cond366
+
+while.cond366: ; preds = %lor.rhs371, %while.cond366, %lor.lhs.false359, %if.else353
+ %RP354.0 = phi %struct.malloc_tree_chunk** [ %arrayidx361, %lor.lhs.false359 ], [ %82, %if.else353 ], [ %arrayidx368, %while.cond366 ], [ %arrayidx373, %lor.rhs371 ]
+ %R325.0 = phi %struct.malloc_tree_chunk* [ %84, %lor.lhs.false359 ], [ %83, %if.else353 ], [ %85, %while.cond366 ], [ %86, %lor.rhs371 ]
+ %arrayidx368 = getelementptr inbounds %struct.malloc_tree_chunk* %R325.0, i32 0, i32 4, i32 1
+ %85 = load %struct.malloc_tree_chunk** %arrayidx368, align 4, !tbaa !0
+ %cmp369 = icmp eq %struct.malloc_tree_chunk* %85, null
+ br i1 %cmp369, label %lor.rhs371, label %while.cond366
+
+lor.rhs371: ; preds = %while.cond366
+ %arrayidx373 = getelementptr inbounds %struct.malloc_tree_chunk* %R325.0, i32 0, i32 4, i32 0
+ %86 = load %struct.malloc_tree_chunk** %arrayidx373, align 4, !tbaa !0
+ %cmp374 = icmp eq %struct.malloc_tree_chunk* %86, null
+ br i1 %cmp374, label %while.end379, label %while.cond366
+
+while.end379: ; preds = %lor.rhs371
+ %87 = bitcast %struct.malloc_tree_chunk** %RP354.0 to i8*
+ %cmp381 = icmp ult i8* %87, %53
+ br i1 %cmp381, label %if.else386, label %if.then385, !prof !6
+
+if.then385: ; preds = %while.end379
+ store %struct.malloc_tree_chunk* null, %struct.malloc_tree_chunk** %RP354.0, align 4, !tbaa !0
+ br label %if.end389
+
+if.else386: ; preds = %while.end379
+ tail call void @abort() #6
+ unreachable
+
+if.end389: ; preds = %if.then385, %lor.lhs.false359, %if.then348
+ %R325.1 = phi %struct.malloc_tree_chunk* [ %76, %if.then348 ], [ %R325.0, %if.then385 ], [ null, %lor.lhs.false359 ]
+ %cmp390 = icmp eq %struct.malloc_tree_chunk* %74, null
+ br i1 %cmp390, label %if.end480, label %if.then392
+
+if.then392: ; preds = %if.end389
+ %add.ptr.sum12 = add i32 %psize, 28
+ %index394 = getelementptr inbounds i8* %0, i32 %add.ptr.sum12
+ %88 = bitcast i8* %index394 to i32*
+ %89 = load i32* %88, align 4, !tbaa !3
+ %arrayidx396 = getelementptr inbounds %struct.malloc_state* @_gm_, i32 0, i32 11, i32 %89
+ %90 = load %struct.malloc_tree_chunk** %arrayidx396, align 4, !tbaa !0
+ %cmp397 = icmp eq %struct.malloc_tree_chunk* %72, %90
+ br i1 %cmp397, label %if.then399, label %if.else409
+
+if.then399: ; preds = %if.then392
+ store %struct.malloc_tree_chunk* %R325.1, %struct.malloc_tree_chunk** %arrayidx396, align 4, !tbaa !0
+ %cond30 = icmp eq %struct.malloc_tree_chunk* %R325.1, null
+ br i1 %cond30, label %if.end429.thread, label %if.then432
+
+if.end429.thread: ; preds = %if.then399
+ %shl404 = shl i32 1, %89
+ %neg405 = xor i32 %shl404, -1
+ %91 = load i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 1), align 4, !tbaa !3
+ %and407 = and i32 %91, %neg405
+ store i32 %and407, i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 1), align 4, !tbaa !3
+ br label %if.end480
+
+if.else409: ; preds = %if.then392
+ %92 = bitcast %struct.malloc_tree_chunk* %74 to i8*
+ %93 = load i8** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 4), align 4, !tbaa !0
+ %cmp411 = icmp ult i8* %92, %93
+ br i1 %cmp411, label %if.else427, label %if.then415, !prof !6
+
+if.then415: ; preds = %if.else409
+ %arrayidx417 = getelementptr inbounds %struct.malloc_tree_chunk* %74, i32 0, i32 4, i32 0
+ %94 = load %struct.malloc_tree_chunk** %arrayidx417, align 4, !tbaa !0
+ %cmp418 = icmp eq %struct.malloc_tree_chunk* %94, %72
+ br i1 %cmp418, label %if.then420, label %if.else423
+
+if.then420: ; preds = %if.then415
+ store %struct.malloc_tree_chunk* %R325.1, %struct.malloc_tree_chunk** %arrayidx417, align 4, !tbaa !0
+ br label %if.end429
+
+if.else423: ; preds = %if.then415
+ %arrayidx425 = getelementptr inbounds %struct.malloc_tree_chunk* %74, i32 0, i32 4, i32 1
+ store %struct.malloc_tree_chunk* %R325.1, %struct.malloc_tree_chunk** %arrayidx425, align 4, !tbaa !0
+ br label %if.end429
+
+if.else427: ; preds = %if.else409
+ tail call void @abort() #6
+ unreachable
+
+if.end429: ; preds = %if.else423, %if.then420
+ %cmp430 = icmp eq %struct.malloc_tree_chunk* %R325.1, null
+ br i1 %cmp430, label %if.end480, label %if.then432
+
+if.then432: ; preds = %if.end429, %if.then399
+ %95 = bitcast %struct.malloc_tree_chunk* %R325.1 to i8*
+ %96 = load i8** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 4), align 4, !tbaa !0
+ %cmp434 = icmp ult i8* %95, %96
+ br i1 %cmp434, label %if.else476, label %if.then438, !prof !6
+
+if.then438: ; preds = %if.then432
+ %parent441 = getelementptr inbounds %struct.malloc_tree_chunk* %R325.1, i32 0, i32 5
+ store %struct.malloc_tree_chunk* %74, %struct.malloc_tree_chunk** %parent441, align 4, !tbaa !0
+ %add.ptr.sum13 = add i32 %psize, 16
+ %child442 = getelementptr inbounds i8* %0, i32 %add.ptr.sum13
+ %arrayidx443 = bitcast i8* %child442 to %struct.malloc_tree_chunk**
+ %97 = load %struct.malloc_tree_chunk** %arrayidx443, align 4, !tbaa !0
+ %cmp444 = icmp eq %struct.malloc_tree_chunk* %97, null
+ br i1 %cmp444, label %if.end458, label %if.then446
+
+if.then446: ; preds = %if.then438
+ %98 = bitcast %struct.malloc_tree_chunk* %97 to i8*
+ %99 = load i8** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 4), align 4, !tbaa !0
+ %cmp448 = icmp ult i8* %98, %99
+ br i1 %cmp448, label %if.else456, label %if.then452, !prof !6
+
+if.then452: ; preds = %if.then446
+ %arrayidx454 = getelementptr inbounds %struct.malloc_tree_chunk* %R325.1, i32 0, i32 4, i32 0
+ store %struct.malloc_tree_chunk* %97, %struct.malloc_tree_chunk** %arrayidx454, align 4, !tbaa !0
+ %parent455 = getelementptr inbounds %struct.malloc_tree_chunk* %97, i32 0, i32 5
+ store %struct.malloc_tree_chunk* %R325.1, %struct.malloc_tree_chunk** %parent455, align 4, !tbaa !0
+ br label %if.end458
+
+if.else456: ; preds = %if.then446
+ tail call void @abort() #6
+ unreachable
+
+if.end458: ; preds = %if.then452, %if.then438
+ %child442.sum = add i32 %psize, 20
+ %arrayidx460 = getelementptr inbounds i8* %0, i32 %child442.sum
+ %100 = bitcast i8* %arrayidx460 to %struct.malloc_tree_chunk**
+ %101 = load %struct.malloc_tree_chunk** %100, align 4, !tbaa !0
+ %cmp461 = icmp eq %struct.malloc_tree_chunk* %101, null
+ br i1 %cmp461, label %if.end480, label %if.then463
+
+if.then463: ; preds = %if.end458
+ %102 = bitcast %struct.malloc_tree_chunk* %101 to i8*
+ %103 = load i8** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 4), align 4, !tbaa !0
+ %cmp465 = icmp ult i8* %102, %103
+ br i1 %cmp465, label %if.else473, label %if.then469, !prof !6
+
+if.then469: ; preds = %if.then463
+ %arrayidx471 = getelementptr inbounds %struct.malloc_tree_chunk* %R325.1, i32 0, i32 4, i32 1
+ store %struct.malloc_tree_chunk* %101, %struct.malloc_tree_chunk** %arrayidx471, align 4, !tbaa !0
+ %parent472 = getelementptr inbounds %struct.malloc_tree_chunk* %101, i32 0, i32 5
+ store %struct.malloc_tree_chunk* %R325.1, %struct.malloc_tree_chunk** %parent472, align 4, !tbaa !0
+ br label %if.end480
+
+if.else473: ; preds = %if.then463
+ tail call void @abort() #6
+ unreachable
+
+if.else476: ; preds = %if.then432
+ tail call void @abort() #6
+ unreachable
+
+if.end480: ; preds = %if.then469, %if.end458, %if.end429, %if.end429.thread, %if.end389, %if.then313, %if.then288
+ %or481 = or i32 %add255, 1
+ %head482 = getelementptr inbounds %struct.malloc_chunk* %p.addr.0, i32 0, i32 1
+ store i32 %or481, i32* %head482, align 4, !tbaa !3
+ %104 = bitcast %struct.malloc_chunk* %p.addr.0 to i8*
+ %add.ptr483 = getelementptr inbounds i8* %104, i32 %add255
+ %prev_foot484 = bitcast i8* %add.ptr483 to i32*
+ store i32 %add255, i32* %prev_foot484, align 4, !tbaa !3
+ %105 = load %struct.malloc_chunk** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 5), align 4, !tbaa !0
+ %cmp486 = icmp eq %struct.malloc_chunk* %p.addr.0, %105
+ br i1 %cmp486, label %if.then488, label %if.end500
+
+if.then488: ; preds = %if.end480
+ store i32 %add255, i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 2), align 4, !tbaa !3
+ br label %if.end649
+
+if.else493: ; preds = %if.then221
+ %and495 = and i32 %55, -2
+ store i32 %and495, i32* %54, align 4, !tbaa !3
+ %or496 = or i32 %psize.addr.0, 1
+ %head497 = getelementptr inbounds %struct.malloc_chunk* %p.addr.0, i32 0, i32 1
+ store i32 %or496, i32* %head497, align 4, !tbaa !3
+ %106 = bitcast %struct.malloc_chunk* %p.addr.0 to i8*
+ %add.ptr498 = getelementptr inbounds i8* %106, i32 %psize.addr.0
+ %prev_foot499 = bitcast i8* %add.ptr498 to i32*
+ store i32 %psize.addr.0, i32* %prev_foot499, align 4, !tbaa !3
+ br label %if.end500
+
+if.end500: ; preds = %if.else493, %if.end480
+ %psize.addr.1 = phi i32 [ %psize.addr.0, %if.else493 ], [ %add255, %if.end480 ]
+ %shr501 = lshr i32 %psize.addr.1, 3
+ %cmp502 = icmp ult i32 %psize.addr.1, 256
+ br i1 %cmp502, label %if.then504, label %if.else536
+
+if.then504: ; preds = %if.end500
+ %shl508 = shl nuw nsw i32 %shr501, 1
+ %arrayidx510 = getelementptr inbounds %struct.malloc_state* @_gm_, i32 0, i32 10, i32 %shl508
+ %107 = bitcast %struct.malloc_chunk** %arrayidx510 to %struct.malloc_chunk*
+ %108 = load i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 0), align 4, !tbaa !3
+ %shl513 = shl i32 1, %shr501
+ %and514 = and i32 %108, %shl513
+ %tobool515 = icmp eq i32 %and514, 0
+ br i1 %tobool515, label %if.then516, label %if.else520
+
+if.then516: ; preds = %if.then504
+ %or519 = or i32 %108, %shl513
+ store i32 %or519, i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 0), align 4, !tbaa !3
+ %arrayidx510.sum.pre = add i32 %shl508, 2
+ %.pre = getelementptr inbounds %struct.malloc_state* @_gm_, i32 0, i32 10, i32 %arrayidx510.sum.pre
+ br label %if.end531
+
+if.else520: ; preds = %if.then504
+ %arrayidx510.sum11 = add i32 %shl508, 2
+ %109 = getelementptr inbounds %struct.malloc_state* @_gm_, i32 0, i32 10, i32 %arrayidx510.sum11
+ %110 = load %struct.malloc_chunk** %109, align 4, !tbaa !0
+ %111 = bitcast %struct.malloc_chunk* %110 to i8*
+ %112 = load i8** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 4), align 4, !tbaa !0
+ %cmp523 = icmp ult i8* %111, %112
+ br i1 %cmp523, label %if.else529, label %if.end531, !prof !6
+
+if.else529: ; preds = %if.else520
+ tail call void @abort() #6
+ unreachable
+
+if.end531: ; preds = %if.else520, %if.then516
+ %.pre-phi = phi %struct.malloc_chunk** [ %109, %if.else520 ], [ %.pre, %if.then516 ]
+ %F511.0 = phi %struct.malloc_chunk* [ %110, %if.else520 ], [ %107, %if.then516 ]
+ store %struct.malloc_chunk* %p.addr.0, %struct.malloc_chunk** %.pre-phi, align 4, !tbaa !0
+ %bk533 = getelementptr inbounds %struct.malloc_chunk* %F511.0, i32 0, i32 3
+ store %struct.malloc_chunk* %p.addr.0, %struct.malloc_chunk** %bk533, align 4, !tbaa !0
+ %fd534 = getelementptr inbounds %struct.malloc_chunk* %p.addr.0, i32 0, i32 2
+ store %struct.malloc_chunk* %F511.0, %struct.malloc_chunk** %fd534, align 4, !tbaa !0
+ %bk535 = getelementptr inbounds %struct.malloc_chunk* %p.addr.0, i32 0, i32 3
+ store %struct.malloc_chunk* %107, %struct.malloc_chunk** %bk535, align 4, !tbaa !0
+ br label %if.end649
+
+if.else536: ; preds = %if.end500
+ %113 = bitcast %struct.malloc_chunk* %p.addr.0 to %struct.malloc_tree_chunk*
+ %shr540 = lshr i32 %psize.addr.1, 8
+ %cmp541 = icmp eq i32 %shr540, 0
+ br i1 %cmp541, label %if.end571, label %if.else544
+
+if.else544: ; preds = %if.else536
+ %cmp545 = icmp ugt i32 %psize.addr.1, 16777215
+ br i1 %cmp545, label %if.end571, label %if.else548
+
+if.else548: ; preds = %if.else544
+ %sub = add i32 %shr540, 1048320
+ %shr549 = lshr i32 %sub, 16
+ %and550 = and i32 %shr549, 8
+ %shl551 = shl i32 %shr540, %and550
+ %sub552 = add i32 %shl551, 520192
+ %shr553 = lshr i32 %sub552, 16
+ %and554 = and i32 %shr553, 4
+ %add555 = or i32 %and554, %and550
+ %shl556 = shl i32 %shl551, %and554
+ %sub557 = add i32 %shl556, 245760
+ %shr558 = lshr i32 %sub557, 16
+ %and559 = and i32 %shr558, 2
+ %add560 = or i32 %add555, %and559
+ %sub561 = sub i32 14, %add560
+ %shl562 = shl i32 %shl556, %and559
+ %shr563 = lshr i32 %shl562, 15
+ %add564 = add i32 %sub561, %shr563
+ %shl565 = shl nsw i32 %add564, 1
+ %add566 = add i32 %add564, 7
+ %shr567 = lshr i32 %psize.addr.1, %add566
+ %and568 = and i32 %shr567, 1
+ %add569 = or i32 %and568, %shl565
+ br label %if.end571
+
+if.end571: ; preds = %if.else548, %if.else544, %if.else536
+ %I539.0 = phi i32 [ %add569, %if.else548 ], [ 0, %if.else536 ], [ 31, %if.else544 ]
+ %arrayidx573 = getelementptr inbounds %struct.malloc_state* @_gm_, i32 0, i32 11, i32 %I539.0
+ %index574 = getelementptr inbounds %struct.malloc_chunk* %p.addr.0, i32 1, i32 3
+ %I539.0.c = inttoptr i32 %I539.0 to %struct.malloc_chunk*
+ store %struct.malloc_chunk* %I539.0.c, %struct.malloc_chunk** %index574, align 4, !tbaa !3
+ %arrayidx576 = getelementptr inbounds %struct.malloc_chunk* %p.addr.0, i32 1, i32 1
+ store i32 0, i32* %arrayidx576, align 4, !tbaa !0
+ %114 = getelementptr inbounds %struct.malloc_chunk* %p.addr.0, i32 1, i32 0
+ store i32 0, i32* %114, align 4, !tbaa !0
+ %115 = load i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 1), align 4, !tbaa !3
+ %shl580 = shl i32 1, %I539.0
+ %and581 = and i32 %115, %shl580
+ %tobool582 = icmp eq i32 %and581, 0
+ br i1 %tobool582, label %if.then583, label %if.else590
+
+if.then583: ; preds = %if.end571
+ %or586 = or i32 %115, %shl580
+ store i32 %or586, i32* getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 1), align 4, !tbaa !3
+ store %struct.malloc_tree_chunk* %113, %struct.malloc_tree_chunk** %arrayidx573, align 4, !tbaa !0
+ %parent587 = getelementptr inbounds %struct.malloc_chunk* %p.addr.0, i32 1, i32 2
+ %.c = bitcast %struct.malloc_tree_chunk** %arrayidx573 to %struct.malloc_chunk*
+ store %struct.malloc_chunk* %.c, %struct.malloc_chunk** %parent587, align 4, !tbaa !0
+ %bk588 = getelementptr inbounds %struct.malloc_chunk* %p.addr.0, i32 0, i32 3
+ store %struct.malloc_chunk* %p.addr.0, %struct.malloc_chunk** %bk588, align 4, !tbaa !0
+ %fd589 = getelementptr inbounds %struct.malloc_chunk* %p.addr.0, i32 0, i32 2
+ store %struct.malloc_chunk* %p.addr.0, %struct.malloc_chunk** %fd589, align 4, !tbaa !0
+ br label %if.end649
+
+if.else590: ; preds = %if.end571
+ %116 = load %struct.malloc_tree_chunk** %arrayidx573, align 4, !tbaa !0
+ %cmp592 = icmp eq i32 %I539.0, 31
+ br i1 %cmp592, label %cond.end, label %cond.false
+
+cond.false: ; preds = %if.else590
+ %shr594 = lshr i32 %I539.0, 1
+ %sub597 = sub i32 25, %shr594
+ br label %cond.end
+
+cond.end: ; preds = %cond.false, %if.else590
+ %cond = phi i32 [ %sub597, %cond.false ], [ 0, %if.else590 ]
+ %head59932 = getelementptr inbounds %struct.malloc_tree_chunk* %116, i32 0, i32 1
+ %117 = load i32* %head59932, align 4, !tbaa !3
+ %and60033 = and i32 %117, -8
+ %cmp60134 = icmp eq i32 %and60033, %psize.addr.1
+ br i1 %cmp60134, label %if.else624, label %if.then603.lr.ph
+
+if.then603.lr.ph: ; preds = %cond.end
+ %shl598 = shl i32 %psize.addr.1, %cond
+ br label %if.then603
+
+for.cond: ; preds = %if.then603
+ %shl608 = shl i32 %K591.036, 1
+ %head599 = getelementptr inbounds %struct.malloc_tree_chunk* %119, i32 0, i32 1
+ %118 = load i32* %head599, align 4, !tbaa !3
+ %and600 = and i32 %118, -8
+ %cmp601 = icmp eq i32 %and600, %psize.addr.1
+ br i1 %cmp601, label %if.else624, label %if.then603
+
+if.then603: ; preds = %for.cond, %if.then603.lr.ph
+ %K591.036 = phi i32 [ %shl598, %if.then603.lr.ph ], [ %shl608, %for.cond ]
+ %T.035 = phi %struct.malloc_tree_chunk* [ %116, %if.then603.lr.ph ], [ %119, %for.cond ]
+ %shr604 = lshr i32 %K591.036, 31
+ %arrayidx607 = getelementptr inbounds %struct.malloc_tree_chunk* %T.035, i32 0, i32 4, i32 %shr604
+ %119 = load %struct.malloc_tree_chunk** %arrayidx607, align 4, !tbaa !0
+ %cmp609 = icmp eq %struct.malloc_tree_chunk* %119, null
+ br i1 %cmp609, label %if.else612, label %for.cond
+
+if.else612: ; preds = %if.then603
+ %120 = bitcast %struct.malloc_tree_chunk** %arrayidx607 to i8*
+ %121 = load i8** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 4), align 4, !tbaa !0
+ %cmp614 = icmp ult i8* %120, %121
+ br i1 %cmp614, label %if.else622, label %if.then618, !prof !6
+
+if.then618: ; preds = %if.else612
+ store %struct.malloc_tree_chunk* %113, %struct.malloc_tree_chunk** %arrayidx607, align 4, !tbaa !0
+ %parent619 = getelementptr inbounds %struct.malloc_chunk* %p.addr.0, i32 1, i32 2
+ %T.0.c8 = bitcast %struct.malloc_tree_chunk* %T.035 to %struct.malloc_chunk*
+ store %struct.malloc_chunk* %T.0.c8, %struct.malloc_chunk** %parent619, align 4, !tbaa !0
+ %bk620 = getelementptr inbounds %struct.malloc_chunk* %p.addr.0, i32 0, i32 3
+ store %struct.malloc_chunk* %p.addr.0, %struct.malloc_chunk** %bk620, align 4, !tbaa !0
+ %fd621 = getelementptr inbounds %struct.malloc_chunk* %p.addr.0, i32 0, i32 2
+ store %struct.malloc_chunk* %p.addr.0, %struct.malloc_chunk** %fd621, align 4, !tbaa !0
+ br label %if.end649
+
+if.else622: ; preds = %if.else612
+ tail call void @abort() #6
+ unreachable
+
+if.else624: ; preds = %for.cond, %cond.end
+ %T.0.lcssa = phi %struct.malloc_tree_chunk* [ %116, %cond.end ], [ %119, %for.cond ]
+ %fd626 = getelementptr inbounds %struct.malloc_tree_chunk* %T.0.lcssa, i32 0, i32 2
+ %122 = load %struct.malloc_tree_chunk** %fd626, align 4, !tbaa !0
+ %123 = bitcast %struct.malloc_tree_chunk* %T.0.lcssa to i8*
+ %124 = load i8** getelementptr inbounds (%struct.malloc_state* @_gm_, i32 0, i32 4), align 4, !tbaa !0
+ %cmp628 = icmp ult i8* %123, %124
+ br i1 %cmp628, label %if.else644, label %land.rhs630
+
+land.rhs630: ; preds = %if.else624
+ %125 = bitcast %struct.malloc_tree_chunk* %122 to i8*
+ %cmp632 = icmp ult i8* %125, %124
+ br i1 %cmp632, label %if.else644, label %if.then638, !prof !6
+
+if.then638: ; preds = %land.rhs630
+ %bk639 = getelementptr inbounds %struct.malloc_tree_chunk* %122, i32 0, i32 3
+ store %struct.malloc_tree_chunk* %113, %struct.malloc_tree_chunk** %bk639, align 4, !tbaa !0
+ store %struct.malloc_tree_chunk* %113, %struct.malloc_tree_chunk** %fd626, align 4, !tbaa !0
+ %fd641 = getelementptr inbounds %struct.malloc_chunk* %p.addr.0, i32 0, i32 2
+ %.c7 = bitcast %struct.malloc_tree_chunk* %122 to %struct.malloc_chunk*
+ store %struct.malloc_chunk* %.c7, %struct.malloc_chunk** %fd641, align 4, !tbaa !0
+ %bk642 = getelementptr inbounds %struct.malloc_chunk* %p.addr.0, i32 0, i32 3
+ %T.0.c = bitcast %struct.malloc_tree_chunk* %T.0.lcssa to %struct.malloc_chunk*
+ store %struct.malloc_chunk* %T.0.c, %struct.malloc_chunk** %bk642, align 4, !tbaa !0
+ %parent643 = getelementptr inbounds %struct.malloc_chunk* %p.addr.0, i32 1, i32 2
+ store %struct.malloc_chunk* null, %struct.malloc_chunk** %parent643, align 4, !tbaa !0
+ br label %if.end649
+
+if.else644: ; preds = %land.rhs630, %if.else624
+ tail call void @abort() #6
+ unreachable
+
+if.else648: ; preds = %if.end215
+ tail call void @abort() #6
+ unreachable
+
+if.end649: ; preds = %if.then638, %if.then618, %if.then583, %if.end531, %if.then488, %if.then244, %if.then236, %if.then228, %if.then205, %if.then
+ ret void
+}
+
+declare i32 @sysconf(i32) #5
+
+declare i32 @time(i32*) #5
+
+define weak i8* @_Znwj(i32 %size) #5 {
+entry:
+ %cmp = icmp eq i32 %size, 0
+ %.size = select i1 %cmp, i32 1, i32 %size
+ br label %invoke.cont
+
+invoke.cont: ; preds = %if.then3, %entry
+ %call = tail call i8* @malloc(i32 %.size)
+ %cmp1 = icmp eq i8* %call, null
+ br i1 %cmp1, label %while.body, label %while.end
+
+while.body: ; preds = %invoke.cont
+ %0 = atomicrmw add i32* bitcast (void ()** @_ZL13__new_handler to i32*), i32 0 seq_cst
+ %tobool = icmp eq i32 %0, 0
+ br i1 %tobool, label %if.else, label %if.then3
+
+if.then3: ; preds = %while.body
+ %1 = inttoptr i32 %0 to void ()*
+ invoke void %1()
+ to label %invoke.cont unwind label %lpad.loopexit
+
+lpad.loopexit: ; preds = %if.then3
+ %lpad.loopexit4 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
+ filter [1 x i8*] [i8* bitcast ({ i8*, i8*, i8* }* @_ZTISt9bad_alloc to i8*)]
+ br label %lpad
+
+lpad.nonloopexit: ; preds = %if.else
+ %lpad.nonloopexit5 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
+ filter [1 x i8*] [i8* bitcast ({ i8*, i8*, i8* }* @_ZTISt9bad_alloc to i8*)]
+ br label %lpad
+
+lpad: ; preds = %lpad.nonloopexit, %lpad.loopexit
+ %lpad.phi = phi { i8*, i32 } [ %lpad.loopexit4, %lpad.loopexit ], [ %lpad.nonloopexit5, %lpad.nonloopexit ]
+ %2 = extractvalue { i8*, i32 } %lpad.phi, 1
+ %ehspec.fails = icmp slt i32 %2, 0
+ br i1 %ehspec.fails, label %ehspec.unexpected, label %eh.resume
+
+ehspec.unexpected: ; preds = %lpad
+ %3 = extractvalue { i8*, i32 } %lpad.phi, 0
+ tail call void @__cxa_call_unexpected(i8* %3) #8
+ unreachable
+
+if.else: ; preds = %while.body
+ %exception = tail call i8* @__cxa_allocate_exception(i32 4) #1
+ %4 = bitcast i8* %exception to i32 (...)***
+ store i32 (...)** bitcast (i8** getelementptr inbounds ([5 x i8*]* @_ZTVSt9bad_alloc, i32 0, i32 2) to i32 (...)**), i32 (...)*** %4, align 4, !tbaa !8
+ invoke void @__cxa_throw(i8* %exception, i8* bitcast ({ i8*, i8*, i8* }* @_ZTISt9bad_alloc to i8*), i8* bitcast (void (%"class.std::bad_alloc"*)* @_ZNSt9bad_allocD2Ev to i8*)) #8
+ to label %unreachable unwind label %lpad.nonloopexit
+
+while.end: ; preds = %invoke.cont
+ ret i8* %call
+
+eh.resume: ; preds = %lpad
+ resume { i8*, i32 } %lpad.phi
+
+unreachable: ; preds = %if.else
+ unreachable
+}
+
+declare i32 @__gxx_personality_v0(...)
+
+; Function Attrs: nounwind
+define void ()* @_ZSt15get_new_handlerv() #0 {
+entry:
+ %0 = atomicrmw add i32* bitcast (void ()** @_ZL13__new_handler to i32*), i32 0 seq_cst
+ %1 = inttoptr i32 %0 to void ()*
+ ret void ()* %1
+}
+
+declare i8* @__cxa_allocate_exception(i32)
+
+declare void @__cxa_throw(i8*, i8*, i8*)
+
+declare void @__cxa_call_unexpected(i8*)
+
+; Function Attrs: nounwind
+define weak noalias i8* @_ZnwjRKSt9nothrow_t(i32 %size, %"struct.std::nothrow_t"*) #0 {
+entry:
+ %call = invoke noalias i8* @_Znwj(i32 %size)
+ to label %try.cont unwind label %lpad
+
+lpad: ; preds = %entry
+ %1 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
+ catch i8* null
+ %2 = extractvalue { i8*, i32 } %1, 0
+ %3 = tail call i8* @__cxa_begin_catch(i8* %2) #1
+ invoke void @__cxa_end_catch()
+ to label %try.cont unwind label %lpad1
+
+try.cont: ; preds = %lpad, %entry
+ %p.0 = phi i8* [ null, %lpad ], [ %call, %entry ]
+ ret i8* %p.0
+
+lpad1: ; preds = %lpad
+ %4 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
+ filter [0 x i8*] zeroinitializer
+ %5 = extractvalue { i8*, i32 } %4, 0
+ tail call void @__cxa_call_unexpected(i8* %5) #6
+ unreachable
+}
+
+declare i8* @__cxa_begin_catch(i8*)
+
+declare void @__cxa_end_catch()
+
+define weak noalias i8* @_Znaj(i32 %size) #5 {
+entry:
+ %call = invoke noalias i8* @_Znwj(i32 %size)
+ to label %invoke.cont unwind label %lpad
+
+invoke.cont: ; preds = %entry
+ ret i8* %call
+
+lpad: ; preds = %entry
+ %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
+ filter [1 x i8*] [i8* bitcast ({ i8*, i8*, i8* }* @_ZTISt9bad_alloc to i8*)]
+ %1 = extractvalue { i8*, i32 } %0, 1
+ %ehspec.fails = icmp slt i32 %1, 0
+ br i1 %ehspec.fails, label %ehspec.unexpected, label %eh.resume
+
+ehspec.unexpected: ; preds = %lpad
+ %2 = extractvalue { i8*, i32 } %0, 0
+ tail call void @__cxa_call_unexpected(i8* %2) #8
+ unreachable
+
+eh.resume: ; preds = %lpad
+ resume { i8*, i32 } %0
+}
+
+; Function Attrs: nounwind
+define weak noalias i8* @_ZnajRKSt9nothrow_t(i32 %size, %"struct.std::nothrow_t"*) #0 {
+entry:
+ %call = invoke noalias i8* @_Znaj(i32 %size)
+ to label %try.cont unwind label %lpad
+
+lpad: ; preds = %entry
+ %1 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
+ catch i8* null
+ %2 = extractvalue { i8*, i32 } %1, 0
+ %3 = tail call i8* @__cxa_begin_catch(i8* %2) #1
+ invoke void @__cxa_end_catch()
+ to label %try.cont unwind label %lpad1
+
+try.cont: ; preds = %lpad, %entry
+ %p.0 = phi i8* [ null, %lpad ], [ %call, %entry ]
+ ret i8* %p.0
+
+lpad1: ; preds = %lpad
+ %4 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
+ filter [0 x i8*] zeroinitializer
+ %5 = extractvalue { i8*, i32 } %4, 0
+ tail call void @__cxa_call_unexpected(i8* %5) #6
+ unreachable
+}
+
+; Function Attrs: nounwind
+define weak void @_ZdlPv(i8* %ptr) #0 {
+entry:
+ %tobool = icmp eq i8* %ptr, null
+ br i1 %tobool, label %if.end, label %if.then
+
+if.then: ; preds = %entry
+ tail call void @free(i8* %ptr)
+ br label %if.end
+
+if.end: ; preds = %if.then, %entry
+ ret void
+}
+
+; Function Attrs: nounwind
+define weak void @_ZdlPvRKSt9nothrow_t(i8* %ptr, %"struct.std::nothrow_t"*) #0 {
+entry:
+ tail call void @_ZdlPv(i8* %ptr) #1
+ ret void
+}
+
+; Function Attrs: nounwind
+define weak void @_ZdaPv(i8* %ptr) #0 {
+entry:
+ tail call void @_ZdlPv(i8* %ptr) #1
+ ret void
+}
+
+; Function Attrs: nounwind
+define weak void @_ZdaPvRKSt9nothrow_t(i8* %ptr, %"struct.std::nothrow_t"*) #0 {
+entry:
+ tail call void @_ZdaPv(i8* %ptr) #1
+ ret void
+}
+
+; Function Attrs: nounwind
+define void ()* @_ZSt15set_new_handlerPFvvE(void ()* %handler) #0 {
+entry:
+ %0 = ptrtoint void ()* %handler to i32
+ %1 = atomicrmw xchg i32* bitcast (void ()** @_ZL13__new_handler to i32*), i32 %0 seq_cst
+ %2 = inttoptr i32 %1 to void ()*
+ ret void ()* %2
+}
+
+; Function Attrs: nounwind
+define void @_ZNSt9bad_allocC2Ev(%"class.std::bad_alloc"* nocapture %this) unnamed_addr #0 align 2 {
+entry:
+ %0 = getelementptr inbounds %"class.std::bad_alloc"* %this, i32 0, i32 0, i32 0
+ store i32 (...)** bitcast (i8** getelementptr inbounds ([5 x i8*]* @_ZTVSt9bad_alloc, i32 0, i32 2) to i32 (...)**), i32 (...)*** %0, align 4, !tbaa !8
+ ret void
+}
+
+; Function Attrs: nounwind
+define void @_ZNSt9bad_allocD0Ev(%"class.std::bad_alloc"* %this) unnamed_addr #0 align 2 {
+entry:
+ %0 = getelementptr inbounds %"class.std::bad_alloc"* %this, i32 0, i32 0
+ tail call void @_ZNSt9exceptionD2Ev(%"class.std::exception"* %0) #1
+ %1 = bitcast %"class.std::bad_alloc"* %this to i8*
+ tail call void @_ZdlPv(i8* %1) #1
+ ret void
+}
+
+; Function Attrs: nounwind
+define void @_ZNSt9bad_allocD2Ev(%"class.std::bad_alloc"* %this) unnamed_addr #0 align 2 {
+entry:
+ %0 = getelementptr inbounds %"class.std::bad_alloc"* %this, i32 0, i32 0
+ tail call void @_ZNSt9exceptionD2Ev(%"class.std::exception"* %0) #1
+ ret void
+}
+
+; Function Attrs: nounwind
+declare void @_ZNSt9exceptionD2Ev(%"class.std::exception"*) #0
+
+; Function Attrs: nounwind readnone
+define i8* @_ZNKSt9bad_alloc4whatEv(%"class.std::bad_alloc"* nocapture %this) unnamed_addr #3 align 2 {
+entry:
+ ret i8* getelementptr inbounds ([15 x i8]* @.str352, i32 0, i32 0)
+}
+
+; Function Attrs: nounwind
+define void @_ZNSt20bad_array_new_lengthC2Ev(%"class.std::bad_array_new_length"* nocapture %this) unnamed_addr #0 align 2 {
+entry:
+ %0 = getelementptr inbounds %"class.std::bad_array_new_length"* %this, i32 0, i32 0, i32 0, i32 0
+ store i32 (...)** bitcast (i8** getelementptr inbounds ([5 x i8*]* @_ZTVSt20bad_array_new_length, i32 0, i32 2) to i32 (...)**), i32 (...)*** %0, align 4, !tbaa !8
+ ret void
+}
+
+; Function Attrs: nounwind
+define void @_ZNSt20bad_array_new_lengthD0Ev(%"class.std::bad_array_new_length"* %this) unnamed_addr #0 align 2 {
+entry:
+ %0 = getelementptr inbounds %"class.std::bad_array_new_length"* %this, i32 0, i32 0, i32 0
+ tail call void @_ZNSt9exceptionD2Ev(%"class.std::exception"* %0) #1
+ %1 = bitcast %"class.std::bad_array_new_length"* %this to i8*
+ tail call void @_ZdlPv(i8* %1) #1
+ ret void
+}
+
+; Function Attrs: nounwind readnone
+define i8* @_ZNKSt16bad_array_length4whatEv(%"class.std::bad_array_length"* nocapture %this) unnamed_addr #3 align 2 {
+entry:
+ ret i8* getelementptr inbounds ([17 x i8]* @.str1453, i32 0, i32 0)
+}
+
+; Function Attrs: nounwind
+define void @_ZNSt16bad_array_lengthC2Ev(%"class.std::bad_array_length"* nocapture %this) unnamed_addr #0 align 2 {
+entry:
+ %0 = getelementptr inbounds %"class.std::bad_array_length"* %this, i32 0, i32 0, i32 0, i32 0
+ store i32 (...)** bitcast (i8** getelementptr inbounds ([5 x i8*]* @_ZTVSt16bad_array_length, i32 0, i32 2) to i32 (...)**), i32 (...)*** %0, align 4, !tbaa !8
+ ret void
+}
+
+; Function Attrs: nounwind
+define void @_ZNSt16bad_array_lengthD0Ev(%"class.std::bad_array_length"* %this) unnamed_addr #0 align 2 {
+entry:
+ %0 = getelementptr inbounds %"class.std::bad_array_length"* %this, i32 0, i32 0, i32 0
+ tail call void @_ZNSt9exceptionD2Ev(%"class.std::exception"* %0) #1
+ %1 = bitcast %"class.std::bad_array_length"* %this to i8*
+ tail call void @_ZdlPv(i8* %1) #1
+ ret void
+}
+
+; Function Attrs: nounwind readnone
+define i8* @_ZNKSt20bad_array_new_length4whatEv(%"class.std::bad_array_new_length"* nocapture %this) unnamed_addr #3 align 2 {
+entry:
+ ret i8* getelementptr inbounds ([21 x i8]* @.str2554, i32 0, i32 0)
+}
+
+; Function Attrs: noreturn
+define void @_ZSt17__throw_bad_allocv() #4 {
+entry:
+ %exception = tail call i8* @__cxa_allocate_exception(i32 4) #1
+ %0 = bitcast i8* %exception to i32 (...)***
+ store i32 (...)** bitcast (i8** getelementptr inbounds ([5 x i8*]* @_ZTVSt9bad_alloc, i32 0, i32 2) to i32 (...)**), i32 (...)*** %0, align 4, !tbaa !8
+ tail call void @__cxa_throw(i8* %exception, i8* bitcast ({ i8*, i8*, i8* }* @_ZTISt9bad_alloc to i8*), i8* bitcast (void (%"class.std::bad_alloc"*)* @_ZNSt9bad_allocD2Ev to i8*)) #8
+ unreachable
+}
+
+; Function Attrs: nounwind
+define double @__floatscan(%struct._IO_FILE* %f, i32 %prec, i32 %pok) #0 {
+entry:
+ %x.i = alloca [128 x i32], align 4
+ switch i32 %prec, label %return [
+ i32 0, label %while.cond.preheader
+ i32 1, label %sw.bb1
+ i32 2, label %sw.bb3
+ ]
+
+sw.bb1: ; preds = %entry
+ br label %while.cond.preheader
+
+sw.bb3: ; preds = %entry
+ br label %while.cond.preheader
+
+while.cond.preheader: ; preds = %sw.bb3, %sw.bb1, %entry
+ %bits.0.ph = phi i32 [ 24, %entry ], [ 53, %sw.bb1 ], [ 53, %sw.bb3 ]
+ %emin.0.ph = phi i32 [ -149, %entry ], [ -1074, %sw.bb1 ], [ -1074, %sw.bb3 ]
+ %rpos = getelementptr inbounds %struct._IO_FILE* %f, i32 0, i32 1
+ %shend = getelementptr inbounds %struct._IO_FILE* %f, i32 0, i32 27
+ br label %while.cond
+
+while.cond: ; preds = %cond.end, %while.cond.preheader
+ %0 = load i8** %rpos, align 4, !tbaa !0
+ %1 = load i8** %shend, align 4, !tbaa !0
+ %cmp = icmp ult i8* %0, %1
+ br i1 %cmp, label %cond.true, label %cond.false
+
+cond.true: ; preds = %while.cond
+ %incdec.ptr = getelementptr inbounds i8* %0, i32 1
+ store i8* %incdec.ptr, i8** %rpos, align 4, !tbaa !0
+ %2 = load i8* %0, align 1, !tbaa !1
+ %conv = zext i8 %2 to i32
+ br label %cond.end
+
+cond.false: ; preds = %while.cond
+ %call = call i32 @__shgetc(%struct._IO_FILE* %f) #1
+ br label %cond.end
+
+cond.end: ; preds = %cond.false, %cond.true
+ %cond = phi i32 [ %conv, %cond.true ], [ %call, %cond.false ]
+ %call6 = call i32 @isspace(i32 %cond) #1
+ %tobool = icmp eq i32 %call6, 0
+ br i1 %tobool, label %while.end, label %while.cond
+
+while.end: ; preds = %cond.end
+ %cmp9 = icmp eq i32 %cond, 45
+ switch i32 %cond, label %if.end [
+ i32 45, label %if.then
+ i32 43, label %if.then
+ ]
+
+if.then: ; preds = %while.end, %while.end
+ %conv12 = zext i1 %cmp9 to i32
+ %mul = shl nuw nsw i32 %conv12, 1
+ %sub13 = sub nsw i32 1, %mul
+ %3 = load i8** %rpos, align 4, !tbaa !0
+ %4 = load i8** %shend, align 4, !tbaa !0
+ %cmp16 = icmp ult i8* %3, %4
+ br i1 %cmp16, label %cond.true18, label %cond.false22
+
+cond.true18: ; preds = %if.then
+ %incdec.ptr20 = getelementptr inbounds i8* %3, i32 1
+ store i8* %incdec.ptr20, i8** %rpos, align 4, !tbaa !0
+ %5 = load i8* %3, align 1, !tbaa !1
+ %conv21 = zext i8 %5 to i32
+ br label %if.end
+
+cond.false22: ; preds = %if.then
+ %call23 = call i32 @__shgetc(%struct._IO_FILE* %f) #1
+ br label %if.end
+
+if.end: ; preds = %cond.false22, %cond.true18, %while.end
+ %sign.0 = phi i32 [ 1, %while.end ], [ %sub13, %cond.false22 ], [ %sub13, %cond.true18 ]
+ %c.0 = phi i32 [ %cond, %while.end ], [ %call23, %cond.false22 ], [ %conv21, %cond.true18 ]
+ br label %land.rhs
+
+land.rhs: ; preds = %for.inc, %if.end
+ %c.1154 = phi i32 [ %c.0, %if.end ], [ %c.2, %for.inc ]
+ %i.0153 = phi i32 [ 0, %if.end ], [ %inc, %for.inc ]
+ %or = or i32 %c.1154, 32
+ %arrayidx = getelementptr inbounds [9 x i8]* @.str655, i32 0, i32 %i.0153
+ %6 = load i8* %arrayidx, align 1, !tbaa !1
+ %conv28 = sext i8 %6 to i32
+ %cmp29 = icmp eq i32 %or, %conv28
+ br i1 %cmp29, label %for.body, label %for.end
+
+for.body: ; preds = %land.rhs
+ %cmp31 = icmp ult i32 %i.0153, 7
+ br i1 %cmp31, label %if.then33, label %for.inc
+
+if.then33: ; preds = %for.body
+ %7 = load i8** %rpos, align 4, !tbaa !0
+ %8 = load i8** %shend, align 4, !tbaa !0
+ %cmp36 = icmp ult i8* %7, %8
+ br i1 %cmp36, label %cond.true38, label %cond.false42
+
+cond.true38: ; preds = %if.then33
+ %incdec.ptr40 = getelementptr inbounds i8* %7, i32 1
+ store i8* %incdec.ptr40, i8** %rpos, align 4, !tbaa !0
+ %9 = load i8* %7, align 1, !tbaa !1
+ %conv41 = zext i8 %9 to i32
+ br label %for.inc
+
+cond.false42: ; preds = %if.then33
+ %call43 = call i32 @__shgetc(%struct._IO_FILE* %f) #1
+ br label %for.inc
+
+for.inc: ; preds = %cond.false42, %cond.true38, %for.body
+ %c.2 = phi i32 [ %c.1154, %for.body ], [ %conv41, %cond.true38 ], [ %call43, %cond.false42 ]
+ %inc = add i32 %i.0153, 1
+ %cmp26 = icmp ult i32 %inc, 8
+ br i1 %cmp26, label %land.rhs, label %for.end
+
+for.end: ; preds = %for.inc, %land.rhs
+ %c.1.lcssa = phi i32 [ %c.2, %for.inc ], [ %c.1154, %land.rhs ]
+ %i.0.lcssa = phi i32 [ %inc, %for.inc ], [ %i.0153, %land.rhs ]
+ switch i32 %i.0.lcssa, label %lor.lhs.false52 [
+ i32 8, label %if.end83
+ i32 3, label %if.then59
+ ]
+
+lor.lhs.false52: ; preds = %for.end
+ %cmp53 = icmp ult i32 %i.0.lcssa, 4
+ %tobool55 = icmp eq i32 %pok, 0
+ %or.cond = or i1 %cmp53, %tobool55
+ br i1 %or.cond, label %if.end87, label %if.then56
+
+if.then56: ; preds = %lor.lhs.false52
+ %cmp57 = icmp eq i32 %i.0.lcssa, 8
+ br i1 %cmp57, label %if.end83, label %if.then59
+
+if.then59: ; preds = %if.then56, %for.end
+ %10 = load i8** %shend, align 4, !tbaa !0
+ %tobool61 = icmp eq i8* %10, null
+ br i1 %tobool61, label %cond.end66, label %cond.true62
+
+cond.true62: ; preds = %if.then59
+ %11 = load i8** %rpos, align 4, !tbaa !0
+ %incdec.ptr64 = getelementptr inbounds i8* %11, i32 -1
+ store i8* %incdec.ptr64, i8** %rpos, align 4, !tbaa !0
+ br label %cond.end66
+
+cond.end66: ; preds = %cond.true62, %if.then59
+ %notlhs = icmp eq i32 %pok, 0
+ %notrhs = icmp ult i32 %i.0.lcssa, 4
+ %or.cond175.not = or i1 %notrhs, %notlhs
+ %brmerge = or i1 %or.cond175.not, %tobool61
+ br i1 %brmerge, label %if.end83, label %for.inc80
+
+for.inc80: ; preds = %for.inc80, %cond.end66
+ %i.1152 = phi i32 [ %dec, %for.inc80 ], [ %i.0.lcssa, %cond.end66 ]
+ %12 = load i8** %rpos, align 4, !tbaa !0
+ %incdec.ptr77 = getelementptr inbounds i8* %12, i32 -1
+ store i8* %incdec.ptr77, i8** %rpos, align 4, !tbaa !0
+ %dec = add i32 %i.1152, -1
+ %cmp70 = icmp ugt i32 %dec, 3
+ br i1 %cmp70, label %for.inc80, label %if.end83
+
+if.end83: ; preds = %for.inc80, %cond.end66, %if.then56, %for.end
+ %conv84 = sitofp i32 %sign.0 to float
+ %mul85 = fmul float %conv84, 0x7FF0000000000000
+ %conv86 = fpext float %mul85 to double
+ br label %return
+
+if.end87: ; preds = %lor.lhs.false52
+ %tobool88 = icmp eq i32 %i.0.lcssa, 0
+ br i1 %tobool88, label %land.rhs93, label %if.end120
+
+land.rhs93: ; preds = %for.inc117, %if.end87
+ %c.3150 = phi i32 [ %c.4, %for.inc117 ], [ %c.1.lcssa, %if.end87 ]
+ %i.2149 = phi i32 [ %inc118, %for.inc117 ], [ 0, %if.end87 ]
+ %or94 = or i32 %c.3150, 32
+ %arrayidx95 = getelementptr inbounds [4 x i8]* @.str1756, i32 0, i32 %i.2149
+ %13 = load i8* %arrayidx95, align 1, !tbaa !1
+ %conv96 = sext i8 %13 to i32
+ %cmp97 = icmp eq i32 %or94, %conv96
+ br i1 %cmp97, label %for.body100, label %if.end120
+
+for.body100: ; preds = %land.rhs93
+ %cmp101 = icmp ult i32 %i.2149, 2
+ br i1 %cmp101, label %if.then103, label %for.inc117
+
+if.then103: ; preds = %for.body100
+ %14 = load i8** %rpos, align 4, !tbaa !0
+ %15 = load i8** %shend, align 4, !tbaa !0
+ %cmp106 = icmp ult i8* %14, %15
+ br i1 %cmp106, label %cond.true108, label %cond.false112
+
+cond.true108: ; preds = %if.then103
+ %incdec.ptr110 = getelementptr inbounds i8* %14, i32 1
+ store i8* %incdec.ptr110, i8** %rpos, align 4, !tbaa !0
+ %16 = load i8* %14, align 1, !tbaa !1
+ %conv111 = zext i8 %16 to i32
+ br label %for.inc117
+
+cond.false112: ; preds = %if.then103
+ %call113 = call i32 @__shgetc(%struct._IO_FILE* %f) #1
+ br label %for.inc117
+
+for.inc117: ; preds = %cond.false112, %cond.true108, %for.body100
+ %c.4 = phi i32 [ %c.3150, %for.body100 ], [ %conv111, %cond.true108 ], [ %call113, %cond.false112 ]
+ %inc118 = add i32 %i.2149, 1
+ %cmp91 = icmp ult i32 %inc118, 3
+ br i1 %cmp91, label %land.rhs93, label %if.end120
+
+if.end120: ; preds = %for.inc117, %land.rhs93, %if.end87
+ %i.3 = phi i32 [ %i.0.lcssa, %if.end87 ], [ %inc118, %for.inc117 ], [ %i.2149, %land.rhs93 ]
+ %c.5 = phi i32 [ %c.1.lcssa, %if.end87 ], [ %c.4, %for.inc117 ], [ %c.3150, %land.rhs93 ]
+ switch i32 %i.3, label %if.then207 [
+ i32 3, label %if.then123
+ i32 0, label %if.end216
+ ]
+
+if.then123: ; preds = %if.end120
+ %17 = load i8** %rpos, align 4, !tbaa !0
+ %18 = load i8** %shend, align 4, !tbaa !0
+ %cmp126 = icmp ult i8* %17, %18
+ br i1 %cmp126, label %cond.true128, label %cond.false132
+
+cond.true128: ; preds = %if.then123
+ %incdec.ptr130 = getelementptr inbounds i8* %17, i32 1
+ store i8* %incdec.ptr130, i8** %rpos, align 4, !tbaa !0
+ %19 = load i8* %17, align 1, !tbaa !1
+ %conv131 = zext i8 %19 to i32
+ br label %cond.end134
+
+cond.false132: ; preds = %if.then123
+ %call133 = call i32 @__shgetc(%struct._IO_FILE* %f) #1
+ br label %cond.end134
+
+cond.end134: ; preds = %cond.false132, %cond.true128
+ %cond135 = phi i32 [ %conv131, %cond.true128 ], [ %call133, %cond.false132 ]
+ %cmp136 = icmp eq i32 %cond135, 40
+ br i1 %cmp136, label %for.cond147, label %if.then138
+
+if.then138: ; preds = %cond.end134
+ %20 = load i8** %shend, align 4, !tbaa !0
+ %tobool140 = icmp eq i8* %20, null
+ br i1 %tobool140, label %return, label %cond.true141
+
+cond.true141: ; preds = %if.then138
+ %21 = load i8** %rpos, align 4, !tbaa !0
+ %incdec.ptr143 = getelementptr inbounds i8* %21, i32 -1
+ store i8* %incdec.ptr143, i8** %rpos, align 4, !tbaa !0
+ br label %return
+
+for.cond147: ; preds = %for.inc203, %cond.end134
+ %i.4 = phi i32 [ %inc204, %for.inc203 ], [ 1, %cond.end134 ]
+ %22 = load i8** %rpos, align 4, !tbaa !0
+ %23 = load i8** %shend, align 4, !tbaa !0
+ %cmp150 = icmp ult i8* %22, %23
+ br i1 %cmp150, label %cond.true152, label %cond.false156
+
+cond.true152: ; preds = %for.cond147
+ %incdec.ptr154 = getelementptr inbounds i8* %22, i32 1
+ store i8* %incdec.ptr154, i8** %rpos, align 4, !tbaa !0
+ %24 = load i8* %22, align 1, !tbaa !1
+ %conv155 = zext i8 %24 to i32
+ br label %cond.end158
+
+cond.false156: ; preds = %for.cond147
+ %call157 = call i32 @__shgetc(%struct._IO_FILE* %f) #1
+ br label %cond.end158
+
+cond.end158: ; preds = %cond.false156, %cond.true152
+ %cond159 = phi i32 [ %conv155, %cond.true152 ], [ %call157, %cond.false156 ]
+ %sub160 = add nsw i32 %cond159, -48
+ %cmp161 = icmp ult i32 %sub160, 10
+ %sub164 = add nsw i32 %cond159, -65
+ %cmp165 = icmp ult i32 %sub164, 26
+ %or.cond81 = or i1 %cmp161, %cmp165
+ br i1 %or.cond81, label %for.inc203, label %lor.lhs.false167
+
+lor.lhs.false167: ; preds = %cond.end158
+ %sub168 = add nsw i32 %cond159, -97
+ %cmp169 = icmp ult i32 %sub168, 26
+ %cmp172 = icmp eq i32 %cond159, 95
+ %or.cond2 = or i1 %cmp169, %cmp172
+ br i1 %or.cond2, label %for.inc203, label %if.end175
+
+if.end175: ; preds = %lor.lhs.false167
+ %cmp176 = icmp eq i32 %cond159, 41
+ br i1 %cmp176, label %return, label %if.end179
+
+if.end179: ; preds = %if.end175
+ %25 = load i8** %shend, align 4, !tbaa !0
+ %tobool181 = icmp eq i8* %25, null
+ br i1 %tobool181, label %cond.end186, label %cond.true182
+
+cond.true182: ; preds = %if.end179
+ %26 = load i8** %rpos, align 4, !tbaa !0
+ %incdec.ptr184 = getelementptr inbounds i8* %26, i32 -1
+ store i8* %incdec.ptr184, i8** %rpos, align 4, !tbaa !0
+ br label %cond.end186
+
+cond.end186: ; preds = %cond.true182, %if.end179
+ br i1 %tobool55, label %if.then188, label %while.cond191.preheader
+
+while.cond191.preheader: ; preds = %cond.end186
+ %tobool193123 = icmp eq i32 %i.4, 0
+ %brmerge176 = or i1 %tobool193123, %tobool181
+ br i1 %brmerge176, label %return, label %while.cond191.backedge
+
+if.then188: ; preds = %cond.end186
+ %call189 = call i32* @__errno_location() #7
+ store i32 22, i32* %call189, align 4, !tbaa !3
+ call void @__shlim(%struct._IO_FILE* %f, i32 0) #1
+ br label %return
+
+while.cond191.backedge: ; preds = %while.cond191.backedge, %while.cond191.preheader
+ %dec192124.in = phi i32 [ %dec192124, %while.cond191.backedge ], [ %i.4, %while.cond191.preheader ]
+ %dec192124 = add i32 %dec192124.in, -1
+ %27 = load i8** %rpos, align 4, !tbaa !0
+ %incdec.ptr199 = getelementptr inbounds i8* %27, i32 -1
+ store i8* %incdec.ptr199, i8** %rpos, align 4, !tbaa !0
+ %tobool193 = icmp eq i32 %dec192124, 0
+ br i1 %tobool193, label %return, label %while.cond191.backedge
+
+for.inc203: ; preds = %lor.lhs.false167, %cond.end158
+ %inc204 = add i32 %i.4, 1
+ br label %for.cond147
+
+if.then207: ; preds = %if.end120
+ %28 = load i8** %shend, align 4, !tbaa !0
+ %tobool209 = icmp eq i8* %28, null
+ br i1 %tobool209, label %cond.end214, label %cond.true210
+
+cond.true210: ; preds = %if.then207
+ %29 = load i8** %rpos, align 4, !tbaa !0
+ %incdec.ptr212 = getelementptr inbounds i8* %29, i32 -1
+ store i8* %incdec.ptr212, i8** %rpos, align 4, !tbaa !0
+ br label %cond.end214
+
+cond.end214: ; preds = %cond.true210, %if.then207
+ %call215 = call i32* @__errno_location() #7
+ store i32 22, i32* %call215, align 4, !tbaa !3
+ call void @__shlim(%struct._IO_FILE* %f, i32 0) #1
+ br label %return
+
+if.end216: ; preds = %if.end120
+ %cmp217 = icmp eq i32 %c.5, 48
+ br i1 %cmp217, label %if.then219, label %if.end245
+
+if.then219: ; preds = %if.end216
+ %30 = load i8** %rpos, align 4, !tbaa !0
+ %31 = load i8** %shend, align 4, !tbaa !0
+ %cmp222 = icmp ult i8* %30, %31
+ br i1 %cmp222, label %cond.true224, label %cond.false228
+
+cond.true224: ; preds = %if.then219
+ %incdec.ptr226 = getelementptr inbounds i8* %30, i32 1
+ store i8* %incdec.ptr226, i8** %rpos, align 4, !tbaa !0
+ %32 = load i8* %30, align 1, !tbaa !1
+ %conv227 = zext i8 %32 to i32
+ br label %cond.end230
+
+cond.false228: ; preds = %if.then219
+ %call229 = call i32 @__shgetc(%struct._IO_FILE* %f) #1
+ br label %cond.end230
+
+cond.end230: ; preds = %cond.false228, %cond.true224
+ %cond231 = phi i32 [ %conv227, %cond.true224 ], [ %call229, %cond.false228 ]
+ %or232 = or i32 %cond231, 32
+ %cmp233 = icmp eq i32 %or232, 120
+ br i1 %cmp233, label %if.then235, label %if.end237
+
+if.then235: ; preds = %cond.end230
+ %33 = load i8** %rpos, align 4, !tbaa !0
+ %34 = load i8** %shend, align 4, !tbaa !0
+ %cmp.i = icmp ult i8* %33, %34
+ br i1 %cmp.i, label %cond.true.i, label %cond.false.i
+
+cond.true.i: ; preds = %if.then235
+ %incdec.ptr.i = getelementptr inbounds i8* %33, i32 1
+ store i8* %incdec.ptr.i, i8** %rpos, align 4, !tbaa !0
+ %35 = load i8* %33, align 1, !tbaa !1
+ %conv.i = zext i8 %35 to i32
+ br label %for.cond.i
+
+cond.false.i: ; preds = %if.then235
+ %call.i = call i32 @__shgetc(%struct._IO_FILE* %f) #1
+ br label %for.cond.i
+
+for.cond.i: ; preds = %cond.false12.i, %cond.true8.i, %cond.false.i, %cond.true.i
+ %gotdig.0.i = phi i32 [ 0, %cond.true.i ], [ 0, %cond.false.i ], [ 1, %cond.true8.i ], [ 1, %cond.false12.i ]
+ %c.0.i = phi i32 [ %conv.i, %cond.true.i ], [ %call.i, %cond.false.i ], [ %conv11.i, %cond.true8.i ], [ %call13.i, %cond.false12.i ]
+ switch i32 %c.0.i, label %for.cond48.i [
+ i32 48, label %for.body.i
+ i32 46, label %if.then.i
+ ]
+
+for.body.i: ; preds = %for.cond.i
+ %36 = load i8** %rpos, align 4, !tbaa !0
+ %37 = load i8** %shend, align 4, !tbaa !0
+ %cmp6.i = icmp ult i8* %36, %37
+ br i1 %cmp6.i, label %cond.true8.i, label %cond.false12.i
+
+cond.true8.i: ; preds = %for.body.i
+ %incdec.ptr10.i = getelementptr inbounds i8* %36, i32 1
+ store i8* %incdec.ptr10.i, i8** %rpos, align 4, !tbaa !0
+ %38 = load i8* %36, align 1, !tbaa !1
+ %conv11.i = zext i8 %38 to i32
+ br label %for.cond.i
+
+cond.false12.i: ; preds = %for.body.i
+ %call13.i = call i32 @__shgetc(%struct._IO_FILE* %f) #1
+ br label %for.cond.i
+
+if.then.i: ; preds = %for.cond.i
+ %39 = load i8** %rpos, align 4, !tbaa !0
+ %40 = load i8** %shend, align 4, !tbaa !0
+ %cmp20.i = icmp ult i8* %39, %40
+ br i1 %cmp20.i, label %cond.true22.i, label %cond.false26.i
+
+cond.true22.i: ; preds = %if.then.i
+ %incdec.ptr24.i = getelementptr inbounds i8* %39, i32 1
+ store i8* %incdec.ptr24.i, i8** %rpos, align 4, !tbaa !0
+ %41 = load i8* %39, align 1, !tbaa !1
+ %conv25.i = zext i8 %41 to i32
+ br label %for.cond30.preheader.i
+
+cond.false26.i: ; preds = %if.then.i
+ %call27.i = call i32 @__shgetc(%struct._IO_FILE* %f) #1
+ br label %for.cond30.preheader.i
+
+for.cond30.preheader.i: ; preds = %cond.false26.i, %cond.true22.i
+ %c.1.ph.i = phi i32 [ %conv25.i, %cond.true22.i ], [ %call27.i, %cond.false26.i ]
+ %cmp31107.i = icmp eq i32 %c.1.ph.i, 48
+ br i1 %cmp31107.i, label %for.body33.i, label %for.cond48.i
+
+for.body33.i: ; preds = %cond.end45.i.for.body33.i_crit_edge, %for.cond30.preheader.i
+ %rp.0108.i = phi i64 [ %phitmp.i, %cond.end45.i.for.body33.i_crit_edge ], [ -1, %for.cond30.preheader.i ]
+ %42 = load i8** %rpos, align 4, !tbaa !0
+ %43 = load i8** %shend, align 4, !tbaa !0
+ %cmp37.i = icmp ult i8* %42, %43
+ br i1 %cmp37.i, label %cond.true39.i, label %cond.false43.i
+
+cond.true39.i: ; preds = %for.body33.i
+ %incdec.ptr41.i = getelementptr inbounds i8* %42, i32 1
+ store i8* %incdec.ptr41.i, i8** %rpos, align 4, !tbaa !0
+ %44 = load i8* %42, align 1, !tbaa !1
+ %conv42.i = zext i8 %44 to i32
+ br label %cond.end45.i
+
+cond.false43.i: ; preds = %for.body33.i
+ %call44.i = call i32 @__shgetc(%struct._IO_FILE* %f) #1
+ br label %cond.end45.i
+
+cond.end45.i: ; preds = %cond.false43.i, %cond.true39.i
+ %cond46.i = phi i32 [ %conv42.i, %cond.true39.i ], [ %call44.i, %cond.false43.i ]
+ %cmp31.i = icmp eq i32 %cond46.i, 48
+ br i1 %cmp31.i, label %cond.end45.i.for.body33.i_crit_edge, label %for.cond48.i
+
+cond.end45.i.for.body33.i_crit_edge: ; preds = %cond.end45.i
+ %phitmp.i = add i64 %rp.0108.i, -1
+ br label %for.body33.i
+
+for.cond48.i: ; preds = %cond.false100.i, %cond.true96.i, %cond.end45.i, %for.cond30.preheader.i, %for.cond.i
+ %x.0.i = phi i32 [ 0, %for.cond.i ], [ 0, %cond.end45.i ], [ 0, %for.cond30.preheader.i ], [ %x.2.i, %cond.true96.i ], [ %x.2.i, %cond.false100.i ]
+ %y.0.i = phi double [ 0.000000e+00, %for.cond.i ], [ 0.000000e+00, %cond.end45.i ], [ 0.000000e+00, %for.cond30.preheader.i ], [ %y.2.i, %cond.true96.i ], [ %y.2.i, %cond.false100.i ]
+ %scale.0.i = phi double [ 1.000000e+00, %for.cond.i ], [ 1.000000e+00, %cond.end45.i ], [ 1.000000e+00, %for.cond30.preheader.i ], [ %scale.2.i, %cond.true96.i ], [ %scale.2.i, %cond.false100.i ]
+ %gottail.0.i = phi i32 [ 0, %for.cond.i ], [ 0, %cond.end45.i ], [ 0, %for.cond30.preheader.i ], [ %gottail.2.i, %cond.true96.i ], [ %gottail.2.i, %cond.false100.i ]
+ %gotrad.0.i = phi i32 [ 0, %for.cond.i ], [ 1, %cond.end45.i ], [ 1, %for.cond30.preheader.i ], [ %gotrad.1.i, %cond.true96.i ], [ %gotrad.1.i, %cond.false100.i ]
+ %gotdig.2.i = phi i32 [ %gotdig.0.i, %for.cond.i ], [ 1, %cond.end45.i ], [ %gotdig.0.i, %for.cond30.preheader.i ], [ %gotdig.3.i, %cond.true96.i ], [ %gotdig.3.i, %cond.false100.i ]
+ %rp.1.i = phi i64 [ 0, %for.cond.i ], [ %rp.0108.i, %cond.end45.i ], [ 0, %for.cond30.preheader.i ], [ %rp.2.i, %cond.true96.i ], [ %rp.2.i, %cond.false100.i ]
+ %dc.0.i = phi i64 [ 0, %for.cond.i ], [ 0, %cond.end45.i ], [ 0, %for.cond30.preheader.i ], [ %dc.1.i, %cond.true96.i ], [ %dc.1.i, %cond.false100.i ]
+ %c.2.i = phi i32 [ %c.0.i, %for.cond.i ], [ %cond46.i, %cond.end45.i ], [ %c.1.ph.i, %for.cond30.preheader.i ], [ %conv99.i, %cond.true96.i ], [ %call101.i, %cond.false100.i ]
+ %sub.i = add nsw i32 %c.2.i, -48
+ %cmp49.i = icmp ult i32 %sub.i, 10
+ br i1 %cmp49.i, label %if.end69.i, label %lor.lhs.false.i
+
+lor.lhs.false.i: ; preds = %for.cond48.i
+ %or.i = or i32 %c.2.i, 32
+ %sub51.i = add nsw i32 %or.i, -97
+ %cmp52.i = icmp ult i32 %sub51.i, 6
+ %cmp54.i = icmp eq i32 %c.2.i, 46
+ %or.cond.i = or i1 %cmp52.i, %cmp54.i
+ br i1 %or.cond.i, label %for.body56.i, label %for.end104.i
+
+for.body56.i: ; preds = %lor.lhs.false.i
+ br i1 %cmp54.i, label %if.then59.i, label %if.else.i
+
+if.then59.i: ; preds = %for.body56.i
+ %tobool.i = icmp eq i32 %gotrad.0.i, 0
+ br i1 %tobool.i, label %for.inc91.i, label %for.end104.i
+
+if.else.i: ; preds = %for.body56.i
+ %cmp62.i = icmp sgt i32 %c.2.i, 57
+ %sub66.i = add nsw i32 %or.i, -87
+ %sub66.sub.i = select i1 %cmp62.i, i32 %sub66.i, i32 %sub.i
+ br label %if.end69.i
+
+if.end69.i: ; preds = %if.else.i, %for.cond48.i
+ %d.0.i = phi i32 [ %sub.i, %for.cond48.i ], [ %sub66.sub.i, %if.else.i ]
+ %cmp70.i = icmp slt i64 %dc.0.i, 8
+ br i1 %cmp70.i, label %if.then72.i, label %if.else74.i
+
+if.then72.i: ; preds = %if.end69.i
+ %mul.i = shl i32 %x.0.i, 4
+ %add73.i = add i32 %d.0.i, %mul.i
+ br label %if.end89.i
+
+if.else74.i: ; preds = %if.end69.i
+ %cmp75.i = icmp slt i64 %dc.0.i, 14
+ br i1 %cmp75.i, label %if.then77.i, label %if.else81.i
+
+if.then77.i: ; preds = %if.else74.i
+ %conv78.i = sitofp i32 %d.0.i to double
+ %div.i = fmul double %scale.0.i, 6.250000e-02
+ %mul79.i = fmul double %div.i, %conv78.i
+ %add80.i = fadd double %y.0.i, %mul79.i
+ br label %if.end89.i
+
+if.else81.i: ; preds = %if.else74.i
+ %tobool82.i = icmp ne i32 %d.0.i, 0
+ %tobool83.i = icmp eq i32 %gottail.0.i, 0
+ %or.cond89.i = and i1 %tobool82.i, %tobool83.i
+ br i1 %or.cond89.i, label %if.then84.i, label %if.end89.i
+
+if.then84.i: ; preds = %if.else81.i
+ %mul85.i = fmul double %scale.0.i, 5.000000e-01
+ %add86.i = fadd double %y.0.i, %mul85.i
+ br label %if.end89.i
+
+if.end89.i: ; preds = %if.then84.i, %if.else81.i, %if.then77.i, %if.then72.i
+ %x.1.i = phi i32 [ %add73.i, %if.then72.i ], [ %x.0.i, %if.then77.i ], [ %x.0.i, %if.then84.i ], [ %x.0.i, %if.else81.i ]
+ %y.1.i = phi double [ %y.0.i, %if.then72.i ], [ %add80.i, %if.then77.i ], [ %add86.i, %if.then84.i ], [ %y.0.i, %if.else81.i ]
+ %scale.1.i = phi double [ %scale.0.i, %if.then72.i ], [ %div.i, %if.then77.i ], [ %scale.0.i, %if.then84.i ], [ %scale.0.i, %if.else81.i ]
+ %gottail.1.i = phi i32 [ %gottail.0.i, %if.then72.i ], [ %gottail.0.i, %if.then77.i ], [ 1, %if.then84.i ], [ %gottail.0.i, %if.else81.i ]
+ %inc.i = add nsw i64 %dc.0.i, 1
+ br label %for.inc91.i
+
+for.inc91.i: ; preds = %if.end89.i, %if.then59.i
+ %x.2.i = phi i32 [ %x.1.i, %if.end89.i ], [ %x.0.i, %if.then59.i ]
+ %y.2.i = phi double [ %y.1.i, %if.end89.i ], [ %y.0.i, %if.then59.i ]
+ %scale.2.i = phi double [ %scale.1.i, %if.end89.i ], [ %scale.0.i, %if.then59.i ]
+ %gottail.2.i = phi i32 [ %gottail.1.i, %if.end89.i ], [ %gottail.0.i, %if.then59.i ]
+ %gotrad.1.i = phi i32 [ %gotrad.0.i, %if.end89.i ], [ 1, %if.then59.i ]
+ %gotdig.3.i = phi i32 [ 1, %if.end89.i ], [ %gotdig.2.i, %if.then59.i ]
+ %rp.2.i = phi i64 [ %rp.1.i, %if.end89.i ], [ %dc.0.i, %if.then59.i ]
+ %dc.1.i = phi i64 [ %inc.i, %if.end89.i ], [ %dc.0.i, %if.then59.i ]
+ %45 = load i8** %rpos, align 4, !tbaa !0
+ %46 = load i8** %shend, align 4, !tbaa !0
+ %cmp94.i = icmp ult i8* %45, %46
+ br i1 %cmp94.i, label %cond.true96.i, label %cond.false100.i
+
+cond.true96.i: ; preds = %for.inc91.i
+ %incdec.ptr98.i = getelementptr inbounds i8* %45, i32 1
+ store i8* %incdec.ptr98.i, i8** %rpos, align 4, !tbaa !0
+ %47 = load i8* %45, align 1, !tbaa !1
+ %conv99.i = zext i8 %47 to i32
+ br label %for.cond48.i
+
+cond.false100.i: ; preds = %for.inc91.i
+ %call101.i = call i32 @__shgetc(%struct._IO_FILE* %f) #1
+ br label %for.cond48.i
+
+for.end104.i: ; preds = %if.then59.i, %lor.lhs.false.i
+ %c.2.lcssa.i = phi i32 [ %c.2.i, %lor.lhs.false.i ], [ 46, %if.then59.i ]
+ %tobool105.i = icmp eq i32 %gotdig.2.i, 0
+ br i1 %tobool105.i, label %if.then106.i, label %if.end137.i
+
+if.then106.i: ; preds = %for.end104.i
+ %48 = load i8** %shend, align 4, !tbaa !0
+ %tobool108.i = icmp eq i8* %48, null
+ br i1 %tobool108.i, label %cond.end113.i, label %cond.true109.i
+
+cond.true109.i: ; preds = %if.then106.i
+ %49 = load i8** %rpos, align 4, !tbaa !0
+ %incdec.ptr111.i = getelementptr inbounds i8* %49, i32 -1
+ store i8* %incdec.ptr111.i, i8** %rpos, align 4, !tbaa !0
+ br label %cond.end113.i
+
+cond.end113.i: ; preds = %cond.true109.i, %if.then106.i
+ br i1 %tobool55, label %if.else133.i, label %if.then115.i
+
+if.then115.i: ; preds = %cond.end113.i
+ br i1 %tobool108.i, label %if.end134.i, label %cond.end122.i
+
+cond.end122.i: ; preds = %if.then115.i
+ %50 = load i8** %rpos, align 4, !tbaa !0
+ %incdec.ptr120.i = getelementptr inbounds i8* %50, i32 -1
+ store i8* %incdec.ptr120.i, i8** %rpos, align 4, !tbaa !0
+ %tobool123.i = icmp eq i32 %gotrad.0.i, 0
+ br i1 %tobool123.i, label %if.end134.i, label %cond.true127.i
+
+cond.true127.i: ; preds = %cond.end122.i
+ %incdec.ptr129.i = getelementptr inbounds i8* %50, i32 -2
+ store i8* %incdec.ptr129.i, i8** %rpos, align 4, !tbaa !0
+ br label %if.end134.i
+
+if.else133.i: ; preds = %cond.end113.i
+ call void @__shlim(%struct._IO_FILE* %f, i32 0) #1
+ br label %if.end134.i
+
+if.end134.i: ; preds = %if.else133.i, %cond.true127.i, %cond.end122.i, %if.then115.i
+ %conv135.i = sitofp i32 %sign.0 to double
+ %mul136.i = fmul double %conv135.i, 0.000000e+00
+ br label %return
+
+if.end137.i: ; preds = %for.end104.i
+ %tobool138.i = icmp eq i32 %gotrad.0.i, 0
+ %dc.0.rp.1.i = select i1 %tobool138.i, i64 %dc.0.i, i64 %rp.1.i
+ %cmp141103.i = icmp slt i64 %dc.0.i, 8
+ br i1 %cmp141103.i, label %while.body.i, label %while.end.i
+
+while.body.i: ; preds = %while.body.i, %if.end137.i
+ %dc.2105.i = phi i64 [ %inc144.i, %while.body.i ], [ %dc.0.i, %if.end137.i ]
+ %x.3104.i = phi i32 [ %mul143.i, %while.body.i ], [ %x.0.i, %if.end137.i ]
+ %mul143.i = shl i32 %x.3104.i, 4
+ %inc144.i = add nsw i64 %dc.2105.i, 1
+ %cmp141.i = icmp slt i64 %inc144.i, 8
+ br i1 %cmp141.i, label %while.body.i, label %while.end.i
+
+while.end.i: ; preds = %while.body.i, %if.end137.i
+ %x.3.lcssa.i = phi i32 [ %x.0.i, %if.end137.i ], [ %mul143.i, %while.body.i ]
+ %or145.i = or i32 %c.2.lcssa.i, 32
+ %cmp146.i = icmp eq i32 %or145.i, 112
+ br i1 %cmp146.i, label %if.then148.i, label %if.else165.i
+
+if.then148.i: ; preds = %while.end.i
+ %call149.i = call fastcc i64 @scanexp(%struct._IO_FILE* %f, i32 %pok) #1
+ %cmp150.i = icmp eq i64 %call149.i, -9223372036854775808
+ br i1 %cmp150.i, label %if.then152.i, label %if.end173.i
+
+if.then152.i: ; preds = %if.then148.i
+ br i1 %tobool55, label %if.else162.i, label %if.then154.i
+
+if.then154.i: ; preds = %if.then152.i
+ %51 = load i8** %shend, align 4, !tbaa !0
+ %tobool156.i = icmp eq i8* %51, null
+ br i1 %tobool156.i, label %if.end173.i, label %cond.true157.i
+
+cond.true157.i: ; preds = %if.then154.i
+ %52 = load i8** %rpos, align 4, !tbaa !0
+ %incdec.ptr159.i = getelementptr inbounds i8* %52, i32 -1
+ store i8* %incdec.ptr159.i, i8** %rpos, align 4, !tbaa !0
+ br label %if.end173.i
+
+if.else162.i: ; preds = %if.then152.i
+ call void @__shlim(%struct._IO_FILE* %f, i32 0) #1
+ br label %return
+
+if.else165.i: ; preds = %while.end.i
+ %53 = load i8** %shend, align 4, !tbaa !0
+ %tobool167.i = icmp eq i8* %53, null
+ br i1 %tobool167.i, label %if.end173.i, label %cond.true168.i
+
+cond.true168.i: ; preds = %if.else165.i
+ %54 = load i8** %rpos, align 4, !tbaa !0
+ %incdec.ptr170.i = getelementptr inbounds i8* %54, i32 -1
+ store i8* %incdec.ptr170.i, i8** %rpos, align 4, !tbaa !0
+ br label %if.end173.i
+
+if.end173.i: ; preds = %cond.true168.i, %if.else165.i, %cond.true157.i, %if.then154.i, %if.then148.i
+ %e2.0.i = phi i64 [ %call149.i, %if.then148.i ], [ 0, %cond.true168.i ], [ 0, %if.else165.i ], [ 0, %if.then154.i ], [ 0, %cond.true157.i ]
+ %mul174.i = shl i64 %dc.0.rp.1.i, 2
+ %sub175.i = add nsw i64 %mul174.i, -32
+ %add176.i = add nsw i64 %sub175.i, %e2.0.i
+ %tobool177.i = icmp eq i32 %x.3.lcssa.i, 0
+ br i1 %tobool177.i, label %if.then178.i, label %if.end181.i
+
+if.then178.i: ; preds = %if.end173.i
+ %conv179.i = sitofp i32 %sign.0 to double
+ %mul180.i = fmul double %conv179.i, 0.000000e+00
+ br label %return
+
+if.end181.i: ; preds = %if.end173.i
+ %sub182.i = sub nsw i32 0, %emin.0.ph
+ %conv183.i120 = zext i32 %sub182.i to i64
+ %cmp184.i = icmp sgt i64 %add176.i, %conv183.i120
+ br i1 %cmp184.i, label %if.then186.i, label %if.end191.i
+
+if.then186.i: ; preds = %if.end181.i
+ %call187.i = call i32* @__errno_location() #7
+ store i32 34, i32* %call187.i, align 4, !tbaa !3
+ %conv188.i = sitofp i32 %sign.0 to double
+ %mul189.i = fmul double %conv188.i, 0x7FEFFFFFFFFFFFFF
+ %mul190.i = fmul double %mul189.i, 0x7FEFFFFFFFFFFFFF
+ br label %return
+
+if.end191.i: ; preds = %if.end181.i
+ %sub192.i = add nsw i32 %emin.0.ph, -106
+ %conv193.i = sext i32 %sub192.i to i64
+ %cmp194.i = icmp slt i64 %add176.i, %conv193.i
+ br i1 %cmp194.i, label %if.then196.i, label %while.cond202.preheader.i
+
+while.cond202.preheader.i: ; preds = %if.end191.i
+ %cmp20397.i = icmp sgt i32 %x.3.lcssa.i, -1
+ br i1 %cmp20397.i, label %while.body205.i, label %while.end218.i
+
+if.then196.i: ; preds = %if.end191.i
+ %call197.i = call i32* @__errno_location() #7
+ store i32 34, i32* %call197.i, align 4, !tbaa !3
+ %conv198.i = sitofp i32 %sign.0 to double
+ %mul199.i = fmul double %conv198.i, 0x10000000000000
+ %mul200.i = fmul double %mul199.i, 0x10000000000000
+ br label %return
+
+while.body205.i: ; preds = %if.end216.i, %while.cond202.preheader.i
+ %e2.1100.i = phi i64 [ %dec217.i, %if.end216.i ], [ %add176.i, %while.cond202.preheader.i ]
+ %y.399.i = phi double [ %y.4.i, %if.end216.i ], [ %y.0.i, %while.cond202.preheader.i ]
+ %x.498.i = phi i32 [ %x.5.i, %if.end216.i ], [ %x.3.lcssa.i, %while.cond202.preheader.i ]
+ %cmp206.i = fcmp ult double %y.399.i, 5.000000e-01
+ %add214.i = shl i32 %x.498.i, 1
+ br i1 %cmp206.i, label %if.end216.i, label %if.then208.i
+
+if.then208.i: ; preds = %while.body205.i
+ %add210115.i = or i32 %add214.i, 1
+ %sub211.i = fadd double %y.399.i, -1.000000e+00
+ br label %if.end216.i
+
+if.end216.i: ; preds = %if.then208.i, %while.body205.i
+ %x.5.i = phi i32 [ %add210115.i, %if.then208.i ], [ %add214.i, %while.body205.i ]
+ %sub211.pn.i = phi double [ %sub211.i, %if.then208.i ], [ %y.399.i, %while.body205.i ]
+ %y.4.i = fadd double %y.399.i, %sub211.pn.i
+ %dec217.i = add nsw i64 %e2.1100.i, -1
+ %cmp203.i = icmp sgt i32 %x.5.i, -1
+ br i1 %cmp203.i, label %while.body205.i, label %while.end218.i
+
+while.end218.i: ; preds = %if.end216.i, %while.cond202.preheader.i
+ %e2.1.lcssa.i = phi i64 [ %add176.i, %while.cond202.preheader.i ], [ %dec217.i, %if.end216.i ]
+ %y.3.lcssa.i = phi double [ %y.0.i, %while.cond202.preheader.i ], [ %y.4.i, %if.end216.i ]
+ %x.4.lcssa.i = phi i32 [ %x.3.lcssa.i, %while.cond202.preheader.i ], [ %x.5.i, %if.end216.i ]
+ %conv219.i121 = zext i32 %bits.0.ph to i64
+ %conv221.i = sext i32 %emin.0.ph to i64
+ %add220.i = sub i64 32, %conv221.i
+ %sub222.i = add i64 %e2.1.lcssa.i, %add220.i
+ %cmp223.i = icmp sgt i64 %conv219.i121, %sub222.i
+ br i1 %cmp223.i, label %if.then225.i, label %if.end234.i
+
+if.then225.i: ; preds = %while.end218.i
+ %conv229.i = trunc i64 %sub222.i to i32
+ %cmp230.i = icmp slt i32 %conv229.i, 0
+ %.conv229.i = select i1 %cmp230.i, i32 0, i32 %conv229.i
+ br label %if.end234.i
+
+if.end234.i: ; preds = %if.then225.i, %while.end218.i
+ %bits.addr.0.i = phi i32 [ %.conv229.i, %if.then225.i ], [ %bits.0.ph, %while.end218.i ]
+ %cmp235.i = icmp slt i32 %bits.addr.0.i, 53
+ br i1 %cmp235.i, label %if.end243.i, label %if.end234.if.end252_crit_edge.i
+
+if.end234.if.end252_crit_edge.i: ; preds = %if.end234.i
+ %conv253.pre.i = sitofp i32 %sign.0 to double
+ br label %if.end252.i
+
+if.end243.i: ; preds = %if.end234.i
+ %sub239.i = sub i32 84, %bits.addr.0.i
+ %call240.i = call double @scalbn(double 1.000000e+00, i32 %sub239.i) #1
+ %conv241.i = sitofp i32 %sign.0 to double
+ %call242.i = call double @copysignl(double %call240.i, double %conv241.i) #7
+ %cmp244.i = icmp slt i32 %bits.addr.0.i, 32
+ %tobool247.i = fcmp une double %y.3.lcssa.i, 0.000000e+00
+ %or.cond90.i = and i1 %cmp244.i, %tobool247.i
+ br i1 %or.cond90.i, label %land.lhs.true248.i, label %if.end252.i
+
+land.lhs.true248.i: ; preds = %if.end243.i
+ %and.i = and i32 %x.4.lcssa.i, 1
+ %tobool249.i = icmp eq i32 %and.i, 0
+ %55 = xor i32 %and.i, 1
+ %inc251.x.4.i = add i32 %55, %x.4.lcssa.i
+ %.y.3.i = select i1 %tobool249.i, double 0.000000e+00, double %y.3.lcssa.i
+ br label %if.end252.i
+
+if.end252.i: ; preds = %land.lhs.true248.i, %if.end243.i, %if.end234.if.end252_crit_edge.i
+ %conv253.pre-phi.i = phi double [ %conv253.pre.i, %if.end234.if.end252_crit_edge.i ], [ %conv241.i, %land.lhs.true248.i ], [ %conv241.i, %if.end243.i ]
+ %bias.096.i = phi double [ 0.000000e+00, %if.end234.if.end252_crit_edge.i ], [ %call242.i, %land.lhs.true248.i ], [ %call242.i, %if.end243.i ]
+ %x.6.i = phi i32 [ %x.4.lcssa.i, %if.end234.if.end252_crit_edge.i ], [ %inc251.x.4.i, %land.lhs.true248.i ], [ %x.4.lcssa.i, %if.end243.i ]
+ %y.5.i = phi double [ %y.3.lcssa.i, %if.end234.if.end252_crit_edge.i ], [ %.y.3.i, %land.lhs.true248.i ], [ %y.3.lcssa.i, %if.end243.i ]
+ %conv254.i = uitofp i32 %x.6.i to double
+ %mul255.i = fmul double %conv253.pre-phi.i, %conv254.i
+ %add256.i = fadd double %bias.096.i, %mul255.i
+ %mul258.i = fmul double %conv253.pre-phi.i, %y.5.i
+ %add259.i = fadd double %mul258.i, %add256.i
+ %sub260.i = fsub double %add259.i, %bias.096.i
+ %tobool261.i = fcmp une double %sub260.i, 0.000000e+00
+ br i1 %tobool261.i, label %if.end264.i, label %if.then262.i
+
+if.then262.i: ; preds = %if.end252.i
+ %call263.i = call i32* @__errno_location() #7
+ store i32 34, i32* %call263.i, align 4, !tbaa !3
+ br label %if.end264.i
+
+if.end264.i: ; preds = %if.then262.i, %if.end252.i
+ %conv265.i = trunc i64 %e2.1.lcssa.i to i32
+ %call266.i = call double @scalbnl(double %sub260.i, i32 %conv265.i) #1
+ br label %return
+
+if.end237: ; preds = %cond.end230
+ %56 = load i8** %shend, align 4, !tbaa !0
+ %tobool239 = icmp eq i8* %56, null
+ br i1 %tobool239, label %if.end245, label %cond.true240
+
+cond.true240: ; preds = %if.end237
+ %57 = load i8** %rpos, align 4, !tbaa !0
+ %incdec.ptr242 = getelementptr inbounds i8* %57, i32 -1
+ store i8* %incdec.ptr242, i8** %rpos, align 4, !tbaa !0
+ br label %if.end245
+
+if.end245: ; preds = %cond.true240, %if.end237, %if.end216
+ %c.6 = phi i32 [ %c.5, %if.end216 ], [ 48, %if.end237 ], [ 48, %cond.true240 ]
+ %58 = bitcast [128 x i32]* %x.i to i8*
+ call void @llvm.lifetime.start(i64 512, i8* %58) #1
+ %sum.i = add i32 %emin.0.ph, %bits.0.ph
+ %sub1.i = sub i32 0, %sum.i
+ br label %for.cond.i85
+
+for.cond.i85: ; preds = %cond.false.i91, %cond.true.i89, %if.end245
+ %gotdig.0.i84 = phi i32 [ 0, %if.end245 ], [ 1, %cond.true.i89 ], [ 1, %cond.false.i91 ]
+ %c.addr.0.i = phi i32 [ %c.6, %if.end245 ], [ %conv.i88, %cond.true.i89 ], [ %call.i90, %cond.false.i91 ]
+ switch i32 %c.addr.0.i, label %if.end.i [
+ i32 48, label %for.body.i86
+ i32 46, label %if.then.i92
+ ]
+
+for.body.i86: ; preds = %for.cond.i85
+ %59 = load i8** %rpos, align 4, !tbaa !0
+ %60 = load i8** %shend, align 4, !tbaa !0
+ %cmp2.i = icmp ult i8* %59, %60
+ br i1 %cmp2.i, label %cond.true.i89, label %cond.false.i91
+
+cond.true.i89: ; preds = %for.body.i86
+ %incdec.ptr.i87 = getelementptr inbounds i8* %59, i32 1
+ store i8* %incdec.ptr.i87, i8** %rpos, align 4, !tbaa !0
+ %61 = load i8* %59, align 1, !tbaa !1
+ %conv.i88 = zext i8 %61 to i32
+ br label %for.cond.i85
+
+cond.false.i91: ; preds = %for.body.i86
+ %call.i90 = call i32 @__shgetc(%struct._IO_FILE* %f) #1
+ br label %for.cond.i85
+
+if.then.i92: ; preds = %for.cond.i85
+ %62 = load i8** %rpos, align 4, !tbaa !0
+ %63 = load i8** %shend, align 4, !tbaa !0
+ %cmp8.i = icmp ult i8* %62, %63
+ br i1 %cmp8.i, label %cond.true10.i, label %cond.false14.i
+
+cond.true10.i: ; preds = %if.then.i92
+ %incdec.ptr12.i = getelementptr inbounds i8* %62, i32 1
+ store i8* %incdec.ptr12.i, i8** %rpos, align 4, !tbaa !0
+ %64 = load i8* %62, align 1, !tbaa !1
+ %conv13.i = zext i8 %64 to i32
+ br label %for.cond18.preheader.i
+
+cond.false14.i: ; preds = %if.then.i92
+ %call15.i = call i32 @__shgetc(%struct._IO_FILE* %f) #1
+ br label %for.cond18.preheader.i
+
+for.cond18.preheader.i: ; preds = %cond.false14.i, %cond.true10.i
+ %c.addr.1.ph.i = phi i32 [ %conv13.i, %cond.true10.i ], [ %call15.i, %cond.false14.i ]
+ %cmp19343.i = icmp eq i32 %c.addr.1.ph.i, 48
+ br i1 %cmp19343.i, label %for.body21.i, label %if.end.i
+
+for.body21.i: ; preds = %for.cond18.backedge.i.for.body21.i_crit_edge, %for.cond18.preheader.i
+ %lrp.0344.i = phi i64 [ %phitmp.i93, %for.cond18.backedge.i.for.body21.i_crit_edge ], [ -1, %for.cond18.preheader.i ]
+ %65 = load i8** %rpos, align 4, !tbaa !0
+ %66 = load i8** %shend, align 4, !tbaa !0
+ %cmp25.i = icmp ult i8* %65, %66
+ br i1 %cmp25.i, label %cond.true27.i, label %cond.false31.i
+
+cond.true27.i: ; preds = %for.body21.i
+ %incdec.ptr29.i = getelementptr inbounds i8* %65, i32 1
+ store i8* %incdec.ptr29.i, i8** %rpos, align 4, !tbaa !0
+ %67 = load i8* %65, align 1, !tbaa !1
+ %conv30.i = zext i8 %67 to i32
+ br label %for.cond18.backedge.i
+
+cond.false31.i: ; preds = %for.body21.i
+ %call32.i = call i32 @__shgetc(%struct._IO_FILE* %f) #1
+ br label %for.cond18.backedge.i
+
+for.cond18.backedge.i: ; preds = %cond.false31.i, %cond.true27.i
+ %c.addr.1.be.i = phi i32 [ %call32.i, %cond.false31.i ], [ %conv30.i, %cond.true27.i ]
+ %cmp19.i = icmp eq i32 %c.addr.1.be.i, 48
+ br i1 %cmp19.i, label %for.cond18.backedge.i.for.body21.i_crit_edge, label %if.end.i
+
+for.cond18.backedge.i.for.body21.i_crit_edge: ; preds = %for.cond18.backedge.i
+ %phitmp.i93 = add i64 %lrp.0344.i, -1
+ br label %for.body21.i
+
+if.end.i: ; preds = %for.cond18.backedge.i, %for.cond18.preheader.i, %for.cond.i85
+ %lrp.1.i = phi i64 [ 0, %for.cond18.preheader.i ], [ %lrp.0344.i, %for.cond18.backedge.i ], [ 0, %for.cond.i85 ]
+ %gotdig.2.i94 = phi i32 [ %gotdig.0.i84, %for.cond18.preheader.i ], [ 1, %for.cond18.backedge.i ], [ %gotdig.0.i84, %for.cond.i85 ]
+ %gotrad.0.i95 = phi i32 [ 1, %for.cond18.preheader.i ], [ 1, %for.cond18.backedge.i ], [ 0, %for.cond.i85 ]
+ %c.addr.2.i = phi i32 [ %c.addr.1.ph.i, %for.cond18.preheader.i ], [ %c.addr.1.be.i, %for.cond18.backedge.i ], [ %c.addr.0.i, %for.cond.i85 ]
+ %arrayidx.i = getelementptr inbounds [128 x i32]* %x.i, i32 0, i32 0
+ store i32 0, i32* %arrayidx.i, align 4, !tbaa !3
+ %sub37321.i = add nsw i32 %c.addr.2.i, -48
+ %cmp38322.i = icmp ult i32 %sub37321.i, 10
+ %cmp40323.i = icmp eq i32 %c.addr.2.i, 46
+ %or.cond2324.i = or i1 %cmp38322.i, %cmp40323.i
+ br i1 %or.cond2324.i, label %for.body42.lr.ph.i, label %for.end94.i
+
+for.body42.lr.ph.i: ; preds = %if.end.i
+ %arrayidx77.i = getelementptr inbounds [128 x i32]* %x.i, i32 0, i32 124
+ br label %for.body42.i
+
+for.body42.i: ; preds = %for.cond36.backedge.i, %for.body42.lr.ph.i
+ %cmp40334.i = phi i1 [ %cmp40323.i, %for.body42.lr.ph.i ], [ %cmp40.i, %for.cond36.backedge.i ]
+ %sub37333.i = phi i32 [ %sub37321.i, %for.body42.lr.ph.i ], [ %sub37.i, %for.cond36.backedge.i ]
+ %c.addr.3332.i = phi i32 [ %c.addr.2.i, %for.body42.lr.ph.i ], [ %c.addr.3.be.i, %for.cond36.backedge.i ]
+ %j.0331.i = phi i32 [ 0, %for.body42.lr.ph.i ], [ %j.2.i, %for.cond36.backedge.i ]
+ %k.0330.i = phi i32 [ 0, %for.body42.lr.ph.i ], [ %k.2.i, %for.cond36.backedge.i ]
+ %gotrad.1329.i = phi i32 [ %gotrad.0.i95, %for.body42.lr.ph.i ], [ %gotrad.2.i, %for.cond36.backedge.i ]
+ %gotdig.3328.i = phi i32 [ %gotdig.2.i94, %for.body42.lr.ph.i ], [ %gotdig.4.i, %for.cond36.backedge.i ]
+ %lnz.0327.i = phi i32 [ 0, %for.body42.lr.ph.i ], [ %lnz.2.i, %for.cond36.backedge.i ]
+ %dc.0326.i = phi i64 [ 0, %for.body42.lr.ph.i ], [ %dc.1.i100, %for.cond36.backedge.i ]
+ %lrp.2325.i = phi i64 [ %lrp.1.i, %for.body42.lr.ph.i ], [ %lrp.3.i, %for.cond36.backedge.i ]
+ br i1 %cmp40334.i, label %if.then45.i, label %if.else.i97
+
+if.then45.i: ; preds = %for.body42.i
+ %cond.i = icmp eq i32 %gotrad.1329.i, 0
+ br i1 %cond.i, label %for.inc81.i, label %if.end97.i
+
+if.else.i97: ; preds = %for.body42.i
+ %cmp48.i = icmp slt i32 %k.0330.i, 125
+ %inc.i96 = add nsw i64 %dc.0326.i, 1
+ %cmp51.i = icmp ne i32 %c.addr.3332.i, 48
+ br i1 %cmp48.i, label %if.then50.i, label %if.else72.i
+
+if.then50.i: ; preds = %if.else.i97
+ %conv54.i = trunc i64 %inc.i96 to i32
+ %conv54.lnz.0.i = select i1 %cmp51.i, i32 %conv54.i, i32 %lnz.0327.i
+ %tobool56.i = icmp eq i32 %j.0331.i, 0
+ %arrayidx64.i = getelementptr inbounds [128 x i32]* %x.i, i32 0, i32 %k.0330.i
+ br i1 %tobool56.i, label %if.end65.i, label %if.then57.i
+
+if.then57.i: ; preds = %if.then50.i
+ %68 = load i32* %arrayidx64.i, align 4, !tbaa !3
+ %mul.i98 = mul i32 %68, 10
+ %add59.i = add i32 %c.addr.3332.i, -48
+ %sub60.i = add i32 %add59.i, %mul.i98
+ br label %if.end65.i
+
+if.end65.i: ; preds = %if.then57.i, %if.then50.i
+ %storemerge.i = phi i32 [ %sub60.i, %if.then57.i ], [ %sub37333.i, %if.then50.i ]
+ store i32 %storemerge.i, i32* %arrayidx64.i, align 4, !tbaa !3
+ %inc66.i = add nsw i32 %j.0331.i, 1
+ %cmp67.i = icmp eq i32 %inc66.i, 9
+ %inc70.i = zext i1 %cmp67.i to i32
+ %inc70.k.0.i = add nsw i32 %inc70.i, %k.0330.i
+ %.inc66.i = select i1 %cmp67.i, i32 0, i32 %inc66.i
+ br label %for.inc81.i
+
+if.else72.i: ; preds = %if.else.i97
+ br i1 %cmp51.i, label %if.then76.i, label %for.inc81.i
+
+if.then76.i: ; preds = %if.else72.i
+ %69 = load i32* %arrayidx77.i, align 4, !tbaa !3
+ %or.i99 = or i32 %69, 1
+ store i32 %or.i99, i32* %arrayidx77.i, align 4, !tbaa !3
+ br label %for.inc81.i
+
+for.inc81.i: ; preds = %if.then76.i, %if.else72.i, %if.end65.i, %if.then45.i
+ %lrp.3.i = phi i64 [ %lrp.2325.i, %if.end65.i ], [ %lrp.2325.i, %if.then76.i ], [ %dc.0326.i, %if.then45.i ], [ %lrp.2325.i, %if.else72.i ]
+ %dc.1.i100 = phi i64 [ %inc.i96, %if.end65.i ], [ %inc.i96, %if.then76.i ], [ %dc.0326.i, %if.then45.i ], [ %inc.i96, %if.else72.i ]
+ %lnz.2.i = phi i32 [ %conv54.lnz.0.i, %if.end65.i ], [ %lnz.0327.i, %if.then76.i ], [ %lnz.0327.i, %if.then45.i ], [ %lnz.0327.i, %if.else72.i ]
+ %gotdig.4.i = phi i32 [ 1, %if.end65.i ], [ %gotdig.3328.i, %if.then76.i ], [ %gotdig.3328.i, %if.then45.i ], [ %gotdig.3328.i, %if.else72.i ]
+ %gotrad.2.i = phi i32 [ %gotrad.1329.i, %if.end65.i ], [ %gotrad.1329.i, %if.then76.i ], [ 1, %if.then45.i ], [ %gotrad.1329.i, %if.else72.i ]
+ %k.2.i = phi i32 [ %inc70.k.0.i, %if.end65.i ], [ %k.0330.i, %if.then76.i ], [ %k.0330.i, %if.then45.i ], [ %k.0330.i, %if.else72.i ]
+ %j.2.i = phi i32 [ %.inc66.i, %if.end65.i ], [ %j.0331.i, %if.then76.i ], [ %j.0331.i, %if.then45.i ], [ %j.0331.i, %if.else72.i ]
+ %70 = load i8** %rpos, align 4, !tbaa !0
+ %71 = load i8** %shend, align 4, !tbaa !0
+ %cmp84.i = icmp ult i8* %70, %71
+ br i1 %cmp84.i, label %cond.true86.i, label %cond.false90.i
+
+cond.true86.i: ; preds = %for.inc81.i
+ %incdec.ptr88.i = getelementptr inbounds i8* %70, i32 1
+ store i8* %incdec.ptr88.i, i8** %rpos, align 4, !tbaa !0
+ %72 = load i8* %70, align 1, !tbaa !1
+ %conv89.i = zext i8 %72 to i32
+ br label %for.cond36.backedge.i
+
+cond.false90.i: ; preds = %for.inc81.i
+ %call91.i = call i32 @__shgetc(%struct._IO_FILE* %f) #1
+ br label %for.cond36.backedge.i
+
+for.cond36.backedge.i: ; preds = %cond.false90.i, %cond.true86.i
+ %c.addr.3.be.i = phi i32 [ %call91.i, %cond.false90.i ], [ %conv89.i, %cond.true86.i ]
+ %sub37.i = add nsw i32 %c.addr.3.be.i, -48
+ %cmp38.i = icmp ult i32 %sub37.i, 10
+ %cmp40.i = icmp eq i32 %c.addr.3.be.i, 46
+ %or.cond2.i = or i1 %cmp38.i, %cmp40.i
+ br i1 %or.cond2.i, label %for.body42.i, label %for.end94.i
+
+for.end94.i: ; preds = %for.cond36.backedge.i, %if.end.i
+ %c.addr.3.lcssa.i = phi i32 [ %c.addr.2.i, %if.end.i ], [ %c.addr.3.be.i, %for.cond36.backedge.i ]
+ %j.0.lcssa.i = phi i32 [ 0, %if.end.i ], [ %j.2.i, %for.cond36.backedge.i ]
+ %k.0.lcssa.i = phi i32 [ 0, %if.end.i ], [ %k.2.i, %for.cond36.backedge.i ]
+ %gotrad.1.lcssa.i = phi i32 [ %gotrad.0.i95, %if.end.i ], [ %gotrad.2.i, %for.cond36.backedge.i ]
+ %gotdig.3.lcssa.i = phi i32 [ %gotdig.2.i94, %if.end.i ], [ %gotdig.4.i, %for.cond36.backedge.i ]
+ %lnz.0.lcssa.i = phi i32 [ 0, %if.end.i ], [ %lnz.2.i, %for.cond36.backedge.i ]
+ %dc.0.lcssa.i = phi i64 [ 0, %if.end.i ], [ %dc.1.i100, %for.cond36.backedge.i ]
+ %lrp.2.lcssa.i = phi i64 [ %lrp.1.i, %if.end.i ], [ %lrp.3.i, %for.cond36.backedge.i ]
+ %tobool95.i = icmp eq i32 %gotrad.1.lcssa.i, 0
+ %dc.0.lrp.2.i = select i1 %tobool95.i, i64 %dc.0.lcssa.i, i64 %lrp.2.lcssa.i
+ br label %if.end97.i
+
+if.end97.i: ; preds = %for.end94.i, %if.then45.i
+ %c.addr.3320.i = phi i32 [ %c.addr.3.lcssa.i, %for.end94.i ], [ %c.addr.3332.i, %if.then45.i ]
+ %j.0318.i = phi i32 [ %j.0.lcssa.i, %for.end94.i ], [ %j.0331.i, %if.then45.i ]
+ %k.0316.i = phi i32 [ %k.0.lcssa.i, %for.end94.i ], [ %k.0330.i, %if.then45.i ]
+ %gotdig.3313.i = phi i32 [ %gotdig.3.lcssa.i, %for.end94.i ], [ %gotdig.3328.i, %if.then45.i ]
+ %lnz.0311.i = phi i32 [ %lnz.0.lcssa.i, %for.end94.i ], [ %lnz.0327.i, %if.then45.i ]
+ %dc.0309.i = phi i64 [ %dc.0.lcssa.i, %for.end94.i ], [ %dc.0326.i, %if.then45.i ]
+ %lrp.4.i = phi i64 [ %dc.0.lrp.2.i, %for.end94.i ], [ %lrp.2325.i, %if.then45.i ]
+ %tobool98.i = icmp ne i32 %gotdig.3313.i, 0
+ br i1 %tobool98.i, label %land.lhs.true.i, label %if.else120.i
+
+land.lhs.true.i: ; preds = %if.end97.i
+ %or99.i = or i32 %c.addr.3320.i, 32
+ %cmp100.i = icmp eq i32 %or99.i, 101
+ br i1 %cmp100.i, label %if.then102.i, label %if.else120.i
+
+if.then102.i: ; preds = %land.lhs.true.i
+ %call103.i = call fastcc i64 @scanexp(%struct._IO_FILE* %f, i32 %pok) #1
+ %cmp104.i = icmp eq i64 %call103.i, -9223372036854775808
+ br i1 %cmp104.i, label %if.then106.i101, label %if.end118.i
+
+if.then106.i101: ; preds = %if.then102.i
+ br i1 %tobool55, label %if.else116.i, label %if.then108.i
+
+if.then108.i: ; preds = %if.then106.i101
+ %73 = load i8** %shend, align 4, !tbaa !0
+ %tobool110.i = icmp eq i8* %73, null
+ br i1 %tobool110.i, label %if.end118.i, label %cond.true111.i
+
+cond.true111.i: ; preds = %if.then108.i
+ %74 = load i8** %rpos, align 4, !tbaa !0
+ %incdec.ptr113.i = getelementptr inbounds i8* %74, i32 -1
+ store i8* %incdec.ptr113.i, i8** %rpos, align 4, !tbaa !0
+ br label %if.end118.i
+
+if.else116.i: ; preds = %if.then106.i101
+ call void @__shlim(%struct._IO_FILE* %f, i32 0) #1
+ br label %return
+
+if.end118.i: ; preds = %cond.true111.i, %if.then108.i, %if.then102.i
+ %e10.0.i = phi i64 [ %call103.i, %if.then102.i ], [ 0, %if.then108.i ], [ 0, %cond.true111.i ]
+ %add119.i = add nsw i64 %e10.0.i, %lrp.4.i
+ br label %if.end132.i
+
+if.else120.i: ; preds = %land.lhs.true.i, %if.end97.i
+ %cmp121.i = icmp sgt i32 %c.addr.3320.i, -1
+ br i1 %cmp121.i, label %if.then123.i, label %if.end132.i
+
+if.then123.i: ; preds = %if.else120.i
+ %75 = load i8** %shend, align 4, !tbaa !0
+ %tobool125.i = icmp eq i8* %75, null
+ br i1 %tobool125.i, label %if.end132.i, label %cond.true126.i
+
+cond.true126.i: ; preds = %if.then123.i
+ %76 = load i8** %rpos, align 4, !tbaa !0
+ %incdec.ptr128.i = getelementptr inbounds i8* %76, i32 -1
+ store i8* %incdec.ptr128.i, i8** %rpos, align 4, !tbaa !0
+ br label %if.end132.i
+
+if.end132.i: ; preds = %cond.true126.i, %if.then123.i, %if.else120.i, %if.end118.i
+ %lrp.5.i = phi i64 [ %add119.i, %if.end118.i ], [ %lrp.4.i, %cond.true126.i ], [ %lrp.4.i, %if.then123.i ], [ %lrp.4.i, %if.else120.i ]
+ br i1 %tobool98.i, label %if.end136.i, label %if.then134.i
+
+if.then134.i: ; preds = %if.end132.i
+ %call135.i = call i32* @__errno_location() #7
+ store i32 22, i32* %call135.i, align 4, !tbaa !3
+ call void @__shlim(%struct._IO_FILE* %f, i32 0) #1
+ br label %return
+
+if.end136.i: ; preds = %if.end132.i
+ %77 = load i32* %arrayidx.i, align 4, !tbaa !3
+ %tobool138.i102 = icmp eq i32 %77, 0
+ br i1 %tobool138.i102, label %if.then139.i, label %if.end142.i
+
+if.then139.i: ; preds = %if.end136.i
+ %conv140.i = sitofp i32 %sign.0 to double
+ %mul141.i = fmul double %conv140.i, 0.000000e+00
+ br label %return
+
+if.end142.i: ; preds = %if.end136.i
+ %cmp143.i = icmp eq i64 %lrp.5.i, %dc.0309.i
+ %cmp146.i103 = icmp slt i64 %dc.0309.i, 10
+ %or.cond.i104 = and i1 %cmp143.i, %cmp146.i103
+ br i1 %or.cond.i104, label %land.lhs.true148.i, label %if.end159.i
+
+land.lhs.true148.i: ; preds = %if.end142.i
+ %cmp149.i = icmp ugt i32 %bits.0.ph, 30
+ br i1 %cmp149.i, label %if.then154.i106, label %lor.lhs.false.i105
+
+lor.lhs.false.i105: ; preds = %land.lhs.true148.i
+ %shr.i = lshr i32 %77, %bits.0.ph
+ %cmp152.i = icmp eq i32 %shr.i, 0
+ br i1 %cmp152.i, label %if.then154.i106, label %if.end159.i
+
+if.then154.i106: ; preds = %lor.lhs.false.i105, %land.lhs.true148.i
+ %conv155.i = sitofp i32 %sign.0 to double
+ %conv157.i = uitofp i32 %77 to double
+ %mul158.i = fmul double %conv155.i, %conv157.i
+ br label %return
+
+if.end159.i: ; preds = %lor.lhs.false.i105, %if.end142.i
+ %div.i107 = sdiv i32 %emin.0.ph, -2
+ %conv161.i = sext i32 %div.i107 to i64
+ %cmp162.i = icmp sgt i64 %lrp.5.i, %conv161.i
+ br i1 %cmp162.i, label %if.then164.i, label %if.end169.i
+
+if.then164.i: ; preds = %if.end159.i
+ %call165.i = call i32* @__errno_location() #7
+ store i32 34, i32* %call165.i, align 4, !tbaa !3
+ %conv166.i = sitofp i32 %sign.0 to double
+ %mul167.i = fmul double %conv166.i, 0x7FEFFFFFFFFFFFFF
+ %mul168.i = fmul double %mul167.i, 0x7FEFFFFFFFFFFFFF
+ br label %return
+
+if.end169.i: ; preds = %if.end159.i
+ %sub170.i = add nsw i32 %emin.0.ph, -106
+ %conv171.i = sext i32 %sub170.i to i64
+ %cmp172.i = icmp slt i64 %lrp.5.i, %conv171.i
+ br i1 %cmp172.i, label %if.then174.i, label %if.end179.i
+
+if.then174.i: ; preds = %if.end169.i
+ %call175.i = call i32* @__errno_location() #7
+ store i32 34, i32* %call175.i, align 4, !tbaa !3
+ %conv176.i = sitofp i32 %sign.0 to double
+ %mul177.i = fmul double %conv176.i, 0x10000000000000
+ %mul178.i = fmul double %mul177.i, 0x10000000000000
+ br label %return
+
+if.end179.i: ; preds = %if.end169.i
+ %tobool180.i = icmp eq i32 %j.0318.i, 0
+ br i1 %tobool180.i, label %if.end192.i, label %for.cond182.preheader.i
+
+for.cond182.preheader.i: ; preds = %if.end179.i
+ %cmp183304.i = icmp slt i32 %j.0318.i, 9
+ br i1 %cmp183304.i, label %for.body185.lr.ph.i, label %for.end190.i
+
+for.body185.lr.ph.i: ; preds = %for.cond182.preheader.i
+ %arrayidx186.i = getelementptr inbounds [128 x i32]* %x.i, i32 0, i32 %k.0316.i
+ %arrayidx186.promoted.i = load i32* %arrayidx186.i, align 4, !tbaa !3
+ br label %for.body185.i
+
+for.body185.i: ; preds = %for.body185.i, %for.body185.lr.ph.i
+ %mul187306.i = phi i32 [ %arrayidx186.promoted.i, %for.body185.lr.ph.i ], [ %mul187.i, %for.body185.i ]
+ %j.3305.i = phi i32 [ %j.0318.i, %for.body185.lr.ph.i ], [ %inc189.i, %for.body185.i ]
+ %mul187.i = mul i32 %mul187306.i, 10
+ %inc189.i = add nsw i32 %j.3305.i, 1
+ %exitcond.i = icmp eq i32 %inc189.i, 9
+ br i1 %exitcond.i, label %for.cond182.for.end190_crit_edge.i, label %for.body185.i
+
+for.cond182.for.end190_crit_edge.i: ; preds = %for.body185.i
+ store i32 %mul187.i, i32* %arrayidx186.i, align 4, !tbaa !3
+ br label %for.end190.i
+
+for.end190.i: ; preds = %for.cond182.for.end190_crit_edge.i, %for.cond182.preheader.i
+ %inc191.i = add nsw i32 %k.0316.i, 1
+ br label %if.end192.i
+
+if.end192.i: ; preds = %for.end190.i, %if.end179.i
+ %k.3.i = phi i32 [ %inc191.i, %for.end190.i ], [ %k.0316.i, %if.end179.i ]
+ %conv193.i108 = trunc i64 %lrp.5.i to i32
+ %cmp194.i109 = icmp slt i32 %lnz.0311.i, 9
+ br i1 %cmp194.i109, label %land.lhs.true196.i, label %if.end243.i111
+
+land.lhs.true196.i: ; preds = %if.end192.i
+ %cmp197.i = icmp sle i32 %lnz.0311.i, %conv193.i108
+ %cmp200.i = icmp slt i32 %conv193.i108, 18
+ %or.cond1.i = and i1 %cmp197.i, %cmp200.i
+ br i1 %or.cond1.i, label %if.then202.i, label %if.end243.i111
+
+if.then202.i: ; preds = %land.lhs.true196.i
+ %cmp203.i110 = icmp eq i32 %conv193.i108, 9
+ br i1 %cmp203.i110, label %if.then205.i, label %if.end210.i
+
+if.then205.i: ; preds = %if.then202.i
+ %conv206.i = sitofp i32 %sign.0 to double
+ %78 = load i32* %arrayidx.i, align 4, !tbaa !3
+ %conv208.i = uitofp i32 %78 to double
+ %mul209.i = fmul double %conv206.i, %conv208.i
+ br label %return
+
+if.end210.i: ; preds = %if.then202.i
+ %cmp211.i = icmp slt i32 %conv193.i108, 9
+ br i1 %cmp211.i, label %if.then213.i, label %if.end222.i
+
+if.then213.i: ; preds = %if.end210.i
+ %conv214.i = sitofp i32 %sign.0 to double
+ %79 = load i32* %arrayidx.i, align 4, !tbaa !3
+ %conv216.i = uitofp i32 %79 to double
+ %mul217.i = fmul double %conv214.i, %conv216.i
+ %sub218.i = sub nsw i32 8, %conv193.i108
+ %arrayidx219.i = getelementptr inbounds [8 x i32]* @decfloat.p10s, i32 0, i32 %sub218.i
+ %80 = load i32* %arrayidx219.i, align 4, !tbaa !3
+ %conv220.i = sitofp i32 %80 to double
+ %div221.i = fdiv double %mul217.i, %conv220.i
+ br label %return
+
+if.end222.i: ; preds = %if.end210.i
+ %81 = mul i32 %conv193.i108, -3
+ %mul224.neg.i = add i32 %bits.0.ph, 27
+ %sub225.i = add i32 %mul224.neg.i, %81
+ %cmp226.i = icmp sgt i32 %sub225.i, 30
+ %.pre.i = load i32* %arrayidx.i, align 4, !tbaa !3
+ br i1 %cmp226.i, label %if.then233.i, label %lor.lhs.false228.i
+
+lor.lhs.false228.i: ; preds = %if.end222.i
+ %shr230.i = lshr i32 %.pre.i, %sub225.i
+ %cmp231.i = icmp eq i32 %shr230.i, 0
+ br i1 %cmp231.i, label %if.then233.i, label %if.end243.i111
+
+if.then233.i: ; preds = %lor.lhs.false228.i, %if.end222.i
+ %conv234.i = sitofp i32 %sign.0 to double
+ %conv236.i = uitofp i32 %.pre.i to double
+ %mul237.i = fmul double %conv234.i, %conv236.i
+ %sub238.i = add nsw i32 %conv193.i108, -10
+ %arrayidx239.i = getelementptr inbounds [8 x i32]* @decfloat.p10s, i32 0, i32 %sub238.i
+ %82 = load i32* %arrayidx239.i, align 4, !tbaa !3
+ %conv240.i = sitofp i32 %82 to double
+ %mul241.i = fmul double %mul237.i, %conv240.i
+ br label %return
+
+if.end243.i111: ; preds = %lor.lhs.false228.i, %land.lhs.true196.i, %if.end192.i
+ %rem.i = srem i32 %conv193.i108, 9
+ %tobool244.i = icmp eq i32 %rem.i, 0
+ br i1 %tobool244.i, label %while.cond.outer.i, label %if.then245.i
+
+if.then245.i: ; preds = %if.end243.i111
+ %cmp246.i = icmp sgt i32 %conv193.i108, -1
+ %add252.i = add nsw i32 %rem.i, 9
+ %cond254.i = select i1 %cmp246.i, i32 %rem.i, i32 %add252.i
+ %sub255.i = sub nsw i32 8, %cond254.i
+ %arrayidx256.i = getelementptr inbounds [8 x i32]* @decfloat.p10s, i32 0, i32 %sub255.i
+ %83 = load i32* %arrayidx256.i, align 4, !tbaa !3
+ %cmp258296.i = icmp eq i32 %k.3.i, 0
+ br i1 %cmp258296.i, label %if.end285.i, label %for.body260.lr.ph.i
+
+for.body260.lr.ph.i: ; preds = %if.then245.i
+ %div267.i = sdiv i32 1000000000, %83
+ br label %for.body260.i
+
+for.body260.i: ; preds = %for.inc278.i, %for.body260.lr.ph.i
+ %carry.0300.i = phi i32 [ 0, %for.body260.lr.ph.i ], [ %mul268.i, %for.inc278.i ]
+ %k.4299.i = phi i32 [ 0, %for.body260.lr.ph.i ], [ %add275.i, %for.inc278.i ]
+ %a.0298.i = phi i32 [ 0, %for.body260.lr.ph.i ], [ %a.1.i, %for.inc278.i ]
+ %rp.0297.i = phi i32 [ %conv193.i108, %for.body260.lr.ph.i ], [ %rp.1.i113, %for.inc278.i ]
+ %arrayidx261.i = getelementptr inbounds [128 x i32]* %x.i, i32 0, i32 %k.4299.i
+ %84 = load i32* %arrayidx261.i, align 4, !tbaa !3
+ %rem262.i = urem i32 %84, %83
+ %div264.i = udiv i32 %84, %83
+ %add265.i = add i32 %div264.i, %carry.0300.i
+ store i32 %add265.i, i32* %arrayidx261.i, align 4, !tbaa !3
+ %mul268.i = mul i32 %rem262.i, %div267.i
+ %cmp269.i = icmp eq i32 %k.4299.i, %a.0298.i
+ %tobool273.i = icmp eq i32 %add265.i, 0
+ %or.cond223.i = and i1 %cmp269.i, %tobool273.i
+ %add275.i = add nsw i32 %k.4299.i, 1
+ br i1 %or.cond223.i, label %if.then274.i, label %for.inc278.i
+
+if.then274.i: ; preds = %for.body260.i
+ %and.i112 = and i32 %add275.i, 127
+ %sub276.i = add nsw i32 %rp.0297.i, -9
+ br label %for.inc278.i
+
+for.inc278.i: ; preds = %if.then274.i, %for.body260.i
+ %rp.1.i113 = phi i32 [ %sub276.i, %if.then274.i ], [ %rp.0297.i, %for.body260.i ]
+ %a.1.i = phi i32 [ %and.i112, %if.then274.i ], [ %a.0298.i, %for.body260.i ]
+ %cmp258.i = icmp eq i32 %add275.i, %k.3.i
+ br i1 %cmp258.i, label %for.end280.i, label %for.body260.i
+
+for.end280.i: ; preds = %for.inc278.i
+ %tobool281.i = icmp eq i32 %mul268.i, 0
+ br i1 %tobool281.i, label %if.end285.i, label %if.then282.i
+
+if.then282.i: ; preds = %for.end280.i
+ %inc283.i = add nsw i32 %k.3.i, 1
+ %arrayidx284.i = getelementptr inbounds [128 x i32]* %x.i, i32 0, i32 %k.3.i
+ store i32 %mul268.i, i32* %arrayidx284.i, align 4, !tbaa !3
+ br label %if.end285.i
+
+if.end285.i: ; preds = %if.then282.i, %for.end280.i, %if.then245.i
+ %rp.0.lcssa377.i = phi i32 [ %rp.1.i113, %if.then282.i ], [ %rp.1.i113, %for.end280.i ], [ %conv193.i108, %if.then245.i ]
+ %a.0.lcssa376.i = phi i32 [ %a.1.i, %if.then282.i ], [ %a.1.i, %for.end280.i ], [ 0, %if.then245.i ]
+ %z.0.i = phi i32 [ %inc283.i, %if.then282.i ], [ %k.3.i, %for.end280.i ], [ 0, %if.then245.i ]
+ %sub286.i = sub i32 9, %cond254.i
+ %add287.i = add nsw i32 %sub286.i, %rp.0.lcssa377.i
+ br label %while.cond.outer.i
+
+while.cond.outer.i: ; preds = %if.end357.i, %if.end285.i, %if.end243.i111
+ %rp.2.ph247.i = phi i32 [ %add344.i, %if.end357.i ], [ %add287.i, %if.end285.i ], [ %conv193.i108, %if.end243.i111 ]
+ %e2.0.ph.i = phi i32 [ %sub300.lcssa.i, %if.end357.i ], [ 0, %if.end285.i ], [ 0, %if.end243.i111 ]
+ %z.1.ph248.i = phi i32 [ %z.4.i, %if.end357.i ], [ %z.0.i, %if.end285.i ], [ %k.3.i, %if.end243.i111 ]
+ %a.2.ph249.i = phi i32 [ %and346.i, %if.end357.i ], [ %a.0.lcssa376.i, %if.end285.i ], [ 0, %if.end243.i111 ]
+ %cmp289.i = icmp slt i32 %rp.2.ph247.i, 18
+ %arrayidx294.i = getelementptr inbounds [128 x i32]* %x.i, i32 0, i32 %a.2.ph249.i
+ br i1 %cmp289.i, label %while.body.us.i, label %while.cond.outer.while.cond.outer.split_crit_edge.i
+
+while.cond.outer.while.cond.outer.split_crit_edge.i: ; preds = %while.cond.outer.i
+ %cmp292.i = icmp eq i32 %rp.2.ph247.i, 18
+ br i1 %cmp292.i, label %land.rhs.us256.i, label %for.cond360.outer.i
+
+while.body.us.i: ; preds = %for.end341.us.i, %while.cond.outer.i
+ %e2.0.us.i = phi i32 [ %sub300.us.i, %for.end341.us.i ], [ %e2.0.ph.i, %while.cond.outer.i ]
+ %z.1.us.i = phi i32 [ %z.3.us.i, %for.end341.us.i ], [ %z.1.ph248.i, %while.cond.outer.i ]
+ %sub301.us.i = add nsw i32 %z.1.us.i, 127
+ br label %for.cond303.us.i
+
+for.cond303.us.i: ; preds = %if.end333.us.i, %while.body.us.i
+ %z.2.us.i = phi i32 [ %z.1.us.i, %while.body.us.i ], [ %z.3.us.i, %if.end333.us.i ]
+ %k.5.in.us.i = phi i32 [ %sub301.us.i, %while.body.us.i ], [ %sub339.us.i, %if.end333.us.i ]
+ %carry299.0.us.i = phi i32 [ 0, %while.body.us.i ], [ %carry299.1.us.i, %if.end333.us.i ]
+ %k.5.us.i = and i32 %k.5.in.us.i, 127
+ %arrayidx306.us.i = getelementptr inbounds [128 x i32]* %x.i, i32 0, i32 %k.5.us.i
+ %85 = load i32* %arrayidx306.us.i, align 4, !tbaa !3
+ %conv307.us.i = zext i32 %85 to i64
+ %shl.us.i = shl nuw nsw i64 %conv307.us.i, 29
+ %conv308.us.i = zext i32 %carry299.0.us.i to i64
+ %add309.us.i = add i64 %shl.us.i, %conv308.us.i
+ %cmp310.us.i = icmp ugt i64 %add309.us.i, 1000000000
+ %extract.t231.us.i = trunc i64 %add309.us.i to i32
+ br i1 %cmp310.us.i, label %if.then312.us.i, label %if.end321.us.i
+
+if.then312.us.i: ; preds = %for.cond303.us.i
+ %div313.us.i = udiv i64 %add309.us.i, 1000000000
+ %conv314.us.i = trunc i64 %div313.us.i to i32
+ %rem315.us.i = urem i64 %add309.us.i, 1000000000
+ %extract.t.us.i = trunc i64 %rem315.us.i to i32
+ br label %if.end321.us.i
+
+if.end321.us.i: ; preds = %if.then312.us.i, %for.cond303.us.i
+ %rem315.sink.off0.us.i = phi i32 [ %extract.t.us.i, %if.then312.us.i ], [ %extract.t231.us.i, %for.cond303.us.i ]
+ %carry299.1.us.i = phi i32 [ %conv314.us.i, %if.then312.us.i ], [ 0, %for.cond303.us.i ]
+ store i32 %rem315.sink.off0.us.i, i32* %arrayidx306.us.i, align 4, !tbaa !3
+ %sub322.us.i = add nsw i32 %z.2.us.i, 127
+ %and323.us.i = and i32 %sub322.us.i, 127
+ %cmp324.us.i = icmp ne i32 %k.5.us.i, %and323.us.i
+ %cmp327.us.i = icmp eq i32 %k.5.us.i, %a.2.ph249.i
+ %or.cond224.us.i = or i1 %cmp324.us.i, %cmp327.us.i
+ br i1 %or.cond224.us.i, label %if.end333.us.i, label %land.lhs.true329.us.i
+
+land.lhs.true329.us.i: ; preds = %if.end321.us.i
+ %tobool331.us.i = icmp eq i32 %rem315.sink.off0.us.i, 0
+ %k.5.z.2.us.i = select i1 %tobool331.us.i, i32 %k.5.us.i, i32 %z.2.us.i
+ br label %if.end333.us.i
+
+if.end333.us.i: ; preds = %land.lhs.true329.us.i, %if.end321.us.i
+ %z.3.us.i = phi i32 [ %z.2.us.i, %if.end321.us.i ], [ %k.5.z.2.us.i, %land.lhs.true329.us.i ]
+ %sub339.us.i = add nsw i32 %k.5.us.i, -1
+ br i1 %cmp327.us.i, label %for.end341.us.i, label %for.cond303.us.i
+
+for.end341.us.i: ; preds = %if.end333.us.i
+ %sub300.us.i = add nsw i32 %e2.0.us.i, -29
+ %tobool342.us.i = icmp eq i32 %carry299.1.us.i, 0
+ br i1 %tobool342.us.i, label %while.body.us.i, label %if.then343.i
+
+land.rhs.us256.i: ; preds = %for.end341.us292.i, %while.cond.outer.while.cond.outer.split_crit_edge.i
+ %e2.0.us253.i = phi i32 [ %e2.0.ph.i, %while.cond.outer.while.cond.outer.split_crit_edge.i ], [ %sub300.us259.i, %for.end341.us292.i ]
+ %z.1.us254.i = phi i32 [ %z.1.ph248.i, %while.cond.outer.while.cond.outer.split_crit_edge.i ], [ %z.3.us290.i, %for.end341.us292.i ]
+ %86 = load i32* %arrayidx294.i, align 4, !tbaa !3
+ %cmp295.us257.i = icmp ult i32 %86, 9007199
+ br i1 %cmp295.us257.i, label %while.body.us258.i, label %for.cond360.outer.i
+
+while.body.us258.i: ; preds = %land.rhs.us256.i
+ %sub301.us260.i = add nsw i32 %z.1.us254.i, 127
+ br label %for.cond303.us261.i
+
+for.cond303.us261.i: ; preds = %if.end333.us289.i, %while.body.us258.i
+ %z.2.us262.i = phi i32 [ %z.1.us254.i, %while.body.us258.i ], [ %z.3.us290.i, %if.end333.us289.i ]
+ %k.5.in.us263.i = phi i32 [ %sub301.us260.i, %while.body.us258.i ], [ %sub339.us291.i, %if.end333.us289.i ]
+ %carry299.0.us264.i = phi i32 [ 0, %while.body.us258.i ], [ %carry299.1.us280.i, %if.end333.us289.i ]
+ %k.5.us265.i = and i32 %k.5.in.us263.i, 127
+ %arrayidx306.us266.i = getelementptr inbounds [128 x i32]* %x.i, i32 0, i32 %k.5.us265.i
+ %87 = load i32* %arrayidx306.us266.i, align 4, !tbaa !3
+ %conv307.us267.i = zext i32 %87 to i64
+ %shl.us268.i = shl nuw nsw i64 %conv307.us267.i, 29
+ %conv308.us269.i = zext i32 %carry299.0.us264.i to i64
+ %add309.us270.i = add i64 %shl.us268.i, %conv308.us269.i
+ %cmp310.us271.i = icmp ugt i64 %add309.us270.i, 1000000000
+ %extract.t231.us272.i = trunc i64 %add309.us270.i to i32
+ br i1 %cmp310.us271.i, label %if.then312.us273.i, label %if.end321.us278.i
+
+if.then312.us273.i: ; preds = %for.cond303.us261.i
+ %div313.us274.i = udiv i64 %add309.us270.i, 1000000000
+ %conv314.us275.i = trunc i64 %div313.us274.i to i32
+ %rem315.us276.i = urem i64 %add309.us270.i, 1000000000
+ %extract.t.us277.i = trunc i64 %rem315.us276.i to i32
+ br label %if.end321.us278.i
+
+if.end321.us278.i: ; preds = %if.then312.us273.i, %for.cond303.us261.i
+ %rem315.sink.off0.us279.i = phi i32 [ %extract.t.us277.i, %if.then312.us273.i ], [ %extract.t231.us272.i, %for.cond303.us261.i ]
+ %carry299.1.us280.i = phi i32 [ %conv314.us275.i, %if.then312.us273.i ], [ 0, %for.cond303.us261.i ]
+ store i32 %rem315.sink.off0.us279.i, i32* %arrayidx306.us266.i, align 4, !tbaa !3
+ %sub322.us281.i = add nsw i32 %z.2.us262.i, 127
+ %and323.us282.i = and i32 %sub322.us281.i, 127
+ %cmp324.us283.i = icmp ne i32 %k.5.us265.i, %and323.us282.i
+ %cmp327.us284.i = icmp eq i32 %k.5.us265.i, %a.2.ph249.i
+ %or.cond224.us285.i = or i1 %cmp324.us283.i, %cmp327.us284.i
+ br i1 %or.cond224.us285.i, label %if.end333.us289.i, label %land.lhs.true329.us286.i
+
+land.lhs.true329.us286.i: ; preds = %if.end321.us278.i
+ %tobool331.us287.i = icmp eq i32 %rem315.sink.off0.us279.i, 0
+ %k.5.z.2.us288.i = select i1 %tobool331.us287.i, i32 %k.5.us265.i, i32 %z.2.us262.i
+ br label %if.end333.us289.i
+
+if.end333.us289.i: ; preds = %land.lhs.true329.us286.i, %if.end321.us278.i
+ %z.3.us290.i = phi i32 [ %z.2.us262.i, %if.end321.us278.i ], [ %k.5.z.2.us288.i, %land.lhs.true329.us286.i ]
+ %sub339.us291.i = add nsw i32 %k.5.us265.i, -1
+ br i1 %cmp327.us284.i, label %for.end341.us292.i, label %for.cond303.us261.i
+
+for.end341.us292.i: ; preds = %if.end333.us289.i
+ %sub300.us259.i = add nsw i32 %e2.0.us253.i, -29
+ %tobool342.us295.i = icmp eq i32 %carry299.1.us280.i, 0
+ br i1 %tobool342.us295.i, label %land.rhs.us256.i, label %if.then343.i
+
+if.then343.i: ; preds = %for.end341.us292.i, %for.end341.us.i
+ %carry299.1.lcssa.lcssa.i = phi i32 [ %carry299.1.us280.i, %for.end341.us292.i ], [ %carry299.1.us.i, %for.end341.us.i ]
+ %z.3.lcssa.lcssa.i = phi i32 [ %z.3.us290.i, %for.end341.us292.i ], [ %z.3.us.i, %for.end341.us.i ]
+ %sub300.lcssa.i = phi i32 [ %sub300.us259.i, %for.end341.us292.i ], [ %sub300.us.i, %for.end341.us.i ]
+ %add344.i = add nsw i32 %rp.2.ph247.i, 9
+ %sub345.i = add nsw i32 %a.2.ph249.i, 127
+ %and346.i = and i32 %sub345.i, 127
+ %cmp347.i = icmp eq i32 %and346.i, %z.3.lcssa.lcssa.i
+ br i1 %cmp347.i, label %if.then349.i, label %if.end357.i
+
+if.then349.i: ; preds = %if.then343.i
+ %sub350.i = add nsw i32 %z.3.lcssa.lcssa.i, 127
+ %and351.i = and i32 %sub350.i, 127
+ %arrayidx352.i = getelementptr inbounds [128 x i32]* %x.i, i32 0, i32 %and351.i
+ %88 = load i32* %arrayidx352.i, align 4, !tbaa !3
+ %sub353.i = add nsw i32 %z.3.lcssa.lcssa.i, 126
+ %and354.i = and i32 %sub353.i, 127
+ %arrayidx355.i = getelementptr inbounds [128 x i32]* %x.i, i32 0, i32 %and354.i
+ %89 = load i32* %arrayidx355.i, align 4, !tbaa !3
+ %or356.i = or i32 %89, %88
+ store i32 %or356.i, i32* %arrayidx355.i, align 4, !tbaa !3
+ br label %if.end357.i
+
+if.end357.i: ; preds = %if.then349.i, %if.then343.i
+ %z.4.i = phi i32 [ %and351.i, %if.then349.i ], [ %z.3.lcssa.lcssa.i, %if.then343.i ]
+ %arrayidx358.i = getelementptr inbounds [128 x i32]* %x.i, i32 0, i32 %and346.i
+ store i32 %carry299.1.lcssa.lcssa.i, i32* %arrayidx358.i, align 4, !tbaa !3
+ br label %while.cond.outer.i
+
+for.cond360.i: ; preds = %for.cond360.i.outer, %if.end396.i
+ %e2.1.i = phi i32 [ %add401.i, %if.end396.i ], [ %e2.1.i.ph, %for.cond360.i.outer ]
+ %a.3.i = phi i32 [ %z.5.ph.i, %if.end396.i ], [ %a.3.i.ph, %for.cond360.i.outer ]
+ br label %for.body367.i
+
+for.cond364.i: ; preds = %if.end378.i
+ %cmp365.i = icmp slt i32 %inc388.i, 2
+ br i1 %cmp365.i, label %for.body367.i, label %for.end389.i
+
+for.body367.i: ; preds = %for.cond364.i, %for.cond360.i
+ %i.0235.i = phi i32 [ 0, %for.cond360.i ], [ %inc388.i, %for.cond364.i ]
+ %add368.i = add nsw i32 %i.0235.i, %a.3.i
+ %and369.i = and i32 %add368.i, 127
+ %cmp370.i = icmp eq i32 %and369.i, %z.5.ph.i
+ br i1 %cmp370.i, label %for.end389.i, label %lor.lhs.false372.i
+
+lor.lhs.false372.i: ; preds = %for.body367.i
+ %arrayidx373.i = getelementptr inbounds [128 x i32]* %x.i, i32 0, i32 %and369.i
+ %90 = load i32* %arrayidx373.i, align 4, !tbaa !3
+ %arrayidx374.i = getelementptr inbounds [2 x i32]* @decfloat.th, i32 0, i32 %i.0235.i
+ %91 = load i32* %arrayidx374.i, align 4, !tbaa !3
+ %cmp375.i = icmp ult i32 %90, %91
+ br i1 %cmp375.i, label %for.end389.i, label %if.end378.i
+
+if.end378.i: ; preds = %lor.lhs.false372.i
+ %cmp383.i = icmp ugt i32 %90, %91
+ %inc388.i = add nsw i32 %i.0235.i, 1
+ br i1 %cmp383.i, label %for.end389.i, label %for.cond364.i
+
+for.end389.i: ; preds = %if.end378.i, %lor.lhs.false372.i, %for.body367.i, %for.cond364.i
+ %i.1.i = phi i32 [ %i.0235.i, %if.end378.i ], [ %inc388.i, %for.cond364.i ], [ 2, %lor.lhs.false372.i ], [ 2, %for.body367.i ]
+ %cmp390.i = icmp eq i32 %i.1.i, 2
+ %or.cond225.i = and i1 %cmp390.i, %cmp393.i
+ br i1 %or.cond225.i, label %for.cond451.preheader.i, label %if.end396.i
+
+for.cond451.preheader.i: ; preds = %for.end389.i
+ %and456.i = and i32 %a.3.i, 127
+ %cmp457.i = icmp eq i32 %and456.i, %z.5.ph.i
+ br i1 %cmp457.i, label %if.then459.i, label %if.end464.i
+
+if.end396.i: ; preds = %for.end389.i
+ %add401.i = add nsw i32 %..i, %e2.1.i
+ %cmp403236.i = icmp eq i32 %a.3.i, %z.5.ph.i
+ br i1 %cmp403236.i, label %for.cond360.i, label %for.body405.lr.ph.i
+
+for.body405.lr.ph.i: ; preds = %if.end396.i
+ %shl409.i = shl i32 1, %..i
+ %sub410.i = add nsw i32 %shl409.i, -1
+ %shr416.i = lshr i32 1000000000, %..i
+ br label %for.body405.i
+
+for.body405.i: ; preds = %for.body405.i, %for.body405.lr.ph.i
+ %carry362.0241.i = phi i32 [ 0, %for.body405.lr.ph.i ], [ %mul417.i, %for.body405.i ]
+ %k.6239.i = phi i32 [ %a.3.i, %for.body405.lr.ph.i ], [ %and425.i, %for.body405.i ]
+ %a.4238.i = phi i32 [ %a.3.i, %for.body405.lr.ph.i ], [ %a.5.i, %for.body405.i ]
+ %rp.4237.i = phi i32 [ %rp.3.i.ph, %for.body405.lr.ph.i ], [ %rp.5.i, %for.body405.i ]
+ %arrayidx408.i = getelementptr inbounds [128 x i32]* %x.i, i32 0, i32 %k.6239.i
+ %92 = load i32* %arrayidx408.i, align 4, !tbaa !3
+ %and411.i = and i32 %92, %sub410.i
+ %shr413.i = lshr i32 %92, %..i
+ %add414.i = add i32 %shr413.i, %carry362.0241.i
+ store i32 %add414.i, i32* %arrayidx408.i, align 4, !tbaa !3
+ %mul417.i = mul i32 %and411.i, %shr416.i
+ %cmp418.i = icmp eq i32 %k.6239.i, %a.4238.i
+ %tobool422.i = icmp eq i32 %add414.i, 0
+ %or.cond226.i = and i1 %cmp418.i, %tobool422.i
+ %add424.i = add nsw i32 %k.6239.i, 1
+ %and425.i = and i32 %add424.i, 127
+ %sub427.i = add nsw i32 %rp.4237.i, -9
+ %rp.5.i = select i1 %or.cond226.i, i32 %sub427.i, i32 %rp.4237.i
+ %a.5.i = select i1 %or.cond226.i, i32 %and425.i, i32 %a.4238.i
+ %cmp403.i = icmp eq i32 %and425.i, %z.5.ph.i
+ br i1 %cmp403.i, label %for.end432.i, label %for.body405.i
+
+for.end432.i: ; preds = %for.body405.i
+ %tobool433.i = icmp eq i32 %mul417.i, 0
+ br i1 %tobool433.i, label %for.cond360.i.outer, label %if.then434.i
+
+if.then434.i: ; preds = %for.end432.i
+ %cmp437.i = icmp eq i32 %and436.i, %a.5.i
+ br i1 %cmp437.i, label %if.else443.i, label %if.then439.i
+
+if.then439.i: ; preds = %if.then434.i
+ %arrayidx440.i = getelementptr inbounds [128 x i32]* %x.i, i32 0, i32 %z.5.ph.i
+ store i32 %mul417.i, i32* %arrayidx440.i, align 4, !tbaa !3
+ br label %for.cond360.outer.i
+
+for.cond360.outer.i: ; preds = %if.then439.i, %land.rhs.us256.i, %while.cond.outer.while.cond.outer.split_crit_edge.i
+ %rp.3.ph244.i = phi i32 [ %rp.5.i, %if.then439.i ], [ 18, %land.rhs.us256.i ], [ %rp.2.ph247.i, %while.cond.outer.while.cond.outer.split_crit_edge.i ]
+ %e2.1.ph.i = phi i32 [ %add401.i, %if.then439.i ], [ %e2.0.us253.i, %land.rhs.us256.i ], [ %e2.0.ph.i, %while.cond.outer.while.cond.outer.split_crit_edge.i ]
+ %z.5.ph.i = phi i32 [ %and436.i, %if.then439.i ], [ %z.1.us254.i, %land.rhs.us256.i ], [ %z.1.ph248.i, %while.cond.outer.while.cond.outer.split_crit_edge.i ]
+ %a.3.ph.i = phi i32 [ %a.5.i, %if.then439.i ], [ %a.2.ph249.i, %land.rhs.us256.i ], [ %a.2.ph249.i, %while.cond.outer.while.cond.outer.split_crit_edge.i ]
+ %add435.i = add nsw i32 %z.5.ph.i, 1
+ %and436.i = and i32 %add435.i, 127
+ %sub444.i = add nsw i32 %z.5.ph.i, 127
+ %and445.i = and i32 %sub444.i, 127
+ %arrayidx446.i = getelementptr inbounds [128 x i32]* %x.i, i32 0, i32 %and445.i
+ br label %for.cond360.i.outer
+
+for.cond360.i.outer: ; preds = %if.else443.i, %for.cond360.outer.i, %for.end432.i
+ %rp.3.i.ph = phi i32 [ %rp.3.ph244.i, %for.cond360.outer.i ], [ %rp.5.i, %if.else443.i ], [ %rp.5.i, %for.end432.i ]
+ %e2.1.i.ph = phi i32 [ %e2.1.ph.i, %for.cond360.outer.i ], [ %add401.i, %if.else443.i ], [ %add401.i, %for.end432.i ]
+ %a.3.i.ph = phi i32 [ %a.3.ph.i, %for.cond360.outer.i ], [ %a.5.i, %if.else443.i ], [ %a.5.i, %for.end432.i ]
+ %cmp393.i = icmp eq i32 %rp.3.i.ph, 18
+ %cmp397.i = icmp sgt i32 %rp.3.i.ph, 27
+ %..i = select i1 %cmp397.i, i32 9, i32 1
+ br label %for.cond360.i
+
+if.else443.i: ; preds = %if.then434.i
+ %93 = load i32* %arrayidx446.i, align 4, !tbaa !3
+ %or447.i = or i32 %93, 1
+ store i32 %or447.i, i32* %arrayidx446.i, align 4, !tbaa !3
+ br label %for.cond360.i.outer
+
+if.then459.i: ; preds = %for.cond451.preheader.i
+ %sub462.i = add nsw i32 %and436.i, -1
+ %arrayidx463.i = getelementptr inbounds [128 x i32]* %x.i, i32 0, i32 %sub462.i
+ store i32 0, i32* %arrayidx463.i, align 4, !tbaa !3
+ br label %if.end464.i
+
+if.end464.i: ; preds = %if.then459.i, %for.cond451.preheader.i
+ %z.7.i = phi i32 [ %and436.i, %if.then459.i ], [ %z.5.ph.i, %for.cond451.preheader.i ]
+ %arrayidx468.i = getelementptr inbounds [128 x i32]* %x.i, i32 0, i32 %and456.i
+ %94 = load i32* %arrayidx468.i, align 4, !tbaa !3
+ %conv469.i = uitofp i32 %94 to double
+ %add455.1.i = add nsw i32 %a.3.i, 1
+ %and456.1.i = and i32 %add455.1.i, 127
+ %cmp457.1.i = icmp eq i32 %and456.1.i, %z.7.i
+ br i1 %cmp457.1.i, label %if.then459.1.i, label %if.end464.1.i
+
+if.then480.i: ; preds = %if.end464.1.i
+ %cmp483.i = icmp slt i32 %sub477.i, 0
+ %.sub482.i = select i1 %cmp483.i, i32 0, i32 %sub477.i
+ br label %if.end487.i
+
+if.end487.i: ; preds = %if.end464.1.i, %if.then480.i
+ %denormal.0.i = phi i32 [ 1, %if.then480.i ], [ 0, %if.end464.1.i ]
+ %bits.addr.0.i114 = phi i32 [ %.sub482.i, %if.then480.i ], [ %bits.0.ph, %if.end464.1.i ]
+ %cmp488.i = icmp slt i32 %bits.addr.0.i114, 53
+ br i1 %cmp488.i, label %if.then490.i, label %if.end500.i
+
+if.then490.i: ; preds = %if.end487.i
+ %sub492.i = sub i32 105, %bits.addr.0.i114
+ %call493.i = call double @scalbn(double 1.000000e+00, i32 %sub492.i) #1
+ %call494.i = call double @copysignl(double %call493.i, double %mul475.i) #7
+ %sub495.i = sub nsw i32 53, %bits.addr.0.i114
+ %call496.i = call double @scalbn(double 1.000000e+00, i32 %sub495.i) #1
+ %call497.i = call double @fmodl(double %mul475.i, double %call496.i) #1
+ %sub498.i = fsub double %mul475.i, %call497.i
+ %add499.i = fadd double %call494.i, %sub498.i
+ br label %if.end500.i
+
+if.end500.i: ; preds = %if.then490.i, %if.end487.i
+ %y.1.i115 = phi double [ %add499.i, %if.then490.i ], [ %mul475.i, %if.end487.i ]
+ %frac.0.i = phi double [ %call497.i, %if.then490.i ], [ 0.000000e+00, %if.end487.i ]
+ %bias.0.i = phi double [ %call494.i, %if.then490.i ], [ 0.000000e+00, %if.end487.i ]
+ %add501.i = add nsw i32 %a.3.i, 2
+ %and502.i = and i32 %add501.i, 127
+ %cmp503.i = icmp eq i32 %and502.i, %z.7.1.i
+ br i1 %cmp503.i, label %if.end561.i, label %if.then505.i
+
+if.then505.i: ; preds = %if.end500.i
+ %arrayidx509.i = getelementptr inbounds [128 x i32]* %x.i, i32 0, i32 %and502.i
+ %95 = load i32* %arrayidx509.i, align 4, !tbaa !3
+ %cmp510.i = icmp ult i32 %95, 500000000
+ br i1 %cmp510.i, label %land.lhs.true512.i, label %if.else524.i
+
+land.lhs.true512.i: ; preds = %if.then505.i
+ %tobool513.i = icmp eq i32 %95, 0
+ br i1 %tobool513.i, label %lor.lhs.false514.i, label %if.then520.i
+
+lor.lhs.false514.i: ; preds = %land.lhs.true512.i
+ %add516.i = add nsw i32 %a.3.i, 3
+ %and517.i = and i32 %add516.i, 127
+ %cmp518.i = icmp eq i32 %and517.i, %z.7.1.i
+ br i1 %cmp518.i, label %if.end551.i, label %if.then520.i
+
+if.then520.i: ; preds = %lor.lhs.false514.i, %land.lhs.true512.i
+ %mul522.i = fmul double %conv474.i, 2.500000e-01
+ %add523.i = fadd double %mul522.i, %frac.0.i
+ br label %if.end551.i
+
+if.else524.i: ; preds = %if.then505.i
+ %cmp525.i = icmp ugt i32 %95, 500000000
+ br i1 %cmp525.i, label %if.then527.i, label %if.then534.i
+
+if.then527.i: ; preds = %if.else524.i
+ %mul529.i = fmul double %conv474.i, 7.500000e-01
+ %add530.i = fadd double %mul529.i, %frac.0.i
+ br label %if.end551.i
+
+if.then534.i: ; preds = %if.else524.i
+ %add536.i = add nsw i32 %a.3.i, 3
+ %and537.i = and i32 %add536.i, 127
+ %cmp538.i = icmp eq i32 %and537.i, %z.7.1.i
+ br i1 %cmp538.i, label %if.then540.i, label %if.else544.i
+
+if.then540.i: ; preds = %if.then534.i
+ %mul542.i = fmul double %conv474.i, 5.000000e-01
+ %add543.i = fadd double %mul542.i, %frac.0.i
+ br label %if.end551.i
+
+if.else544.i: ; preds = %if.then534.i
+ %mul546.i = fmul double %conv474.i, 7.500000e-01
+ %add547.i = fadd double %mul546.i, %frac.0.i
+ br label %if.end551.i
+
+if.end551.i: ; preds = %if.else544.i, %if.then540.i, %if.then527.i, %if.then520.i, %lor.lhs.false514.i
+ %frac.1.i = phi double [ %add523.i, %if.then520.i ], [ %add530.i, %if.then527.i ], [ %add543.i, %if.then540.i ], [ %add547.i, %if.else544.i ], [ %frac.0.i, %lor.lhs.false514.i ]
+ %sub552.i = sub nsw i32 53, %bits.addr.0.i114
+ %cmp553.i = icmp sgt i32 %sub552.i, 1
+ br i1 %cmp553.i, label %land.lhs.true555.i, label %if.end561.i
+
+land.lhs.true555.i: ; preds = %if.end551.i
+ %call556.i = call double @fmodl(double %frac.1.i, double 1.000000e+00) #1
+ %tobool557.i = fcmp une double %call556.i, 0.000000e+00
+ br i1 %tobool557.i, label %if.end561.i, label %if.then558.i
+
+if.then558.i: ; preds = %land.lhs.true555.i
+ %inc559.i = fadd double %frac.1.i, 1.000000e+00
+ br label %if.end561.i
+
+if.end561.i: ; preds = %if.then558.i, %land.lhs.true555.i, %if.end551.i, %if.end500.i
+ %frac.2.i = phi double [ %frac.1.i, %land.lhs.true555.i ], [ %inc559.i, %if.then558.i ], [ %frac.1.i, %if.end551.i ], [ %frac.0.i, %if.end500.i ]
+ %add562.i = fadd double %y.1.i115, %frac.2.i
+ %sub563.i = fsub double %add562.i, %bias.0.i
+ %and565.i = and i32 %add476.i, 2147483647
+ %sub566.i = sub i32 -2, %sum.i
+ %cmp567.i = icmp sgt i32 %and565.i, %sub566.i
+ br i1 %cmp567.i, label %if.then569.i, label %if.end595.i
+
+if.then569.i: ; preds = %if.end561.i
+ %call570.i = call double @fabs(double %sub563.i) #7
+ %cmp571.i = fcmp ult double %call570.i, 0x4340000000000000
+ br i1 %cmp571.i, label %if.end584.i, label %if.then573.i
+
+if.then573.i: ; preds = %if.then569.i
+ %tobool574.i = icmp ne i32 %denormal.0.i, 0
+ %cmp578.i = icmp eq i32 %bits.addr.0.i114, %sub477.i
+ %or.cond227.i = and i1 %tobool574.i, %cmp578.i
+ %denormal.1.i = select i1 %or.cond227.i, i32 0, i32 %denormal.0.i
+ %mul582.i = fmul double %sub563.i, 5.000000e-01
+ %inc583.i = add nsw i32 %e2.1.i, 1
+ br label %if.end584.i
+
+if.end584.i: ; preds = %if.then573.i, %if.then569.i
+ %e2.2.i = phi i32 [ %inc583.i, %if.then573.i ], [ %e2.1.i, %if.then569.i ]
+ %denormal.2.i = phi i32 [ %denormal.1.i, %if.then573.i ], [ %denormal.0.i, %if.then569.i ]
+ %y.2.i116 = phi double [ %mul582.i, %if.then573.i ], [ %sub563.i, %if.then569.i ]
+ %96 = add nsw i32 %e2.2.i, 50
+ %cmp586.i = icmp sgt i32 %96, %sub1.i
+ br i1 %cmp586.i, label %if.then592.i, label %lor.lhs.false588.i
+
+lor.lhs.false588.i: ; preds = %if.end584.i
+ %tobool589.i = icmp ne i32 %denormal.2.i, 0
+ %tobool591.i = fcmp une double %frac.2.i, 0.000000e+00
+ %or.cond228.i = and i1 %tobool589.i, %tobool591.i
+ br i1 %or.cond228.i, label %if.then592.i, label %if.end595.i
+
+if.then592.i: ; preds = %lor.lhs.false588.i, %if.end584.i
+ %call593.i = call i32* @__errno_location() #7
+ store i32 34, i32* %call593.i, align 4, !tbaa !3
+ br label %if.end595.i
+
+if.end595.i: ; preds = %if.then592.i, %lor.lhs.false588.i, %if.end561.i
+ %e2.3.i = phi i32 [ %e2.2.i, %if.then592.i ], [ %e2.2.i, %lor.lhs.false588.i ], [ %e2.1.i, %if.end561.i ]
+ %y.3.i = phi double [ %y.2.i116, %if.then592.i ], [ %y.2.i116, %lor.lhs.false588.i ], [ %sub563.i, %if.end561.i ]
+ %call596.i = call double @scalbnl(double %y.3.i, i32 %e2.3.i) #1
+ br label %return
+
+if.then459.1.i: ; preds = %if.end464.i
+ %add460.1.i = add nsw i32 %z.7.i, 1
+ %and461.1.i = and i32 %add460.1.i, 127
+ %sub462.1.i = add nsw i32 %and461.1.i, -1
+ %arrayidx463.1.i = getelementptr inbounds [128 x i32]* %x.i, i32 0, i32 %sub462.1.i
+ store i32 0, i32* %arrayidx463.1.i, align 4, !tbaa !3
+ br label %if.end464.1.i
+
+if.end464.1.i: ; preds = %if.then459.1.i, %if.end464.i
+ %z.7.1.i = phi i32 [ %and461.1.i, %if.then459.1.i ], [ %z.7.i, %if.end464.i ]
+ %mul465.1.i = fmul double %conv469.i, 1.000000e+09
+ %arrayidx468.1.i = getelementptr inbounds [128 x i32]* %x.i, i32 0, i32 %and456.1.i
+ %97 = load i32* %arrayidx468.1.i, align 4, !tbaa !3
+ %conv469.1.i = uitofp i32 %97 to double
+ %add470.1.i = fadd double %mul465.1.i, %conv469.1.i
+ %conv474.i = sitofp i32 %sign.0 to double
+ %mul475.i = fmul double %conv474.i, %add470.1.i
+ %add476.i = add nsw i32 %e2.1.i, 53
+ %sub477.i = sub nsw i32 %add476.i, %emin.0.ph
+ %cmp478.i = icmp slt i32 %sub477.i, %bits.0.ph
+ br i1 %cmp478.i, label %if.then480.i, label %if.end487.i
+
+return: ; preds = %if.end595.i, %if.then233.i, %if.then213.i, %if.then205.i, %if.then174.i, %if.then164.i, %if.then154.i106, %if.then139.i, %if.then134.i, %if.else116.i, %if.end264.i, %if.then196.i, %if.then186.i, %if.then178.i, %if.else162.i, %if.end134.i, %cond.end214, %while.cond191.backedge, %if.then188, %while.cond191.preheader, %if.end175, %cond.true141, %if.then138, %if.end83, %entry
+ %retval.0 = phi double [ %conv86, %if.end83 ], [ 0.000000e+00, %if.then188 ], [ 0.000000e+00, %cond.end214 ], [ 0.000000e+00, %entry ], [ 0x7FF8000000000000, %if.then138 ], [ 0x7FF8000000000000, %cond.true141 ], [ 0x7FF8000000000000, %if.end175 ], [ %mul190.i, %if.then186.i ], [ %mul200.i, %if.then196.i ], [ %call266.i, %if.end264.i ], [ %mul180.i, %if.then178.i ], [ 0.000000e+00, %if.else162.i ], [ %mul136.i, %if.end134.i ], [ %mul158.i, %if.then154.i106 ], [ %mul168.i, %if.then164.i ], [ %mul178.i, %if.then174.i ], [ %mul209.i, %if.then205.i ], [ %div221.i, %if.then213.i ], [ %mul241.i, %if.then233.i ], [ %call596.i, %if.end595.i ], [ %mul141.i, %if.then139.i ], [ 0.000000e+00, %if.then134.i ], [ 0.000000e+00, %if.else116.i ], [ 0x7FF8000000000000, %while.cond191.backedge ], [ 0x7FF8000000000000, %while.cond191.preheader ]
+ ret double %retval.0
+}
+
+declare i32 @isspace(i32) #5
+
+; Function Attrs: nounwind
+declare void @llvm.lifetime.start(i64, i8* nocapture) #1
+
+; Function Attrs: nounwind
+define internal fastcc i64 @scanexp(%struct._IO_FILE* %f, i32 %pok) #0 {
+entry:
+ %rpos = getelementptr inbounds %struct._IO_FILE* %f, i32 0, i32 1
+ %0 = load i8** %rpos, align 4, !tbaa !0
+ %shend = getelementptr inbounds %struct._IO_FILE* %f, i32 0, i32 27
+ %1 = load i8** %shend, align 4, !tbaa !0
+ %cmp = icmp ult i8* %0, %1
+ br i1 %cmp, label %cond.true, label %cond.false
+
+cond.true: ; preds = %entry
+ %incdec.ptr = getelementptr inbounds i8* %0, i32 1
+ store i8* %incdec.ptr, i8** %rpos, align 4, !tbaa !0
+ %2 = load i8* %0, align 1, !tbaa !1
+ %conv = zext i8 %2 to i32
+ br label %cond.end
+
+cond.false: ; preds = %entry
+ %call = tail call i32 @__shgetc(%struct._IO_FILE* %f) #1
+ br label %cond.end
+
+cond.end: ; preds = %cond.false, %cond.true
+ %cond = phi i32 [ %conv, %cond.true ], [ %call, %cond.false ]
+ %cmp4 = icmp eq i32 %cond, 45
+ switch i32 %cond, label %if.end30 [
+ i32 45, label %if.then
+ i32 43, label %if.then
+ ]
+
+if.then: ; preds = %cond.end, %cond.end
+ %conv7 = zext i1 %cmp4 to i32
+ %3 = load i8** %rpos, align 4, !tbaa !0
+ %4 = load i8** %shend, align 4, !tbaa !0
+ %cmp10 = icmp ult i8* %3, %4
+ br i1 %cmp10, label %cond.true12, label %cond.false16
+
+cond.true12: ; preds = %if.then
+ %incdec.ptr14 = getelementptr inbounds i8* %3, i32 1
+ store i8* %incdec.ptr14, i8** %rpos, align 4, !tbaa !0
+ %5 = load i8* %3, align 1, !tbaa !1
+ %conv15 = zext i8 %5 to i32
+ br label %cond.end18
+
+cond.false16: ; preds = %if.then
+ %call17 = tail call i32 @__shgetc(%struct._IO_FILE* %f) #1
+ br label %cond.end18
+
+cond.end18: ; preds = %cond.false16, %cond.true12
+ %cond19 = phi i32 [ %conv15, %cond.true12 ], [ %call17, %cond.false16 ]
+ %sub = add nsw i32 %cond19, -48
+ %cmp20 = icmp ult i32 %sub, 10
+ %tobool = icmp eq i32 %pok, 0
+ %or.cond = or i1 %cmp20, %tobool
+ br i1 %or.cond, label %if.end30, label %if.then22
+
+if.then22: ; preds = %cond.end18
+ %6 = load i8** %shend, align 4, !tbaa !0
+ %tobool24 = icmp eq i8* %6, null
+ br i1 %tobool24, label %if.end30, label %cond.true25
+
+cond.true25: ; preds = %if.then22
+ %7 = load i8** %rpos, align 4, !tbaa !0
+ %incdec.ptr27 = getelementptr inbounds i8* %7, i32 -1
+ store i8* %incdec.ptr27, i8** %rpos, align 4, !tbaa !0
+ br label %if.end30
+
+if.end30: ; preds = %cond.true25, %if.then22, %cond.end18, %cond.end
+ %c.0 = phi i32 [ %cond19, %cond.true25 ], [ %cond19, %if.then22 ], [ %cond19, %cond.end18 ], [ %cond, %cond.end ]
+ %neg.0 = phi i32 [ %conv7, %cond.true25 ], [ %conv7, %if.then22 ], [ %conv7, %cond.end18 ], [ 0, %cond.end ]
+ %sub31 = add nsw i32 %c.0, -48
+ %cmp32 = icmp ugt i32 %sub31, 9
+ br i1 %cmp32, label %if.then34, label %for.body
+
+if.then34: ; preds = %if.end30
+ %8 = load i8** %shend, align 4, !tbaa !0
+ %tobool36 = icmp eq i8* %8, null
+ br i1 %tobool36, label %return, label %cond.true37
+
+cond.true37: ; preds = %if.then34
+ %9 = load i8** %rpos, align 4, !tbaa !0
+ %incdec.ptr39 = getelementptr inbounds i8* %9, i32 -1
+ store i8* %incdec.ptr39, i8** %rpos, align 4, !tbaa !0
+ br label %return
+
+for.body: ; preds = %for.cond.backedge.for.body_crit_edge, %if.end30
+ %x.043 = phi i32 [ %phitmp47, %for.cond.backedge.for.body_crit_edge ], [ 0, %if.end30 ]
+ %c.142 = phi i32 [ %c.1.be, %for.cond.backedge.for.body_crit_edge ], [ %c.0, %if.end30 ]
+ %add = add i32 %c.142, -48
+ %sub48 = add i32 %add, %x.043
+ %10 = load i8** %rpos, align 4, !tbaa !0
+ %11 = load i8** %shend, align 4, !tbaa !0
+ %cmp51 = icmp ult i8* %10, %11
+ br i1 %cmp51, label %cond.true53, label %cond.false57
+
+cond.true53: ; preds = %for.body
+ %incdec.ptr55 = getelementptr inbounds i8* %10, i32 1
+ store i8* %incdec.ptr55, i8** %rpos, align 4, !tbaa !0
+ %12 = load i8* %10, align 1, !tbaa !1
+ %conv56 = zext i8 %12 to i32
+ br label %for.cond.backedge
+
+cond.false57: ; preds = %for.body
+ %call58 = tail call i32 @__shgetc(%struct._IO_FILE* %f) #1
+ br label %for.cond.backedge
+
+for.cond.backedge: ; preds = %cond.false57, %cond.true53
+ %c.1.be = phi i32 [ %conv56, %cond.true53 ], [ %call58, %cond.false57 ]
+ %sub43 = add nsw i32 %c.1.be, -48
+ %cmp44 = icmp ult i32 %sub43, 10
+ %cmp46 = icmp slt i32 %sub48, 214748364
+ %cmp46. = and i1 %cmp44, %cmp46
+ br i1 %cmp46., label %for.cond.backedge.for.body_crit_edge, label %for.end
+
+for.cond.backedge.for.body_crit_edge: ; preds = %for.cond.backedge
+ %phitmp47 = mul i32 %sub48, 10
+ br label %for.body
+
+for.end: ; preds = %for.cond.backedge
+ %phitmp = sext i32 %sub48 to i64
+ %sub6335 = add nsw i32 %c.1.be, -48
+ %cmp6436 = icmp ult i32 %sub6335, 10
+ br i1 %cmp6436, label %for.body70, label %for.cond89.preheader
+
+for.cond89.preheader: ; preds = %for.cond62.backedge, %for.end
+ %y.0.lcssa = phi i64 [ %phitmp, %for.end ], [ %sub74, %for.cond62.backedge ]
+ %c.2.lcssa = phi i32 [ %c.1.be, %for.end ], [ %c.2.be, %for.cond62.backedge ]
+ %sub9033 = add nsw i32 %c.2.lcssa, -48
+ %cmp9134 = icmp ult i32 %sub9033, 10
+ br i1 %cmp9134, label %for.inc94, label %for.end107
+
+for.body70: ; preds = %for.cond62.backedge, %for.end
+ %y.038 = phi i64 [ %phitmp, %for.end ], [ %sub74, %for.cond62.backedge ]
+ %c.237 = phi i32 [ %c.1.be, %for.end ], [ %c.2.be, %for.cond62.backedge ]
+ %mul71 = mul nsw i64 %y.038, 10
+ %conv72 = sext i32 %c.237 to i64
+ %add73 = add i64 %conv72, -48
+ %sub74 = add i64 %add73, %mul71
+ %13 = load i8** %rpos, align 4, !tbaa !0
+ %14 = load i8** %shend, align 4, !tbaa !0
+ %cmp78 = icmp ult i8* %13, %14
+ br i1 %cmp78, label %cond.true80, label %cond.false84
+
+cond.true80: ; preds = %for.body70
+ %incdec.ptr82 = getelementptr inbounds i8* %13, i32 1
+ store i8* %incdec.ptr82, i8** %rpos, align 4, !tbaa !0
+ %15 = load i8* %13, align 1, !tbaa !1
+ %conv83 = zext i8 %15 to i32
+ br label %for.cond62.backedge
+
+cond.false84: ; preds = %for.body70
+ %call85 = tail call i32 @__shgetc(%struct._IO_FILE* %f) #1
+ br label %for.cond62.backedge
+
+for.cond62.backedge: ; preds = %cond.false84, %cond.true80
+ %c.2.be = phi i32 [ %conv83, %cond.true80 ], [ %call85, %cond.false84 ]
+ %sub63 = add nsw i32 %c.2.be, -48
+ %cmp64 = icmp ult i32 %sub63, 10
+ %cmp67 = icmp slt i64 %sub74, 92233720368547758
+ %or.cond32 = and i1 %cmp64, %cmp67
+ br i1 %or.cond32, label %for.body70, label %for.cond89.preheader
+
+for.inc94: ; preds = %for.cond89.backedge, %for.cond89.preheader
+ %16 = load i8** %rpos, align 4, !tbaa !0
+ %17 = load i8** %shend, align 4, !tbaa !0
+ %cmp97 = icmp ult i8* %16, %17
+ br i1 %cmp97, label %cond.true99, label %cond.false103
+
+cond.true99: ; preds = %for.inc94
+ %incdec.ptr101 = getelementptr inbounds i8* %16, i32 1
+ store i8* %incdec.ptr101, i8** %rpos, align 4, !tbaa !0
+ %18 = load i8* %16, align 1, !tbaa !1
+ %conv102 = zext i8 %18 to i32
+ br label %for.cond89.backedge
+
+cond.false103: ; preds = %for.inc94
+ %call104 = tail call i32 @__shgetc(%struct._IO_FILE* %f) #1
+ br label %for.cond89.backedge
+
+for.cond89.backedge: ; preds = %cond.false103, %cond.true99
+ %c.3.be = phi i32 [ %conv102, %cond.true99 ], [ %call104, %cond.false103 ]
+ %sub90 = add nsw i32 %c.3.be, -48
+ %cmp91 = icmp ult i32 %sub90, 10
+ br i1 %cmp91, label %for.inc94, label %for.end107
+
+for.end107: ; preds = %for.cond89.backedge, %for.cond89.preheader
+ %19 = load i8** %shend, align 4, !tbaa !0
+ %tobool109 = icmp eq i8* %19, null
+ br i1 %tobool109, label %cond.end114, label %cond.true110
+
+cond.true110: ; preds = %for.end107
+ %20 = load i8** %rpos, align 4, !tbaa !0
+ %incdec.ptr112 = getelementptr inbounds i8* %20, i32 -1
+ store i8* %incdec.ptr112, i8** %rpos, align 4, !tbaa !0
+ br label %cond.end114
+
+cond.end114: ; preds = %cond.true110, %for.end107
+ %tobool115 = icmp ne i32 %neg.0, 0
+ %sub117 = sub nsw i64 0, %y.0.lcssa
+ %cond120 = select i1 %tobool115, i64 %sub117, i64 %y.0.lcssa
+ br label %return
+
+return: ; preds = %cond.end114, %cond.true37, %if.then34
+ %retval.0 = phi i64 [ %cond120, %cond.end114 ], [ -9223372036854775808, %if.then34 ], [ -9223372036854775808, %cond.true37 ]
+ ret i64 %retval.0
+}
+
+; Function Attrs: nounwind readnone
+declare double @copysignl(double, double) #3
+
+declare double @fmodl(double, double) #5
+
+; Function Attrs: nounwind readnone
+declare double @fabs(double) #3
+
+; Function Attrs: nounwind
+define void @__shlim(%struct._IO_FILE* nocapture %f, i32 %lim) #0 {
+entry:
+ %shlim = getelementptr inbounds %struct._IO_FILE* %f, i32 0, i32 28
+ store i32 %lim, i32* %shlim, align 4, !tbaa !3
+ %rend = getelementptr inbounds %struct._IO_FILE* %f, i32 0, i32 2
+ %0 = load i8** %rend, align 4, !tbaa !0
+ %rpos = getelementptr inbounds %struct._IO_FILE* %f, i32 0, i32 1
+ %1 = load i8** %rpos, align 4, !tbaa !0
+ %sub.ptr.lhs.cast = ptrtoint i8* %0 to i32
+ %sub.ptr.rhs.cast = ptrtoint i8* %1 to i32
+ %sub.ptr.sub = sub i32 %sub.ptr.lhs.cast, %sub.ptr.rhs.cast
+ %shcnt = getelementptr inbounds %struct._IO_FILE* %f, i32 0, i32 29
+ store i32 %sub.ptr.sub, i32* %shcnt, align 4, !tbaa !3
+ %tobool = icmp ne i32 %lim, 0
+ %cmp = icmp sgt i32 %sub.ptr.sub, %lim
+ %or.cond = and i1 %tobool, %cmp
+ br i1 %or.cond, label %if.then, label %if.else
+
+if.then: ; preds = %entry
+ %add.ptr = getelementptr inbounds i8* %1, i32 %lim
+ %shend = getelementptr inbounds %struct._IO_FILE* %f, i32 0, i32 27
+ store i8* %add.ptr, i8** %shend, align 4, !tbaa !0
+ br label %if.end
+
+if.else: ; preds = %entry
+ %shend4 = getelementptr inbounds %struct._IO_FILE* %f, i32 0, i32 27
+ store i8* %0, i8** %shend4, align 4, !tbaa !0
+ br label %if.end
+
+if.end: ; preds = %if.else, %if.then
+ ret void
+}
+
+; Function Attrs: nounwind
+define i32 @__shgetc(%struct._IO_FILE* %f) #0 {
+entry:
+ %shlim = getelementptr inbounds %struct._IO_FILE* %f, i32 0, i32 28
+ %0 = load i32* %shlim, align 4, !tbaa !3
+ %tobool = icmp eq i32 %0, 0
+ br i1 %tobool, label %lor.lhs.false, label %land.lhs.true
+
+land.lhs.true: ; preds = %entry
+ %shcnt = getelementptr inbounds %struct._IO_FILE* %f, i32 0, i32 29
+ %1 = load i32* %shcnt, align 4, !tbaa !3
+ %cmp = icmp slt i32 %1, %0
+ br i1 %cmp, label %lor.lhs.false, label %if.then
+
+lor.lhs.false: ; preds = %land.lhs.true, %entry
+ %call = tail call i32 bitcast (i32 (%struct._IO_FILE.3*)* @__uflow to i32 (%struct._IO_FILE*)*)(%struct._IO_FILE* %f) #1
+ %cmp2 = icmp slt i32 %call, 0
+ br i1 %cmp2, label %if.then, label %if.end
+
+if.then: ; preds = %lor.lhs.false, %land.lhs.true
+ %shend = getelementptr inbounds %struct._IO_FILE* %f, i32 0, i32 27
+ store i8* null, i8** %shend, align 4, !tbaa !0
+ br label %return
+
+if.end: ; preds = %lor.lhs.false
+ %2 = load i32* %shlim, align 4, !tbaa !3
+ %tobool4 = icmp eq i32 %2, 0
+ %rend17.phi.trans.insert = getelementptr inbounds %struct._IO_FILE* %f, i32 0, i32 2
+ %.pre = load i8** %rend17.phi.trans.insert, align 4, !tbaa !0
+ br i1 %tobool4, label %if.else, label %land.lhs.true5
+
+land.lhs.true5: ; preds = %if.end
+ %rpos = getelementptr inbounds %struct._IO_FILE* %f, i32 0, i32 1
+ %3 = load i8** %rpos, align 4, !tbaa !0
+ %sub.ptr.lhs.cast = ptrtoint i8* %.pre to i32
+ %sub.ptr.rhs.cast = ptrtoint i8* %3 to i32
+ %sub.ptr.sub = sub i32 %sub.ptr.lhs.cast, %sub.ptr.rhs.cast
+ %shcnt7 = getelementptr inbounds %struct._IO_FILE* %f, i32 0, i32 29
+ %4 = load i32* %shcnt7, align 4, !tbaa !3
+ %sub = sub nsw i32 %2, %4
+ %sub8 = add nsw i32 %sub, -1
+ %cmp9 = icmp sgt i32 %sub.ptr.sub, %sub8
+ br i1 %cmp9, label %if.then10, label %if.else
+
+if.then10: ; preds = %land.lhs.true5
+ %add.ptr = getelementptr inbounds i8* %3, i32 %sub8
+ %shend16 = getelementptr inbounds %struct._IO_FILE* %f, i32 0, i32 27
+ store i8* %add.ptr, i8** %shend16, align 4, !tbaa !0
+ br label %if.end19
+
+if.else: ; preds = %land.lhs.true5, %if.end
+ %shend18 = getelementptr inbounds %struct._IO_FILE* %f, i32 0, i32 27
+ store i8* %.pre, i8** %shend18, align 4, !tbaa !0
+ br label %if.end19
+
+if.end19: ; preds = %if.else, %if.then10
+ %tobool21 = icmp eq i8* %.pre, null
+ %rpos31.phi.trans.insert = getelementptr inbounds %struct._IO_FILE* %f, i32 0, i32 1
+ %.pre24 = load i8** %rpos31.phi.trans.insert, align 4, !tbaa !0
+ br i1 %tobool21, label %if.end30, label %if.then22
+
+if.then22: ; preds = %if.end19
+ %sub.ptr.lhs.cast25 = ptrtoint i8* %.pre to i32
+ %sub.ptr.rhs.cast26 = ptrtoint i8* %.pre24 to i32
+ %shcnt28 = getelementptr inbounds %struct._IO_FILE* %f, i32 0, i32 29
+ %5 = load i32* %shcnt28, align 4, !tbaa !3
+ %sub.ptr.sub27 = add i32 %sub.ptr.lhs.cast25, 1
+ %add = sub i32 %sub.ptr.sub27, %sub.ptr.rhs.cast26
+ %add29 = add i32 %add, %5
+ store i32 %add29, i32* %shcnt28, align 4, !tbaa !3
+ br label %if.end30
+
+if.end30: ; preds = %if.then22, %if.end19
+ %arrayidx = getelementptr inbounds i8* %.pre24, i32 -1
+ %6 = load i8* %arrayidx, align 1, !tbaa !1
+ %conv = zext i8 %6 to i32
+ %cmp32 = icmp eq i32 %conv, %call
+ br i1 %cmp32, label %return, label %if.then34
+
+if.then34: ; preds = %if.end30
+ %conv35 = trunc i32 %call to i8
+ store i8 %conv35, i8* %arrayidx, align 1, !tbaa !1
+ br label %return
+
+return: ; preds = %if.then34, %if.end30, %if.then
+ %retval.0 = phi i32 [ -1, %if.then ], [ %call, %if.end30 ], [ %call, %if.then34 ]
+ ret i32 %retval.0
+}
+
+; Function Attrs: nounwind readnone
+define double @scalbn(double %x, i32 %n) #3 {
+entry:
+ %cmp = icmp sgt i32 %n, 1023
+ br i1 %cmp, label %if.then, label %if.else
+
+if.then: ; preds = %entry
+ %mul = fmul double %x, 0x7FE0000000000000
+ %sub = add nsw i32 %n, -1023
+ %cmp1 = icmp sgt i32 %sub, 1023
+ br i1 %cmp1, label %if.then2, label %if.end20
+
+if.then2: ; preds = %if.then
+ %mul3 = fmul double %mul, 0x7FE0000000000000
+ %sub4 = add nsw i32 %n, -2046
+ %cmp5 = icmp sgt i32 %sub4, 1023
+ %.sub4 = select i1 %cmp5, i32 1023, i32 %sub4
+ br label %if.end20
+
+if.else: ; preds = %entry
+ %cmp8 = icmp slt i32 %n, -1022
+ br i1 %cmp8, label %if.then9, label %if.end20
+
+if.then9: ; preds = %if.else
+ %mul10 = fmul double %x, 0x10000000000000
+ %add = add nsw i32 %n, 1022
+ %cmp11 = icmp slt i32 %add, -1022
+ br i1 %cmp11, label %if.then12, label %if.end20
+
+if.then12: ; preds = %if.then9
+ %mul13 = fmul double %mul10, 0x10000000000000
+ %add14 = add nsw i32 %n, 2044
+ %cmp15 = icmp slt i32 %add14, -1022
+ %.add14 = select i1 %cmp15, i32 -1022, i32 %add14
+ br label %if.end20
+
+if.end20: ; preds = %if.then12, %if.then9, %if.else, %if.then2, %if.then
+ %n.addr.0 = phi i32 [ %.sub4, %if.then2 ], [ %sub, %if.then ], [ %.add14, %if.then12 ], [ %add, %if.then9 ], [ %n, %if.else ]
+ %y.0 = phi double [ %mul3, %if.then2 ], [ %mul, %if.then ], [ %mul13, %if.then12 ], [ %mul10, %if.then9 ], [ %x, %if.else ]
+ %add21 = add nsw i32 %n.addr.0, 1023
+ %conv16 = zext i32 %add21 to i64
+ %shl = shl i64 %conv16, 52
+ %0 = bitcast i64 %shl to double
+ %mul22 = fmul double %y.0, %0
+ ret double %mul22
+}
+
+; Function Attrs: nounwind
+define double @scalbnl(double %x, i32 %n) #0 {
+entry:
+ %call = tail call double @scalbn(double %x, i32 %n) #1
+ ret double %call
+}
+
+; Function Attrs: nounwind
+define i32 @__overflow(%struct._IO_FILE* %f, i32 %_c) #0 {
+entry:
+ %c = alloca i8, align 1
+ %conv = trunc i32 %_c to i8
+ store i8 %conv, i8* %c, align 1, !tbaa !1
+ %wend = getelementptr inbounds %struct._IO_FILE* %f, i32 0, i32 4
+ %0 = load i8** %wend, align 4, !tbaa !0
+ %tobool = icmp eq i8* %0, null
+ br i1 %tobool, label %land.lhs.true, label %if.end
+
+land.lhs.true: ; preds = %entry
+ %call = call i32 bitcast (i32 (%struct._IO_FILE.4*)* @__towrite to i32 (%struct._IO_FILE*)*)(%struct._IO_FILE* %f) #1
+ %tobool1 = icmp eq i32 %call, 0
+ br i1 %tobool1, label %land.lhs.true.if.end_crit_edge, label %return
+
+land.lhs.true.if.end_crit_edge: ; preds = %land.lhs.true
+ %.pre = load i8** %wend, align 4, !tbaa !0
+ br label %if.end
+
+if.end: ; preds = %land.lhs.true.if.end_crit_edge, %entry
+ %1 = phi i8* [ %.pre, %land.lhs.true.if.end_crit_edge ], [ %0, %entry ]
+ %wpos = getelementptr inbounds %struct._IO_FILE* %f, i32 0, i32 5
+ %2 = load i8** %wpos, align 4, !tbaa !0
+ %cmp = icmp ult i8* %2, %1
+ br i1 %cmp, label %land.lhs.true4, label %if.end12
+
+land.lhs.true4: ; preds = %if.end
+ %3 = load i8* %c, align 1, !tbaa !1
+ %conv5 = zext i8 %3 to i32
+ %lbf = getelementptr inbounds %struct._IO_FILE* %f, i32 0, i32 20
+ %4 = load i8* %lbf, align 1, !tbaa !1
+ %conv6 = sext i8 %4 to i32
+ %cmp7 = icmp eq i32 %conv5, %conv6
+ br i1 %cmp7, label %if.end12, label %if.then9
+
+if.then9: ; preds = %land.lhs.true4
+ %incdec.ptr = getelementptr inbounds i8* %2, i32 1
+ store i8* %incdec.ptr, i8** %wpos, align 4, !tbaa !0
+ store i8 %3, i8* %2, align 1, !tbaa !1
+ br label %return
+
+if.end12: ; preds = %land.lhs.true4, %if.end
+ %write = getelementptr inbounds %struct._IO_FILE* %f, i32 0, i32 9
+ %5 = load i32 (%struct._IO_FILE*, i8*, i32)** %write, align 4, !tbaa !0
+ %call13 = call i32 %5(%struct._IO_FILE* %f, i8* %c, i32 1) #1
+ %cmp14 = icmp eq i32 %call13, 1
+ br i1 %cmp14, label %if.end17, label %return
+
+if.end17: ; preds = %if.end12
+ %6 = load i8* %c, align 1, !tbaa !1
+ %conv18 = zext i8 %6 to i32
+ br label %return
+
+return: ; preds = %if.end17, %if.end12, %if.then9, %land.lhs.true
+ %retval.0 = phi i32 [ %conv5, %if.then9 ], [ %conv18, %if.end17 ], [ -1, %land.lhs.true ], [ -1, %if.end12 ]
+ ret i32 %retval.0
+}
+
+; Function Attrs: nounwind
+define i32 @__toread(%struct._IO_FILE.3* %f) #0 {
+entry:
+ %mode = getelementptr inbounds %struct._IO_FILE.3* %f, i32 0, i32 19
+ %0 = load i8* %mode, align 1, !tbaa !1
+ %conv = sext i8 %0 to i32
+ %sub = add nsw i32 %conv, 255
+ %or = or i32 %sub, %conv
+ %conv3 = trunc i32 %or to i8
+ store i8 %conv3, i8* %mode, align 1, !tbaa !1
+ %wpos = getelementptr inbounds %struct._IO_FILE.3* %f, i32 0, i32 5
+ %1 = load i8** %wpos, align 4, !tbaa !0
+ %buf = getelementptr inbounds %struct._IO_FILE.3* %f, i32 0, i32 11
+ %2 = load i8** %buf, align 4, !tbaa !0
+ %cmp = icmp ugt i8* %1, %2
+ br i1 %cmp, label %if.then, label %if.end
+
+if.then: ; preds = %entry
+ %write = getelementptr inbounds %struct._IO_FILE.3* %f, i32 0, i32 9
+ %3 = load i32 (%struct._IO_FILE.3*, i8*, i32)** %write, align 4, !tbaa !0
+ %call = tail call i32 %3(%struct._IO_FILE.3* %f, i8* null, i32 0) #1
+ br label %if.end
+
+if.end: ; preds = %if.then, %entry
+ %wend = getelementptr inbounds %struct._IO_FILE.3* %f, i32 0, i32 4
+ store i8* null, i8** %wend, align 4, !tbaa !0
+ %wbase = getelementptr inbounds %struct._IO_FILE.3* %f, i32 0, i32 7
+ store i8* null, i8** %wbase, align 4, !tbaa !0
+ store i8* null, i8** %wpos, align 4, !tbaa !0
+ %flags = getelementptr inbounds %struct._IO_FILE.3* %f, i32 0, i32 0
+ %4 = load i32* %flags, align 4, !tbaa !3
+ %and = and i32 %4, 20
+ %tobool = icmp eq i32 %and, 0
+ br i1 %tobool, label %if.end14, label %if.then6
+
+if.then6: ; preds = %if.end
+ %and8 = and i32 %4, 4
+ %tobool9 = icmp eq i32 %and8, 0
+ br i1 %tobool9, label %return, label %if.then10
+
+if.then10: ; preds = %if.then6
+ %or12 = or i32 %4, 32
+ store i32 %or12, i32* %flags, align 4, !tbaa !3
+ br label %return
+
+if.end14: ; preds = %if.end
+ %5 = load i8** %buf, align 4, !tbaa !0
+ %rend = getelementptr inbounds %struct._IO_FILE.3* %f, i32 0, i32 2
+ store i8* %5, i8** %rend, align 4, !tbaa !0
+ %rpos = getelementptr inbounds %struct._IO_FILE.3* %f, i32 0, i32 1
+ store i8* %5, i8** %rpos, align 4, !tbaa !0
+ br label %return
+
+return: ; preds = %if.end14, %if.then10, %if.then6
+ %retval.0 = phi i32 [ 0, %if.end14 ], [ -1, %if.then6 ], [ -1, %if.then10 ]
+ ret i32 %retval.0
+}
+
+; Function Attrs: nounwind
+define i32 @__towrite(%struct._IO_FILE.4* nocapture %f) #0 {
+entry:
+ %mode = getelementptr inbounds %struct._IO_FILE.4* %f, i32 0, i32 19
+ %0 = load i8* %mode, align 1, !tbaa !1
+ %conv = sext i8 %0 to i32
+ %sub = add nsw i32 %conv, 255
+ %or = or i32 %sub, %conv
+ %conv3 = trunc i32 %or to i8
+ store i8 %conv3, i8* %mode, align 1, !tbaa !1
+ %flags = getelementptr inbounds %struct._IO_FILE.4* %f, i32 0, i32 0
+ %1 = load i32* %flags, align 4, !tbaa !3
+ %and = and i32 %1, 8
+ %tobool = icmp eq i32 %and, 0
+ br i1 %tobool, label %if.end, label %if.then
+
+if.then: ; preds = %entry
+ %or5 = or i32 %1, 32
+ store i32 %or5, i32* %flags, align 4, !tbaa !3
+ br label %return
+
+if.end: ; preds = %entry
+ %rend = getelementptr inbounds %struct._IO_FILE.4* %f, i32 0, i32 2
+ store i8* null, i8** %rend, align 4, !tbaa !0
+ %rpos = getelementptr inbounds %struct._IO_FILE.4* %f, i32 0, i32 1
+ store i8* null, i8** %rpos, align 4, !tbaa !0
+ %buf = getelementptr inbounds %struct._IO_FILE.4* %f, i32 0, i32 11
+ %2 = load i8** %buf, align 4, !tbaa !0
+ %wbase = getelementptr inbounds %struct._IO_FILE.4* %f, i32 0, i32 7
+ store i8* %2, i8** %wbase, align 4, !tbaa !0
+ %wpos = getelementptr inbounds %struct._IO_FILE.4* %f, i32 0, i32 5
+ store i8* %2, i8** %wpos, align 4, !tbaa !0
+ %buf_size = getelementptr inbounds %struct._IO_FILE.4* %f, i32 0, i32 12
+ %3 = load i32* %buf_size, align 4, !tbaa !3
+ %add.ptr = getelementptr inbounds i8* %2, i32 %3
+ %wend = getelementptr inbounds %struct._IO_FILE.4* %f, i32 0, i32 4
+ store i8* %add.ptr, i8** %wend, align 4, !tbaa !0
+ br label %return
+
+return: ; preds = %if.end, %if.then
+ %retval.0 = phi i32 [ -1, %if.then ], [ 0, %if.end ]
+ ret i32 %retval.0
+}
+
+; Function Attrs: nounwind
+define i32 @__uflow(%struct._IO_FILE.3* %f) #0 {
+entry:
+ %c = alloca i8, align 1
+ %rend = getelementptr inbounds %struct._IO_FILE.3* %f, i32 0, i32 2
+ %0 = load i8** %rend, align 4, !tbaa !0
+ %tobool = icmp eq i8* %0, null
+ br i1 %tobool, label %lor.lhs.false, label %land.lhs.true
+
+lor.lhs.false: ; preds = %entry
+ %call = call i32 @__toread(%struct._IO_FILE.3* %f) #1
+ %tobool1 = icmp eq i32 %call, 0
+ br i1 %tobool1, label %land.lhs.true, label %return
+
+land.lhs.true: ; preds = %lor.lhs.false, %entry
+ %read = getelementptr inbounds %struct._IO_FILE.3* %f, i32 0, i32 8
+ %1 = load i32 (%struct._IO_FILE.3*, i8*, i32)** %read, align 4, !tbaa !0
+ %call2 = call i32 %1(%struct._IO_FILE.3* %f, i8* %c, i32 1) #1
+ %cmp = icmp eq i32 %call2, 1
+ br i1 %cmp, label %if.then, label %return
+
+if.then: ; preds = %land.lhs.true
+ %2 = load i8* %c, align 1, !tbaa !1
+ %conv = zext i8 %2 to i32
+ br label %return
+
+return: ; preds = %if.then, %land.lhs.true, %lor.lhs.false
+ %retval.0 = phi i32 [ %conv, %if.then ], [ -1, %lor.lhs.false ], [ -1, %land.lhs.true ]
+ ret i32 %retval.0
+}
+
+; Function Attrs: nounwind
+define double @atof(i8* %s) #0 {
+entry:
+ %call = tail call double @strtod(i8* %s, i8** null) #1
+ ret double %call
+}
+
+; Function Attrs: nounwind
+define float @strtof(i8* noalias %s, i8** noalias %p) #0 {
+entry:
+ %f.i = alloca %struct._IO_FILE, align 4
+ %0 = bitcast %struct._IO_FILE* %f.i to i8*
+ call void @llvm.lifetime.start(i64 112, i8* %0) #1
+ call void @llvm.memset.p0i8.i64(i8* %0, i8 0, i64 112, i32 4, i1 false) #1
+ %rpos.i = getelementptr inbounds %struct._IO_FILE* %f.i, i32 0, i32 1
+ store i8* %s, i8** %rpos.i, align 4, !tbaa !0
+ %rend.i = getelementptr inbounds %struct._IO_FILE* %f.i, i32 0, i32 2
+ store i8* inttoptr (i32 -1 to i8*), i8** %rend.i, align 4, !tbaa !0
+ %buf.i = getelementptr inbounds %struct._IO_FILE* %f.i, i32 0, i32 11
+ store i8* %s, i8** %buf.i, align 4, !tbaa !0
+ %lock.i = getelementptr inbounds %struct._IO_FILE* %f.i, i32 0, i32 21
+ store i32 -1, i32* %lock.i, align 4, !tbaa !3
+ call void @__shlim(%struct._IO_FILE* %f.i, i32 0) #1
+ %call.i = call double @__floatscan(%struct._IO_FILE* %f.i, i32 0, i32 1) #1
+ %shcnt.i = getelementptr inbounds %struct._IO_FILE* %f.i, i32 0, i32 29
+ %1 = load i32* %shcnt.i, align 4, !tbaa !3
+ %2 = load i8** %rpos.i, align 4, !tbaa !0
+ %3 = load i8** %rend.i, align 4, !tbaa !0
+ %sub.ptr.lhs.cast.i = ptrtoint i8* %2 to i32
+ %sub.ptr.rhs.cast.i = ptrtoint i8* %3 to i32
+ %sub.ptr.sub.i = sub i32 %sub.ptr.lhs.cast.i, %sub.ptr.rhs.cast.i
+ %add.i = add nsw i32 %sub.ptr.sub.i, %1
+ %tobool.i = icmp eq i8** %p, null
+ br i1 %tobool.i, label %strtox.exit, label %if.then.i
+
+if.then.i: ; preds = %entry
+ %tobool3.i = icmp eq i32 %add.i, 0
+ br i1 %tobool3.i, label %cond.end.i, label %cond.true.i
+
+cond.true.i: ; preds = %if.then.i
+ %add.ptr.i = getelementptr inbounds i8* %s, i32 %add.i
+ br label %cond.end.i
+
+cond.end.i: ; preds = %cond.true.i, %if.then.i
+ %cond.i = phi i8* [ %add.ptr.i, %cond.true.i ], [ %s, %if.then.i ]
+ store i8* %cond.i, i8** %p, align 4, !tbaa !0
+ br label %strtox.exit
+
+strtox.exit: ; preds = %cond.end.i, %entry
+ call void @llvm.lifetime.end(i64 112, i8* %0) #1
+ %conv = fptrunc double %call.i to float
+ ret float %conv
+}
+
+; Function Attrs: nounwind
+define double @strtod(i8* noalias %s, i8** noalias %p) #0 {
+entry:
+ %f.i = alloca %struct._IO_FILE, align 4
+ %0 = bitcast %struct._IO_FILE* %f.i to i8*
+ call void @llvm.lifetime.start(i64 112, i8* %0) #1
+ call void @llvm.memset.p0i8.i64(i8* %0, i8 0, i64 112, i32 4, i1 false) #1
+ %rpos.i = getelementptr inbounds %struct._IO_FILE* %f.i, i32 0, i32 1
+ store i8* %s, i8** %rpos.i, align 4, !tbaa !0
+ %rend.i = getelementptr inbounds %struct._IO_FILE* %f.i, i32 0, i32 2
+ store i8* inttoptr (i32 -1 to i8*), i8** %rend.i, align 4, !tbaa !0
+ %buf.i = getelementptr inbounds %struct._IO_FILE* %f.i, i32 0, i32 11
+ store i8* %s, i8** %buf.i, align 4, !tbaa !0
+ %lock.i = getelementptr inbounds %struct._IO_FILE* %f.i, i32 0, i32 21
+ store i32 -1, i32* %lock.i, align 4, !tbaa !3
+ call void @__shlim(%struct._IO_FILE* %f.i, i32 0) #1
+ %call.i = call double @__floatscan(%struct._IO_FILE* %f.i, i32 1, i32 1) #1
+ %shcnt.i = getelementptr inbounds %struct._IO_FILE* %f.i, i32 0, i32 29
+ %1 = load i32* %shcnt.i, align 4, !tbaa !3
+ %2 = load i8** %rpos.i, align 4, !tbaa !0
+ %3 = load i8** %rend.i, align 4, !tbaa !0
+ %sub.ptr.lhs.cast.i = ptrtoint i8* %2 to i32
+ %sub.ptr.rhs.cast.i = ptrtoint i8* %3 to i32
+ %sub.ptr.sub.i = sub i32 %sub.ptr.lhs.cast.i, %sub.ptr.rhs.cast.i
+ %add.i = add nsw i32 %sub.ptr.sub.i, %1
+ %tobool.i = icmp eq i8** %p, null
+ br i1 %tobool.i, label %strtox.exit, label %if.then.i
+
+if.then.i: ; preds = %entry
+ %tobool3.i = icmp eq i32 %add.i, 0
+ br i1 %tobool3.i, label %cond.end.i, label %cond.true.i
+
+cond.true.i: ; preds = %if.then.i
+ %add.ptr.i = getelementptr inbounds i8* %s, i32 %add.i
+ br label %cond.end.i
+
+cond.end.i: ; preds = %cond.true.i, %if.then.i
+ %cond.i = phi i8* [ %add.ptr.i, %cond.true.i ], [ %s, %if.then.i ]
+ store i8* %cond.i, i8** %p, align 4, !tbaa !0
+ br label %strtox.exit
+
+strtox.exit: ; preds = %cond.end.i, %entry
+ call void @llvm.lifetime.end(i64 112, i8* %0) #1
+ ret double %call.i
+}
+
+; Function Attrs: nounwind
+define double @strtold(i8* noalias %s, i8** noalias %p) #0 {
+entry:
+ %f.i = alloca %struct._IO_FILE, align 4
+ %0 = bitcast %struct._IO_FILE* %f.i to i8*
+ call void @llvm.lifetime.start(i64 112, i8* %0) #1
+ call void @llvm.memset.p0i8.i64(i8* %0, i8 0, i64 112, i32 4, i1 false) #1
+ %rpos.i = getelementptr inbounds %struct._IO_FILE* %f.i, i32 0, i32 1
+ store i8* %s, i8** %rpos.i, align 4, !tbaa !0
+ %rend.i = getelementptr inbounds %struct._IO_FILE* %f.i, i32 0, i32 2
+ store i8* inttoptr (i32 -1 to i8*), i8** %rend.i, align 4, !tbaa !0
+ %buf.i = getelementptr inbounds %struct._IO_FILE* %f.i, i32 0, i32 11
+ store i8* %s, i8** %buf.i, align 4, !tbaa !0
+ %lock.i = getelementptr inbounds %struct._IO_FILE* %f.i, i32 0, i32 21
+ store i32 -1, i32* %lock.i, align 4, !tbaa !3
+ call void @__shlim(%struct._IO_FILE* %f.i, i32 0) #1
+ %call.i = call double @__floatscan(%struct._IO_FILE* %f.i, i32 2, i32 1) #1
+ %shcnt.i = getelementptr inbounds %struct._IO_FILE* %f.i, i32 0, i32 29
+ %1 = load i32* %shcnt.i, align 4, !tbaa !3
+ %2 = load i8** %rpos.i, align 4, !tbaa !0
+ %3 = load i8** %rend.i, align 4, !tbaa !0
+ %sub.ptr.lhs.cast.i = ptrtoint i8* %2 to i32
+ %sub.ptr.rhs.cast.i = ptrtoint i8* %3 to i32
+ %sub.ptr.sub.i = sub i32 %sub.ptr.lhs.cast.i, %sub.ptr.rhs.cast.i
+ %add.i = add nsw i32 %sub.ptr.sub.i, %1
+ %tobool.i = icmp eq i8** %p, null
+ br i1 %tobool.i, label %strtox.exit, label %if.then.i
+
+if.then.i: ; preds = %entry
+ %tobool3.i = icmp eq i32 %add.i, 0
+ br i1 %tobool3.i, label %cond.end.i, label %cond.true.i
+
+cond.true.i: ; preds = %if.then.i
+ %add.ptr.i = getelementptr inbounds i8* %s, i32 %add.i
+ br label %cond.end.i
+
+cond.end.i: ; preds = %cond.true.i, %if.then.i
+ %cond.i = phi i8* [ %add.ptr.i, %cond.true.i ], [ %s, %if.then.i ]
+ store i8* %cond.i, i8** %p, align 4, !tbaa !0
+ br label %strtox.exit
+
+strtox.exit: ; preds = %cond.end.i, %entry
+ call void @llvm.lifetime.end(i64 112, i8* %0) #1
+ ret double %call.i
+}
+
+; Function Attrs: nounwind
+define float @strtof_l(i8* noalias %s, i8** noalias %p, %struct.__locale_struct* nocapture %loc) #0 {
+entry:
+ %f.i.i = alloca %struct._IO_FILE, align 4
+ %0 = bitcast %struct._IO_FILE* %f.i.i to i8*
+ call void @llvm.lifetime.start(i64 112, i8* %0) #1
+ call void @llvm.memset.p0i8.i64(i8* %0, i8 0, i64 112, i32 4, i1 false) #1
+ %rpos.i.i = getelementptr inbounds %struct._IO_FILE* %f.i.i, i32 0, i32 1
+ store i8* %s, i8** %rpos.i.i, align 4, !tbaa !0
+ %rend.i.i = getelementptr inbounds %struct._IO_FILE* %f.i.i, i32 0, i32 2
+ store i8* inttoptr (i32 -1 to i8*), i8** %rend.i.i, align 4, !tbaa !0
+ %buf.i.i = getelementptr inbounds %struct._IO_FILE* %f.i.i, i32 0, i32 11
+ store i8* %s, i8** %buf.i.i, align 4, !tbaa !0
+ %lock.i.i = getelementptr inbounds %struct._IO_FILE* %f.i.i, i32 0, i32 21
+ store i32 -1, i32* %lock.i.i, align 4, !tbaa !3
+ call void @__shlim(%struct._IO_FILE* %f.i.i, i32 0) #1
+ %call.i.i = call double @__floatscan(%struct._IO_FILE* %f.i.i, i32 0, i32 1) #1
+ %shcnt.i.i = getelementptr inbounds %struct._IO_FILE* %f.i.i, i32 0, i32 29
+ %1 = load i32* %shcnt.i.i, align 4, !tbaa !3
+ %2 = load i8** %rpos.i.i, align 4, !tbaa !0
+ %3 = load i8** %rend.i.i, align 4, !tbaa !0
+ %sub.ptr.lhs.cast.i.i = ptrtoint i8* %2 to i32
+ %sub.ptr.rhs.cast.i.i = ptrtoint i8* %3 to i32
+ %sub.ptr.sub.i.i = sub i32 %sub.ptr.lhs.cast.i.i, %sub.ptr.rhs.cast.i.i
+ %add.i.i = add nsw i32 %sub.ptr.sub.i.i, %1
+ %tobool.i.i = icmp eq i8** %p, null
+ br i1 %tobool.i.i, label %strtof.exit, label %if.then.i.i
+
+if.then.i.i: ; preds = %entry
+ %tobool3.i.i = icmp eq i32 %add.i.i, 0
+ br i1 %tobool3.i.i, label %cond.end.i.i, label %cond.true.i.i
+
+cond.true.i.i: ; preds = %if.then.i.i
+ %add.ptr.i.i = getelementptr inbounds i8* %s, i32 %add.i.i
+ br label %cond.end.i.i
+
+cond.end.i.i: ; preds = %cond.true.i.i, %if.then.i.i
+ %cond.i.i = phi i8* [ %add.ptr.i.i, %cond.true.i.i ], [ %s, %if.then.i.i ]
+ store i8* %cond.i.i, i8** %p, align 4, !tbaa !0
+ br label %strtof.exit
+
+strtof.exit: ; preds = %cond.end.i.i, %entry
+ call void @llvm.lifetime.end(i64 112, i8* %0) #1
+ %conv.i = fptrunc double %call.i.i to float
+ ret float %conv.i
+}
+
+; Function Attrs: nounwind
+define double @strtod_l(i8* noalias %s, i8** noalias %p, %struct.__locale_struct.0* nocapture %loc) #0 {
+entry:
+ %f.i.i = alloca %struct._IO_FILE, align 4
+ %0 = bitcast %struct._IO_FILE* %f.i.i to i8*
+ call void @llvm.lifetime.start(i64 112, i8* %0) #1
+ call void @llvm.memset.p0i8.i64(i8* %0, i8 0, i64 112, i32 4, i1 false) #1
+ %rpos.i.i = getelementptr inbounds %struct._IO_FILE* %f.i.i, i32 0, i32 1
+ store i8* %s, i8** %rpos.i.i, align 4, !tbaa !0
+ %rend.i.i = getelementptr inbounds %struct._IO_FILE* %f.i.i, i32 0, i32 2
+ store i8* inttoptr (i32 -1 to i8*), i8** %rend.i.i, align 4, !tbaa !0
+ %buf.i.i = getelementptr inbounds %struct._IO_FILE* %f.i.i, i32 0, i32 11
+ store i8* %s, i8** %buf.i.i, align 4, !tbaa !0
+ %lock.i.i = getelementptr inbounds %struct._IO_FILE* %f.i.i, i32 0, i32 21
+ store i32 -1, i32* %lock.i.i, align 4, !tbaa !3
+ call void @__shlim(%struct._IO_FILE* %f.i.i, i32 0) #1
+ %call.i.i = call double @__floatscan(%struct._IO_FILE* %f.i.i, i32 1, i32 1) #1
+ %shcnt.i.i = getelementptr inbounds %struct._IO_FILE* %f.i.i, i32 0, i32 29
+ %1 = load i32* %shcnt.i.i, align 4, !tbaa !3
+ %2 = load i8** %rpos.i.i, align 4, !tbaa !0
+ %3 = load i8** %rend.i.i, align 4, !tbaa !0
+ %sub.ptr.lhs.cast.i.i = ptrtoint i8* %2 to i32
+ %sub.ptr.rhs.cast.i.i = ptrtoint i8* %3 to i32
+ %sub.ptr.sub.i.i = sub i32 %sub.ptr.lhs.cast.i.i, %sub.ptr.rhs.cast.i.i
+ %add.i.i = add nsw i32 %sub.ptr.sub.i.i, %1
+ %tobool.i.i = icmp eq i8** %p, null
+ br i1 %tobool.i.i, label %strtod.exit, label %if.then.i.i
+
+if.then.i.i: ; preds = %entry
+ %tobool3.i.i = icmp eq i32 %add.i.i, 0
+ br i1 %tobool3.i.i, label %cond.end.i.i, label %cond.true.i.i
+
+cond.true.i.i: ; preds = %if.then.i.i
+ %add.ptr.i.i = getelementptr inbounds i8* %s, i32 %add.i.i
+ br label %cond.end.i.i
+
+cond.end.i.i: ; preds = %cond.true.i.i, %if.then.i.i
+ %cond.i.i = phi i8* [ %add.ptr.i.i, %cond.true.i.i ], [ %s, %if.then.i.i ]
+ store i8* %cond.i.i, i8** %p, align 4, !tbaa !0
+ br label %strtod.exit
+
+strtod.exit: ; preds = %cond.end.i.i, %entry
+ call void @llvm.lifetime.end(i64 112, i8* %0) #1
+ ret double %call.i.i
+}
+
+; Function Attrs: nounwind
+define double @strtold_l(i8* noalias %s, i8** noalias %p, %struct.__locale_struct.1* nocapture %loc) #0 {
+entry:
+ %f.i.i = alloca %struct._IO_FILE, align 4
+ %0 = bitcast %struct._IO_FILE* %f.i.i to i8*
+ call void @llvm.lifetime.start(i64 112, i8* %0) #1
+ call void @llvm.memset.p0i8.i64(i8* %0, i8 0, i64 112, i32 4, i1 false) #1
+ %rpos.i.i = getelementptr inbounds %struct._IO_FILE* %f.i.i, i32 0, i32 1
+ store i8* %s, i8** %rpos.i.i, align 4, !tbaa !0
+ %rend.i.i = getelementptr inbounds %struct._IO_FILE* %f.i.i, i32 0, i32 2
+ store i8* inttoptr (i32 -1 to i8*), i8** %rend.i.i, align 4, !tbaa !0
+ %buf.i.i = getelementptr inbounds %struct._IO_FILE* %f.i.i, i32 0, i32 11
+ store i8* %s, i8** %buf.i.i, align 4, !tbaa !0
+ %lock.i.i = getelementptr inbounds %struct._IO_FILE* %f.i.i, i32 0, i32 21
+ store i32 -1, i32* %lock.i.i, align 4, !tbaa !3
+ call void @__shlim(%struct._IO_FILE* %f.i.i, i32 0) #1
+ %call.i.i = call double @__floatscan(%struct._IO_FILE* %f.i.i, i32 2, i32 1) #1
+ %shcnt.i.i = getelementptr inbounds %struct._IO_FILE* %f.i.i, i32 0, i32 29
+ %1 = load i32* %shcnt.i.i, align 4, !tbaa !3
+ %2 = load i8** %rpos.i.i, align 4, !tbaa !0
+ %3 = load i8** %rend.i.i, align 4, !tbaa !0
+ %sub.ptr.lhs.cast.i.i = ptrtoint i8* %2 to i32
+ %sub.ptr.rhs.cast.i.i = ptrtoint i8* %3 to i32
+ %sub.ptr.sub.i.i = sub i32 %sub.ptr.lhs.cast.i.i, %sub.ptr.rhs.cast.i.i
+ %add.i.i = add nsw i32 %sub.ptr.sub.i.i, %1
+ %tobool.i.i = icmp eq i8** %p, null
+ br i1 %tobool.i.i, label %strtold.exit, label %if.then.i.i
+
+if.then.i.i: ; preds = %entry
+ %tobool3.i.i = icmp eq i32 %add.i.i, 0
+ br i1 %tobool3.i.i, label %cond.end.i.i, label %cond.true.i.i
+
+cond.true.i.i: ; preds = %if.then.i.i
+ %add.ptr.i.i = getelementptr inbounds i8* %s, i32 %add.i.i
+ br label %cond.end.i.i
+
+cond.end.i.i: ; preds = %cond.true.i.i, %if.then.i.i
+ %cond.i.i = phi i8* [ %add.ptr.i.i, %cond.true.i.i ], [ %s, %if.then.i.i ]
+ store i8* %cond.i.i, i8** %p, align 4, !tbaa !0
+ br label %strtold.exit
+
+strtold.exit: ; preds = %cond.end.i.i, %entry
+ call void @llvm.lifetime.end(i64 112, i8* %0) #1
+ ret double %call.i.i
+}
+
+; Function Attrs: nounwind
+declare void @llvm.memset.p0i8.i64(i8* nocapture, i8, i64, i32, i1) #1
+
+; Function Attrs: nounwind
+declare void @llvm.lifetime.end(i64, i8* nocapture) #1
+
+; Function Attrs: nounwind readonly
+define i32 @memcmp(i8* nocapture %vl, i8* nocapture %vr, i32 %n) #2 {
+entry:
+ %tobool8 = icmp eq i32 %n, 0
+ br i1 %tobool8, label %cond.end, label %land.rhs
+
+land.rhs: ; preds = %for.inc, %entry
+ %r.011 = phi i8* [ %incdec.ptr3, %for.inc ], [ %vr, %entry ]
+ %l.010 = phi i8* [ %incdec.ptr, %for.inc ], [ %vl, %entry ]
+ %n.addr.09 = phi i32 [ %dec, %for.inc ], [ %n, %entry ]
+ %0 = load i8* %l.010, align 1, !tbaa !1
+ %1 = load i8* %r.011, align 1, !tbaa !1
+ %cmp = icmp eq i8 %0, %1
+ br i1 %cmp, label %for.inc, label %cond.true
+
+for.inc: ; preds = %land.rhs
+ %dec = add i32 %n.addr.09, -1
+ %incdec.ptr = getelementptr inbounds i8* %l.010, i32 1
+ %incdec.ptr3 = getelementptr inbounds i8* %r.011, i32 1
+ %tobool = icmp eq i32 %dec, 0
+ br i1 %tobool, label %cond.end, label %land.rhs
+
+cond.true: ; preds = %land.rhs
+ %conv5 = zext i8 %0 to i32
+ %conv6 = zext i8 %1 to i32
+ %sub = sub nsw i32 %conv5, %conv6
+ br label %cond.end
+
+cond.end: ; preds = %cond.true, %for.inc, %entry
+ %cond = phi i32 [ %sub, %cond.true ], [ 0, %for.inc ], [ 0, %entry ]
+ ret i32 %cond
+}
+
+; Function Attrs: nounwind
+define i32 @strcasecmp(i8* nocapture %_l, i8* nocapture %_r) #0 {
+entry:
+ %0 = load i8* %_l, align 1, !tbaa !1
+ %tobool11 = icmp eq i8 %0, 0
+ br i1 %tobool11, label %for.end, label %land.lhs.true.lr.ph
+
+land.lhs.true.lr.ph: ; preds = %entry
+ %conv10 = zext i8 %0 to i32
+ br label %land.lhs.true
+
+land.lhs.true: ; preds = %for.inc, %land.lhs.true.lr.ph
+ %conv15 = phi i32 [ %conv10, %land.lhs.true.lr.ph ], [ %conv, %for.inc ]
+ %1 = phi i8 [ %0, %land.lhs.true.lr.ph ], [ %4, %for.inc ]
+ %r.013 = phi i8* [ %_r, %land.lhs.true.lr.ph ], [ %incdec.ptr11, %for.inc ]
+ %l.012 = phi i8* [ %_l, %land.lhs.true.lr.ph ], [ %incdec.ptr, %for.inc ]
+ %2 = load i8* %r.013, align 1, !tbaa !1
+ %tobool2 = icmp eq i8 %2, 0
+ br i1 %tobool2, label %for.end, label %land.rhs
+
+land.rhs: ; preds = %land.lhs.true
+ %cmp = icmp eq i8 %1, %2
+ br i1 %cmp, label %for.inc, label %lor.rhs
+
+lor.rhs: ; preds = %land.rhs
+ %call = tail call i32 @tolower(i32 %conv15) #1
+ %3 = load i8* %r.013, align 1, !tbaa !1
+ %conv7 = zext i8 %3 to i32
+ %call8 = tail call i32 @tolower(i32 %conv7) #1
+ %cmp9 = icmp eq i32 %call, %call8
+ br i1 %cmp9, label %for.inc, label %lor.rhs.for.endsplit_crit_edge
+
+lor.rhs.for.endsplit_crit_edge: ; preds = %lor.rhs
+ %.pre.pre = load i8* %l.012, align 1, !tbaa !1
+ br label %for.end
+
+for.inc: ; preds = %lor.rhs, %land.rhs
+ %incdec.ptr = getelementptr inbounds i8* %l.012, i32 1
+ %incdec.ptr11 = getelementptr inbounds i8* %r.013, i32 1
+ %4 = load i8* %incdec.ptr, align 1, !tbaa !1
+ %conv = zext i8 %4 to i32
+ %tobool = icmp eq i8 %4, 0
+ br i1 %tobool, label %for.end, label %land.lhs.true
+
+for.end: ; preds = %for.inc, %lor.rhs.for.endsplit_crit_edge, %land.lhs.true, %entry
+ %5 = phi i8 [ 0, %entry ], [ %.pre.pre, %lor.rhs.for.endsplit_crit_edge ], [ %1, %land.lhs.true ], [ 0, %for.inc ]
+ %r.0.lcssa = phi i8* [ %_r, %entry ], [ %r.013, %lor.rhs.for.endsplit_crit_edge ], [ %r.013, %land.lhs.true ], [ %incdec.ptr11, %for.inc ]
+ %conv12 = zext i8 %5 to i32
+ %call13 = tail call i32 @tolower(i32 %conv12) #1
+ %6 = load i8* %r.0.lcssa, align 1, !tbaa !1
+ %conv14 = zext i8 %6 to i32
+ %call15 = tail call i32 @tolower(i32 %conv14) #1
+ %sub = sub nsw i32 %call13, %call15
+ ret i32 %sub
+}
+
+declare i32 @tolower(i32) #5
+
+; Function Attrs: nounwind readonly
+define i32 @strcmp(i8* nocapture %l, i8* nocapture %r) #2 {
+entry:
+ %0 = load i8* %l, align 1, !tbaa !1
+ %1 = load i8* %r, align 1, !tbaa !1
+ %cmp10 = icmp ne i8 %0, %1
+ %tobool11 = icmp eq i8 %0, 0
+ %or.cond12 = or i1 %cmp10, %tobool11
+ %tobool513 = icmp eq i8 %1, 0
+ %or.cond814 = or i1 %or.cond12, %tobool513
+ br i1 %or.cond814, label %for.end, label %for.inc
+
+for.inc: ; preds = %for.inc, %entry
+ %r.addr.016 = phi i8* [ %incdec.ptr6, %for.inc ], [ %r, %entry ]
+ %l.addr.015 = phi i8* [ %incdec.ptr, %for.inc ], [ %l, %entry ]
+ %incdec.ptr = getelementptr inbounds i8* %l.addr.015, i32 1
+ %incdec.ptr6 = getelementptr inbounds i8* %r.addr.016, i32 1
+ %2 = load i8* %incdec.ptr, align 1, !tbaa !1
+ %3 = load i8* %incdec.ptr6, align 1, !tbaa !1
+ %cmp = icmp ne i8 %2, %3
+ %tobool = icmp eq i8 %2, 0
+ %or.cond = or i1 %cmp, %tobool
+ %tobool5 = icmp eq i8 %3, 0
+ %or.cond8 = or i1 %or.cond, %tobool5
+ br i1 %or.cond8, label %for.end, label %for.inc
+
+for.end: ; preds = %for.inc, %entry
+ %.lcssa9 = phi i8 [ %1, %entry ], [ %3, %for.inc ]
+ %.lcssa = phi i8 [ %0, %entry ], [ %2, %for.inc ]
+ %conv7 = zext i8 %.lcssa to i32
+ %conv8 = zext i8 %.lcssa9 to i32
+ %sub = sub nsw i32 %conv7, %conv8
+ ret i32 %sub
+}
+
+; Function Attrs: nounwind
+define i32 @strncasecmp(i8* nocapture %_l, i8* nocapture %_r, i32 %n) #0 {
+entry:
+ %tobool = icmp eq i32 %n, 0
+ br i1 %tobool, label %return, label %for.cond.preheader
+
+for.cond.preheader: ; preds = %entry
+ %0 = load i8* %_l, align 1, !tbaa !1
+ %tobool115 = icmp eq i8 %0, 0
+ br i1 %tobool115, label %for.end, label %land.lhs.true.lr.ph
+
+land.lhs.true.lr.ph: ; preds = %for.cond.preheader
+ %conv14 = zext i8 %0 to i32
+ br label %land.lhs.true
+
+land.lhs.true: ; preds = %for.inc, %land.lhs.true.lr.ph
+ %conv19 = phi i32 [ %conv14, %land.lhs.true.lr.ph ], [ %conv, %for.inc ]
+ %1 = phi i8 [ %0, %land.lhs.true.lr.ph ], [ %4, %for.inc ]
+ %n.addr.018.in = phi i32 [ %n, %land.lhs.true.lr.ph ], [ %n.addr.018, %for.inc ]
+ %r.017 = phi i8* [ %_r, %land.lhs.true.lr.ph ], [ %incdec.ptr14, %for.inc ]
+ %l.016 = phi i8* [ %_l, %land.lhs.true.lr.ph ], [ %incdec.ptr, %for.inc ]
+ %n.addr.018 = add i32 %n.addr.018.in, -1
+ %2 = load i8* %r.017, align 1, !tbaa !1
+ %tobool3 = icmp eq i8 %2, 0
+ %tobool5 = icmp eq i32 %n.addr.018, 0
+ %or.cond = or i1 %tobool3, %tobool5
+ br i1 %or.cond, label %for.end, label %land.rhs
+
+land.rhs: ; preds = %land.lhs.true
+ %cmp = icmp eq i8 %1, %2
+ br i1 %cmp, label %for.inc, label %lor.rhs
+
+lor.rhs: ; preds = %land.rhs
+ %call = tail call i32 @tolower(i32 %conv19) #1
+ %3 = load i8* %r.017, align 1, !tbaa !1
+ %conv10 = zext i8 %3 to i32
+ %call11 = tail call i32 @tolower(i32 %conv10) #1
+ %cmp12 = icmp eq i32 %call, %call11
+ br i1 %cmp12, label %for.inc, label %lor.rhs.for.endsplit_crit_edge
+
+lor.rhs.for.endsplit_crit_edge: ; preds = %lor.rhs
+ %.pre.pre = load i8* %l.016, align 1, !tbaa !1
+ br label %for.end
+
+for.inc: ; preds = %lor.rhs, %land.rhs
+ %incdec.ptr = getelementptr inbounds i8* %l.016, i32 1
+ %incdec.ptr14 = getelementptr inbounds i8* %r.017, i32 1
+ %4 = load i8* %incdec.ptr, align 1, !tbaa !1
+ %conv = zext i8 %4 to i32
+ %tobool1 = icmp eq i8 %4, 0
+ br i1 %tobool1, label %for.end, label %land.lhs.true
+
+for.end: ; preds = %for.inc, %lor.rhs.for.endsplit_crit_edge, %land.lhs.true, %for.cond.preheader
+ %5 = phi i8 [ 0, %for.cond.preheader ], [ %.pre.pre, %lor.rhs.for.endsplit_crit_edge ], [ %1, %land.lhs.true ], [ 0, %for.inc ]
+ %r.0.lcssa = phi i8* [ %_r, %for.cond.preheader ], [ %r.017, %lor.rhs.for.endsplit_crit_edge ], [ %r.017, %land.lhs.true ], [ %incdec.ptr14, %for.inc ]
+ %conv16 = zext i8 %5 to i32
+ %call17 = tail call i32 @tolower(i32 %conv16) #1
+ %6 = load i8* %r.0.lcssa, align 1, !tbaa !1
+ %conv18 = zext i8 %6 to i32
+ %call19 = tail call i32 @tolower(i32 %conv18) #1
+ %sub = sub nsw i32 %call17, %call19
+ br label %return
+
+return: ; preds = %for.end, %entry
+ %retval.0 = phi i32 [ %sub, %for.end ], [ 0, %entry ]
+ ret i32 %retval.0
+}
+
+; Function Attrs: nounwind readonly
+define i32 @strncmp(i8* nocapture %_l, i8* nocapture %_r, i32 %n) #2 {
+entry:
+ %tobool = icmp eq i32 %n, 0
+ br i1 %tobool, label %return, label %for.cond.preheader
+
+for.cond.preheader: ; preds = %entry
+ %0 = load i8* %_l, align 1, !tbaa !1
+ %tobool113 = icmp eq i8 %0, 0
+ br i1 %tobool113, label %for.end, label %land.lhs.true
+
+land.lhs.true: ; preds = %for.inc, %for.cond.preheader
+ %1 = phi i8 [ %3, %for.inc ], [ %0, %for.cond.preheader ]
+ %n.addr.016.in = phi i32 [ %n.addr.016, %for.inc ], [ %n, %for.cond.preheader ]
+ %r.015 = phi i8* [ %incdec.ptr9, %for.inc ], [ %_r, %for.cond.preheader ]
+ %l.014 = phi i8* [ %incdec.ptr, %for.inc ], [ %_l, %for.cond.preheader ]
+ %n.addr.016 = add i32 %n.addr.016.in, -1
+ %2 = load i8* %r.015, align 1, !tbaa !1
+ %notlhs = icmp ne i8 %2, 0
+ %notrhs = icmp ne i32 %n.addr.016, 0
+ %or.cond.not = and i1 %notrhs, %notlhs
+ %cmp = icmp eq i8 %1, %2
+ %or.cond11 = and i1 %or.cond.not, %cmp
+ br i1 %or.cond11, label %for.inc, label %for.end
+
+for.inc: ; preds = %land.lhs.true
+ %incdec.ptr = getelementptr inbounds i8* %l.014, i32 1
+ %incdec.ptr9 = getelementptr inbounds i8* %r.015, i32 1
+ %3 = load i8* %incdec.ptr, align 1, !tbaa !1
+ %tobool1 = icmp eq i8 %3, 0
+ br i1 %tobool1, label %for.end, label %land.lhs.true
+
+for.end: ; preds = %for.inc, %land.lhs.true, %for.cond.preheader
+ %4 = phi i8 [ 0, %for.cond.preheader ], [ %1, %land.lhs.true ], [ 0, %for.inc ]
+ %r.0.lcssa = phi i8* [ %_r, %for.cond.preheader ], [ %r.015, %land.lhs.true ], [ %incdec.ptr9, %for.inc ]
+ %conv11 = zext i8 %4 to i32
+ %5 = load i8* %r.0.lcssa, align 1, !tbaa !1
+ %conv12 = zext i8 %5 to i32
+ %sub = sub nsw i32 %conv11, %conv12
+ br label %return
+
+return: ; preds = %for.end, %entry
+ %retval.0 = phi i32 [ %sub, %for.end ], [ 0, %entry ]
+ ret i32 %retval.0
+}
+
+attributes #0 = { nounwind "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf"="true" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "unsafe-fp-math"="false" "use-soft-float"="false" }
+attributes #1 = { nounwind }
+attributes #2 = { nounwind readonly "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf"="true" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "unsafe-fp-math"="false" "use-soft-float"="false" }
+attributes #3 = { nounwind readnone "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf"="true" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "unsafe-fp-math"="false" "use-soft-float"="false" }
+attributes #4 = { noreturn "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf"="true" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "unsafe-fp-math"="false" "use-soft-float"="false" }
+attributes #5 = { "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf"="true" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "unsafe-fp-math"="false" "use-soft-float"="false" }
+attributes #6 = { noreturn nounwind }
+attributes #7 = { nounwind readnone }
+attributes #8 = { noreturn }
+
+!0 = metadata !{metadata !"any pointer", metadata !1}
+!1 = metadata !{metadata !"omnipotent char", metadata !2}
+!2 = metadata !{metadata !"Simple C/C++ TBAA"}
+!3 = metadata !{metadata !"int", metadata !1}
+!4 = metadata !{metadata !"short", metadata !1}
+!5 = metadata !{metadata !"branch_weights", i32 64, i32 4}
+!6 = metadata !{metadata !"branch_weights", i32 4, i32 64}
+!7 = metadata !{i64 0, i64 4, metadata !0, i64 4, i64 4, metadata !3, i64 8, i64 4, metadata !0, i64 12, i64 4, metadata !3}
+!8 = metadata !{metadata !"vtable pointer", metadata !2}
diff --git a/tests/cases/i24_ce_fastcomp.txt b/tests/cases/i24_ce_fastcomp.txt
new file mode 100644
index 00000000..12024aa3
--- /dev/null
+++ b/tests/cases/i24_ce_fastcomp.txt
@@ -0,0 +1 @@
+checksum = ADDDE3F6
diff --git a/tests/cases/i24_mem_ta2.ll b/tests/cases/i24_mem_ta2.ll
index 550389fe..296c8c0b 100644
--- a/tests/cases/i24_mem_ta2.ll
+++ b/tests/cases/i24_mem_ta2.ll
@@ -1,6 +1,6 @@
; ModuleID = 'tests/hello_world.bc'
-target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
-target triple = "le32-unknown-nacl"
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:128-n32-S128"
+target triple = "asmjs-unknown-emscripten"
@.str = private unnamed_addr constant [6 x i8] c".%x.\0A\00", align 1 ; [#uses=1 type=[5 x i8]*]
diff --git a/tests/cases/i96_ashr_ta2.ll b/tests/cases/i96_ashr_ta2.ll
index 83966168..2800ad0d 100644
--- a/tests/cases/i96_ashr_ta2.ll
+++ b/tests/cases/i96_ashr_ta2.ll
@@ -1,6 +1,6 @@
; ModuleID = 'tests/hello_world.bc'
-target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
-target triple = "le32-unknown-nacl"
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:128-n32-S128"
+target triple = "asmjs-unknown-emscripten"
@.str = private unnamed_addr constant [23 x i8] c"hello..world!%x,%x,%x\0A\00", align 1
diff --git a/tests/cases/i96shiftnon32_ta2.ll b/tests/cases/i96shiftnon32_ta2.ll
index 55e84575..3a3ba5fd 100644
--- a/tests/cases/i96shiftnon32_ta2.ll
+++ b/tests/cases/i96shiftnon32_ta2.ll
@@ -1,6 +1,6 @@
; ModuleID = '/tmp/tmpxFUbAg/test_emcc1.bc'
-target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
-target triple = "le32-unknown-nacl"
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:128-n32-S128"
+target triple = "asmjs-unknown-emscripten"
%struct.c_s = type { i8, float, i32 }
diff --git a/tests/cases/icmp64.ll b/tests/cases/icmp64.ll
new file mode 100644
index 00000000..440ff6f9
--- /dev/null
+++ b/tests/cases/icmp64.ll
@@ -0,0 +1,32 @@
+; ModuleID = 'tests/hello_world.bc'
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:128-n32-S128"
+target triple = "asmjs-unknown-emscripten"
+
+@.str = private unnamed_addr constant [17 x i8] c"hello, world %d\0A\00", align 1 ; [#uses=1 type=[15 x i8]*]
+
+; [#uses=0]
+define i32 @main() {
+entry:
+ %retval = alloca i32, align 4 ; [#uses=1 type=i32*]
+ store i32 0, i32* %retval
+ %a0 = add i64 0, 0
+ %a1 = icmp slt i64 %a0, 0
+ %a2 = zext i1 %a1 to i32
+ %calla = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([17 x i8]* @.str, i32 0, i32 0), i32 %a2)
+ %b0 = add i64 0, 1
+ %b1 = icmp slt i64 %b0, 0
+ %b2 = zext i1 %b1 to i32
+ %callb = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([17 x i8]* @.str, i32 0, i32 0), i32 %b2)
+ %c0 = sub i64 1, 0
+ %c1 = icmp slt i64 %c0, 0
+ %c2 = zext i1 %c1 to i32
+ %callc = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([17 x i8]* @.str, i32 0, i32 0), i32 %c2)
+ %d0 = sub i64 0, 1
+ %d1 = icmp slt i64 %d0, 0
+ %d2 = zext i1 %d1 to i32
+ %calld = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([17 x i8]* @.str, i32 0, i32 0), i32 %d2)
+ ret i32 1
+}
+
+; [#uses=1]
+declare i32 @printf(i8*, ...)
diff --git a/tests/cases/icmp64.txt b/tests/cases/icmp64.txt
new file mode 100644
index 00000000..5e75a06b
--- /dev/null
+++ b/tests/cases/icmp64.txt
@@ -0,0 +1,4 @@
+hello, world 0
+hello, world 0
+hello, world 0
+hello, world 1
diff --git a/tests/cases/inttoptr.ll b/tests/cases/inttoptr.ll
index c1b40a74..7682bed1 100644
--- a/tests/cases/inttoptr.ll
+++ b/tests/cases/inttoptr.ll
@@ -1,6 +1,6 @@
; ModuleID = '/tmp/emscripten/tmp/src.cpp.o'
-target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
-target triple = "le32-unknown-nacl"
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:128-n32-S128"
+target triple = "asmjs-unknown-emscripten"
@.str = private constant [14 x i8] c"hello, world!\00", align 1 ; [#uses=1]
diff --git a/tests/cases/invokebitcast.ll b/tests/cases/invokebitcast.ll
index ec090b0d..ecbce6dd 100644
--- a/tests/cases/invokebitcast.ll
+++ b/tests/cases/invokebitcast.ll
@@ -1,7 +1,7 @@
; ModuleID = '/dev/shm/tmp/src.cpp.o'
; Just test for compilation here
-target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
-target triple = "le32-unknown-nacl"
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:128-n32-S128"
+target triple = "asmjs-unknown-emscripten"
%struct.CPU_Regs = type { [8 x %union.GenReg32] }
%union.GenReg32 = type { [1 x i32] }
@@ -10,7 +10,7 @@ target triple = "le32-unknown-nacl"
@.str = private unnamed_addr constant [14 x i8] c"hello, world!\00", align 1 ; [#uses=1]
; [#uses=0]
-define i32 @main() {
+define i32 @main(i32 %p) {
entry:
%retval = alloca i32 ; [#uses=2]
%0 = alloca i32 ; [#uses=2]
@@ -24,13 +24,15 @@ entry:
store i32 %3, i32* %retval, align 4
br label %return
- invoke void bitcast (void (i32*, i32)* @_Z8toStringj to void (i64*, i32)*)(%struct.CPU_Regs* noalias @cpu_regs, i32 %99)
+ invoke void bitcast (void (i32*, i32)* @_Z8toStringj to void (i64*, i32)*)(i64* bitcast (%struct.CPU_Regs* @cpu_regs to i64*), i32 %p)
to label %invcont33 unwind label %lpad106
invcont33:
ret i32 %retval1
lpad106:
+ %Z = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
+ cleanup
ret i32 %retval1
return: ; preds = %entry
@@ -40,3 +42,6 @@ return: ; preds = %entry
; [#uses=1]
declare i32 @puts(i8*)
+
+declare void @_Z8toStringj(i32*, i32)
+declare i32 @__gxx_personality_v0(...)
diff --git a/tests/cases/invokeundef.ll b/tests/cases/invokeundef.ll
index 2f13e7ab..e24763d9 100644
--- a/tests/cases/invokeundef.ll
+++ b/tests/cases/invokeundef.ll
@@ -1,7 +1,7 @@
; ModuleID = '/dev/shm/tmp/src.cpp.o'
; Just test for compilation here
-target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
-target triple = "le32-unknown-nacl"
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:128-n32-S128"
+target triple = "asmjs-unknown-emscripten"
%struct.CPU_Regs = type { [8 x %union.GenReg32] }
%union.GenReg32 = type { [1 x i32] }
diff --git a/tests/cases/legalizer_b_ta2.ll b/tests/cases/legalizer_b_ta2.ll
index a6214100..78b5dc04 100644
--- a/tests/cases/legalizer_b_ta2.ll
+++ b/tests/cases/legalizer_b_ta2.ll
@@ -1,6 +1,6 @@
; ModuleID = 'tests/hello_world.bc'
-target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
-target triple = "le32-unknown-nacl"
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:128-n32-S128"
+target triple = "asmjs-unknown-emscripten"
@globaliz = global [300 x i8] zeroinitializer
@@ -92,7 +92,7 @@ entry:
store i128 %ored, i128* %bundled, align 4
call i32 (i8*)* @puts(i8* %buffer)
- %ander = trunc i128 18402271027389267967 to i128
+ %ander = bitcast i128 18402271027389267967 to i128
%anded = and i128 %loaded, %ander ; variable
store i128 %anded, i128* %bundled, align 4
call i32 (i8*)* @puts(i8* %buffer)
diff --git a/tests/cases/legalizer_ta2.ll b/tests/cases/legalizer_ta2.ll
index 6f153ad2..1cd89220 100644
--- a/tests/cases/legalizer_ta2.ll
+++ b/tests/cases/legalizer_ta2.ll
@@ -1,6 +1,6 @@
; ModuleID = 'tests/hello_world.bc'
-target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
-target triple = "le32-unknown-nacl"
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:128-n32-S128"
+target triple = "asmjs-unknown-emscripten"
@globaliz = global [300 x i8] zeroinitializer
diff --git a/tests/cases/loadbitcastgep.ll b/tests/cases/loadbitcastgep.ll
index cfb88a0d..311329f3 100644
--- a/tests/cases/loadbitcastgep.ll
+++ b/tests/cases/loadbitcastgep.ll
@@ -1,6 +1,6 @@
; ModuleID = '/dev/shm/tmp/src.cpp.o'
-target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
-target triple = "le32-unknown-nacl"
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:128-n32-S128"
+target triple = "asmjs-unknown-emscripten"
%struct.CPU_Regs = type { [8 x %union.GenReg32] }
%union.GenReg32 = type { [1 x i32] }
diff --git a/tests/cases/muli33_ta2.ll b/tests/cases/muli33_ta2.ll
index b33b04f7..e6f092cd 100644
--- a/tests/cases/muli33_ta2.ll
+++ b/tests/cases/muli33_ta2.ll
@@ -1,6 +1,6 @@
; ModuleID = '/tmp/tmpt0JpDh/a.out.bc'
-target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
-target triple = "le32-unknown-nacl"
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:128-n32-S128"
+target triple = "asmjs-unknown-emscripten"
@.str = private unnamed_addr constant [7 x i8] c"20\0A91\0A\00", align 1
@.str1 = private unnamed_addr constant [6 x i8] c"%u %u\00", align 1
diff --git a/tests/cases/oob_ta2.ll b/tests/cases/oob_ta2.ll
index b95d28da..3c06573e 100644
--- a/tests/cases/oob_ta2.ll
+++ b/tests/cases/oob_ta2.ll
@@ -1,6 +1,6 @@
; ModuleID = 'tests/hello_world.bc'
-target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
-target triple = "le32-unknown-nacl"
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:128-n32-S128"
+target triple = "asmjs-unknown-emscripten"
%structy = type { [2 x [10 x i8]] }
diff --git a/tests/cases/phi24_ta2.ll b/tests/cases/phi24_ta2.ll
index 18577fee..0edb36be 100644
--- a/tests/cases/phi24_ta2.ll
+++ b/tests/cases/phi24_ta2.ll
@@ -1,6 +1,6 @@
-target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
-target triple = "le32-unknown-nacl"
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:128-n32-S128"
+target triple = "asmjs-unknown-emscripten"
%union.U4 = type { i32 }
%union.U3 = type { i8* }
diff --git a/tests/cases/phicubed.ll b/tests/cases/phicubed.ll
index 5fc3208b..90f91e9c 100644
--- a/tests/cases/phicubed.ll
+++ b/tests/cases/phicubed.ll
@@ -1,6 +1,6 @@
; ModuleID = '/dev/shm/tmp/src.cpp.o'
-target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
-target triple = "le32-unknown-nacl"
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:128-n32-S128"
+target triple = "asmjs-unknown-emscripten"
%struct.worker_args = type { i32, %struct.worker_args* }
diff --git a/tests/cases/phientryimplicit.ll b/tests/cases/phientryimplicit.ll
index c237457c..1dc5f2c7 100644
--- a/tests/cases/phientryimplicit.ll
+++ b/tests/cases/phientryimplicit.ll
@@ -1,6 +1,6 @@
; ModuleID = 'tests/hello_world.bc'
-target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
-target triple = "le32-unknown-nacl"
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:128-n32-S128"
+target triple = "asmjs-unknown-emscripten"
; Phi nodes can refer to the entry. And the entry might be unnamed, and doesn't even have a consistent implicit name!
@@ -10,14 +10,14 @@ target triple = "le32-unknown-nacl"
define i32 @main() {
%retval = alloca i32, align 4 ; [#uses=1 type=i32*]
%a16 = trunc i32 1 to i1
- br i1 %a16, label %L17, label %L26, !dbg !1269853 ; [debug line = 3920:5]
+ br i1 %a16, label %L17, label %L26
L17:
%a25 = trunc i32 1 to i1
br label %L26
L26:
- %a27 = phi i1 [ false, %1 ], [ %a25, %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
@@ -27,7 +27,7 @@ L26:
define i32 @main0() {
%retval = alloca i32, align 4 ; [#uses=1 type=i32*]
%a16 = trunc i32 1 to i1
- br i1 %a16, label %L17, label %L26, !dbg !1269853 ; [debug line = 3920:5]
+ br i1 %a16, label %L17, label %L26
L17:
%a25 = trunc i32 1 to i1
diff --git a/tests/cases/phientryimplicitmix.ll b/tests/cases/phientryimplicitmix.ll
index 527c761f..8903e783 100644
--- a/tests/cases/phientryimplicitmix.ll
+++ b/tests/cases/phientryimplicitmix.ll
@@ -1,6 +1,6 @@
; ModuleID = 'tests/hello_world.bc'
-target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
-target triple = "le32-unknown-nacl"
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:128-n32-S128"
+target triple = "asmjs-unknown-emscripten"
; Phi nodes can refer to the entry. And the entry might be unnamed, and doesn't even have a consistent implicit name!
diff --git a/tests/cases/phientryimplicitmoar.ll b/tests/cases/phientryimplicitmoar.ll
index 0f07cc44..ad1e701c 100644
--- a/tests/cases/phientryimplicitmoar.ll
+++ b/tests/cases/phientryimplicitmoar.ll
@@ -1,6 +1,6 @@
; ModuleID = 'tests/hello_world.bc'
-target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
-target triple = "le32-unknown-nacl"
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:128-n32-S128"
+target triple = "asmjs-unknown-emscripten"
@.str = private unnamed_addr constant [15 x i8] c"hello, world!\0A\00", align 1 ; [#uses=1 type=[15 x i8]*]
@.str2 = private unnamed_addr constant [15 x i8] c"hello!!world!\0A\00", align 1 ; [#uses=1 type=[15 x i8]*]
diff --git a/tests/cases/philoop_ta2.ll b/tests/cases/philoop_ta2.ll
index 5036c7ba..b73aefc3 100644
--- a/tests/cases/philoop_ta2.ll
+++ b/tests/cases/philoop_ta2.ll
@@ -1,6 +1,6 @@
; ModuleID = '/tmp/tmpVIBz29/a.out.bc'
-target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
-target triple = "le32-unknown-nacl"
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:128-n32-S128"
+target triple = "asmjs-unknown-emscripten"
@.str = private unnamed_addr constant [13 x i8] c"99\0A70\0A26\0A97\0A\00", align 1
@.str1 = private unnamed_addr constant [12 x i8] c"%u %u %u %u\00", align 1
diff --git a/tests/cases/phinonexist.ll b/tests/cases/phinonexist.ll
index 145d2221..75c1cef6 100644
--- a/tests/cases/phinonexist.ll
+++ b/tests/cases/phinonexist.ll
@@ -5,18 +5,19 @@ target triple = "i386-pc-linux-gnu"
@.str = private unnamed_addr constant [15 x i8] c"hello, world!\0A\00", align 1 ; [#uses=1 type=[15 x i8]*]
define i32 @main() {
+entry:
%retval = alloca i32, align 4
%a12 = zext i1 1 to i32
- br label %13
+ br label %label13
-; <label>:13 ; preds = %13, %1
- %a14 = phi i32 [ %a12, %1 ], [ %a15, %135 ]
+label13: ; preds = %13, %1
+ %a14 = phi i32 [ %a12, %entry ], [ %a15, %135 ]
%call0 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([15 x i8]* @.str, i32 0, i32 0))
%a15 = add nsw i32 %a14, 2
%a16 = icmp eq i32 %a15, 9
- br label %17
+ br label %label17
-; <label>:17 ; preds = %1
+label17: ; preds = %1
ret i32 1
}
diff --git a/tests/cases/phinonreachable64.ll b/tests/cases/phinonreachable64.ll
new file mode 100644
index 00000000..fe56fc09
--- /dev/null
+++ b/tests/cases/phinonreachable64.ll
@@ -0,0 +1,26 @@
+; ModuleID = 'tests/hello_world.bc'
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:128-n32-S128"
+target triple = "asmjs-unknown-emscripten"
+
+@.str = private unnamed_addr constant [15 x i8] c"hello, world!\0A\00", align 1 ; [#uses=1 type=[15 x i8]*]
+
+define i32 @main() {
+_entry:
+ %retval = alloca i32, align 4
+ %a12 = zext i1 1 to i64
+ br label %_phinode
+
+_nonreachable:
+ %b = zext i32 -1 to i64
+ br label %_phinode
+
+_phinode:
+ %a14 = phi i64 [ %a12, %_entry ], [ %b, %_nonreachable ]
+ %a14s = trunc i64 %a14 to i32
+ %call0 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([15 x i8]* @.str, i32 0, i32 0))
+ ret i32 %a14s
+}
+
+; [#uses=1]
+declare i32 @printf(i8*, ...)
+
diff --git a/tests/cases/phiptrtoint.ll b/tests/cases/phiptrtoint.ll
index d682dc06..2028f494 100644
--- a/tests/cases/phiptrtoint.ll
+++ b/tests/cases/phiptrtoint.ll
@@ -1,7 +1,7 @@
; ModuleID = '/tmp/tmpJctwj0/bug.bc'
; just an asm validation check, no output
-target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
-target triple = "le32-unknown-nacl"
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:128-n32-S128"
+target triple = "asmjs-unknown-emscripten"
%"class.test::Processor" = type { i32, %"class.test::StateMachine" }
%"class.test::StateMachine" = type { { i32, i32 } }
diff --git a/tests/cases/phiself.ll b/tests/cases/phiself.ll
index 0a06fcca..72572859 100644
--- a/tests/cases/phiself.ll
+++ b/tests/cases/phiself.ll
@@ -1,6 +1,6 @@
; ModuleID = '/tmp/emscripten_temp/src.cpp.o'
-target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
-target triple = "le32-unknown-nacl"
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:128-n32-S128"
+target triple = "asmjs-unknown-emscripten"
@.str = private unnamed_addr constant [7 x i8] c"cheez\0A\00", align 1
@.str1 = private unnamed_addr constant [6 x i8] c"*%d*\0A\00", align 1
diff --git a/tests/cases/ptrtoi64.ll b/tests/cases/ptrtoi64.ll
index 5898f529..e22b60dc 100644
--- a/tests/cases/ptrtoi64.ll
+++ b/tests/cases/ptrtoi64.ll
@@ -1,8 +1,8 @@
; pointer to i64, then to i32
; ModuleID = '/tmp/emscripten/tmp/src.cpp.o'
-target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
-target triple = "le32-unknown-nacl"
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:128-n32-S128"
+target triple = "asmjs-unknown-emscripten"
@.str2 = private constant [9 x i8] c"*%d,%d*\0A\00", align 1 ; [#uses=1]
diff --git a/tests/cases/ptrtoint_blockaddr.ll b/tests/cases/ptrtoint_blockaddr.ll
index 6adc2c5b..f9f72449 100644
--- a/tests/cases/ptrtoint_blockaddr.ll
+++ b/tests/cases/ptrtoint_blockaddr.ll
@@ -1,6 +1,6 @@
; ModuleID = 'tests/hello_world.bc'
-target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
-target triple = "le32-unknown-nacl"
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:128-n32-S128"
+target triple = "asmjs-unknown-emscripten"
@.str = private constant [15 x i8] c"hello, world!\0A\00", align 1 ; [#uses=1]
diff --git a/tests/cases/quotedlabel.ll b/tests/cases/quotedlabel.ll
index d32e380a..d4b8639c 100644
--- a/tests/cases/quotedlabel.ll
+++ b/tests/cases/quotedlabel.ll
@@ -13,7 +13,7 @@ entry:
br label %"finish$$$"
"finish$$$": ; preds = %entry
- %0 = call i32 bitcast (i32 (i8*)* @puts to i32 (i32*)*)(i8* getelementptr inbounds ([14 x i8]* @.str, i32 0, i32 0)) ; [#uses=0]
+ %0 = call i32 bitcast (i32 (i8*)* @puts to i32 (i32*)*)(i32* bitcast (i8* getelementptr inbounds ([14 x i8]* @.str, i32 0, i32 0) to i32*)) ; [#uses=0]
ret i32 0
}
diff --git a/tests/cases/returnnan_fastcomp.ll b/tests/cases/returnnan_fastcomp.ll
new file mode 100644
index 00000000..3a6a9f9e
--- /dev/null
+++ b/tests/cases/returnnan_fastcomp.ll
@@ -0,0 +1,34 @@
+; ModuleID = 'tests/hello_world.bc'
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:128-n32-S128"
+target triple = "asmjs-unknown-emscripten"
+
+@.str = private unnamed_addr constant [18 x i8] c"hello, world %f!\0A\00", align 1
+
+define i32 @main() {
+entry:
+ %retval = alloca i32, align 4
+ store i32 0, i32* %retval
+ %f = call double @nand()
+ %call = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([18 x i8]* @.str, i32 0, i32 0), double %f)
+ %g = call double @zerod()
+ %call2 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([18 x i8]* @.str, i32 0, i32 0), double %g)
+ %h = call float @zerof()
+ %hd = fpext float %h to double
+ %call3 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([18 x i8]* @.str, i32 0, i32 0), double %hd)
+ ret i32 1
+}
+
+define double @nand() unnamed_addr align 2 {
+ ret double 0x7FF8000000000000
+}
+
+define double @zerod() unnamed_addr align 2 {
+ ret double 0x0000000000000000
+}
+
+define float @zerof() unnamed_addr align 2 {
+ ret float 0x0000000000000000
+}
+
+declare i32 @printf(i8*, ...)
+
diff --git a/tests/cases/returnnan_fastcomp.txt b/tests/cases/returnnan_fastcomp.txt
new file mode 100644
index 00000000..f11733ba
--- /dev/null
+++ b/tests/cases/returnnan_fastcomp.txt
@@ -0,0 +1,3 @@
+hello, world nan!
+hello, world 0.000000!
+hello, world 0.000000!
diff --git a/tests/cases/sillybitcast.ll b/tests/cases/sillybitcast.ll
index 50a54da9..e9baf74d 100644
--- a/tests/cases/sillybitcast.ll
+++ b/tests/cases/sillybitcast.ll
@@ -1,13 +1,13 @@
; ModuleID = '/tmp/emscripten/tmp/src.cpp.o'
-target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
-target triple = "le32-unknown-nacl"
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:128-n32-S128"
+target triple = "asmjs-unknown-emscripten"
@.str = private constant [14 x i8] c"hello, world!\00", align 1 ; [#uses=1]
; [#uses=2]
-define void @"\01_Z5hellov"() {
+define void @"_Z5hellov"() {
entry:
- %0 = call i32 bitcast (i32 (i8*)* @puts to i32 (i32*)*)(i8* getelementptr inbounds ([14 x i8]* @.str, i32 0, i32 0)) ; [#uses=0]
+ %0 = call i32 bitcast (i32 (i8*)* @puts to i32 (i32*)*)(i32* bitcast (i8* getelementptr inbounds ([14 x i8]* @.str, i32 0, i32 0) to i32*)) ; [#uses=0]
br label %return
return: ; preds = %entry
@@ -23,7 +23,7 @@ entry:
%retval = alloca i32 ; [#uses=2]
%0 = alloca i32 ; [#uses=2]
%"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- call void @"\01_Z5hellov"()
+ call void @"_Z5hellov"()
store i32 0, i32* %0, align 4
%1 = load i32* %0, align 4 ; [#uses=1]
store i32 %1, i32* %retval, align 4
diff --git a/tests/cases/sillybitcast2.ll b/tests/cases/sillybitcast2.ll
index 02cf8615..6ef0f32d 100644
--- a/tests/cases/sillybitcast2.ll
+++ b/tests/cases/sillybitcast2.ll
@@ -1,6 +1,6 @@
; ModuleID = '/tmp/emscripten/tmp/src.cpp.o'
-target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
-target triple = "le32-unknown-nacl"
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:128-n32-S128"
+target triple = "asmjs-unknown-emscripten"
@.str = private constant [14 x i8] c"hello, world!\00", align 1 ; [#uses=1]
diff --git a/tests/cases/sillyfuncast.ll b/tests/cases/sillyfuncast.ll
index 33598104..af03e975 100644
--- a/tests/cases/sillyfuncast.ll
+++ b/tests/cases/sillyfuncast.ll
@@ -1,6 +1,6 @@
; ModuleID = 'tests/hello_world.bc'
-target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
-target triple = "le32-unknown-nacl"
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:128-n32-S128"
+target triple = "asmjs-unknown-emscripten"
@.str = private unnamed_addr constant [15 x i8] c"hello, world!\0A\00", align 1 ; [#uses=1 type=[15 x i8]*]
diff --git a/tests/cases/sillyfuncast2.ll b/tests/cases/sillyfuncast2_noasm.ll
index f72ebe28..6c55b990 100644
--- a/tests/cases/sillyfuncast2.ll
+++ b/tests/cases/sillyfuncast2_noasm.ll
@@ -14,6 +14,7 @@ entry:
%retval = alloca i32, align 4 ; [#uses=1 type=i32*]
store i32 0, i32* %retval
call i32 bitcast (void (i32, i32)* @doit to i32 (i32, i64)*)(i32 0, i64 0) nounwind
+ call void bitcast (void (i32, i32)* @doit to void (i32, float)*)(i32 0, float 0.0) nounwind
ret i32 1
}
diff --git a/tests/cases/storebigfloat.ll b/tests/cases/storebigfloat.ll
index b940f5ca..6348fd5f 100644
--- a/tests/cases/storebigfloat.ll
+++ b/tests/cases/storebigfloat.ll
@@ -1,5 +1,5 @@
-target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
-target triple = "le32-unknown-nacl"
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:128-n32-S128"
+target triple = "asmjs-unknown-emscripten"
@.str = private unnamed_addr constant [15 x i8] c"hello, world!\0A\00", align 1 ; [#uses=1 type=[15 x i8]*]
diff --git a/tests/cases/storestruct.ll b/tests/cases/storestruct.ll
index 3e996195..272b8d5a 100644
--- a/tests/cases/storestruct.ll
+++ b/tests/cases/storestruct.ll
@@ -1,6 +1,6 @@
; ModuleID = '/dev/shm/tmp/src.cpp.o'
-target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
-target triple = "le32-unknown-nacl"
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:128-n32-S128"
+target triple = "asmjs-unknown-emscripten"
; Load and store an entire structure as a whole (and also load as a whole, extract values and save separately, etc.)
diff --git a/tests/cases/structinparam.ll b/tests/cases/structinparam.ll
index d81f5e67..a85a50ae 100644
--- a/tests/cases/structinparam.ll
+++ b/tests/cases/structinparam.ll
@@ -1,6 +1,6 @@
; ModuleID = 'min.bc'
-target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
-target triple = "le32-unknown-nacl"
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:128-n32-S128"
+target triple = "asmjs-unknown-emscripten"
%ac = type { i8*, i32 }
diff --git a/tests/cases/structparam.ll b/tests/cases/structparam.ll
index c59ad600..53ee5a93 100644
--- a/tests/cases/structparam.ll
+++ b/tests/cases/structparam.ll
@@ -27,7 +27,7 @@ cond.end: ; preds = %cond.false, %cond.t
%cond = phi { i32, i32 } [ { i32 5, i32 6 }, %entry ], [ zeroinitializer, %cond.null ] ; [#uses=1]
store { i32, i32 } %cond, { i32, i32 }* %comp
%call = call i32 (i32, { i32, i32 })* @doit(i32 1, { i32, i32 } %cond) ;
- store { i32, i32 } { i32 ptrtoint (i64* @_dispatchTable to i32), i32 0 }, { i32, i32 }* getelementptr inbounds ([1 x i64]* @_dispatchTable, i32 0, i32 0, i32 1), align 4
+ store { i32, i32 } { i32 ptrtoint (i64* @_dispatchTable to i32), i32 0 }, { i32, i32 }* bitcast (i64* getelementptr inbounds ([1 x i64]* bitcast (i64* @_dispatchTable to [1 x i64]*), i32 0, i32 0) to { i32, i32 }*), align 4
ret i32 0 ; [debug line = 6:13]
}
diff --git a/tests/cases/structphiparam.ll b/tests/cases/structphiparam.ll
index fadf4d29..8ce7b9ae 100644
--- a/tests/cases/structphiparam.ll
+++ b/tests/cases/structphiparam.ll
@@ -1,6 +1,6 @@
; ModuleID = '/dev/shm/tmp/src.cpp.o'
-target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
-target triple = "le32-unknown-nacl"
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:128-n32-S128"
+target triple = "asmjs-unknown-emscripten"
@.str = private unnamed_addr constant [15 x i8] c"hello, %d %d!\0A\00", align 1 ; [#uses=1 type=[15 x i8]*]
@_dispatchTable = internal global i64 0
diff --git a/tests/cases/sub_11_0.ll b/tests/cases/sub_11_0.ll
index d4094556..aab61866 100644
--- a/tests/cases/sub_11_0.ll
+++ b/tests/cases/sub_11_0.ll
@@ -1,6 +1,6 @@
; ModuleID = 'tests/hello_world.bc'
-target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
-target triple = "le32-unknown-nacl"
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:128-n32-S128"
+target triple = "asmjs-unknown-emscripten"
@.str = private unnamed_addr constant [15 x i8] c"hello, world!\0A\00", align 1 ; [#uses=1 type=[15 x i8]*]
diff --git a/tests/cases/switch64_ta2.ll b/tests/cases/switch64_ta2.ll
index 1a6d52f3..23413847 100644
--- a/tests/cases/switch64_ta2.ll
+++ b/tests/cases/switch64_ta2.ll
@@ -1,5 +1,5 @@
-target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
-target triple = "le32-unknown-nacl"
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:128-n32-S128"
+target triple = "asmjs-unknown-emscripten"
@.str = private constant [18 x i8] c"hello, world: %d\0A\00", align 1
diff --git a/tests/cases/switch64b_ta2.ll b/tests/cases/switch64b_ta2.ll
index 4364725f..60aca441 100644
--- a/tests/cases/switch64b_ta2.ll
+++ b/tests/cases/switch64b_ta2.ll
@@ -1,5 +1,5 @@
-target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
-target triple = "le32-unknown-nacl"
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:128-n32-S128"
+target triple = "asmjs-unknown-emscripten"
@.str = private constant [18 x i8] c"hello, world: %d\0A\00", align 1
diff --git a/tests/cases/switch64c_ta2.ll b/tests/cases/switch64c_ta2.ll
new file mode 100644
index 00000000..6826a412
--- /dev/null
+++ b/tests/cases/switch64c_ta2.ll
@@ -0,0 +1,68 @@
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:128-n32-S128"
+target triple = "asmjs-unknown-emscripten"
+
+@.str = private constant [18 x i8] c"hello, world: %d\0A\00", align 1
+
+declare i32 @printf(i8*, ...)
+
+define i32 @main() {
+ %a333 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([18 x i8]* @.str, i32 0, i32 0), i32 5)
+ %a400 = zext i32 %a333 to i64
+ %check = trunc i32 %a333 to i1
+ br i1 %check, label %l1, label %l2
+
+l1:
+ %bbb = phi i64 [ %a400, %0 ], [ 10, %l2 ]
+ %bbb32 = trunc i64 %bbb to i32
+ %a333z = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([18 x i8]* @.str, i32 0, i32 0), i32 %bbb32)
+ %check2 = trunc i32 %bbb32 to i1
+ br i1 %check2, label %l2, label %label999
+
+l2:
+ %a410 = phi i64 [ %a400, %0 ], [ %bbb, %l1 ]
+ %a444 = udiv i64 %a410, 3
+ switch i64 %a444, label %l1 [
+ i64 1000, label %label9950
+ i64 1001, label %label9951
+ i64 1002, label %label9952
+ i64 1003, label %label9953
+ i64 1004, label %label9954
+ i64 1005, label %label9955
+ i64 1006, label %label9956
+ i64 1007, label %label9957
+ i64 1008, label %label9958
+ i64 1009, label %label9959
+ ]
+
+label9950:
+ %waka = phi i64 [1000, %l2], [0, %label9951], [1, %label9952], [2, %label9953], [3, %label9954], [4, %label9955], [5, %label9956], [6, %label9957], [7, %label9958], [8, %label9959]
+ %waka32 = trunc i64 %waka to i32
+ %a333b = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([18 x i8]* @.str, i32 0, i32 0), i32 %waka32)
+ br label %label999
+
+label9951:
+ br label %label9950
+label9952:
+ br label %label9950
+label9953:
+ br label %label9950
+label9954:
+ br label %label9950
+label9955:
+ br label %label9950
+label9956:
+ br label %label9950
+label9957:
+ br label %label9950
+label9958:
+ br label %label9950
+label9959:
+ br label %label9950
+
+label999: ; preds = %555
+ %last = phi i64 [1, %l1], [2, %label9950]
+ %last32 = trunc i64 %last to i32
+ %a333c = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([18 x i8]* @.str, i32 0, i32 0), i32 %last32)
+ ret i32 0
+}
+
diff --git a/tests/cases/switch64c_ta2.txt b/tests/cases/switch64c_ta2.txt
new file mode 100644
index 00000000..29999663
--- /dev/null
+++ b/tests/cases/switch64c_ta2.txt
@@ -0,0 +1,3 @@
+hello, world: 5
+hello, world: 10
+hello, world: 1
diff --git a/tests/cases/uadd_overflow_ta2.ll b/tests/cases/uadd_overflow_ta2.ll
index e827cb38..1268f78a 100644
--- a/tests/cases/uadd_overflow_ta2.ll
+++ b/tests/cases/uadd_overflow_ta2.ll
@@ -1,6 +1,6 @@
; ModuleID = 'tests/hello_world.bc'
-target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
-target triple = "le32-unknown-nacl"
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:128-n32-S128"
+target triple = "asmjs-unknown-emscripten"
@.str2 = private constant [9 x i8] c"*%d,%d*\0A\00", align 1 ; [#uses=1]
diff --git a/tests/cases/usenullcall_fastcomp.ll b/tests/cases/usenullcall_fastcomp.ll
new file mode 100644
index 00000000..f0996e08
--- /dev/null
+++ b/tests/cases/usenullcall_fastcomp.ll
@@ -0,0 +1,31 @@
+; ModuleID = 'tests/hello_world.bc'
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:128-n32-S128"
+target triple = "asmjs-unknown-emscripten"
+
+@.str = private unnamed_addr constant [15 x i8] c"hello, world!\0A\00", align 1
+@.str1 = private unnamed_addr constant [15 x i8] c"hello, worldA\0A\00", align 1
+@.str2 = private unnamed_addr constant [15 x i8] c"hello, worldB\0A\00", align 1
+
+define i32 @main() {
+entry:
+ %retval = alloca i32, align 4 ; [#uses=1 type=i32*]
+ store i32 0, i32* %retval
+ %call = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([15 x i8]* @.str, i32 0, i32 0), i32 1)
+ %bad = call zeroext i1 null()
+ %bad2 = call zeroext i1 null(i32 5, float 1.0E2, double 0.02, i64 1000, i1 0, i32* %retval)
+ %bad3 = call zeroext i1 (i32, float, double, i64, i1, i32*)* null(i32 5, float 1.0E2, double 0.02, i64 1000, i1 0, i32* %retval)
+ %bad4 = or i1 %bad, %bad2
+ %bad5 = or i1 %bad3, %bad4
+ br i1 %bad5, label %pre, label %finish
+
+pre:
+ %call0 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([15 x i8]* @.str1, i32 0, i32 0), i32 0)
+ ret i32 0
+
+finish:
+ %call1 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([15 x i8]* @.str2, i32 0, i32 0), i32 1)
+ ret i32 1
+}
+
+; [#uses=1]
+declare i32 @printf(i8*, ...)
diff --git a/tests/cases/usenullcall_fastcomp.txt b/tests/cases/usenullcall_fastcomp.txt
new file mode 100644
index 00000000..270c611e
--- /dev/null
+++ b/tests/cases/usenullcall_fastcomp.txt
@@ -0,0 +1 @@
+hello, world!
diff --git a/tests/cases/zeroembedded.ll b/tests/cases/zeroembedded.ll
index 167fe278..7acbc017 100644
--- a/tests/cases/zeroembedded.ll
+++ b/tests/cases/zeroembedded.ll
@@ -1,5 +1,5 @@
-target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
-target triple = "le32-unknown-nacl"
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:128-n32-S128"
+target triple = "asmjs-unknown-emscripten"
%struct.pypy_str = type { i32, [0 x i8] }
%struct.pypy_strval = type { i32, [13 x i8] }
diff --git a/tests/cases/zeroextarg.ll b/tests/cases/zeroextarg.ll
index a3caa74c..d02b671b 100644
--- a/tests/cases/zeroextarg.ll
+++ b/tests/cases/zeroextarg.ll
@@ -1,6 +1,6 @@
; ModuleID = 'tests/hello_world.bc'
-target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
-target triple = "le32-unknown-nacl"
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:128-n32-S128"
+target triple = "asmjs-unknown-emscripten"
@.str = private unnamed_addr constant [15 x i8] c"hello, world!\0A\00", align 1 ; [#uses=1 type=[15 x i8]*]
diff --git a/tests/cmake/target_html/CMakeLists.txt b/tests/cmake/target_html/CMakeLists.txt
index b5c69417..ce26c541 100644
--- a/tests/cmake/target_html/CMakeLists.txt
+++ b/tests/cmake/target_html/CMakeLists.txt
@@ -10,6 +10,38 @@ else() # Either MinSizeRel, RelWithDebInfo or Release, all which run with optimi
SET(linkFlags "-O2")
endif()
+if (NOT CMAKE_AR OR NOT EXISTS "${CMAKE_AR}")
+ message(FATAL_ERROR "CMAKE_AR='${CMAKE_AR}' does not exist for Emscripten toolchain!")
+endif()
+
+if (NOT CMAKE_RANLIB OR NOT EXISTS "${CMAKE_RANLIB}")
+ message(FATAL_ERROR "CMAKE_RANLIB='${CMAKE_RANLIB}' does not exist for Emscripten toolchain!")
+endif()
+
+if (NOT CMAKE_C_COMPILER OR NOT EXISTS "${CMAKE_C_COMPILER}")
+ message(FATAL_ERROR "CMAKE_C_COMPILER='${CMAKE_C_COMPILER}' does not exist for Emscripten toolchain!")
+endif()
+
+if (NOT CMAKE_CXX_COMPILER OR NOT EXISTS "${CMAKE_CXX_COMPILER}")
+ message(FATAL_ERROR "CMAKE_CXX_COMPILER='${CMAKE_CXX_COMPILER}' does not exist for Emscripten toolchain!")
+endif()
+
+if (WIN32)
+ message(FATAL_ERROR "WIN32 should not be defined when cross-compiling!")
+endif()
+
+if (APPLE)
+ message(FATAL_ERROR "APPLE should not be defined when cross-compiling!")
+endif()
+
+if (NOT EMSCRIPTEN)
+ message(FATAL_ERROR "EMSCRIPTEN should be defined when cross-compiling!")
+endif()
+
+if (NOT CMAKE_C_SIZEOF_DATA_PTR)
+ message(FATAL_ERROR "CMAKE_C_SIZEOF_DATA_PTR was not defined!")
+endif()
+
SET(CMAKE_EXECUTABLE_SUFFIX ".html")
add_executable(hello_world_gles ${sourceFiles})
diff --git a/tests/core/test_atomic_cxx.cpp b/tests/core/test_atomic_cxx.cpp
new file mode 100644
index 00000000..f78922a1
--- /dev/null
+++ b/tests/core/test_atomic_cxx.cpp
@@ -0,0 +1,130 @@
+//------------------------------------------------------------------------------
+// test C++11 atomics
+// compile native version with:
+// clang -std=c++11 -Wno-format atomic_test.cpp
+// compile emscripten version with:
+// emcc -std=c++11 -Wno-format atomic_test.cpp
+//------------------------------------------------------------------------------
+#include <atomic>
+#include <cstdio>
+
+template<typename TYPE, typename UNSIGNED_TYPE> void test(TYPE mask0, TYPE mask1, TYPE mask2) {
+ typedef TYPE dog;
+
+ const TYPE numMemoryOrders = 6;
+ std::memory_order memoryOrder[numMemoryOrders] = {
+ std::memory_order_relaxed,
+ std::memory_order_consume,
+ std::memory_order_acquire,
+ std::memory_order_release,
+ std::memory_order_acq_rel,
+ std::memory_order_seq_cst,
+ };
+
+ // test atomic<int>
+ std::atomic<dog> atomicDog(5);
+ printf("atomic<int>.is_lock_free(): %s\n", atomicDog.is_lock_free() ? "true" : "false");
+ printf("atomic<int> value: %lld\n", (long long)TYPE(atomicDog));
+
+ // test store/load
+ for (TYPE i = 0; i < numMemoryOrders; i++) {
+ atomicDog.store(i, memoryOrder[i]);
+ printf("store/load %lld: %lld\n", (long long)i, (long long)atomicDog.load(memoryOrder[i]));
+ }
+
+ // test exchange
+ for (TYPE i = 0; i < numMemoryOrders; i++) {
+ TYPE old = atomicDog.exchange(i, memoryOrder[i]);
+ printf("exchange %lld: old=%lld new=%lld\n", (long long)i, (long long)old, (long long)TYPE(atomicDog));
+ }
+
+ // compare_exchange_weak
+ for (TYPE i = 0; i < numMemoryOrders; i++) {
+ bool success = atomicDog.compare_exchange_weak(i, i + 1, memoryOrder[i], memoryOrder[i]);
+ printf("compare_exchange_weak %lld: success = %s\n", (long long)i, success ? "true" : "false");
+ }
+
+ // compare_exchange_strong
+ for (TYPE i = 0; i < numMemoryOrders; i++) {
+ bool success = atomicDog.compare_exchange_strong(i, i + 1, memoryOrder[i], memoryOrder[i]);
+ printf("compare_exchange_strong %lld: success = %s\n", (long long)i, success ? "true" : "false");
+ }
+
+ // fetch_add
+ atomicDog = 0;
+ for (TYPE i = 0; i < numMemoryOrders; i++) {
+ TYPE old = atomicDog.fetch_add(1, memoryOrder[i]);
+ printf("fetch_add %lld: old=%lld new=%lld\n", (long long)i, (long long)old, (long long)TYPE(atomicDog));
+ }
+
+ // fetch_sub
+ for (TYPE i = 0; i < numMemoryOrders; i++) {
+ TYPE old = atomicDog.fetch_sub(1, memoryOrder[i]);
+ printf("fetch_sub %lld: old=%lld new=%lld\n", (long long)i, (long long)old, (long long)TYPE(atomicDog));
+ }
+
+ // fetch_and
+ for (TYPE i = 0; i < numMemoryOrders; i++) {
+ atomicDog.store(mask0, memoryOrder[i]);
+ TYPE old = atomicDog.fetch_and((1<<i), memoryOrder[i]);
+ printf("fetch_and %lld: old=%llx, new=%llx\n", (long long)i, (unsigned long long)UNSIGNED_TYPE(old), (unsigned long long)UNSIGNED_TYPE(atomicDog));
+ }
+
+ // fetch_or
+ atomicDog = 0;
+ for (TYPE i = 0; i < numMemoryOrders; i++) {
+ TYPE old = atomicDog.fetch_or((1<<i), memoryOrder[i]);
+ printf("fetch_or %lld: old=%llx, new=%llx\n", (long long)i, (unsigned long long)UNSIGNED_TYPE(old), (unsigned long long)UNSIGNED_TYPE(atomicDog));
+ }
+
+ // fetch_xor
+ atomicDog = 0;
+ for (int i = 0; i < numMemoryOrders; i++) {
+ int old = atomicDog.fetch_xor((1<<i), memoryOrder[i]);
+ printf("fetch_xor %lld: old=%llx, new=%llx\n", (long long)i, (unsigned long long)UNSIGNED_TYPE(old), (unsigned long long)UNSIGNED_TYPE(atomicDog));
+ }
+
+ // operator++, --
+ atomicDog = 0;
+ atomicDog++;
+ printf("operator++: %lld\n", (long long)TYPE(atomicDog));
+ atomicDog--;
+ printf("operator--: %lld\n", (long long)TYPE(atomicDog));
+
+ // operator +=, -=, &=, |=, ^=
+ atomicDog += 10;
+ printf("operator+=: %lld\n", (long long)TYPE(atomicDog));
+ atomicDog -= 5;
+ printf("operator-=: %lld\n", (long long)TYPE(atomicDog));
+ atomicDog |= mask0;
+ printf("operator|=: %llx\n", (unsigned long long)UNSIGNED_TYPE(atomicDog));
+ atomicDog &= mask1;
+ printf("operator&=: %llx\n", (unsigned long long)UNSIGNED_TYPE(atomicDog));
+ atomicDog ^= mask2;
+ printf("operator^=: %llx\n", (unsigned long long)UNSIGNED_TYPE(atomicDog));
+
+}
+
+int main() {
+
+ // test 8, 16, 32 and 64-bit data types
+ printf("\n8 bits\n\n");
+ test<char, unsigned char>(0xFF, 0xF0, 0x0F);
+ printf("\n16 bits\n\n");
+ test<short, unsigned short>(0xFFFF, 0xF0F0, 0x0F0F);
+ printf("\n32 bits\n\n");
+ test<int, unsigned int>(0xFFFFFFFF, 0xF0F0F0F0, 0x0F0F0F0F);
+ printf("\n64 bits\n\n");
+ test<long long, unsigned long long>(0xFFFFFFFFFFFFFFFF, 0xF0F0F0F0F0F0F0F0, 0x0F0F0F0F0F0F0F0F);
+
+ // test atomic_flag (should also have memory_orders, but probably doesn't matter
+ // to find the missing atomic functions)
+ std::atomic_flag af;
+ af.clear();
+ bool b = af.test_and_set();
+ printf("atomic_flag: %s\n", b ? "true" : "false");
+
+ printf("done.\n");
+ return 0;
+}
+
diff --git a/tests/core/test_atomic_cxx.txt b/tests/core/test_atomic_cxx.txt
new file mode 100644
index 00000000..da437b57
--- /dev/null
+++ b/tests/core/test_atomic_cxx.txt
@@ -0,0 +1,226 @@
+
+8 bits
+
+atomic<int>.is_lock_free(): true
+atomic<int> value: 5
+store/load 0: 0
+store/load 1: 1
+store/load 2: 2
+store/load 3: 3
+store/load 4: 4
+store/load 5: 5
+exchange 0: old=5 new=0
+exchange 1: old=0 new=1
+exchange 2: old=1 new=2
+exchange 3: old=2 new=3
+exchange 4: old=3 new=4
+exchange 5: old=4 new=5
+compare_exchange_weak 5: success = false
+compare_exchange_strong 5: success = false
+fetch_add 0: old=0 new=1
+fetch_add 1: old=1 new=2
+fetch_add 2: old=2 new=3
+fetch_add 3: old=3 new=4
+fetch_add 4: old=4 new=5
+fetch_add 5: old=5 new=6
+fetch_sub 0: old=6 new=5
+fetch_sub 1: old=5 new=4
+fetch_sub 2: old=4 new=3
+fetch_sub 3: old=3 new=2
+fetch_sub 4: old=2 new=1
+fetch_sub 5: old=1 new=0
+fetch_and 0: old=ff, new=1
+fetch_and 1: old=ff, new=2
+fetch_and 2: old=ff, new=4
+fetch_and 3: old=ff, new=8
+fetch_and 4: old=ff, new=10
+fetch_and 5: old=ff, new=20
+fetch_or 0: old=0, new=1
+fetch_or 1: old=1, new=3
+fetch_or 2: old=3, new=7
+fetch_or 3: old=7, new=f
+fetch_or 4: old=f, new=1f
+fetch_or 5: old=1f, new=3f
+fetch_xor 0: old=0, new=1
+fetch_xor 1: old=1, new=3
+fetch_xor 2: old=3, new=7
+fetch_xor 3: old=7, new=f
+fetch_xor 4: old=f, new=1f
+fetch_xor 5: old=1f, new=3f
+operator++: 1
+operator--: 0
+operator+=: 10
+operator-=: 5
+operator|=: ff
+operator&=: f0
+operator^=: ff
+
+16 bits
+
+atomic<int>.is_lock_free(): true
+atomic<int> value: 5
+store/load 0: 0
+store/load 1: 1
+store/load 2: 2
+store/load 3: 3
+store/load 4: 4
+store/load 5: 5
+exchange 0: old=5 new=0
+exchange 1: old=0 new=1
+exchange 2: old=1 new=2
+exchange 3: old=2 new=3
+exchange 4: old=3 new=4
+exchange 5: old=4 new=5
+compare_exchange_weak 5: success = false
+compare_exchange_strong 5: success = false
+fetch_add 0: old=0 new=1
+fetch_add 1: old=1 new=2
+fetch_add 2: old=2 new=3
+fetch_add 3: old=3 new=4
+fetch_add 4: old=4 new=5
+fetch_add 5: old=5 new=6
+fetch_sub 0: old=6 new=5
+fetch_sub 1: old=5 new=4
+fetch_sub 2: old=4 new=3
+fetch_sub 3: old=3 new=2
+fetch_sub 4: old=2 new=1
+fetch_sub 5: old=1 new=0
+fetch_and 0: old=ffff, new=1
+fetch_and 1: old=ffff, new=2
+fetch_and 2: old=ffff, new=4
+fetch_and 3: old=ffff, new=8
+fetch_and 4: old=ffff, new=10
+fetch_and 5: old=ffff, new=20
+fetch_or 0: old=0, new=1
+fetch_or 1: old=1, new=3
+fetch_or 2: old=3, new=7
+fetch_or 3: old=7, new=f
+fetch_or 4: old=f, new=1f
+fetch_or 5: old=1f, new=3f
+fetch_xor 0: old=0, new=1
+fetch_xor 1: old=1, new=3
+fetch_xor 2: old=3, new=7
+fetch_xor 3: old=7, new=f
+fetch_xor 4: old=f, new=1f
+fetch_xor 5: old=1f, new=3f
+operator++: 1
+operator--: 0
+operator+=: 10
+operator-=: 5
+operator|=: ffff
+operator&=: f0f0
+operator^=: ffff
+
+32 bits
+
+atomic<int>.is_lock_free(): true
+atomic<int> value: 5
+store/load 0: 0
+store/load 1: 1
+store/load 2: 2
+store/load 3: 3
+store/load 4: 4
+store/load 5: 5
+exchange 0: old=5 new=0
+exchange 1: old=0 new=1
+exchange 2: old=1 new=2
+exchange 3: old=2 new=3
+exchange 4: old=3 new=4
+exchange 5: old=4 new=5
+compare_exchange_weak 5: success = false
+compare_exchange_strong 5: success = false
+fetch_add 0: old=0 new=1
+fetch_add 1: old=1 new=2
+fetch_add 2: old=2 new=3
+fetch_add 3: old=3 new=4
+fetch_add 4: old=4 new=5
+fetch_add 5: old=5 new=6
+fetch_sub 0: old=6 new=5
+fetch_sub 1: old=5 new=4
+fetch_sub 2: old=4 new=3
+fetch_sub 3: old=3 new=2
+fetch_sub 4: old=2 new=1
+fetch_sub 5: old=1 new=0
+fetch_and 0: old=ffffffff, new=1
+fetch_and 1: old=ffffffff, new=2
+fetch_and 2: old=ffffffff, new=4
+fetch_and 3: old=ffffffff, new=8
+fetch_and 4: old=ffffffff, new=10
+fetch_and 5: old=ffffffff, new=20
+fetch_or 0: old=0, new=1
+fetch_or 1: old=1, new=3
+fetch_or 2: old=3, new=7
+fetch_or 3: old=7, new=f
+fetch_or 4: old=f, new=1f
+fetch_or 5: old=1f, new=3f
+fetch_xor 0: old=0, new=1
+fetch_xor 1: old=1, new=3
+fetch_xor 2: old=3, new=7
+fetch_xor 3: old=7, new=f
+fetch_xor 4: old=f, new=1f
+fetch_xor 5: old=1f, new=3f
+operator++: 1
+operator--: 0
+operator+=: 10
+operator-=: 5
+operator|=: ffffffff
+operator&=: f0f0f0f0
+operator^=: ffffffff
+
+64 bits
+
+atomic<int>.is_lock_free(): false
+atomic<int> value: 5
+store/load 0: 0
+store/load 1: 1
+store/load 2: 2
+store/load 3: 3
+store/load 4: 4
+store/load 5: 5
+exchange 0: old=5 new=0
+exchange 1: old=0 new=1
+exchange 2: old=1 new=2
+exchange 3: old=2 new=3
+exchange 4: old=3 new=4
+exchange 5: old=4 new=5
+compare_exchange_weak 5: success = false
+compare_exchange_strong 5: success = false
+fetch_add 0: old=0 new=1
+fetch_add 1: old=1 new=2
+fetch_add 2: old=2 new=3
+fetch_add 3: old=3 new=4
+fetch_add 4: old=4 new=5
+fetch_add 5: old=5 new=6
+fetch_sub 0: old=6 new=5
+fetch_sub 1: old=5 new=4
+fetch_sub 2: old=4 new=3
+fetch_sub 3: old=3 new=2
+fetch_sub 4: old=2 new=1
+fetch_sub 5: old=1 new=0
+fetch_and 0: old=ffffffffffffffff, new=1
+fetch_and 1: old=ffffffffffffffff, new=2
+fetch_and 2: old=ffffffffffffffff, new=4
+fetch_and 3: old=ffffffffffffffff, new=8
+fetch_and 4: old=ffffffffffffffff, new=10
+fetch_and 5: old=ffffffffffffffff, new=20
+fetch_or 0: old=0, new=1
+fetch_or 1: old=1, new=3
+fetch_or 2: old=3, new=7
+fetch_or 3: old=7, new=f
+fetch_or 4: old=f, new=1f
+fetch_or 5: old=1f, new=3f
+fetch_xor 0: old=0, new=1
+fetch_xor 1: old=1, new=3
+fetch_xor 2: old=3, new=7
+fetch_xor 3: old=7, new=f
+fetch_xor 4: old=f, new=1f
+fetch_xor 5: old=1f, new=3f
+operator++: 1
+operator--: 0
+operator+=: 10
+operator-=: 5
+operator|=: ffffffffffffffff
+operator&=: f0f0f0f0f0f0f0f0
+operator^=: ffffffffffffffff
+atomic_flag: false
+done.
diff --git a/tests/core/test_inlinejs3.in b/tests/core/test_inlinejs3.in
index 9ddd5907..c3b9b769 100644
--- a/tests/core/test_inlinejs3.in
+++ b/tests/core/test_inlinejs3.in
@@ -1,12 +1,19 @@
#include <stdio.h>
#include <emscripten.h>
+void loop_iter() {
+ EM_ASM(Module.print('loop iter!'));
+}
+
int main(int argc, char **argv) {
EM_ASM(Module.print('hello dere1'));
EM_ASM("Module.print('hello dere2');");
+ emscripten_debugger(); // does nothing in shells; check for validation error though
for (int i = 0; i < 3; i++) {
EM_ASM(Module.print('hello dere3'); Module.print('hello dere' + 4););
}
+ EM_ASM_({ Module.print('hello input ' + $0) }, 123);
+ EM_ASM_ARGS({ Module.print('hello input ' + $0) }, 456);
int sum = 0;
for (int i = 0; i < argc * 3; i++) {
sum += EM_ASM_INT({
@@ -19,5 +26,6 @@ int main(int argc, char **argv) {
sum = 0;
sum = EM_ASM_INT_V({ return globalVar }); // no inputs, just output
printf("sum: %d\n", sum);
+ for (int i = 0; i < argc*2; i++) loop_iter();
return 0;
}
diff --git a/tests/core/test_inlinejs3.out b/tests/core/test_inlinejs3.out
index c293e80b..c48cc3c8 100644
--- a/tests/core/test_inlinejs3.out
+++ b/tests/core/test_inlinejs3.out
@@ -6,7 +6,11 @@ hello dere3
hello dere4
hello dere3
hello dere4
+hello input 123
+hello input 456
i: 0,0.00
i: 1,0.08
i: 2,0.17
sum: 6
+loop iter!
+loop iter!
diff --git a/tests/core/test_sscanf_other_whitespace.in b/tests/core/test_sscanf_other_whitespace.in
index 467fa4f0..3ae23d92 100644
--- a/tests/core/test_sscanf_other_whitespace.in
+++ b/tests/core/test_sscanf_other_whitespace.in
@@ -1,8 +1,8 @@
#include <stdio.h>
int main() {
- short int x;
- short int y;
+ int x;
+ int y;
const char* buffer[] = {
"\t2\t3\t", /* TAB - horizontal tab */
diff --git a/tests/core/test_strndup.out b/tests/core/test_strndup.out
index 681f00cc..f86db64e 100644
--- a/tests/core/test_strndup.out
+++ b/tests/core/test_strndup.out
@@ -3,4 +3,4 @@
3:strndup - duplicate a specific number of bytes from a string
4:strndup - duplicate a specific number of bytes from a string
5:strndup - duplicate
-6:
+6:strndup - duplicate a specific number of bytes from a string
diff --git a/tests/cube_explosion.c b/tests/cube_explosion.c
index 0c6eb674..a899f068 100644
--- a/tests/cube_explosion.c
+++ b/tests/cube_explosion.c
@@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR
REDISTRIBUTION OF THIS SOFTWARE.
*/
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
#define USE_GLEW 1
#endif
@@ -216,7 +216,7 @@ int main(int argc, char *argv[])
glDeleteTextures(1, &texture);
assert(!glIsTexture(texture)); // but not anymore
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
SDL_Delay(1500);
#endif
diff --git a/tests/cubegeom.c b/tests/cubegeom.c
index e749045b..950439ec 100644
--- a/tests/cubegeom.c
+++ b/tests/cubegeom.c
@@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR
REDISTRIBUTION OF THIS SOFTWARE.
*/
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
#define USE_GLEW 1
#endif
@@ -316,7 +316,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
SDL_Delay(1500);
#endif
diff --git a/tests/cubegeom_color.c b/tests/cubegeom_color.c
index ff30e1a9..7a41c64d 100644
--- a/tests/cubegeom_color.c
+++ b/tests/cubegeom_color.c
@@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR
REDISTRIBUTION OF THIS SOFTWARE.
*/
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
#define USE_GLEW 1
#endif
@@ -38,10 +38,6 @@ void verify() {
for (int x = 0; x < width*height*4; x++) {
if (x % 4 != 3) sum += x * data[x];
}
-#if EMSCRIPTEN
- int result = sum;
- REPORT_RESULT();
-#endif
}
int main(int argc, char *argv[])
@@ -286,7 +282,7 @@ int main(int argc, char *argv[])
verify();
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
SDL_Delay(1500);
#endif
diff --git a/tests/cubegeom_color2.c b/tests/cubegeom_color2.c
index 76d71d00..76bbb119 100644
--- a/tests/cubegeom_color2.c
+++ b/tests/cubegeom_color2.c
@@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR
REDISTRIBUTION OF THIS SOFTWARE.
*/
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
#define USE_GLEW 1
#endif
@@ -273,7 +273,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
SDL_Delay(1500);
#endif
diff --git a/tests/cubegeom_fog.c b/tests/cubegeom_fog.c
index cae6ca2d..50d2843b 100644
--- a/tests/cubegeom_fog.c
+++ b/tests/cubegeom_fog.c
@@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR
REDISTRIBUTION OF THIS SOFTWARE.
*/
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
#define USE_GLEW 1
#endif
@@ -281,7 +281,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
SDL_Delay(1500);
#endif
diff --git a/tests/cubegeom_glew.c b/tests/cubegeom_glew.c
index 210e1c60..96f401c6 100644
--- a/tests/cubegeom_glew.c
+++ b/tests/cubegeom_glew.c
@@ -287,7 +287,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
SDL_Delay(1500);
#endif
diff --git a/tests/cubegeom_mt.c b/tests/cubegeom_mt.c
index b4ad28a7..cbfcbfdf 100644
--- a/tests/cubegeom_mt.c
+++ b/tests/cubegeom_mt.c
@@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR
REDISTRIBUTION OF THIS SOFTWARE.
*/
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
#define USE_GLEW 1
#endif
@@ -274,7 +274,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
SDL_Delay(1500);
#endif
diff --git a/tests/cubegeom_normal.c b/tests/cubegeom_normal.c
index 02655edf..e56286fb 100644
--- a/tests/cubegeom_normal.c
+++ b/tests/cubegeom_normal.c
@@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR
REDISTRIBUTION OF THIS SOFTWARE.
*/
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
#define USE_GLEW 1
#endif
@@ -269,7 +269,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
SDL_Delay(1500);
#endif
diff --git a/tests/cubegeom_normal_dap.c b/tests/cubegeom_normal_dap.c
index 752911a8..594aec05 100644
--- a/tests/cubegeom_normal_dap.c
+++ b/tests/cubegeom_normal_dap.c
@@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR
REDISTRIBUTION OF THIS SOFTWARE.
*/
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
#define USE_GLEW 1
#endif
@@ -266,7 +266,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
SDL_Delay(1500);
#endif
diff --git a/tests/cubegeom_normal_dap_far.c b/tests/cubegeom_normal_dap_far.c
index 35a068d9..da28f775 100644
--- a/tests/cubegeom_normal_dap_far.c
+++ b/tests/cubegeom_normal_dap_far.c
@@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR
REDISTRIBUTION OF THIS SOFTWARE.
*/
-#if !EMSCRIPTEN
+#if !defined(__EMSCRIPTEN__)
#define USE_GLEW 1
#endif
@@ -263,7 +263,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#if !defined(__EMSCRIPTEN__)
SDL_Delay(1500);
#endif
diff --git a/tests/cubegeom_normal_dap_far_glda.c b/tests/cubegeom_normal_dap_far_glda.c
index 849245b8..ee381458 100644
--- a/tests/cubegeom_normal_dap_far_glda.c
+++ b/tests/cubegeom_normal_dap_far_glda.c
@@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR
REDISTRIBUTION OF THIS SOFTWARE.
*/
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
#define USE_GLEW 1
#endif
@@ -254,7 +254,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
SDL_Delay(1500);
#endif
diff --git a/tests/cubegeom_normal_dap_far_glda_quad.c b/tests/cubegeom_normal_dap_far_glda_quad.c
index 93c157a4..91f60031 100644
--- a/tests/cubegeom_normal_dap_far_glda_quad.c
+++ b/tests/cubegeom_normal_dap_far_glda_quad.c
@@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR
REDISTRIBUTION OF THIS SOFTWARE.
*/
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
#define USE_GLEW 1
#endif
@@ -254,7 +254,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
SDL_Delay(1500);
#endif
diff --git a/tests/cubegeom_normal_dap_far_range.c b/tests/cubegeom_normal_dap_far_range.c
index 17691ce9..3f041668 100644
--- a/tests/cubegeom_normal_dap_far_range.c
+++ b/tests/cubegeom_normal_dap_far_range.c
@@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR
REDISTRIBUTION OF THIS SOFTWARE.
*/
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
#define USE_GLEW 1
#endif
@@ -263,7 +263,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
SDL_Delay(1500);
#endif
diff --git a/tests/cubegeom_pre.c b/tests/cubegeom_pre.c
index 40b03cf7..70e3435f 100644
--- a/tests/cubegeom_pre.c
+++ b/tests/cubegeom_pre.c
@@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR
REDISTRIBUTION OF THIS SOFTWARE.
*/
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
#define USE_GLEW 1
#endif
@@ -283,7 +283,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
SDL_Delay(1500);
#endif
diff --git a/tests/cubegeom_pre2.c b/tests/cubegeom_pre2.c
index df04ae31..88c82541 100644
--- a/tests/cubegeom_pre2.c
+++ b/tests/cubegeom_pre2.c
@@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR
REDISTRIBUTION OF THIS SOFTWARE.
*/
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
#define USE_GLEW 1
#endif
@@ -322,7 +322,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
SDL_Delay(1500);
#endif
diff --git a/tests/cubegeom_pre2_vao.c b/tests/cubegeom_pre2_vao.c
index 733c8fc6..5abe1868 100644
--- a/tests/cubegeom_pre2_vao.c
+++ b/tests/cubegeom_pre2_vao.c
@@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR
REDISTRIBUTION OF THIS SOFTWARE.
*/
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
#define USE_GLEW 1
#endif
@@ -354,7 +354,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
SDL_Delay(1500);
#endif
diff --git a/tests/cubegeom_pre2_vao2.c b/tests/cubegeom_pre2_vao2.c
index 69096833..d2d55597 100644
--- a/tests/cubegeom_pre2_vao2.c
+++ b/tests/cubegeom_pre2_vao2.c
@@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR
REDISTRIBUTION OF THIS SOFTWARE.
*/
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
#define USE_GLEW 1
#endif
@@ -355,7 +355,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
SDL_Delay(1500);
#endif
diff --git a/tests/cubegeom_pre3.c b/tests/cubegeom_pre3.c
index ceaa757e..81c87589 100644
--- a/tests/cubegeom_pre3.c
+++ b/tests/cubegeom_pre3.c
@@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR
REDISTRIBUTION OF THIS SOFTWARE.
*/
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
#define USE_GLEW 1
#endif
@@ -322,7 +322,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
SDL_Delay(1500);
#endif
diff --git a/tests/cubegeom_pre_vao.c b/tests/cubegeom_pre_vao.c
index 8c598143..4f7adf9e 100644
--- a/tests/cubegeom_pre_vao.c
+++ b/tests/cubegeom_pre_vao.c
@@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR
REDISTRIBUTION OF THIS SOFTWARE.
*/
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
#define USE_GLEW 1
#endif
@@ -308,7 +308,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
SDL_Delay(1500);
#endif
diff --git a/tests/cubegeom_proc.c b/tests/cubegeom_proc.c
index e80b9b31..2dfe85ae 100644
--- a/tests/cubegeom_proc.c
+++ b/tests/cubegeom_proc.c
@@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR
REDISTRIBUTION OF THIS SOFTWARE.
*/
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
#define USE_GLEW 1
#endif
@@ -321,7 +321,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
SDL_Delay(1500);
#endif
diff --git a/tests/cubegeom_texturematrix.c b/tests/cubegeom_texturematrix.c
index abb667eb..21824344 100644
--- a/tests/cubegeom_texturematrix.c
+++ b/tests/cubegeom_texturematrix.c
@@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR
REDISTRIBUTION OF THIS SOFTWARE.
*/
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
#define USE_GLEW 1
#endif
@@ -287,7 +287,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
SDL_Delay(1500);
#endif
diff --git a/tests/dirent/test_readdir_empty.c b/tests/dirent/test_readdir_empty.c
new file mode 100644
index 00000000..00102733
--- /dev/null
+++ b/tests/dirent/test_readdir_empty.c
@@ -0,0 +1,47 @@
+#include <stdio.h>
+#include <dirent.h>
+#include <sys/stat.h>
+#include <string.h>
+#include <errno.h>
+
+
+int main(int argc, char** argv) {
+ if (mkdir("/tmp", S_IRWXG) != 0 && errno != EEXIST) {
+ printf("Unable to create dir '/tmp'\n");
+ return -1;
+ }
+
+ if (mkdir("/tmp/1", S_IRWXG) != 0 && errno != EEXIST) {
+ printf("Unable to create dir '/tmp/1'\n");
+ return -1;
+ }
+
+ if (mkdir("/tmp/1/", S_IRWXG) != 0 && errno != EEXIST) {
+ printf("Unable to create dir '/tmp/1/'\n");
+ return -1;
+ }
+
+ DIR *dir = opendir("/tmp");
+
+ if (!dir) {
+ printf("Unable to open dir '/tmp'\n");
+ return -2;
+ }
+
+ struct dirent *dirent;
+
+ while ((dirent = readdir(dir)) != 0) {
+ printf("Found '%s'\n", dirent->d_name);
+
+ if (strlen(dirent->d_name) == 0) {
+ printf("Found empty path!\n");
+ return -3;
+ }
+ }
+
+ closedir(dir);
+
+ printf("success\n");
+ return 0;
+}
+
diff --git a/tests/embind/build_benchmark b/tests/embind/build_benchmark
index 3d5d816b..74239406 100644
--- a/tests/embind/build_benchmark
+++ b/tests/embind/build_benchmark
@@ -1,2 +1,2 @@
#!/bin/bash
-EMCC_LLVM_TARGET=le32-unknown-nacl ../../emcc --minify 0 --bind --post-js embind.benchmark.js -O2 --shell-file shell.html -o embind_benchmark.html embind_benchmark.cpp
+EMCC_LLVM_TARGET=asmjs-unknown-emscripten ../../emcc --minify 0 --bind --post-js embind.benchmark.js -O2 --shell-file shell.html -o embind_benchmark.html embind_benchmark.cpp
diff --git a/tests/embind/embind.test.js b/tests/embind/embind.test.js
index 5ca972be..6bba4de0 100644
--- a/tests/embind/embind.test.js
+++ b/tests/embind/embind.test.js
@@ -1408,7 +1408,7 @@ module({
var e = assert.throws(cm.BindingError, function() {
cm.passThroughCustomSmartPtr(o);
});
- assert.equal('Cannot convert argument of type NSt3__110shared_ptrI20HeldByCustomSmartPtrEE to parameter type 14CustomSmartPtrI20HeldByCustomSmartPtrE', e.message);
+ assert.equal('Cannot convert argument of type shared_ptr<HeldByCustomSmartPtr> to parameter type CustomSmartPtr<HeldByCustomSmartPtr>', e.message);
o.delete();
});
@@ -1646,6 +1646,10 @@ module({
if (typeof INVOKED_FROM_EMSCRIPTEN_TEST_RUNNER === "undefined") { // TODO: Enable this to work in Emscripten runner as well!
BaseFixture.extend("unbound types", function() {
+ if (!cm.hasUnboundTypeNames) {
+ return;
+ }
+
function assertMessage(fn, message) {
var e = assert.throws(cm.UnboundTypeError, fn);
assert.equal(message, e.message);
@@ -1938,10 +1942,84 @@ module({
derived.delete();
// Let the memory leak test superfixture check that no leaks occurred.
});
+
+ BaseFixture.extend("val::as", function() {
+ test("built-ins", function() {
+ assert.equal(true, cm.val_as_bool(true));
+ assert.equal(false, cm.val_as_bool(false));
+ assert.equal(127, cm.val_as_char(127));
+ assert.equal(32767, cm.val_as_short(32767));
+ assert.equal(65536, cm.val_as_int(65536));
+ assert.equal(65536, cm.val_as_long(65536));
+ assert.equal(10.5, cm.val_as_float(10.5));
+ assert.equal(10.5, cm.val_as_double(10.5));
+
+ assert.equal("foo", cm.val_as_string("foo"));
+ assert.equal("foo", cm.val_as_wstring("foo"));
+
+ var obj = {};
+ assert.equal(obj, cm.val_as_val(obj));
+
+ // JS->C++ memory view not implemented
+ //var ab = cm.val_as_memory_view(new ArrayBuffer(13));
+ //assert.equal(13, ab.byteLength);
+ });
+
+ test("value types", function() {
+ var tuple = [1, 2, 3, 4];
+ assert.deepEqual(tuple, cm.val_as_value_array(tuple));
+
+ var struct = {x: 1, y: 2, z: 3, w: 4};
+ assert.deepEqual(struct, cm.val_as_value_object(struct));
+ });
+
+ test("enums", function() {
+ assert.equal(cm.Enum.ONE, cm.val_as_enum(cm.Enum.ONE));
+ });
+ });
+
+ BaseFixture.extend("val::new_", function() {
+ test("variety of types", function() {
+ function factory() {
+ this.arguments = Array.prototype.slice.call(arguments, 0);
+ }
+ var instance = cm.construct_with_6_arguments(factory);
+ assert.deepEqual(
+ [6, -12.5, "a3", {x: 1, y: 2, z: 3, w: 4}, cm.EnumClass.TWO, [-1, -2, -3, -4]],
+ instance.arguments);
+ });
+
+ test("memory view", function() {
+ function factory(before, view, after) {
+ this.before = before;
+ this.view = view;
+ this.after = after;
+ }
+
+ var instance = cm.construct_with_memory_view(factory);
+ assert.equal("before", instance.before);
+ assert.equal(10, instance.view.byteLength);
+ assert.equal("after", instance.after);
+ });
+
+ test("ints_and_float", function() {
+ function factory(a, b, c) {
+ this.a = a;
+ this.b = b;
+ this.c = c;
+ }
+
+ var instance = cm.construct_with_ints_and_float(factory);
+ assert.equal(65537, instance.a);
+ assert.equal(4.0, instance.b);
+ assert.equal(65538, instance.c);
+ });
+ });
});
/* global run_all_tests */
// If running as part of the emscripten test runner suite, and not as part of the IMVU suite,
// we launch the test execution from here. IMVU suite uses its own dedicated mechanism instead of this.
-if (typeof run_all_tests !== "undefined")
+if (typeof run_all_tests !== "undefined") {
run_all_tests();
+}
diff --git a/tests/embind/embind_test.cpp b/tests/embind/embind_test.cpp
index 4efc4bd8..1b835751 100644
--- a/tests/embind/embind_test.cpp
+++ b/tests/embind/embind_test.cpp
@@ -842,7 +842,7 @@ Enum emval_test_take_and_return_Enum(Enum e) {
return e;
}
-enum class EnumClass { ONE, TWO };
+enum class EnumClass : char { ONE, TWO };
EnumClass emval_test_take_and_return_EnumClass(EnumClass e) {
return e;
@@ -1150,8 +1150,8 @@ void callDifferentArguments(AbstractClass& ac, int i, double d, unsigned char f,
EMSCRIPTEN_BINDINGS(interface_tests) {
class_<AbstractClass>("AbstractClass")
- .smart_ptr<std::shared_ptr<AbstractClass>>()
- .allow_subclass<AbstractClassWrapper>()
+ .smart_ptr<std::shared_ptr<AbstractClass>>("shared_ptr<AbstractClass>")
+ .allow_subclass<AbstractClassWrapper>("AbstractClassWrapper")
.function("abstractMethod", &AbstractClass::abstractMethod)
.function("optionalMethod", &AbstractClass::optionalMethod)
;
@@ -1483,7 +1483,7 @@ EMSCRIPTEN_BINDINGS(tests) {
function("emval_test_take_and_return_TupleInStruct", &emval_test_take_and_return_TupleInStruct);
class_<ValHolder>("ValHolder")
- .smart_ptr<std::shared_ptr<ValHolder>>()
+ .smart_ptr<std::shared_ptr<ValHolder>>("std::shared_ptr<ValHolder>")
.constructor<val>()
.function("getVal", &ValHolder::getVal)
.function("getValNonConst", &ValHolder::getValNonConst)
@@ -1522,7 +1522,7 @@ EMSCRIPTEN_BINDINGS(tests) {
function("emval_test_take_and_call_functor", &emval_test_take_and_call_functor);
class_<StringHolder>("StringHolder")
- .smart_ptr<std::shared_ptr<StringHolder>>()
+ .smart_ptr<std::shared_ptr<StringHolder>>("shared_ptr<StringHolder>")
.constructor<std::string>()
.function("set", &StringHolder::set)
.function("get", &StringHolder::get)
@@ -1566,7 +1566,7 @@ EMSCRIPTEN_BINDINGS(tests) {
// register Derived before Base as a test that it's possible to
// register base classes afterwards
class_<Derived, base<Base>>("Derived")
- .smart_ptr<std::shared_ptr<Derived>>()
+ .smart_ptr<std::shared_ptr<Derived>>("shared_ptr<Derived>")
.constructor<>()
.function("getClassName", &Derived::getClassName)
.function("getMember", &Derived::getMember)
@@ -1575,7 +1575,7 @@ EMSCRIPTEN_BINDINGS(tests) {
;
class_<Base>("Base")
- .smart_ptr<std::shared_ptr<Base>>()
+ .smart_ptr<std::shared_ptr<Base>>("shared_ptr<Base")
.constructor<>()
.function("getClassName", &Base::getClassName)
.function("getClassNameFromBase", &Base::getClassNameFromBase)
@@ -1589,7 +1589,7 @@ EMSCRIPTEN_BINDINGS(tests) {
;
class_<SecondBase>("SecondBase")
- .smart_ptr<std::shared_ptr<SecondBase>>()
+ .smart_ptr<std::shared_ptr<SecondBase>>("shared_ptr<SecondBase>")
.constructor<>()
.function("getClassName", &SecondBase::getClassName)
.function("getClassNameFromSecondBase", &SecondBase::getClassNameFromSecondBase)
@@ -1612,13 +1612,13 @@ EMSCRIPTEN_BINDINGS(tests) {
;
class_<SiblingDerived>("SiblingDerived")
- .smart_ptr<std::shared_ptr<SiblingDerived>>()
+ .smart_ptr<std::shared_ptr<SiblingDerived>>("shared_ptr<SiblingDerived>")
.constructor<>()
.function("getClassName", &SiblingDerived::getClassName)
;
class_<MultiplyDerived, base<Base>>("MultiplyDerived")
- .smart_ptr<std::shared_ptr<MultiplyDerived>>()
+ .smart_ptr<std::shared_ptr<MultiplyDerived>>("shared_ptr<MultiplyDerived>")
.constructor<>()
.function("getClassName", &MultiplyDerived::getClassName)
.class_function("getInstanceCount", &MultiplyDerived::getInstanceCount)
@@ -1630,26 +1630,26 @@ EMSCRIPTEN_BINDINGS(tests) {
;
class_<DerivedThrice, base<Derived> >("DerivedThrice")
- .smart_ptr<std::shared_ptr<DerivedThrice>>()
+ .smart_ptr<std::shared_ptr<DerivedThrice>>("shared_ptr<DerivedThrice>")
.constructor<>()
.function("getClassName", &DerivedThrice::getClassName)
;
class_<PolyBase>("PolyBase")
- .smart_ptr<std::shared_ptr<PolyBase>>()
+ .smart_ptr<std::shared_ptr<PolyBase>>("shared_ptr<PolyBase>")
.constructor<>()
.function("virtualGetClassName", &PolyBase::virtualGetClassName)
.function("getClassName", &PolyBase::getClassName)
;
class_<PolySecondBase>("PolySecondBase")
- .smart_ptr<std::shared_ptr<PolySecondBase>>()
+ .smart_ptr<std::shared_ptr<PolySecondBase>>("shared_ptr<PolySecondBase>")
.constructor<>()
.function("getClassName", &PolySecondBase::getClassName)
;
class_<PolyDerived, base<PolyBase>>("PolyDerived")
- .smart_ptr<std::shared_ptr<PolyDerived>>()
+ .smart_ptr<std::shared_ptr<PolyDerived>>("shared_ptr<PolyDerived>")
.constructor<>()
.function("virtualGetClassName", &PolyDerived::virtualGetClassName)
.function("getClassName", &PolyDerived::getClassName)
@@ -1671,43 +1671,43 @@ EMSCRIPTEN_BINDINGS(tests) {
// }
class_<PolySiblingDerived, base<PolyBase>>("PolySiblingDerived")
- .smart_ptr<std::shared_ptr<PolySiblingDerived>>()
+ .smart_ptr<std::shared_ptr<PolySiblingDerived>>("shared_ptr<PolySiblingDerived>")
.constructor<>()
.function("getClassName", &PolySiblingDerived::getClassName)
;
class_<PolyMultiplyDerived, base<PolyBase>>("PolyMultiplyDerived")
- .smart_ptr<std::shared_ptr<PolyMultiplyDerived>>()
+ .smart_ptr<std::shared_ptr<PolyMultiplyDerived>>("shared_ptr<PolyMultiplyDerived>")
.constructor<>()
.function("getClassName", &PolyMultiplyDerived::getClassName)
;
class_<PolyDerivedThrice, base<PolyDerived>>("PolyDerivedThrice")
- .smart_ptr<std::shared_ptr<PolyDerivedThrice>>()
+ .smart_ptr<std::shared_ptr<PolyDerivedThrice>>("shared_ptr<PolyDerivedThrice>")
.constructor<>()
.function("getClassName", &PolyDerivedThrice::getClassName)
;
class_<PolyDiamondBase>("PolyDiamondBase")
- .smart_ptr<std::shared_ptr<PolyDiamondBase>>()
+ .smart_ptr<std::shared_ptr<PolyDiamondBase>>("shared_ptr<PolyDiamondBase>")
.constructor<>()
.function("getClassName", &PolyDiamondBase::getClassName)
;
class_<PolyDiamondDerived>("PolyDiamondDerived")
- .smart_ptr<std::shared_ptr<PolyDiamondDerived>>()
+ .smart_ptr<std::shared_ptr<PolyDiamondDerived>>("shared_ptr<PolyDiamondDerived>")
.constructor<>()
.function("getClassName", &PolyDiamondDerived::getClassName)
;
class_<PolyDiamondSiblingDerived>("PolyDiamondSiblingDerived")
- .smart_ptr<std::shared_ptr<PolyDiamondSiblingDerived>>()
+ .smart_ptr<std::shared_ptr<PolyDiamondSiblingDerived>>("shared_ptr<PolyDiamondSiblingDerived>")
.constructor<>()
.function("getClassName", &PolyDiamondSiblingDerived::getClassName)
;
class_<PolyDiamondMultiplyDerived>("PolyDiamondMultiplyDerived")
- .smart_ptr<std::shared_ptr<PolyDiamondMultiplyDerived>>()
+ .smart_ptr<std::shared_ptr<PolyDiamondMultiplyDerived>>("shared_ptr<PolyDiamondMultiplyDerived>")
.constructor<>()
.function("getClassName", &PolyDiamondMultiplyDerived::getClassName)
;
@@ -1825,8 +1825,8 @@ EMSCRIPTEN_BINDINGS(tests) {
auto HeldBySmartPtr_class = class_<HeldBySmartPtr>("HeldBySmartPtr");
HeldBySmartPtr_class
- .smart_ptr<CustomSmartPtr<HeldBySmartPtr>>()
- .smart_ptr_constructor(&std::make_shared<HeldBySmartPtr, int, std::string>)
+ .smart_ptr<CustomSmartPtr<HeldBySmartPtr>>("CustomSmartPtr<HeldBySmartPtr>")
+ .smart_ptr_constructor("shared_ptr<HeldbySmartPtr>", &std::make_shared<HeldBySmartPtr, int, std::string>)
.class_function("newCustomPtr", HeldBySmartPtr::newCustomPtr)
.function("returnThis", &takesHeldBySmartPtrSharedPtr)
.property("i", &HeldBySmartPtr::i)
@@ -1836,8 +1836,8 @@ EMSCRIPTEN_BINDINGS(tests) {
function("takesHeldBySmartPtrSharedPtr", &takesHeldBySmartPtrSharedPtr);
class_<HeldByCustomSmartPtr>("HeldByCustomSmartPtr")
- .smart_ptr<std::shared_ptr<HeldByCustomSmartPtr>>()
- .smart_ptr_constructor(&HeldByCustomSmartPtr::create)
+ .smart_ptr<std::shared_ptr<HeldByCustomSmartPtr>>("shared_ptr<HeldByCustomSmartPtr>")
+ .smart_ptr_constructor("CustomSmartPtr<HeldByCustomSmartPtr>", &HeldByCustomSmartPtr::create)
.class_function("createSharedPtr", &HeldByCustomSmartPtr::createSharedPtr)
.property("i", &HeldByCustomSmartPtr::i)
.property("s", &HeldByCustomSmartPtr::s)
@@ -2022,7 +2022,7 @@ EMSCRIPTEN_BINDINGS(overloads) {
;
class_<MultipleSmartCtors>("MultipleSmartCtors")
- .smart_ptr<std::shared_ptr<MultipleSmartCtors>>()
+ .smart_ptr<std::shared_ptr<MultipleSmartCtors>>("shared_ptr<MultipleSmartCtors>")
.constructor(&std::make_shared<MultipleSmartCtors, int>)
.constructor(&std::make_shared<MultipleSmartCtors, int, int>)
.function("WhichCtorCalled", &MultipleSmartCtors::WhichCtorCalled)
@@ -2147,6 +2147,8 @@ struct BoundClass {
};
EMSCRIPTEN_BINDINGS(incomplete) {
+ constant("hasUnboundTypeNames", emscripten::has_unbound_type_names);
+
function("getUnboundClass", &passThrough<UnboundClass>);
class_<HasUnboundBase, base<UnboundClass>>("HasUnboundBase")
@@ -2247,7 +2249,7 @@ std::shared_ptr<Base> return_Base_from_DerivedWithOffset(std::shared_ptr<Derived
EMSCRIPTEN_BINDINGS(with_adjustment) {
class_<DerivedWithOffset, base<Base>>("DerivedWithOffset")
- .smart_ptr_constructor(&std::make_shared<DerivedWithOffset>)
+ .smart_ptr_constructor("shared_ptr<DerivedWithOffset>", &std::make_shared<DerivedWithOffset>)
;
function("return_Base_from_DerivedWithOffset", &return_Base_from_DerivedWithOffset);
@@ -2304,3 +2306,60 @@ EMSCRIPTEN_BINDINGS(mixins) {
.constructor<>()
);
}
+
+template<typename T>
+T val_as(const val& v) {
+ return v.as<T>();
+}
+
+EMSCRIPTEN_BINDINGS(val_as) {
+ function("val_as_bool", &val_as<bool>);
+ function("val_as_char", &val_as<char>);
+ function("val_as_short", &val_as<short>);
+ function("val_as_int", &val_as<int>);
+ function("val_as_long", &val_as<long>);
+
+ function("val_as_float", &val_as<float>);
+ function("val_as_double", &val_as<double>);
+
+ function("val_as_string", &val_as<std::string>);
+ function("val_as_wstring", &val_as<std::wstring>);
+ function("val_as_val", &val_as<val>);
+
+ function("val_as_value_object", &val_as<StructVector>);
+ function("val_as_value_array", &val_as<TupleVector>);
+
+ function("val_as_enum", &val_as<Enum>);
+
+ // memory_view is always JS -> C++
+ //function("val_as_memory_view", &val_as<memory_view>);
+}
+
+val construct_with_6(val factory) {
+ unsigned char a1 = 6;
+ double a2 = -12.5;
+ std::string a3("a3");
+ StructVector a4(1, 2, 3, 4);
+ EnumClass a5 = EnumClass::TWO;
+ TupleVector a6(-1, -2, -3, -4);
+ return factory.new_(a1, a2, a3, a4, a5, a6);
+}
+
+val construct_with_memory_view(val factory) {
+ static const char data[11] = "0123456789";
+ return factory.new_(
+ std::string("before"),
+ memory_view(10, data),
+ std::string("after"));
+}
+
+val construct_with_ints_and_float(val factory) {
+ static const char data[11] = "0123456789";
+ return factory.new_(65537, 4.0f, 65538);
+}
+
+EMSCRIPTEN_BINDINGS(val_new_) {
+ function("construct_with_6_arguments", &construct_with_6);
+ function("construct_with_memory_view", &construct_with_memory_view);
+ function("construct_with_ints_and_float", &construct_with_ints_and_float);
+}
diff --git a/tests/emscripten_log/emscripten_log.cpp b/tests/emscripten_log/emscripten_log.cpp
index a5bb8432..f4cc41db 100644
--- a/tests/emscripten_log/emscripten_log.cpp
+++ b/tests/emscripten_log/emscripten_log.cpp
@@ -5,10 +5,6 @@
#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().
@@ -83,14 +79,14 @@ void __attribute__((noinline)) bar(int = 0, char * = 0, double = 0) // Arbitrary
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);
+ MYASSERT(!!strstr(callstack, ".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);
+ MYASSERT(!!strstr(callstack, ".js:"), "Callstack was %s!", callstack);
}
+ MYASSERT(!!strstr(callstack, "at bar(int, char*, double)"), "Callstack was %s!", callstack);
+ MYASSERT(!!strstr(callstack, "at void Foo<int>()"), "Callstack was %s!", callstack);
// 5. Clean up.
delete[] callstack;
@@ -99,6 +95,14 @@ void __attribute__((noinline)) bar(int = 0, char * = 0, double = 0) // Arbitrary
char str[1024];
emscripten_get_callstack(EM_LOG_NO_PATHS | EM_LOG_JS_STACK, str, 1024);
+ // Test that obtaining a truncated callstack works. (https://github.com/kripken/emscripten/issues/2171)
+ char *buffer = new char[21];
+ buffer[20] = 0x01; // Magic sentinel that should not change its value.
+ emscripten_get_callstack(EM_LOG_C_STACK | EM_LOG_DEMANGLE | EM_LOG_NO_PATHS | EM_LOG_FUNC_PARAMS, buffer, 20);
+ MYASSERT(!!strstr(buffer, "at bar(int,"), "Truncated callstack was %s!", buffer);
+ MYASSERT(buffer[20] == 0x01);
+ delete[] buffer;
+
/* 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)
@@ -126,11 +130,10 @@ void __attribute__((noinline)) Foo() // Arbitrary function signature to add some
int main()
{
Foo<int>();
-#ifndef RUN_FROM_JS_SHELL
+#ifdef REPORT_RESULT
REPORT_RESULT();
- return 0;
-#else
+#endif
if (result)
printf("Success!\n");
-#endif
+ return 0;
}
diff --git a/tests/fs/test_idbfs_sync.c b/tests/fs/test_idbfs_sync.c
index ff356416..0d8f4d71 100644
--- a/tests/fs/test_idbfs_sync.c
+++ b/tests/fs/test_idbfs_sync.c
@@ -1,8 +1,6 @@
#include <stdio.h>
#include <emscripten.h>
-#define EM_ASM_REEXPAND(x) EM_ASM(x)
-
void success() {
int result = 1;
REPORT_RESULT();
@@ -15,31 +13,35 @@ int main() {
);
#if FIRST
- // store local files to backing IDB
- EM_ASM_REEXPAND(
+ // store local files to backing IDB. Note that we use the JS FS API for everything here, but we
+ // could use normal libc fwrite etc. to do the writing. All we need the JS FS API for is to
+ // mount the filesystem and do syncfs.
+ EM_ASM_ARGS({
FS.writeFile('/working/waka.txt', 'az');
- FS.writeFile('/working/moar.txt', SECRET);
+ FS.writeFile('/working/moar.txt', $0);
FS.syncfs(function (err) {
assert(!err);
- ccall('success', 'v', '', []);
+ ccall('success', 'v');
});
- );
+ }, SECRET);
#else
// load files from backing IDB
- EM_ASM_REEXPAND(
+ EM_ASM_ARGS({
FS.syncfs(true, function (err) {
assert(!err);
var contents = FS.readFile('/working/waka.txt', { encoding: 'utf8' });
- assert(contents === 'az');
+ assert(contents === 'az', 'bad contents ' + contents);
- var secret = FS.readFile('/working/moar.txt', { encoding: 'utf8' });
- assert(secret === SECRET);
+ // note we convert to a number here (using +), since we used writeFile, which writes a
+ // JS string.
+ var secret = +FS.readFile('/working/moar.txt', { encoding: 'utf8' });
+ assert(secret === $0, 'bad secret ' + [secret, $0, typeof secret, typeof $0]);
ccall('success', 'v', '', []);
});
- );
+ }, SECRET);
#endif
emscripten_exit_with_live_runtime();
diff --git a/tests/full_es2_sdlproc.c b/tests/full_es2_sdlproc.c
index d9ac072b..3f72f2bf 100644
--- a/tests/full_es2_sdlproc.c
+++ b/tests/full_es2_sdlproc.c
@@ -704,6 +704,8 @@ gears_init(void)
gear3 = create_gear(1.3, 2.0, 0.5, 10, 0.7);
}
+#include "SDL/SDL.h"
+
int
main(int argc, char *argv[])
{
diff --git a/tests/fuzz/11.c b/tests/fuzz/11.c
new file mode 100644
index 00000000..5d5644fe
--- /dev/null
+++ b/tests/fuzz/11.c
@@ -0,0 +1,1570 @@
+/*
+ * This is a RANDOMLY GENERATED PROGRAM.
+ *
+ * Generator: csmith 2.2.0
+ * Git version: bf42ffd
+ * Options: --no-volatiles --no-packed-struct --no-math64
+ * Seed: 3982457068
+ */
+
+#include "csmith.h"
+
+
+static long __undefined;
+
+/* --- Struct/Union Declarations --- */
+struct S0 {
+ const int16_t f0;
+ uint16_t f1;
+ const uint16_t f2;
+ uint16_t f3;
+ const uint8_t f4;
+};
+
+struct S1 {
+ int8_t f0;
+ int32_t f1;
+ uint16_t f2;
+ struct S0 f3;
+ signed : 0;
+ uint16_t f4;
+};
+
+union U2 {
+ int32_t f0;
+ int8_t * f1;
+ uint16_t f2;
+};
+
+/* --- GLOBAL VARIABLES --- */
+static int8_t g_9 = 0L;
+static int8_t *g_10 = &g_9;
+static union U2 g_23 = {5L};
+static uint32_t g_27 = 0x763523E2L;
+static int32_t g_29 = (-10L);
+static int32_t *g_28[8] = {&g_29,&g_29,&g_29,&g_29,&g_29,&g_29,&g_29,&g_29};
+static int32_t g_33 = (-7L);
+static int32_t g_82 = 0x6BCC6B82L;
+static int16_t g_92 = 0x986BL;
+static uint8_t g_94 = 0x71L;
+static uint8_t g_96 = 9UL;
+static const int32_t g_130[8][6] = {{0xBB608825L,0x2773D60BL,(-4L),(-1L),0x16DB7C97L,(-4L)},{0xB3C507C2L,0L,0x16DB7C97L,0x013F98BFL,0x16DB7C97L,0L},{(-1L),0x2773D60BL,1L,0x013F98BFL,0x2773D60BL,0x16DB7C97L},{0xB3C507C2L,0x16DB7C97L,1L,(-1L),0L,0L},{0xBB608825L,0x16DB7C97L,0x16DB7C97L,0xBB608825L,0x2773D60BL,(-4L)},{0xBB608825L,0x2773D60BL,(-4L),(-1L),0x16DB7C97L,(-4L)},{0xB3C507C2L,0L,8L,0x2773D60BL,8L,0x73286A6EL},{(-4L),1L,8L,0x2773D60BL,1L,8L}};
+static const int32_t g_132 = 0xBF8BA2E1L;
+static const int32_t *g_131 = &g_132;
+static const int32_t *g_133[1] = {&g_82};
+static int32_t g_140 = 1L;
+static uint8_t g_141[6][7] = {{0x59L,0x4EL,0x2EL,0xA7L,0xDAL,247UL,0x90L},{246UL,1UL,0x97L,0x54L,247UL,0x54L,0x97L},{247UL,247UL,0xF6L,0xC5L,247UL,0x54L,0x38L},{0x0EL,0xF6L,0x38L,255UL,246UL,247UL,0x4EL},{0x54L,0x6EL,247UL,0x38L,247UL,0x6EL,0x54L},{0xDAL,0x54L,0x59L,0x38L,247UL,0x4EL,255UL}};
+static uint16_t *g_146 = &g_23.f2;
+static struct S0 g_193 = {0L,0UL,65535UL,0x6792L,0xD8L};
+static struct S1 g_203 = {8L,-1L,65531UL,{-8L,0xE92DL,0x7043L,0x3039L,253UL},0xF5C3L};
+static struct S1 *g_202[5][10] = {{&g_203,(void*)0,&g_203,&g_203,&g_203,(void*)0,&g_203,&g_203,(void*)0,(void*)0},{&g_203,(void*)0,(void*)0,&g_203,&g_203,(void*)0,(void*)0,&g_203,(void*)0,&g_203},{(void*)0,(void*)0,&g_203,(void*)0,&g_203,(void*)0,&g_203,(void*)0,(void*)0,&g_203},{&g_203,(void*)0,&g_203,&g_203,(void*)0,(void*)0,&g_203,&g_203,(void*)0,&g_203},{(void*)0,(void*)0,(void*)0,&g_203,(void*)0,&g_203,(void*)0,&g_203,(void*)0,(void*)0}};
+static uint32_t g_275[6][3] = {{0xB93AAF63L,0xB93AAF63L,0xB93AAF63L},{0x949218ACL,0x949218ACL,0x949218ACL},{0xB93AAF63L,0xB93AAF63L,0xB93AAF63L},{0x949218ACL,0x949218ACL,0x949218ACL},{0xB93AAF63L,0xB93AAF63L,0xB93AAF63L},{0x949218ACL,0x949218ACL,0x949218ACL}};
+static int32_t *g_364 = &g_23.f0;
+static int32_t **g_363 = &g_364;
+static int32_t ***g_362[4][6] = {{(void*)0,&g_363,&g_363,&g_363,(void*)0,&g_363},{&g_363,(void*)0,&g_363,&g_363,(void*)0,&g_363},{(void*)0,&g_363,&g_363,(void*)0,&g_363,&g_363},{&g_363,(void*)0,&g_363,&g_363,&g_363,&g_363}};
+static int16_t g_367 = 0x405BL;
+static int8_t g_368[9][8][3] = {{{0x36L,(-4L),0x84L},{3L,(-1L),0L},{0xADL,0x36L,0x84L},{(-1L),0x20L,3L},{8L,(-1L),8L},{1L,0x30L,(-6L)},{0L,0xE3L,0x5BL},{0x30L,0L,0xF6L}},{{(-1L),0x5BL,0xF7L},{0x30L,(-8L),1L},{0L,1L,1L},{1L,0xF6L,(-1L)},{8L,(-1L),0x6DL},{(-1L),0xE6L,0x8CL},{0xADL,(-9L),0x47L},{3L,1L,(-1L)}},{{(-1L),1L,8L},{0x8BL,0x8BL,1L},{0xADL,0x47L,0L},{0xC2L,1L,0x30L},{0L,(-8L),(-1L)},{0xFBL,0xC2L,0x30L},{0xF7L,(-9L),0L},{1L,(-1L),1L}},{{(-4L),0x5BL,8L},{0xE6L,0x0AL,(-1L)},{0x5BL,(-1L),0xADL},{(-1L),(-1L),3L},{0x5BL,0x6DL,0x36L},{0xE6L,0xF6L,0xF6L},{(-4L),0xADL,0x47L},{1L,(-1L),0L}},{{0xF7L,0xBDL,(-2L)},{0xFBL,0xCAL,0x8BL},{0L,0xBDL,(-8L)},{0xC2L,(-1L),0xE6L},{0xADL,0xADL,0xBDL},{0x8BL,0xF6L,(-6L)},{(-1L),0x6DL,(-1L)},{(-6L),(-1L),0xC2L}},{{0L,(-1L),(-1L)},{0x8CL,0x0AL,(-6L)},{0xBDL,0x5BL,0xBDL},{(-8L),(-1L),0xE6L},{8L,(-9L),(-8L)},{(-1L),0xC2L,0x8BL},{1L,(-8L),(-2L)},{(-1L),1L,0L}},{{8L,0x47L,0x47L},{(-8L),0x8BL,0xF6L},{0xBDL,1L,0x36L},{0x8CL,1L,3L},{0L,0x84L,0xADL},{(-6L),1L,(-1L)},{(-1L),1L,8L},{0x8BL,0x8BL,1L}},{{0xADL,0x47L,0L},{0xC2L,1L,0x30L},{0L,(-8L),(-1L)},{0xFBL,0xC2L,0x30L},{0xF7L,(-9L),0L},{1L,(-1L),1L},{(-4L),0x5BL,8L},{0xE6L,0x0AL,(-1L)}},{{0x5BL,(-1L),0xADL},{(-1L),(-1L),3L},{0x5BL,0x6DL,0x36L},{0xE6L,0xF6L,0xF6L},{(-4L),0xADL,0x47L},{1L,(-1L),0L},{0xF7L,0xBDL,(-2L)},{0xFBL,0xCAL,0x8BL}}};
+static struct S1 g_429[4][6][6] = {{{{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L},{0x0CL,0xF59095C9L,0x632BL,{1L,65528UL,0xAC68L,0UL,1UL},0UL},{0x0CL,0xF59095C9L,0x632BL,{1L,65528UL,0xAC68L,0UL,1UL},0UL},{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L},{-8L,0xEF94E310L,0xE17EL,{0xF561L,0xE7EFL,65535UL,0xF583L,255UL},0xF36CL},{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L}},{{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L},{-8L,0xEF94E310L,0xE17EL,{0xF561L,0xE7EFL,65535UL,0xF583L,255UL},0xF36CL},{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L},{0x0CL,0xF59095C9L,0x632BL,{1L,65528UL,0xAC68L,0UL,1UL},0UL},{0x0CL,0xF59095C9L,0x632BL,{1L,65528UL,0xAC68L,0UL,1UL},0UL},{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L}},{{0x3CL,0xDFB0633DL,65527UL,{8L,1UL,65530UL,0UL,2UL},0x7E5AL},{0x3CL,0xDFB0633DL,65527UL,{8L,1UL,65530UL,0UL,2UL},0x7E5AL},{0x0CL,0xF59095C9L,0x632BL,{1L,65528UL,0xAC68L,0UL,1UL},0UL},{7L,9L,0xCB7DL,{1L,0UL,0x1D7BL,0x4424L,0xF9L},0xC9D4L},{0x0CL,0xF59095C9L,0x632BL,{1L,65528UL,0xAC68L,0UL,1UL},0UL},{0x3CL,0xDFB0633DL,65527UL,{8L,1UL,65530UL,0UL,2UL},0x7E5AL}},{{0x0CL,0xF59095C9L,0x632BL,{1L,65528UL,0xAC68L,0UL,1UL},0UL},{-8L,0xEF94E310L,0xE17EL,{0xF561L,0xE7EFL,65535UL,0xF583L,255UL},0xF36CL},{-8L,0xEF94E310L,0xE17EL,{0xF561L,0xE7EFL,65535UL,0xF583L,255UL},0xF36CL},{-8L,0xEF94E310L,0xE17EL,{0xF561L,0xE7EFL,65535UL,0xF583L,255UL},0xF36CL},{0x3CL,0xDFB0633DL,65527UL,{8L,1UL,65530UL,0UL,2UL},0x7E5AL},{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L}},{{0x0CL,0xF59095C9L,0x632BL,{1L,65528UL,0xAC68L,0UL,1UL},0UL},{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L},{-8L,0xEF94E310L,0xE17EL,{0xF561L,0xE7EFL,65535UL,0xF583L,255UL},0xF36CL},{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L},{0x0CL,0xF59095C9L,0x632BL,{1L,65528UL,0xAC68L,0UL,1UL},0UL},{0x0CL,0xF59095C9L,0x632BL,{1L,65528UL,0xAC68L,0UL,1UL},0UL}},{{7L,9L,0xCB7DL,{1L,0UL,0x1D7BL,0x4424L,0xF9L},0xC9D4L},{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L},{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L},{7L,9L,0xCB7DL,{1L,0UL,0x1D7BL,0x4424L,0xF9L},0xC9D4L},{0x3CL,0xDFB0633DL,65527UL,{8L,1UL,65530UL,0UL,2UL},0x7E5AL},{7L,9L,0xCB7DL,{1L,0UL,0x1D7BL,0x4424L,0xF9L},0xC9D4L}}},{{{7L,9L,0xCB7DL,{1L,0UL,0x1D7BL,0x4424L,0xF9L},0xC9D4L},{0x3CL,0xDFB0633DL,65527UL,{8L,1UL,65530UL,0UL,2UL},0x7E5AL},{7L,9L,0xCB7DL,{1L,0UL,0x1D7BL,0x4424L,0xF9L},0xC9D4L},{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L},{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L},{7L,9L,0xCB7DL,{1L,0UL,0x1D7BL,0x4424L,0xF9L},0xC9D4L}},{{0x0CL,0xF59095C9L,0x632BL,{1L,65528UL,0xAC68L,0UL,1UL},0UL},{0x0CL,0xF59095C9L,0x632BL,{1L,65528UL,0xAC68L,0UL,1UL},0UL},{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L},{-8L,0xEF94E310L,0xE17EL,{0xF561L,0xE7EFL,65535UL,0xF583L,255UL},0xF36CL},{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L},{0x0CL,0xF59095C9L,0x632BL,{1L,65528UL,0xAC68L,0UL,1UL},0UL}},{{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L},{0x3CL,0xDFB0633DL,65527UL,{8L,1UL,65530UL,0UL,2UL},0x7E5AL},{-8L,0xEF94E310L,0xE17EL,{0xF561L,0xE7EFL,65535UL,0xF583L,255UL},0xF36CL},{-8L,0xEF94E310L,0xE17EL,{0xF561L,0xE7EFL,65535UL,0xF583L,255UL},0xF36CL},{0x3CL,0xDFB0633DL,65527UL,{8L,1UL,65530UL,0UL,2UL},0x7E5AL},{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L}},{{0x0CL,0xF59095C9L,0x632BL,{1L,65528UL,0xAC68L,0UL,1UL},0UL},{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L},{-8L,0xEF94E310L,0xE17EL,{0xF561L,0xE7EFL,65535UL,0xF583L,255UL},0xF36CL},{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L},{0x0CL,0xF59095C9L,0x632BL,{1L,65528UL,0xAC68L,0UL,1UL},0UL},{0x0CL,0xF59095C9L,0x632BL,{1L,65528UL,0xAC68L,0UL,1UL},0UL}},{{7L,9L,0xCB7DL,{1L,0UL,0x1D7BL,0x4424L,0xF9L},0xC9D4L},{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L},{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L},{7L,9L,0xCB7DL,{1L,0UL,0x1D7BL,0x4424L,0xF9L},0xC9D4L},{0x3CL,0xDFB0633DL,65527UL,{8L,1UL,65530UL,0UL,2UL},0x7E5AL},{7L,9L,0xCB7DL,{1L,0UL,0x1D7BL,0x4424L,0xF9L},0xC9D4L}},{{7L,9L,0xCB7DL,{1L,0UL,0x1D7BL,0x4424L,0xF9L},0xC9D4L},{0x3CL,0xDFB0633DL,65527UL,{8L,1UL,65530UL,0UL,2UL},0x7E5AL},{7L,9L,0xCB7DL,{1L,0UL,0x1D7BL,0x4424L,0xF9L},0xC9D4L},{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L},{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L},{7L,9L,0xCB7DL,{1L,0UL,0x1D7BL,0x4424L,0xF9L},0xC9D4L}}},{{{0x0CL,0xF59095C9L,0x632BL,{1L,65528UL,0xAC68L,0UL,1UL},0UL},{0x0CL,0xF59095C9L,0x632BL,{1L,65528UL,0xAC68L,0UL,1UL},0UL},{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L},{-8L,0xEF94E310L,0xE17EL,{0xF561L,0xE7EFL,65535UL,0xF583L,255UL},0xF36CL},{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L},{0x0CL,0xF59095C9L,0x632BL,{1L,65528UL,0xAC68L,0UL,1UL},0UL}},{{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L},{0x3CL,0xDFB0633DL,65527UL,{8L,1UL,65530UL,0UL,2UL},0x7E5AL},{-8L,0xEF94E310L,0xE17EL,{0xF561L,0xE7EFL,65535UL,0xF583L,255UL},0xF36CL},{-8L,0xEF94E310L,0xE17EL,{0xF561L,0xE7EFL,65535UL,0xF583L,255UL},0xF36CL},{0x3CL,0xDFB0633DL,65527UL,{8L,1UL,65530UL,0UL,2UL},0x7E5AL},{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L}},{{0x0CL,0xF59095C9L,0x632BL,{1L,65528UL,0xAC68L,0UL,1UL},0UL},{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L},{-8L,0xEF94E310L,0xE17EL,{0xF561L,0xE7EFL,65535UL,0xF583L,255UL},0xF36CL},{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L},{0x0CL,0xF59095C9L,0x632BL,{1L,65528UL,0xAC68L,0UL,1UL},0UL},{0x0CL,0xF59095C9L,0x632BL,{1L,65528UL,0xAC68L,0UL,1UL},0UL}},{{7L,9L,0xCB7DL,{1L,0UL,0x1D7BL,0x4424L,0xF9L},0xC9D4L},{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L},{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L},{7L,9L,0xCB7DL,{1L,0UL,0x1D7BL,0x4424L,0xF9L},0xC9D4L},{0x3CL,0xDFB0633DL,65527UL,{8L,1UL,65530UL,0UL,2UL},0x7E5AL},{7L,9L,0xCB7DL,{1L,0UL,0x1D7BL,0x4424L,0xF9L},0xC9D4L}},{{7L,9L,0xCB7DL,{1L,0UL,0x1D7BL,0x4424L,0xF9L},0xC9D4L},{0x3CL,0xDFB0633DL,65527UL,{8L,1UL,65530UL,0UL,2UL},0x7E5AL},{7L,9L,0xCB7DL,{1L,0UL,0x1D7BL,0x4424L,0xF9L},0xC9D4L},{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L},{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L},{7L,9L,0xCB7DL,{1L,0UL,0x1D7BL,0x4424L,0xF9L},0xC9D4L}},{{0x0CL,0xF59095C9L,0x632BL,{1L,65528UL,0xAC68L,0UL,1UL},0UL},{0x0CL,0xF59095C9L,0x632BL,{1L,65528UL,0xAC68L,0UL,1UL},0UL},{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L},{-8L,0xEF94E310L,0xE17EL,{0xF561L,0xE7EFL,65535UL,0xF583L,255UL},0xF36CL},{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L},{0x0CL,0xF59095C9L,0x632BL,{1L,65528UL,0xAC68L,0UL,1UL},0UL}}},{{{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L},{0x3CL,0xDFB0633DL,65527UL,{8L,1UL,65530UL,0UL,2UL},0x7E5AL},{-8L,0xEF94E310L,0xE17EL,{0xF561L,0xE7EFL,65535UL,0xF583L,255UL},0xF36CL},{-8L,0xEF94E310L,0xE17EL,{0xF561L,0xE7EFL,65535UL,0xF583L,255UL},0xF36CL},{0x3CL,0xDFB0633DL,65527UL,{8L,1UL,65530UL,0UL,2UL},0x7E5AL},{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L}},{{0x0CL,0xF59095C9L,0x632BL,{1L,65528UL,0xAC68L,0UL,1UL},0UL},{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L},{-8L,0xEF94E310L,0xE17EL,{0xF561L,0xE7EFL,65535UL,0xF583L,255UL},0xF36CL},{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L},{0x0CL,0xF59095C9L,0x632BL,{1L,65528UL,0xAC68L,0UL,1UL},0UL},{0x0CL,0xF59095C9L,0x632BL,{1L,65528UL,0xAC68L,0UL,1UL},0UL}},{{7L,9L,0xCB7DL,{1L,0UL,0x1D7BL,0x4424L,0xF9L},0xC9D4L},{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L},{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L},{7L,9L,0xCB7DL,{1L,0UL,0x1D7BL,0x4424L,0xF9L},0xC9D4L},{0x3CL,0xDFB0633DL,65527UL,{8L,1UL,65530UL,0UL,2UL},0x7E5AL},{7L,9L,0xCB7DL,{1L,0UL,0x1D7BL,0x4424L,0xF9L},0xC9D4L}},{{7L,9L,0xCB7DL,{1L,0UL,0x1D7BL,0x4424L,0xF9L},0xC9D4L},{0x3CL,0xDFB0633DL,65527UL,{8L,1UL,65530UL,0UL,2UL},0x7E5AL},{7L,9L,0xCB7DL,{1L,0UL,0x1D7BL,0x4424L,0xF9L},0xC9D4L},{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L},{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L},{7L,9L,0xCB7DL,{1L,0UL,0x1D7BL,0x4424L,0xF9L},0xC9D4L}},{{0x0CL,0xF59095C9L,0x632BL,{1L,65528UL,0xAC68L,0UL,1UL},0UL},{0x0CL,0xF59095C9L,0x632BL,{1L,65528UL,0xAC68L,0UL,1UL},0UL},{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L},{-8L,0xEF94E310L,0xE17EL,{0xF561L,0xE7EFL,65535UL,0xF583L,255UL},0xF36CL},{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L},{0x0CL,0xF59095C9L,0x632BL,{1L,65528UL,0xAC68L,0UL,1UL},0UL}},{{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L},{0x3CL,0xDFB0633DL,65527UL,{8L,1UL,65530UL,0UL,2UL},0x7E5AL},{-8L,0xEF94E310L,0xE17EL,{0xF561L,0xE7EFL,65535UL,0xF583L,255UL},0xF36CL},{-8L,0xEF94E310L,0xE17EL,{0xF561L,0xE7EFL,65535UL,0xF583L,255UL},0xF36CL},{0x3CL,0xDFB0633DL,65527UL,{8L,1UL,65530UL,0UL,2UL},0x7E5AL},{0x8AL,9L,65535UL,{0x291EL,1UL,0UL,65530UL,0x41L},0xB256L}}}};
+static int8_t g_448 = (-3L);
+static uint32_t g_491 = 9UL;
+static uint16_t *g_522 = &g_203.f3.f1;
+static struct S0 g_663 = {0xB058L,0xD411L,0UL,0x1BCDL,4UL};
+static int32_t *g_688 = &g_82;
+static uint32_t g_709[9][3] = {{0xF128B38DL,0xF128B38DL,0xF128B38DL},{1UL,1UL,1UL},{0xF128B38DL,0xF128B38DL,0xF128B38DL},{1UL,1UL,1UL},{0xF128B38DL,0xF128B38DL,0xF128B38DL},{1UL,1UL,1UL},{0xF128B38DL,0xF128B38DL,0xF128B38DL},{1UL,1UL,1UL},{0xF128B38DL,0xF128B38DL,0xF128B38DL}};
+static uint8_t * const g_713 = &g_94;
+static uint8_t * const * const g_712 = &g_713;
+static uint32_t **g_737 = (void*)0;
+static struct S0 *g_803 = (void*)0;
+static struct S0 **g_802 = &g_803;
+static int8_t g_870 = 0xBAL;
+static int32_t g_902 = 0L;
+static uint32_t g_1001 = 0xCE9223C1L;
+static const union U2 g_1007 = {-1L};
+static const union U2 *g_1006 = &g_1007;
+static int8_t *g_1010 = &g_429[3][2][4].f0;
+static union U2 *g_1059 = (void*)0;
+static union U2 **g_1058 = &g_1059;
+static uint8_t *g_1153 = &g_96;
+static const int8_t ***g_1346 = (void*)0;
+static uint32_t g_1359 = 6UL;
+static uint32_t g_1361 = 0UL;
+static uint8_t **g_1455 = &g_1153;
+static int8_t g_1473[9] = {0x70L,0x70L,0x70L,0x70L,0x70L,0x70L,0x70L,0x70L,0x70L};
+static uint32_t g_1474 = 0x2827E164L;
+static uint32_t g_1492 = 0x98C6FA4DL;
+static uint32_t *g_1707 = (void*)0;
+static uint32_t * const *g_1706 = &g_1707;
+static const int32_t g_1725 = 0xA265A2AFL;
+static uint32_t ****g_1766 = (void*)0;
+static int16_t g_1798 = 0xD17FL;
+static struct S1 ** const g_1899 = (void*)0;
+static const uint32_t *g_1931[2] = {(void*)0,(void*)0};
+static const uint32_t **g_1930 = &g_1931[0];
+static const int32_t *g_1949 = &g_132;
+static int32_t ****g_2039 = &g_362[0][3];
+static uint32_t g_2122 = 18446744073709551612UL;
+static int16_t *g_2213[9][3][4] = {{{&g_92,&g_1798,&g_92,(void*)0},{(void*)0,&g_367,(void*)0,&g_92},{&g_92,&g_367,&g_1798,&g_1798}},{{&g_1798,&g_1798,&g_367,&g_367},{(void*)0,&g_92,&g_367,&g_92},{&g_1798,(void*)0,&g_1798,(void*)0}},{{&g_92,&g_1798,(void*)0,(void*)0},{(void*)0,&g_1798,&g_367,(void*)0},{&g_92,&g_1798,&g_1798,&g_367}},{{&g_1798,&g_1798,&g_1798,(void*)0},{&g_92,&g_367,&g_1798,&g_1798},{&g_1798,&g_1798,&g_92,&g_92}},{{(void*)0,(void*)0,(void*)0,&g_1798},{&g_92,&g_92,&g_1798,(void*)0},{&g_1798,&g_367,&g_1798,&g_1798}},{{&g_367,&g_367,&g_1798,(void*)0},{&g_367,&g_92,(void*)0,&g_1798},{&g_92,(void*)0,(void*)0,&g_92}},{{&g_367,&g_1798,&g_1798,&g_1798},{(void*)0,&g_367,&g_1798,(void*)0},{&g_1798,&g_1798,&g_92,&g_367}},{{(void*)0,&g_1798,(void*)0,(void*)0},{&g_1798,&g_1798,(void*)0,&g_1798},{&g_92,(void*)0,&g_92,&g_1798}},{{(void*)0,&g_1798,&g_92,(void*)0},{&g_1798,&g_92,&g_367,(void*)0},{&g_1798,&g_367,&g_92,&g_92}}};
+static int16_t * const *g_2212 = &g_2213[8][2][2];
+static int16_t g_2341 = 0x2E6AL;
+static union U2 ***g_2562 = &g_1058;
+static union U2 ****g_2561 = &g_2562;
+static uint32_t g_2575 = 0xBF53EBB2L;
+static struct S0 g_2686 = {1L,0UL,1UL,65529UL,0UL};
+static struct S0 *g_2718[3][2] = {{(void*)0,(void*)0},{(void*)0,(void*)0},{(void*)0,(void*)0}};
+static uint8_t ***g_2741 = &g_1455;
+static const int32_t *g_2749 = &g_1007.f0;
+static const int32_t **g_2748 = &g_2749;
+static const int32_t ***g_2747 = &g_2748;
+static uint32_t g_2898 = 18446744073709551615UL;
+
+
+/* --- FORWARD DECLARATIONS --- */
+static uint16_t func_1(void);
+static int32_t * func_2(int8_t * p_3);
+static int8_t * func_4(uint32_t p_5, int8_t * p_6, int8_t * p_7);
+static int8_t * func_11(uint8_t p_12, int32_t * p_13, struct S0 p_14, int32_t * p_15);
+static int32_t * func_16(struct S1 p_17, uint32_t p_18, int8_t * p_19, union U2 p_20);
+static int32_t func_34(int8_t * p_35, int8_t * p_36, uint16_t p_37);
+static int8_t * func_38(int32_t * p_39);
+static union U2 func_40(int32_t * p_41, int8_t * p_42, struct S0 p_43, int32_t p_44);
+static int32_t * func_45(int8_t * const p_46, int32_t * p_47, int8_t * p_48);
+static int32_t * func_50(uint32_t p_51, int8_t p_52, int8_t p_53, int8_t * p_54, const int32_t p_55);
+
+
+/* --- FUNCTIONS --- */
+/* ------------------------------------------ */
+/*
+ * reads : g_10 g_23 g_27 g_28 g_29 g_33 g_688 g_82 g_1006 g_522 g_203.f3.f1 g_713 g_146 g_23.f2 g_9 g_448 g_23.f0 g_193 g_130 g_96 g_202 g_94 g_140 g_132 g_141 g_275 g_203.f3.f0 g_203.f3.f4 g_362 g_367 g_203.f1 g_368 g_802 g_803 g_491 g_1725 g_712 g_203.f3.f3 g_902 g_1359 g_1058 g_2341 g_1153 g_1059 g_663.f1 g_1455 g_1492 g_2561 g_1949 g_203.f4 g_2575 g_1010 g_429.f0 g_131 g_2562 g_870 g_92 g_2741 g_2898 g_709
+ * writes: g_27 g_28 g_29 g_33 g_82 g_23 g_94 g_1010 g_202 g_203.f1 g_92 g_275 g_448 g_203.f0 g_96 g_141 g_193.f3 g_9 g_663.f1 g_803 g_491 g_367 g_2212 g_203.f3.f1 g_2039 g_203.f3.f3 g_902 g_2213 g_1359 g_1059 g_688 g_1492 g_131 g_203.f4 g_2575 g_737 g_2562 g_10 g_870 g_2898 g_429.f0
+ */
+static uint16_t func_1(void)
+{ /* block id: 0 */
+ int8_t *l_8[3];
+ struct S1 l_21 = {0xF7L,-1L,0x9D9EL,{1L,0x422DL,0xFBA2L,0UL,0xBFL},0xC2F5L};
+ int32_t l_22 = 0xB6930509L;
+ int32_t *l_30 = &l_22;
+ int32_t *l_31 = &g_29;
+ int8_t **l_2633[1][9][5] = {{{(void*)0,(void*)0,&g_10,&g_10,&g_10},{&l_8[0],&l_8[0],&l_8[0],&l_8[2],&g_1010},{&g_10,(void*)0,(void*)0,&l_8[2],&l_8[1]},{&l_8[0],&l_8[0],&l_8[0],&l_8[0],&l_8[0]},{&l_8[0],&l_8[0],(void*)0,&l_8[1],(void*)0},{&l_8[0],&g_10,&l_8[0],&g_10,&l_8[0]},{&l_8[0],&l_8[2],&g_10,&l_8[1],&l_8[1]},{(void*)0,&g_10,&l_8[0],&l_8[0],&g_10},{&g_10,(void*)0,&l_8[0],&l_8[2],&l_8[1]}}};
+ int8_t *l_2634 = &g_203.f0;
+ int32_t **l_2857 = &l_30;
+ int16_t l_2858[2][2];
+ int32_t l_2861 = 0x6E8C1F75L;
+ int32_t l_2862 = (-1L);
+ int32_t l_2863 = 0x3B8928E0L;
+ int32_t l_2864 = 0L;
+ int8_t l_2865[8][9] = {{0x42L,0x42L,0x42L,0x42L,0x42L,0x42L,0x42L,0x42L,0x42L},{0x92L,0L,0x92L,0L,0x92L,0L,0x92L,0L,0x92L},{0x42L,0x42L,0x42L,0x42L,0x42L,0x42L,0x42L,0x42L,0x42L},{0x92L,0L,0x92L,0L,0x92L,0L,0x92L,0L,0x92L},{0x42L,0x42L,0x42L,0x42L,0x42L,0x42L,0x42L,0x42L,0x42L},{0x92L,0L,0x92L,0L,0x92L,0L,0x92L,0L,0x92L},{0x42L,0x42L,0x42L,0x42L,0x42L,0x42L,0x42L,0x42L,0x42L},{0x92L,0L,0x92L,0L,0x92L,0L,0x92L,0L,0x92L}};
+ int32_t l_2866[7][5] = {{1L,3L,(-8L),(-1L),3L},{0L,3L,(-7L),(-7L),3L},{1L,0L,(-7L),(-1L),0L},{1L,3L,(-8L),(-1L),3L},{0L,3L,(-7L),(-7L),3L},{1L,0L,(-7L),(-1L),0L},{1L,3L,(-8L),(-1L),3L}};
+ uint32_t l_2868 = 6UL;
+ uint32_t **l_2888[1][6][4] = {{{(void*)0,&g_1707,(void*)0,&g_1707},{&g_1707,(void*)0,&g_1707,&g_1707},{(void*)0,(void*)0,&g_1707,&g_1707},{&g_1707,&g_1707,(void*)0,(void*)0},{(void*)0,(void*)0,&g_1707,(void*)0},{&g_1707,(void*)0,(void*)0,(void*)0}}};
+ int32_t l_2889 = (-8L);
+ int16_t l_2890 = 0x4B0FL;
+ uint32_t l_2893 = 0x1C1D9EF6L;
+ struct S0 **l_2894[8][7][1] = {{{&g_2718[2][0]},{&g_2718[2][0]},{&g_2718[2][0]},{&g_803},{&g_803},{&g_2718[2][0]},{&g_2718[2][0]}},{{&g_2718[2][0]},{&g_803},{&g_803},{&g_2718[2][0]},{&g_2718[2][0]},{&g_2718[2][0]},{&g_803}},{{&g_803},{&g_2718[2][0]},{&g_2718[2][0]},{&g_2718[2][0]},{&g_803},{&g_803},{&g_2718[2][0]}},{{&g_2718[2][0]},{&g_2718[2][0]},{&g_803},{&g_803},{&g_2718[2][0]},{&g_2718[2][0]},{&g_2718[2][0]}},{{&g_803},{&g_803},{&g_2718[2][0]},{&g_2718[2][0]},{&g_2718[2][0]},{&g_803},{&g_803}},{{&g_2718[2][0]},{&g_2718[2][0]},{&g_2718[2][0]},{&g_803},{&g_803},{&g_2718[2][0]},{&g_2718[2][0]}},{{&g_2718[2][0]},{&g_803},{&g_803},{&g_2718[2][0]},{&g_2718[2][0]},{&g_2718[2][0]},{&g_803}},{{&g_803},{&g_2718[2][0]},{&g_2718[2][0]},{&g_2718[2][0]},{&g_803},{&g_803},{&g_2718[2][0]}}};
+ const int32_t **l_2916 = &g_131;
+ int32_t l_2917 = 0x0EA97E1BL;
+ int i, j, k;
+ for (i = 0; i < 3; i++)
+ l_8[i] = &g_9;
+ for (i = 0; i < 2; i++)
+ {
+ for (j = 0; j < 2; j++)
+ l_2858[i][j] = 0xD331L;
+ }
+ (*l_2857) = func_2((l_2634 = (g_10 = func_4(((l_8[0] == &g_9) & 0L), g_10, func_11((((g_28[4] = func_16(l_21, l_22, l_8[0], g_23)) != l_30) , 246UL), &g_29, l_21.f3, l_31)))));
+ for (g_92 = 0; (g_92 <= 2); g_92 += 1)
+ { /* block id: 1369 */
+ int32_t *l_2859 = &g_33;
+ int32_t *l_2860[7];
+ int8_t l_2867 = 1L;
+ int32_t l_2891 = 0x72B71305L;
+ const int32_t l_2892 = 0x51C3213CL;
+ struct S0 ***l_2895 = &l_2894[7][4][0];
+ struct S0 l_2907 = {9L,0xF377L,0x63B9L,0x3BAFL,0UL};
+ uint32_t l_2910[1][4];
+ uint16_t l_2914[10] = {3UL,3UL,3UL,3UL,3UL,3UL,3UL,3UL,3UL,3UL};
+ int i, j;
+ for (i = 0; i < 7; i++)
+ l_2860[i] = &g_33;
+ for (i = 0; i < 1; i++)
+ {
+ for (j = 0; j < 4; j++)
+ l_2910[i][j] = 0x60BEB07CL;
+ }
+ --l_2868;
+ if ((**l_2857))
+ break;
+ l_2864 &= (safe_lshift_func_int16_t_s_s((safe_div_func_uint16_t_u_u(((l_2890 |= ((((***g_2741) ^ (((safe_rshift_func_uint8_t_u_s(((((safe_lshift_func_int8_t_s_s(0xB5L, ((safe_lshift_func_uint8_t_u_s((safe_unary_minus_func_uint8_t_u(0UL)), (safe_add_func_uint16_t_u_u((0x77B217B0L >= (*l_30)), (safe_lshift_func_uint8_t_u_s(7UL, 0)))))) > (!(*l_31))))) != (((safe_rshift_func_uint8_t_u_u(((((*l_2859) & (((*l_2859) > 0x42ED6365L) == 1L)) , &g_1707) != l_2888[0][3][2]), (*g_1153))) > (-1L)) == 0x52L)) < (*g_1153)) < (*l_2859)), 0)) == 0L) | l_2889)) , (void*)0) == l_31)) , l_2891), l_2892)), l_2893));
+ (*l_2895) = l_2894[7][4][0];
+ for (g_1359 = 0; (g_1359 <= 2); g_1359 += 1)
+ { /* block id: 1377 */
+ int32_t l_2896 = 0x735C2B59L;
+ int32_t l_2897[2][1][5] = {{{0x220C6B73L,0x220C6B73L,0x220C6B73L,0x220C6B73L,0x220C6B73L}},{{7L,7L,7L,7L,7L}}};
+ int16_t *l_2911 = &g_367;
+ int32_t l_2915 = 0xA181D5A4L;
+ int i, j, k;
+ g_2898--;
+ (*l_2859) ^= (safe_add_func_uint16_t_u_u(((g_709[(g_1359 + 4)][g_1359] < g_203.f4) >= ((safe_add_func_uint32_t_u_u(((*g_146) == (&g_1707 == (l_2907 , l_2888[0][3][2]))), (((*g_1010) = ((safe_sub_func_int16_t_s_s(((*l_2911) ^= (l_2910[0][2] != g_709[(g_1359 + 4)][g_1359])), (l_2914[5] = (safe_mod_func_int32_t_s_s(((l_2897[0][0][3] | l_2897[1][0][1]) , (*g_1949)), (-1L)))))) < 7L)) ^ l_2915))) >= 4294967293UL)), 0x562AL));
+ }
+ }
+ (*l_2916) = &g_130[3][5];
+ return l_2917;
+}
+
+
+/* ------------------------------------------ */
+/*
+ * reads : g_203.f4 g_368 g_2561 g_2562 g_1058 g_902 g_522 g_203.f3.f1 g_96 g_29 g_870 g_193.f3
+ * writes: g_203.f4 g_902 g_96 g_29 g_870 g_193.f3
+ */
+static int32_t * func_2(int8_t * p_3)
+{ /* block id: 1266 */
+ uint16_t l_2646 = 0UL;
+ union U2 * const *l_2680[10];
+ union U2 * const **l_2679 = &l_2680[2];
+ int32_t l_2717 = 0x771D7A8EL;
+ uint32_t ***** const l_2724 = &g_1766;
+ int32_t l_2787[8][5][6] = {{{(-10L),0xF9A7B154L,(-5L),0x9BBB8C36L,(-1L),0x08AF0ED7L},{(-6L),0x86CA5DE9L,1L,3L,3L,1L},{0x86CA5DE9L,0x86CA5DE9L,0x491AC390L,(-6L),(-1L),(-1L)},{1L,0xF9A7B154L,1L,0x3E0CF12FL,(-5L),0x491AC390L},{0x9BBB8C36L,1L,1L,7L,0x86CA5DE9L,(-1L)}},{{2L,7L,0x491AC390L,3L,(-10L),1L},{3L,(-10L),1L,3L,0x3E0CF12FL,0x08AF0ED7L},{2L,3L,(-5L),0x91A2E884L,0x30B718DFL,(-6L)},{0x30B718DFL,0xF241A0ADL,2L,0xF241A0ADL,0x30B718DFL,(-1L)},{0x743F44F9L,0xD802313DL,(-5L),0L,0xF241A0ADL,0x3E0CF12FL}},{{0x8A63E951L,(-7L),(-10L),0xD802313DL,(-7L),0x3E0CF12FL},{0L,0x91A2E884L,(-5L),0x30B718DFL,0x8A63E951L,(-1L)},{(-7L),0x743F44F9L,2L,0x8A63E951L,0x0F0E2B35L,(-6L)},{(-7L),(-1L),0x3E0CF12FL,0x30B718DFL,(-5L),0xF9A7B154L},{0L,0x8A63E951L,3L,0xD802313DL,0xD802313DL,3L}},{{0x8A63E951L,0x8A63E951L,1L,0L,(-5L),(-10L)},{0x743F44F9L,(-1L),3L,0xF241A0ADL,0x0F0E2B35L,1L},{0x30B718DFL,0x743F44F9L,3L,0x91A2E884L,0x8A63E951L,(-10L)},{0x1D6DE8D3L,0x91A2E884L,1L,0L,(-7L),3L},{0L,(-7L),3L,0L,0xF241A0ADL,0xF9A7B154L}},{{0x1D6DE8D3L,0xD802313DL,0x3E0CF12FL,0x91A2E884L,0x30B718DFL,(-6L)},{0x30B718DFL,0xF241A0ADL,2L,0xF241A0ADL,0x30B718DFL,(-1L)},{0x743F44F9L,0xD802313DL,(-5L),0L,0xF241A0ADL,0x3E0CF12FL},{0x8A63E951L,(-7L),(-10L),0xD802313DL,(-7L),0x3E0CF12FL},{0L,0x91A2E884L,(-5L),0x30B718DFL,0x8A63E951L,(-1L)}},{{(-7L),0x743F44F9L,2L,0x8A63E951L,0x0F0E2B35L,(-6L)},{(-7L),(-1L),0x3E0CF12FL,0x30B718DFL,(-5L),0xF9A7B154L},{0L,0x8A63E951L,3L,0xD802313DL,0xD802313DL,3L},{0x8A63E951L,0x8A63E951L,1L,0L,(-5L),(-10L)},{0x743F44F9L,(-1L),3L,0xF241A0ADL,0x0F0E2B35L,1L}},{{0x30B718DFL,0x743F44F9L,3L,0x91A2E884L,0x8A63E951L,(-10L)},{0x1D6DE8D3L,0x91A2E884L,1L,0L,(-7L),3L},{0L,(-7L),3L,0L,0xF241A0ADL,0xF9A7B154L},{0x1D6DE8D3L,0xD802313DL,0x3E0CF12FL,0x91A2E884L,0x30B718DFL,(-6L)},{0x30B718DFL,0xF241A0ADL,2L,0xF241A0ADL,0x30B718DFL,(-1L)}},{{0x743F44F9L,0xD802313DL,(-5L),0L,0xF241A0ADL,0x3E0CF12FL},{0x8A63E951L,(-7L),(-10L),0xD802313DL,(-7L),0x3E0CF12FL},{0L,0x91A2E884L,(-5L),0x30B718DFL,0x8A63E951L,(-1L)},{(-7L),0x743F44F9L,2L,0x8A63E951L,0x0F0E2B35L,(-6L)},{(-7L),0x05AD1AD2L,0xF241A0ADL,1L,(-4L),(-1L)}}};
+ int16_t l_2789 = 0x673BL;
+ int32_t l_2841 = 0x2CD58772L;
+ int8_t l_2852 = 0L;
+ int i, j, k;
+ for (i = 0; i < 10; i++)
+ l_2680[i] = &g_1059;
+ for (g_203.f4 = 0; (g_203.f4 != 20); g_203.f4++)
+ { /* block id: 1269 */
+ int32_t l_2643 = 1L;
+ int32_t * const l_2644 = &g_902;
+ union U2 l_2645 = {0x1AA6AB60L};
+ (*l_2644) = (g_368[5][5][0] ^ (safe_lshift_func_uint16_t_u_u(((safe_lshift_func_uint16_t_u_s((safe_mod_func_uint8_t_u_u(((l_2643 , l_2644) != &g_130[0][5]), 0x95L)), 9)) ^ (+(((l_2645 , (**g_2561)) != (*g_2562)) != (*l_2644)))), (*g_522))));
+ }
+ l_2646 &= 0xAF285910L;
+ for (g_96 = (-5); (g_96 > 36); g_96 = safe_add_func_int32_t_s_s(g_96, 3))
+ { /* block id: 1275 */
+ int32_t *l_2649 = &g_29;
+ uint32_t *l_2658 = &g_1474;
+ struct S0 l_2659 = {0x69D3L,0x6483L,65534UL,65535UL,0xDBL};
+ union U2 l_2660[6][6] = {{{0x33AAE0C5L},{1L},{-1L},{-1L},{1L},{0x33AAE0C5L}},{{1L},{0x33AAE0C5L},{0x8D8CFE7FL},{1L},{0x8D8CFE7FL},{0x33AAE0C5L}},{{0x8D8CFE7FL},{1L},{-1L},{0xFE9A6640L},{0xFE9A6640L},{-1L}},{{0x8D8CFE7FL},{0x8D8CFE7FL},{0xFE9A6640L},{1L},{0x044F48E9L},{1L}},{{1L},{0x8D8CFE7FL},{1L},{-1L},{0xFE9A6640L},{0xFE9A6640L}},{{0x33AAE0C5L},{1L},{1L},{0x33AAE0C5L},{0x8D8CFE7FL},{1L}}};
+ struct S0 *l_2685 = &g_2686;
+ uint8_t ** const *l_2765 = (void*)0;
+ uint8_t l_2822 = 0x03L;
+ int32_t l_2847 = 0x610288B5L;
+ int32_t l_2848 = 0x0907996FL;
+ int8_t l_2849 = 6L;
+ int32_t l_2850 = 0xE1502438L;
+ uint8_t l_2856 = 0x00L;
+ int i, j;
+ (*l_2649) ^= (l_2660[4][5] , (-2L));
+ for (g_870 = 0; (g_870 >= 1); g_870 = safe_add_func_int8_t_s_s(g_870, 3))
+ { /* block id: 1280 */
+ union U2 ***l_2681[4];
+ uint16_t l_2684 = 65534UL;
+ int32_t l_2733 = 0x838200D5L;
+ uint8_t l_2812 = 0xADL;
+ int32_t *l_2842 = &l_2733;
+ int32_t *l_2843 = &g_902;
+ int32_t *l_2844 = &l_2733;
+ int32_t *l_2845 = &l_2787[4][1][3];
+ int32_t *l_2846[9];
+ int16_t l_2851 = 0x13C2L;
+ uint32_t l_2853[1];
+ int i;
+ for (i = 0; i < 4; i++)
+ l_2681[i] = &g_1058;
+ for (i = 0; i < 9; i++)
+ l_2846[i] = &l_2717;
+ for (i = 0; i < 1; i++)
+ l_2853[i] = 0xA045A241L;
+ for (g_193.f3 = 0; (g_193.f3 <= 0); g_193.f3 += 1)
+ { /* block id: 1283 */
+ struct S0 *l_2664[7][10] = {{&g_193,(void*)0,&g_193,(void*)0,&g_193,(void*)0,&g_193,(void*)0,&g_193,(void*)0},{&g_193,(void*)0,&g_193,(void*)0,&g_193,(void*)0,&g_193,(void*)0,&g_193,(void*)0},{&g_193,(void*)0,&g_193,(void*)0,&g_193,(void*)0,&g_193,(void*)0,&g_193,(void*)0},{&g_193,(void*)0,&g_193,(void*)0,&g_193,(void*)0,&g_193,(void*)0,&g_193,(void*)0},{&g_193,(void*)0,&g_193,(void*)0,&g_193,(void*)0,&g_193,(void*)0,&g_193,(void*)0},{&g_193,(void*)0,&g_193,(void*)0,&g_193,(void*)0,&g_193,(void*)0,&g_193,(void*)0},{&g_193,(void*)0,&g_193,(void*)0,&g_193,(void*)0,&g_193,(void*)0,&g_193,(void*)0}};
+ union U2 l_2687 = {6L};
+ const union U2 **l_2699 = &g_1006;
+ int32_t l_2704 = (-1L);
+ uint32_t *** const **l_2725 = (void*)0;
+ int8_t *l_2755 = (void*)0;
+ uint8_t *l_2788 = &g_141[2][3];
+ int16_t l_2790 = 0L;
+ int32_t l_2820 = (-8L);
+ int i, j;
+ }
+ ++l_2853[0];
+ }
+ if (l_2852)
+ break;
+ l_2856 ^= l_2787[1][4][0];
+ }
+ l_2717 ^= l_2787[1][4][0];
+ return &g_902;
+}
+
+
+/* ------------------------------------------ */
+/*
+ * reads :
+ * writes:
+ */
+static int8_t * func_4(uint32_t p_5, int8_t * p_6, int8_t * p_7)
+{ /* block id: 1262 */
+ return &g_448;
+}
+
+
+/* ------------------------------------------ */
+/*
+ * reads : g_29 g_33 g_688 g_82 g_23 g_1006 g_522 g_203.f3.f1 g_713 g_146 g_23.f2 g_10 g_9 g_448 g_23.f0 g_193 g_27 g_130 g_96 g_202 g_94 g_140 g_132 g_141 g_275 g_203.f3.f0 g_203.f3.f4 g_362 g_367 g_203.f1 g_368 g_802 g_803 g_491 g_1725 g_712 g_203.f3.f3 g_902 g_1359 g_1058 g_2341 g_1153 g_1059 g_28 g_663.f1 g_1455 g_1492 g_2561 g_1949 g_203.f4 g_2575 g_1010 g_429.f0 g_131
+ * writes: g_29 g_33 g_82 g_23 g_94 g_1010 g_202 g_203.f1 g_92 g_275 g_448 g_28 g_203.f0 g_96 g_141 g_193.f3 g_9 g_663.f1 g_803 g_491 g_367 g_2212 g_203.f3.f1 g_2039 g_203.f3.f3 g_902 g_2213 g_1359 g_1059 g_27 g_688 g_1492 g_131 g_203.f4 g_2575 g_737 g_2562
+ */
+static int8_t * func_11(uint8_t p_12, int32_t * p_13, struct S0 p_14, int32_t * p_15)
+{ /* block id: 9 */
+ int32_t *l_32 = &g_33;
+ int8_t * const l_49 = (void*)0;
+ struct S1 l_62 = {0xA5L,0xA880E1B4L,2UL,{0xC5A9L,0x5881L,1UL,1UL,0xD0L},0xD52FL};
+ struct S1 l_73 = {0xF3L,-1L,0UL,{0L,65535UL,4UL,65534UL,0x08L},0x1B1EL};
+ int8_t *l_74 = &g_9;
+ union U2 l_980 = {1L};
+ int8_t **l_1316 = &l_74;
+ const int32_t * const l_2258[1][3] = {{&l_62.f1,&l_62.f1,&l_62.f1}};
+ const int32_t * const *l_2257[6] = {(void*)0,(void*)0,(void*)0,(void*)0,(void*)0,(void*)0};
+ int16_t *l_2262 = &g_92;
+ int32_t l_2301 = 8L;
+ int32_t l_2303 = (-3L);
+ int32_t l_2306 = 0xEA8C3DEFL;
+ int32_t l_2307 = 0xEA47795FL;
+ int32_t l_2310 = 0x333383BBL;
+ int32_t l_2311 = 1L;
+ uint32_t l_2312 = 0x999F81ACL;
+ int32_t l_2386[5][8][6] = {{{0xEE22978CL,(-3L),0x7AF8184EL,0x0F0D664EL,1L,0x0C8FFBCAL},{(-1L),(-1L),0L,0x0F0D664EL,0x9FE7ED45L,0L},{0xEE22978CL,(-1L),2L,0L,0L,0x09D63F88L},{(-1L),(-1L),0xF204F565L,5L,0x3873AA4BL,0x2D1F59DCL},{0xA34C36F6L,0x724D8378L,(-1L),(-1L),0x8F1CC965L,0x8F1CC965L},{0x47C53492L,0x306D3644L,0x306D3644L,0x47C53492L,(-1L),0x0F0D664EL},{0x724D8378L,1L,0x62D68D50L,0L,0xAD839B02L,0xF204F565L},{0x9FE7ED45L,0x47C53492L,1L,0xEE22978CL,0xAD839B02L,0xA512C38CL}},{{0x8F1CC965L,1L,0x3873AA4BL,(-1L),(-1L),0x8B705FA7L},{1L,0x306D3644L,0xA34C36F6L,0xDDD7E864L,0x8F1CC965L,0L},{0xA512C38CL,0x724D8378L,5L,0x8F1CC965L,0x3873AA4BL,0x306D3644L},{0L,(-1L),0x8B705FA7L,(-1L),0L,0x18B14613L},{1L,1L,0xEE22978CL,0xF79A781AL,0xAD839B02L,1L},{2L,0x0C8FFBCAL,(-1L),1L,0x3873AA4BL,1L},{(-3L),0L,0xEE22978CL,(-1L),(-1L),0x18B14613L},{0x3873AA4BL,0x09D63F88L,(-1L),(-3L),1L,1L}},{{(-1L),0x2D1F59DCL,0xA34C36F6L,1L,1L,0x0F0D664EL},{(-1L),0x8F1CC965L,0x47C53492L,0x47C53492L,0x8F1CC965L,(-1L)},{(-1L),0x0F0D664EL,0x724D8378L,0x09D63F88L,0x8B705FA7L,0x7AF8184EL},{0L,0xF204F565L,0x9FE7ED45L,0x8F1CC965L,1L,0L},{0L,0xA512C38CL,0x8F1CC965L,0x09D63F88L,(-1L),2L},{(-1L),0x8B705FA7L,1L,0x47C53492L,0xEE22978CL,0xF204F565L},{(-1L),0L,0xA512C38CL,1L,0xDDD7E864L,(-1L)},{(-1L),0x306D3644L,0L,(-3L),0L,0x306D3644L}},{{0x3873AA4BL,0x47C53492L,(-1L),(-1L),0x18B14613L,0x62D68D50L},{(-3L),0x7AF8184EL,0x0F0D664EL,1L,0x0C8FFBCAL,1L},{2L,0x7AF8184EL,1L,0xF79A781AL,0x18B14613L,0x3873AA4BL},{1L,0x47C53492L,1L,5L,0L,0xA34C36F6L},{0x0F0D664EL,0x306D3644L,2L,0xF204F565L,0xDDD7E864L,5L},{0x7AF8184EL,0L,0x8B705FA7L,0xEE22978CL,0xEE22978CL,0x8B705FA7L},{0x8B705FA7L,0x8B705FA7L,0x2D1F59DCL,0x0C8FFBCAL,(-1L),0xDDD7E864L},{0xF204F565L,0xA512C38CL,(-3L),(-1L),1L,0x2D1F59DCL}},{{0xAD839B02L,0xF204F565L,(-3L),0x0F0D664EL,0x8B705FA7L,0xDDD7E864L},{(-1L),0x0F0D664EL,0x2D1F59DCL,0x18B14613L,0x8F1CC965L,0x8B705FA7L},{0x18B14613L,0x8F1CC965L,0x8B705FA7L,(-1L),1L,5L},{0x47C53492L,0x2D1F59DCL,2L,0xA34C36F6L,1L,0xA34C36F6L},{1L,0x09D63F88L,1L,0x62D68D50L,(-1L),0x3873AA4BL},{(-1L),0L,1L,2L,0x3873AA4BL,1L},{0xA512C38CL,0x0C8FFBCAL,0x0F0D664EL,2L,0xAD839B02L,0x62D68D50L},{(-1L),1L,(-1L),0x62D68D50L,0x0F0D664EL,0x306D3644L}}};
+ int32_t l_2465 = (-2L);
+ int32_t l_2488 = 1L;
+ uint32_t **l_2543 = &g_1707;
+ int8_t l_2545 = 0L;
+ uint32_t *****l_2548[2][6][5] = {{{(void*)0,(void*)0,(void*)0,(void*)0,(void*)0},{(void*)0,(void*)0,(void*)0,(void*)0,(void*)0},{(void*)0,(void*)0,(void*)0,(void*)0,(void*)0},{(void*)0,(void*)0,(void*)0,(void*)0,(void*)0},{(void*)0,(void*)0,(void*)0,(void*)0,(void*)0},{(void*)0,(void*)0,(void*)0,(void*)0,(void*)0}},{{(void*)0,(void*)0,(void*)0,(void*)0,(void*)0},{(void*)0,(void*)0,(void*)0,(void*)0,(void*)0},{(void*)0,(void*)0,(void*)0,(void*)0,(void*)0},{(void*)0,(void*)0,(void*)0,(void*)0,(void*)0},{(void*)0,(void*)0,(void*)0,(void*)0,(void*)0},{(void*)0,(void*)0,(void*)0,(void*)0,(void*)0}}};
+ const int32_t ***l_2557 = (void*)0;
+ union U2 **** const l_2563 = &g_2562;
+ uint8_t ** const l_2629 = (void*)0;
+ int i, j, k;
+ (*l_32) = ((*p_13) = (*p_13));
+ (*p_13) = func_34(((*l_1316) = func_38(&g_33)), &g_368[0][7][2], p_14.f2);
+lbl_2351:
+ (*g_688) = (*p_15);
+ for (g_902 = 3; (g_902 >= 0); g_902 -= 1)
+ { /* block id: 1101 */
+ struct S1 **l_2255 = (void*)0;
+ struct S1 **l_2256[4];
+ int32_t l_2259[9] = {0x516D507AL,0x516D507AL,0x516D507AL,0x516D507AL,0x516D507AL,0x516D507AL,0x516D507AL,0x516D507AL,0x516D507AL};
+ int16_t **l_2263 = &g_2213[8][2][2];
+ uint16_t l_2289 = 65529UL;
+ union U2 *l_2315 = &l_980;
+ uint32_t l_2330[9][8][1] = {{{0x6A3C0208L},{0x610F5ECBL},{0xE9A408D8L},{1UL},{2UL},{1UL},{0xE9A408D8L},{0x610F5ECBL}},{{0x6A3C0208L},{0xEE99DD9DL},{2UL},{1UL},{1UL},{0x610F5ECBL},{1UL},{1UL}},{{2UL},{0xEE99DD9DL},{0x6A3C0208L},{0x610F5ECBL},{0xE9A408D8L},{1UL},{2UL},{1UL}},{{0xE9A408D8L},{0x610F5ECBL},{0x6A3C0208L},{0xEE99DD9DL},{2UL},{1UL},{1UL},{0x610F5ECBL}},{{1UL},{1UL},{2UL},{0xEE99DD9DL},{0x6A3C0208L},{0x610F5ECBL},{0xE9A408D8L},{1UL}},{{2UL},{1UL},{0xE9A408D8L},{0x610F5ECBL},{0x6A3C0208L},{0xEE99DD9DL},{2UL},{1UL}},{{1UL},{0x610F5ECBL},{1UL},{1UL},{2UL},{0xEE99DD9DL},{0x6A3C0208L},{0x610F5ECBL}},{{0xE9A408D8L},{1UL},{2UL},{1UL},{0xE9A408D8L},{0x610F5ECBL},{0x6A3C0208L},{0xEE99DD9DL}},{{2UL},{1UL},{1UL},{0x610F5ECBL},{1UL},{1UL},{2UL},{0xEE99DD9DL}}};
+ uint16_t **l_2378 = (void*)0;
+ uint32_t l_2423 = 4294967293UL;
+ int32_t l_2489 = 0x7F7BAA7EL;
+ int16_t l_2494 = (-2L);
+ uint32_t l_2522 = 0x57A978C3L;
+ int8_t *l_2524 = (void*)0;
+ int32_t *l_2527[9][10] = {{&l_62.f1,&g_203.f1,&g_429[3][2][4].f1,&g_429[3][2][4].f1,&g_203.f1,&l_62.f1,&g_203.f1,&g_140,(void*)0,&g_203.f1},{(void*)0,&g_203.f1,&l_73.f1,&l_980.f0,&g_140,&l_980.f0,&l_73.f1,&g_203.f1,(void*)0,&l_62.f1},{(void*)0,&g_429[3][2][4].f1,&l_2489,&g_203.f1,&l_980.f0,&l_62.f1,&l_62.f1,&l_980.f0,&g_203.f1,&l_2489},{&l_62.f1,&l_62.f1,&l_980.f0,&g_203.f1,&l_2489,&g_429[3][2][4].f1,(void*)0,&g_140,(void*)0,&g_429[3][2][4].f1},{&l_73.f1,&l_980.f0,&g_140,&l_980.f0,&l_73.f1,&g_203.f1,(void*)0,&l_62.f1,(void*)0,(void*)0},{&g_203.f1,&l_62.f1,&g_203.f1,&g_429[3][2][4].f1,&g_429[3][2][4].f1,&g_203.f1,&l_62.f1,&g_203.f1,&g_140,(void*)0},{&g_140,&g_429[3][2][4].f1,&l_62.f1,(void*)0,&l_73.f1,(void*)0,&l_73.f1,(void*)0,&l_62.f1,&g_429[3][2][4].f1},{&g_203.f1,&l_2489,&l_980.f0,&g_429[3][2][4].f1,&g_140,&g_203.f1,(void*)0,(void*)0,&g_203.f1,&g_140},{&l_62.f1,(void*)0,(void*)0,&l_62.f1,(void*)0,&g_203.f1,&l_73.f1,&l_980.f0,&g_140,&l_980.f0}};
+ struct S0 ** const l_2546[4] = {&g_803,&g_803,&g_803,&g_803};
+ uint32_t ** const l_2587 = &g_1707;
+ uint32_t *l_2596 = &l_2312;
+ uint32_t **l_2595 = &l_2596;
+ int8_t *l_2632[2];
+ int i, j, k;
+ for (i = 0; i < 4; i++)
+ l_2256[i] = &g_202[2][4];
+ for (i = 0; i < 2; i++)
+ l_2632[i] = &g_448;
+ g_202[4][9] = &l_62;
+ (*g_688) &= ((*p_15) = ((((l_2257[0] == &l_2258[0][0]) , l_2259[7]) , ((**g_712) = (((l_2259[3] = 0x447DL) ^ ((((void*)0 == &l_32) | (((*l_2263) = l_2262) == l_2262)) || ((void*)0 == &l_73))) , 0x29L))) >= (*l_32)));
+ for (l_62.f2 = 1; (l_62.f2 <= 5); l_62.f2 += 1)
+ { /* block id: 1110 */
+ int32_t l_2264 = 1L;
+ int8_t *l_2280 = (void*)0;
+ int32_t l_2302[5];
+ int32_t l_2408 = 0x81C9B156L;
+ union U2 l_2415 = {0L};
+ uint16_t l_2448 = 0xBC8EL;
+ int16_t l_2466 = 0xFD66L;
+ const int32_t l_2521 = 0x4B7359ADL;
+ union U2 ***l_2624 = &g_1058;
+ int i, j;
+ for (i = 0; i < 5; i++)
+ l_2302[i] = 0xFE7F3AB0L;
+ if (g_141[g_902][l_62.f2])
+ { /* block id: 1111 */
+ for (g_1359 = 0; (g_1359 <= 2); g_1359 += 1)
+ { /* block id: 1114 */
+ return &g_9;
+ }
+ }
+ else
+ { /* block id: 1117 */
+ uint8_t l_2277 = 0xA1L;
+ int32_t l_2279 = 0xC2AC5853L;
+ int32_t l_2294 = 9L;
+ int32_t l_2308 = 0x91F0493EL;
+ int32_t l_2309 = (-7L);
+ struct S1 l_2379 = {-1L,-10L,0x3B90L,{0x3487L,8UL,1UL,65535UL,1UL},65535UL};
+ uint32_t l_2380 = 1UL;
+ int32_t l_2384 = 0x5899C3A7L;
+ int32_t l_2385[10][4][6] = {{{(-1L),0x9819E421L,0x16FE54D0L,0x344D9AE6L,(-1L),0L},{0L,1L,(-1L),0L,0x4B3A9EFEL,0xE7D02930L},{0L,(-1L),0x1040F8BCL,0x344D9AE6L,0x768803A5L,0xA63F859BL},{(-1L),(-9L),0L,0x344D9AE6L,9L,0xE9596E70L}},{{0L,0xF96B3B99L,0x130F37B5L,0L,0x6EB652C0L,0L},{0L,1L,0x88DA25D8L,0x344D9AE6L,(-7L),0x78B3DEB0L},{(-1L),(-1L),0x62ACFAC9L,0x344D9AE6L,0xFAC4ED1CL,0x344D9AE6L},{0L,0L,0L,0L,(-5L),(-8L)}},{{0L,0xB281438FL,2L,0x344D9AE6L,0x38BED929L,0xA980789AL},{(-1L),0x9819E421L,0x16FE54D0L,0x344D9AE6L,(-1L),0L},{0L,1L,(-1L),0L,0x4B3A9EFEL,0xE7D02930L},{0L,(-1L),0x1040F8BCL,0x344D9AE6L,0x768803A5L,0xA63F859BL}},{{(-1L),(-9L),0L,0x344D9AE6L,9L,0xE9596E70L},{0L,0xF96B3B99L,0x130F37B5L,0L,0x6EB652C0L,0L},{0L,1L,0x88DA25D8L,0x344D9AE6L,(-7L),0x78B3DEB0L},{(-1L),(-1L),0x62ACFAC9L,0x344D9AE6L,0xFAC4ED1CL,0x344D9AE6L}},{{0L,0L,0L,0L,(-5L),(-8L)},{0L,0xB281438FL,2L,0x344D9AE6L,0x38BED929L,0xA980789AL},{(-1L),0x9819E421L,0x16FE54D0L,0x344D9AE6L,(-1L),0L},{0L,1L,(-1L),0L,0x4B3A9EFEL,0xE7D02930L}},{{0L,(-1L),0x1040F8BCL,0x344D9AE6L,0x768803A5L,0xA63F859BL},{(-1L),(-9L),0L,0x344D9AE6L,9L,0xE9596E70L},{0L,0xF96B3B99L,0x130F37B5L,0L,0x6EB652C0L,0L},{0L,1L,0x88DA25D8L,0x344D9AE6L,(-7L),0x78B3DEB0L}},{{(-1L),(-1L),0x62ACFAC9L,0x344D9AE6L,0xFAC4ED1CL,0x344D9AE6L},{0L,0L,0L,0L,(-5L),(-8L)},{0L,0xB281438FL,2L,0x344D9AE6L,0x38BED929L,0xA980789AL},{(-1L),0x9819E421L,0x16FE54D0L,0x344D9AE6L,(-1L),0L}},{{1L,0L,(-7L),(-1L),0L,0x0594ECFCL},{1L,0xE9596E70L,7L,0xB5891EFAL,2L,0x290904F0L},{(-7L),0xA63F859BL,(-1L),0xB5891EFAL,0x130F37B5L,0x06C85D14L},{1L,0xE7D02930L,(-5L),(-1L),0x16FE54D0L,0xD3FD5C8DL}},{{1L,0L,1L,0xB5891EFAL,0x88DA25D8L,1L},{(-7L),0xA980789AL,0x2A735ED7L,0xB5891EFAL,(-1L),0xB5891EFAL},{1L,(-8L),1L,(-1L),0x62ACFAC9L,0x5A705F23L},{1L,0x344D9AE6L,(-4L),0xB5891EFAL,0x1040F8BCL,0xAFA1E74CL}},{{(-7L),0x78B3DEB0L,(-4L),0xB5891EFAL,0L,(-1L)},{1L,0L,(-7L),(-1L),0L,0x0594ECFCL},{1L,0xE9596E70L,7L,0xB5891EFAL,2L,0x290904F0L},{(-7L),0xA63F859BL,(-1L),0xB5891EFAL,0x130F37B5L,0x06C85D14L}}};
+ uint16_t l_2387[8][8][2] = {{{0x1F77L,0x8916L},{0x5EB1L,1UL},{0xD941L,0xD941L},{0xB4D7L,1UL},{0x156AL,0xF827L},{1UL,0UL},{0xF674L,1UL},{0xB773L,0x4CDCL}},{{0xB773L,1UL},{0xF674L,0UL},{1UL,0xF827L},{0x156AL,1UL},{0xB4D7L,0xD941L},{0xD941L,1UL},{0x5EB1L,0x8916L},{0x1F77L,0xF827L}},{{0UL,8UL},{0xDCD7L,0x9ED6L},{0xB773L,0xFBAAL},{65531UL,0xE04EL},{1UL,0UL},{0UL,0xEEC3L},{0UL,0xA55FL},{0xB4D7L,1UL}},{{0xB9FBL,0x9C21L},{8UL,0x8916L},{0x156AL,0xEEC3L},{0x9ED6L,0xB4D7L},{0xDCD7L,1UL},{65531UL,0xE953L},{0UL,0xE04EL},{0xF674L,8UL}},{{0x9ED6L,0x45EEL},{0UL,1UL},{0x5EB1L,0x9C21L},{1UL,0x9C21L},{0x5EB1L,1UL},{0UL,0x45EEL},{0x9ED6L,8UL},{0xF674L,0xE04EL}},{{0UL,0xE953L},{65531UL,1UL},{0xDCD7L,0xB4D7L},{0x9ED6L,0xEEC3L},{0x156AL,0x8916L},{8UL,0x9C21L},{0xB9FBL,1UL},{0xB4D7L,0xA55FL}},{{0UL,0xEEC3L},{0UL,0UL},{1UL,0xE04EL},{65531UL,0xFBAAL},{0xB773L,0x9ED6L},{0xDCD7L,8UL},{0UL,0xF827L},{0x1F77L,0x8916L}},{{0x5EB1L,1UL},{0xD941L,0xD941L},{0xB4D7L,1UL},{0x156AL,0xDCD7L},{65535UL,0xD941L},{0xE4A2L,65535UL},{1UL,0x77A6L},{1UL,65535UL}}};
+ int i, j, k;
+ if ((*l_32))
+ break;
+ if (((0x32L >= (((l_2264 = p_14.f2) , (-5L)) & (safe_lshift_func_int8_t_s_u(p_14.f1, 5)))) < p_12))
+ { /* block id: 1120 */
+ struct S0 *l_2278 = &l_62.f3;
+ if (l_2259[3])
+ break;
+ l_2279 |= (~((*p_15) = (((*p_15) || ((*l_32) != (l_2259[7] || 9L))) > (((safe_lshift_func_int8_t_s_s(((((((safe_sub_func_int32_t_s_s(((*p_13) & 0xD5DB01E4L), (l_2277 = ((l_980 , (((*g_688) = (safe_mod_func_int32_t_s_s((safe_div_func_int8_t_s_s(0L, 8L)), 0xEA115DFCL))) < 5L)) & 0xD3L)))) > (-1L)) && (*l_32)) != p_14.f0) || l_2259[7]) <= p_14.f1), 1)) , l_2278) != &p_14))));
+ return l_2280;
+ }
+ else
+ { /* block id: 1127 */
+ int16_t *l_2295 = &g_1798;
+ int32_t l_2300 = 0L;
+ int32_t l_2304 = 0xE4A6017EL;
+ int32_t l_2305 = 0xBB491C39L;
+ for (g_94 = 0; (g_94 <= 3); g_94 += 1)
+ { /* block id: 1130 */
+ int i, j;
+ (*g_688) = (((safe_add_func_uint16_t_u_u((1UL < (0xCD44D46BL != (safe_add_func_uint8_t_u_u((((p_12 , (safe_lshift_func_uint8_t_u_s((safe_mul_func_int16_t_s_s(l_2289, (safe_lshift_func_int8_t_s_u((0UL != (~((safe_add_func_uint8_t_u_u((g_141[g_94][(g_94 + 3)] = ((3UL == 0x8855L) , (0x099BL ^ l_2279))), 0x5DL)) & l_2259[5]))), l_2294)))), 7))) , 0x6B32L) >= 0x40A0L), 0x1BL)))), 65530UL)) >= 0x84L) < (*p_15));
+ }
+ l_2264 = (*p_13);
+ for (g_29 = 0; (g_29 <= 3); g_29 += 1)
+ { /* block id: 1137 */
+ const int16_t *l_2296 = &g_193.f0;
+ int32_t *l_2297 = (void*)0;
+ int32_t *l_2298 = &l_2259[2];
+ int32_t *l_2299[2][7][6] = {{{&l_2259[7],&g_33,&l_2259[7],&l_2279,&l_2264,&g_82},{&g_82,(void*)0,&g_33,&g_33,(void*)0,&g_82},{&l_2279,&l_2264,&l_2259[7],&g_902,&g_82,&g_29},{(void*)0,&l_2259[7],&g_82,&g_82,&g_82,&l_2259[7]},{(void*)0,&g_29,&g_82,&g_902,&l_2259[7],&l_2264},{&l_2279,&g_82,(void*)0,&g_33,&g_33,(void*)0},{&g_82,&g_82,&l_2264,&l_2279,&l_2259[7],&g_33}},{{&l_2259[7],&g_29,&g_902,&l_2264,&g_82,&l_2264},{&g_902,&l_2259[7],&g_902,&l_2264,&g_82,&g_33},{&l_2259[7],&l_2264,&l_2264,(void*)0,(void*)0,(void*)0},{(void*)0,(void*)0,(void*)0,(void*)0,&l_2264,&l_2264},{&l_2259[7],&g_33,&g_82,&l_2264,&g_902,&l_2259[7]},{&g_902,&l_2264,&g_82,&l_2264,&g_902,&g_29},{&l_2259[7],&g_33,&l_2259[7],&l_2279,&l_2264,&g_82}}};
+ int i, j, k;
+ (*l_32) = (l_2295 != l_2296);
+ --l_2312;
+ }
+ }
+ if (l_2308)
+ { /* block id: 1142 */
+ int8_t l_2321 = 1L;
+ uint32_t l_2326 = 6UL;
+ int32_t l_2329[4];
+ struct S1 l_2350 = {-1L,1L,0xD5C0L,{0x8AE0L,65528UL,1UL,1UL,255UL},65535UL};
+ int i;
+ for (i = 0; i < 4; i++)
+ l_2329[i] = 3L;
+ (*g_1058) = l_2315;
+ (*p_13) = (*g_688);
+ if ((safe_lshift_func_uint16_t_u_s(p_14.f3, 15)))
+ { /* block id: 1145 */
+ int32_t *l_2318 = &l_2294;
+ int32_t *l_2319 = &l_2259[4];
+ int32_t *l_2320 = (void*)0;
+ int32_t *l_2322 = (void*)0;
+ int32_t *l_2323 = &l_2307;
+ int32_t *l_2324 = &l_2302[0];
+ int32_t *l_2325[5];
+ int i;
+ for (i = 0; i < 5; i++)
+ l_2325[i] = &l_2294;
+ (*l_32) = 8L;
+ --l_2326;
+ l_2330[1][2][0]++;
+ (*l_2318) = ((*p_15) = ((((0x7027L <= 3UL) , (safe_add_func_uint16_t_u_u((l_2262 != (void*)0), p_14.f2))) ^ (safe_rshift_func_uint16_t_u_u(p_14.f1, ((safe_mod_func_uint16_t_u_u((safe_div_func_uint8_t_u_u(((((g_2341 , ((safe_rshift_func_uint16_t_u_s((safe_add_func_uint16_t_u_u(((*p_15) | (*p_13)), 1L)), 15)) || p_12)) & (*p_13)) | p_12) < l_2277), (*g_713))), 0x4026L)) || (-6L))))) ^ (*l_32)));
+ }
+ else
+ { /* block id: 1151 */
+ if ((*p_13))
+ break;
+ }
+ (*p_13) = ((*g_1153) & (((0UL >= l_2330[7][3][0]) | (((*l_32) |= (safe_div_func_uint16_t_u_u((l_2264 >= (l_2259[4] || (safe_sub_func_int32_t_s_s(((!((p_15 == (g_688 = func_16(l_2350, l_2326, &l_2321, (*g_1059)))) < 0xC144L)) | p_14.f2), g_663.f1)))), p_14.f2))) < p_14.f4)) && 65532UL));
+ }
+ else
+ { /* block id: 1157 */
+ int8_t l_2373 = (-1L);
+ int32_t *l_2381 = &l_2302[3];
+ int32_t *l_2382[3][1];
+ int32_t l_2383 = 0xD4D53D12L;
+ int i, j;
+ for (i = 0; i < 3; i++)
+ {
+ for (j = 0; j < 1; j++)
+ l_2382[i][j] = &l_2309;
+ }
+ if (p_12)
+ goto lbl_2351;
+ for (g_663.f1 = 0; (g_663.f1 <= 5); g_663.f1 += 1)
+ { /* block id: 1161 */
+ uint32_t *l_2372 = &g_1492;
+ int i, j;
+ (*g_688) = (((safe_lshift_func_uint8_t_u_s((g_141[g_663.f1][l_62.f2] = 0xA0L), 5)) , l_62) , ((safe_div_func_uint32_t_u_u((safe_rshift_func_uint16_t_u_u((p_14.f4 ^ ((((safe_div_func_int16_t_s_s(g_141[g_663.f1][l_62.f2], 0xF306L)) & ((*g_146) = p_14.f1)) == ((safe_mod_func_uint16_t_u_u((safe_mul_func_uint8_t_u_u((p_14 , (safe_sub_func_uint32_t_u_u(p_14.f1, ((*l_2372) &= ((((safe_mul_func_int16_t_s_s(((*l_2262) = (safe_mul_func_int8_t_s_s((safe_mul_func_uint8_t_u_u(((**g_1455) = (p_14.f3 != (*l_32))), 6UL)), p_12))), p_12)) > (-1L)) < (*p_13)) , p_14.f1))))), 0xC5L)), l_2309)) , 0x0BB3L)) ^ (*p_13))), l_2373)), (*p_15))) <= p_14.f4));
+ (*p_13) |= (!(safe_add_func_uint8_t_u_u((p_14.f0 != (*g_1153)), 0xB4L)));
+ return &g_870;
+ }
+ if ((safe_rshift_func_int16_t_s_s(((void*)0 == l_2378), (l_2379 , p_14.f1))))
+ { /* block id: 1171 */
+ g_131 = &g_33;
+ return &g_1473[8];
+ }
+ else
+ { /* block id: 1174 */
+ if (l_2380)
+ break;
+ }
+ l_2387[3][1][1]++;
+ }
+ }
+ if ((safe_rshift_func_int8_t_s_u((*l_32), 1)))
+ { /* block id: 1180 */
+ uint16_t l_2413 = 1UL;
+ union U2 l_2414[6] = {{0L},{0L},{0L},{0L},{0L},{0L}};
+ int32_t **l_2440 = &g_364;
+ int32_t **l_2441 = &g_364;
+ int i;
+ if ((*p_13))
+ break;
+ for (g_94 = 0; (g_94 <= 3); g_94 += 1)
+ { /* block id: 1184 */
+ union U2 * const *l_2419 = &g_1059;
+ union U2 * const **l_2418 = &l_2419;
+ int32_t l_2420[9][1] = {{0x051709FCL},{1L},{0x051709FCL},{0x051709FCL},{1L},{0x051709FCL},{0x051709FCL},{1L},{0x051709FCL}};
+ int32_t *l_2478 = &g_429[3][2][4].f1;
+ struct S1 l_2520 = {-2L,0L,0x57AFL,{0x21C3L,0x3511L,0x0B52L,65528UL,0xE3L},0x76F0L};
+ int i, j;
+ }
+ return l_2524;
+ }
+ else
+ { /* block id: 1222 */
+ const struct S1 l_2528 = {0x71L,0L,0UL,{0x3E7BL,2UL,0xA362L,0x52B0L,1UL},0x1C93L};
+ uint32_t *l_2544 = &g_27;
+ struct S0 * const *l_2547[6] = {&g_803,&g_803,&g_803,&g_803,&g_803,&g_803};
+ int8_t *l_2549 = (void*)0;
+ int32_t *l_2550 = &g_429[3][2][4].f1;
+ int32_t ***l_2556 = (void*)0;
+ const int32_t ****l_2558 = &l_2557;
+ uint16_t **l_2568 = &g_146;
+ int32_t l_2574[4] = {(-1L),(-1L),(-1L),(-1L)};
+ int8_t l_2588 = 0L;
+ uint32_t l_2600 = 0x9044E83EL;
+ int i;
+ l_2302[3] = (safe_lshift_func_uint16_t_u_s(5UL, ((4L >= p_14.f4) & l_2302[3])));
+ (*p_15) = ((((l_2527[5][4] != (l_2550 = func_16((l_2528 , l_73), (safe_mul_func_uint16_t_u_u((safe_rshift_func_int16_t_s_s(0L, ((safe_rshift_func_int8_t_s_s((p_14.f3 & 0xAEFE28DBL), 3)) & (safe_mod_func_int8_t_s_s((safe_mod_func_uint16_t_u_u((((((((l_2528 , (((safe_lshift_func_int8_t_s_s(((safe_div_func_uint8_t_u_u((((*l_2544) = (&g_1931[0] == l_2543)) != l_2545), 0x12L)) , l_2302[3]), 3)) && (*p_13)) , l_2546[0])) != l_2547[1]) || p_14.f4) == (*p_13)) , p_14.f3) , l_2548[1][3][0]) != &g_1766), (*g_522))), l_2330[1][2][0]))))), l_2415.f0)), l_2549, (*l_2315)))) < 0UL) < (*g_146)) >= 0UL);
+ (*l_32) = (safe_unary_minus_func_int32_t_s(((l_2528.f1 , (((p_14.f0 | ((safe_sub_func_int16_t_s_s((safe_rshift_func_int16_t_s_u(p_14.f0, 10)), (((l_2556 == ((*l_2558) = l_2557)) != (((((safe_mod_func_int16_t_s_s((g_2561 == l_2563), (((((safe_div_func_uint16_t_u_u(((safe_lshift_func_int8_t_s_s((0UL & 9UL), 7)) || p_14.f0), l_2289)) < 0x58L) >= (**g_1455)) < 0L) | 0x365904B0L))) > p_14.f2) , l_2568) != l_2378) < p_14.f2)) ^ l_2423))) != 0xE69B00F3L)) ^ (*g_1949)) || 0x2E1B5BAFL)) > p_14.f3)));
+ for (g_203.f4 = (-21); (g_203.f4 < 26); g_203.f4++)
+ { /* block id: 1231 */
+ int8_t l_2594 = 9L;
+ int32_t * const *l_2599[2];
+ union U2 ***l_2623 = (void*)0;
+ int32_t *l_2630 = &l_2574[3];
+ int32_t *l_2631 = &l_2259[7];
+ int i;
+ for (i = 0; i < 2; i++)
+ l_2599[i] = (void*)0;
+ for (g_1359 = 3; (g_1359 == 40); g_1359 = safe_add_func_int32_t_s_s(g_1359, 8))
+ { /* block id: 1234 */
+ int32_t *l_2573[6][7][6] = {{{&l_2386[3][6][3],&l_2302[4],&l_2259[4],&l_2302[4],&l_2386[3][6][3],&l_2264},{&g_82,&l_2302[3],&g_29,&l_2306,&l_2302[3],(void*)0},{&l_2259[4],&l_2264,&l_2465,&l_2302[3],&g_29,(void*)0},{&l_2259[6],(void*)0,&g_29,&l_2465,&l_2264,&l_2264},{&g_29,&l_2259[4],&l_2259[4],&g_29,&l_2259[6],&l_2307},{&l_2465,&g_29,(void*)0,&l_2259[6],&g_29,&g_29},{&l_2302[3],&l_2465,&l_2264,&l_2259[4],&g_29,&l_2465}},{{&l_2306,&g_29,&l_2302[3],&g_82,&l_2259[6],&g_82},{&l_2302[4],&l_2259[4],&l_2302[4],&l_2386[3][6][3],&l_2264,&g_29},{&g_29,(void*)0,&g_29,&l_2302[3],&g_29,&g_29},{(void*)0,&l_2264,&l_2306,&l_2302[3],&l_2302[3],&l_2386[3][6][3]},{&g_29,&l_2302[3],&l_2259[6],&l_2386[3][6][3],&l_2386[3][6][3],&l_2259[6]},{&l_2311,&l_2311,&l_2465,&l_2302[4],&g_82,&g_29},{&g_29,&l_2306,&g_82,&l_2301,&l_2259[6],&l_2465}},{{&l_2386[3][6][3],&g_29,&g_82,&l_2259[4],&l_2311,&g_29},{&g_29,&l_2259[4],&l_2465,(void*)0,&l_2465,&l_2259[4]},{(void*)0,&l_2465,&l_2259[4],&g_29,&l_2307,(void*)0},{&l_2259[4],&g_82,&g_29,&l_2386[3][6][3],&l_2301,&l_2264},{&l_2301,&g_82,&l_2306,&g_29,&l_2307,&l_2302[3]},{&l_2302[4],&l_2465,&l_2311,&l_2311,&l_2465,&l_2302[4]},{(void*)0,&l_2259[4],&l_2386[3][6][3],&l_2302[3],&l_2311,&g_29}},{{&l_2302[3],&g_29,&l_2488,&g_29,&l_2259[6],&l_2306},{&l_2302[3],&l_2306,&g_29,&l_2302[3],&g_82,&l_2259[6]},{(void*)0,&l_2311,&l_2301,&l_2311,(void*)0,&l_2488},{&l_2302[4],&l_2386[3][6][3],&l_2264,&g_29,&g_29,&g_29},{&l_2301,&l_2488,&l_2302[3],&l_2386[3][6][3],(void*)0,&g_29},{&l_2259[4],&g_29,&l_2264,&g_29,&l_2488,&l_2488},{(void*)0,&l_2301,&l_2301,(void*)0,&l_2259[4],&l_2259[6]}},{{&g_29,&l_2264,&g_29,&l_2259[4],&l_2302[3],&l_2306},{&l_2386[3][6][3],&l_2302[3],&l_2488,&l_2301,&l_2302[3],&g_29},{&g_29,&l_2264,&l_2386[3][6][3],&l_2302[4],&l_2259[4],&l_2302[4]},{&l_2311,&l_2301,&l_2311,(void*)0,&l_2488,&l_2302[3]},{&l_2302[3],&g_29,&l_2306,&l_2302[3],(void*)0,&l_2264},{&g_29,&l_2488,&g_29,&l_2302[3],&g_29,(void*)0},{&l_2302[3],&l_2386[3][6][3],&l_2259[4],(void*)0,(void*)0,&l_2259[4]}},{{&l_2311,&l_2311,&l_2465,&l_2302[4],&g_82,&g_29},{&g_29,&l_2306,&g_82,&l_2301,&l_2259[6],&l_2465},{&l_2386[3][6][3],&g_29,&g_82,&l_2259[4],&l_2311,&g_29},{&g_29,&l_2259[4],&l_2465,(void*)0,&l_2465,&l_2259[4]},{(void*)0,&l_2465,&l_2259[4],&g_29,&l_2307,(void*)0},{&l_2259[4],&g_82,&g_29,&l_2386[3][6][3],&l_2301,&l_2264},{&l_2301,&g_82,&l_2306,&g_29,&l_2307,&l_2302[3]}}};
+ uint32_t **l_2586[7][2] = {{(void*)0,&g_1707},{&g_1707,(void*)0},{&g_1707,&g_1707},{(void*)0,&g_1707},{&g_1707,(void*)0},{&g_1707,(void*)0},{&g_1707,(void*)0}};
+ uint32_t ***l_2597 = &g_737;
+ int32_t **l_2598 = &l_2550;
+ int i, j, k;
+ (*g_802) = (*g_802);
+ --g_2575;
+ (*p_15) = (l_2574[3] , (p_14.f1 , (safe_lshift_func_uint16_t_u_s((((p_14.f3 | ((-3L) < l_2528.f1)) ^ ((safe_unary_minus_func_uint8_t_u((((*g_146) ^= (~((*p_15) == p_14.f4))) != (((safe_unary_minus_func_int8_t_s(p_14.f4)) <= (((!((safe_lshift_func_int16_t_s_u((0x8ED8L > p_14.f0), 1)) , (*l_32))) , l_2586[2][0]) != l_2587)) <= (*l_32))))) != 1UL)) ^ p_12), l_2588))));
+ l_2408 &= (((*l_32) <= (((safe_unary_minus_func_int16_t_s((safe_mul_func_int16_t_s_s(((*l_2262) = (((((*p_13) |= (~(p_14.f3 >= (((l_2594 = (g_193.f2 , (*g_146))) || (((*l_2597) = ((*g_522) , l_2595)) != &l_2596)) == 0x3CF58CB7L)))) || (l_2600 = ((l_2598 != l_2599[0]) , 4294967295UL))) == l_2522) | p_14.f2)), 0UL)))) != p_14.f2) & l_2521)) == l_2415.f0);
+ }
+ (*l_2631) = ((safe_sub_func_uint32_t_u_u(l_2588, ((*l_2544) |= (+(safe_add_func_uint16_t_u_u((safe_sub_func_int32_t_s_s(((*l_2630) &= ((*l_32) = (safe_unary_minus_func_int32_t_s(((*p_13) = (!((safe_rshift_func_int8_t_s_s((safe_mod_func_uint8_t_u_u((safe_unary_minus_func_uint8_t_u(((*g_1153) ^= (safe_sub_func_int8_t_s_s((((safe_div_func_uint8_t_u_u((p_14.f1 <= (safe_mul_func_uint16_t_u_u(((g_193 , (((safe_mul_func_int8_t_s_s((safe_sub_func_uint8_t_u_u(((l_2623 != ((*l_2563) = l_2624)) && ((((safe_div_func_int16_t_s_s((p_14.f0 != ((*g_713) = ((safe_rshift_func_int8_t_s_u(((((l_2629 != (void*)0) || ((0UL != (*g_1949)) , p_14.f0)) <= (*g_1010)) > l_2588), 1)) , 0UL))), 0xFB22L)) | 0xD46AL) && p_12) >= 0xF070L)), l_2594)), l_2594)) || l_2448) ^ 0UL)) ^ p_14.f4), l_2594))), l_2289)) < l_2594) , (*g_10)), 0L))))), l_2448)), 4)) >= 0x577BL))))))), p_14.f3)), p_12)))))) | p_14.f2);
+ if ((*g_131))
+ continue;
+ }
+ }
+ return &g_1473[4];
+ }
+ return l_2632[1];
+ }
+ return &g_870;
+}
+
+
+/* ------------------------------------------ */
+/*
+ * reads : g_27 g_28
+ * writes: g_27
+ */
+static int32_t * func_16(struct S1 p_17, uint32_t p_18, int8_t * p_19, union U2 p_20)
+{ /* block id: 1 */
+ int32_t l_26[8][6] = {{1L,0xAF1E2CD8L,0xAF1E2CD8L,1L,1L,0xAF1E2CD8L},{1L,1L,0xAF1E2CD8L,0xAF1E2CD8L,1L,1L},{1L,0xAF1E2CD8L,0xAF1E2CD8L,1L,1L,0xAF1E2CD8L},{1L,1L,0xAF1E2CD8L,0xAF1E2CD8L,1L,1L},{1L,0xAF1E2CD8L,0xAF1E2CD8L,1L,1L,0xAF1E2CD8L},{1L,1L,0xAF1E2CD8L,0xAF1E2CD8L,1L,1L},{1L,0xAF1E2CD8L,0xAF1E2CD8L,1L,1L,0xAF1E2CD8L},{1L,1L,0xAF1E2CD8L,0xAF1E2CD8L,1L,1L}};
+ int i, j;
+ for (p_17.f4 = 0; (p_17.f4 <= 11); p_17.f4 = safe_add_func_uint16_t_u_u(p_17.f4, 6))
+ { /* block id: 4 */
+ g_27 ^= l_26[5][1];
+ }
+ return g_28[4];
+}
+
+
+/* ------------------------------------------ */
+/*
+ * reads : g_1725 g_368 g_367 g_522 g_203.f3.f1 g_688 g_82 g_491 g_712 g_713 g_94 g_146 g_23.f2 g_203.f3.f3 g_33
+ * writes: g_491 g_33 g_203.f0 g_367 g_82 g_2212 g_203.f3.f1 g_94 g_2039 g_203.f3.f3
+ */
+static int32_t func_34(int8_t * p_35, int8_t * p_36, uint16_t p_37)
+{ /* block id: 670 */
+ struct S0 l_1321[7][5] = {{{-3L,0UL,0x0D39L,0x7666L,9UL},{0x7E5BL,0UL,65535UL,65534UL,255UL},{0x7E5BL,0UL,65535UL,65534UL,255UL},{-3L,0UL,0x0D39L,0x7666L,9UL},{-3L,0UL,0x0D39L,0x7666L,9UL}},{{0xBD94L,0xF8F5L,0x5D41L,0x2316L,0xF3L},{-1L,1UL,8UL,65530UL,2UL},{0xBD94L,0xF8F5L,0x5D41L,0x2316L,0xF3L},{-1L,1UL,8UL,65530UL,2UL},{0xBD94L,0xF8F5L,0x5D41L,0x2316L,0xF3L}},{{-3L,0UL,0x0D39L,0x7666L,9UL},{-3L,0UL,0x0D39L,0x7666L,9UL},{0x7E5BL,0UL,65535UL,65534UL,255UL},{0x7E5BL,0UL,65535UL,65534UL,255UL},{-3L,0UL,0x0D39L,0x7666L,9UL}},{{-4L,1UL,0x33E9L,65532UL,248UL},{-1L,1UL,8UL,65530UL,2UL},{-4L,1UL,0x33E9L,65532UL,248UL},{-1L,1UL,8UL,65530UL,2UL},{-4L,1UL,0x33E9L,65532UL,248UL}},{{-3L,0UL,0x0D39L,0x7666L,9UL},{0x7E5BL,0UL,65535UL,65534UL,255UL},{0x7E5BL,0UL,65535UL,65534UL,255UL},{-3L,0UL,0x0D39L,0x7666L,9UL},{-3L,0UL,0x0D39L,0x7666L,9UL}},{{0xBD94L,0xF8F5L,0x5D41L,0x2316L,0xF3L},{-1L,1UL,8UL,65530UL,2UL},{0xBD94L,0xF8F5L,0x5D41L,0x2316L,0xF3L},{-1L,1UL,8UL,65530UL,2UL},{0xBD94L,0xF8F5L,0x5D41L,0x2316L,0xF3L}},{{-3L,0UL,0x0D39L,0x7666L,9UL},{-3L,0UL,0x0D39L,0x7666L,9UL},{0x7E5BL,0UL,65535UL,65534UL,255UL},{0x7E5BL,0UL,65535UL,65534UL,255UL},{-3L,0UL,0x0D39L,0x7666L,9UL}}};
+ int16_t l_1379 = 4L;
+ uint32_t *l_1406 = (void*)0;
+ union U2 l_1407 = {0x4EADE60BL};
+ int32_t l_1421 = 0x102DBB17L;
+ int32_t l_1424 = 0x2B1BCA3FL;
+ int32_t l_1428 = 0xEA818C76L;
+ uint8_t **l_1453 = &g_1153;
+ uint32_t **l_1709 = (void*)0;
+ uint16_t *l_1711 = &g_203.f3.f3;
+ struct S1 l_1720 = {0x40L,0x6FFD7AF9L,8UL,{0x2D4DL,0xA206L,65535UL,0x7873L,5UL},0xD12CL};
+ int32_t ****l_1721 = &g_362[0][2];
+ const int32_t *l_1724 = &g_1725;
+ uint32_t ***l_1768 = (void*)0;
+ uint32_t ****l_1767 = &l_1768;
+ int8_t *l_1795 = &g_203.f0;
+ const int32_t *l_1817 = &g_203.f1;
+ const int32_t **l_1816 = &l_1817;
+ union U2 *** const l_1840 = &g_1058;
+ int32_t l_1879 = 1L;
+ uint16_t l_1880[3][4][4] = {{{0xEBB3L,0x28F1L,0x5A36L,0x28F1L},{0xEBB3L,0x9C2CL,1UL,0x28F1L},{1UL,0x28F1L,1UL,0x9C2CL},{0xEBB3L,0x28F1L,0x5A36L,0x28F1L}},{{0xEBB3L,0x9C2CL,1UL,0x28F1L},{1UL,0x28F1L,1UL,0x9C2CL},{0xEBB3L,0x28F1L,0x5A36L,0x28F1L},{0xEBB3L,0x9C2CL,1UL,0x28F1L}},{{1UL,0x28F1L,1UL,0x9C2CL},{0xEBB3L,0x28F1L,0x5A36L,0x28F1L},{0xEBB3L,0x9C2CL,1UL,0x28F1L},{1UL,0x28F1L,1UL,0x9C2CL}}};
+ struct S0 **l_1910 = &g_803;
+ int16_t l_1918 = (-9L);
+ uint32_t l_1946[7] = {0xEE53957CL,0xEE53957CL,0x80BFCBB2L,0xEE53957CL,0xEE53957CL,0x80BFCBB2L,0xEE53957CL};
+ const int8_t *l_2008 = &g_1473[4];
+ const int8_t **l_2007[1][3];
+ int32_t l_2058 = (-1L);
+ int32_t l_2060 = 1L;
+ int32_t l_2062 = 0L;
+ int32_t l_2063 = 2L;
+ int32_t l_2064 = 0x983A5C25L;
+ int32_t l_2066 = (-4L);
+ int32_t l_2068[10] = {0L,(-4L),(-4L),0L,(-4L),(-4L),0L,(-4L),(-4L),0L};
+ int32_t l_2107 = 0xA817EE1CL;
+ uint16_t l_2110 = 5UL;
+ int32_t l_2187[2][1][6] = {{{0xDE7BFC06L,1L,0xDE7BFC06L,0xDE7BFC06L,1L,0xDE7BFC06L}},{{0xDE7BFC06L,1L,0xDE7BFC06L,0xDE7BFC06L,1L,0xDE7BFC06L}}};
+ int16_t * const l_2211 = (void*)0;
+ int16_t * const *l_2210 = &l_2211;
+ uint32_t l_2251 = 1UL;
+ int i, j, k;
+ for (i = 0; i < 1; i++)
+ {
+ for (j = 0; j < 3; j++)
+ l_2007[i][j] = &l_2008;
+ }
+lbl_2200:
+ for (g_491 = 0; (g_491 <= 2); g_491 += 1)
+ { /* block id: 673 */
+ union U2 *** const l_1324 = &g_1058;
+ int32_t l_1338 = 0x5C08166EL;
+ struct S0 l_1356 = {-6L,0x5D1AL,2UL,4UL,255UL};
+ struct S1 l_1369 = {7L,0x11B39F74L,0UL,{0x463DL,1UL,0x5561L,0UL,255UL},0UL};
+ uint16_t *l_1374[2];
+ int32_t l_1422 = 0x6B8C6F9AL;
+ int32_t l_1426[9][1] = {{0x9BCC42A8L},{1L},{0x9BCC42A8L},{1L},{0x9BCC42A8L},{1L},{0x9BCC42A8L},{1L},{0x9BCC42A8L}};
+ uint32_t l_1461 = 1UL;
+ int8_t *l_1605 = &g_368[5][2][0];
+ int32_t *l_1607 = &l_1421;
+ int32_t l_1684 = (-3L);
+ int32_t **** const l_1691 = &g_362[1][1];
+ uint32_t *l_1715 = &g_1474;
+ uint32_t ***l_1733 = &l_1709;
+ uint32_t l_1760 = 0xCBADAB3CL;
+ int32_t **l_1761 = (void*)0;
+ uint8_t l_1804 = 0UL;
+ int16_t *l_1841 = &g_367;
+ int32_t l_1854[2][5] = {{0x57B5A700L,9L,0x57B5A700L,0x57B5A700L,9L},{9L,0x57B5A700L,0x57B5A700L,9L,0x57B5A700L}};
+ int32_t **l_1855 = &l_1607;
+ const union U2 **l_1904 = &g_1006;
+ const union U2 ***l_1903 = &l_1904;
+ int16_t l_1948 = 0xC682L;
+ uint32_t l_2035 = 18446744073709551612UL;
+ int8_t l_2059 = 0x14L;
+ int16_t l_2072 = (-1L);
+ int32_t l_2099 = 1L;
+ struct S1 l_2115 = {0xA4L,0xBD652974L,0x549FL,{0xE04CL,65535UL,0x13F6L,2UL,0xCCL},65531UL};
+ struct S1 **l_2135[6][2];
+ struct S1 **l_2136 = &g_202[4][6];
+ int i, j;
+ for (i = 0; i < 2; i++)
+ l_1374[i] = &g_429[3][2][4].f4;
+ for (i = 0; i < 6; i++)
+ {
+ for (j = 0; j < 2; j++)
+ l_2135[i][j] = (void*)0;
+ }
+ }
+ for (g_33 = (-20); (g_33 == 8); g_33++)
+ { /* block id: 1056 */
+ const uint8_t l_2192 = 0xB9L;
+ int16_t *l_2197 = &g_367;
+ int32_t l_2206 = 0xFE778CABL;
+ int32_t l_2218 = (-1L);
+ int32_t l_2219 = (-6L);
+ int32_t l_2221 = 0x90AE588BL;
+ int32_t l_2222 = 0L;
+ int32_t l_2223 = 1L;
+ int32_t l_2225[1][3];
+ int16_t l_2249[4] = {0xAF2AL,0xAF2AL,0xAF2AL,0xAF2AL};
+ uint32_t l_2250[7] = {0xC3BA4CE7L,0xC3BA4CE7L,0xC3BA4CE7L,0xC3BA4CE7L,0xC3BA4CE7L,0xC3BA4CE7L,0xC3BA4CE7L};
+ int32_t * const **l_2253 = (void*)0;
+ int32_t * const ***l_2252 = &l_2253;
+ int32_t *l_2254 = &l_2068[2];
+ int i, j;
+ for (i = 0; i < 1; i++)
+ {
+ for (j = 0; j < 3; j++)
+ l_2225[i][j] = 0x74BA6E8EL;
+ }
+ if (l_2187[1][0][2])
+ break;
+ if (((safe_add_func_int8_t_s_s(((((((((safe_rshift_func_int8_t_s_s(((*l_1795) = (l_2192 >= ((0xB0C3E753L || p_37) > (*l_1724)))), 6)) , ((p_37 , 4UL) < (((safe_add_func_uint16_t_u_u(2UL, ((*l_2197) |= ((*l_1724) & ((safe_sub_func_int8_t_s_s(((((l_2058 = (l_2192 , l_2192)) & (*l_1724)) > (*l_1724)) , (-9L)), 1UL)) , (*p_36)))))) , l_2192) , p_37))) != (*p_36)) , (*g_522)) & (*l_1724)) , 4294967295UL) | p_37) | p_37), (*p_35))) || p_37))
+ { /* block id: 1061 */
+ if (p_37)
+ break;
+ }
+ else
+ { /* block id: 1063 */
+ int32_t l_2201 = 5L;
+ int32_t l_2205[8] = {2L,2L,2L,2L,2L,2L,2L,2L};
+ int i;
+ (*g_688) |= p_37;
+ for (l_1720.f4 = 0; (l_1720.f4 != 17); ++l_1720.f4)
+ { /* block id: 1067 */
+ uint32_t l_2207 = 4294967294UL;
+ int32_t l_2217 = 0x44EE3AA8L;
+ int32_t l_2220[6][9] = {{0xB18AA35AL,0L,0L,0xB18AA35AL,0L,(-1L),0xB18AA35AL,(-1L),0L},{0xB18AA35AL,0L,0L,0xB18AA35AL,0L,(-1L),0xB18AA35AL,(-1L),0L},{0xB18AA35AL,0L,0L,0xB18AA35AL,0L,(-1L),0xB18AA35AL,(-1L),0L},{0xB18AA35AL,0L,0L,0xB18AA35AL,0L,(-1L),0xB18AA35AL,(-1L),0L},{0xB18AA35AL,0L,0L,0xB18AA35AL,0L,(-1L),0xB18AA35AL,(-1L),0L},{0xB18AA35AL,0L,0L,0xB18AA35AL,0L,(-1L),0xB18AA35AL,(-1L),0L}};
+ int8_t l_2224 = 0xF2L;
+ int8_t l_2229 = 8L;
+ int32_t l_2231[8][6][5] = {{{0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L},{(-1L),(-1L),(-1L),(-1L),(-1L)},{0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L},{(-1L),(-1L),(-1L),(-1L),(-1L)},{0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L},{(-1L),(-1L),(-1L),(-1L),(-1L)}},{{0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L},{(-1L),(-1L),(-1L),(-1L),(-1L)},{0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L},{(-1L),(-1L),(-1L),(-1L),(-1L)},{0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L},{(-1L),(-1L),(-1L),(-1L),(-1L)}},{{0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L},{(-1L),(-1L),(-1L),(-1L),(-1L)},{0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L},{(-1L),(-1L),(-1L),(-1L),(-1L)},{0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L},{(-1L),(-1L),(-1L),(-1L),(-1L)}},{{0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L},{(-1L),(-1L),(-1L),(-1L),(-1L)},{0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L},{(-1L),(-1L),(-1L),(-1L),(-1L)},{0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L},{(-1L),(-1L),(-1L),(-1L),(-1L)}},{{0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L},{(-1L),(-1L),(-1L),(-1L),(-1L)},{0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L},{(-1L),(-1L),(-1L),(-1L),(-1L)},{0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L},{(-1L),(-1L),(-1L),(-1L),(-1L)}},{{0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L},{(-1L),(-1L),(-1L),(-1L),(-1L)},{0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L},{(-1L),(-1L),(-1L),(-1L),(-1L)},{0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L},{(-1L),(-1L),(-1L),(-1L),(-1L)}},{{0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L},{(-1L),(-1L),(-1L),(-1L),(-1L)},{0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L},{(-1L),(-1L),(-1L),(-1L),(-1L)},{0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L},{(-1L),(-1L),(-1L),(-1L),(-1L)}},{{0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L},{(-1L),(-1L),(-1L),(-1L),(-1L)},{0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L},{(-1L),(-1L),(-1L),(-1L),(-1L)},{0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L,0x90F04890L},{(-1L),(-1L),(-1L),(-1L),(-1L)}}};
+ int i, j, k;
+ if (g_491)
+ goto lbl_2200;
+ if (l_2201)
+ break;
+ for (l_1720.f0 = 0; (l_1720.f0 <= 5); l_1720.f0 += 1)
+ { /* block id: 1072 */
+ int32_t *l_2202 = &g_902;
+ int32_t *l_2203 = &l_2060;
+ int32_t *l_2204[9][10][2] = {{{&g_33,&l_2187[1][0][0]},{(void*)0,&l_2060},{&l_2068[6],&l_2066},{&l_2187[0][0][3],&l_1879},{(void*)0,&g_82},{&l_2066,&g_902},{&l_2068[2],&l_1424},{&l_2066,&g_902},{&l_1879,&l_2060},{&l_2187[1][0][0],(void*)0}},{{&g_902,&l_2064},{&g_29,&l_2062},{&l_2062,&l_2062},{&g_29,&l_2068[2]},{&l_2060,&g_29},{&l_2064,&g_902},{&l_2060,&l_2064},{&l_2062,&g_29},{&l_2062,&l_2064},{&l_2060,&g_902}},{{&l_2064,&g_29},{&l_2060,&l_2068[2]},{&g_29,&l_2062},{&l_2062,&l_2062},{&g_29,&l_2064},{&g_902,(void*)0},{&l_2187[1][0][0],&l_2060},{&l_1879,&g_902},{&l_2066,&l_1424},{&l_2068[2],&g_902}},{{&l_2066,&g_82},{(void*)0,&l_1879},{&l_2187[0][0][3],&l_2066},{&l_2068[6],&l_2060},{(void*)0,&l_2187[1][0][0]},{&g_33,&l_2201},{&g_902,&l_2201},{&g_33,&l_2187[1][0][0]},{(void*)0,&l_2062},{&l_2201,(void*)0}},{{&g_29,&g_29},{&l_2063,&l_1424},{(void*)0,&l_2187[1][0][3]},{&g_33,&l_2062},{&l_2187[0][0][3],&g_29},{&g_29,&g_902},{&g_82,&l_2068[2]},{&l_2066,&l_2064},{&g_902,&l_2062},{&g_902,&g_902}},{{&g_902,&g_33},{&g_902,&l_2187[0][0][1]},{(void*)0,&l_2187[1][0][0]},{&l_2062,(void*)0},{&g_82,&g_902},{&g_82,(void*)0},{&l_2062,&l_2187[1][0][0]},{(void*)0,&l_2187[0][0][1]},{&g_902,&g_33},{&g_902,&g_902}},{{&g_902,&l_2062},{&g_902,&l_2064},{&l_2066,&l_2068[2]},{&g_82,&g_902},{&g_29,&g_29},{&l_2187[0][0][3],&l_2062},{&g_33,&l_2187[1][0][3]},{(void*)0,&l_1424},{&l_2063,&g_29},{&g_29,(void*)0}},{{&l_2201,&l_2062},{&l_2060,&g_82},{&l_2066,&l_2060},{&l_2187[1][0][0],&l_2060},{&l_2066,&g_82},{&l_2060,&l_2062},{&l_2201,(void*)0},{&g_29,&g_29},{&l_2063,&l_1424},{(void*)0,&l_2187[1][0][3]}},{{&g_33,&l_2062},{&l_2187[0][0][3],&g_29},{&g_29,&g_902},{&g_82,&l_2068[2]},{&l_2066,&l_2064},{&g_902,&l_2062},{&g_902,&g_902},{&g_902,&g_33},{&g_902,&l_2187[0][0][1]},{(void*)0,&l_2187[1][0][0]}}};
+ int16_t l_2230 = 0xA55CL;
+ uint32_t l_2232 = 0xE71201CAL;
+ int i, j, k;
+ for (l_2107 = 0; (l_2107 <= 5); l_2107 += 1)
+ { /* block id: 1075 */
+ return p_37;
+ }
+ ++l_2207;
+ for (l_2062 = 0; (l_2062 <= 3); l_2062 += 1)
+ { /* block id: 1081 */
+ int8_t l_2214[9][2][1] = {{{1L},{(-1L)}},{{1L},{1L}},{{0xCDL},{1L}},{{1L},{(-1L)}},{{1L},{1L}},{{0xCDL},{1L}},{{1L},{(-1L)}},{{1L},{1L}},{{0xCDL},{1L}}};
+ int32_t l_2215 = (-1L);
+ int32_t l_2216[8][5][6] = {{{0xFD5A2C04L,0L,5L,0x228BFD3AL,(-1L),8L},{0L,0xE3760A9BL,0x89E7159DL,0xA48B00B6L,0x89E7159DL,0xE3760A9BL},{0L,8L,(-1L),0x228BFD3AL,5L,0L},{0xFD5A2C04L,(-1L),0x533CC7D1L,0x4AD7B503L,(-1L),0x533CC7D1L},{0xA48B00B6L,(-1L),0xB16858CAL,0xFD5A2C04L,5L,(-1L)}},{{0x9AB37E89L,8L,0xE1CFE88EL,0xF47BBD48L,0x89E7159DL,0xB16858CAL},{0x228BFD3AL,0xE3760A9BL,0xE1CFE88EL,0x075C4389L,(-1L),(-1L)},{7L,0L,0xB16858CAL,(-3L),0x533CC7D1L,0x533CC7D1L},{(-3L),0x533CC7D1L,0x533CC7D1L,(-3L),0xB16858CAL,0L},{7L,(-1L),(-1L),0x075C4389L,0xE1CFE88EL,0xE3760A9BL}},{{0x228BFD3AL,0xB16858CAL,0x89E7159DL,0xF47BBD48L,0xE1CFE88EL,8L},{0x9AB37E89L,(-1L),5L,0xFD5A2C04L,0x70EF0CBEL,(-1L)},{0xB16858CAL,0xEADC0E19L,(-10L),0x533CC7D1L,0xEADC0E19L,(-1L)},{0L,(-7L),0x115524F0L,(-1L),(-1L),0L},{0L,0x8D68B320L,2L,0xB16858CAL,2L,0x8D68B320L}},{{0L,0L,(-1L),(-1L),0x115524F0L,(-7L)},{0L,(-1L),0xEADC0E19L,0x533CC7D1L,(-10L),0xEADC0E19L},{0xB16858CAL,(-1L),0x70EF0CBEL,0L,0x115524F0L,(-10L)},{0x7BCB3C11L,0L,(-1L),0xE3760A9BL,2L,0x70EF0CBEL},{(-1L),0x8D68B320L,(-1L),8L,(-1L),(-10L)}},{{0xE1CFE88EL,(-7L),0x70EF0CBEL,(-1L),0xEADC0E19L,0xEADC0E19L},{(-1L),0xEADC0E19L,0xEADC0E19L,(-1L),0x70EF0CBEL,(-7L)},{0xE1CFE88EL,(-10L),(-1L),8L,(-1L),0x8D68B320L},{(-1L),0x70EF0CBEL,2L,0xE3760A9BL,(-1L),0L},{0x7BCB3C11L,(-10L),0x115524F0L,0L,0x70EF0CBEL,(-1L)}},{{0xB16858CAL,0xEADC0E19L,(-10L),0x533CC7D1L,0xEADC0E19L,(-1L)},{0L,(-7L),0x115524F0L,(-1L),(-1L),0L},{0L,0x8D68B320L,2L,0xB16858CAL,2L,0x8D68B320L},{0L,0L,(-1L),(-1L),0x115524F0L,(-7L)},{0L,(-1L),0xEADC0E19L,0x533CC7D1L,(-10L),0xEADC0E19L}},{{0xB16858CAL,(-1L),0x70EF0CBEL,0L,0x115524F0L,(-10L)},{0x7BCB3C11L,0L,(-1L),0xE3760A9BL,2L,0x70EF0CBEL},{(-1L),0x8D68B320L,(-1L),8L,(-1L),(-10L)},{0xE1CFE88EL,(-7L),0x70EF0CBEL,(-1L),0xEADC0E19L,0xEADC0E19L},{(-1L),0xEADC0E19L,0xEADC0E19L,(-1L),0x70EF0CBEL,(-7L)}},{{0xE1CFE88EL,(-10L),(-1L),8L,(-1L),0x8D68B320L},{(-1L),0x70EF0CBEL,2L,0xE3760A9BL,(-1L),0L},{0x7BCB3C11L,(-10L),0x115524F0L,0L,0x70EF0CBEL,(-1L)},{0xB16858CAL,0xEADC0E19L,(-10L),0x533CC7D1L,0xEADC0E19L,(-1L)},{0L,(-7L),0x115524F0L,(-1L),(-1L),0L}}};
+ uint16_t l_2226 = 0xF37BL;
+ int i, j, k;
+ g_2212 = l_2210;
+ l_2226--;
+ }
+ ++l_2232;
+ }
+ }
+ }
+ (*l_2254) &= ((((((*g_522) ^= l_2222) != (~l_2218)) & ((*l_1711) ^= (((!((**g_712)--)) < ((g_2039 = l_1721) != ((safe_mod_func_uint16_t_u_u((((safe_rshift_func_uint8_t_u_u(((safe_mod_func_int8_t_s_s((*p_35), p_37)) || (((safe_div_func_int32_t_s_s((!((*g_688) = 0L)), (safe_mul_func_uint8_t_u_u((p_37 > ((safe_sub_func_int16_t_s_s(((void*)0 == l_1453), 0x3F36L)) == p_37)), l_2206)))) && (*l_1724)) > l_2249[1])), p_37)) | l_2250[3]) & l_2251), (*g_146))) , l_2252))) & 0x16L))) & 0xDEL) , (-10L));
+ }
+ return p_37;
+}
+
+
+/* ------------------------------------------ */
+/*
+ * reads : g_33 g_688 g_82 g_23 g_1006 g_522 g_203.f3.f1 g_713 g_146 g_29 g_23.f2 g_10 g_9 g_448 g_23.f0 g_193 g_27 g_130 g_96 g_202 g_94 g_140 g_132 g_141 g_275 g_203.f3.f0 g_203.f3.f4 g_362 g_367 g_203.f1 g_368 g_802 g_803
+ * writes: g_82 g_23 g_94 g_1010 g_202 g_29 g_203.f1 g_92 g_275 g_448 g_28 g_203.f0 g_96 g_141 g_193.f3 g_9 g_663.f1 g_803
+ */
+static int8_t * func_38(int32_t * p_39)
+{ /* block id: 461 */
+ union U2 l_983 = {0xA18EBFA4L};
+ uint32_t *l_993[4][4][5] = {{{&g_27,&g_27,&g_491,&g_491,&g_27},{&g_491,&g_27,(void*)0,&g_27,&g_491},{&g_27,&g_491,&g_491,&g_27,&g_27},{&g_491,&g_27,&g_491,&g_491,&g_491}},{{&g_27,&g_27,&g_27,&g_491,&g_27},{&g_491,&g_491,(void*)0,&g_491,&g_491},{&g_27,&g_491,&g_27,&g_27,&g_27},{&g_491,&g_491,&g_491,&g_27,&g_491}},{{&g_27,&g_27,&g_491,&g_491,&g_27},{&g_491,&g_27,(void*)0,&g_27,&g_491},{&g_27,&g_491,&g_491,&g_27,&g_27},{&g_491,&g_27,&g_491,&g_491,&g_491}},{{&g_27,&g_27,&g_27,&g_491,&g_27},{&g_491,&g_491,(void*)0,&g_491,&g_491},{&g_27,&g_491,&g_27,&g_27,&g_27},{&g_491,&g_491,&g_491,&g_27,&g_491}}};
+ uint32_t **l_992 = &l_993[1][2][2];
+ uint32_t *l_994 = &g_275[5][2];
+ int8_t *l_999 = &g_448;
+ int8_t **l_1000 = &l_999;
+ struct S1 l_1002 = {0x00L,1L,0x1C11L,{-1L,0xDCFBL,0UL,0x327FL,0x73L},0x0032L};
+ int32_t l_1003 = 0x037EDC74L;
+ int8_t *l_1004 = &g_9;
+ union U2 *l_1005 = &g_23;
+ uint8_t *l_1008[3];
+ uint32_t l_1020[10][5][5] = {{{0xF2AA9CB4L,0xF2AA9CB4L,0xB9798130L,1UL,0x84C3A2C5L},{9UL,6UL,0xDB4B8351L,0x79CDF276L,18446744073709551612UL},{2UL,1UL,4UL,0xCFC16537L,1UL},{0xED3C58A6L,6UL,18446744073709551615UL,0x05959D90L,0UL},{0x1FE60990L,0xF2AA9CB4L,18446744073709551611UL,2UL,1UL}},{{1UL,0xCE69CB81L,2UL,18446744073709551610UL,7UL},{0xBDDE72C4L,1UL,8UL,0x3AB83C40L,1UL},{6UL,1UL,0x412240A3L,0x38E14851L,0x56FAA21DL},{0xF174B866L,0xCFC16537L,18446744073709551613UL,0UL,0xB9798130L},{0x46E8FA96L,18446744073709551615UL,0x0979A739L,0xDB4B8351L,0x38E14851L}},{{0x23A25F20L,18446744073709551615UL,18446744073709551608UL,18446744073709551615UL,0x23A25F20L},{0xA159F13BL,0x56FAA21DL,18446744073709551610UL,0x255BB07DL,0x0979A739L},{0xA884EFE1L,9UL,0x0C1255E5L,1UL,0xBDDE72C4L},{0UL,0x79CDF276L,6UL,0x56FAA21DL,0x0979A739L},{18446744073709551612UL,1UL,18446744073709551615UL,0UL,0x23A25F20L}},{{0x0979A739L,18446744073709551615UL,0UL,6UL,0x38E14851L},{0UL,4UL,1UL,18446744073709551611UL,0xB9798130L},{1UL,0xA159F13BL,0x46E8FA96L,0x7D73904FL,0x56FAA21DL},{6UL,8UL,0UL,1UL,1UL},{0xDB4B8351L,0x31587566L,18446744073709551615UL,18446744073709551615UL,7UL}},{{3UL,0xED235A89L,0xC4ACEBD6L,1UL,1UL},{0x31587566L,9UL,0x31587566L,18446744073709551608UL,0UL},{0x8530C162L,0xC4ACEBD6L,0xA884EFE1L,0x4D4F19E2L,1UL},{0UL,1UL,18446744073709551608UL,1UL,18446744073709551612UL},{1UL,0x23A25F20L,0xA884EFE1L,1UL,0x84C3A2C5L}},{{0xF30BAE18L,7UL,0x31587566L,0x412240A3L,0xA159F13BL},{0UL,0xA884EFE1L,0xF2AA9CB4L,0xAC889584L,18446744073709551615UL},{1UL,1UL,0x412240A3L,18446744073709551608UL,0x34DC149FL},{0UL,18446744073709551615UL,0UL,0xA4772EFEL,0x2E7448B6L},{6UL,0x79CDF276L,0UL,0xCE69CB81L,18446744073709551615UL}},{{6UL,0x4007BECEL,8UL,18446744073709551613UL,4UL},{1UL,0xED3C58A6L,0x05959D90L,0x05959D90L,0xED3C58A6L},{0xCB204103L,0xC82A66DFL,0x6DA78595L,0x3AB83C40L,0x23A25F20L},{9UL,1UL,0xF30BAE18L,0x412240A3L,0xEDF2696BL},{0x9ADF3501L,0UL,18446744073709551611UL,18446744073709551612UL,1UL}},{{9UL,0x0979A739L,0UL,0x31587566L,1UL},{0xCB204103L,18446744073709551615UL,6UL,0x23A25F20L,0xB970E888L},{1UL,0x28F68007L,0x0281312AL,2UL,18446744073709551608UL},{6UL,0x8530C162L,1UL,18446744073709551607UL,18446744073709551615UL},{6UL,0x71A1A02CL,1UL,0xED3C58A6L,18446744073709551612UL}},{{0UL,0x84C3A2C5L,0xB9798130L,18446744073709551615UL,0UL},{1UL,0x38E14851L,6UL,18446744073709551610UL,0x31587566L},{1UL,1UL,1UL,1UL,18446744073709551608UL},{1UL,0xA159F13BL,0x31587566L,0x255BB07DL,1UL},{0xCFC16537L,18446744073709551612UL,18446744073709551615UL,1UL,18446744073709551615UL}},{{0x0979A739L,18446744073709551610UL,18446744073709551615UL,0x255BB07DL,1UL},{0xC82A66DFL,0xBDDE72C4L,9UL,1UL,0xA884EFE1L},{7UL,1UL,0UL,18446744073709551610UL,0x43467938L},{0xCA5F646AL,0xB970E888L,4UL,18446744073709551615UL,0xAC889584L},{18446744073709551615UL,0x412240A3L,1UL,0xED3C58A6L,18446744073709551610UL}}};
+ int32_t l_1035[1];
+ uint16_t l_1075[7];
+ int8_t l_1104[2][6][3] = {{{(-1L),(-1L),(-1L)},{3L,0xE2L,3L},{(-1L),(-1L),(-1L)},{3L,0xE2L,3L},{(-1L),(-1L),(-1L)},{3L,0xE2L,3L}},{{(-1L),(-1L),(-1L)},{3L,0xE2L,3L},{(-1L),(-1L),(-1L)},{3L,0xE2L,3L},{(-1L),(-1L),(-1L)},{3L,0xE2L,3L}}};
+ union U2 *l_1162[3][1];
+ uint32_t l_1163 = 0x33E342EBL;
+ int8_t l_1263[4][4][5];
+ const struct S0 *l_1312 = &g_663;
+ const struct S0 **l_1311 = &l_1312;
+ int i, j, k;
+ for (i = 0; i < 3; i++)
+ l_1008[i] = &g_141[1][4];
+ for (i = 0; i < 1; i++)
+ l_1035[i] = (-4L);
+ for (i = 0; i < 7; i++)
+ l_1075[i] = 0xB9F4L;
+ for (i = 0; i < 3; i++)
+ {
+ for (j = 0; j < 1; j++)
+ l_1162[i][j] = &l_983;
+ }
+ for (i = 0; i < 4; i++)
+ {
+ for (j = 0; j < 4; j++)
+ {
+ for (k = 0; k < 5; k++)
+ l_1263[i][j][k] = 5L;
+ }
+ }
+ (*g_688) &= (*p_39);
+ if ((safe_rshift_func_uint8_t_u_u((l_983 , (l_1003 = ((*g_713) = ((((((*l_1005) = (l_983.f2 , g_23)) , &l_983) != g_1006) >= (*g_522)) , 0x0CL)))), 3)))
+ { /* block id: 469 */
+ int8_t **l_1009[4][8][8] = {{{&g_10,&g_10,&l_1004,&l_999,&l_999,&g_10,&l_1004,&l_1004},{&l_999,&g_10,(void*)0,&g_10,&l_999,&g_10,&g_10,&l_1004},{&l_1004,&l_999,&g_10,&g_10,&l_1004,&l_999,&l_1004,(void*)0},{&g_10,&g_10,(void*)0,&l_1004,(void*)0,&l_1004,&l_999,&l_1004},{&l_999,&l_1004,(void*)0,&l_1004,&g_10,&g_10,&g_10,&l_999},{&l_999,(void*)0,&l_1004,&l_1004,&l_1004,(void*)0,&l_999,&l_999},{&g_10,(void*)0,&l_1004,&l_1004,&g_10,&l_999,&g_10,&l_1004},{&l_1004,&g_10,&l_1004,&l_999,(void*)0,&l_999,&g_10,&g_10}},{{(void*)0,&g_10,(void*)0,&l_1004,&g_10,(void*)0,&l_999,&g_10},{(void*)0,(void*)0,&l_1004,(void*)0,&l_999,&l_999,&l_1004,&l_999},{&l_1004,&g_10,&g_10,&g_10,(void*)0,&g_10,&l_1004,&l_999},{(void*)0,&l_999,&l_1004,&l_999,&l_1004,(void*)0,&g_10,(void*)0},{&l_999,&l_999,&l_999,&l_1004,&l_999,&g_10,&g_10,&l_1004},{&g_10,&g_10,&l_999,&g_10,&g_10,(void*)0,&l_1004,&g_10},{&l_999,&l_1004,&g_10,&g_10,&l_999,(void*)0,&l_1004,&g_10},{&l_999,(void*)0,&g_10,&l_999,&l_1004,(void*)0,(void*)0,(void*)0}},{{&g_10,&l_999,&l_1004,&l_999,&g_10,(void*)0,&l_1004,&l_1004},{(void*)0,&l_1004,&l_999,&l_999,&l_1004,(void*)0,&g_10,&l_1004},{&l_999,&l_1004,&l_999,&l_999,&g_10,(void*)0,&l_1004,(void*)0},{&l_1004,&l_1004,&g_10,&l_999,&l_999,&l_1004,&l_1004,&l_1004},{(void*)0,&l_999,&l_1004,&l_999,&g_10,&g_10,(void*)0,&l_1004},{&g_10,(void*)0,&l_1004,&l_999,&l_1004,(void*)0,&g_10,(void*)0},{&l_1004,&g_10,&l_999,&l_999,&g_10,&g_10,&g_10,&g_10},{&l_999,&g_10,(void*)0,&g_10,&l_1004,&l_999,&l_999,&g_10}},{{&l_1004,&g_10,&l_999,&g_10,(void*)0,&l_999,&g_10,&l_1004},{&g_10,&l_1004,&l_999,&l_1004,(void*)0,&g_10,&l_1004,(void*)0},{&l_999,&l_1004,&l_1004,&l_999,&g_10,(void*)0,(void*)0,&l_999},{&l_1004,&l_999,&l_999,&g_10,&g_10,&l_1004,&l_1004,&l_999},{&g_10,&g_10,(void*)0,(void*)0,&l_999,&g_10,&l_999,(void*)0},{&g_10,(void*)0,&g_10,&l_1004,(void*)0,&l_999,&l_1004,&l_1004},{&g_10,&l_1004,(void*)0,&l_1004,(void*)0,&l_1004,&g_10,&l_1004},{&l_999,(void*)0,&g_10,&g_10,(void*)0,&g_10,(void*)0,&l_999}}};
+ int32_t **l_1011 = &g_28[0];
+ int i, j, k;
+ (*l_1011) = func_45((g_1010 = &g_448), &g_29, &g_448);
+ }
+ else
+ { /* block id: 472 */
+ const int16_t l_1021 = (-10L);
+ int32_t l_1032[10][2][6] = {{{1L,8L,3L,3L,8L,1L},{(-1L),1L,3L,1L,(-1L),(-1L)}},{{4L,1L,1L,4L,8L,4L},{4L,8L,4L,1L,1L,4L}},{{(-1L),(-1L),1L,3L,1L,(-1L)},{1L,8L,3L,3L,8L,1L}},{{(-1L),1L,3L,1L,(-1L),(-1L)},{4L,1L,1L,4L,8L,4L}},{{4L,8L,4L,1L,1L,4L},{(-1L),(-1L),1L,3L,1L,(-1L)}},{{1L,8L,3L,3L,8L,1L},{(-1L),1L,3L,1L,(-1L),(-1L)}},{{4L,1L,1L,4L,8L,4L},{4L,8L,4L,1L,1L,4L}},{{(-1L),(-1L),1L,3L,1L,(-1L)},{1L,8L,3L,3L,8L,1L}},{{(-1L),1L,3L,1L,(-1L),(-1L)},{4L,1L,1L,4L,8L,4L}},{{4L,8L,4L,1L,1L,4L},{(-1L),(-1L),1L,3L,1L,(-1L)}}};
+ uint32_t l_1040 = 0x46C4402DL;
+ int32_t l_1048 = (-1L);
+ uint16_t l_1051 = 0xAEDFL;
+ int8_t ***l_1054 = &l_1000;
+ union U2 **l_1057[7];
+ union U2 l_1091 = {0xD559D94EL};
+ struct S1 l_1093 = {0x59L,-10L,0xE7A5L,{0x9AAAL,0x6F3EL,5UL,65533UL,1UL},0x1B19L};
+ int32_t ***l_1137[4] = {(void*)0,(void*)0,(void*)0,(void*)0};
+ int32_t ****l_1138[4];
+ uint8_t **l_1144 = (void*)0;
+ uint8_t ***l_1143 = &l_1144;
+ uint32_t l_1178[3];
+ const uint8_t *l_1224 = (void*)0;
+ const uint8_t **l_1223 = &l_1224;
+ uint32_t l_1264 = 18446744073709551615UL;
+ union U2 l_1304[5] = {{0xC351DB28L},{0xC351DB28L},{0xC351DB28L},{0xC351DB28L},{0xC351DB28L}};
+ int i, j, k;
+ for (i = 0; i < 7; i++)
+ l_1057[i] = &l_1005;
+ for (i = 0; i < 4; i++)
+ l_1138[i] = &l_1137[0];
+ for (i = 0; i < 3; i++)
+ l_1178[i] = 1UL;
+ for (g_193.f3 = 26; (g_193.f3 <= 11); g_193.f3 = safe_sub_func_uint8_t_u_u(g_193.f3, 1))
+ { /* block id: 475 */
+ int16_t l_1033 = 0L;
+ int32_t l_1036 = (-1L);
+ int32_t l_1037[8] = {2L,(-5L),2L,(-5L),2L,(-5L),2L,(-5L)};
+ int i;
+ for (g_9 = 0; (g_9 == (-15)); g_9 = safe_sub_func_uint32_t_u_u(g_9, 4))
+ { /* block id: 478 */
+ int8_t l_1031 = 0x69L;
+ int32_t l_1034 = 0xDBC85C67L;
+ int32_t l_1038[1];
+ int i;
+ for (i = 0; i < 1; i++)
+ l_1038[i] = 0x1432EEBAL;
+ if ((*p_39))
+ break;
+ for (g_663.f1 = 0; (g_663.f1 == 24); g_663.f1 = safe_add_func_uint16_t_u_u(g_663.f1, 7))
+ { /* block id: 482 */
+ int8_t l_1022[10][10][2] = {{{0xA6L,0x74L},{(-3L),0x73L},{0xBAL,(-3L)},{0x73L,0x74L},{0x73L,(-3L)},{0xBAL,0x73L},{(-3L),0x74L},{0xA6L,0xA6L},{0xBAL,0xA6L},{0xA6L,0x74L}},{{(-3L),0x73L},{0xBAL,(-3L)},{0x65L,1L},{0x65L,0x74L},{0x0AL,0x65L},{0x74L,1L},{0xBAL,0xBAL},{0x0AL,0xBAL},{0xBAL,1L},{0x74L,0x65L}},{{0x0AL,0x74L},{0x65L,1L},{0x65L,0x74L},{0x0AL,0x65L},{0x74L,1L},{0xBAL,0xBAL},{0x0AL,0xBAL},{0xBAL,1L},{0x74L,0x65L},{0x0AL,0x74L}},{{0x65L,1L},{0x65L,0x74L},{0x0AL,0x65L},{0x74L,1L},{0xBAL,0xBAL},{0x0AL,0xBAL},{0xBAL,1L},{0x74L,0x65L},{0x0AL,0x74L},{0x65L,1L}},{{0x65L,0x74L},{0x0AL,0x65L},{0x74L,1L},{0xBAL,0xBAL},{0x0AL,0xBAL},{0xBAL,1L},{0x74L,0x65L},{0x0AL,0x74L},{0x65L,1L},{0x65L,0x74L}},{{0x0AL,0x65L},{0x74L,1L},{0xBAL,0xBAL},{0x0AL,0xBAL},{0xBAL,1L},{0x74L,0x65L},{0x0AL,0x74L},{0x65L,1L},{0x65L,0x74L},{0x0AL,0x65L}},{{0x74L,1L},{0xBAL,0xBAL},{0x0AL,0xBAL},{0xBAL,1L},{0x74L,0x65L},{0x0AL,0x74L},{0x65L,1L},{0x65L,0x74L},{0x0AL,0x65L},{0x74L,1L}},{{0xBAL,0xBAL},{0x0AL,0xBAL},{0xBAL,1L},{0x74L,0x65L},{0x0AL,0x74L},{0x65L,1L},{0x65L,0x74L},{0x0AL,0x65L},{0x74L,1L},{0xBAL,0xBAL}},{{0x0AL,0xBAL},{0xBAL,1L},{0x74L,0x65L},{0x0AL,0x74L},{0x65L,1L},{0x65L,0x74L},{0x0AL,0x65L},{0x74L,1L},{0xBAL,0xBAL},{0x0AL,0xBAL}},{{0xBAL,1L},{0x74L,0x65L},{0x0AL,0x74L},{0x65L,1L},{0x65L,0x74L},{0x0AL,0x65L},{0x74L,1L},{0xBAL,0xBAL},{0x0AL,0xBAL},{0xBAL,1L}}};
+ int32_t l_1029 = 0xD4525DBDL;
+ int32_t l_1039 = (-1L);
+ int i, j, k;
+ if ((((safe_rshift_func_uint8_t_u_s(l_1020[0][2][0], 2)) & l_1021) <= l_1022[5][2][1]))
+ { /* block id: 483 */
+ int32_t *l_1023 = &g_82;
+ int32_t *l_1024 = &g_82;
+ int32_t *l_1025 = &g_33;
+ int32_t *l_1026 = &g_33;
+ int32_t *l_1027 = &g_33;
+ int32_t *l_1028 = &g_902;
+ int32_t *l_1030[3][9][6] = {{{(void*)0,(void*)0,&l_1029,&l_1029,&l_1029,(void*)0},{(void*)0,&l_1003,&l_1003,&l_1029,&l_1003,(void*)0},{&g_902,&g_29,&g_29,&g_29,&g_29,&l_1029},{(void*)0,(void*)0,&l_1003,&g_29,(void*)0,&l_1029},{(void*)0,&g_82,&l_1003,&g_29,(void*)0,&g_29},{(void*)0,&g_29,&g_82,&g_29,(void*)0,&l_1003},{&l_1029,(void*)0,&g_902,(void*)0,&g_902,(void*)0},{(void*)0,&l_1003,&l_1029,(void*)0,&g_902,(void*)0},{&g_82,&g_29,&g_902,&g_33,&l_1003,&l_1003}},{{&g_902,(void*)0,&g_82,&g_902,&g_82,&g_29},{&g_33,&g_33,&l_1003,&g_82,&g_29,&l_1029},{(void*)0,(void*)0,&l_1003,(void*)0,&g_29,&l_1029},{(void*)0,&g_33,&g_902,&l_1029,&g_82,&l_1029},{&g_29,(void*)0,&l_1029,(void*)0,&l_1003,&l_1003},{&g_29,&g_29,&l_1029,(void*)0,&g_902,&g_902},{&g_29,&l_1003,&l_1029,(void*)0,&g_902,&g_33},{&g_29,(void*)0,(void*)0,(void*)0,(void*)0,(void*)0},{&g_29,&g_29,(void*)0,&l_1029,(void*)0,&l_1003}},{{(void*)0,&g_82,(void*)0,(void*)0,(void*)0,(void*)0},{(void*)0,(void*)0,(void*)0,&g_82,&g_29,&l_1003},{&g_33,&g_82,(void*)0,&g_902,&l_1029,(void*)0},{&g_902,&l_1029,(void*)0,&g_33,&g_33,&g_33},{&g_82,(void*)0,&l_1029,(void*)0,(void*)0,&g_902},{(void*)0,(void*)0,&l_1029,(void*)0,&g_33,&l_1003},{&l_1029,&l_1029,&l_1029,&g_29,&l_1029,&l_1029},{(void*)0,&g_82,&g_902,&g_29,&g_29,&l_1029},{(void*)0,(void*)0,&l_1003,&g_29,(void*)0,&l_1029}}};
+ int i, j, k;
+ ++l_1040;
+ (*l_1023) ^= 0x1C9C1B24L;
+ (*g_802) = (*g_802);
+ }
+ else
+ { /* block id: 487 */
+ return &g_368[5][5][0];
+ }
+ }
+ }
+ }
+ }
+ return &g_368[4][0][2];
+}
+
+
+/* ------------------------------------------ */
+/*
+ * reads : g_712 g_713 g_94 g_146 g_23.f2 g_10 g_9 g_522 g_203.f3.f1 g_709 g_141 g_193.f3 g_33 g_82 g_29 g_663.f1 g_275 g_27 g_663.f0 g_870 g_368 g_688 g_802 g_663.f3 g_23 g_429.f3.f2
+ * writes: g_33 g_82 g_29 g_709 g_94 g_193.f3 g_663.f1 g_27 g_23.f2 g_203.f3.f1 g_203.f1 g_203.f3.f3 g_28 g_131 g_9 g_803 g_663.f3 g_275
+ */
+static union U2 func_40(int32_t * p_41, int8_t * p_42, struct S0 p_43, int32_t p_44)
+{ /* block id: 368 */
+ int16_t *l_813 = &g_367;
+ int32_t l_816[2];
+ int32_t **l_829 = (void*)0;
+ int32_t **l_830 = (void*)0;
+ uint32_t *l_831 = &g_709[8][1];
+ struct S1 *l_834 = (void*)0;
+ struct S0 l_841 = {-3L,0xA66BL,0x139EL,0x6331L,0x55L};
+ int32_t l_923 = 0xBFDBBFDCL;
+ int32_t ** const l_926[1][9][9] = {{{&g_28[4],(void*)0,&g_28[2],&g_688,&g_688,&g_28[4],&g_28[1],&g_28[4],&g_28[4]},{&g_28[0],&g_688,&g_28[2],&g_688,&g_28[2],&g_688,&g_28[0],&g_688,&g_688},{&g_28[4],&g_28[4],&g_28[5],(void*)0,&g_28[4],&g_688,&g_28[1],(void*)0,&g_28[1]},{&g_688,(void*)0,&g_28[4],&g_28[4],(void*)0,&g_688,&g_688,&g_688,&g_28[0]},{(void*)0,&g_28[2],&g_688,&g_688,&g_28[4],&g_28[1],&g_28[4],&g_28[4],&g_28[4]},{&g_688,&g_28[2],&g_688,&g_28[2],&g_688,&g_28[0],&g_688,&g_688,&g_688},{&g_28[1],(void*)0,&g_28[5],&g_28[1],&g_28[4],&g_688,&g_28[4],&g_688,&g_28[4]},{&g_688,&g_688,&g_688,&g_688,(void*)0,&g_28[0],&g_688,&g_28[4],(void*)0},{&g_28[4],&g_28[2],&g_28[4],&g_28[5],&g_688,&g_28[4],&g_28[4],&g_688,&g_28[5]}}};
+ int32_t l_967 = (-1L);
+ uint8_t *l_974 = &g_96;
+ uint8_t **l_973 = &l_974;
+ uint32_t l_977 = 0xBFD29E8DL;
+ int i, j, k;
+ for (i = 0; i < 2; i++)
+ l_816[i] = 1L;
+ (*p_41) = ((0xD2E1L || (safe_add_func_uint8_t_u_u(((&g_92 != l_813) & (**g_712)), ((((*g_146) > 0x6A77L) > (4294967295UL > ((*g_10) >= (safe_mod_func_uint32_t_u_u(((*g_10) < 0xCCL), 0x2EF7E0E9L))))) != l_816[1])))) & (*g_522));
+ if ((((65535UL != (safe_div_func_int16_t_s_s((safe_sub_func_uint8_t_u_u((safe_add_func_uint8_t_u_u((safe_mod_func_int8_t_s_s((safe_add_func_uint32_t_u_u((((&p_41 == ((safe_sub_func_int16_t_s_s(p_44, ((((((!((((**g_712) = (((l_829 = l_829) != l_830) ^ (((*l_831) |= (l_816[1] | l_816[0])) , (~(~(safe_sub_func_int16_t_s_s(p_43.f0, (l_834 == (void*)0)))))))) || 0x4FL) & p_43.f0)) < p_43.f2) == l_816[0]) < 0UL) == 0x4FL) <= 0UL))) , (void*)0)) , p_44) , 0x00332CCCL), p_44)), p_43.f1)), g_141[5][6])), l_816[0])), l_816[1]))) <= (*g_10)) <= l_816[0]))
+ { /* block id: 373 */
+ union U2 *l_835 = &g_23;
+ int32_t l_844 = 0L;
+ int32_t l_845 = 4L;
+ uint32_t *l_849 = &g_709[5][2];
+ int32_t l_861 = 0x2D871063L;
+ int32_t l_874[6][4][7] = {{{0xEBD23C63L,0x86B45C9EL,0xDBC25A38L,9L,0x7306DC66L,0xE137DD82L,0x7306DC66L},{0L,0x708144BCL,0x7DC3FFEAL,(-1L),0xD4CDFA73L,4L,0x2AEFA674L},{(-4L),0xE137DD82L,0x04C8643BL,0x86B45C9EL,0x430DC65CL,1L,1L},{(-4L),0x3D08D363L,0x2AEFA674L,0x60F55FAEL,(-1L),0x60F55FAEL,0x2AEFA674L}},{{0xDBC25A38L,0xDBC25A38L,1L,0x8300C942L,1L,0x352C77AFL,0x7306DC66L},{4L,0x90ADCA77L,0x694C6AD6L,0x708144BCL,(-4L),0x2FF8803EL,0L},{0x352C77AFL,0xA85E05AAL,1L,0x7306DC66L,1L,0xA85E05AAL,0x352C77AFL},{1L,0x60F55FAEL,0L,(-1L),(-1L),(-6L),0x7DC3FFEAL}},{{1L,0x04C8643BL,0xE2858F44L,0x7C754C8AL,0x430DC65CL,0xEBD23C63L,0xEBD23C63L},{0xD4CDFA73L,(-4L),0L,(-4L),0xD4CDFA73L,0L,0x7DD96E50L},{1L,0x8300C942L,1L,0x352C77AFL,0x7306DC66L,0x58C09AECL,0x430DC65CL},{0x8CCDD4F0L,5L,0x694C6AD6L,0xF7130A0DL,0L,(-1L),0L}},{{1L,0x352C77AFL,1L,(-4L),0xE137DD82L,0x04C8643BL,0x86B45C9EL},{0xD4CDFA73L,4L,0x2AEFA674L,0L,0L,0x90ADCA77L,1L},{1L,1L,0x04C8643BL,0xA85E05AAL,0xA85E05AAL,0x04C8643BL,1L},{1L,(-1L),0x7DC3FFEAL,0x92B23D5EL,(-5L),(-1L),(-4L)}},{{0x352C77AFL,0xE2858F44L,0xDBC25A38L,1L,0x86B45C9EL,0x58C09AECL,0x7C754C8AL},{4L,(-6L),(-9L),0x92B23D5EL,0L,0L,(-1L)},{0xDBC25A38L,0x7C754C8AL,1L,0xA85E05AAL,(-4L),0xEBD23C63L,0xE137DD82L},{(-4L),0xF7130A0DL,(-1L),0L,0x694C6AD6L,(-6L),0x694C6AD6L}},{{(-4L),0x7C754C8AL,0x7C754C8AL,(-4L),0xE2858F44L,0xA85E05AAL,0x58C09AECL},{0L,(-6L),1L,0xF7130A0DL,1L,0x2FF8803EL,0L},{0xA8F0C9FCL,0x8300C942L,0x352C77AFL,0x04C8643BL,0xEBD23C63L,0x04C8643BL,0x352C77AFL},{(-4L),0xC335D284L,1L,0x708144BCL,0xD4CDFA73L,5L,(-9L)}}};
+ int8_t l_892 = 0x14L;
+ uint32_t l_898 = 0UL;
+ uint8_t **l_972[2][5][1];
+ int i, j, k;
+ for (i = 0; i < 2; i++)
+ {
+ for (j = 0; j < 5; j++)
+ {
+ for (k = 0; k < 1; k++)
+ l_972[i][j][k] = (void*)0;
+ }
+ }
+ for (g_193.f3 = 0; (g_193.f3 <= 2); g_193.f3 += 1)
+ { /* block id: 376 */
+ union U2 **l_836 = &l_835;
+ int32_t l_871 = (-4L);
+ int32_t l_884 = (-5L);
+ int32_t l_888 = 0x753BF6FFL;
+ int32_t l_895 = (-1L);
+ int32_t l_896[8] = {9L,9L,0x5C7D4CE2L,9L,9L,0x5C7D4CE2L,9L,9L};
+ int32_t l_901[4] = {2L,2L,2L,2L};
+ struct S1 l_930[6] = {{0x79L,1L,1UL,{2L,65535UL,9UL,0x5A57L,255UL},0UL},{0x79L,1L,1UL,{2L,65535UL,9UL,0x5A57L,255UL},0UL},{0x79L,1L,1UL,{2L,65535UL,9UL,0x5A57L,255UL},0UL},{0x79L,1L,1UL,{2L,65535UL,9UL,0x5A57L,255UL},0UL},{0x79L,1L,1UL,{2L,65535UL,9UL,0x5A57L,255UL},0UL},{0x79L,1L,1UL,{2L,65535UL,9UL,0x5A57L,255UL},0UL}};
+ int i;
+ (*l_836) = l_835;
+ if ((*p_41))
+ continue;
+ for (g_29 = 2; (g_29 >= 0); g_29 -= 1)
+ { /* block id: 381 */
+ int8_t l_872 = 0xD6L;
+ int32_t l_881 = 0xC2359472L;
+ int32_t l_882 = 7L;
+ int32_t l_883 = (-1L);
+ int32_t l_885 = 0x0CE63601L;
+ int32_t l_887[6][3] = {{(-2L),(-2L),0xFF72B15AL},{0x336CEA91L,0x336CEA91L,(-10L)},{(-2L),(-2L),0xFF72B15AL},{0x336CEA91L,0x336CEA91L,(-10L)},{(-2L),(-2L),0xFF72B15AL},{0x336CEA91L,0x336CEA91L,(-10L)}};
+ struct S0 *l_956 = (void*)0;
+ int i, j;
+ for (g_663.f1 = 0; (g_663.f1 <= 2); g_663.f1 += 1)
+ { /* block id: 384 */
+ uint32_t *l_846 = &g_27;
+ uint32_t **l_850 = &l_831;
+ int32_t *l_862 = &g_203.f1;
+ uint32_t l_865 = 0UL;
+ uint32_t *l_873 = &l_865;
+ union U2 l_875 = {-6L};
+ struct S1 *l_876[4][8] = {{(void*)0,(void*)0,&g_203,&g_429[3][2][4],(void*)0,&g_429[3][2][4],(void*)0,(void*)0},{&g_429[3][2][4],(void*)0,&g_203,&g_429[3][2][4],&g_429[0][4][4],&g_429[3][2][4],&g_203,(void*)0},{(void*)0,(void*)0,&g_429[3][2][4],&g_429[3][2][4],(void*)0,&g_203,&g_429[0][4][4],&g_429[3][2][4]},{&g_429[1][1][5],&g_429[0][4][4],&g_429[1][1][3],(void*)0,(void*)0,&g_429[1][1][3],&g_429[0][4][4],&g_429[1][1][5]}};
+ int32_t l_886 = 0xC62C1A3DL;
+ int32_t l_889 = 1L;
+ int32_t l_890 = (-4L);
+ int32_t l_891 = 0xBBD98B66L;
+ int32_t l_894[6] = {9L,9L,9L,9L,9L,9L};
+ int32_t l_897 = 0L;
+ int32_t *l_911 = &l_891;
+ int i, j;
+ if ((safe_mod_func_int32_t_s_s((safe_mul_func_int16_t_s_s((l_841 , 1L), ((((*l_873) = (((safe_lshift_func_int16_t_s_u(((l_844 ^= g_275[(g_663.f1 + 2)][g_29]) != ((*l_846)++)), (((l_849 = l_849) == ((*l_850) = &g_275[0][1])) , (safe_add_func_uint16_t_u_u((safe_rshift_func_uint16_t_u_u(((*g_146)--), ((((*g_522) = (*g_522)) <= (safe_rshift_func_uint16_t_u_u(((safe_mod_func_uint8_t_u_u((((*l_862) = (l_861 ^= l_845)) , ((safe_mul_func_int32_t_s_s(l_865, ((((safe_rshift_func_uint8_t_u_s((((((safe_lshift_func_uint8_t_u_u((p_43.f1 ^ (*g_10)), l_865)) , g_663.f0) , g_870) == p_43.f1) | (**g_712)), 6)) < l_871) | (*p_42)) != (*p_42)))) , p_43.f3)), (*g_713))) , 0x8497L), 0))) , (*g_522)))), (-6L)))))) >= 0xF1L) >= l_872)) < l_871) < p_43.f1))), l_874[4][3][3])))
+ { /* block id: 394 */
+ return l_875;
+ }
+ else
+ { /* block id: 396 */
+ struct S1 **l_877 = &l_876[2][3];
+ int32_t *l_878 = (void*)0;
+ int32_t *l_879 = (void*)0;
+ int32_t *l_880[5][6] = {{&l_874[2][2][5],&l_816[1],&l_845,&l_845,&l_816[1],&l_874[2][2][5]},{&l_874[2][2][5],(void*)0,&l_844,&l_845,(void*)0,&l_845},{&l_874[2][2][5],&l_871,&l_874[2][2][5],&l_845,&l_871,&l_844},{&l_874[2][2][5],&l_816[1],&l_845,&l_845,&l_816[1],&l_874[2][2][5]},{&l_874[2][2][5],(void*)0,&l_844,&l_845,(void*)0,&l_845}};
+ int16_t l_893 = 0xC5C8L;
+ int i, j;
+ (*l_877) = l_876[2][5];
+ l_898++;
+ l_816[1] |= (l_841.f3 != (l_888 = (*p_41)));
+ }
+ if (l_901[2])
+ continue;
+ }
+ for (l_871 = 0; (l_871 <= 1); l_871 += 1)
+ { /* block id: 422 */
+ uint16_t l_941[1];
+ union U2 l_942[5][7] = {{{7L},{1L},{-3L},{7L},{0xD252D763L},{7L},{-3L}},{{-3L},{-3L},{-4L},{0x81C8047CL},{1L},{-7L},{-3L}},{{-3L},{-3L},{0x0CC969D1L},{1L},{-1L},{-1L},{1L}},{{7L},{0xD252D763L},{7L},{-3L},{1L},{7L},{0x1BEE06C4L}},{{1L},{0xD252D763L},{1L},{0x81C8047CL},{0xD252D763L},{-4L},{0xD252D763L}}};
+ int32_t **l_951 = &g_364;
+ int i, j;
+ for (i = 0; i < 1; i++)
+ l_941[i] = 0x94B7L;
+ for (g_203.f3.f3 = 0; (g_203.f3.f3 <= 1); g_203.f3.f3 += 1)
+ { /* block id: 425 */
+ int32_t **l_925 = (void*)0;
+ int8_t * const l_927 = &g_9;
+ int8_t *l_929 = &g_368[7][5][2];
+ int8_t **l_928 = &l_929;
+ uint32_t *l_940 = &g_491;
+ int i;
+ (*g_688) = (l_925 != l_926[0][2][5]);
+ g_131 = (g_28[4] = &p_44);
+ if (l_881)
+ break;
+ }
+ p_44 = ((safe_div_func_int16_t_s_s(((((!l_883) != p_43.f3) <= ((((((*p_41) < (((*g_10) = (safe_lshift_func_int8_t_s_u((((**g_712)++) ^ (l_951 != (void*)0)), (0x1EDDL & ((safe_mod_func_int16_t_s_s(((l_884 = (safe_sub_func_uint32_t_u_u(l_861, (*p_41)))) > 4294967291UL), 0xD5B9L)) <= g_709[8][1]))))) <= 0UL)) , (*p_42)) || (*p_42)) || p_43.f2) , (*p_42))) < (*p_41)), 65535UL)) == 0L);
+ }
+ (*g_802) = l_956;
+ for (l_898 = 0; (l_898 <= 2); l_898 += 1)
+ { /* block id: 444 */
+ for (g_663.f3 = 0; (g_663.f3 <= 3); g_663.f3 += 1)
+ { /* block id: 447 */
+ int i, j;
+ (*g_688) &= (safe_add_func_uint16_t_u_u((1L == (-1L)), (safe_lshift_func_uint8_t_u_s(g_709[(g_29 + 4)][l_898], 1))));
+ return g_23;
+ }
+ }
+ }
+ }
+ (*g_688) = ((g_275[3][1] = 18446744073709551612UL) , (safe_sub_func_uint16_t_u_u(p_43.f4, ((((**g_712) = (safe_mod_func_int32_t_s_s(((*g_522) && (((safe_lshift_func_int8_t_s_s(l_967, (*g_10))) & ((*l_835) , (safe_mul_func_int8_t_s_s(((void*)0 != &g_202[3][1]), (((safe_mul_func_int8_t_s_s(0xFDL, (*g_713))) , l_972[1][4][0]) == l_973))))) ^ (**g_712))), g_429[3][2][4].f3.f2))) || (*p_42)) , (*g_146)))));
+ }
+ else
+ { /* block id: 457 */
+ int8_t l_975 = (-4L);
+ int32_t l_976[2];
+ int i;
+ for (i = 0; i < 2; i++)
+ l_976[i] = 0xB56CD2F2L;
+ l_977++;
+ }
+ return g_23;
+}
+
+
+/* ------------------------------------------ */
+/*
+ * reads : g_146 g_33 g_82 g_23.f2 g_10 g_9 g_23.f0 g_193 g_23 g_27 g_130 g_96 g_202 g_94 g_203.f1 g_140 g_132 g_141 g_275 g_203.f3.f0 g_203.f3.f4 g_203.f0 g_362 g_367 g_368 g_29 g_448
+ * writes: g_94 g_82 g_202 g_33 g_203.f1 g_92 g_275 g_9 g_23.f2 g_28 g_203.f0 g_96 g_141 g_29 g_448
+ */
+static int32_t * func_45(int8_t * const p_46, int32_t * p_47, int8_t * p_48)
+{ /* block id: 34 */
+ int16_t l_149 = 0x2C69L;
+ int32_t l_158 = 1L;
+ uint8_t *l_159[6][2][6] = {{{(void*)0,&g_96,(void*)0,&g_96,&g_94,(void*)0},{&g_141[5][6],&g_96,&g_141[5][5],&g_141[3][4],&g_96,&g_141[5][6]}},{{(void*)0,&g_141[3][1],&g_141[0][2],&g_141[5][6],&g_141[5][6],&g_94},{&g_96,&g_141[5][5],(void*)0,(void*)0,(void*)0,(void*)0}},{{&g_96,&g_96,&g_141[3][4],&g_141[3][1],(void*)0,&g_141[0][1]},{&g_141[1][1],&g_141[0][1],&g_96,(void*)0,&g_141[5][6],&g_141[3][4]}},{{&g_141[3][4],(void*)0,&g_96,&g_141[5][6],&g_96,(void*)0},{&g_96,&g_141[5][6],&g_96,&g_96,&g_141[3][3],(void*)0}},{{&g_96,&g_141[3][3],(void*)0,(void*)0,&g_141[3][1],(void*)0},{(void*)0,&g_96,(void*)0,&g_96,&g_141[3][4],&g_94}},{{&g_141[3][4],(void*)0,&g_141[1][1],&g_141[5][6],&g_94,&g_141[5][5]},{&g_141[3][3],&g_96,&g_96,&g_141[5][6],&g_94,&g_96}}};
+ int32_t l_162 = 0L;
+ int32_t l_163 = 0x368D4868L;
+ int32_t l_164 = (-1L);
+ int32_t l_165[5][8] = {{9L,1L,0xCF0CBDDEL,1L,9L,1L,0xCF0CBDDEL,1L},{9L,1L,0xCF0CBDDEL,1L,9L,1L,0xCF0CBDDEL,1L},{9L,1L,0xCF0CBDDEL,1L,9L,1L,0xCF0CBDDEL,1L},{9L,1L,0xCF0CBDDEL,1L,9L,1L,0xCF0CBDDEL,1L},{9L,1L,0xCF0CBDDEL,1L,9L,1L,0xCF0CBDDEL,1L}};
+ uint16_t l_168 = 65531UL;
+ union U2 l_194 = {0x9F5D8235L};
+ int8_t l_195 = (-8L);
+ uint32_t l_245 = 0x0D5D64FBL;
+ struct S1 l_261[4][9] = {{{0x1AL,0xB8D20E8FL,0xAA2CL,{0x140FL,0UL,0UL,1UL,255UL},65535UL},{0x41L,0L,65526UL,{0x72A8L,1UL,0x65E9L,0xAE67L,0x65L},0x7144L},{0x3BL,9L,0xE902L,{0x2921L,1UL,0UL,0xE230L,0UL},0x52D0L},{0x15L,0xCBFC918AL,0xD33FL,{-10L,0x77D2L,65535UL,65530UL,0xBBL},65535UL},{0x41L,0L,65526UL,{0x72A8L,1UL,0x65E9L,0xAE67L,0x65L},0x7144L},{0x15L,0xCBFC918AL,0xD33FL,{-10L,0x77D2L,65535UL,65530UL,0xBBL},65535UL},{0x3BL,9L,0xE902L,{0x2921L,1UL,0UL,0xE230L,0UL},0x52D0L},{0x41L,0L,65526UL,{0x72A8L,1UL,0x65E9L,0xAE67L,0x65L},0x7144L},{0x1AL,0xB8D20E8FL,0xAA2CL,{0x140FL,0UL,0UL,1UL,255UL},65535UL}},{{0x1AL,0xB8D20E8FL,0xAA2CL,{0x140FL,0UL,0UL,1UL,255UL},65535UL},{0x41L,0L,65526UL,{0x72A8L,1UL,0x65E9L,0xAE67L,0x65L},0x7144L},{0x3BL,9L,0xE902L,{0x2921L,1UL,0UL,0xE230L,0UL},0x52D0L},{0x15L,0xCBFC918AL,0xD33FL,{-10L,0x77D2L,65535UL,65530UL,0xBBL},65535UL},{0x41L,0L,65526UL,{0x72A8L,1UL,0x65E9L,0xAE67L,0x65L},0x7144L},{0x15L,0xCBFC918AL,0xD33FL,{-10L,0x77D2L,65535UL,65530UL,0xBBL},65535UL},{0x3BL,9L,0xE902L,{0x2921L,1UL,0UL,0xE230L,0UL},0x52D0L},{0x41L,0L,65526UL,{0x72A8L,1UL,0x65E9L,0xAE67L,0x65L},0x7144L},{0x1AL,0xB8D20E8FL,0xAA2CL,{0x140FL,0UL,0UL,1UL,255UL},65535UL}},{{0x1AL,0xB8D20E8FL,0xAA2CL,{0x140FL,0UL,0UL,1UL,255UL},65535UL},{0x41L,0L,65526UL,{0x72A8L,1UL,0x65E9L,0xAE67L,0x65L},0x7144L},{0x3BL,9L,0xE902L,{0x2921L,1UL,0UL,0xE230L,0UL},0x52D0L},{0x15L,0xCBFC918AL,0xD33FL,{-10L,0x77D2L,65535UL,65530UL,0xBBL},65535UL},{0x41L,0L,65526UL,{0x72A8L,1UL,0x65E9L,0xAE67L,0x65L},0x7144L},{0x15L,0xCBFC918AL,0xD33FL,{-10L,0x77D2L,65535UL,65530UL,0xBBL},65535UL},{0x3BL,9L,0xE902L,{0x2921L,1UL,0UL,0xE230L,0UL},0x52D0L},{0x41L,0L,65526UL,{0x72A8L,1UL,0x65E9L,0xAE67L,0x65L},0x7144L},{0x1AL,0xB8D20E8FL,0xAA2CL,{0x140FL,0UL,0UL,1UL,255UL},65535UL}},{{0x1AL,0xB8D20E8FL,0xAA2CL,{0x140FL,0UL,0UL,1UL,255UL},65535UL},{0x41L,0L,65526UL,{0x72A8L,1UL,0x65E9L,0xAE67L,0x65L},0x7144L},{0x3BL,9L,0xE902L,{0x2921L,1UL,0UL,0xE230L,0UL},0x52D0L},{0x15L,0xCBFC918AL,0xD33FL,{-10L,0x77D2L,65535UL,65530UL,0xBBL},65535UL},{0x41L,0L,65526UL,{0x72A8L,1UL,0x65E9L,0xAE67L,0x65L},0x7144L},{0x15L,0xCBFC918AL,0xD33FL,{-10L,0x77D2L,65535UL,65530UL,0xBBL},65535UL},{0x3BL,9L,0xE902L,{0x2921L,1UL,0UL,0xE230L,0UL},0x52D0L},{0x41L,0L,65526UL,{0x72A8L,1UL,0x65E9L,0xAE67L,0x65L},0x7144L},{0x1AL,0xB8D20E8FL,0xAA2CL,{0x140FL,0UL,0UL,1UL,255UL},65535UL}}};
+ int32_t **l_298 = (void*)0;
+ int8_t l_302 = 3L;
+ uint32_t l_384 = 8UL;
+ int32_t **l_615 = &g_364;
+ uint16_t **l_616 = &g_146;
+ int32_t l_659 = 0x16F391CCL;
+ struct S0 *l_660 = &l_261[3][8].f3;
+ uint16_t l_779[5] = {0xCE19L,0xCE19L,0xCE19L,0xCE19L,0xCE19L};
+ uint8_t l_784 = 0xE9L;
+ int i, j, k;
+ if ((((safe_rshift_func_int8_t_s_s(((void*)0 != g_146), 4)) <= ((safe_add_func_uint32_t_u_u(l_149, 0xCFA7979AL)) , (l_149 && (g_94 = ((safe_rshift_func_uint16_t_u_u((safe_mod_func_int16_t_s_s(((*p_47) , ((g_23.f2 && 4294967286UL) & (safe_sub_func_int16_t_s_s((safe_rshift_func_uint16_t_u_u(((((((&l_149 == (void*)0) <= (*g_10)) > 0x5FL) & l_149) | (*p_48)) && l_158), 1)), (*g_146))))), l_149)), 13)) == l_158))))) >= g_23.f0))
+ { /* block id: 36 */
+ int32_t *l_160 = &g_82;
+ int32_t *l_161[5] = {(void*)0,(void*)0,(void*)0,(void*)0,(void*)0};
+ int32_t l_166 = (-1L);
+ int16_t l_167 = (-3L);
+ const struct S0 l_224 = {-1L,1UL,65535UL,1UL,0x64L};
+ union U2 l_228 = {-1L};
+ int32_t *l_340 = &l_164;
+ int32_t *l_349 = &g_140;
+ int32_t **l_348[5];
+ struct S1 *l_353[1][8][2] = {{{&l_261[2][5],&l_261[2][5]},{&l_261[0][4],&l_261[2][5]},{&l_261[2][5],&l_261[0][4]},{&l_261[2][5],&l_261[2][5]},{&l_261[0][4],&l_261[2][5]},{&l_261[2][5],&l_261[0][4]},{&l_261[2][5],&l_261[2][5]},{&l_261[0][4],&l_261[2][5]}}};
+ int i, j, k;
+ for (i = 0; i < 5; i++)
+ l_348[i] = &l_349;
+ --l_168;
+ if (l_163)
+ { /* block id: 38 */
+ int32_t l_175 = 0x58B35087L;
+ int8_t *l_186 = &g_9;
+ int16_t *l_189[8][1][3] = {{{&l_149,&g_92,&g_92}},{{&g_92,&l_149,&l_149}},{{&l_149,&g_92,&g_92}},{{&g_92,&l_149,&l_149}},{{&l_149,&g_92,&g_92}},{{&g_92,&l_149,&l_149}},{{&l_149,&g_92,&g_92}},{{&g_92,&l_149,&l_149}}};
+ int32_t l_190 = 4L;
+ uint8_t **l_198 = &l_159[5][1][1];
+ uint8_t *l_201 = &g_94;
+ union U2 *l_207 = &g_23;
+ uint32_t *l_219[5] = {&g_27,&g_27,&g_27,&g_27,&g_27};
+ uint32_t *l_263 = &g_27;
+ int i, j, k;
+ (*l_160) = (((safe_lshift_func_int16_t_s_u(l_165[1][2], (safe_lshift_func_int8_t_s_s(((l_175 == ((safe_lshift_func_uint16_t_u_s((safe_mod_func_int8_t_s_s((safe_lshift_func_int16_t_s_s(((((-2L) | (safe_sub_func_int16_t_s_s((safe_mod_func_uint16_t_u_u((l_186 == p_46), (l_190 = (4UL | ((safe_mul_func_int8_t_s_s((*l_160), 0xE7L)) != 4294967295UL))))), 1L))) < (*p_48)) | l_168), l_175)), 0x48L)), 10)) ^ (*g_10))) | (*p_48)), l_175)))) , (*g_146)) != 0x7572L);
+ if ((safe_mul_func_uint8_t_u_u(((((-9L) && ((((g_193 , (l_194 = g_23)) , (((l_195 ^ (safe_mod_func_int16_t_s_s(((((*l_198) = &g_96) == (l_194 , (void*)0)) & (((safe_mul_func_int8_t_s_s(((*p_48) | ((*l_201) = 1UL)), g_27)) ^ g_27) != g_130[0][5])), g_193.f3))) || 0xACL) , l_194)) , l_195) != l_175)) != g_96) < 4UL), (*p_48))))
+ { /* block id: 44 */
+ struct S1 **l_204 = &g_202[1][9];
+ union U2 *l_208[5][1][10] = {{{&g_23,&g_23,&l_194,&g_23,(void*)0,&l_194,&g_23,&g_23,&l_194,(void*)0}},{{&l_194,&g_23,&g_23,&l_194,&l_194,&l_194,&g_23,&g_23,(void*)0,&g_23}},{{&l_194,&l_194,&g_23,&l_194,&g_23,&l_194,&g_23,&l_194,&g_23,&l_194}},{{&g_23,(void*)0,&g_23,&g_23,(void*)0,&g_23,&g_23,&l_194,&l_194,&l_194}},{{&l_194,&g_23,&l_194,&g_23,&l_194,(void*)0,(void*)0,&l_194,&g_23,&l_194}}};
+ int32_t l_210 = 1L;
+ int32_t l_225 = 0x90807700L;
+ int i, j, k;
+ (*l_204) = g_202[4][9];
+ for (g_82 = (-22); (g_82 < 17); g_82++)
+ { /* block id: 48 */
+ uint32_t l_209 = 0x1A28751EL;
+ l_208[0][0][0] = l_207;
+ l_190 = (!(l_210 = l_209));
+ }
+ (*l_160) &= 0xBCAB29ADL;
+ (*p_47) = ((l_165[1][6] &= (safe_add_func_uint32_t_u_u(((((safe_sub_func_uint8_t_u_u(((safe_div_func_int8_t_s_s((safe_lshift_func_uint8_t_u_s((*l_160), (*p_48))), g_94)) | (l_219[2] == &g_27)), (l_225 |= (((*p_47) > (safe_div_func_int8_t_s_s(l_210, l_164))) ^ (safe_mod_func_uint16_t_u_u(((l_224 , (*p_47)) | (*l_160)), g_94)))))) & g_27) == l_210) > 9UL), 0x54DDF528L))) > l_194.f0);
+ }
+ else
+ { /* block id: 57 */
+ int16_t l_237 = 0x7730L;
+ uint8_t l_246 = 1UL;
+ int32_t l_247 = 1L;
+ uint16_t *l_252 = &g_203.f3.f1;
+ struct S1 l_264 = {-1L,0L,0UL,{0x4C04L,0UL,65535UL,0x3C41L,0x23L},1UL};
+ uint32_t *l_273 = (void*)0;
+ uint32_t *l_274 = &g_275[5][2];
+ for (g_203.f1 = 0; (g_203.f1 <= 0); g_203.f1 += 1)
+ { /* block id: 60 */
+ return p_47;
+ }
+ if ((safe_mod_func_int8_t_s_s((l_228 , (safe_sub_func_uint8_t_u_u(((safe_lshift_func_uint8_t_u_u((safe_mul_func_int16_t_s_s((g_92 = (safe_div_func_uint8_t_u_u((&g_133[0] != ((l_237 && (l_190 && (l_247 ^= (l_246 = (!(0x5600L <= (((safe_unary_minus_func_uint32_t_u((safe_mod_func_uint16_t_u_u(((safe_lshift_func_uint8_t_u_u((safe_lshift_func_uint8_t_u_s(g_140, (*p_48))), ((*l_201) = (~(((void*)0 == &p_48) == (*p_47)))))) && 0x43L), l_245)))) > (*p_47)) >= l_237))))))) , &p_47)), (*l_160)))), 0L)), g_132)) & g_140), 0x38L))), 4UL)))
+ { /* block id: 67 */
+ uint8_t l_262 = 0x79L;
+ (*p_47) = (l_262 &= (l_246 || ((safe_lshift_func_uint8_t_u_s((safe_mod_func_uint16_t_u_u(((void*)0 == l_252), (l_246 && (*g_146)))), (l_190 | (g_146 != ((safe_add_func_int8_t_s_s((safe_rshift_func_int16_t_s_s((safe_mod_func_int16_t_s_s((safe_mul_func_uint16_t_u_u((l_261[3][8] , l_149), 0x2EB2L)), (*l_160))), l_190)), l_246)) , (void*)0))))) >= g_132)));
+ }
+ else
+ { /* block id: 70 */
+ return p_47;
+ }
+ (*l_160) = ((((l_165[1][6] = l_237) , (l_263 != (((!0xDFC7L) && ((((*l_274) = (l_264 , ((safe_add_func_int8_t_s_s(0x54L, (safe_lshift_func_uint16_t_u_u((safe_mul_func_int8_t_s_s((safe_add_func_int32_t_s_s((l_189[4][0][0] != ((l_165[1][6] , l_264.f3) , &g_92)), (*p_47))), 0L)), (*g_146))))) , 0xF01E3291L))) , (void*)0) == (void*)0)) , (void*)0))) != l_237) == (*p_47));
+ }
+ }
+ else
+ { /* block id: 77 */
+ uint32_t l_276 = 18446744073709551615UL;
+ int32_t **l_281 = &g_28[2];
+ int8_t *l_292[9][7][4] = {{{(void*)0,&l_261[3][8].f0,&g_203.f0,&l_261[3][8].f0},{&l_261[3][8].f0,&l_261[3][8].f0,&g_203.f0,&l_261[3][8].f0},{(void*)0,&l_261[3][8].f0,&g_203.f0,&l_261[3][8].f0},{&g_203.f0,&l_261[3][8].f0,(void*)0,&g_203.f0},{&l_261[3][8].f0,&l_195,&g_203.f0,&l_195},{(void*)0,&l_261[3][8].f0,&l_195,&l_195},{&l_261[3][8].f0,&l_261[3][8].f0,&l_261[3][8].f0,&g_203.f0}},{{&l_195,(void*)0,&g_203.f0,&g_203.f0},{&l_195,&l_261[3][8].f0,&l_261[3][8].f0,&g_203.f0},{&l_261[3][8].f0,&g_203.f0,&l_195,(void*)0},{(void*)0,&g_203.f0,&g_203.f0,&g_203.f0},{&l_261[3][8].f0,&l_261[3][8].f0,(void*)0,&l_195},{&g_203.f0,&l_195,&g_203.f0,&l_261[3][8].f0},{(void*)0,(void*)0,&g_203.f0,&g_203.f0}},{{&l_261[3][8].f0,(void*)0,&g_203.f0,&l_261[3][8].f0},{(void*)0,&l_195,&l_195,&l_195},{&l_195,&l_261[3][8].f0,&l_195,&g_203.f0},{&g_203.f0,&g_203.f0,&g_203.f0,(void*)0},{&g_203.f0,&g_203.f0,&l_261[3][8].f0,&g_203.f0},{&g_203.f0,&l_261[3][8].f0,&l_261[3][8].f0,&g_203.f0},{(void*)0,(void*)0,&l_261[3][8].f0,&g_203.f0}},{{&g_203.f0,&l_261[3][8].f0,&l_261[3][8].f0,&l_195},{&g_203.f0,&l_261[3][8].f0,&g_203.f0,&l_195},{&g_203.f0,&l_195,&l_195,&g_203.f0},{&l_195,&l_261[3][8].f0,&l_195,&l_261[3][8].f0},{(void*)0,&l_261[3][8].f0,&g_203.f0,&l_261[3][8].f0},{&l_261[3][8].f0,&l_261[3][8].f0,&g_203.f0,&l_261[3][8].f0},{(void*)0,&l_261[3][8].f0,&g_203.f0,&l_261[3][8].f0}},{{&g_203.f0,&l_261[3][8].f0,(void*)0,&g_203.f0},{&l_261[3][8].f0,&l_195,&g_203.f0,&l_195},{(void*)0,&l_261[3][8].f0,&l_195,&l_195},{&l_261[3][8].f0,&l_261[3][8].f0,&l_261[3][8].f0,&g_203.f0},{&l_195,(void*)0,&g_203.f0,&g_203.f0},{&l_195,&l_261[3][8].f0,&l_261[3][8].f0,&g_203.f0},{&l_261[3][8].f0,&g_203.f0,&l_195,(void*)0}},{{(void*)0,&g_203.f0,&g_203.f0,&g_203.f0},{&l_261[3][8].f0,&l_261[3][8].f0,(void*)0,&l_195},{&g_203.f0,&l_195,&g_203.f0,&l_261[3][8].f0},{(void*)0,(void*)0,&g_203.f0,&g_203.f0},{&l_261[3][8].f0,(void*)0,&g_203.f0,&l_261[3][8].f0},{(void*)0,&l_195,&l_195,&l_195},{&l_195,(void*)0,&g_203.f0,&g_203.f0}},{{&l_261[3][8].f0,&l_261[3][8].f0,&l_261[3][8].f0,&l_195},{&l_195,&g_203.f0,(void*)0,&l_261[3][8].f0},{&g_203.f0,(void*)0,&l_261[3][8].f0,&g_203.f0},{&l_195,&l_261[3][8].f0,&l_261[3][8].f0,&l_195},{&g_203.f0,(void*)0,(void*)0,(void*)0},{&l_195,&l_195,&l_261[3][8].f0,&g_203.f0},{&l_261[3][8].f0,&g_203.f0,&g_203.f0,&l_261[3][8].f0}},{{&l_261[3][8].f0,&g_203.f0,(void*)0,(void*)0},{&l_195,&g_203.f0,&l_195,&l_261[3][8].f0},{&l_261[3][8].f0,(void*)0,&g_203.f0,&l_261[3][8].f0},{&g_203.f0,&g_203.f0,&l_261[3][8].f0,(void*)0},{&g_203.f0,&g_203.f0,&l_195,&l_261[3][8].f0},{(void*)0,&g_203.f0,&g_203.f0,&g_203.f0},{&l_195,&l_195,&l_261[3][8].f0,(void*)0}},{{&l_195,(void*)0,&g_203.f0,&l_195},{&l_195,&l_261[3][8].f0,&l_261[3][8].f0,&g_203.f0},{&l_195,(void*)0,&g_203.f0,&l_261[3][8].f0},{&l_195,&g_203.f0,&l_261[3][8].f0,&l_195},{&l_195,&l_261[3][8].f0,&g_203.f0,&g_203.f0},{(void*)0,(void*)0,&l_195,&l_261[3][8].f0},{&g_203.f0,&l_261[3][8].f0,&l_261[3][8].f0,&g_203.f0}}};
+ int32_t l_293 = 0xAF17BE23L;
+ struct S1 l_339 = {3L,0xC6CD4D1FL,0x97B2L,{-1L,65534UL,0xDC6FL,0x8F73L,3UL},0x1D13L};
+ int32_t ***l_350 = &l_348[0];
+ int i, j, k;
+ if ((((l_293 = ((((l_276 &= (*g_146)) || (safe_sub_func_uint16_t_u_u((~(((*g_146) = ((safe_lshift_func_uint8_t_u_s(((((*p_48) = (l_281 == &p_47)) | (l_165[0][4] |= (g_96 || (safe_div_func_uint8_t_u_u(g_193.f0, (safe_sub_func_uint16_t_u_u(((safe_sub_func_int32_t_s_s((((((safe_add_func_uint32_t_u_u(((void*)0 != &g_27), (safe_div_func_int16_t_s_s(1L, (((0xFA23E02CL == l_164) >= g_141[3][0]) ^ g_275[5][2]))))) , &l_194) != &l_194) , &l_245) != p_47), (-9L))) ^ l_261[3][8].f1), g_203.f3.f0))))))) || l_158), 7)) != g_23.f2)) , 0x8DBAL)), l_261[3][8].f3.f4))) , &l_261[2][7]) == (void*)0)) , g_203.f3.f4) < l_261[3][8].f3.f2))
+ { /* block id: 83 */
+ union U2 l_299[9][3][7] = {{{{-6L},{0x7F560B45L},{0x7F560B45L},{-6L},{-6L},{0x7F560B45L},{0x7F560B45L}},{{0x193143B8L},{0x52F59610L},{0x193143B8L},{0x52F59610L},{0x193143B8L},{0x52F59610L},{0x193143B8L}},{{-6L},{-6L},{0x7F560B45L},{0x7F560B45L},{-6L},{-6L},{0x7F560B45L}}},{{{0L},{0x52F59610L},{0L},{0x52F59610L},{0L},{0x52F59610L},{0L}},{{-6L},{0x7F560B45L},{0x7F560B45L},{-6L},{-6L},{0x7F560B45L},{0x7F560B45L}},{{0x193143B8L},{0x52F59610L},{0x193143B8L},{0x52F59610L},{0x193143B8L},{0x52F59610L},{0x193143B8L}}},{{{-6L},{-6L},{0x7F560B45L},{0x7F560B45L},{-6L},{-6L},{0x7F560B45L}},{{0L},{0x52F59610L},{0L},{0x52F59610L},{0L},{0x52F59610L},{0L}},{{-6L},{0x7F560B45L},{0x7F560B45L},{-6L},{-6L},{0x7F560B45L},{0x7F560B45L}}},{{{0x193143B8L},{0x52F59610L},{0x193143B8L},{0x52F59610L},{0x193143B8L},{0x52F59610L},{0x193143B8L}},{{-6L},{-6L},{0x7F560B45L},{0x7F560B45L},{-6L},{-6L},{0x7F560B45L}},{{0L},{0x52F59610L},{0L},{0x52F59610L},{0L},{0x52F59610L},{0L}}},{{{-6L},{0x7F560B45L},{0x7F560B45L},{-6L},{-6L},{0x7F560B45L},{0x7F560B45L}},{{0x193143B8L},{0x52F59610L},{0x193143B8L},{0x52F59610L},{0x193143B8L},{0x52F59610L},{0x193143B8L}},{{-6L},{-6L},{0x7F560B45L},{0x7F560B45L},{-6L},{-6L},{0x7F560B45L}}},{{{0L},{0x52F59610L},{0L},{0x52F59610L},{0L},{0x52F59610L},{0L}},{{-6L},{0x7F560B45L},{0x7F560B45L},{-6L},{-6L},{0x7F560B45L},{0x7F560B45L}},{{0x193143B8L},{0x52F59610L},{0x193143B8L},{0x52F59610L},{0x193143B8L},{0x52F59610L},{0x193143B8L}}},{{{-6L},{-6L},{0x7F560B45L},{0x7F560B45L},{-6L},{-6L},{0x7F560B45L}},{{0L},{0x52F59610L},{0L},{0x52F59610L},{0L},{0x52F59610L},{0L}},{{-6L},{0x7F560B45L},{0x7F560B45L},{-6L},{-6L},{0x7F560B45L},{0x7F560B45L}}},{{{0x193143B8L},{0x52F59610L},{0x193143B8L},{0x52F59610L},{0x193143B8L},{0x52F59610L},{0x193143B8L}},{{-6L},{-6L},{0x7F560B45L},{0x7F560B45L},{-6L},{-6L},{0x7F560B45L}},{{0L},{0x52F59610L},{0L},{0x52F59610L},{0L},{0x52F59610L},{0L}}},{{{-6L},{0x7F560B45L},{0x7F560B45L},{-6L},{-6L},{0x7F560B45L},{0x7F560B45L}},{{0x193143B8L},{0x52F59610L},{0x193143B8L},{0x52F59610L},{0x193143B8L},{0x52F59610L},{0x193143B8L}},{{-6L},{-6L},{0x7F560B45L},{0x7F560B45L},{-6L},{-6L},{0x7F560B45L}}}};
+ int16_t *l_303[10][2][5] = {{{&l_167,&g_92,&l_149,&l_149,&g_92},{(void*)0,(void*)0,&l_149,&l_167,&l_149}},{{(void*)0,(void*)0,&l_167,(void*)0,&l_167},{&g_92,&g_92,&l_149,&l_167,&g_92}},{{(void*)0,&l_167,(void*)0,&g_92,(void*)0},{(void*)0,(void*)0,&g_92,&g_92,&l_149}},{{&l_167,(void*)0,(void*)0,&l_167,(void*)0},{&g_92,&g_92,&l_149,(void*)0,&g_92}},{{(void*)0,(void*)0,&l_167,&l_167,&l_167},{(void*)0,(void*)0,(void*)0,&l_149,&l_167}},{{&g_92,&l_167,&l_149,&g_92,&g_92},{(void*)0,&g_92,&g_92,&g_92,(void*)0}},{{(void*)0,(void*)0,&l_149,&g_92,&l_149},{&g_92,(void*)0,(void*)0,&g_92,(void*)0}},{{&g_92,&g_92,&l_167,(void*)0,&g_92},{(void*)0,(void*)0,&l_149,&l_149,&l_167}},{{(void*)0,(void*)0,(void*)0,(void*)0,&l_149},{&g_92,&g_92,&g_92,&g_92,&g_92}},{{(void*)0,&g_92,(void*)0,&g_92,(void*)0},{(void*)0,(void*)0,&l_149,&g_92,&l_167}}};
+ int32_t l_304 = (-1L);
+ int i, j, k;
+ (*p_47) |= (l_162 < ((l_304 |= (((safe_mul_func_int8_t_s_s((*p_48), (safe_mod_func_int8_t_s_s((l_298 == &g_133[0]), ((l_228 , l_299[6][2][1]) , (safe_add_func_uint16_t_u_u(l_302, (((void*)0 != &p_47) && l_299[6][2][1].f2)))))))) != (*g_146)) , g_193.f2)) <= (*g_146)));
+ }
+ else
+ { /* block id: 86 */
+ int32_t *l_309 = &g_203.f1;
+ int32_t l_318 = (-1L);
+ int16_t *l_319 = &g_92;
+ if (((safe_lshift_func_int16_t_s_u((l_318 = ((safe_sub_func_uint16_t_u_u((*g_146), (((*l_309) = (g_23 , g_94)) , g_193.f3))) == ((*l_319) = (safe_sub_func_uint16_t_u_u((*g_146), ((safe_lshift_func_int8_t_s_u(5L, 4)) == (safe_rshift_func_int8_t_s_s((safe_lshift_func_int8_t_s_s(((0x4268F694L ^ l_318) <= g_96), (*p_48))), 5)))))))), 2)) != 0x143FL))
+ { /* block id: 90 */
+ int16_t l_335 = 1L;
+ int32_t l_338 = 0L;
+ (*l_281) = &g_29;
+ for (g_203.f0 = 0; (g_203.f0 >= 22); ++g_203.f0)
+ { /* block id: 94 */
+ uint8_t l_328[2];
+ int i;
+ for (i = 0; i < 2; i++)
+ l_328[i] = 0x73L;
+ l_338 &= ((((*g_146)++) > (0xCFFAL > ((0xDCFD5DADL != (safe_mul_func_uint8_t_u_u((~(g_96 = g_132)), ((safe_lshift_func_uint16_t_u_s((g_275[5][1] < l_328[1]), 10)) | (~((safe_sub_func_int32_t_s_s((*p_47), ((safe_mod_func_int32_t_s_s(0x7B9BFE1BL, ((safe_rshift_func_uint16_t_u_s((l_335 <= ((safe_rshift_func_uint8_t_u_u((g_141[0][1] = g_203.f3.f4), g_27)) || g_140)), g_193.f4)) && (*p_47)))) ^ 0x9CL))) == 0x78C5L)))))) || (-8L)))) == g_203.f3.f4);
+ return &g_82;
+ }
+ }
+ else
+ { /* block id: 101 */
+ uint32_t l_344[4][4][4] = {{{4294967295UL,0x20A336BFL,0x508F9594L,0x20A336BFL},{1UL,0x4B5B738DL,1UL,0xFAAC7D03L},{0x20A336BFL,1UL,0xC65866FCL,0xFD1D0127L},{1UL,0x1FDA686FL,4294967286UL,4294967295UL}},{{1UL,0UL,0xC65866FCL,4294967286UL},{0x20A336BFL,4294967295UL,1UL,0x005F1C4FL},{0x005F1C4FL,4294967295UL,4294967295UL,4294967295UL},{1UL,1UL,0x005F1C4FL,1UL}},{{4294967295UL,4294967294UL,4294967286UL,0xC65866FCL},{0x508F9594L,0x005F1C4FL,4294967295UL,4294967286UL},{0UL,0x005F1C4FL,0xFD1D0127L,0xC65866FCL},{0x005F1C4FL,4294967294UL,0xFAAC7D03L,1UL}},{{0x05C4B03AL,1UL,0xBED9113FL,4294967295UL},{4294967286UL,4294967295UL,4294967286UL,0x005F1C4FL},{0x4687D50BL,4294967295UL,0UL,4294967286UL},{6UL,0UL,0UL,4294967295UL}}};
+ int i, j, k;
+ if (((l_339 , (&g_33 != l_340)) != ((*p_48) = (-5L))))
+ { /* block id: 103 */
+ uint16_t l_341 = 0xCD7FL;
+ ++l_341;
+ }
+ else
+ { /* block id: 105 */
+ int8_t **l_347[4];
+ int i;
+ for (i = 0; i < 4; i++)
+ l_347[i] = &l_292[7][5][0];
+ l_344[1][0][2]++;
+ (*p_47) &= (l_344[0][1][3] , ((g_23 , g_275[4][1]) > (&g_9 == (p_48 = (void*)0))));
+ (*l_281) = p_47;
+ }
+ return &g_33;
+ }
+ }
+ (*l_340) = (*p_47);
+ (*l_350) = l_348[0];
+ for (l_164 = (-28); (l_164 < (-6)); l_164 = safe_add_func_uint32_t_u_u(l_164, 6))
+ { /* block id: 118 */
+ struct S1 **l_354 = &g_202[4][9];
+ (*l_354) = l_353[0][4][1];
+ }
+ }
+ }
+ else
+ { /* block id: 122 */
+ uint32_t l_355[5][5] = {{1UL,0x1EFE6392L,0x1EFE6392L,1UL,0x1EFE6392L},{1UL,1UL,1UL,1UL,1UL},{0x1EFE6392L,1UL,0x1EFE6392L,0x1EFE6392L,1UL},{1UL,0x08136386L,0x08136386L,1UL,0x08136386L},{1UL,1UL,4294967294UL,1UL,1UL}};
+ int32_t l_369 = 0L;
+ struct S1 l_370 = {0x0FL,0x1D359E28L,0x2098L,{-1L,0UL,65535UL,0x21B8L,0x91L},0UL};
+ uint8_t l_371 = 5UL;
+ int32_t *l_372 = &l_164;
+ int32_t *l_373 = &l_369;
+ int16_t *l_385[4];
+ int32_t l_386 = 0x87316FB4L;
+ int32_t l_387[9] = {0x4A002CF8L,0x4A002CF8L,0x4A002CF8L,0x4A002CF8L,0x4A002CF8L,0x4A002CF8L,0x4A002CF8L,0x4A002CF8L,0x4A002CF8L};
+ int8_t **l_402 = &g_10;
+ int8_t l_408 = (-2L);
+ uint32_t *l_459[7] = {&l_384,&l_384,&l_384,&l_384,&l_384,&l_384,&l_384};
+ union U2 l_506 = {-1L};
+ uint32_t * const l_541 = (void*)0;
+ uint32_t * const *l_540 = &l_541;
+ int8_t l_551 = (-7L);
+ int32_t l_562 = 0x7B63C334L;
+ int16_t l_572[2];
+ uint32_t l_609[1][2][6] = {{{4294967295UL,4294967295UL,4294967295UL,4294967295UL,4294967295UL,4294967295UL},{4294967295UL,4294967295UL,4294967295UL,4294967295UL,4294967295UL,4294967295UL}}};
+ uint32_t l_610 = 0xA2210773L;
+ uint16_t **l_617[5][10][2] = {{{&g_522,&g_522},{&g_522,&g_522},{&g_522,&g_522},{&g_522,&g_522},{&g_522,&g_522},{&g_522,&g_522},{&g_522,&g_522},{&g_522,&g_522},{&g_522,&g_522},{&g_522,&g_522}},{{&g_522,&g_522},{&g_522,&g_522},{&g_522,&g_522},{&g_522,&g_522},{&g_522,&g_522},{&g_522,&g_522},{&g_522,&g_522},{&g_522,&g_522},{&g_522,&g_522},{&g_522,&g_522}},{{&g_522,&g_522},{&g_522,&g_522},{&g_522,&g_522},{&g_522,&g_522},{&g_522,&g_522},{&g_522,&g_522},{&g_522,&g_522},{&g_522,&g_522},{&g_522,&g_522},{&g_522,&g_522}},{{&g_522,&g_522},{&g_522,&g_522},{&g_522,&g_522},{&g_522,&g_522},{&g_522,&g_522},{&g_522,&g_522},{&g_522,&g_522},{&g_522,&g_522},{&g_522,&g_522},{&g_522,&g_522}},{{&g_522,&g_522},{&g_522,&g_522},{&g_522,&g_522},{&g_522,&g_522},{&g_522,&g_522},{&g_522,&g_522},{&g_522,&g_522},{&g_522,&g_522},{&g_522,&g_522},{&g_522,&g_522}}};
+ uint32_t l_622[8][10][3] = {{{4294967288UL,0xD980B936L,0UL},{0xCFF7DF80L,0xC6F50153L,4294967295UL},{4294967288UL,0x189C563AL,0xA0DDD608L},{0xB9019512L,5UL,1UL},{0UL,0xA209FE77L,0xF6C96FF1L},{0xF25DA586L,5UL,0xB9019512L},{0x55FB34F6L,9UL,0xA11D72F8L},{0x5C6871E7L,4294967290UL,0xB9019512L},{0UL,0xF6C96FF1L,0xF6C96FF1L},{0UL,0xE1B43826L,1UL}},{{4294967295UL,8UL,0xA0DDD608L},{0x35DA2F23L,1UL,4294967295UL},{0xA0DDD608L,0x55FB34F6L,0UL},{1UL,1UL,0x182BD3A5L},{0xD980B936L,8UL,0xD980B936L},{4294967287UL,0xE1B43826L,0xF25DA586L},{0xA209FE77L,0xF6C96FF1L,4294967288UL},{0x182BD3A5L,4294967290UL,4294967295UL},{0x29A9BD62L,9UL,0x15D08CC1L},{0x182BD3A5L,5UL,0x5C6871E7L}},{{0xA209FE77L,0xA209FE77L,8UL},{4294967287UL,5UL,1UL},{0xD980B936L,0x189C563AL,0xA209FE77L},{1UL,0xC6F50153L,0x48801177L},{0xA0DDD608L,0xD980B936L,0xA209FE77L},{0x35DA2F23L,0x2BCB943DL,1UL},{4294967295UL,0x29A9BD62L,8UL},{0UL,0xC6555B24L,0x5C6871E7L},{0UL,0UL,0x15D08CC1L},{0x5C6871E7L,7UL,4294967295UL}},{{0x55FB34F6L,0UL,4294967288UL},{0xF25DA586L,0xC6555B24L,0xF25DA586L},{0UL,0x29A9BD62L,0xD980B936L},{0xB9019512L,0x2BCB943DL,0x182BD3A5L},{4294967288UL,0xD980B936L,0UL},{0xCFF7DF80L,0xC6F50153L,4294967295UL},{4294967288UL,0x189C563AL,0xA0DDD608L},{0xB9019512L,5UL,1UL},{0UL,0xA209FE77L,0xF6C96FF1L},{0xF25DA586L,5UL,0xB9019512L}},{{0x55FB34F6L,9UL,0xA11D72F8L},{0x5C6871E7L,4294967290UL,0xB9019512L},{0UL,0xF6C96FF1L,0xF6C96FF1L},{0UL,0xE1B43826L,1UL},{4294967295UL,8UL,0xA0DDD608L},{0x35DA2F23L,1UL,4294967295UL},{0xA0DDD608L,0x55FB34F6L,0UL},{1UL,1UL,0x182BD3A5L},{0xD980B936L,8UL,0xD980B936L},{4294967287UL,0xE1B43826L,0xF25DA586L}},{{0xA209FE77L,0xF6C96FF1L,4294967288UL},{0x182BD3A5L,4294967290UL,4294967295UL},{0x29A9BD62L,9UL,0x15D08CC1L},{0x182BD3A5L,5UL,0x5C6871E7L},{0xA209FE77L,0xA209FE77L,8UL},{4294967287UL,5UL,1UL},{0xD980B936L,0x189C563AL,0xA0DDD608L},{0xDF803319L,7UL,0x182BD3A5L},{0x29A9BD62L,0x23F5EC66L,0xA0DDD608L},{0UL,6UL,4294967295UL}},{{0x15D08CC1L,0UL,9UL},{4294967295UL,0xC6F50153L,0xCFF7DF80L},{4294967295UL,0xF6C96FF1L,0UL},{0xCFF7DF80L,5UL,0x48801177L},{0x189C563AL,0xF6C96FF1L,0xD980B936L},{4294967290UL,0xC6F50153L,4294967290UL},{0xF6C96FF1L,0UL,0x23F5EC66L},{0x5C6871E7L,6UL,0xF25DA586L},{0xD980B936L,0x23F5EC66L,0xA11D72F8L},{0x35DA2F23L,7UL,4294967287UL}},{{0xD980B936L,0xA209FE77L,0x29A9BD62L},{0x5C6871E7L,4294967295UL,0x66955C2CL},{0xF6C96FF1L,0xA0DDD608L,0UL},{4294967290UL,5UL,0x5C6871E7L},{0x189C563AL,0x55FB34F6L,4294967288UL},{0xCFF7DF80L,0xC30C919DL,0x5C6871E7L},{4294967295UL,0UL,0UL},{4294967295UL,0xC0A101CBL,0x66955C2CL},{0x15D08CC1L,9UL,0x29A9BD62L},{0UL,0x2BCB943DL,4294967287UL}}};
+ uint8_t l_625 = 1UL;
+ struct S0 **l_789 = &l_660;
+ int i, j, k;
+ for (i = 0; i < 4; i++)
+ l_385[i] = &l_149;
+ for (i = 0; i < 2; i++)
+ l_572[i] = 0xCE21L;
+ l_369 = (l_355[1][4] >= (safe_mod_func_int8_t_s_s((g_140 >= (((3UL & g_275[4][2]) | (safe_mod_func_uint32_t_u_u((safe_rshift_func_int16_t_s_u(((void*)0 == g_362[1][2]), (l_261[3][8].f3.f2 ^ ((*g_10) , ((((((*p_47) = (safe_mul_func_uint8_t_u_u((((0xA0C97CF4L < (*p_47)) >= 0xA05A7788L) < g_367), 1L))) && g_203.f1) < g_368[5][5][0]) >= l_355[2][0]) == l_355[1][4]))))), g_130[0][5]))) == l_355[3][0])), (*p_48))));
+ (*l_373) &= ((l_370 , l_371) <= (((*p_47) = (*p_47)) <= ((*l_372) = (-3L))));
+ }
+ return &g_29;
+}
+
+
+/* ------------------------------------------ */
+/*
+ * reads : g_9 g_82 g_33 g_92 g_23.f2 g_94 g_96 g_23 g_27 g_28 g_141 g_448
+ * writes: g_82 g_92 g_96 g_9 g_27 g_131 g_133 g_141 g_448
+ */
+static int32_t * func_50(uint32_t p_51, int8_t p_52, int8_t p_53, int8_t * p_54, const int32_t p_55)
+{ /* block id: 13 */
+ int8_t *l_81[10] = {&g_9,&g_9,&g_9,&g_9,&g_9,&g_9,&g_9,&g_9,&g_9,&g_9};
+ int16_t *l_91 = &g_92;
+ int32_t l_93 = (-8L);
+ uint8_t *l_95 = &g_96;
+ union U2 l_107 = {0x2706CD28L};
+ int32_t l_113 = (-3L);
+ struct S1 l_114 = {8L,0x07506916L,0x6519L,{0xCEA1L,0UL,65531UL,0x6711L,251UL},1UL};
+ const uint16_t l_127 = 0UL;
+ int32_t *l_135 = &l_113;
+ int32_t *l_136 = (void*)0;
+ int32_t *l_137 = (void*)0;
+ int32_t *l_138 = &l_113;
+ int32_t *l_139[6] = {(void*)0,&g_82,(void*)0,(void*)0,&g_82,(void*)0};
+ int i;
+ l_93 = (safe_add_func_uint16_t_u_u(p_52, ((((safe_lshift_func_int16_t_s_u(((safe_div_func_int8_t_s_s((g_82 &= (*p_54)), (*p_54))) >= ((safe_mod_func_int8_t_s_s(((void*)0 != &p_53), (safe_add_func_int32_t_s_s((-3L), 0x3BD055D5L)))) <= 0x5DL)), 14)) ^ ((*l_95) |= (safe_mul_func_int8_t_s_s(((safe_rshift_func_int8_t_s_u(((((((*l_91) ^= g_33) | 0xA63FL) , l_93) >= l_93) > l_93), g_23.f2)) , g_94), 0xC7L)))) != l_93) , g_96)));
+ if (p_51)
+ { /* block id: 18 */
+ int8_t **l_108[6] = {&l_81[4],&l_81[9],&l_81[4],&l_81[4],&l_81[9],&l_81[4]};
+ struct S1 l_109 = {-3L,0xD4E8C809L,0x47BFL,{2L,0x3CBAL,0UL,65535UL,255UL},0xD01BL};
+ uint16_t *l_110 = &l_107.f2;
+ int32_t *l_111 = &l_93;
+ int32_t *l_112[8] = {(void*)0,(void*)0,(void*)0,(void*)0,(void*)0,(void*)0,(void*)0,(void*)0};
+ uint32_t *l_125 = &g_27;
+ uint8_t *l_126 = (void*)0;
+ const int32_t *l_129 = &g_130[0][5];
+ const int32_t **l_128[9][6][4] = {{{&l_129,(void*)0,(void*)0,&l_129},{&l_129,&l_129,(void*)0,(void*)0},{(void*)0,&l_129,&l_129,(void*)0},{(void*)0,(void*)0,(void*)0,(void*)0},{&l_129,(void*)0,(void*)0,(void*)0},{&l_129,(void*)0,&l_129,(void*)0}},{{(void*)0,(void*)0,(void*)0,(void*)0},{&l_129,&l_129,(void*)0,(void*)0},{(void*)0,&l_129,&l_129,&l_129},{&l_129,(void*)0,(void*)0,&l_129},{&l_129,&l_129,(void*)0,(void*)0},{(void*)0,&l_129,&l_129,(void*)0}},{{(void*)0,(void*)0,(void*)0,(void*)0},{&l_129,(void*)0,(void*)0,(void*)0},{&l_129,(void*)0,&l_129,(void*)0},{(void*)0,(void*)0,(void*)0,(void*)0},{&l_129,&l_129,(void*)0,(void*)0},{(void*)0,&l_129,&l_129,&l_129}},{{&l_129,(void*)0,(void*)0,&l_129},{&l_129,&l_129,(void*)0,(void*)0},{(void*)0,&l_129,&l_129,(void*)0},{(void*)0,(void*)0,(void*)0,(void*)0},{&l_129,(void*)0,(void*)0,&l_129},{(void*)0,(void*)0,&l_129,&l_129}},{{&l_129,&l_129,&l_129,&l_129},{(void*)0,(void*)0,&l_129,&l_129},{&l_129,(void*)0,&l_129,(void*)0},{(void*)0,&l_129,(void*)0,(void*)0},{(void*)0,(void*)0,&l_129,&l_129},{&l_129,(void*)0,&l_129,&l_129}},{{&l_129,&l_129,&l_129,&l_129},{(void*)0,(void*)0,(void*)0,&l_129},{(void*)0,(void*)0,&l_129,&l_129},{&l_129,&l_129,&l_129,&l_129},{(void*)0,(void*)0,&l_129,&l_129},{&l_129,(void*)0,&l_129,(void*)0}},{{(void*)0,&l_129,(void*)0,(void*)0},{(void*)0,(void*)0,&l_129,&l_129},{&l_129,(void*)0,&l_129,&l_129},{&l_129,&l_129,&l_129,&l_129},{(void*)0,(void*)0,(void*)0,&l_129},{(void*)0,(void*)0,&l_129,&l_129}},{{&l_129,&l_129,&l_129,&l_129},{(void*)0,(void*)0,&l_129,&l_129},{&l_129,(void*)0,&l_129,(void*)0},{(void*)0,&l_129,(void*)0,(void*)0},{(void*)0,(void*)0,&l_129,&l_129},{&l_129,(void*)0,&l_129,&l_129}},{{&l_129,&l_129,&l_129,&l_129},{(void*)0,(void*)0,(void*)0,&l_129},{(void*)0,(void*)0,&l_129,&l_129},{&l_129,&l_129,&l_129,&l_129},{(void*)0,(void*)0,&l_129,&l_129},{&l_129,(void*)0,&l_129,(void*)0}}};
+ int i, j, k;
+ l_113 = ((*l_111) = (safe_mul_func_uint8_t_u_u((safe_lshift_func_uint16_t_u_u(((p_51 , ((*l_110) = (safe_rshift_func_int8_t_s_u((((*p_54) = (safe_mul_func_uint16_t_u_u(g_92, 0L))) & (safe_mul_func_int16_t_s_s(((0xF9L < (g_23 , (l_107 , ((l_81[9] = (void*)0) == &p_53)))) != ((((l_109 , &p_55) == &g_29) < 250UL) != l_109.f3.f2)), 65533UL))), l_109.f3.f0)))) & l_109.f3.f2), 5)), l_93)));
+ g_133[0] = (g_131 = func_16(l_114, (((void*)0 == p_54) != (((safe_mul_func_uint8_t_u_u(((safe_rshift_func_uint8_t_u_u(((safe_mul_func_uint16_t_u_u((((safe_mul_func_uint16_t_u_u(p_52, ((*p_54) == (((l_113 |= (l_109.f3 , ((*l_95) = (g_23.f2 <= (safe_add_func_int32_t_s_s(l_107.f2, (((+(((*l_125) ^= (l_91 == (void*)0)) <= p_55)) & 0x47876926L) , p_52))))))) ^ (*p_54)) ^ 0L)))) != 4294967288UL) <= p_53), l_114.f0)) & 0xEB91146BL), 2)) < p_51), 255UL)) , p_51) ^ l_127)), &g_9, g_23));
+ }
+ else
+ { /* block id: 29 */
+ int32_t *l_134 = &g_33;
+ return l_134;
+ }
+ ++g_141[5][6];
+ return &g_82;
+}
+
+
+
+
+/* ---------------------------------------- */
+int main (int argc, char* argv[])
+{
+ int i, j, k;
+ int print_hash_value = 0;
+ if (argc == 2 && strcmp(argv[1], "1") == 0) print_hash_value = 1;
+ platform_main_begin();
+ crc32_gentab();
+ func_1();
+ transparent_crc(g_9, "g_9", print_hash_value);
+ transparent_crc(g_23.f2, "g_23.f2", print_hash_value);
+ transparent_crc(g_27, "g_27", print_hash_value);
+ transparent_crc(g_29, "g_29", print_hash_value);
+ transparent_crc(g_33, "g_33", print_hash_value);
+ transparent_crc(g_82, "g_82", print_hash_value);
+ transparent_crc(g_92, "g_92", print_hash_value);
+ transparent_crc(g_94, "g_94", print_hash_value);
+ transparent_crc(g_96, "g_96", print_hash_value);
+ for (i = 0; i < 8; i++)
+ {
+ for (j = 0; j < 6; j++)
+ {
+ transparent_crc(g_130[i][j], "g_130[i][j]", print_hash_value);
+ if (print_hash_value) printf("index = [%d][%d]\n", i, j);
+
+ }
+ }
+ transparent_crc(g_132, "g_132", print_hash_value);
+ transparent_crc(g_140, "g_140", print_hash_value);
+ for (i = 0; i < 6; i++)
+ {
+ for (j = 0; j < 7; j++)
+ {
+ transparent_crc(g_141[i][j], "g_141[i][j]", print_hash_value);
+ if (print_hash_value) printf("index = [%d][%d]\n", i, j);
+
+ }
+ }
+ transparent_crc(g_193.f0, "g_193.f0", print_hash_value);
+ transparent_crc(g_193.f1, "g_193.f1", print_hash_value);
+ transparent_crc(g_193.f2, "g_193.f2", print_hash_value);
+ transparent_crc(g_193.f3, "g_193.f3", print_hash_value);
+ transparent_crc(g_193.f4, "g_193.f4", print_hash_value);
+ transparent_crc(g_203.f0, "g_203.f0", print_hash_value);
+ transparent_crc(g_203.f1, "g_203.f1", print_hash_value);
+ transparent_crc(g_203.f2, "g_203.f2", print_hash_value);
+ transparent_crc(g_203.f3.f0, "g_203.f3.f0", print_hash_value);
+ transparent_crc(g_203.f3.f1, "g_203.f3.f1", print_hash_value);
+ transparent_crc(g_203.f3.f2, "g_203.f3.f2", print_hash_value);
+ transparent_crc(g_203.f3.f3, "g_203.f3.f3", print_hash_value);
+ transparent_crc(g_203.f3.f4, "g_203.f3.f4", print_hash_value);
+ transparent_crc(g_203.f4, "g_203.f4", print_hash_value);
+ for (i = 0; i < 6; i++)
+ {
+ for (j = 0; j < 3; j++)
+ {
+ transparent_crc(g_275[i][j], "g_275[i][j]", print_hash_value);
+ if (print_hash_value) printf("index = [%d][%d]\n", i, j);
+
+ }
+ }
+ transparent_crc(g_367, "g_367", print_hash_value);
+ for (i = 0; i < 9; i++)
+ {
+ for (j = 0; j < 8; j++)
+ {
+ for (k = 0; k < 3; k++)
+ {
+ transparent_crc(g_368[i][j][k], "g_368[i][j][k]", print_hash_value);
+ if (print_hash_value) printf("index = [%d][%d][%d]\n", i, j, k);
+
+ }
+ }
+ }
+ for (i = 0; i < 4; i++)
+ {
+ for (j = 0; j < 6; j++)
+ {
+ for (k = 0; k < 6; k++)
+ {
+ transparent_crc(g_429[i][j][k].f0, "g_429[i][j][k].f0", print_hash_value);
+ transparent_crc(g_429[i][j][k].f1, "g_429[i][j][k].f1", print_hash_value);
+ transparent_crc(g_429[i][j][k].f2, "g_429[i][j][k].f2", print_hash_value);
+ transparent_crc(g_429[i][j][k].f3.f0, "g_429[i][j][k].f3.f0", print_hash_value);
+ transparent_crc(g_429[i][j][k].f3.f1, "g_429[i][j][k].f3.f1", print_hash_value);
+ transparent_crc(g_429[i][j][k].f3.f2, "g_429[i][j][k].f3.f2", print_hash_value);
+ transparent_crc(g_429[i][j][k].f3.f3, "g_429[i][j][k].f3.f3", print_hash_value);
+ transparent_crc(g_429[i][j][k].f3.f4, "g_429[i][j][k].f3.f4", print_hash_value);
+ transparent_crc(g_429[i][j][k].f4, "g_429[i][j][k].f4", print_hash_value);
+ if (print_hash_value) printf("index = [%d][%d][%d]\n", i, j, k);
+
+ }
+ }
+ }
+ transparent_crc(g_448, "g_448", print_hash_value);
+ transparent_crc(g_491, "g_491", print_hash_value);
+ transparent_crc(g_663.f0, "g_663.f0", print_hash_value);
+ transparent_crc(g_663.f1, "g_663.f1", print_hash_value);
+ transparent_crc(g_663.f2, "g_663.f2", print_hash_value);
+ transparent_crc(g_663.f3, "g_663.f3", print_hash_value);
+ transparent_crc(g_663.f4, "g_663.f4", print_hash_value);
+ for (i = 0; i < 9; i++)
+ {
+ for (j = 0; j < 3; j++)
+ {
+ transparent_crc(g_709[i][j], "g_709[i][j]", print_hash_value);
+ if (print_hash_value) printf("index = [%d][%d]\n", i, j);
+
+ }
+ }
+ transparent_crc(g_870, "g_870", print_hash_value);
+ transparent_crc(g_902, "g_902", print_hash_value);
+ transparent_crc(g_1001, "g_1001", print_hash_value);
+ transparent_crc(g_1007.f0, "g_1007.f0", print_hash_value);
+ transparent_crc(g_1007.f2, "g_1007.f2", print_hash_value);
+ transparent_crc(g_1359, "g_1359", print_hash_value);
+ transparent_crc(g_1361, "g_1361", print_hash_value);
+ for (i = 0; i < 9; i++)
+ {
+ transparent_crc(g_1473[i], "g_1473[i]", print_hash_value);
+ if (print_hash_value) printf("index = [%d]\n", i);
+
+ }
+ transparent_crc(g_1474, "g_1474", print_hash_value);
+ transparent_crc(g_1492, "g_1492", print_hash_value);
+ transparent_crc(g_1725, "g_1725", print_hash_value);
+ transparent_crc(g_1798, "g_1798", print_hash_value);
+ transparent_crc(g_2122, "g_2122", print_hash_value);
+ transparent_crc(g_2341, "g_2341", print_hash_value);
+ transparent_crc(g_2575, "g_2575", print_hash_value);
+ transparent_crc(g_2686.f0, "g_2686.f0", print_hash_value);
+ transparent_crc(g_2686.f1, "g_2686.f1", print_hash_value);
+ transparent_crc(g_2686.f2, "g_2686.f2", print_hash_value);
+ transparent_crc(g_2686.f3, "g_2686.f3", print_hash_value);
+ transparent_crc(g_2686.f4, "g_2686.f4", print_hash_value);
+ transparent_crc(g_2898, "g_2898", print_hash_value);
+ platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value);
+ return 0;
+}
+
+/************************ statistics *************************
+XXX max struct depth: 2
+breakdown:
+ depth: 0, occurrence: 717
+ depth: 1, occurrence: 16
+ depth: 2, occurrence: 33
+XXX total union variables: 30
+
+XXX non-zero bitfields defined in structs: 1
+XXX zero bitfields defined in structs: 1
+XXX const bitfields defined in structs: 0
+XXX volatile bitfields defined in structs: 0
+XXX structs with bitfields in the program: 45
+breakdown:
+ indirect level: 0, occurrence: 33
+ indirect level: 1, occurrence: 8
+ indirect level: 2, occurrence: 4
+XXX full-bitfields structs in the program: 0
+breakdown:
+XXX times a bitfields struct's address is taken: 36
+XXX times a bitfields struct on LHS: 0
+XXX times a bitfields struct on RHS: 66
+XXX times a single bitfield on LHS: 0
+XXX times a single bitfield on RHS: 0
+
+XXX max expression depth: 42
+breakdown:
+ depth: 1, occurrence: 186
+ depth: 2, occurrence: 44
+ depth: 3, occurrence: 2
+ depth: 4, occurrence: 4
+ depth: 5, occurrence: 2
+ depth: 6, occurrence: 3
+ depth: 7, occurrence: 1
+ depth: 11, occurrence: 2
+ depth: 13, occurrence: 1
+ depth: 14, occurrence: 1
+ depth: 16, occurrence: 2
+ depth: 17, occurrence: 1
+ depth: 18, occurrence: 1
+ depth: 19, occurrence: 4
+ depth: 20, occurrence: 4
+ depth: 21, occurrence: 2
+ depth: 22, occurrence: 4
+ depth: 23, occurrence: 4
+ depth: 25, occurrence: 1
+ depth: 27, occurrence: 1
+ depth: 28, occurrence: 2
+ depth: 29, occurrence: 2
+ depth: 30, occurrence: 1
+ depth: 31, occurrence: 1
+ depth: 33, occurrence: 2
+ depth: 41, occurrence: 1
+ depth: 42, occurrence: 1
+
+XXX total number of pointers: 576
+
+XXX times a variable address is taken: 1577
+XXX times a pointer is dereferenced on RHS: 578
+breakdown:
+ depth: 1, occurrence: 540
+ depth: 2, occurrence: 36
+ depth: 3, occurrence: 2
+XXX times a pointer is dereferenced on LHS: 463
+breakdown:
+ depth: 1, occurrence: 432
+ depth: 2, occurrence: 30
+ depth: 3, occurrence: 1
+XXX times a pointer is compared with null: 72
+XXX times a pointer is compared with address of another variable: 17
+XXX times a pointer is compared with another pointer: 25
+XXX times a pointer is qualified to be dereferenced: 11097
+
+XXX max dereference level: 4
+breakdown:
+ level: 0, occurrence: 0
+ level: 1, occurrence: 2473
+ level: 2, occurrence: 250
+ level: 3, occurrence: 21
+ level: 4, occurrence: 4
+XXX number of pointers point to pointers: 214
+XXX number of pointers point to scalars: 326
+XXX number of pointers point to structs: 20
+XXX percent of pointers has null in alias set: 29
+XXX average alias set size: 1.59
+
+XXX times a non-volatile is read: 2782
+XXX times a non-volatile is write: 1303
+XXX times a volatile is read: 0
+XXX times read thru a pointer: 0
+XXX times a volatile is write: 0
+XXX times written thru a pointer: 0
+XXX times a volatile is available for access: 0
+XXX percentage of non-volatile access: 100
+
+XXX forward jumps: 1
+XXX backward jumps: 8
+
+XXX stmts: 189
+XXX max block depth: 5
+breakdown:
+ depth: 0, occurrence: 32
+ depth: 1, occurrence: 30
+ depth: 2, occurrence: 20
+ depth: 3, occurrence: 30
+ depth: 4, occurrence: 37
+ depth: 5, occurrence: 40
+
+XXX percentage a fresh-made variable is used: 15.4
+XXX percentage an existing variable is used: 84.6
+FYI: the random generator makes assumptions about the integer size. See platform.info for more details.
+********************* end of statistics **********************/
+
diff --git a/tests/fuzz/11.c.txt b/tests/fuzz/11.c.txt
new file mode 100644
index 00000000..d878ac9d
--- /dev/null
+++ b/tests/fuzz/11.c.txt
@@ -0,0 +1 @@
+checksum = F3170034
diff --git a/tests/fuzz/15.c b/tests/fuzz/15.c
new file mode 100644
index 00000000..d84af705
--- /dev/null
+++ b/tests/fuzz/15.c
@@ -0,0 +1,1581 @@
+/*
+ * This is a RANDOMLY GENERATED PROGRAM.
+ *
+ * Generator: csmith 2.2.0
+ * Git version: bf42ffd
+ * Options: --no-volatiles --no-packed-struct
+ * Seed: 797096764
+ */
+
+#include "csmith.h"
+
+
+static long __undefined;
+
+/* --- Struct/Union Declarations --- */
+union U0 {
+ const int16_t f0;
+ int8_t f1;
+ uint32_t f2;
+};
+
+union U1 {
+ uint32_t f0;
+ signed f1 : 23;
+};
+
+union U2 {
+ int32_t f0;
+ const int8_t f1;
+ uint32_t f2;
+ uint64_t f3;
+ const int16_t f4;
+};
+
+/* --- GLOBAL VARIABLES --- */
+static uint8_t g_2 = 0x99L;
+static union U2 g_10[10] = {{0x98764276L},{0xDA7EF5D8L},{0x1AFA9B64L},{0x1AFA9B64L},{0xDA7EF5D8L},{0x98764276L},{0xDA7EF5D8L},{0x1AFA9B64L},{0x1AFA9B64L},{0xDA7EF5D8L}};
+static union U2 *g_9 = &g_10[9];
+static int64_t g_49 = 0x47CDD5376E30F4AELL;
+static uint8_t g_53[6] = {0xA8L,0xA8L,255UL,0xA8L,0xA8L,255UL};
+static union U2 **g_54 = (void*)0;
+static int16_t g_75 = 0xDA77L;
+static int32_t g_89 = 0x94124F91L;
+static int32_t g_92 = (-10L);
+static uint32_t g_93 = 0UL;
+static uint8_t g_101 = 1UL;
+static int32_t g_111[9][9] = {{0xA052AF0DL,(-6L),0x1281BCF5L,(-7L),0xA052AF0DL,(-1L),(-6L),0x453539CAL,(-7L)},{0xD59F121BL,0xADC77BC6L,9L,0x74088AFDL,(-7L),0x0F6EBCB2L,(-7L),0x74088AFDL,9L},{0xA052AF0DL,0xA052AF0DL,(-6L),0x1281BCF5L,(-7L),0xA052AF0DL,(-1L),(-6L),0x453539CAL},{9L,0xADC77BC6L,9L,(-1L),9L,0x74088AFDL,0L,0x74088AFDL,9L},{0x453539CAL,0L,0L,0x453539CAL,0xA052AF0DL,0x1281BCF5L,0L,(-4L),0x453539CAL},{0xD59F121BL,(-1L),(-7L),(-1L),0xD59F121BL,0x0F6EBCB2L,0xC841BEEAL,0xADC77BC6L,0xC841BEEAL},{(-4L),0xA052AF0DL,0x90AFEB5AL,0x90AFEB5AL,0xA052AF0DL,(-4L),(-1L),0x90AFEB5AL,1L},{0x01AA1EC4L,0x0F6EBCB2L,9L,0xADC77BC6L,9L,0x0F6EBCB2L,0x01AA1EC4L,(-1L),0L},{0x453539CAL,(-1L),0x1281BCF5L,(-4L),(-4L),0x1281BCF5L,(-1L),0x453539CAL,(-4L)}};
+static int16_t *g_136[6][10] = {{&g_75,&g_75,&g_75,&g_75,&g_75,&g_75,(void*)0,(void*)0,&g_75,&g_75},{&g_75,&g_75,&g_75,&g_75,(void*)0,&g_75,&g_75,&g_75,(void*)0,&g_75},{&g_75,&g_75,&g_75,(void*)0,&g_75,&g_75,&g_75,&g_75,(void*)0,&g_75},{(void*)0,(void*)0,&g_75,&g_75,&g_75,&g_75,&g_75,&g_75,&g_75,(void*)0},{&g_75,&g_75,&g_75,&g_75,(void*)0,(void*)0,&g_75,&g_75,&g_75,&g_75},{&g_75,(void*)0,&g_75,(void*)0,(void*)0,(void*)0,&g_75,(void*)0,&g_75,&g_75}};
+static int8_t g_147 = 0x73L;
+static int64_t g_149 = 0x9236ECDBE2488046LL;
+static union U2 g_223 = {0x3CAFA4DCL};
+static union U2 *g_222 = &g_223;
+static union U0 g_226 = {-1L};
+static union U0 *g_225 = &g_226;
+static union U0 g_229[3][1][5] = {{{{0xF0CDL},{1L},{0x1C62L},{0x7D68L},{0x7D68L}}},{{{1L},{0xF0CDL},{1L},{0x1C62L},{0x7D68L}}},{{{0x095AL},{0xCCBBL},{0x7D68L},{0xCCBBL},{0x095AL}}}};
+static union U0 g_231[6][9][4] = {{{{0x2038L},{0x2038L},{0x2038L},{0x2038L}},{{0x2038L},{0x2038L},{0x2038L},{0x2038L}},{{0x2038L},{0x2038L},{0x2038L},{0x2038L}},{{0x2038L},{0x2038L},{0x2038L},{0x2038L}},{{0x2038L},{0x2038L},{0x2038L},{0x2038L}},{{0x2038L},{0x2038L},{0x2038L},{0x2038L}},{{0x2038L},{0x2038L},{0x2038L},{0x2038L}},{{0x2038L},{0x2038L},{0x2038L},{0x2038L}},{{0x2038L},{0x2038L},{0x2038L},{0x2038L}}},{{{0x2038L},{0x2038L},{0x2038L},{0x2038L}},{{0x2038L},{0x2038L},{0x2038L},{0x2038L}},{{0x2038L},{0x2038L},{0x2038L},{0x2038L}},{{0x2038L},{0x2038L},{0x2038L},{0x2038L}},{{0x2038L},{0x2038L},{0x2038L},{0x2038L}},{{0x2038L},{0x2038L},{0x2038L},{0x2038L}},{{0x2038L},{0x2038L},{0x2038L},{0x2038L}},{{0x2038L},{0x2038L},{0x2038L},{0x2038L}},{{0x2038L},{0x2038L},{0x2038L},{0x2038L}}},{{{0x2038L},{0x2038L},{0x2038L},{0x2038L}},{{0x2038L},{0x2038L},{0x2038L},{0x2038L}},{{0x2038L},{0x2038L},{0x2038L},{0x2038L}},{{0x2038L},{0x2038L},{0x2038L},{0x2038L}},{{0x2038L},{0x2038L},{0x2038L},{0x2038L}},{{0x2038L},{0x2038L},{0x2038L},{0x2038L}},{{0x2038L},{0x2038L},{0x2038L},{0x2038L}},{{0x2038L},{0x2038L},{0x2038L},{0x2038L}},{{0x2038L},{0x2038L},{0x2038L},{0x2038L}}},{{{0x2038L},{0x2038L},{0x2038L},{0x2038L}},{{0x2038L},{0x2038L},{0x2038L},{0x2038L}},{{0x2038L},{0x2038L},{0x2038L},{0x2038L}},{{0x2038L},{0x2038L},{0x2038L},{0x2038L}},{{0x2038L},{0x2038L},{0x2038L},{0x2038L}},{{0x2038L},{0x2038L},{0x2038L},{0x2038L}},{{0x2038L},{0x2038L},{0x2038L},{0x2038L}},{{0x2038L},{0x2038L},{0x2038L},{0x2038L}},{{0x2038L},{0x2038L},{0x2038L},{0x2038L}}},{{{0x2038L},{0x2038L},{0x2038L},{0x2038L}},{{0x2038L},{0x2038L},{0x2038L},{0x2038L}},{{0x2038L},{0x2038L},{0x2038L},{0x2038L}},{{0x2038L},{0x2038L},{0x2038L},{0x2038L}},{{0x2038L},{0x2038L},{0x2038L},{0x2038L}},{{0x2038L},{0x2038L},{0x2038L},{0x2038L}},{{0x2038L},{0x2038L},{0x2038L},{0x2038L}},{{0x2038L},{0x2038L},{0x2038L},{0x2038L}},{{0x2038L},{0x2038L},{0x2038L},{0x2038L}}},{{{0x2038L},{0x2038L},{0x2038L},{0x2038L}},{{0x2038L},{0x2038L},{0x2038L},{0x2038L}},{{0x2038L},{0x2038L},{0x2038L},{0x2038L}},{{0x2038L},{0x2038L},{0x2038L},{0x2038L}},{{0x2038L},{0x2038L},{0x2038L},{0x2038L}},{{0x2038L},{0x2038L},{0x2038L},{0x2038L}},{{0x2038L},{0x2038L},{0x2038L},{0x2038L}},{{0x2038L},{0x2038L},{0x2038L},{0x2038L}},{{0x2038L},{0x2038L},{0x2038L},{0x2038L}}}};
+static uint16_t g_245 = 0xE292L;
+static const uint16_t *g_244 = &g_245;
+static const uint16_t **g_243[4][5][5] = {{{&g_244,&g_244,(void*)0,&g_244,&g_244},{(void*)0,(void*)0,(void*)0,&g_244,&g_244},{&g_244,(void*)0,&g_244,(void*)0,&g_244},{(void*)0,&g_244,(void*)0,(void*)0,(void*)0},{&g_244,&g_244,&g_244,&g_244,(void*)0}},{{&g_244,(void*)0,(void*)0,&g_244,(void*)0},{(void*)0,&g_244,(void*)0,(void*)0,&g_244},{(void*)0,(void*)0,&g_244,&g_244,(void*)0},{&g_244,(void*)0,&g_244,&g_244,&g_244},{&g_244,(void*)0,(void*)0,(void*)0,&g_244}},{{&g_244,&g_244,(void*)0,(void*)0,(void*)0},{&g_244,&g_244,(void*)0,&g_244,&g_244},{&g_244,&g_244,&g_244,&g_244,(void*)0},{(void*)0,&g_244,&g_244,&g_244,&g_244},{(void*)0,&g_244,&g_244,&g_244,&g_244}},{{(void*)0,&g_244,(void*)0,&g_244,(void*)0},{(void*)0,&g_244,&g_244,&g_244,(void*)0},{(void*)0,(void*)0,&g_244,&g_244,&g_244},{(void*)0,(void*)0,&g_244,(void*)0,(void*)0},{(void*)0,(void*)0,(void*)0,(void*)0,&g_244}}};
+static const uint16_t **g_250[3] = {&g_244,&g_244,&g_244};
+static int32_t **g_251[6] = {(void*)0,(void*)0,(void*)0,(void*)0,(void*)0,(void*)0};
+static const union U0 g_255 = {0x8343L};
+static const uint64_t g_319 = 1UL;
+static const uint64_t *g_318 = &g_319;
+static uint32_t g_375 = 0x72D6932EL;
+static union U1 g_428[8][1][4] = {{{{0x698E2022L},{1UL},{0x698E2022L},{1UL}}},{{{0x698E2022L},{1UL},{0x698E2022L},{1UL}}},{{{0x698E2022L},{1UL},{0x698E2022L},{1UL}}},{{{0x698E2022L},{1UL},{0x698E2022L},{1UL}}},{{{0x698E2022L},{1UL},{0x698E2022L},{1UL}}},{{{0x698E2022L},{1UL},{0x698E2022L},{1UL}}},{{{0x698E2022L},{1UL},{0x698E2022L},{1UL}}},{{{0x698E2022L},{1UL},{0x698E2022L},{1UL}}}};
+static uint16_t g_444 = 0x21E0L;
+static int8_t g_479 = 0x73L;
+static int16_t g_507 = 0x62B6L;
+static union U2 *** const g_604 = &g_54;
+static int32_t g_627 = 0x6061E963L;
+static int8_t g_706 = (-10L);
+static const union U2 g_814 = {0x1ABBD7A4L};
+static union U0 **g_815 = &g_225;
+static union U0 **g_819 = &g_225;
+static const union U1 *g_902 = &g_428[0][0][2];
+static uint32_t *g_912 = &g_93;
+static uint32_t **g_911 = &g_912;
+static uint8_t *g_931 = &g_2;
+static uint8_t **g_930 = &g_931;
+static int32_t g_1007 = 1L;
+static int32_t ***g_1075 = &g_251[3];
+static int32_t ****g_1074[10] = {&g_1075,&g_1075,&g_1075,&g_1075,&g_1075,&g_1075,&g_1075,&g_1075,&g_1075,&g_1075};
+static int8_t g_1178 = 1L;
+static uint32_t g_1198[10][6] = {{0x6E30EC80L,1UL,18446744073709551615UL,0x603D3624L,18446744073709551615UL,1UL},{0x10B3A749L,18446744073709551615UL,18446744073709551615UL,0x603D3624L,18446744073709551615UL,18446744073709551615UL},{0x6E30EC80L,18446744073709551615UL,18446744073709551615UL,0x10B3A749L,1UL,1UL},{0x74CE00C5L,18446744073709551615UL,18446744073709551615UL,0x74CE00C5L,18446744073709551615UL,18446744073709551615UL},{0x74CE00C5L,18446744073709551615UL,18446744073709551615UL,0x10B3A749L,18446744073709551615UL,18446744073709551615UL},{0x6E30EC80L,1UL,18446744073709551615UL,0x603D3624L,18446744073709551615UL,1UL},{0x10B3A749L,18446744073709551615UL,18446744073709551615UL,0x603D3624L,18446744073709551615UL,18446744073709551615UL},{0x6E30EC80L,18446744073709551615UL,18446744073709551615UL,0x10B3A749L,1UL,1UL},{0x74CE00C5L,18446744073709551615UL,18446744073709551615UL,0x74CE00C5L,18446744073709551615UL,18446744073709551615UL},{0x74CE00C5L,18446744073709551615UL,18446744073709551615UL,0x10B3A749L,18446744073709551615UL,18446744073709551615UL}};
+static int32_t g_1232 = 0x71F484AAL;
+static int64_t g_1399[3][1][5] = {{{0xDD9AC679BAAAA7DCLL,0xDD9AC679BAAAA7DCLL,(-1L),0xA0F8C1174F6453ADLL,(-1L)}},{{0xDD9AC679BAAAA7DCLL,0xDD9AC679BAAAA7DCLL,(-1L),0xA0F8C1174F6453ADLL,(-1L)}},{{0xDD9AC679BAAAA7DCLL,0xDD9AC679BAAAA7DCLL,(-1L),0xA0F8C1174F6453ADLL,(-1L)}}};
+static union U1 *g_1459 = &g_428[0][0][2];
+static uint32_t *g_1502 = &g_375;
+static union U1 g_1574[2] = {{4294967286UL},{4294967286UL}};
+static uint64_t g_1582 = 0xDE7693F682AE7AA6LL;
+static int8_t g_1693 = 0x0CL;
+static int64_t g_1695 = 0x84AF5CDD96B38B31LL;
+static uint16_t g_1743 = 0x3C40L;
+static int32_t g_1771 = 0x66C24BEBL;
+static const uint64_t g_1864[2][4][3] = {{{5UL,1UL,1UL},{18446744073709551615UL,0x14DC4E3CB165692BLL,18446744073709551615UL},{5UL,5UL,1UL},{0xE46C208F0BCDDE06LL,0x14DC4E3CB165692BLL,0xE46C208F0BCDDE06LL}},{{5UL,1UL,1UL},{18446744073709551615UL,0x14DC4E3CB165692BLL,18446744073709551615UL},{5UL,5UL,1UL},{0xE46C208F0BCDDE06LL,0x14DC4E3CB165692BLL,0xE46C208F0BCDDE06LL}}};
+static const int32_t *g_1948[8][5][2] = {{{&g_92,(void*)0},{&g_1232,&g_92},{&g_111[6][0],&g_111[6][0]},{&g_111[6][0],&g_92},{&g_1232,(void*)0}},{{&g_92,(void*)0},{&g_1232,&g_92},{&g_111[6][0],&g_111[6][0]},{&g_111[6][0],&g_92},{&g_1232,(void*)0}},{{&g_92,(void*)0},{&g_1232,&g_92},{&g_111[6][0],&g_111[6][0]},{&g_111[6][0],&g_92},{&g_1232,(void*)0}},{{&g_92,(void*)0},{&g_1232,&g_92},{&g_111[6][0],&g_111[6][0]},{&g_111[6][0],&g_92},{&g_1232,(void*)0}},{{&g_92,(void*)0},{&g_1232,&g_92},{&g_111[6][0],&g_111[6][0]},{&g_111[6][0],&g_92},{&g_1232,(void*)0}},{{&g_92,(void*)0},{&g_1232,&g_92},{&g_111[6][0],&g_111[6][0]},{&g_111[6][0],&g_92},{&g_1232,(void*)0}},{{&g_92,(void*)0},{&g_1232,&g_92},{&g_111[6][0],&g_111[6][0]},{&g_111[6][0],&g_92},{&g_1232,(void*)0}},{{&g_92,(void*)0},{&g_1232,&g_92},{&g_111[6][0],&g_111[6][0]},{&g_111[6][0],&g_92},{&g_1232,(void*)0}}};
+static uint16_t * const g_2081 = (void*)0;
+static uint16_t * const *g_2080 = &g_2081;
+static uint16_t * const **g_2079[6][9] = {{&g_2080,&g_2080,&g_2080,&g_2080,&g_2080,&g_2080,&g_2080,&g_2080,&g_2080},{&g_2080,&g_2080,&g_2080,&g_2080,&g_2080,&g_2080,&g_2080,&g_2080,&g_2080},{&g_2080,&g_2080,&g_2080,&g_2080,&g_2080,&g_2080,&g_2080,(void*)0,&g_2080},{&g_2080,&g_2080,&g_2080,&g_2080,&g_2080,&g_2080,&g_2080,&g_2080,&g_2080},{&g_2080,&g_2080,&g_2080,&g_2080,&g_2080,&g_2080,&g_2080,&g_2080,&g_2080},{&g_2080,&g_2080,&g_2080,&g_2080,&g_2080,&g_2080,&g_2080,&g_2080,&g_2080}};
+static uint16_t *g_2110 = &g_444;
+static uint16_t **g_2109 = &g_2110;
+static int32_t g_2120 = 0x6DA12724L;
+static uint16_t *g_2144 = (void*)0;
+static uint32_t * const *g_2212 = (void*)0;
+static union U1 **g_2317[4] = {&g_1459,&g_1459,&g_1459,&g_1459};
+static union U1 ***g_2316 = &g_2317[1];
+
+
+/* --- FORWARD DECLARATIONS --- */
+static uint32_t func_1(void);
+static union U2 * const func_3(union U1 p_4, int16_t p_5);
+static union U1 func_6(union U2 * p_7, const int64_t p_8);
+static const uint64_t func_16(uint64_t p_17, union U1 p_18);
+static union U2 func_20(union U2 * p_21);
+static int8_t func_26(const int64_t p_27, uint32_t p_28, uint64_t p_29, union U2 p_30);
+static uint8_t func_33(union U2 * p_34, uint32_t p_35, union U0 p_36, uint8_t p_37, union U2 * p_38);
+static uint32_t func_40(union U2 * p_41, union U2 ** p_42, union U2 * p_43);
+static int16_t func_66(uint8_t * const p_67, int64_t p_68, union U2 *** const p_69);
+static uint8_t * func_70(int64_t p_71, int32_t p_72, uint8_t * p_73);
+
+
+/* --- FUNCTIONS --- */
+/* ------------------------------------------ */
+/*
+ * reads : g_2 g_10.f1 g_53 g_54 g_231.f1 g_223.f4 g_318 g_319 g_10 g_706 g_428 g_92 g_444 g_10.f4 g_89 g_111 g_149 g_93 g_225 g_226 g_223.f0 g_428.f0 g_223.f3 g_930 g_931 g_627 g_912 g_911 g_1007 g_226.f2 g_244 g_245 g_1074 g_147 g_101 g_375 g_1198 g_604 g_814.f0 g_229 g_222 g_223 g_75 g_814.f1 g_902 g_223.f1 g_1232 g_9 g_255.f0 g_1502 g_1574 g_479 g_1695 g_1459 g_229.f0 g_1582 g_507 g_1743 g_1574.f1 g_819 g_2110 g_2144 g_1864 g_223.f2 g_2212 g_2316
+ * writes: g_9 g_49 g_2 g_53 g_706 g_444 g_93 g_245 g_223.f0 g_149 g_111 g_223.f3 g_75 g_226.f2 g_89 g_507 g_479 g_147 g_1198 g_54 g_1399 g_231.f1 g_1502 g_931 g_92 g_1232 g_375 g_10.f3 g_428 g_222 g_1743 g_1695 g_1007 g_10.f2 g_2079 g_2109 g_2120 g_1948 g_223.f2 g_2212
+ */
+static uint32_t func_1(void)
+{ /* block id: 0 */
+ int64_t l_1967[2];
+ uint8_t l_1977[4];
+ uint32_t l_1980 = 1UL;
+ int32_t l_1982 = 0xD67F4E36L;
+ int32_t l_1983 = 0xF965B165L;
+ uint16_t l_1999 = 0x9388L;
+ int32_t l_2011 = 0xE1C04DFFL;
+ int32_t l_2012 = 0xFCA65305L;
+ int32_t l_2013 = 0xADB23608L;
+ int32_t l_2014 = 0x0E5033ACL;
+ int32_t ****l_2054 = &g_1075;
+ uint32_t l_2062 = 0x1B47355CL;
+ const int8_t l_2064 = 0xCCL;
+ uint64_t l_2066[1][3][9] = {{{1UL,1UL,0UL,1UL,1UL,0UL,1UL,1UL,0UL},{1UL,1UL,0UL,1UL,1UL,0UL,1UL,1UL,0UL},{1UL,1UL,0UL,1UL,1UL,0UL,1UL,1UL,0UL}}};
+ int64_t l_2071 = 0L;
+ int32_t l_2099[1][7][8] = {{{0x189E11A8L,5L,0xA01202B2L,5L,(-3L),5L,(-3L),0x33D3B688L},{0xA01202B2L,0x33D3B688L,0xA01202B2L,0xB69E8CCFL,(-3L),0xB69E8CCFL,0xA01202B2L,0x33D3B688L},{(-3L),0xB69E8CCFL,0xA01202B2L,0x33D3B688L,0xA01202B2L,0xB69E8CCFL,(-3L),0xB69E8CCFL},{(-3L),0x33D3B688L,0x189E11A8L,0x33D3B688L,(-3L),5L,(-3L),0x33D3B688L},{0xA01202B2L,0x33D3B688L,0xA01202B2L,0xB69E8CCFL,(-3L),0xB69E8CCFL,0xA01202B2L,0x33D3B688L},{(-3L),0xB69E8CCFL,0xA01202B2L,0x33D3B688L,0xA01202B2L,0xB69E8CCFL,(-3L),0xB69E8CCFL},{(-3L),0x33D3B688L,0x189E11A8L,0x33D3B688L,(-3L),5L,(-3L),0x33D3B688L}}};
+ int32_t l_2104 = 3L;
+ uint16_t **l_2111 = &g_2110;
+ int64_t *l_2115 = &g_1399[2][0][3];
+ const int16_t l_2123[10] = {(-1L),(-1L),(-1L),(-1L),(-1L),(-1L),(-1L),(-1L),(-1L),(-1L)};
+ const uint64_t **l_2168[4];
+ uint32_t ****l_2184 = (void*)0;
+ int64_t l_2198[1];
+ int8_t l_2208 = 5L;
+ uint32_t l_2232 = 18446744073709551612UL;
+ uint32_t l_2239 = 4294967289UL;
+ uint64_t l_2304 = 0UL;
+ int8_t l_2308[10] = {0xFFL,0xFFL,0xFFL,0xFFL,0xFFL,0xFFL,0xFFL,0xFFL,0xFFL,0xFFL};
+ int i, j, k;
+ for (i = 0; i < 2; i++)
+ l_1967[i] = 1L;
+ for (i = 0; i < 4; i++)
+ l_1977[i] = 0x3AL;
+ for (i = 0; i < 4; i++)
+ l_2168[i] = &g_318;
+ for (i = 0; i < 1; i++)
+ l_2198[i] = (-10L);
+ if (g_2)
+ { /* block id: 1 */
+ union U2 **l_1971 = &g_222;
+ int32_t *l_1972 = &g_111[1][3];
+ int64_t *l_1981[4];
+ int16_t *l_1996 = &g_507;
+ uint16_t l_1997 = 4UL;
+ uint16_t *l_1998 = &g_1743;
+ uint64_t l_2000 = 1UL;
+ int i;
+ for (i = 0; i < 4; i++)
+ l_1981[i] = &g_1399[1][0][0];
+ (*l_1971) = func_3(((*g_1459) = func_6((g_9 = (void*)0), g_10[9].f1)), l_1967[0]);
+ l_1972 = l_1972;
+ l_1983 = ((((*g_1459) , (!l_1967[1])) && ((safe_mod_func_uint8_t_u_u((l_1977[1] != (l_1982 = (g_149 = (0x8EL >= ((((safe_sub_func_int32_t_s_s((l_1977[1] < (*l_1972)), ((l_1980 , &g_1075) == &g_1075))) || (*l_1972)) , (*l_1972)) , (**g_930)))))), l_1980)) != l_1967[1])) >= g_111[1][3]);
+ l_2000 |= (((safe_mod_func_uint8_t_u_u((((*l_1998) = (~((((**g_911) = (safe_sub_func_int64_t_s_s((((safe_lshift_func_uint16_t_u_s(0xCB04L, ((*l_1996) |= (3L >= (safe_unary_minus_func_int8_t_s((0L == (((safe_unary_minus_func_uint64_t_u((g_229[0][0][3].f0 & 0x70L))) <= ((safe_mul_func_int8_t_s_s((l_1980 , g_1582), (((*l_1972) | ((*l_1972) <= g_223.f4)) || 4UL))) >= (*g_318))) , (*l_1972))))))))) , l_1967[0]) , g_428[0][0][2].f0), l_1997))) < (*l_1972)) , (*l_1972)))) && (*l_1972)), l_1977[1])) || (*l_1972)) , l_1999);
+ }
+ else
+ { /* block id: 890 */
+ int8_t l_2010 = 0L;
+ int32_t l_2018[9][4][7] = {{{0L,0xBD0DEF51L,0xBD0DEF51L,0L,0xBD0DEF51L,0xBD0DEF51L,0L},{0xBD0DEF51L,0L,0xBD0DEF51L,0xBD0DEF51L,0L,0xBD0DEF51L,0xBD0DEF51L},{0L,0L,1L,0L,0L,1L,0L},{0L,0xBD0DEF51L,0xBD0DEF51L,0L,0xBD0DEF51L,0xBD0DEF51L,0L}},{{0xBD0DEF51L,0L,0xBD0DEF51L,0xBD0DEF51L,0L,0xBD0DEF51L,0xBD0DEF51L},{0L,0L,1L,0L,0L,1L,0L},{0L,0xBD0DEF51L,0xBD0DEF51L,0L,0xBD0DEF51L,0xBD0DEF51L,0L},{0xBD0DEF51L,0L,0xBD0DEF51L,0xBD0DEF51L,0L,0xBD0DEF51L,0xBD0DEF51L}},{{0L,0L,1L,0L,0L,1L,0L},{0L,0xBD0DEF51L,0xBD0DEF51L,0L,0xBD0DEF51L,0xBD0DEF51L,0L},{0xBD0DEF51L,0L,0xBD0DEF51L,0xBD0DEF51L,0L,0xBD0DEF51L,0xBD0DEF51L},{0L,0L,1L,0L,0L,1L,0L}},{{0L,0xBD0DEF51L,0xBD0DEF51L,0L,0xBD0DEF51L,0xBD0DEF51L,0L},{0xBD0DEF51L,0L,0xBD0DEF51L,0xBD0DEF51L,0L,0xBD0DEF51L,0xBD0DEF51L},{0L,0L,1L,0L,0L,1L,0L},{0L,0xBD0DEF51L,0xBD0DEF51L,0L,0xBD0DEF51L,0xBD0DEF51L,0L}},{{0xBD0DEF51L,0L,0xBD0DEF51L,0xBD0DEF51L,0L,0xBD0DEF51L,0xBD0DEF51L},{0xBD0DEF51L,0xBD0DEF51L,0L,0xBD0DEF51L,0xBD0DEF51L,0L,0xBD0DEF51L},{0xBD0DEF51L,1L,1L,0xBD0DEF51L,1L,1L,0xBD0DEF51L},{1L,0xBD0DEF51L,1L,1L,0xBD0DEF51L,1L,1L}},{{0xBD0DEF51L,0xBD0DEF51L,0L,0xBD0DEF51L,0xBD0DEF51L,0L,0xBD0DEF51L},{0xBD0DEF51L,1L,1L,0xBD0DEF51L,1L,1L,0xBD0DEF51L},{1L,0xBD0DEF51L,1L,1L,0xBD0DEF51L,1L,1L},{0xBD0DEF51L,0xBD0DEF51L,0L,0xBD0DEF51L,0xBD0DEF51L,0L,0xBD0DEF51L}},{{0xBD0DEF51L,1L,1L,0xBD0DEF51L,1L,1L,0xBD0DEF51L},{1L,0xBD0DEF51L,1L,1L,0xBD0DEF51L,1L,1L},{0xBD0DEF51L,0xBD0DEF51L,0L,0xBD0DEF51L,0xBD0DEF51L,0L,0xBD0DEF51L},{0xBD0DEF51L,1L,1L,0xBD0DEF51L,1L,1L,0xBD0DEF51L}},{{1L,0xBD0DEF51L,1L,1L,0xBD0DEF51L,1L,1L},{0xBD0DEF51L,0xBD0DEF51L,0L,0xBD0DEF51L,0xBD0DEF51L,0L,0xBD0DEF51L},{0xBD0DEF51L,1L,1L,0xBD0DEF51L,1L,1L,0xBD0DEF51L},{1L,0xBD0DEF51L,1L,1L,0xBD0DEF51L,1L,1L}},{{0xBD0DEF51L,0xBD0DEF51L,0L,0xBD0DEF51L,0xBD0DEF51L,0L,0xBD0DEF51L},{0xBD0DEF51L,1L,1L,0xBD0DEF51L,1L,1L,0xBD0DEF51L},{1L,0xBD0DEF51L,1L,1L,0xBD0DEF51L,1L,1L},{0xBD0DEF51L,0xBD0DEF51L,0L,0xBD0DEF51L,0xBD0DEF51L,0L,0xBD0DEF51L}}};
+ uint8_t l_2026 = 0xC8L;
+ int8_t l_2029[9] = {0L,0L,0L,0L,0L,0L,0L,0L,0L};
+ const int16_t l_2061 = 0x8AA0L;
+ uint32_t *l_2063 = &g_10[9].f2;
+ uint64_t l_2065 = 7UL;
+ int64_t l_2067 = 1L;
+ uint32_t l_2070 = 18446744073709551615UL;
+ uint16_t *l_2076[4] = {(void*)0,(void*)0,(void*)0,(void*)0};
+ uint16_t **l_2075 = &l_2076[0];
+ uint16_t ***l_2074[9][8] = {{&l_2075,&l_2075,&l_2075,&l_2075,&l_2075,&l_2075,&l_2075,&l_2075},{&l_2075,&l_2075,&l_2075,&l_2075,&l_2075,&l_2075,&l_2075,&l_2075},{&l_2075,&l_2075,&l_2075,&l_2075,&l_2075,&l_2075,&l_2075,&l_2075},{&l_2075,&l_2075,&l_2075,&l_2075,&l_2075,&l_2075,&l_2075,&l_2075},{&l_2075,&l_2075,&l_2075,&l_2075,&l_2075,&l_2075,&l_2075,&l_2075},{&l_2075,&l_2075,&l_2075,&l_2075,&l_2075,&l_2075,&l_2075,&l_2075},{&l_2075,&l_2075,&l_2075,&l_2075,&l_2075,&l_2075,&l_2075,&l_2075},{&l_2075,&l_2075,&l_2075,&l_2075,&l_2075,&l_2075,&l_2075,&l_2075},{&l_2075,&l_2075,&l_2075,&l_2075,&l_2075,&l_2075,&l_2075,&l_2075}};
+ union U0 l_2096[7] = {{0x5C67L},{0x5C67L},{0x5C67L},{0x5C67L},{0x5C67L},{0x5C67L},{0x5C67L}};
+ uint16_t l_2107 = 65534UL;
+ union U2 *l_2156 = &g_10[9];
+ uint64_t *l_2166 = (void*)0;
+ uint64_t **l_2165 = &l_2166;
+ const uint32_t l_2171 = 8UL;
+ union U1 l_2190 = {0xC236650BL};
+ union U1 **l_2204 = &g_1459;
+ union U1 **l_2205 = &g_1459;
+ uint64_t l_2215 = 0x96E9BBDEA25EDF34LL;
+ int16_t l_2227[5][9][5] = {{{0x0EB5L,0x1960L,0x1960L,0x0EB5L,0x6030L},{0xDD4AL,(-1L),7L,7L,0x1FD4L},{0x1960L,(-1L),0xCA87L,1L,0xCA87L},{0xE2CEL,0xE2CEL,0x1FD4L,7L,7L},{0x735EL,0x2B2BL,0x6030L,0x0EB5L,0x1960L},{(-9L),0x1FD4L,1L,0x1FD4L,(-9L)},{2L,0x2B2BL,1L,0x248EL,1L},{7L,0xE2CEL,1L,(-1L),(-1L)},{0x248EL,(-1L),0x248EL,0x2B2BL,1L}},{{1L,(-1L),0xE2CEL,0L,(-9L)},{1L,0x1960L,(-1L),(-1L),0x1960L},{1L,0x8BCEL,0xE2CEL,(-9L),7L},{(-1L),7L,0x248EL,0x6030L,0xCA87L},{(-5L),1L,1L,(-5L),0x1FD4L},{(-1L),(-1L),1L,2L,0x6030L},{1L,0xDD4AL,1L,0xE2CEL,1L},{1L,1L,0x6030L,2L,1L},{1L,0L,0x1FD4L,(-5L),1L}},{{0x248EL,0x6030L,0xCA87L,0x6030L,0x248EL},{7L,0L,7L,(-9L),0xE2CEL},{2L,1L,0x1960L,(-1L),(-1L)},{(-9L),0xDD4AL,(-9L),0L,0xE2CEL},{0x735EL,(-1L),1L,0x2B2BL,0x248EL},{0xE2CEL,1L,(-1L),(-1L),1L},{0x1960L,7L,1L,0x248EL,1L},{0xDD4AL,0x8BCEL,(-9L),0x1FD4L,1L},{0x0EB5L,0x1960L,0x1960L,0x0EB5L,0x6030L}},{{0xDD4AL,(-1L),7L,7L,0x1FD4L},{0x1960L,(-1L),0xCA87L,1L,0xCA87L},{0xE2CEL,0xE2CEL,0x1FD4L,7L,7L},{0x735EL,0x2B2BL,0x6030L,0x0EB5L,0x1960L},{(-9L),0xDD4AL,1L,0xDD4AL,(-1L)},{0x2B2BL,7L,0xCA87L,(-1L),0x6030L},{0L,0x1FD4L,(-5L),1L,1L},{(-1L),2L,(-1L),7L,0x6030L},{(-9L),1L,0x1FD4L,0x8BCEL,(-1L)}},{{0x6030L,0x0EB5L,0x1960L,0x1960L,0x0EB5L},{(-5L),7L,0x1FD4L,(-1L),1L},{2L,1L,(-1L),(-1L),0x735EL},{0xE2CEL,(-5L),(-5L),0xE2CEL,0xDD4AL},{2L,0x1960L,0xCA87L,0x2B2BL,(-1L)},{(-5L),7L,1L,0x1FD4L,1L},{0x6030L,0x6030L,(-1L),0x2B2BL,0xCA87L},{(-9L),0x8BCEL,0xDD4AL,0xE2CEL,(-5L)},{(-1L),(-1L),0x735EL,(-1L),(-1L)}}};
+ int16_t l_2229 = 0xCCBFL;
+ int16_t l_2238[10][5][5] = {{{0x26A1L,0x93F8L,0xCE93L,9L,0xB42DL},{0L,1L,0x34A3L,0L,0L},{9L,(-1L),9L,0x93F8L,0xB42DL},{(-1L),0L,1L,0x5701L,1L},{0xB42DL,0L,0xA442L,0xA442L,0L}},{{0x34A3L,(-1L),1L,1L,(-1L)},{(-1L),(-9L),9L,1L,(-9L)},{0x1869L,0x34A3L,0x34A3L,0x1869L,0x878EL},{(-1L),0xA442L,0xCE93L,0x26A1L,1L},{0x34A3L,0x0254L,0xEC99L,1L,0xEC99L}},{{0xB42DL,0xB42DL,1L,0x26A1L,0xCE93L},{(-1L),0x5701L,0x878EL,0x1869L,0x34A3L},{9L,1L,(-9L),1L,9L},{0L,0x5701L,(-1L),1L,1L},{0x26A1L,0xB42DL,0L,0xA442L,0xA442L}},{{1L,0x0254L,1L,0x5701L,1L},{0x1300L,0xA442L,0xB42DL,0x93F8L,9L},{1L,0x34A3L,0L,0L,0x34A3L},{0L,(-9L),0xB42DL,9L,0xCE93L},{0x0254L,(-1L),1L,0x878EL,0xEC99L}},{{7L,0L,0L,7L,1L},{0x0254L,0L,(-1L),0L,0x878EL},{0L,(-1L),(-9L),0xB42DL,(-9L)},{1L,1L,0x878EL,0L,(-1L)},{0x1300L,0x93F8L,(-1L),0xB42DL,7L}},{{0L,0x0254L,(-1L),0x0254L,0L},{0x93F8L,(-9L),(-9L),0xA442L,1L},{0x5701L,0x878EL,0x1869L,0x34A3L,0x34A3L},{0xA442L,0x26A1L,0xA442L,(-9L),1L},{1L,0x34A3L,0x878EL,(-1L),0L}},{{1L,7L,0L,0L,7L},{0x1869L,(-1L),0x878EL,0L,0xEC99L},{0x26A1L,0xCE93L,0xA442L,(-1L),0x1300L},{1L,0x1869L,0x1869L,1L,0x0254L},{0x26A1L,0L,(-9L),0x93F8L,(-1L)}},{{0x1869L,0L,(-1L),0x878EL,(-1L)},{1L,1L,(-1L),0x93F8L,(-9L)},{1L,(-1L),0x0254L,1L,0x1869L},{0xA442L,(-1L),0x1300L,(-1L),0xA442L},{0x5701L,(-1L),0xEC99L,0L,0x878EL}},{{0x93F8L,1L,7L,0L,0L},{0L,0L,0L,(-1L),0x878EL},{9L,0L,1L,(-9L),0xA442L},{0x878EL,0x1869L,0x34A3L,0x34A3L,0x1869L},{7L,0xCE93L,1L,0xA442L,(-9L)}},{{0L,(-1L),0L,0x0254L,(-1L)},{0xB42DL,7L,7L,0xB42DL,(-1L)},{0L,0x34A3L,0xEC99L,0x5701L,0x0254L},{7L,0x26A1L,0x1300L,1L,0x1300L},{0x878EL,0x878EL,0x0254L,0x5701L,0xEC99L}}};
+ uint32_t l_2271[9];
+ uint64_t l_2305[10] = {0x2AFF29B5EB439595LL,0x31A843976A988D39LL,0x739F945BCAB457C2LL,0x739F945BCAB457C2LL,0x31A843976A988D39LL,0x2AFF29B5EB439595LL,0x31A843976A988D39LL,0x739F945BCAB457C2LL,0x739F945BCAB457C2LL,0x31A843976A988D39LL};
+ int i, j, k;
+ for (i = 0; i < 9; i++)
+ l_2271[i] = 18446744073709551610UL;
+lbl_2214:
+ for (g_1695 = 0; (g_1695 > (-5)); g_1695 = safe_sub_func_int64_t_s_s(g_1695, 1))
+ { /* block id: 893 */
+ int32_t *l_2003 = &l_1982;
+ int32_t *l_2004 = &g_89;
+ int32_t l_2005 = 0x4B4F5FC8L;
+ int32_t *l_2006 = &l_1983;
+ int32_t *l_2007 = &g_89;
+ int32_t *l_2008 = &g_1232;
+ int32_t *l_2009[3];
+ uint64_t l_2015 = 8UL;
+ int32_t l_2019 = 8L;
+ int32_t l_2020 = 0x34E658EBL;
+ uint32_t l_2021 = 0UL;
+ uint16_t *l_2034 = &g_444;
+ uint16_t *l_2037 = &g_1743;
+ int32_t *l_2038 = &g_1007;
+ int32_t *l_2039 = &g_223.f0;
+ int i;
+ for (i = 0; i < 3; i++)
+ l_2009[i] = &g_1232;
+ l_2015++;
+ --l_2021;
+ (*l_2008) |= (safe_add_func_int64_t_s_s(((((l_2026 ^= 0x41L) & l_1977[2]) < ((*l_2003) && (l_2029[2] & (((safe_sub_func_int8_t_s_s((+(*l_2003)), ((safe_mul_func_uint16_t_u_u(((*l_2037) |= (++(*l_2034))), 0x45A3L)) < ((((*l_2039) = ((*l_2038) = g_92)) , (*l_2003)) ^ (l_1999 , g_1574[1].f1))))) , (void*)0) != (void*)0)))) <= 0x9A7C15D3L), l_1977[1]));
+ if (l_2018[3][2][5])
+ continue;
+ }
+ if (((safe_div_func_uint16_t_u_u((255UL > (safe_lshift_func_int16_t_s_s((l_2029[2] ^ (((((safe_rshift_func_uint16_t_u_s((0x41132324FECFB523LL > ((safe_lshift_func_uint16_t_u_s((0L && ((((**g_819) , ((safe_add_func_int64_t_s_s(g_1198[5][5], (safe_mul_func_int8_t_s_s((((*l_2063) = (safe_add_func_int32_t_s_s((&g_1075 == l_2054), (safe_rshift_func_int16_t_s_s((safe_sub_func_uint8_t_u_u((!(safe_mod_func_int64_t_s_s((((*g_318) >= l_2018[3][2][5]) >= 4294967287UL), l_2061))), 0x8EL)), l_2062))))) , l_2064), 0x8CL)))) ^ l_2029[2])) >= l_1982) | l_2065)), l_1967[1])) , l_2066[0][1][6])), 8)) > l_2026) , l_1977[3]) >= (*g_1502)) , l_2067)), 15))), l_2010)) || l_2018[3][2][5]))
+ { /* block id: 905 */
+ int32_t l_2068 = 3L;
+ int32_t *l_2069[9][7] = {{&l_2018[3][2][5],&l_2013,&l_2012,&l_2012,&l_2013,&l_2018[3][2][5],&l_2013},{&g_111[1][3],&l_1982,&l_2012,&g_1232,(void*)0,&g_1232,&l_2012},{&l_2013,&l_2013,&l_2018[3][2][5],&l_2012,&l_2018[3][2][5],&l_2013,&l_2013},{&l_1982,&l_1982,&l_2013,&l_1982,&l_1982,&g_1232,&l_2012},{&l_2018[5][2][3],&l_2013,&l_2018[5][2][3],&l_2018[3][2][5],&l_2018[3][2][5],&l_2018[5][2][3],&l_2013},{&l_2012,(void*)0,&l_2013,&l_2014,(void*)0,&l_1982,(void*)0},{&l_2018[5][2][3],&l_2018[3][2][5],&l_2018[3][2][5],&l_2018[5][2][3],&l_2013,&l_2018[5][2][3],&l_2018[3][2][5]},{&l_1982,&g_1232,&l_2012,(void*)0,&g_111[1][3],&l_1982,&l_2012},{&l_2018[3][2][5],&l_2018[5][2][3],&l_2013,&l_2018[5][2][3],&l_2018[3][2][5],&l_2018[3][2][5],&l_2018[5][2][3]}};
+ int32_t l_2105 = 0L;
+ uint64_t l_2106 = 18446744073709551611UL;
+ uint16_t **l_2108 = &l_2076[0];
+ int16_t *l_2134 = &g_75;
+ int64_t l_2172 = (-1L);
+ int16_t l_2221 = 1L;
+ int32_t l_2230 = (-10L);
+ int8_t l_2237 = 0x72L;
+ int32_t l_2286 = 1L;
+ int i, j;
+ l_2070 = l_2068;
+ if (l_2071)
+ { /* block id: 907 */
+ uint16_t * const *l_2078[4][10][6] = {{{&l_2076[0],&l_2076[0],&l_2076[0],&l_2076[0],&l_2076[3],&l_2076[0]},{&l_2076[0],(void*)0,&l_2076[0],&l_2076[3],&l_2076[0],&l_2076[1]},{&l_2076[0],(void*)0,&l_2076[0],&l_2076[0],(void*)0,&l_2076[0]},{&l_2076[0],&l_2076[0],&l_2076[0],&l_2076[3],&l_2076[0],&l_2076[0]},{&l_2076[0],&l_2076[2],&l_2076[0],(void*)0,&l_2076[0],&l_2076[0]},{&l_2076[0],&l_2076[1],(void*)0,&l_2076[3],&l_2076[0],(void*)0},{&l_2076[0],&l_2076[0],&l_2076[0],&l_2076[0],&l_2076[0],&l_2076[0]},{&l_2076[0],&l_2076[0],&l_2076[0],&l_2076[3],&l_2076[0],&l_2076[3]},{&l_2076[0],&l_2076[0],&l_2076[1],&l_2076[0],&l_2076[0],&l_2076[0]},{&l_2076[0],&l_2076[1],&l_2076[1],&l_2076[0],(void*)0,(void*)0}},{{&l_2076[1],&l_2076[1],(void*)0,&l_2076[0],&l_2076[0],&l_2076[0]},{&l_2076[1],&l_2076[0],&l_2076[1],&l_2076[0],&l_2076[1],&l_2076[3]},{&l_2076[1],&l_2076[0],&l_2076[0],&l_2076[0],&l_2076[0],&l_2076[0]},{&l_2076[0],&l_2076[3],&l_2076[0],&l_2076[0],&l_2076[3],&l_2076[0]},{(void*)0,&l_2076[3],&l_2076[0],&l_2076[0],&l_2076[0],&l_2076[3]},{&l_2076[3],(void*)0,&l_2076[1],&l_2076[0],&l_2076[0],&l_2076[0]},{&l_2076[0],&l_2076[0],(void*)0,&l_2076[0],&l_2076[2],(void*)0},{&l_2076[3],&l_2076[0],&l_2076[1],(void*)0,(void*)0,&l_2076[0]},{&l_2076[3],&l_2076[0],&l_2076[1],&l_2076[0],&l_2076[3],&l_2076[3]},{&l_2076[1],&l_2076[0],&l_2076[0],&l_2076[3],&l_2076[0],&l_2076[0]}},{{&l_2076[1],&l_2076[0],&l_2076[0],&l_2076[1],&l_2076[3],(void*)0},{&l_2076[3],&l_2076[0],(void*)0,&l_2076[0],&l_2076[3],&l_2076[0]},{&l_2076[0],&l_2076[0],&l_2076[0],&l_2076[0],&l_2076[3],&l_2076[0]},{&l_2076[2],&l_2076[0],&l_2076[0],&l_2076[0],&l_2076[3],&l_2076[0]},{&l_2076[0],&l_2076[0],&l_2076[0],&l_2076[0],&l_2076[0],&l_2076[1]},{&l_2076[0],&l_2076[0],&l_2076[0],&l_2076[0],&l_2076[3],&l_2076[0]},{&l_2076[3],&l_2076[0],&l_2076[0],&l_2076[0],(void*)0,&l_2076[0]},{&l_2076[3],&l_2076[0],&l_2076[0],&l_2076[0],&l_2076[2],&l_2076[0]},{&l_2076[0],&l_2076[0],&l_2076[0],&l_2076[1],&l_2076[0],&l_2076[1]},{&l_2076[2],(void*)0,&l_2076[2],&l_2076[0],&l_2076[0],&l_2076[0]}},{{&l_2076[3],&l_2076[0],&l_2076[3],(void*)0,(void*)0,&l_2076[0]},{&l_2076[1],&l_2076[0],&l_2076[0],(void*)0,&l_2076[0],(void*)0},{&l_2076[3],&l_2076[0],&l_2076[0],(void*)0,&l_2076[3],&l_2076[0]},{&l_2076[3],&l_2076[3],&l_2076[0],&l_2076[0],&l_2076[0],&l_2076[0]},{&l_2076[0],&l_2076[3],&l_2076[0],&l_2076[0],&l_2076[0],&l_2076[1]},{&l_2076[0],&l_2076[0],&l_2076[3],&l_2076[0],&l_2076[1],&l_2076[0]},{&l_2076[1],&l_2076[0],&l_2076[2],&l_2076[0],&l_2076[0],(void*)0},{&l_2076[0],&l_2076[0],&l_2076[0],&l_2076[1],&l_2076[1],&l_2076[0]},{&l_2076[0],&l_2076[0],(void*)0,&l_2076[2],(void*)0,&l_2076[0]},{(void*)0,&l_2076[3],&l_2076[1],&l_2076[0],(void*)0,(void*)0}}};
+ uint16_t * const **l_2077[9];
+ union U1 l_2097 = {4294967287UL};
+ int64_t *l_2098[5][10] = {{&l_1967[0],&g_1399[2][0][3],(void*)0,&l_2071,(void*)0,&g_1399[2][0][3],&l_1967[0],&l_1967[0],&g_1399[2][0][3],(void*)0},{&g_1399[2][0][3],&l_1967[0],&l_1967[0],&g_1399[2][0][3],(void*)0,&l_2071,(void*)0,&g_1399[2][0][3],&l_1967[0],&l_1967[0]},{(void*)0,&l_1967[0],&l_1967[0],&l_2071,&l_2071,&l_1967[0],&l_1967[0],(void*)0,&l_1967[0],&l_1967[0]},{&l_2071,&g_1399[2][0][3],&l_2071,&g_1399[2][0][3],&l_2071,&l_1967[0],&l_1967[0],&l_2071,&g_1399[2][0][3],&l_2071},{(void*)0,(void*)0,&l_2071,&l_2071,&g_1399[2][0][3],&l_2071,&l_2071,(void*)0,(void*)0,&l_2071}};
+ int16_t *l_2100 = &g_75;
+ int16_t *l_2101 = (void*)0;
+ int16_t *l_2102 = (void*)0;
+ int16_t *l_2103[4][8] = {{(void*)0,&g_507,&g_507,&g_507,&g_507,&g_507,&g_507,&g_507},{&g_507,&g_507,&g_507,&g_507,(void*)0,(void*)0,&g_507,&g_507},{&g_507,&g_507,&g_507,&g_507,&g_507,&g_507,&g_507,(void*)0},{&g_507,&g_507,&g_507,(void*)0,(void*)0,(void*)0,(void*)0,&g_507}};
+ int64_t **l_2112 = &l_2098[4][0];
+ int64_t **l_2113 = (void*)0;
+ int64_t *l_2114 = &l_2071;
+ int16_t l_2133 = 0x534CL;
+ int i, j, k;
+ for (i = 0; i < 9; i++)
+ l_2077[i] = &l_2078[3][8][1];
+ l_2097.f1 = ((safe_sub_func_uint8_t_u_u((((*g_225) , (((void*)0 == &g_319) | ((l_2104 &= (((g_93 && 254UL) , ((l_2074[2][7] == (g_2079[3][8] = l_2077[8])) != (~l_2018[2][1][2]))) , ((*l_2100) = (((safe_mod_func_int32_t_s_s(((safe_mul_func_uint8_t_u_u((((safe_rshift_func_int8_t_s_u(((safe_mul_func_uint8_t_u_u(((l_2018[3][2][5] = ((safe_lshift_func_uint16_t_u_s((safe_sub_func_uint16_t_u_u((safe_sub_func_uint64_t_u_u(((l_2096[3] , l_2097) , l_2097.f0), 1L)), l_2097.f1)), 12)) <= 0x6B0AE9BDFA119AC2LL)) && 0xE2F6AABA98EB6A18LL), g_1198[8][5])) , l_2097.f0), 3)) > l_2097.f0) , 255UL), 0xAAL)) < l_2099[0][4][2]), l_2061)) == l_2026) ^ 0xABAFL)))) , (**g_930)))) > l_2097.f1), l_2105)) == l_2106);
+ l_2014 = (l_2018[3][2][5] = (l_2099[0][4][2] != (l_2107 , (((g_2109 = l_2108) != l_2111) < ((**g_930) = (4UL <= ((((*l_2112) = l_2098[1][5]) == (l_2115 = (l_2114 = &g_1399[0][0][0]))) != ((g_2120 = (safe_sub_func_int64_t_s_s(l_2065, (safe_div_func_uint16_t_u_u(l_2065, l_2067))))) == l_2097.f1))))))));
+ l_1982 ^= (safe_lshift_func_uint16_t_u_u(l_2123[6], 14));
+ if ((safe_lshift_func_uint16_t_u_u((--(*g_2110)), l_2070)))
+ { /* block id: 923 */
+ int8_t l_2130 = 0xA8L;
+ int16_t **l_2135 = &l_2100;
+ int32_t l_2138 = 0x0DE8473CL;
+ l_2138 ^= ((safe_sub_func_uint64_t_u_u(((l_2130 | (safe_lshift_func_int8_t_s_s(g_706, 1))) >= (l_2133 == (((*l_2135) = l_2134) == &g_75))), (safe_sub_func_int16_t_s_s(1L, 0x844EL)))) && l_2018[4][2][3]);
+ }
+ else
+ { /* block id: 926 */
+ for (l_2013 = 0; (l_2013 <= 9); l_2013 += 1)
+ { /* block id: 929 */
+ return g_223.f4;
+ }
+ for (l_2014 = 25; (l_2014 == (-20)); l_2014 = safe_sub_func_int32_t_s_s(l_2014, 4))
+ { /* block id: 934 */
+ uint32_t l_2143 = 4294967289UL;
+ l_2143 = ((safe_sub_func_uint32_t_u_u((*g_1502), (l_2070 | l_2097.f1))) < l_2010);
+ }
+ l_2097.f1 = 0L;
+ }
+ }
+ else
+ { /* block id: 939 */
+ int8_t *l_2149 = (void*)0;
+ int8_t *l_2150 = &g_479;
+ int8_t *l_2151 = (void*)0;
+ int8_t *l_2152[4][9] = {{&g_226.f1,&g_231[2][3][1].f1,&g_226.f1,&g_231[2][3][1].f1,&g_226.f1,&g_231[2][3][1].f1,&g_226.f1,&g_231[2][3][1].f1,&g_226.f1},{&g_226.f1,&l_2029[4],&l_2029[4],&g_226.f1,&g_226.f1,&l_2029[4],&l_2029[4],&g_226.f1,&g_226.f1},{&g_231[2][3][1].f1,&g_231[2][3][1].f1,&g_231[2][3][1].f1,&g_231[2][3][1].f1,&g_231[2][3][1].f1,&g_231[2][3][1].f1,&g_231[2][3][1].f1,&g_231[2][3][1].f1,&g_231[2][3][1].f1},{&g_226.f1,&g_226.f1,&l_2029[4],&l_2029[4],&g_226.f1,&g_226.f1,&l_2029[4],&l_2029[4],&g_226.f1}};
+ int32_t l_2153 = 0x98A48BC2L;
+ uint64_t ***l_2167 = &l_2165;
+ uint32_t ***l_2182 = &g_911;
+ uint32_t ****l_2181 = &l_2182;
+ uint8_t l_2199 = 0xADL;
+ int32_t l_2216 = 0xFB679376L;
+ int32_t l_2220 = 0xC71D761AL;
+ int32_t l_2223 = 0xB664C4E1L;
+ int32_t l_2228[10] = {7L,0L,5L,0L,7L,7L,0L,5L,0L,7L};
+ int8_t l_2231[6][6][4] = {{{0L,0x8DL,0x8DL,0x98L},{0x62L,0x06L,1L,0x83L},{0x97L,0x99L,0x31L,0xBBL},{0L,1L,0x17L,0xBBL},{0x9FL,0x99L,0L,0x83L},{(-9L),0x06L,0xD0L,0x98L}},{{0x47L,4L,0x97L,(-9L)},{0x99L,8L,1L,0x8AL},{0x06L,0x17L,0x74L,0xABL},{0xFDL,0x83L,0x83L,7L},{4L,0x31L,0L,(-9L)},{1L,0x83L,1L,(-1L)}},{{(-1L),0L,(-1L),0x9FL},{0x8AL,0L,0x83L,(-6L)},{0x1BL,(-9L),0L,0L},{(-6L),0L,0L,0xD0L},{0x1BL,1L,0x83L,4L},{0x8AL,(-10L),(-1L),(-9L)}},{{(-1L),(-9L),1L,0xFDL},{1L,0x98L,0L,0x17L},{4L,0L,0x83L,0x62L},{0xFDL,8L,0x74L,1L},{0x06L,0x1BL,1L,1L},{0x99L,(-9L),0x97L,0x97L}},{{0x47L,0x47L,0xD0L,0L},{(-9L),(-1L),0L,0x06L},{0x9FL,0x97L,0x17L,0L},{0L,0x97L,0x31L,0x06L},{0x97L,(-1L),1L,0L},{0x62L,0x47L,4L,0x97L}},{{0x98L,(-9L),0x62L,1L},{0x17L,0x1BL,(-9L),1L},{7L,8L,0x9FL,0x62L},{(-1L),0L,1L,0x17L},{8L,0x98L,7L,0xFDL},{(-10L),(-9L),(-6L),(-9L)}}};
+ int i, j, k;
+ l_2018[3][2][5] ^= (0x7276L <= ((void*)0 != g_2144));
+ l_1982 = (safe_rshift_func_int8_t_s_u((l_2153 = ((*l_2150) = ((safe_mod_func_uint64_t_u_u((*g_318), 18446744073709551613UL)) != g_231[2][3][1].f1))), 0));
+ if ((((g_9 = l_2156) == (void*)0) < ((((((g_319 , (((*g_2110) = (safe_div_func_int64_t_s_s(((g_444 , (((safe_rshift_func_uint8_t_u_u((*g_931), 3)) , ((safe_lshift_func_uint16_t_u_u(((((!g_319) >= ((((*l_2167) = l_2165) != l_2168[3]) < (safe_add_func_int32_t_s_s(0x4BE7EAE3L, 0xE2FB1C89L)))) | 18446744073709551615UL) , l_2153), l_2153)) == 0UL)) , l_2026)) > 0xD9F5L), g_1864[1][2][0]))) >= l_2171)) < g_319) , (-5L)) || l_2172) ^ 0x99E19607FCAEFB6CLL) != l_2065)))
+ { /* block id: 947 */
+ for (g_375 = 0; (g_375 <= 0); g_375 += 1)
+ { /* block id: 950 */
+ uint64_t l_2173 = 0x7E0A1EE474B83E5FLL;
+ --l_2173;
+ }
+ for (l_2070 = 0; (l_2070 <= 1); l_2070 += 1)
+ { /* block id: 955 */
+ union U2 *l_2178 = &g_223;
+ uint32_t *****l_2183 = &l_2181;
+ int16_t *l_2187 = &g_507;
+ uint16_t **l_2188 = &l_2076[2];
+ int32_t l_2189 = 0L;
+ union U2 **l_2191 = &g_9;
+ int i;
+ if (l_1967[l_2070])
+ break;
+ l_2018[3][2][5] = ((**g_930) | 1UL);
+ }
+ for (l_2068 = 0; l_2068 < 8; l_2068 += 1)
+ {
+ for (g_375 = 0; g_375 < 5; g_375 += 1)
+ {
+ for (l_2012 = 0; l_2012 < 2; l_2012 += 1)
+ {
+ g_1948[l_2068][g_375][l_2012] = &l_1982;
+ }
+ }
+ }
+ }
+ else
+ { /* block id: 968 */
+ int32_t *l_2200 = (void*)0;
+ int32_t l_2217 = 0x4FE96332L;
+ int32_t l_2218 = (-10L);
+ int32_t l_2219 = 0x079E3D68L;
+ int32_t l_2222[5];
+ uint32_t l_2224 = 0x695369B6L;
+ int i;
+ for (i = 0; i < 5; i++)
+ l_2222[i] = 0x0EC35639L;
+ if (((safe_mod_func_uint8_t_u_u(l_1999, (safe_mul_func_uint8_t_u_u((*g_931), (safe_lshift_func_int16_t_s_s((-3L), 5)))))) , l_2198[0]))
+ { /* block id: 969 */
+ return l_2199;
+ }
+ else
+ { /* block id: 971 */
+ int32_t **l_2201 = &l_2200;
+ (*l_2201) = l_2200;
+ l_2208 ^= (((safe_lshift_func_int16_t_s_s(((*l_2134) &= ((l_2204 = &g_1459) == l_2205)), 11)) <= (l_2070 <= (safe_rshift_func_int16_t_s_u(0xCB44L, 15)))) , (~0xF110CC3CL));
+ }
+ for (g_223.f2 = (-12); (g_223.f2 == 7); g_223.f2++)
+ { /* block id: 979 */
+ int16_t l_2211 = 1L;
+ uint32_t * const **l_2213 = &g_2212;
+ l_2153 = l_2211;
+ l_2153 = (0x968C6B2DL & (((*l_2213) = g_2212) != (void*)0));
+ if (g_627)
+ goto lbl_2214;
+ if (l_2215)
+ continue;
+ }
+ ++l_2224;
+ }
+ ++l_2232;
+ }
+ for (g_147 = 2; (g_147 != (-18)); g_147 = safe_sub_func_int16_t_s_s(g_147, 9))
+ { /* block id: 992 */
+ int32_t l_2249 = (-4L);
+ int32_t l_2267 = 0x9D46F976L;
+ int32_t l_2268[10] = {0x5F78B802L,0L,0L,0L,0L,0x5F78B802L,0L,0L,0L,0L};
+ int i;
+ --l_2239;
+ }
+ }
+ else
+ { /* block id: 1030 */
+ const int32_t l_2313[7][8][4] = {{{0L,0xC17774FEL,0x22684D08L,(-1L)},{(-5L),0xCB537E5CL,0xCF8749F9L,0x5B8E73CDL},{0x24574F0DL,0x0B1950AEL,0x37612EECL,0x5B8E73CDL},{0xD050476FL,0xCB537E5CL,0x549F2490L,(-1L)},{8L,0xC17774FEL,4L,0xCB537E5CL},{(-1L),(-4L),0L,0x24574F0DL},{0x22684D08L,0x72EECBFFL,0x549F2490L,7L},{0x6AEDCBCAL,(-5L),1L,(-5L)}},{{0x24574F0DL,0x549F2490L,0xD050476FL,0xC17774FEL},{0x549F2490L,0x72EECBFFL,0x22684D08L,0x9AA1FD11L},{(-4L),0x6DDE5AC8L,0x5B8E73CDL,(-4L)},{(-4L),4L,1L,(-1L)},{0xD168EDB2L,(-4L),1L,5L},{7L,(-1L),0xC17774FEL,0x549F2490L},{0x22684D08L,0x2E56501BL,0xD168EDB2L,(-1L)},{1L,0L,0x2E56501BL,0x2E56501BL}},{{0x6DDE5AC8L,0x6DDE5AC8L,(-1L),7L},{0x37612EECL,0xCF8749F9L,0xD168EDB2L,0L},{1L,0x0B1950AEL,0x9AA1FD11L,0xD168EDB2L},{7L,0x0B1950AEL,8L,0L},{0x0B1950AEL,0xCF8749F9L,1L,7L},{0x2E56501BL,0x6DDE5AC8L,(-1L),0x2E56501BL},{(-4L),0L,0x24574F0DL,(-1L)},{0x0B1950AEL,0x2E56501BL,1L,0x549F2490L}},{{0x9AA1FD11L,(-1L),0x9AA1FD11L,5L},{0x22684D08L,(-4L),0L,(-1L)},{0x37612EECL,4L,0x2E56501BL,(-4L)},{(-1L),0x6DDE5AC8L,0x2E56501BL,0x9AA1FD11L},{0x37612EECL,0xD050476FL,0L,0L},{0x22684D08L,0xD168EDB2L,0x9AA1FD11L,0x0B1950AEL},{0x9AA1FD11L,0x0B1950AEL,1L,4L},{0x0B1950AEL,0xD050476FL,0x24574F0DL,7L}},{{(-4L),(-1L),(-1L),(-4L)},{0x2E56501BL,0L,1L,(-8L)},{0x0B1950AEL,(-4L),8L,0x549F2490L},{7L,0x247ABAC3L,0x9AA1FD11L,0x549F2490L},{1L,(-4L),0xD168EDB2L,(-8L)},{0x37612EECL,0L,(-1L),(-4L)},{0x6DDE5AC8L,(-1L),0x2E56501BL,7L},{1L,0xD050476FL,0xD168EDB2L,4L}},{{0x22684D08L,0x0B1950AEL,0xC17774FEL,0x0B1950AEL},{7L,0xD168EDB2L,1L,0L},{0xD168EDB2L,0xD050476FL,1L,0x9AA1FD11L},{(-4L),0x6DDE5AC8L,0x5B8E73CDL,(-4L)},{(-4L),4L,1L,(-1L)},{0xD168EDB2L,(-4L),1L,5L},{7L,(-1L),0xC17774FEL,0x549F2490L},{0x22684D08L,0x2E56501BL,0xD168EDB2L,(-1L)}},{{1L,0L,0x2E56501BL,0x2E56501BL},{0x6DDE5AC8L,0x6DDE5AC8L,(-1L),7L},{0x37612EECL,0xCF8749F9L,0xD168EDB2L,0L},{1L,0x0B1950AEL,0x9AA1FD11L,0xD168EDB2L},{7L,0x0B1950AEL,8L,0L},{0x0B1950AEL,0xCF8749F9L,1L,7L},{0x2E56501BL,0x6DDE5AC8L,(-1L),0x2E56501BL},{(-4L),0L,0x24574F0DL,(-1L)}}};
+ union U1 ***l_2318 = &g_2317[2];
+ uint8_t *l_2319 = &l_2026;
+ uint32_t l_2320 = 18446744073709551615UL;
+ int i, j, k;
+ if (((safe_div_func_int8_t_s_s((&g_149 != (void*)0), ((((((safe_add_func_uint64_t_u_u((l_2313[5][1][3] , ((((l_2305[3] >= ((*g_318) ^ (safe_rshift_func_uint16_t_u_u((g_2316 != l_2318), 6)))) < l_2313[5][1][3]) , l_2319) == &l_1977[3])), 0x27D3C5AEB2740B3BLL)) & 0L) <= l_2313[5][1][3]) > l_2313[5][1][3]) & l_2320) | (*g_318)))) , l_2313[5][1][3]))
+ { /* block id: 1031 */
+ int32_t *l_2321 = &l_2012;
+ if (l_2010)
+ goto lbl_2214;
+ (*l_2321) |= 0x8BD5E6EBL;
+ (*l_2321) &= 0x7E3A8021L;
+ }
+ else
+ { /* block id: 1035 */
+ int32_t *l_2323[1][1][10] = {{{&l_2012,(void*)0,(void*)0,&l_2012,(void*)0,(void*)0,(void*)0,&g_111[6][3],&g_111[6][3],(void*)0}}};
+ int32_t **l_2322 = &l_2323[0][0][1];
+ int i, j, k;
+ (*l_2322) = &l_2018[5][0][0];
+ return g_101;
+ }
+ return g_93;
+ }
+ }
+ return g_1232;
+}
+
+
+/* ------------------------------------------ */
+/*
+ * reads :
+ * writes:
+ */
+static union U2 * const func_3(union U1 p_4, int16_t p_5)
+{ /* block id: 878 */
+ int32_t *l_1968[4][3][10] = {{{&g_89,&g_111[3][5],&g_111[7][8],&g_111[3][5],&g_89,&g_92,(void*)0,(void*)0,&g_111[1][5],&g_111[1][3]},{&g_111[3][5],&g_89,&g_92,(void*)0,&g_111[1][3],&g_89,&g_111[0][6],(void*)0,&g_92,&g_111[1][3]},{&g_111[1][3],(void*)0,&g_111[7][7],&g_92,&g_89,&g_111[7][8],&g_89,&g_89,&g_111[7][8],&g_89}},{{(void*)0,(void*)0,(void*)0,(void*)0,&g_92,&g_111[0][6],&g_1232,&g_89,(void*)0,&g_111[3][5]},{&g_111[1][3],&g_111[1][3],&g_111[3][5],&g_1232,&g_89,(void*)0,(void*)0,&g_1232,(void*)0,&g_111[1][3]},{(void*)0,&g_92,&g_111[1][3],(void*)0,&g_111[7][8],&g_92,(void*)0,&g_92,&g_111[7][8],(void*)0}},{{&g_111[1][5],&g_89,&g_111[1][5],&g_92,&g_111[0][6],(void*)0,&g_111[1][3],&g_1232,&g_92,&g_111[1][3]},{&g_1232,&g_89,&g_111[0][6],(void*)0,(void*)0,&g_111[1][3],&g_92,&g_1232,&g_111[1][5],(void*)0},{(void*)0,&g_111[0][6],&g_111[1][5],&g_111[3][5],&g_92,&g_1232,&g_1232,&g_92,&g_111[3][5],&g_111[1][5]}},{{&g_92,&g_92,&g_111[1][3],(void*)0,(void*)0,&g_111[3][5],&g_111[1][3],&g_1232,&g_89,&g_1232},{&g_89,&g_111[7][7],&g_111[3][5],&g_111[0][6],&g_111[1][3],&g_111[1][3],&g_111[1][3],&g_89,(void*)0,(void*)0},{&g_111[6][8],&g_92,(void*)0,&g_89,&g_1232,&g_1232,&g_1232,&g_89,(void*)0,&g_92}}};
+ int32_t **l_1969 = &l_1968[1][0][7];
+ union U2 * const l_1970 = &g_223;
+ int i, j, k;
+ (*l_1969) = l_1968[3][2][3];
+ return l_1970;
+}
+
+
+/* ------------------------------------------ */
+/*
+ * reads : g_2 g_53 g_54 g_231.f1 g_223.f4 g_318 g_319 g_10 g_706 g_428 g_92 g_444 g_10.f4 g_89 g_111 g_149 g_93 g_225 g_226 g_223.f0 g_428.f0 g_223.f3 g_930 g_931 g_627 g_912 g_911 g_1007 g_226.f2 g_244 g_245 g_1074 g_147 g_101 g_375 g_1198 g_604 g_814.f0 g_229 g_222 g_223 g_75 g_814.f1 g_902 g_223.f1 g_1232 g_9 g_255.f0 g_1502 g_1574 g_479 g_1695
+ * writes: g_9 g_49 g_2 g_53 g_706 g_444 g_93 g_245 g_223.f0 g_149 g_111 g_223.f3 g_75 g_226.f2 g_89 g_507 g_479 g_147 g_1198 g_54 g_1399 g_231.f1 g_1502 g_931 g_92 g_1232 g_375 g_10.f3
+ */
+static union U1 func_6(union U2 * p_7, const int64_t p_8)
+{ /* block id: 3 */
+ int16_t l_13[5][4][3] = {{{0xF903L,1L,0xF6B3L},{0x35D5L,0L,(-1L)},{(-1L),(-1L),0x6B5BL},{1L,(-1L),0xD9DCL}},{{0L,0L,(-1L)},{0xAF87L,1L,8L},{(-1L),0L,(-1L)},{0x713EL,0xD9DCL,0xD9DCL}},{{(-1L),0xF903L,0x6B5BL},{(-1L),0x6B5BL,(-1L)},{0x713EL,1L,0xF6B3L},{(-1L),0xAF87L,1L}},{{0xAF87L,1L,0x35D5L},{0L,0x6B5BL,0L},{1L,0xF903L,0L},{(-1L),0xD9DCL,0x35D5L}},{{0x35D5L,0L,1L},{0xF903L,1L,0xF6B3L},{0x35D5L,0L,(-1L)},{(-1L),(-1L),0x6B5BL}}};
+ union U2 *l_19 = &g_10[0];
+ union U2 **l_39 = &g_9;
+ union U1 l_44 = {0UL};
+ union U1 *l_45 = &l_44;
+ int64_t *l_48 = &g_49;
+ uint8_t *l_50 = &g_2;
+ uint8_t *l_51 = (void*)0;
+ uint8_t *l_52 = &g_53[1];
+ union U0 l_675[7][2] = {{{1L},{1L}},{{1L},{1L}},{{1L},{1L}},{{1L},{1L}},{{1L},{1L}},{{1L},{1L}},{{1L},{1L}}};
+ union U1 l_1377 = {1UL};
+ uint16_t ***l_1529 = (void*)0;
+ uint16_t **** const l_1528[1] = {&l_1529};
+ int32_t *l_1542 = (void*)0;
+ int32_t *l_1550 = &g_1232;
+ int8_t *l_1555[8];
+ uint64_t *l_1556 = &g_10[9].f3;
+ uint64_t *l_1557[3];
+ int16_t ** const l_1561 = &g_136[1][4];
+ int32_t l_1672 = 0xE1877820L;
+ int32_t l_1673 = 5L;
+ int16_t l_1674 = 0xF8F5L;
+ int32_t l_1675 = (-10L);
+ int32_t l_1676 = 0xEAAD7C91L;
+ int32_t l_1677[7][2] = {{0L,0L},{0L,0L},{0L,7L},{0L,0L},{0L,0L},{0L,0L},{7L,0L}};
+ int8_t l_1691[1];
+ int32_t l_1694 = 1L;
+ int32_t l_1697 = (-9L);
+ int16_t l_1698 = (-1L);
+ uint32_t l_1699 = 0xEC9D5EB3L;
+ uint8_t l_1731 = 6UL;
+ union U2 l_1738 = {1L};
+ uint32_t ***l_1778 = &g_911;
+ union U1 **l_1828 = &l_45;
+ union U1 ***l_1827 = &l_1828;
+ uint32_t l_1855 = 9UL;
+ const uint64_t *l_1863 = &g_1864[1][0][1];
+ union U2 ***l_1904 = &g_54;
+ union U2 ****l_1903 = &l_1904;
+ int32_t l_1911[2][6][2] = {{{0x3EBE484EL,0x9E187370L},{3L,0x9E187370L},{0x3EBE484EL,3L},{1L,1L},{1L,3L},{0x3EBE484EL,0x9E187370L}},{{3L,0x9E187370L},{0x3EBE484EL,3L},{1L,1L},{1L,3L},{0x3EBE484EL,0x9E187370L},{3L,0x9E187370L}}};
+ union U0 l_1940 = {0xFC0AL};
+ uint64_t l_1951 = 18446744073709551613UL;
+ int i, j, k;
+ for (i = 0; i < 8; i++)
+ l_1555[i] = &g_229[0][0][3].f1;
+ for (i = 0; i < 3; i++)
+ l_1557[i] = &g_223.f3;
+ for (i = 0; i < 1; i++)
+ l_1691[i] = (-2L);
+ if ((safe_mul_func_uint8_t_u_u(0x1AL, (l_13[1][0][1] & (safe_div_func_uint64_t_u_u(func_16((g_2 , (l_13[3][2][0] <= (l_19 == (func_20(((safe_mul_func_int16_t_s_s(((safe_mod_func_int8_t_s_s(func_26((func_33(((*l_39) = &g_10[9]), func_40((((*l_52) &= ((*l_50) = (!((((l_13[1][0][1] >= (((*l_45) = l_44) , ((safe_mod_func_int64_t_s_s(((*l_48) = (&g_10[1] == l_19)), p_8)) && l_13[1][0][2]))) , l_13[2][2][1]) ^ 0x68L) > l_13[3][0][2])))) , (void*)0), g_54, p_7), l_675[6][1], l_13[3][0][2], l_19) <= 0UL), g_223.f4, (*g_318), (*l_19)), p_8)) <= p_8), 0x6D7BL)) , p_7)) , (void*)0)))), l_1377), 0xC3FDE676F061A725LL))))))
+ { /* block id: 645 */
+ int16_t l_1486 = 0x7754L;
+ uint8_t **l_1493 = &g_931;
+ uint32_t *l_1500 = &l_1377.f0;
+ uint32_t **l_1501[7][5][6] = {{{&l_1500,&g_912,&l_1500,&l_1500,(void*)0,(void*)0},{(void*)0,&g_912,&g_912,&l_1500,&l_1500,&g_912},{&l_1500,&l_1500,&l_1500,&l_1500,&l_1500,(void*)0},{&l_1500,(void*)0,(void*)0,&g_912,(void*)0,&l_1500},{&l_1500,&l_1500,(void*)0,&g_912,&l_1500,(void*)0}},{{&l_1500,&g_912,&l_1500,(void*)0,&l_1500,&g_912},{(void*)0,&l_1500,&g_912,&l_1500,&g_912,(void*)0},{&g_912,&l_1500,&l_1500,&l_1500,&l_1500,&l_1500},{&l_1500,&g_912,&g_912,&g_912,(void*)0,&l_1500},{&l_1500,&l_1500,&g_912,&g_912,(void*)0,(void*)0}},{{&l_1500,&l_1500,&l_1500,&g_912,(void*)0,&g_912},{(void*)0,&g_912,&l_1500,&g_912,&l_1500,&l_1500},{(void*)0,&l_1500,&l_1500,&g_912,&g_912,&g_912},{&g_912,&l_1500,&g_912,&g_912,&l_1500,&g_912},{&g_912,&g_912,&g_912,&g_912,&l_1500,&l_1500}},{{(void*)0,&l_1500,&l_1500,&g_912,(void*)0,&g_912},{(void*)0,(void*)0,&g_912,&g_912,&l_1500,&l_1500},{&g_912,&l_1500,&l_1500,&g_912,&l_1500,&g_912},{&g_912,&g_912,(void*)0,&g_912,(void*)0,&g_912},{(void*)0,&g_912,&g_912,&g_912,(void*)0,&g_912}},{{(void*)0,&g_912,&l_1500,&g_912,&l_1500,(void*)0},{&l_1500,&g_912,(void*)0,&g_912,&l_1500,(void*)0},{&l_1500,&g_912,&l_1500,&g_912,&l_1500,&g_912},{&l_1500,(void*)0,&g_912,&l_1500,&g_912,&g_912},{&g_912,&l_1500,&l_1500,&g_912,&l_1500,&l_1500}},{{(void*)0,&l_1500,&l_1500,(void*)0,(void*)0,&g_912},{&g_912,&g_912,&g_912,&l_1500,&g_912,&g_912},{&l_1500,&l_1500,&g_912,(void*)0,&g_912,&l_1500},{&l_1500,&g_912,&g_912,&g_912,(void*)0,&l_1500},{&l_1500,&l_1500,(void*)0,(void*)0,&l_1500,&l_1500}},{{&l_1500,&l_1500,(void*)0,&g_912,&l_1500,&g_912},{&l_1500,(void*)0,&l_1500,&g_912,(void*)0,&g_912},{&l_1500,&g_912,&l_1500,&g_912,&l_1500,&l_1500},{&g_912,&g_912,(void*)0,&g_912,&g_912,&g_912},{&l_1500,&g_912,(void*)0,&g_912,&l_1500,&l_1500}}};
+ int i, j, k;
+ l_1486 &= ((void*)0 == &g_931);
+ l_1377.f1 ^= (l_44.f1 &= ((safe_lshift_func_int8_t_s_u((safe_lshift_func_uint16_t_u_u((safe_div_func_uint64_t_u_u(((void*)0 != l_1493), ((safe_add_func_int16_t_s_s((safe_rshift_func_uint8_t_u_u((safe_add_func_int32_t_s_s(0xFC0D237BL, (((*g_911) == (g_1502 = l_1500)) , (l_1486 == (((*g_902) , (((void*)0 != l_1500) < p_8)) , 0L))))), (**g_930))), l_1486)) , g_1007))), p_8)), (*g_931))) & p_8));
+ }
+ else
+ { /* block id: 650 */
+ int8_t l_1503 = (-1L);
+ int8_t *l_1530 = (void*)0;
+ int32_t *l_1531 = &g_92;
+ int32_t *l_1532 = &g_1232;
+ union U1 l_1537 = {0x0E8069F6L};
+ (*l_1532) |= ((1L ^ l_1503) & ((safe_div_func_uint64_t_u_u((safe_div_func_int64_t_s_s(((l_1503 >= (-1L)) || (((((*l_1531) = ((((*g_930) = func_70(((safe_mod_func_uint32_t_u_u(p_8, (safe_rshift_func_int16_t_s_u(((l_44.f1 = (safe_mul_func_uint8_t_u_u((((*l_48) = ((safe_div_func_uint16_t_u_u((+0xA86AL), (safe_rshift_func_int16_t_s_s((safe_add_func_uint64_t_u_u((safe_div_func_int16_t_s_s(((safe_add_func_uint16_t_u_u((safe_mod_func_uint8_t_u_u((safe_mul_func_uint8_t_u_u(((void*)0 != l_1528[0]), l_44.f0)), 1L)), l_1503)) >= l_675[6][1].f0), l_1377.f1)), g_223.f1)), l_1503)))) && 0xBAL)) , l_44.f0), 0x20L))) >= p_8), 7)))) <= 65531UL), p_8, l_52)) == (void*)0) || l_1503)) && 0x71B749F4L) < 7L) <= p_8)), 0x09F26AADB4610C8FLL)), p_8)) >= 4294967292UL));
+ (*l_1531) = ((((safe_rshift_func_int16_t_s_u((((safe_mul_func_int8_t_s_s(((((((void*)0 == l_48) , ((l_1537 , (~1L)) != (safe_mul_func_uint16_t_u_u((p_8 <= ((safe_mod_func_int8_t_s_s(((void*)0 == l_1542), (((func_20((*l_39)) , (*g_318)) <= g_255.f0) | 0xDEL))) , 0x18L)), l_675[6][1].f0)))) >= p_8) < p_8) <= l_13[2][0][0]), l_675[6][1].f1)) >= 4L) < (*l_1531)), (*l_1531))) , (-1L)) & g_627) , 0x66A190CFL);
+ for (g_375 = 14; (g_375 == 5); g_375--)
+ { /* block id: 659 */
+ union U1 l_1545 = {0x21DB83E7L};
+ return l_1545;
+ }
+ }
+ (*l_1550) &= (safe_lshift_func_uint8_t_u_u((safe_rshift_func_uint8_t_u_u(((((((&g_1459 == (void*)0) && (*g_318)) , (*g_911)) == ((*l_45) , (*g_911))) <= 0xC39A113BL) == l_675[6][1].f1), 5)), 5));
+ if (((p_8 > ((l_1377.f1 ^= ((g_444 = ((safe_mul_func_int8_t_s_s(p_8, ((*l_1550) = (p_8 ^ ((*l_1550) || ((8UL == (*l_1550)) | (((*l_45) , &g_479) == l_52))))))) && g_814.f1)) && p_8)) < 0xA9CC9107554708AALL)) <= l_675[6][1].f0))
+ { /* block id: 667 */
+ int32_t *l_1558 = (void*)0;
+ l_1558 = l_1542;
+ return (*g_902);
+ }
+ else
+ { /* block id: 670 */
+ uint32_t *l_1566 = &g_375;
+ int32_t l_1569 = 0x08A23406L;
+ union U1 *l_1570 = &l_44;
+ uint32_t *l_1571 = (void*)0;
+ uint32_t *l_1572[8] = {&g_10[9].f2,&g_10[9].f2,&g_10[9].f2,&g_10[9].f2,&g_10[9].f2,&g_10[9].f2,&g_10[9].f2,&g_10[9].f2};
+ int32_t l_1573 = 0xA3C5E453L;
+ uint16_t *l_1600 = (void*)0;
+ uint16_t *l_1601 = &g_245;
+ uint32_t l_1608 = 0x9F9F4AECL;
+ int32_t l_1632[6] = {0xD2B77DEEL,0xD2B77DEEL,0x2136032EL,0xD2B77DEEL,0xD2B77DEEL,0x2136032EL};
+ int32_t ***l_1653 = (void*)0;
+ int32_t *l_1684 = &g_89;
+ int32_t l_1692 = (-1L);
+ int64_t l_1696 = 1L;
+ int16_t *l_1726 = &l_13[3][1][2];
+ int8_t *l_1770[1];
+ int8_t l_1819[9] = {0L,0L,0L,0L,0L,0L,0L,0L,0L};
+ union U0 l_1929 = {0L};
+ int32_t l_1950 = 0x0CB4EE2CL;
+ int i;
+ for (i = 0; i < 1; i++)
+ l_1770[i] = &l_1691[0];
+ if (((((*l_1556) = ((((((*g_1502) = (safe_mul_func_int8_t_s_s(((l_1561 == &g_136[5][3]) && 0x9A21L), ((((*l_1550) |= (+((l_1569 = (safe_lshift_func_uint16_t_u_s((((safe_mod_func_uint32_t_u_u((l_1566 == (void*)0), p_8)) == (safe_sub_func_int16_t_s_s(l_1569, (1UL >= ((g_1198[6][4] , l_1570) == l_1570))))) > 0L), l_1569))) , 65535UL))) && 0x1566L) >= l_1573)))) > l_1573) & l_1573) | p_8) == (*g_931))) , 0L) > l_1573))
+ { /* block id: 675 */
+ return g_1574[1];
+ }
+ else
+ { /* block id: 677 */
+ union U1 **l_1595 = &g_1459;
+ int32_t l_1596 = 0x29729CF3L;
+ int32_t *l_1612 = &l_1596;
+ int8_t l_1655 = 0L;
+ int32_t l_1669 = 0x1660C04CL;
+ int32_t l_1670[8][7][3] = {{{0x3317BB98L,(-3L),0x534DB89AL},{0xF05BDE44L,0xD135A330L,0x4166F292L},{0x7DC4BDB8L,0x82C06C68L,0xC513462EL},{0x7DC4BDB8L,0xFDAF309DL,0x33BA3285L},{0xF05BDE44L,5L,0L},{0x3317BB98L,0xFDAF309DL,0x42993B24L},{0xD135A330L,0x82C06C68L,0x42993B24L}},{{0xE8018D86L,0xD135A330L,0L},{(-3L),(-3L),0x33BA3285L},{0xE8018D86L,0x3317BB98L,0xC513462EL},{0xD135A330L,0x3317BB98L,0x4166F292L},{0x3317BB98L,(-3L),0x534DB89AL},{0xF05BDE44L,0xD135A330L,0x4166F292L},{0x7DC4BDB8L,0x82C06C68L,0xC513462EL}},{{0x7DC4BDB8L,0xFDAF309DL,0x33BA3285L},{0xF05BDE44L,5L,0L},{0x3317BB98L,0xFDAF309DL,0x42993B24L},{0xD135A330L,0x82C06C68L,0x42993B24L},{0xE8018D86L,0xD135A330L,0L},{(-3L),(-3L),0x33BA3285L},{0xE8018D86L,0x3317BB98L,0xC513462EL}},{{0xD135A330L,0x3317BB98L,0x4166F292L},{0x3317BB98L,(-3L),0x534DB89AL},{0xF05BDE44L,0xD135A330L,0x4166F292L},{0x7DC4BDB8L,0x82C06C68L,0xC513462EL},{0x7DC4BDB8L,0xFDAF309DL,0x33BA3285L},{0xF05BDE44L,5L,0L},{0x3317BB98L,0xFDAF309DL,0x42993B24L}},{{0xD135A330L,0x82C06C68L,0x42993B24L},{0xE8018D86L,0xD135A330L,0L},{(-3L),(-3L),0x33BA3285L},{0xE8018D86L,0x3317BB98L,0xC513462EL},{0xD135A330L,0x3317BB98L,0x4166F292L},{0x3317BB98L,(-3L),0x534DB89AL},{1L,0x5984A900L,0x7DC4BDB8L}},{{(-1L),0xC4140F93L,5L},{(-1L),(-1L),(-3L)},{1L,0x3633256DL,0xFDAF309DL},{8L,(-1L),0xF05BDE44L},{0x5984A900L,0xC4140F93L,0xF05BDE44L},{0x2E44F393L,0x5984A900L,0xFDAF309DL},{0x1E79692DL,0x1E79692DL,(-3L)}},{{0x2E44F393L,8L,5L},{0x5984A900L,8L,0x7DC4BDB8L},{8L,0x1E79692DL,0x14C84822L},{1L,0x5984A900L,0x7DC4BDB8L},{(-1L),0xC4140F93L,5L},{(-1L),(-1L),(-3L)},{1L,0x3633256DL,0xFDAF309DL}},{{8L,(-1L),0xF05BDE44L},{0x5984A900L,0xC4140F93L,0xF05BDE44L},{0x2E44F393L,0x5984A900L,0xFDAF309DL},{0x1E79692DL,0x1E79692DL,(-3L)},{0x2E44F393L,8L,5L},{0x5984A900L,8L,0x7DC4BDB8L},{8L,0x1E79692DL,0x14C84822L}}};
+ int8_t l_1671 = 1L;
+ const union U2 l_1683 = {-10L};
+ int32_t l_1685[3];
+ int32_t *l_1686 = &l_1676;
+ int32_t *l_1687 = &l_1669;
+ int32_t *l_1688 = &g_89;
+ int32_t *l_1689 = &l_1573;
+ int32_t *l_1690[5];
+ const int16_t *l_1714 = &l_675[6][1].f0;
+ int i, j, k;
+ for (i = 0; i < 3; i++)
+ l_1685[i] = 9L;
+ for (i = 0; i < 5; i++)
+ l_1690[i] = &l_1632[2];
+ for (g_706 = 2; (g_706 >= 0); g_706 -= 1)
+ { /* block id: 680 */
+ uint16_t *l_1581 = &g_245;
+ uint16_t ** const l_1580 = &l_1581;
+ uint16_t ** const *l_1579 = &l_1580;
+ int32_t l_1597 = 9L;
+ union U1 *l_1599 = &l_44;
+ int32_t l_1611 = (-1L);
+ uint8_t * const *l_1646 = (void*)0;
+ uint32_t **l_1649 = &l_1566;
+ int32_t l_1667[8] = {2L,(-2L),2L,(-2L),2L,(-2L),2L,(-2L)};
+ int i;
+ for (g_479 = 2; (g_479 >= 0); g_479 -= 1)
+ { /* block id: 683 */
+ uint32_t l_1585 = 1UL;
+ union U1 ***l_1592 = (void*)0;
+ union U1 **l_1594[6][4][8] = {{{&g_1459,&g_1459,&g_1459,&g_1459,&g_1459,&g_1459,&l_1570,&l_45},{(void*)0,(void*)0,(void*)0,&l_45,&l_45,(void*)0,&g_1459,&l_45},{(void*)0,(void*)0,&l_45,&g_1459,&g_1459,&g_1459,&l_45,(void*)0},{&l_1570,&g_1459,&l_1570,&l_45,&l_1570,&l_45,&g_1459,&l_1570}},{{(void*)0,&l_1570,&g_1459,&l_1570,(void*)0,&l_1570,&g_1459,(void*)0},{&l_1570,&g_1459,&g_1459,&l_1570,&l_1570,&l_45,&l_1570,&l_1570},{(void*)0,&l_1570,(void*)0,&l_1570,&l_1570,&g_1459,(void*)0,&g_1459},{(void*)0,&l_1570,(void*)0,&l_45,(void*)0,(void*)0,(void*)0,&l_45}},{{&g_1459,&l_45,(void*)0,&l_1570,&l_45,(void*)0,&l_45,&g_1459},{(void*)0,&g_1459,&l_45,&l_45,&l_1570,&l_45,&l_45,&g_1459},{&g_1459,(void*)0,&g_1459,&l_45,&l_45,&l_45,(void*)0,&l_1570},{(void*)0,&l_45,&l_1570,(void*)0,&g_1459,(void*)0,(void*)0,&g_1459}},{{&l_1570,(void*)0,&g_1459,&l_45,(void*)0,&g_1459,&l_45,&l_1570},{(void*)0,&g_1459,&l_45,&l_1570,&g_1459,&g_1459,&l_45,&l_1570},{&l_45,&g_1459,(void*)0,(void*)0,&g_1459,&g_1459,&l_45,(void*)0},{&g_1459,&g_1459,&l_45,&g_1459,(void*)0,(void*)0,&l_1570,&l_1570}},{{&g_1459,&l_1570,&g_1459,&l_1570,&l_1570,&l_1570,(void*)0,&g_1459},{&g_1459,(void*)0,&l_45,&g_1459,&l_1570,(void*)0,(void*)0,&g_1459},{&l_45,&l_45,&l_45,&g_1459,&g_1459,&g_1459,&l_1570,&l_1570},{(void*)0,&l_1570,&l_45,&l_45,&l_1570,(void*)0,&g_1459,(void*)0}},{{&l_1570,(void*)0,&g_1459,(void*)0,&g_1459,(void*)0,&g_1459,&g_1459},{&l_45,&g_1459,&g_1459,(void*)0,&l_45,&g_1459,&l_45,(void*)0},{&l_1570,&l_45,(void*)0,&l_45,&l_45,(void*)0,&l_45,&l_1570},{&g_1459,&g_1459,(void*)0,&g_1459,&l_45,(void*)0,&g_1459,&g_1459}}};
+ union U1 ***l_1593 = &l_1594[0][3][0];
+ int32_t l_1598[6][6] = {{0x3EEF7D26L,0xA3191B49L,0x3EEF7D26L,1L,0xF4E79753L,0x3EEF7D26L},{(-5L),0xCF041577L,1L,0xE57F6CC9L,0xF4E79753L,(-5L)},{1L,0xA3191B49L,0xE57F6CC9L,0xE57F6CC9L,0xA3191B49L,1L},{(-5L),0xF4E79753L,0xE57F6CC9L,1L,0xCF041577L,(-5L)},{0x3EEF7D26L,0xF4E79753L,1L,0x3EEF7D26L,0xA3191B49L,0x3EEF7D26L},{0x3EEF7D26L,0xA3191B49L,0x3EEF7D26L,1L,0xF4E79753L,0x3EEF7D26L}};
+ union U0 ***l_1604 = (void*)0;
+ union U0 ***l_1605 = &g_815;
+ int16_t *l_1609[8][9][2] = {{{&g_75,(void*)0},{&l_13[1][0][1],(void*)0},{&g_75,(void*)0},{&l_13[1][0][1],(void*)0},{&g_75,(void*)0},{&l_13[1][0][1],(void*)0},{&g_75,(void*)0},{&l_13[1][0][1],(void*)0},{&g_75,(void*)0}},{{&l_13[1][0][1],(void*)0},{&g_75,(void*)0},{&l_13[1][0][1],(void*)0},{&g_75,(void*)0},{&l_13[1][0][1],(void*)0},{&g_75,(void*)0},{&l_13[1][0][1],(void*)0},{&g_75,(void*)0},{&l_13[1][0][1],(void*)0}},{{&g_75,(void*)0},{&l_13[1][0][1],(void*)0},{&g_75,(void*)0},{&l_13[1][0][1],(void*)0},{&g_75,(void*)0},{&l_13[1][0][1],(void*)0},{&g_75,(void*)0},{&l_13[1][0][1],(void*)0},{&g_75,(void*)0}},{{&l_13[1][0][1],(void*)0},{&g_75,(void*)0},{&l_13[1][0][1],(void*)0},{&g_75,(void*)0},{&l_13[1][0][1],(void*)0},{&g_75,(void*)0},{&l_13[1][0][1],(void*)0},{&g_75,(void*)0},{&l_13[1][0][1],(void*)0}},{{&g_75,(void*)0},{&l_13[1][0][1],(void*)0},{&g_75,(void*)0},{&l_13[1][0][1],(void*)0},{&g_75,(void*)0},{&l_13[1][0][1],(void*)0},{&g_75,(void*)0},{&l_13[1][0][1],(void*)0},{&g_75,(void*)0}},{{&l_13[1][0][1],(void*)0},{&g_75,(void*)0},{&l_13[1][0][1],(void*)0},{&g_75,(void*)0},{&l_13[1][0][1],(void*)0},{&g_75,(void*)0},{&l_13[1][0][1],(void*)0},{&g_75,(void*)0},{&l_13[1][0][1],(void*)0}},{{&g_75,(void*)0},{&l_13[1][0][1],(void*)0},{&g_75,(void*)0},{&l_13[1][0][1],(void*)0},{&g_75,(void*)0},{&l_13[1][0][1],(void*)0},{&g_75,(void*)0},{&l_13[1][0][1],(void*)0},{&g_75,(void*)0}},{{&l_13[1][0][1],(void*)0},{&g_75,(void*)0},{&l_13[1][0][1],(void*)0},{&g_75,(void*)0},{&l_13[1][0][1],(void*)0},{&g_75,(void*)0},{&l_13[1][0][1],(void*)0},{&g_75,(void*)0},{&l_13[1][0][1],(void*)0}}};
+ int32_t l_1610 = 0L;
+ int i, j, k;
+ }
+ for (g_75 = 2; (g_75 >= 0); g_75 -= 1)
+ { /* block id: 732 */
+ int8_t l_1654 = 0L;
+ int32_t l_1668[5];
+ uint64_t l_1678[9];
+ int i;
+ for (i = 0; i < 5; i++)
+ l_1668[i] = 1L;
+ for (i = 0; i < 9; i++)
+ l_1678[i] = 18446744073709551615UL;
+ }
+ }
+ l_1550 = l_1684;
+ --l_1699;
+ (*l_1688) = (safe_div_func_int16_t_s_s((((g_444 = ((*l_1684) <= (*g_244))) >= (safe_mod_func_uint64_t_u_u((safe_mod_func_int32_t_s_s(((*l_1686) = (((g_1695 < ((safe_sub_func_uint8_t_u_u((safe_div_func_uint16_t_u_u(((safe_sub_func_uint16_t_u_u(((0x696A82E2L & ((((void*)0 != l_1714) , (safe_add_func_uint64_t_u_u((safe_unary_minus_func_uint8_t_u((safe_add_func_int16_t_s_s(0x5C2EL, (safe_add_func_uint32_t_u_u((safe_add_func_uint64_t_u_u(((void*)0 != &l_1608), p_8)), p_8)))))), g_319))) & (*l_1686))) <= 0x911E72491D7C01F5LL), 0x41B8L)) != p_8), 2UL)), g_75)) , (-6L))) , (*g_931)) != (*g_931))), 0xE8F5704DL)), p_8))) == 0xD20EL), (*g_244)));
+ }
+ l_1731 = ((0x5465FD2D39850ADCLL && ((p_8 | ((((safe_lshift_func_uint16_t_u_s(p_8, ((*l_1726) = (!((*l_1684) = p_8))))) , (p_8 == (l_1572[7] == ((safe_mul_func_int8_t_s_s(0x36L, (*l_1550))) , (((safe_sub_func_uint64_t_u_u(((g_10[9].f4 ^ (*g_318)) <= (*l_1550)), 18446744073709551615UL)) == p_8) , &g_1007))))) | p_8) > p_8)) != 0x0EL)) , (*l_1550));
+ for (l_1608 = 0; (l_1608 != 16); ++l_1608)
+ { /* block id: 763 */
+ int16_t l_1741 = 0x6876L;
+ uint16_t *l_1742 = &g_1743;
+ int32_t * const *l_1745[4] = {&l_1550,&l_1550,&l_1550,&l_1550};
+ int32_t * const **l_1744 = &l_1745[2];
+ uint32_t ***l_1752 = &g_911;
+ union U2 *l_1779 = &g_10[7];
+ uint64_t l_1802 = 18446744073709551615UL;
+ uint8_t * const *l_1809 = &l_50;
+ uint32_t l_1820 = 0xA20A1AFDL;
+ uint16_t * const *l_1853 = &l_1601;
+ uint16_t * const **l_1852 = &l_1853;
+ uint16_t * const ***l_1851 = &l_1852;
+ int32_t l_1854[10][7][3] = {{{0xB2A1302FL,5L,7L},{(-1L),1L,(-1L)},{6L,(-1L),0x2617E67EL},{0x055AC6CEL,0x2617E67EL,0x055AC6CEL},{0L,0x9966CFEAL,0x7F53882FL},{0L,0x3BA83663L,0x2E0E4AE9L},{0xC3E47ADDL,1L,0x8BBFA625L}},{{0x2617E67EL,0x7F53882FL,(-1L)},{0xC3E47ADDL,1L,0x199D5833L},{0L,0x85A3A27FL,1L},{0L,7L,8L},{0x055AC6CEL,(-1L),8L},{6L,3L,0x8139E0D0L},{(-1L),8L,(-1L)}},{{0xB2A1302FL,(-1L),1L},{(-1L),0xC3F8B041L,0L},{(-1L),0xA1D8305EL,0x228FD4CBL},{(-1L),0xB386BFE8L,0xDE9C09DDL},{0xA1D8305EL,0L,(-1L)},{(-1L),0L,0x6259268EL},{0x9D15D649L,0xB386BFE8L,1L}},{{0x2E0E4AE9L,0xA1D8305EL,0xE9DBB44FL},{1L,0xC3F8B041L,(-6L)},{0x1EDDD83FL,(-1L),0xB386BFE8L},{0x8BBFA625L,8L,0L},{1L,3L,0x94D57003L},{0x0E07BC25L,(-1L),0x3BA83663L},{7L,7L,0x0E07BC25L}},{{3L,0x85A3A27FL,0xC3E47ADDL},{1L,1L,0xC9E9E146L},{(-1L),0x7F53882FL,(-6L)},{0L,1L,0xC9E9E146L},{(-1L),0x3BA83663L,0xC3E47ADDL},{0x8139E0D0L,0x9966CFEAL,0x0E07BC25L},{1L,0x2617E67EL,0x3BA83663L}},{{8L,(-1L),0x94D57003L},{0x378498A2L,1L,0L},{(-6L),5L,0xB386BFE8L},{0x86784362L,0xC9E9E146L,(-6L)},{0xA48CE08BL,0x86784362L,0xE9DBB44FL},{0xDE9C09DDL,0L,6L},{1L,0L,0xB386BFE8L}},{{(-2L),0x9D15D649L,0xC9E9E146L},{(-2L),0L,0L},{1L,0x2E0E4AE9L,0xA1D8305EL},{0L,0x3A4500ACL,0L},{(-1L),0x2DFA94E1L,8L},{0x8139E0D0L,8L,0xC3E47ADDL},{0x6259268EL,(-6L),(-1L)}},{{(-9L),0xA1D8305EL,(-1L)},{(-1L),0x9966CFEAL,0x9966CFEAL},{0x2DFA94E1L,0x7F53882FL,0x73C793C8L},{(-1L),(-1L),0x2E0E4AE9L},{0xC3F8B041L,1L,0x75B2328CL},{0xE9DBB44FL,6L,0L},{5L,1L,0x100E7AA8L}},{{(-1L),(-1L),0L},{(-1L),0x7F53882FL,3L},{0L,0x9966CFEAL,(-1L)},{0x8BBFA625L,0xA1D8305EL,0xC3F8B041L},{8L,(-6L),0L},{0L,8L,0x7F53882FL},{8L,0x2DFA94E1L,1L}},{{0x73C793C8L,0x3A4500ACL,0x640675F7L},{0x100E7AA8L,0x2E0E4AE9L,0x055AC6CEL},{1L,0L,(-1L)},{0xC3E47ADDL,0x9D15D649L,(-1L)},{0xB2A1302FL,0L,0x055AC6CEL},{0x75B2328CL,0L,0x640675F7L},{0L,0x8139E0D0L,1L}}};
+ uint64_t l_1867 = 18446744073709551612UL;
+ union U1 l_1891 = {4294967291UL};
+ union U2 ***l_1901 = &l_39;
+ union U2 ****l_1900[10][2] = {{&l_1901,&l_1901},{&l_1901,&l_1901},{&l_1901,&l_1901},{&l_1901,&l_1901},{&l_1901,&l_1901},{&l_1901,&l_1901},{&l_1901,&l_1901},{&l_1901,&l_1901},{&l_1901,&l_1901},{&l_1901,&l_1901}};
+ union U2 *****l_1902 = (void*)0;
+ int8_t l_1936 = (-1L);
+ uint32_t l_1937 = 0x8A6D3A2FL;
+ int i, j, k;
+ }
+ }
+ return (*g_902);
+}
+
+
+/* ------------------------------------------ */
+/*
+ * reads : g_444 g_223.f0 g_75 g_244 g_245 g_814.f1 g_318 g_319 g_53 g_89 g_149 g_92
+ * writes: g_444 g_75 g_1399 g_231.f1 g_89 g_149 g_507
+ */
+static const uint64_t func_16(uint64_t p_17, union U1 p_18)
+{ /* block id: 592 */
+ int8_t l_1386 = 0xEBL;
+ uint16_t *l_1389 = &g_444;
+ uint64_t l_1393 = 18446744073709551615UL;
+ uint32_t ***l_1394 = &g_911;
+ int16_t *l_1395 = &g_75;
+ uint16_t *l_1398[4][6] = {{&g_245,&g_245,(void*)0,(void*)0,&g_245,&g_245},{&g_245,&g_245,(void*)0,(void*)0,&g_245,(void*)0},{&g_245,&g_245,&g_245,(void*)0,&g_245,(void*)0},{&g_245,&g_245,(void*)0,(void*)0,&g_245,&g_245}};
+ int32_t l_1400 = 0L;
+ int32_t l_1401 = 0xADEB96C4L;
+ uint16_t l_1405 = 0xFE0CL;
+ int32_t ***l_1409 = &g_251[3];
+ union U0 l_1422 = {0x3EC3L};
+ int64_t l_1423 = 0L;
+ int32_t l_1479[10] = {0x48A6F4D1L,7L,0x48A6F4D1L,0x48A6F4D1L,7L,0x48A6F4D1L,0x48A6F4D1L,7L,0x48A6F4D1L,0x48A6F4D1L};
+ int i, j;
+ if ((safe_rshift_func_int16_t_s_s(p_18.f0, (safe_div_func_int16_t_s_s((safe_add_func_int16_t_s_s((l_1400 = ((safe_add_func_int32_t_s_s(((l_1386 ^ (((*l_1395) = (safe_div_func_uint16_t_u_u(((*l_1389) = ((-8L) && 6UL)), (safe_unary_minus_func_uint8_t_u((safe_rshift_func_int16_t_s_s(l_1393, (l_1394 == l_1394)))))))) != 0xE77CL)) , ((((g_1399[2][0][3] = ((*l_1389) |= (safe_div_func_int8_t_s_s((0L >= 0xE9FB419A1EFB1097LL), (-1L))))) | 0x08C3L) || g_223.f0) != l_1393)), (-2L))) , l_1386)), l_1401)), l_1386)))))
+ { /* block id: 598 */
+ union U1 l_1402 = {4294967295UL};
+ int8_t *l_1406 = &g_231[2][3][1].f1;
+ int32_t ***l_1410 = &g_251[3];
+ int32_t *l_1411[3][10] = {{(void*)0,(void*)0,(void*)0,&g_111[7][6],&g_1232,(void*)0,&l_1400,(void*)0,&g_1232,&g_111[7][6]},{&g_111[7][6],&g_111[5][1],&g_111[7][6],(void*)0,(void*)0,&g_111[1][3],&l_1400,&l_1400,&g_111[1][3],(void*)0},{(void*)0,(void*)0,(void*)0,(void*)0,&g_111[7][6],&g_1232,(void*)0,&l_1400,(void*)0,&g_1232}};
+ int i, j;
+ l_1423 = ((l_1402 , ((l_1402.f1 = (((*l_1406) = l_1405) == (-1L))) | (((safe_mod_func_int8_t_s_s((0xB61EL && (((l_1400 && (p_18.f1 ^= (l_1409 != l_1410))) && (safe_lshift_func_uint16_t_u_s((safe_add_func_int8_t_s_s((p_18.f1 , (safe_rshift_func_int16_t_s_u(((safe_mod_func_uint32_t_u_u(((safe_sub_func_uint16_t_u_u((((*l_1395) &= (((l_1422 , p_17) , 0xF25EF439L) == p_17)) , 9UL), p_17)) & 0UL), 0xD5507FF8L)) == (*g_244)), 2))), p_17)), p_17))) | p_17)), g_814.f1)) <= (*g_318)) != g_53[1]))) > 0x2F5002ECB99A8F88LL);
+ for (g_89 = 0; (g_89 != 23); g_89 = safe_add_func_uint8_t_u_u(g_89, 1))
+ { /* block id: 606 */
+ uint32_t l_1426 = 0x9900E60AL;
+ int32_t *l_1436 = &g_1232;
+ uint32_t l_1445 = 4294967295UL;
+ int32_t l_1460 = 8L;
+ int32_t l_1478[2];
+ uint32_t l_1480 = 0x8DC4F29BL;
+ int i;
+ for (i = 0; i < 2; i++)
+ l_1478[i] = 2L;
+ ++l_1426;
+ for (g_149 = 0; (g_149 >= (-5)); g_149 = safe_sub_func_int16_t_s_s(g_149, 1))
+ { /* block id: 610 */
+ int32_t *l_1433 = (void*)0;
+ int32_t *l_1437 = &g_111[1][3];
+ union U1 *l_1456[4];
+ union U2 ***l_1473 = (void*)0;
+ union U2 **** const l_1472 = &l_1473;
+ int32_t l_1477 = (-9L);
+ int i;
+ for (i = 0; i < 4; i++)
+ l_1456[i] = &g_428[0][0][2];
+ }
+ --l_1480;
+ }
+ }
+ else
+ { /* block id: 639 */
+ int16_t *l_1483 = &g_507;
+ int32_t *l_1484 = (void*)0;
+ int32_t *l_1485 = &l_1400;
+ (*l_1485) &= ((((*l_1483) = ((*l_1395) ^= p_17)) != (p_17 > g_92)) || (*g_318));
+ }
+ return (*g_318);
+}
+
+
+/* ------------------------------------------ */
+/*
+ * reads : g_2 g_93 g_225 g_226 g_223.f0 g_149 g_231.f1 g_428.f0 g_92 g_223.f3 g_930 g_931 g_627 g_912 g_318 g_319 g_911 g_1007 g_89 g_226.f2 g_244 g_245 g_10.f4 g_444 g_428 g_1074 g_147 g_101 g_375 g_1198 g_604 g_814.f0 g_229 g_53 g_706 g_222 g_223
+ * writes: g_93 g_245 g_223.f0 g_149 g_111 g_223.f3 g_75 g_2 g_226.f2 g_89 g_444 g_507 g_479 g_147 g_1198 g_54 g_706 g_53
+ */
+static union U2 func_20(union U2 * p_21)
+{ /* block id: 334 */
+ int64_t l_751 = 0x5E75AE4C622A21C5LL;
+ union U2 * const l_752[8][4] = {{&g_10[9],&g_10[9],&g_10[9],&g_10[9]},{&g_10[9],&g_10[9],&g_10[9],&g_10[9]},{&g_10[9],&g_10[9],&g_10[9],&g_10[9]},{&g_10[9],&g_10[9],&g_10[9],&g_10[9]},{&g_10[9],&g_10[9],&g_10[9],&g_10[9]},{&g_10[9],&g_10[9],&g_10[9],&g_10[9]},{&g_10[9],&g_10[9],&g_10[9],&g_10[9]},{&g_10[9],&g_10[9],&g_10[9],&g_10[9]}};
+ int32_t l_759 = 0x817DE0C4L;
+ uint16_t l_792 = 0xE74AL;
+ union U0 **l_817 = &g_225;
+ uint16_t l_822[3][6];
+ uint32_t l_857[7][2][6] = {{{0x151888D0L,0x069C0D93L,0x151888D0L,4294967294UL,0x52F0D1DCL,0x151888D0L},{4294967295UL,0x8F364602L,4294967294UL,1UL,0x52F0D1DCL,4294967295UL}},{{4294967294UL,0x069C0D93L,1UL,1UL,0x069C0D93L,4294967294UL},{4294967295UL,0x52F0D1DCL,1UL,4294967294UL,0x8F364602L,4294967295UL}},{{0x151888D0L,0x52F0D1DCL,4294967294UL,0x151888D0L,0x069C0D93L,0x151888D0L},{0x151888D0L,0x069C0D93L,0x151888D0L,4294967294UL,0x52F0D1DCL,0x151888D0L}},{{4294967295UL,0x8F364602L,4294967294UL,1UL,0x52F0D1DCL,4294967295UL},{4294967294UL,0x069C0D93L,1UL,1UL,0x069C0D93L,4294967294UL}},{{4294967295UL,0x52F0D1DCL,1UL,4294967294UL,0x8F364602L,4294967295UL},{0x151888D0L,0x52F0D1DCL,4294967294UL,0x151888D0L,0x069C0D93L,0x151888D0L}},{{0x151888D0L,0x069C0D93L,0x151888D0L,4294967294UL,0x52F0D1DCL,0x151888D0L},{4294967295UL,0x8F364602L,4294967294UL,1UL,0x52F0D1DCL,4294967295UL}},{{4294967294UL,0x069C0D93L,1UL,1UL,0x069C0D93L,4294967294UL},{4294967295UL,0x52F0D1DCL,1UL,4294967294UL,0x8F364602L,4294967295UL}}};
+ uint16_t *l_871 = &g_245;
+ uint16_t **l_870[10] = {&l_871,&l_871,&l_871,&l_871,&l_871,&l_871,&l_871,&l_871,&l_871,&l_871};
+ uint16_t ***l_869[4];
+ int8_t *l_880 = &g_147;
+ union U2 ***l_900 = &g_54;
+ union U2 ****l_899 = &l_900;
+ uint32_t *l_909 = &l_857[5][0][1];
+ uint32_t **l_908[9][3] = {{&l_909,&l_909,&l_909},{&l_909,&l_909,&l_909},{&l_909,&l_909,&l_909},{&l_909,&l_909,&l_909},{&l_909,&l_909,&l_909},{&l_909,&l_909,&l_909},{&l_909,&l_909,&l_909},{&l_909,&l_909,&l_909},{&l_909,&l_909,&l_909}};
+ uint32_t l_932 = 1UL;
+ int64_t l_943[1][7][4] = {{{0x31817ECD765582DFLL,0x3C4000B56088A104LL,0x3C4000B56088A104LL,0x31817ECD765582DFLL},{(-8L),5L,0L,2L},{0x0E65A79A37AC998BLL,(-1L),2L,8L},{2L,8L,(-4L),8L},{0x3C4000B56088A104LL,(-1L),0x3941FF1ADCFF6FFCLL,2L},{0x07095D56C55A0754LL,5L,8L,0x31817ECD765582DFLL},{0x3941FF1ADCFF6FFCLL,0x3C4000B56088A104LL,(-5L),(-5L)}}};
+ int32_t l_964 = 6L;
+ int32_t l_975 = 1L;
+ int32_t l_976 = 0xA8F33034L;
+ int32_t l_980 = 1L;
+ int32_t l_1042 = 4L;
+ uint32_t l_1090 = 18446744073709551609UL;
+ int16_t l_1101 = 0xE3F0L;
+ uint8_t l_1130 = 251UL;
+ int32_t l_1183 = 0x99FFB991L;
+ int32_t l_1189 = 0x193C6D4BL;
+ int32_t l_1191 = 0x799703FFL;
+ int32_t l_1192[6][5] = {{0x7D50E986L,0x1D2A5D45L,0x1D2A5D45L,0x7D50E986L,0x1D2A5D45L},{0xB0F500FBL,0xB0F500FBL,0x9F171E12L,0xB0F500FBL,0xB0F500FBL},{0x1D2A5D45L,0x7D50E986L,0x1D2A5D45L,0x1D2A5D45L,0x7D50E986L},{0xB0F500FBL,6L,6L,0xB0F500FBL,6L},{0x7D50E986L,0x7D50E986L,(-2L),0x7D50E986L,0x7D50E986L},{6L,0xB0F500FBL,6L,6L,6L}};
+ int16_t l_1212[10][3][8] = {{{0L,(-1L),4L,1L,0x39A8L,(-8L),(-9L),0x74A8L},{(-9L),2L,1L,0xE2F5L,0x43FCL,0x976FL,0xEC7EL,(-1L)},{0xE00DL,0x74A8L,0L,0xA987L,(-1L),0xAE8AL,1L,0L}},{{(-1L),(-3L),0x925EL,0xE00DL,0xEC7EL,0x74A8L,(-1L),(-1L)},{0L,0x4D21L,(-5L),0x74A8L,0x0AB7L,0x1B3AL,0L,0x1EE1L},{0xFD58L,0L,0L,(-9L),(-9L),0L,0L,0xFD58L}},{{0xE096L,0L,0x2447L,0x5CD9L,0x5027L,0L,(-4L),0x4433L},{0x0518L,(-1L),0L,1L,0x5CD9L,0L,0x0AB7L,0xEC7EL},{0xE2F5L,0L,0x450AL,0x1B3AL,(-5L),0L,0x1126L,1L}},{{0xEC7EL,0L,(-3L),0x3336L,(-6L),0x1B3AL,0x4D21L,4L},{(-1L),0x4D21L,1L,(-8L),7L,0x74A8L,(-3L),(-1L)},{(-3L),(-3L),0x8D33L,0x1EE1L,0x94DEL,0xAE8AL,(-6L),1L}},{{0x1FC3L,0x74A8L,(-5L),0x0950L,(-4L),0x976FL,0L,0x1B3AL},{1L,2L,(-1L),(-3L),0L,(-8L),1L,0xE00DL},{(-8L),(-1L),0xA987L,(-1L),0L,(-4L),4L,1L}},{{0x0950L,0x1E22L,0xAE8AL,(-1L),1L,0x5027L,0xFD58L,0x5CD9L},{0x39A8L,4L,(-8L),0L,0x1605L,0L,(-8L),4L},{2L,0L,0x74A8L,1L,4L,(-1L),0L,0xF390L}},{{0x2447L,0xFD58L,(-4L),(-8L),2L,0L,0L,0x450AL},{0x450AL,(-8L),0x74A8L,(-1L),(-3L),0x1EE1L,(-8L),0L},{(-3L),0x1EE1L,(-8L),0L,(-1L),(-1L),0xFD58L,0xEC64L}},{{(-5L),0x5CD9L,0xAE8AL,(-3L),0xB3BFL,0x0950L,4L,(-1L)},{0L,0x0AB7L,0xA987L,0x0518L,(-7L),0x4433L,1L,0L},{0xF390L,1L,(-1L),0x6038L,0x1B3AL,0xB3BFL,0xA987L,(-8L)}},{{7L,0xE2F5L,0x97EAL,0xFD58L,0x6038L,2L,0x0492L,0x5CD9L},{0x1E22L,(-1L),0xF390L,0xF2C9L,(-8L),0x0518L,0x8D48L,1L},{(-1L),1L,0x0518L,(-3L),1L,(-1L),(-3L),0L}},{{0xE2F5L,(-8L),(-1L),0L,(-1L),(-1L),0L,(-1L)},{(-4L),(-4L),0x1B3AL,(-8L),2L,0L,0xEC7EL,(-3L)},{0x0950L,0xF2C9L,0xA987L,7L,0L,(-1L),1L,(-3L)}}};
+ int32_t *l_1237 = &l_1192[5][0];
+ int32_t *l_1238[6][5][8] = {{{&l_980,(void*)0,&l_1192[0][0],(void*)0,&l_980,&l_964,(void*)0,&g_92},{&g_111[2][8],&l_1189,&g_111[1][3],&l_1191,&l_759,&g_111[3][4],&l_1192[5][0],&l_1189},{&g_92,&l_1192[5][0],&l_759,&g_111[1][3],&l_759,&g_1232,&l_964,&g_111[1][3]},{&l_1042,&l_964,&l_980,&l_1191,&l_980,&l_964,&l_1042,&l_1192[0][1]},{&g_111[3][8],&l_1189,&l_1192[0][0],&l_976,&l_1189,&l_1192[5][1],(void*)0,&l_980}},{{&l_980,&l_1042,&g_89,&l_1042,&l_1189,&l_1192[5][0],&l_1191,&l_1191},{&g_111[3][8],&l_976,(void*)0,&l_980,&l_980,&l_759,&g_111[5][8],&l_964},{&l_1042,&l_1192[4][0],&l_1192[5][1],&l_980,&l_759,&l_976,(void*)0,&l_976},{&g_92,&l_759,&g_1232,(void*)0,&l_759,&l_1191,&l_980,&l_980},{&g_111[2][8],&l_964,&l_1191,(void*)0,&l_980,&g_1232,&l_980,(void*)0}},{{&l_980,&g_111[3][8],&g_1232,&l_1189,(void*)0,(void*)0,&l_1192[5][0],(void*)0},{&l_759,&l_1192[5][0],&g_111[1][3],(void*)0,&g_89,&l_1189,&l_1191,(void*)0},{&l_976,&l_1192[3][1],&l_1042,&g_89,(void*)0,&l_976,&l_1042,&l_964},{&g_111[5][8],(void*)0,&g_89,&l_1189,&g_89,&g_1232,(void*)0,&l_1192[5][0]},{&l_1192[0][1],&g_111[8][4],(void*)0,&l_1042,&l_1042,&g_111[1][3],&l_1042,&l_1189}},{{&l_1192[5][0],&l_1191,&l_980,(void*)0,&l_1042,(void*)0,&g_111[3][8],&l_1192[0][1]},{&l_1042,&l_1189,&g_89,(void*)0,&l_1191,&l_759,&l_1191,&g_111[2][8]},{&g_1232,&l_1189,(void*)0,&g_111[1][3],&l_964,&g_111[1][3],&g_111[1][3],&l_964},{&l_1191,&l_964,&l_964,&l_1191,&l_1042,&l_1189,&g_111[3][5],&l_1042},{&l_980,&l_1042,&l_1042,&g_111[1][3],&l_1191,&l_1189,&g_1232,(void*)0}},{{(void*)0,&l_1042,&g_111[1][3],(void*)0,&l_980,&l_1189,&l_976,&l_1192[5][0]},{&l_980,&l_964,&l_1192[4][0],&l_1189,(void*)0,&g_111[1][3],(void*)0,&l_980},{&l_980,&g_89,&l_1189,&l_964,&g_1232,&l_976,&l_964,(void*)0},{(void*)0,&l_759,(void*)0,&g_1232,&l_980,&l_1192[4][0],&g_1232,&l_1192[0][1]},{&l_1192[5][0],&g_111[1][3],(void*)0,&g_111[1][3],&l_1192[4][0],(void*)0,&l_759,(void*)0}},{{(void*)0,&l_964,(void*)0,&l_964,&l_759,&l_1189,&l_1042,&l_980},{(void*)0,&l_964,&l_980,&l_1042,&l_964,&l_1192[0][0],&g_111[1][3],(void*)0},{&g_111[3][5],&g_1232,&l_759,&l_1191,(void*)0,(void*)0,&l_1191,(void*)0},{(void*)0,&l_759,&l_1189,&l_1192[5][0],&l_1192[0][0],&l_1042,&l_759,(void*)0},{(void*)0,&g_111[1][3],&g_89,&g_111[1][3],(void*)0,&g_111[1][3],&l_964,&l_980}}};
+ int32_t l_1239 = 0x5078E770L;
+ int32_t l_1240 = 0L;
+ uint32_t l_1241 = 0x263AC74CL;
+ int32_t l_1251[7][5][4] = {{{0xAA29CFDBL,1L,1L,0xAA29CFDBL},{6L,1L,0x603D9C89L,1L},{1L,0x721A6F8FL,0x603D9C89L,0x603D9C89L},{6L,6L,1L,0x603D9C89L},{0xAA29CFDBL,0x721A6F8FL,0xAA29CFDBL,1L}},{{0xAA29CFDBL,1L,1L,0xAA29CFDBL},{6L,1L,0x603D9C89L,1L},{1L,0x721A6F8FL,0x603D9C89L,0x603D9C89L},{6L,6L,1L,0x603D9C89L},{0xAA29CFDBL,0x721A6F8FL,0xAA29CFDBL,1L}},{{0xAA29CFDBL,1L,1L,0xAA29CFDBL},{6L,1L,0x603D9C89L,1L},{1L,0x721A6F8FL,0x603D9C89L,0x603D9C89L},{6L,6L,1L,0x603D9C89L},{0xAA29CFDBL,0x721A6F8FL,0xAA29CFDBL,1L}},{{0xAA29CFDBL,1L,1L,0xAA29CFDBL},{6L,1L,0x603D9C89L,1L},{1L,0x721A6F8FL,0x603D9C89L,0x603D9C89L},{6L,6L,1L,0x603D9C89L},{0xAA29CFDBL,0x721A6F8FL,0xAA29CFDBL,1L}},{{0xAA29CFDBL,1L,1L,0xAA29CFDBL},{6L,1L,0x603D9C89L,1L},{1L,0x721A6F8FL,0x603D9C89L,0x721A6F8FL},{1L,1L,0xAA29CFDBL,0x721A6F8FL},{0x603D9C89L,6L,0x603D9C89L,0xAA29CFDBL}},{{0x603D9C89L,0xAA29CFDBL,0xAA29CFDBL,0x603D9C89L},{1L,0xAA29CFDBL,0x721A6F8FL,0xAA29CFDBL},{0xAA29CFDBL,6L,0x721A6F8FL,0x721A6F8FL},{1L,1L,0xAA29CFDBL,0x721A6F8FL},{0x603D9C89L,6L,0x603D9C89L,0xAA29CFDBL}},{{0x603D9C89L,0xAA29CFDBL,0xAA29CFDBL,0x603D9C89L},{1L,0xAA29CFDBL,0x721A6F8FL,0xAA29CFDBL},{0xAA29CFDBL,6L,0x721A6F8FL,0x721A6F8FL},{1L,1L,0xAA29CFDBL,0x721A6F8FL},{0x603D9C89L,6L,0x603D9C89L,0xAA29CFDBL}}};
+ int16_t l_1252 = 0x8099L;
+ union U1 l_1296[6][10][4] = {{{{0x1D574646L},{0x71DBF36DL},{0x71DBF36DL},{0x1D574646L}},{{0xC1A11E5DL},{0x71DBF36DL},{4294967289UL},{0x89B10B99L}},{{0x89B10B99L},{0xC0F3DB2DL},{4294967289UL},{0x0C3A5D39L}},{{0xC1A11E5DL},{0xD393D14CL},{0x71DBF36DL},{0x0C3A5D39L}},{{0x1D574646L},{0xC0F3DB2DL},{9UL},{0x89B10B99L}},{{0x1D574646L},{0x71DBF36DL},{0x71DBF36DL},{0x1D574646L}},{{0xC1A11E5DL},{0x71DBF36DL},{4294967289UL},{0x89B10B99L}},{{0x89B10B99L},{0xC0F3DB2DL},{4294967289UL},{0x0C3A5D39L}},{{0xC1A11E5DL},{0xD393D14CL},{0x71DBF36DL},{0x0C3A5D39L}},{{0x1D574646L},{0xC0F3DB2DL},{9UL},{0x89B10B99L}}},{{{0x1D574646L},{0x71DBF36DL},{0x71DBF36DL},{0x1D574646L}},{{0xC1A11E5DL},{0x71DBF36DL},{4294967289UL},{0x89B10B99L}},{{0x89B10B99L},{0xC0F3DB2DL},{4294967289UL},{0x0C3A5D39L}},{{0xC1A11E5DL},{0xD393D14CL},{0x71DBF36DL},{0x0C3A5D39L}},{{0x1D574646L},{0xC0F3DB2DL},{9UL},{0x89B10B99L}},{{0x1D574646L},{0x71DBF36DL},{0x71DBF36DL},{0x1D574646L}},{{0xC1A11E5DL},{0x71DBF36DL},{4294967289UL},{0x89B10B99L}},{{0x89B10B99L},{0xC0F3DB2DL},{4294967289UL},{0x0C3A5D39L}},{{0xC1A11E5DL},{0xD393D14CL},{0x71DBF36DL},{0x0C3A5D39L}},{{0x1D574646L},{0xC0F3DB2DL},{9UL},{0x89B10B99L}}},{{{0x1D574646L},{0x71DBF36DL},{0x71DBF36DL},{0x1D574646L}},{{0xC1A11E5DL},{0x71DBF36DL},{4294967289UL},{0x89B10B99L}},{{0x89B10B99L},{0xC0F3DB2DL},{4294967289UL},{0x0C3A5D39L}},{{0xC1A11E5DL},{0xD393D14CL},{0x71DBF36DL},{0x0C3A5D39L}},{{0x1D574646L},{0xC0F3DB2DL},{9UL},{0x89B10B99L}},{{0x1D574646L},{0x71DBF36DL},{0x71DBF36DL},{0x1D574646L}},{{0xC1A11E5DL},{0x71DBF36DL},{4294967289UL},{0x89B10B99L}},{{0x89B10B99L},{0xC0F3DB2DL},{4294967289UL},{0x0C3A5D39L}},{{0xC1A11E5DL},{0xD393D14CL},{0x71DBF36DL},{0x0C3A5D39L}},{{0x1D574646L},{0xC0F3DB2DL},{9UL},{0x89B10B99L}}},{{{0x1D574646L},{0x71DBF36DL},{0x71DBF36DL},{0x1D574646L}},{{0xC1A11E5DL},{0x71DBF36DL},{4294967289UL},{0x89B10B99L}},{{0x89B10B99L},{0xC0F3DB2DL},{4294967289UL},{0x0C3A5D39L}},{{0xC1A11E5DL},{0xD393D14CL},{0x71DBF36DL},{0x0C3A5D39L}},{{0x1D574646L},{0xC0F3DB2DL},{9UL},{0x89B10B99L}},{{0x1D574646L},{9UL},{9UL},{0x0C3A5D39L}},{{0x89B10B99L},{9UL},{0xC0F3DB2DL},{0x1D574646L}},{{0x1D574646L},{0xD393D14CL},{0xC0F3DB2DL},{4294967286UL}},{{0x89B10B99L},{0x71DBF36DL},{9UL},{4294967286UL}},{{0x0C3A5D39L},{0xD393D14CL},{4294967289UL},{0x1D574646L}}},{{{0x0C3A5D39L},{9UL},{9UL},{0x0C3A5D39L}},{{0x89B10B99L},{9UL},{0xC0F3DB2DL},{0x1D574646L}},{{0x1D574646L},{0xD393D14CL},{0xC0F3DB2DL},{4294967286UL}},{{0x89B10B99L},{0x71DBF36DL},{9UL},{4294967286UL}},{{0x0C3A5D39L},{0xD393D14CL},{4294967289UL},{0x1D574646L}},{{0x0C3A5D39L},{9UL},{9UL},{0x0C3A5D39L}},{{0x89B10B99L},{9UL},{0xC0F3DB2DL},{0x1D574646L}},{{0x1D574646L},{0xD393D14CL},{0xC0F3DB2DL},{4294967286UL}},{{0x89B10B99L},{0x71DBF36DL},{9UL},{4294967286UL}},{{0x0C3A5D39L},{0xD393D14CL},{4294967289UL},{0x1D574646L}}},{{{0x0C3A5D39L},{9UL},{9UL},{0x0C3A5D39L}},{{0x89B10B99L},{9UL},{0xC0F3DB2DL},{0x1D574646L}},{{0x1D574646L},{0xD393D14CL},{0xC0F3DB2DL},{4294967286UL}},{{0x89B10B99L},{0x71DBF36DL},{9UL},{4294967286UL}},{{0x0C3A5D39L},{0xD393D14CL},{4294967289UL},{0x1D574646L}},{{0x0C3A5D39L},{9UL},{9UL},{0x0C3A5D39L}},{{0x89B10B99L},{9UL},{0xC0F3DB2DL},{0x1D574646L}},{{0x1D574646L},{0xD393D14CL},{0xC0F3DB2DL},{4294967286UL}},{{0x89B10B99L},{0x71DBF36DL},{9UL},{4294967286UL}},{{0x0C3A5D39L},{0xD393D14CL},{4294967289UL},{0x1D574646L}}}};
+ uint32_t ****l_1337 = (void*)0;
+ uint32_t *****l_1336 = &l_1337;
+ int32_t l_1352 = 0L;
+ int i, j, k;
+ for (i = 0; i < 3; i++)
+ {
+ for (j = 0; j < 6; j++)
+ l_822[i][j] = 4UL;
+ }
+ for (i = 0; i < 4; i++)
+ l_869[i] = &l_870[3];
+ if ((safe_rshift_func_uint16_t_u_s((safe_mul_func_int8_t_s_s(0x74L, (g_2 >= l_751))), 10)))
+ { /* block id: 335 */
+ uint32_t *l_757[4][4][10] = {{{(void*)0,&g_428[0][0][2].f0,&g_375,&g_375,&g_428[0][0][2].f0,(void*)0,&g_93,(void*)0,&g_428[0][0][2].f0,&g_375},{&g_428[0][0][2].f0,&g_428[0][0][2].f0,&g_428[0][0][2].f0,&g_375,&g_93,&g_93,&g_375,&g_428[0][0][2].f0,&g_428[0][0][2].f0,&g_428[0][0][2].f0},{&g_428[0][0][2].f0,(void*)0,&g_428[0][0][2].f0,&g_428[0][0][2].f0,&g_428[0][0][2].f0,(void*)0,&g_428[0][0][2].f0,&g_428[0][0][2].f0,(void*)0,&g_428[0][0][2].f0},{(void*)0,&g_428[0][0][2].f0,&g_428[0][0][2].f0,(void*)0,&g_428[0][0][2].f0,&g_428[0][0][2].f0,&g_428[0][0][2].f0,(void*)0,&g_428[0][0][2].f0,&g_428[0][0][2].f0}},{{&g_428[0][0][2].f0,&g_428[0][0][2].f0,&g_375,&g_93,&g_93,&g_375,&g_428[0][0][2].f0,&g_428[0][0][2].f0,&g_428[0][0][2].f0,&g_375},{&g_428[0][0][2].f0,(void*)0,&g_93,(void*)0,&g_428[0][0][2].f0,&g_375,&g_375,&g_428[0][0][2].f0,(void*)0,&g_93},{&g_428[0][0][2].f0,&g_428[0][0][2].f0,&g_93,&g_428[0][0][2].f0,&g_428[0][0][2].f0,&g_428[0][0][2].f0,&g_93,&g_428[0][0][2].f0,&g_428[0][0][2].f0,&g_93},{(void*)0,&g_428[0][0][2].f0,&g_375,&g_375,&g_428[0][0][2].f0,(void*)0,&g_93,(void*)0,&g_428[0][0][2].f0,&g_375}},{{&g_428[0][0][2].f0,&g_428[0][0][2].f0,&g_428[0][0][2].f0,&g_375,&g_93,&g_93,&g_375,&g_428[0][0][2].f0,&g_428[0][0][2].f0,&g_428[0][0][2].f0},{&g_428[0][0][2].f0,(void*)0,&g_428[0][0][2].f0,&g_375,&g_428[0][0][2].f0,&g_428[0][0][2].f0,&g_428[0][0][2].f0,&g_428[0][0][2].f0,&g_428[0][0][2].f0,&g_428[0][0][2].f0},{&g_428[0][0][2].f0,&g_428[0][0][2].f0,&g_428[0][0][2].f0,&g_428[0][0][2].f0,&g_428[0][0][2].f0,&g_375,&g_428[0][0][2].f0,&g_428[0][0][2].f0,&g_428[0][0][2].f0,&g_428[0][0][2].f0},{&g_428[0][0][2].f0,&g_428[0][0][2].f0,&g_93,&g_428[0][0][2].f0,&g_428[0][0][2].f0,&g_93,&g_428[0][0][2].f0,&g_428[0][0][2].f0,&g_428[0][0][2].f0,&g_93}},{{&g_375,&g_428[0][0][2].f0,&g_428[0][0][2].f0,&g_428[0][0][2].f0,&g_375,&g_93,&g_93,&g_375,&g_428[0][0][2].f0,&g_428[0][0][2].f0},{&g_428[0][0][2].f0,&g_428[0][0][2].f0,&g_428[0][0][2].f0,&g_375,(void*)0,&g_375,&g_428[0][0][2].f0,&g_428[0][0][2].f0,&g_428[0][0][2].f0,&g_428[0][0][2].f0},{&g_428[0][0][2].f0,&g_375,&g_93,&g_93,&g_375,&g_428[0][0][2].f0,&g_428[0][0][2].f0,&g_428[0][0][2].f0,&g_375,&g_93},{&g_428[0][0][2].f0,&g_428[0][0][2].f0,&g_428[0][0][2].f0,&g_93,&g_428[0][0][2].f0,&g_428[0][0][2].f0,&g_93,&g_428[0][0][2].f0,&g_428[0][0][2].f0,&g_428[0][0][2].f0}}};
+ int32_t l_758[1][4][8] = {{{0x13BCAF3AL,0x34EFA39DL,0x34EFA39DL,0x13BCAF3AL,0x34EFA39DL,0x34EFA39DL,0x13BCAF3AL,0x34EFA39DL},{0x13BCAF3AL,0x13BCAF3AL,0x748F0485L,0x13BCAF3AL,0x13BCAF3AL,0x748F0485L,0x13BCAF3AL,0x13BCAF3AL},{0x34EFA39DL,0x13BCAF3AL,0x34EFA39DL,0x34EFA39DL,0x13BCAF3AL,0x34EFA39DL,0x34EFA39DL,0x13BCAF3AL},{0x13BCAF3AL,0x34EFA39DL,0x34EFA39DL,0x13BCAF3AL,0x34EFA39DL,0x34EFA39DL,0x13BCAF3AL,0x34EFA39DL}}};
+ union U1 l_762 = {0x3F18B329L};
+ int32_t l_769 = 0xC76289FEL;
+ uint16_t *l_774 = &g_245;
+ union U1 l_775 = {4294967288UL};
+ int32_t *l_776[10][6];
+ int64_t *l_777 = &g_149;
+ int32_t *l_778 = &g_111[1][3];
+ int32_t **l_779 = &l_778;
+ int i, j, k;
+ for (i = 0; i < 10; i++)
+ {
+ for (j = 0; j < 6; j++)
+ l_776[i][j] = &g_223.f0;
+ }
+ (*l_778) = (((void*)0 != l_752[1][2]) | ((*l_777) = (safe_div_func_int16_t_s_s((safe_div_func_uint32_t_u_u((++g_93), (l_762 , (safe_rshift_func_uint8_t_u_s((((safe_add_func_int16_t_s_s(((((safe_mul_func_int8_t_s_s(((0x8DD6L < l_769) | (((g_223.f0 ^= ((safe_mul_func_uint8_t_u_u((0x3C13D321L < (safe_mod_func_int8_t_s_s((((*l_774) = l_762.f0) | ((l_775 , (*g_225)) , l_758[0][2][3])), 1UL))), 0x55L)) > l_775.f0)) , 0L) | g_149)), g_231[2][3][1].f1)) && 0x9AL) , l_759) || l_759), l_759)) >= g_428[0][0][2].f0) < g_92), 6))))), l_751))));
+ (*l_779) = &l_758[0][2][0];
+ }
+ else
+ { /* block id: 342 */
+ int8_t l_789 = 0L;
+ int32_t l_791 = 0xA19943A3L;
+ uint32_t *l_849 = (void*)0;
+ uint8_t *l_875 = &g_2;
+ union U0 *l_883 = &g_229[0][0][4];
+ const union U1 *l_901 = &g_428[0][0][2];
+ int32_t *l_916[9][9][2] = {{{&g_223.f0,&g_223.f0},{&g_223.f0,(void*)0},{&g_627,&g_10[9].f0},{(void*)0,&g_10[9].f0},{&g_627,(void*)0},{&g_223.f0,&g_223.f0},{&g_223.f0,(void*)0},{&g_627,&g_10[9].f0},{(void*)0,&g_10[9].f0}},{{&g_627,(void*)0},{&g_223.f0,&g_223.f0},{&g_223.f0,(void*)0},{&g_627,&g_10[9].f0},{(void*)0,&g_10[9].f0},{&g_627,(void*)0},{&g_223.f0,&g_223.f0},{&g_223.f0,(void*)0},{&g_627,&g_10[9].f0}},{{(void*)0,&g_10[9].f0},{&g_627,(void*)0},{&g_223.f0,&g_223.f0},{&g_223.f0,(void*)0},{&g_627,&g_10[9].f0},{(void*)0,&g_10[9].f0},{&g_627,(void*)0},{&g_223.f0,&g_223.f0},{&g_223.f0,(void*)0}},{{&g_627,&g_10[9].f0},{(void*)0,&g_10[9].f0},{&g_627,(void*)0},{&g_223.f0,&g_223.f0},{&g_223.f0,(void*)0},{&g_627,&g_10[9].f0},{(void*)0,&g_10[9].f0},{&g_627,(void*)0},{&g_223.f0,&g_223.f0}},{{&g_223.f0,(void*)0},{&g_627,&g_10[9].f0},{(void*)0,&g_10[9].f0},{&g_627,(void*)0},{&g_223.f0,&g_223.f0},{&g_223.f0,(void*)0},{&g_627,&g_10[9].f0},{(void*)0,&g_10[9].f0},{&g_627,(void*)0}},{{(void*)0,(void*)0},{(void*)0,&g_627},{&g_223.f0,&g_223.f0},{&g_627,&g_223.f0},{&g_223.f0,&g_627},{(void*)0,(void*)0},{(void*)0,&g_627},{&g_223.f0,&g_223.f0},{&g_627,&g_223.f0}},{{&g_223.f0,&g_627},{(void*)0,(void*)0},{(void*)0,&g_627},{&g_223.f0,&g_223.f0},{&g_627,&g_223.f0},{&g_223.f0,&g_627},{(void*)0,(void*)0},{(void*)0,&g_627},{&g_223.f0,&g_223.f0}},{{&g_627,&g_223.f0},{&g_223.f0,&g_627},{(void*)0,(void*)0},{(void*)0,&g_627},{&g_223.f0,&g_223.f0},{&g_627,&g_223.f0},{&g_223.f0,&g_627},{(void*)0,(void*)0},{(void*)0,&g_627}},{{&g_223.f0,&g_223.f0},{&g_627,&g_223.f0},{&g_223.f0,&g_627},{(void*)0,(void*)0},{(void*)0,&g_627},{&g_223.f0,&g_223.f0},{&g_627,&g_223.f0},{&g_223.f0,&g_627},{(void*)0,(void*)0}}};
+ int64_t l_918[7] = {0x7A51C65C262453B0LL,0x7A51C65C262453B0LL,5L,0x7A51C65C262453B0LL,0x7A51C65C262453B0LL,5L,0x7A51C65C262453B0LL};
+ union U0 ***l_963[5][5][5] = {{{&l_817,&g_815,(void*)0,&l_817,(void*)0},{&g_815,(void*)0,&g_815,&g_815,&g_815},{&g_815,&l_817,&g_815,(void*)0,&l_817},{&g_815,&g_815,&l_817,(void*)0,&g_819},{&l_817,(void*)0,&g_815,&l_817,&g_819}},{{&g_819,&l_817,&l_817,&g_819,&l_817},{&l_817,(void*)0,&g_815,(void*)0,&l_817},{(void*)0,(void*)0,&g_815,(void*)0,(void*)0},{&g_819,&l_817,(void*)0,&l_817,&g_815},{&g_819,&g_815,&g_819,&g_819,&l_817}},{{(void*)0,&l_817,&g_819,&l_817,&g_815},{&g_819,&g_819,&g_815,&l_817,(void*)0},{&g_815,&g_815,&l_817,(void*)0,&l_817},{&g_815,&g_815,&g_815,&g_815,&l_817},{&g_815,&g_819,&l_817,&l_817,&g_819}},{{(void*)0,&g_819,&g_819,&g_815,&g_819},{&l_817,&g_819,&g_819,&l_817,&l_817},{&g_815,&g_815,&g_815,&g_819,&g_815},{&l_817,&g_815,&g_815,&l_817,(void*)0},{&l_817,&g_819,&g_815,&g_815,(void*)0}},{{&g_815,&l_817,&g_819,(void*)0,&l_817},{(void*)0,&g_815,&l_817,&g_815,&g_819},{(void*)0,&l_817,(void*)0,(void*)0,&l_817},{&g_819,&l_817,&g_815,&g_815,&l_817},{&l_817,&g_819,&g_815,(void*)0,&l_817}}};
+ const uint8_t **l_966 = (void*)0;
+ const uint8_t ** const *l_965 = &l_966;
+ int32_t l_974 = (-6L);
+ int32_t l_977 = 0L;
+ int32_t l_978 = 0x13F01D48L;
+ int32_t l_979 = 1L;
+ int32_t l_982 = 0L;
+ uint64_t l_983 = 18446744073709551615UL;
+ uint32_t l_1013 = 0xCE3163D8L;
+ uint8_t l_1067 = 0xD4L;
+ int32_t l_1180 = 0xF57081BFL;
+ int32_t l_1181 = 0xFB5777F6L;
+ int32_t l_1182 = 0x275AD62DL;
+ int32_t l_1184 = 6L;
+ int32_t l_1185 = (-1L);
+ int32_t l_1186 = 0x7A2C130CL;
+ int32_t l_1188 = (-7L);
+ int32_t l_1190 = 0x38A4EFDBL;
+ int32_t l_1193 = 0xBF70D8C0L;
+ int32_t l_1194 = 1L;
+ int32_t l_1195 = 0x0CE7F4DEL;
+ int32_t l_1196 = (-2L);
+ int32_t l_1197[9] = {0x1F2C8116L,0x1F2C8116L,0x1F2C8116L,0x1F2C8116L,0x1F2C8116L,0x1F2C8116L,0x1F2C8116L,0x1F2C8116L,0x1F2C8116L};
+ uint64_t l_1233 = 0x13588E024B8FA85ALL;
+ int32_t *l_1236[6][9][4] = {{{(void*)0,&l_1182,&l_1182,&l_1197[1]},{&l_1186,&l_1194,&l_1194,&l_1186},{&l_1196,&l_1185,&l_1192[5][0],&l_977},{(void*)0,&l_1184,&l_1197[7],(void*)0},{(void*)0,(void*)0,&l_1193,(void*)0},{&l_1194,&l_1184,&l_1185,&l_977},{&l_1186,&l_1185,&l_1191,&l_1186},{&l_1182,&l_1194,&l_1193,&l_1197[1]},{&l_1185,&l_1182,(void*)0,&l_1196}},{{&l_1186,&l_1197[1],&l_1197[1],&l_1185},{&l_1195,(void*)0,&l_1193,&l_1182},{&l_977,(void*)0,&l_977,(void*)0},{(void*)0,&l_1197[1],(void*)0,(void*)0},{(void*)0,&l_1185,&l_1194,&l_1197[1]},{&l_964,&l_1195,&l_1194,&l_964},{(void*)0,&l_1185,(void*)0,(void*)0},{(void*)0,&l_982,&l_977,(void*)0},{&l_977,(void*)0,&l_1193,(void*)0}},{{&l_1195,&l_1184,&l_1197[1],(void*)0},{&l_1186,(void*)0,(void*)0,&l_1186},{&l_1185,&l_1195,&l_1193,&l_1193},{&l_1182,&l_1182,&l_1191,(void*)0},{&l_1186,&l_1193,&l_1185,&l_1185},{&l_1194,(void*)0,&l_1193,&l_1185},{(void*)0,(void*)0,&l_1197[7],&l_1185},{(void*)0,&l_1193,&l_1192[5][0],(void*)0},{&l_1196,&l_1182,&l_1194,&l_1193}},{{&l_1186,&l_1195,&l_1182,&l_1186},{(void*)0,(void*)0,&l_1192[5][0],(void*)0},{(void*)0,&l_1184,&l_977,(void*)0},{(void*)0,(void*)0,&l_976,(void*)0},{&l_1195,&l_982,&l_1185,(void*)0},{(void*)0,&l_1185,(void*)0,&l_964},{&l_1182,&l_1195,&l_982,&l_1197[1]},{&l_1182,&l_1185,(void*)0,(void*)0},{(void*)0,&l_1197[1],&l_1185,(void*)0}},{{&l_1195,(void*)0,&l_976,&l_1182},{(void*)0,(void*)0,&l_977,&l_1185},{(void*)0,&l_1197[1],&l_1192[5][0],&l_1196},{(void*)0,&l_1182,&l_1182,&l_1197[1]},{&l_1186,&l_1194,&l_1194,&l_1186},{&l_1196,&l_1185,&l_1192[5][0],&l_977},{(void*)0,&l_1192[5][0],&l_1197[1],(void*)0},{&l_1193,&l_1042,&l_1196,(void*)0},{&l_1196,&l_1192[5][0],&l_1191,&l_982}},{{&l_977,&l_982,(void*)0,&l_1185},{(void*)0,&l_1196,&l_1182,&l_1194},{&l_1191,(void*)0,&l_1042,&l_980},{&l_977,&l_1194,(void*)0,&l_982},{&l_964,&l_1192[0][0],&l_1196,(void*)0},{&l_982,&l_1196,&l_982,&l_1196},{&l_1196,&l_1194,&l_1188,(void*)0},{(void*)0,&l_1191,&l_1196,&l_1194},{&l_1197[1],&l_964,&l_1196,&l_1197[1]}}};
+ int i, j, k;
+ for (g_223.f3 = 14; (g_223.f3 >= 16); g_223.f3 = safe_add_func_int32_t_s_s(g_223.f3, 9))
+ { /* block id: 345 */
+ int32_t l_788 = 0x9C835BFDL;
+ int32_t l_790 = 0L;
+ uint8_t *l_824 = (void*)0;
+ uint8_t **l_823 = &l_824;
+ union U1 l_856 = {4294967286UL};
+ uint16_t ***l_873 = &l_870[0];
+ int8_t *l_876 = &g_479;
+ const union U0 l_937 = {7L};
+ const int32_t *l_950[1];
+ const int32_t **l_949[4];
+ const int32_t ***l_948 = &l_949[3];
+ uint32_t l_967 = 0x77B72420L;
+ int32_t l_981 = 1L;
+ union U2 * const l_994 = (void*)0;
+ uint32_t l_1008 = 4294967295UL;
+ int32_t l_1038 = 0xCA27D7C2L;
+ int32_t l_1041 = 2L;
+ int32_t l_1043[10][5] = {{0L,0L,0x66C6F2F5L,1L,(-7L)},{0x77081B5EL,0xEF4C7256L,0x5589E398L,0x77081B5EL,0L},{0x90D8465BL,(-5L),0xAF1CDC4BL,5L,(-5L)},{0L,0xEF4C7256L,0xB86532B7L,0x944B88F4L,0x944B88F4L},{0x5589E398L,0L,0x5589E398L,0xAF1CDC4BL,0x944B88F4L},{1L,0x77081B5EL,0x48DB9371L,0x90D8465BL,(-5L)},{0xEF4C7256L,0x90D8465BL,0xDAE9F189L,1L,0L},{0x832C4FFEL,0L,0x48DB9371L,(-5L),(-7L)},{0x90D8465BL,0x5589E398L,0x5589E398L,0x90D8465BL,0x832C4FFEL},{0x90D8465BL,1L,0xB86532B7L,5L,1L}};
+ uint8_t l_1044[1][4][6] = {{{0xD3L,0xE8L,0xD3L,255UL,255UL,0xD3L},{0UL,0UL,255UL,250UL,255UL,0UL},{255UL,0xE8L,250UL,250UL,0xE8L,255UL},{0UL,255UL,250UL,255UL,0UL,0UL}}};
+ uint32_t ***l_1127 = (void*)0;
+ uint32_t ****l_1126 = &l_1127;
+ uint32_t *****l_1125 = &l_1126;
+ uint32_t ****l_1129 = &l_1127;
+ uint32_t *****l_1128 = &l_1129;
+ int16_t l_1187[2][3][7] = {{{0x8B62L,1L,0x8B62L,1L,1L,(-9L),(-9L)},{1L,3L,0x2A4CL,3L,1L,0x2A4CL,0xC3E2L},{0xC3E2L,(-9L),1L,0xC3E2L,1L,(-9L),0xC3E2L}},{{0x8B62L,0xC3E2L,(-9L),1L,0xC3E2L,1L,(-9L)},{0xC3E2L,0xC3E2L,0x2A4CL,1L,3L,0x2A4CL,3L},{1L,(-9L),(-9L),1L,1L,0x8B62L,1L}}};
+ int i, j, k;
+ for (i = 0; i < 1; i++)
+ l_950[i] = &l_791;
+ for (i = 0; i < 4; i++)
+ l_949[i] = &l_950[0];
+ for (g_75 = 0; (g_75 <= 5); g_75 += 1)
+ { /* block id: 348 */
+ int32_t *l_782 = &g_111[4][0];
+ int32_t *l_783 = &g_92;
+ int32_t *l_784 = (void*)0;
+ int32_t *l_785 = &g_111[1][3];
+ int32_t *l_786 = &g_92;
+ int32_t *l_787[8] = {&g_92,&g_89,&g_92,&g_89,&g_92,&g_89,&g_92,&g_89};
+ union U0 **l_803 = &g_225;
+ uint8_t *l_809 = &g_53[1];
+ uint8_t **l_808 = &l_809;
+ const union U2 *l_813 = &g_814;
+ const union U2 **l_812 = &l_813;
+ union U0 **l_816 = (void*)0;
+ union U0 ***l_818[1][8] = {{(void*)0,&l_803,&l_803,(void*)0,&l_803,&l_803,(void*)0,&l_803}};
+ int16_t *l_820 = (void*)0;
+ int16_t *l_821 = &g_507;
+ union U0 l_848 = {0L};
+ int32_t l_865 = 0xD0F7F5FBL;
+ uint16_t ***l_868 = (void*)0;
+ int64_t *l_940 = &g_49;
+ int i, j;
+ l_792++;
+ }
+ if (((~(0x961AFC41136F22A9LL | (safe_add_func_uint16_t_u_u(((safe_div_func_uint32_t_u_u((((((l_790 | ((void*)0 == l_948)) == ((safe_rshift_func_uint16_t_u_s(((safe_lshift_func_uint8_t_u_u(((*g_931) = (safe_lshift_func_uint16_t_u_u((safe_mul_func_uint16_t_u_u(((((safe_rshift_func_int16_t_s_s((((l_918[2] || (0x5CL != ((((l_964 = (safe_sub_func_int8_t_s_s(((l_963[4][2][3] == l_963[4][2][3]) == (l_759 = 18446744073709551615UL)), 0x1DL))) > 0x1AL) , &l_856) == &g_428[6][0][2]))) , (**g_930)) < g_627), l_857[0][0][1])) , &g_930) != l_965) || 0x2A4742A4L), 0x19AAL)), 10))), l_918[3])) == (*g_912)), 5)) != (*g_912))) & (*g_318)) , l_950[0]) == (*g_911)), 0xDFE9E75CL)) > l_967), 1L)))) == l_932))
+ { /* block id: 423 */
+ int32_t *l_968 = &l_759;
+ int32_t *l_969 = &g_89;
+ int32_t *l_970 = &l_790;
+ int32_t *l_971 = &l_791;
+ int32_t *l_972 = (void*)0;
+ int32_t *l_973[5];
+ union U2 ***l_1006 = &g_54;
+ uint16_t *l_1024 = &l_792;
+ int8_t l_1035 = 0L;
+ int i;
+ for (i = 0; i < 5; i++)
+ l_973[i] = (void*)0;
+ l_983++;
+ if ((*l_971))
+ break;
+ (**l_948) = l_970;
+ for (g_226.f2 = 0; (g_226.f2 <= 2); g_226.f2 += 1)
+ { /* block id: 429 */
+ uint32_t l_986 = 4294967295UL;
+ int32_t l_987 = 1L;
+ int32_t l_988[5][9] = {{0L,0x09DD368BL,2L,0L,0L,2L,0x09DD368BL,0L,2L},{0L,0x09DD368BL,0L,0L,0L,0L,0x0A634DD4L,6L,0L},{6L,0x0A634DD4L,0L,0L,0L,0L,0x0A634DD4L,6L,0L},{6L,0x0A634DD4L,0L,0L,0L,0L,0x0A634DD4L,6L,0L},{6L,0x0A634DD4L,0L,0L,0L,0L,0x0A634DD4L,6L,0L}};
+ int32_t *l_1016 = (void*)0;
+ uint16_t *l_1023 = &g_245;
+ int i, j;
+ if (l_986)
+ { /* block id: 430 */
+ uint16_t l_989[1][1][7];
+ uint32_t *l_1009[5][7][5] = {{{&g_223.f2,&g_226.f2,&g_10[9].f2,(void*)0,&g_226.f2},{&g_226.f2,&g_226.f2,(void*)0,(void*)0,&g_10[9].f2},{(void*)0,(void*)0,&g_223.f2,&g_223.f2,&g_226.f2},{(void*)0,&l_932,&g_226.f2,&g_226.f2,&l_932},{&g_226.f2,(void*)0,&g_226.f2,(void*)0,(void*)0},{&g_223.f2,&g_226.f2,&g_223.f2,&g_226.f2,(void*)0},{&l_932,&g_226.f2,(void*)0,&g_223.f2,&l_932}},{{&g_223.f2,&g_226.f2,&g_10[9].f2,(void*)0,&g_226.f2},{&g_226.f2,&g_226.f2,(void*)0,(void*)0,&g_10[9].f2},{(void*)0,(void*)0,&g_223.f2,&g_223.f2,&g_226.f2},{(void*)0,&l_932,&g_226.f2,&g_226.f2,&l_932},{&g_226.f2,(void*)0,&g_226.f2,(void*)0,(void*)0},{&g_223.f2,&g_226.f2,&g_223.f2,&g_226.f2,(void*)0},{&l_932,&g_226.f2,(void*)0,&g_223.f2,&l_932}},{{&g_223.f2,&g_226.f2,&g_10[9].f2,(void*)0,&g_226.f2},{&g_226.f2,&g_226.f2,(void*)0,(void*)0,&g_10[9].f2},{(void*)0,(void*)0,&g_223.f2,&g_223.f2,&g_226.f2},{(void*)0,&l_932,&g_226.f2,&g_226.f2,&l_932},{&g_226.f2,(void*)0,&g_226.f2,(void*)0,(void*)0},{&g_223.f2,&g_226.f2,&g_223.f2,&g_226.f2,(void*)0},{&l_932,&g_226.f2,(void*)0,&g_223.f2,&l_932}},{{&g_223.f2,&g_226.f2,&g_10[9].f2,(void*)0,&g_226.f2},{&g_226.f2,&g_226.f2,(void*)0,(void*)0,&g_10[9].f2},{(void*)0,(void*)0,&g_223.f2,&g_223.f2,&g_226.f2},{(void*)0,&l_932,&g_226.f2,&g_226.f2,&l_932},{&g_226.f2,(void*)0,&g_226.f2,(void*)0,(void*)0},{&g_223.f2,&g_226.f2,&g_223.f2,&g_226.f2,(void*)0},{&l_932,&g_226.f2,(void*)0,&g_223.f2,&l_932}},{{&g_223.f2,&g_226.f2,&g_10[9].f2,(void*)0,&g_226.f2},{&g_226.f2,&g_226.f2,(void*)0,(void*)0,&g_10[9].f2},{(void*)0,(void*)0,&g_223.f2,&g_223.f2,&g_226.f2},{(void*)0,&l_932,(void*)0,(void*)0,(void*)0},{&g_223.f2,(void*)0,(void*)0,&g_226.f2,&l_967},{&g_223.f2,(void*)0,&l_932,(void*)0,&l_967},{&l_967,&g_226.f2,&g_226.f2,(void*)0,(void*)0}}};
+ int32_t l_1010 = 0xE506438AL;
+ int32_t l_1011 = (-3L);
+ int32_t l_1012 = 0x265CF71AL;
+ int i, j, k;
+ for (i = 0; i < 1; i++)
+ {
+ for (j = 0; j < 1; j++)
+ {
+ for (k = 0; k < 7; k++)
+ l_989[i][j][k] = 0xDF33L;
+ }
+ }
+ (**l_948) = &l_791;
+ l_989[0][0][3]++;
+ (*l_969) |= (safe_lshift_func_uint8_t_u_u((((void*)0 != l_994) , (safe_unary_minus_func_uint32_t_u(((l_988[1][6] = (safe_lshift_func_int8_t_s_u(((void*)0 == &g_627), ((safe_lshift_func_uint16_t_u_u((safe_mod_func_uint16_t_u_u((safe_lshift_func_uint16_t_u_s((l_975 , (safe_lshift_func_int16_t_s_s(((*l_899) == l_1006), 7))), (((*g_931) = g_1007) == g_223.f3))), 0xDB6DL)), l_1008)) , l_974)))) , 4294967291UL)))), 7));
+ l_1013++;
+ }
+ else
+ { /* block id: 437 */
+ uint16_t *l_1025 = (void*)0;
+ int32_t l_1034 = (-1L);
+ int32_t l_1036 = 0xB9E319BAL;
+ int32_t l_1037 = 5L;
+ int32_t l_1039 = (-1L);
+ int32_t l_1040 = 0x5EEBA298L;
+ l_1016 = l_972;
+ (*l_968) ^= (safe_rshift_func_int8_t_s_s((+((safe_mod_func_int16_t_s_s((safe_div_func_int8_t_s_s(l_791, 0x24L)), (((l_1024 = l_1023) != (l_1025 = l_1025)) , (((safe_lshift_func_int8_t_s_u(((safe_div_func_uint64_t_u_u((safe_rshift_func_uint16_t_u_u((*l_971), ((*g_931) || (0x69EAL < (((*g_912) = (safe_sub_func_uint16_t_u_u(((g_226.f2 ^ (l_982 ^ l_988[3][6])) == (*g_318)), (*g_244)))) >= l_789))))), (*g_318))) == (*l_971)), 7)) & l_1034) , (-7L))))) , g_149)), 6));
+ l_1044[0][3][5]++;
+ }
+ }
+ }
+ else
+ { /* block id: 446 */
+ uint32_t l_1053 = 18446744073709551612UL;
+ const uint16_t ****l_1061 = (void*)0;
+ int32_t l_1089 = 0x58936FB3L;
+ uint8_t l_1099 = 0x88L;
+ int32_t l_1108[7] = {4L,0xBE5E93A0L,0xBE5E93A0L,4L,0xBE5E93A0L,0xBE5E93A0L,4L};
+ int i;
+ for (l_792 = 0; (l_792 <= 3); l_792 += 1)
+ { /* block id: 449 */
+ int32_t *l_1047 = (void*)0;
+ int32_t *l_1048 = &l_759;
+ int32_t *l_1049 = (void*)0;
+ int32_t *l_1050 = (void*)0;
+ int32_t *l_1051 = &l_981;
+ int32_t *l_1052[6] = {(void*)0,(void*)0,(void*)0,(void*)0,(void*)0,(void*)0};
+ uint32_t ***l_1059 = (void*)0;
+ uint32_t ****l_1058[6][9] = {{&l_1059,(void*)0,&l_1059,&l_1059,&l_1059,&l_1059,&l_1059,&l_1059,&l_1059},{&l_1059,(void*)0,&l_1059,(void*)0,&l_1059,&l_1059,(void*)0,&l_1059,&l_1059},{&l_1059,&l_1059,&l_1059,&l_1059,&l_1059,&l_1059,&l_1059,&l_1059,(void*)0},{&l_1059,&l_1059,(void*)0,&l_1059,&l_1059,&l_1059,(void*)0,&l_1059,&l_1059},{&l_1059,&l_1059,&l_1059,&l_1059,&l_1059,&l_1059,&l_1059,&l_1059,&l_1059},{(void*)0,(void*)0,&l_1059,&l_1059,&l_1059,&l_1059,&l_1059,&l_1059,&l_1059}};
+ uint32_t ***l_1060 = &l_908[8][1];
+ union U1 l_1064[9] = {{0xCCDF0B70L},{0xCCDF0B70L},{0xCCDF0B70L},{0xCCDF0B70L},{0xCCDF0B70L},{0xCCDF0B70L},{0xCCDF0B70L},{0xCCDF0B70L},{0xCCDF0B70L}};
+ union U0 **l_1076[7];
+ uint32_t l_1077[10] = {18446744073709551615UL,0x091F9E54L,0xCE927A92L,0x091F9E54L,18446744073709551615UL,18446744073709551615UL,0x091F9E54L,0xCE927A92L,0x091F9E54L,18446744073709551615UL};
+ union U2 l_1104[1] = {{1L}};
+ int i, j;
+ for (i = 0; i < 7; i++)
+ l_1076[i] = &l_883;
+ l_1053++;
+ l_1067 ^= (((g_10[9].f4 & (safe_add_func_uint64_t_u_u(((l_1060 = &g_911) != &l_908[5][0]), (l_974 , ((void*)0 != l_1061))))) , l_1053) <= ((safe_sub_func_uint16_t_u_u(((l_1064[0] , (safe_mul_func_uint8_t_u_u(255UL, l_975))) || 0x62FFL), l_979)) , (*g_912)));
+ if ((((l_1067 , (((((((g_444--) <= (((*l_901) , ((*g_244) , ((l_976 < (g_627 , ((g_245 = (safe_rshift_func_int16_t_s_u((((safe_mul_func_uint32_t_u_u((g_1074[2] != (void*)0), (l_1076[4] == (((g_147 < g_231[2][3][1].f1) > g_101) , (void*)0)))) , l_791) >= l_1053), l_918[3]))) , 9L))) | l_976))) >= 0x0FL)) && (*l_1051)) || l_932) , l_1077[0]) & l_1053) , l_1013)) && (*l_1051)) && (**g_930)))
+ { /* block id: 455 */
+ uint32_t *l_1086 = &l_1064[0].f0;
+ int16_t *l_1087 = &g_507;
+ int16_t *l_1088[8] = {(void*)0,(void*)0,(void*)0,(void*)0,(void*)0,(void*)0,(void*)0,(void*)0};
+ int32_t l_1091 = 0x536FF2CFL;
+ int i;
+ l_974 |= ((*l_1051) = ((safe_mod_func_int8_t_s_s((*l_1048), 8UL)) <= (safe_sub_func_int16_t_s_s(((l_1089 &= ((*l_1087) = (safe_rshift_func_uint16_t_u_u(((void*)0 == &g_911), (safe_mul_func_uint16_t_u_u(((&l_1008 != (l_1086 = &l_1013)) >= 0xC6D2L), ((-7L) == l_822[0][4]))))))) && 0x72AFL), l_857[5][1][3]))));
+ if (l_1090)
+ continue;
+ if (l_1091)
+ continue;
+ }
+ else
+ { /* block id: 463 */
+ uint32_t l_1094 = 18446744073709551615UL;
+ int32_t l_1100 = (-7L);
+ l_1043[4][0] = (((((safe_sub_func_uint64_t_u_u((((0xC7L <= ((l_918[5] , (l_1094 = (*g_912))) > ((safe_add_func_uint64_t_u_u((safe_rshift_func_int8_t_s_u(l_1099, ((*l_875) = l_1100))), (~(l_1101 <= (safe_mul_func_uint16_t_u_u((l_1100 , ((((l_1104[0] , ((***l_948) > l_1099)) , l_1100) & l_983) <= (*g_912))), l_1100)))))) || l_857[1][1][0]))) == g_375) <= 0xECL), (*g_318))) , l_1089) ^ (**g_911)) != 0x48965DBB2790DDDDLL) | 1L);
+ }
+ for (l_1099 = 0; (l_1099 <= 4); l_1099 += 1)
+ { /* block id: 470 */
+ int8_t l_1105 = 0xADL;
+ int32_t l_1106 = 0x413B3C1FL;
+ int32_t l_1107[10][4] = {{1L,(-6L),0x7FC6FB02L,0x7FC6FB02L},{0xAD222DD9L,0xAD222DD9L,1L,0x7FC6FB02L},{0xEEC01B30L,(-6L),0xEEC01B30L,1L},{0xEEC01B30L,1L,1L,0xEEC01B30L},{0xAD222DD9L,1L,0x7FC6FB02L,1L},{1L,(-6L),0x7FC6FB02L,0x7FC6FB02L},{0xAD222DD9L,0xAD222DD9L,1L,0x7FC6FB02L},{0xEEC01B30L,(-6L),0xEEC01B30L,1L},{0xEEC01B30L,1L,1L,0xEEC01B30L},{0xAD222DD9L,1L,0x7FC6FB02L,1L}};
+ uint16_t l_1109 = 65534UL;
+ int i, j;
+ (*l_1051) |= l_1013;
+ l_1109++;
+ if (l_789)
+ break;
+ }
+ for (l_976 = 3; (l_976 >= 1); l_976 -= 1)
+ { /* block id: 477 */
+ union U2 l_1112 = {0x95AB76F0L};
+ (**l_948) = (void*)0;
+ return l_1112;
+ }
+ }
+ }
+ if (l_751)
+ break;
+ if ((((*l_876) = (safe_rshift_func_int16_t_s_s((safe_div_func_int32_t_s_s((safe_lshift_func_int8_t_s_s(((*g_318) , ((safe_mul_func_uint16_t_u_u((l_822[0][5] == ((l_983 <= l_759) > ((((safe_rshift_func_int16_t_s_s(0x99CFL, 1)) , (safe_rshift_func_uint8_t_u_u(l_1042, 5))) <= (((*l_1128) = ((*l_1125) = (void*)0)) == (void*)0)) < ((g_149 != l_1130) > l_943[0][6][1])))), 7L)) == 0x7FA5L)), l_857[3][1][2])), l_822[2][5])), 11))) | 0xFEL))
+ { /* block id: 487 */
+ int32_t *l_1131 = &l_982;
+ for (l_1038 = 0; l_1038 < 10; l_1038 += 1)
+ {
+ l_870[l_1038] = &l_871;
+ }
+ (*l_1131) |= (0xE835L >= 1L);
+ }
+ else
+ { /* block id: 490 */
+ int32_t l_1132 = 3L;
+ const uint32_t l_1157 = 0xC3A60DA1L;
+ int8_t l_1158 = 1L;
+ int32_t l_1168 = 1L;
+ int32_t l_1169 = 8L;
+ int32_t l_1170 = 0xAC0D721EL;
+ int32_t l_1173 = 0xFDFA3AE3L;
+ int32_t l_1174[6] = {0x0CF5CB29L,0x0CF5CB29L,0x0CF5CB29L,0x0CF5CB29L,0x0CF5CB29L,0x0CF5CB29L};
+ int32_t *l_1229 = &l_1182;
+ int32_t *l_1230 = &l_1185;
+ int32_t *l_1231[7];
+ int i;
+ for (i = 0; i < 7; i++)
+ l_1231[i] = &l_1190;
+ for (l_979 = 5; (l_979 >= 0); l_979 -= 1)
+ { /* block id: 493 */
+ uint8_t l_1135 = 8UL;
+ int32_t *l_1138 = &g_89;
+ int32_t l_1171 = (-3L);
+ int32_t l_1172 = 0x574353F2L;
+ int32_t l_1175 = 0x9B33C241L;
+ int32_t l_1176 = 0x272F75CEL;
+ int32_t l_1177 = 5L;
+ int32_t l_1179[3];
+ union U1 l_1207 = {4294967295UL};
+ int i;
+ for (i = 0; i < 3; i++)
+ l_1179[i] = 0L;
+ if (l_1132)
+ break;
+ (*l_1138) = ((0L > ((l_943[0][3][1] & (l_1132 ^ (l_1135 != ((safe_mul_func_uint16_t_u_u(l_1135, 65535UL)) ^ ((l_975 , 2UL) >= (0x64L & l_1135)))))) , l_1135)) && 0UL);
+ if (((**l_817) , (((safe_mul_func_int16_t_s_s((((+0L) & (safe_mod_func_int8_t_s_s((((*l_880) |= (safe_mul_func_int16_t_s_s(((((((((*l_1138) == (((*l_909)++) < (((*l_871) = l_1132) & (safe_div_func_uint64_t_u_u(((*l_1138) < (safe_lshift_func_int8_t_s_s((l_1132 | ((safe_add_func_int8_t_s_s(((((safe_mul_func_uint8_t_u_u((((l_1132 > l_974) ^ (safe_mod_func_uint64_t_u_u(((1UL > 0x8F25A903L) == (*g_931)), l_789))) , (*l_1138)), g_627)) == (*l_1138)) == (*l_1138)) , (*l_1138)), 1L)) & l_918[1])), 2))), (*g_318)))))) != (*g_318)) || l_1132) > (-1L)) || 8L) != l_1132) ^ l_1132), l_1157))) & (*g_931)), 0x0CL))) <= 0L), 0x96EEL)) != l_1158) , (*l_1138))))
+ { /* block id: 499 */
+ int32_t *l_1159 = &l_759;
+ int32_t *l_1160 = &l_980;
+ int32_t *l_1161 = &l_981;
+ int32_t *l_1162 = &g_92;
+ int32_t *l_1163 = &l_1041;
+ int32_t *l_1164 = (void*)0;
+ int32_t *l_1165 = &l_791;
+ int32_t *l_1166 = (void*)0;
+ int32_t *l_1167[4] = {&l_964,&l_964,&l_964,&l_964};
+ int i;
+ g_1198[6][3]--;
+ (**l_948) = &l_976;
+ if (l_1158)
+ continue;
+ }
+ else
+ { /* block id: 503 */
+ uint32_t l_1219 = 0x008FA38AL;
+ (*l_1138) = (((0xEFL < ((safe_div_func_uint64_t_u_u((safe_mul_func_int16_t_s_s(((*g_931) ^ ((~0x1F9CBF83EE15EE48LL) ^ ((((l_1207 , (*g_244)) < ((safe_add_func_uint64_t_u_u((safe_mul_func_uint8_t_u_u((l_1212[3][2][7] , l_1192[5][0]), (safe_add_func_uint32_t_u_u(((safe_sub_func_uint16_t_u_u((((safe_lshift_func_int16_t_s_s(((**l_817) , (((l_1219 == 65533UL) || 0xDF1FE933C61F5786LL) > 0x2F60BAB9L)), l_792)) < 7L) , l_1173), (-1L))) <= (-7L)), l_1174[5])))), (*l_1138))) > g_231[2][3][1].f1)) , 0UL) || 0x45C9L))), 0xB438L)), 0xD8DBB58FFCFC04ADLL)) & 1L)) >= (-7L)) | (*l_1138));
+ }
+ for (l_1173 = 0; (l_1173 >= 0); l_1173 -= 1)
+ { /* block id: 508 */
+ int32_t l_1226 = 0xE9D9050BL;
+ int16_t *l_1227 = &l_1101;
+ (*l_1138) = ((safe_sub_func_int16_t_s_s(((*l_1227) = ((((((*l_1138) > (((*g_604) = &p_21) == &p_21)) && g_814.f0) , 1L) != (((*g_912) = (safe_div_func_int64_t_s_s(l_1174[5], ((((void*)0 == &g_1075) , (*l_883)) , g_53[1])))) == l_1194)) > l_1226)), 0xCE39L)) ^ l_1226);
+ }
+ for (l_792 = 0; (l_792 <= 0); l_792 += 1)
+ { /* block id: 516 */
+ uint32_t l_1228 = 3UL;
+ (*l_1138) |= l_1228;
+ }
+ }
+ l_1233++;
+ (**l_948) = l_1236[2][7][2];
+ }
+ }
+ }
+ l_1241++;
+ for (g_706 = 2; (g_706 >= 0); g_706 -= 1)
+ { /* block id: 528 */
+ int32_t l_1244 = 4L;
+ int32_t l_1245 = 0x5B87C714L;
+ int32_t l_1246[8][9][3] = {{{(-5L),0xB5ED473FL,0L},{1L,1L,0xF457B790L},{(-1L),1L,1L},{1L,0xA309F180L,0xFFF59FB6L},{(-5L),1L,0xFFF59FB6L},{0x10A1A9AFL,0xFFF59FB6L,1L},{5L,0L,0xF457B790L},{0xFFF59FB6L,0xFFF59FB6L,0L},{1L,1L,0x14D48AFEL}},{{1L,0x14D48AFEL,1L},{0L,(-1L),1L},{1L,0x10A1A9AFL,1L},{0xB5ED473FL,0xA309F180L,0xF457B790L},{5L,0xA309F180L,1L},{(-1L),0x10A1A9AFL,(-5L)},{0xFFF59FB6L,(-1L),(-1L)},{(-1L),0x14D48AFEL,0L},{5L,1L,0L}},{{0xB5ED473FL,0L,(-1L)},{1L,1L,(-5L)},{0L,0L,1L},{0x10A1A9AFL,1L,0xF457B790L},{0x10A1A9AFL,0x14D48AFEL,1L},{0L,(-1L),1L},{1L,0x10A1A9AFL,1L},{0xB5ED473FL,0xA309F180L,0xF457B790L},{5L,0xA309F180L,1L}},{{(-1L),0x10A1A9AFL,(-5L)},{0xFFF59FB6L,(-1L),(-1L)},{(-1L),0x14D48AFEL,0L},{5L,1L,0L},{0xB5ED473FL,0L,(-1L)},{1L,1L,(-5L)},{0L,0L,1L},{0x10A1A9AFL,1L,0xF457B790L},{0x10A1A9AFL,0x14D48AFEL,1L}},{{0L,(-1L),1L},{1L,0x10A1A9AFL,1L},{0xB5ED473FL,0xA309F180L,0xF457B790L},{5L,0xA309F180L,1L},{(-1L),0x10A1A9AFL,(-5L)},{0xFFF59FB6L,(-1L),(-1L)},{(-1L),0x14D48AFEL,0L},{5L,1L,0L},{0xB5ED473FL,0L,(-1L)}},{{1L,1L,(-5L)},{0L,0L,1L},{0x10A1A9AFL,1L,0xF457B790L},{0x10A1A9AFL,0x14D48AFEL,1L},{0L,(-1L),1L},{1L,0x10A1A9AFL,1L},{0xB5ED473FL,0xA309F180L,0xF457B790L},{5L,0xA309F180L,1L},{(-1L),0x10A1A9AFL,(-5L)}},{{0xFFF59FB6L,(-1L),(-1L)},{(-1L),0x14D48AFEL,0L},{5L,1L,0L},{0xB5ED473FL,0L,(-1L)},{1L,1L,(-5L)},{0L,0L,1L},{0x10A1A9AFL,1L,0xF457B790L},{0x10A1A9AFL,0x14D48AFEL,1L},{0L,(-1L),1L}},{{1L,0x10A1A9AFL,1L},{0xB5ED473FL,0xA309F180L,0xF457B790L},{5L,0xA309F180L,1L},{(-1L),0x10A1A9AFL,(-5L)},{0xFFF59FB6L,(-1L),(-1L)},{(-1L),0x14D48AFEL,0L},{5L,1L,0L},{0xB5ED473FL,0L,(-1L)},{1L,1L,(-5L)}}};
+ uint32_t l_1247 = 0UL;
+ int16_t l_1250 = 0L;
+ uint32_t l_1253 = 5UL;
+ int32_t l_1257[9] = {(-7L),0x6AB92E35L,4L,4L,(-7L),4L,4L,(-7L),4L};
+ int16_t l_1263[8][8] = {{0x20A9L,1L,0x20A9L,0x2CCCL,0x20A9L,1L,0x20A9L,0x2CCCL},{0x20A9L,1L,0x20A9L,0x2CCCL,0x20A9L,1L,0x20A9L,0x2CCCL},{0x20A9L,1L,0x20A9L,0x2CCCL,0x20A9L,1L,0x20A9L,0x2CCCL},{0x20A9L,1L,0x20A9L,0x2CCCL,0x20A9L,1L,0x20A9L,0x2CCCL},{0x20A9L,1L,0x20A9L,0x2CCCL,0x20A9L,1L,0x20A9L,0x2CCCL},{0x20A9L,1L,0x20A9L,0x2CCCL,0x20A9L,1L,0x20A9L,0x2CCCL},{0x20A9L,1L,0x20A9L,0x2CCCL,0x20A9L,1L,0x20A9L,0x2CCCL},{0x20A9L,1L,0x20A9L,0x2CCCL,0x20A9L,1L,0x20A9L,0x2CCCL}};
+ union U0 *l_1291 = (void*)0;
+ int8_t l_1292 = 0xCBL;
+ union U2 ***l_1297 = &g_54;
+ uint32_t *****l_1338[6][9] = {{&l_1337,&l_1337,&l_1337,&l_1337,&l_1337,&l_1337,(void*)0,&l_1337,&l_1337},{&l_1337,&l_1337,&l_1337,&l_1337,&l_1337,&l_1337,&l_1337,&l_1337,&l_1337},{(void*)0,&l_1337,&l_1337,(void*)0,(void*)0,&l_1337,&l_1337,&l_1337,&l_1337},{(void*)0,&l_1337,&l_1337,&l_1337,&l_1337,(void*)0,(void*)0,&l_1337,&l_1337},{&l_1337,&l_1337,&l_1337,&l_1337,(void*)0,&l_1337,&l_1337,(void*)0,&l_1337},{&l_1337,&l_1337,&l_1337,&l_1337,&l_1337,(void*)0,&l_1337,&l_1337,&l_1337}};
+ int i, j, k;
+ l_1247--;
+ ++l_1253;
+ }
+ return (*g_222);
+}
+
+
+/* ------------------------------------------ */
+/*
+ * reads : g_706 g_428 g_92 g_444 g_10.f4 g_89 g_111 g_149 g_53
+ * writes: g_706 g_444
+ */
+static int8_t func_26(const int64_t p_27, uint32_t p_28, uint64_t p_29, union U2 p_30)
+{ /* block id: 322 */
+ int64_t l_678[10] = {0x7DABD13DDE14C484LL,0x7DABD13DDE14C484LL,0x92E72AE3C392FA5ELL,0x7DABD13DDE14C484LL,0x7DABD13DDE14C484LL,0x92E72AE3C392FA5ELL,0x7DABD13DDE14C484LL,0x7DABD13DDE14C484LL,0x92E72AE3C392FA5ELL,0x7DABD13DDE14C484LL};
+ int32_t *l_679 = &g_111[1][3];
+ int32_t *l_680 = &g_111[1][3];
+ int32_t *l_681 = &g_111[1][3];
+ int32_t *l_682 = &g_89;
+ int32_t *l_683 = (void*)0;
+ int32_t *l_684 = &g_111[6][3];
+ int32_t *l_685 = &g_111[1][3];
+ int32_t *l_686 = &g_111[4][8];
+ int32_t *l_687 = &g_89;
+ int32_t *l_688 = &g_92;
+ int32_t *l_689 = &g_89;
+ int32_t *l_690 = &g_111[7][0];
+ int32_t l_691 = (-1L);
+ int32_t *l_692 = &g_92;
+ int32_t *l_693 = &l_691;
+ int32_t *l_694 = &g_111[1][3];
+ int32_t *l_695 = (void*)0;
+ int32_t *l_696 = &g_111[1][3];
+ int32_t l_697 = 0x8F752B8FL;
+ int32_t *l_698 = &g_111[2][4];
+ int32_t *l_699[6][5][7] = {{{(void*)0,&l_691,&g_89,&g_111[1][1],(void*)0,&l_691,&g_89},{&l_691,(void*)0,&l_691,&g_89,&l_691,&g_89,&g_111[1][3]},{&g_111[1][5],&l_691,&g_89,&g_89,&g_111[0][3],&g_111[1][3],&l_697},{(void*)0,&l_691,&l_697,&l_697,&l_697,&l_691,&g_89},{&g_111[1][3],&g_89,&l_697,&g_111[1][3],&g_89,&l_691,&l_691}},{{&g_111[1][3],&g_92,&g_111[1][3],&g_111[1][3],&g_92,&g_111[1][3],&g_111[7][4]},{&g_111[1][1],&g_89,(void*)0,&g_92,(void*)0,&g_89,&g_111[7][8]},{&g_89,(void*)0,&l_691,&g_111[7][4],&g_111[1][1],&l_691,&g_89},{(void*)0,&g_111[1][3],(void*)0,&l_697,(void*)0,&l_691,&g_89},{&g_92,&l_691,(void*)0,&g_89,&g_111[1][3],&l_691,&g_89}},{{&l_697,&g_92,(void*)0,(void*)0,&g_111[1][3],&l_691,&l_691},{(void*)0,(void*)0,(void*)0,(void*)0,(void*)0,(void*)0,(void*)0},{&g_92,&g_111[1][3],&g_111[7][4],&l_697,(void*)0,&g_89,&g_89},{&l_691,&l_691,&g_89,&g_111[0][8],&l_697,&l_697,&g_111[7][4]},{&g_92,&l_697,&g_92,&g_92,&l_691,(void*)0,&g_89}},{{(void*)0,&l_691,&g_89,&l_697,&g_111[1][2],(void*)0,(void*)0},{&l_697,&g_89,&l_691,&l_697,(void*)0,&l_691,(void*)0},{&g_92,(void*)0,(void*)0,&g_92,&g_89,&g_89,&l_691},{(void*)0,&g_92,&g_111[1][1],&g_111[0][8],(void*)0,&l_697,&g_111[7][8]},{(void*)0,&g_89,&l_691,&l_697,&l_691,&g_89,&l_691}},{{(void*)0,&l_697,&g_111[1][5],(void*)0,(void*)0,&g_89,(void*)0},{&l_697,&l_697,&g_92,(void*)0,&g_89,&g_111[7][8],(void*)0},{&g_111[7][8],(void*)0,&g_92,&g_89,&g_89,&g_89,&g_89},{&g_111[1][5],&g_111[1][1],&g_111[1][5],&l_697,&g_111[0][8],&g_111[1][2],&g_111[7][4]},{&g_89,&g_111[0][8],&l_691,(void*)0,(void*)0,&g_92,&g_89}},{{&g_111[1][3],&l_697,&g_111[1][1],&l_691,&g_111[0][3],&g_111[1][2],(void*)0},{&l_691,&l_691,(void*)0,&g_92,&g_111[1][1],&g_89,&l_691},{&g_111[1][2],(void*)0,&l_691,&l_697,&g_111[1][3],&g_111[7][8],&g_89},{&g_111[0][8],(void*)0,&g_89,&g_89,&g_92,&g_89,&g_89},{&l_691,&l_691,&g_92,&g_111[1][2],&l_691,&g_89,(void*)0}}};
+ int64_t l_700 = 1L;
+ int16_t l_701 = 8L;
+ int32_t l_702[1][6][7] = {{{0L,1L,0x18B116A3L,0L,0x18B116A3L,1L,0L},{8L,0xF5B73F85L,3L,0x8478EF1FL,0xF5B73F85L,0x8478EF1FL,3L},{0L,0L,0x04248741L,(-1L),(-5L),0x04248741L,(-5L)},{6L,3L,3L,6L,0x8478EF1FL,8L,6L},{(-1L),(-5L),0x18B116A3L,0x18B116A3L,(-5L),(-1L),1L},{0xFEB019D1L,3L,0xF5B73F85L,8L,8L,0xF5B73F85L,3L}}};
+ int8_t l_703 = 5L;
+ int16_t l_704 = 0x19F2L;
+ int8_t l_705 = (-1L);
+ int32_t l_707 = 0xCB0D6A35L;
+ int32_t l_708 = 0xC949726BL;
+ int8_t l_709[10] = {0x4FL,0x87L,0x4FL,0x87L,0x4FL,0x87L,0x4FL,0x87L,0x4FL,0x87L};
+ int64_t l_710 = (-1L);
+ uint32_t l_711 = 1UL;
+ uint16_t l_714 = 0xFD9EL;
+ int i, j, k;
+ l_711--;
+ l_714--;
+ for (g_706 = (-3); (g_706 > (-9)); g_706--)
+ { /* block id: 327 */
+ union U0 *l_723 = &g_229[1][0][4];
+ uint16_t *l_734 = &g_444;
+ uint32_t l_735 = 8UL;
+ uint64_t *l_736 = &g_223.f3;
+ uint64_t *l_737 = &g_10[9].f3;
+ uint64_t *l_738 = &g_223.f3;
+ uint64_t *l_739 = (void*)0;
+ uint64_t *l_740 = &g_223.f3;
+ uint64_t *l_741 = &g_223.f3;
+ uint64_t *l_742 = &g_223.f3;
+ uint64_t *l_743 = &g_10[9].f3;
+ uint64_t *l_744 = &g_223.f3;
+ int32_t l_745 = 0x1A8AE3E5L;
+ int32_t l_746[6] = {0x10D458ECL,0x5D95F8E7L,0x10D458ECL,0x10D458ECL,0x5D95F8E7L,0x10D458ECL};
+ int i;
+ l_746[5] ^= (((safe_mul_func_int16_t_s_s((((safe_mul_func_int8_t_s_s(((p_30.f0 , l_723) != l_723), (0x10ED398AEA39893FLL < ((safe_mul_func_uint8_t_u_u(((safe_mul_func_int8_t_s_s((g_428[0][0][2] , (((*l_692) & (0xD0L < (safe_mod_func_uint32_t_u_u((safe_div_func_uint64_t_u_u((l_745 ^= (((safe_lshift_func_uint8_t_u_u((((*l_734) &= 6UL) > p_28), 7)) , (*l_693)) > l_735)), 0x48414B2CEFF21B1FLL)), 4UL)))) , g_10[9].f4)), 1UL)) || 18446744073709551615UL), g_89)) & p_30.f0)))) == p_29) >= 0xEEE62B04L), (*l_684))) < 4UL) , p_30.f2);
+ return g_149;
+ }
+ return g_53[2];
+}
+
+
+/* ------------------------------------------ */
+/*
+ * reads :
+ * writes:
+ */
+static uint8_t func_33(union U2 * p_34, uint32_t p_35, union U0 p_36, uint8_t p_37, union U2 * p_38)
+{ /* block id: 319 */
+ int32_t *l_676 = (void*)0;
+ int32_t **l_677 = &l_676;
+ (*l_677) = l_676;
+ return p_37;
+}
+
+
+/* ------------------------------------------ */
+/*
+ * reads : g_231.f1
+ * writes:
+ */
+static uint32_t func_40(union U2 * p_41, union U2 ** p_42, union U2 * p_43)
+{ /* block id: 9 */
+ uint64_t l_55 = 0x80453D47EBDCF28DLL;
+ uint8_t *l_86 = &g_2;
+ int32_t l_113[10] = {0xF63A0E5FL,(-1L),0xBFF73A4BL,(-1L),0xF63A0E5FL,0xF63A0E5FL,(-1L),0xBFF73A4BL,(-1L),0xF63A0E5FL};
+ uint32_t l_152[1];
+ int64_t *l_176[6][9][4];
+ uint32_t l_196 = 0x2BEC0524L;
+ int32_t *l_204 = &l_113[4];
+ union U2 l_217 = {7L};
+ union U0 *l_228[10] = {&g_226,(void*)0,&g_226,(void*)0,&g_226,(void*)0,&g_226,(void*)0,&g_226,(void*)0};
+ union U0 *l_230 = &g_231[2][3][1];
+ const union U0 *l_254[10][2][7] = {{{&g_231[2][3][1],&g_231[2][3][1],&g_231[2][3][1],&g_231[2][3][1],&g_231[2][3][1],&g_231[2][3][1],&g_231[2][3][1]},{&g_255,&g_255,&g_255,&g_255,&g_255,&g_255,&g_255}},{{&g_231[2][3][1],&g_231[2][3][1],&g_231[2][3][1],&g_231[2][3][1],&g_231[2][3][1],&g_231[2][3][1],&g_231[2][3][1]},{&g_255,&g_255,&g_255,&g_255,&g_255,&g_255,&g_255}},{{&g_231[2][3][1],&g_231[2][3][1],&g_231[2][3][1],&g_231[2][3][1],&g_231[2][3][1],&g_231[2][3][1],&g_231[2][3][1]},{&g_255,&g_255,&g_255,&g_255,&g_255,&g_255,&g_255}},{{&g_231[2][3][1],&g_231[2][3][1],&g_231[2][3][1],&g_231[2][3][1],&g_231[2][3][1],&g_231[2][3][1],&g_231[2][3][1]},{&g_255,&g_255,&g_255,&g_255,&g_255,&g_255,&g_255}},{{&g_231[2][3][1],&g_231[2][3][1],&g_231[2][3][1],&g_231[2][3][1],&g_231[2][3][1],&g_231[2][3][1],&g_231[2][3][1]},{&g_255,&g_255,&g_255,&g_255,&g_255,&g_255,&g_255}},{{&g_231[2][3][1],&g_231[2][3][1],&g_231[2][3][1],&g_231[2][3][1],&g_231[2][3][1],&g_231[2][3][1],&g_231[2][3][1]},{&g_255,&g_255,&g_255,&g_255,&g_255,&g_255,&g_255}},{{&g_231[2][3][1],&g_231[2][3][1],&g_231[2][3][1],&g_231[2][3][1],&g_231[2][3][1],&g_231[2][3][1],&g_231[2][3][1]},{&g_255,&g_255,&g_255,&g_255,&g_255,&g_255,&g_255}},{{&g_231[2][3][1],&g_231[2][3][1],&g_231[2][3][1],&g_231[2][3][1],&g_231[2][3][1],&g_231[2][3][1],&g_231[2][3][1]},{&g_255,&g_255,&g_255,&g_255,&g_255,&g_255,&g_255}},{{&g_231[2][3][1],&g_231[2][3][1],&g_231[2][3][1],&g_231[2][3][1],&g_231[2][3][1],&g_231[2][3][1],&g_231[2][3][1]},{&g_255,&g_255,&g_255,&g_255,&g_255,&g_255,&g_255}},{{&g_231[2][3][1],&g_231[2][3][1],&g_231[2][3][1],&g_231[2][3][1],&g_231[2][3][1],&g_231[2][3][1],&g_231[2][3][1]},{&g_255,&g_255,&g_255,&g_255,&g_255,&g_255,&g_255}}};
+ uint8_t l_273 = 0x57L;
+ int64_t l_401 = 0xD80C2B337075255ALL;
+ int32_t l_412 = 0xFC3C03E8L;
+ const uint16_t *l_449 = (void*)0;
+ int32_t * const *l_468[3];
+ int32_t * const **l_467 = &l_468[1];
+ uint16_t l_530 = 0x994DL;
+ uint64_t l_546 = 0UL;
+ int32_t ***l_550 = (void*)0;
+ union U1 l_561 = {0x4A4BD98AL};
+ uint64_t l_565 = 1UL;
+ int64_t l_630 = 0x4F210B20CA5980E1LL;
+ uint8_t l_639 = 251UL;
+ int16_t *l_640 = (void*)0;
+ int16_t *l_641 = (void*)0;
+ int16_t *l_642 = &g_507;
+ uint32_t l_643 = 0x1483458EL;
+ uint64_t l_644 = 0x4B3D7633749DC52FLL;
+ uint8_t l_645[10][1] = {{1UL},{0x76L},{1UL},{0x76L},{1UL},{0x76L},{1UL},{0x76L},{1UL},{0x76L}};
+ uint64_t l_646[3][1];
+ int32_t l_647 = 0x551C0AE0L;
+ uint32_t l_666 = 0UL;
+ uint8_t l_667[3];
+ uint32_t *l_668 = (void*)0;
+ uint32_t *l_669 = &l_152[0];
+ uint32_t l_670 = 9UL;
+ int16_t *l_671 = &g_75;
+ int32_t l_672 = 0x0446CA0FL;
+ int8_t l_673[3][6];
+ int32_t l_674[9] = {(-1L),(-4L),(-1L),(-4L),(-1L),(-4L),(-1L),(-4L),(-1L)};
+ int i, j, k;
+ for (i = 0; i < 1; i++)
+ l_152[i] = 0x975F8E47L;
+ for (i = 0; i < 6; i++)
+ {
+ for (j = 0; j < 9; j++)
+ {
+ for (k = 0; k < 4; k++)
+ l_176[i][j][k] = &g_149;
+ }
+ }
+ for (i = 0; i < 3; i++)
+ l_468[i] = &l_204;
+ for (i = 0; i < 3; i++)
+ {
+ for (j = 0; j < 1; j++)
+ l_646[i][j] = 5UL;
+ }
+ for (i = 0; i < 3; i++)
+ l_667[i] = 255UL;
+ for (i = 0; i < 3; i++)
+ {
+ for (j = 0; j < 6; j++)
+ l_673[i][j] = 0x09L;
+ }
+ return g_231[2][3][1].f1;
+}
+
+
+/* ------------------------------------------ */
+/*
+ * reads :
+ * writes:
+ */
+static int16_t func_66(uint8_t * const p_67, int64_t p_68, union U2 *** const p_69)
+{ /* block id: 26 */
+ return p_68;
+}
+
+
+/* ------------------------------------------ */
+/*
+ * reads : g_93
+ * writes: g_93
+ */
+static uint8_t * func_70(int64_t p_71, int32_t p_72, uint8_t * p_73)
+{ /* block id: 23 */
+ int32_t *l_87 = (void*)0;
+ int32_t *l_88 = &g_89;
+ int32_t *l_90 = &g_89;
+ int32_t *l_91[7];
+ uint8_t *l_96 = &g_53[4];
+ int i;
+ for (i = 0; i < 7; i++)
+ l_91[i] = &g_89;
+ ++g_93;
+ return l_96;
+}
+
+
+
+
+/* ---------------------------------------- */
+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 < 10; i++)
+ {
+ transparent_crc(g_10[i].f0, "g_10[i].f0", print_hash_value);
+ transparent_crc(g_10[i].f1, "g_10[i].f1", print_hash_value);
+ transparent_crc(g_10[i].f2, "g_10[i].f2", print_hash_value);
+ transparent_crc(g_10[i].f4, "g_10[i].f4", print_hash_value);
+ if (print_hash_value) printf("index = [%d]\n", i);
+
+ }
+ transparent_crc(g_49, "g_49", print_hash_value);
+ for (i = 0; i < 6; i++)
+ {
+ transparent_crc(g_53[i], "g_53[i]", print_hash_value);
+ if (print_hash_value) printf("index = [%d]\n", i);
+
+ }
+ transparent_crc(g_75, "g_75", print_hash_value);
+ transparent_crc(g_89, "g_89", print_hash_value);
+ transparent_crc(g_92, "g_92", print_hash_value);
+ transparent_crc(g_93, "g_93", print_hash_value);
+ transparent_crc(g_101, "g_101", print_hash_value);
+ for (i = 0; i < 9; i++)
+ {
+ for (j = 0; j < 9; j++)
+ {
+ transparent_crc(g_111[i][j], "g_111[i][j]", print_hash_value);
+ if (print_hash_value) printf("index = [%d][%d]\n", i, j);
+
+ }
+ }
+ transparent_crc(g_147, "g_147", print_hash_value);
+ transparent_crc(g_149, "g_149", print_hash_value);
+ transparent_crc(g_223.f0, "g_223.f0", print_hash_value);
+ transparent_crc(g_223.f1, "g_223.f1", print_hash_value);
+ transparent_crc(g_223.f2, "g_223.f2", print_hash_value);
+ transparent_crc(g_223.f4, "g_223.f4", print_hash_value);
+ transparent_crc(g_226.f0, "g_226.f0", print_hash_value);
+ transparent_crc(g_226.f1, "g_226.f1", print_hash_value);
+ for (i = 0; i < 3; i++)
+ {
+ for (j = 0; j < 1; j++)
+ {
+ for (k = 0; k < 5; k++)
+ {
+ transparent_crc(g_229[i][j][k].f0, "g_229[i][j][k].f0", print_hash_value);
+ transparent_crc(g_229[i][j][k].f1, "g_229[i][j][k].f1", print_hash_value);
+ if (print_hash_value) printf("index = [%d][%d][%d]\n", i, j, k);
+
+ }
+ }
+ }
+ for (i = 0; i < 6; i++)
+ {
+ for (j = 0; j < 9; j++)
+ {
+ for (k = 0; k < 4; k++)
+ {
+ transparent_crc(g_231[i][j][k].f1, "g_231[i][j][k].f1", print_hash_value);
+ if (print_hash_value) printf("index = [%d][%d][%d]\n", i, j, k);
+
+ }
+ }
+ }
+ transparent_crc(g_245, "g_245", print_hash_value);
+ transparent_crc(g_255.f0, "g_255.f0", print_hash_value);
+ transparent_crc(g_255.f1, "g_255.f1", print_hash_value);
+ transparent_crc(g_319, "g_319", print_hash_value);
+ transparent_crc(g_375, "g_375", print_hash_value);
+ for (i = 0; i < 8; i++)
+ {
+ for (j = 0; j < 1; j++)
+ {
+ for (k = 0; k < 4; k++)
+ {
+ transparent_crc(g_428[i][j][k].f0, "g_428[i][j][k].f0", print_hash_value);
+ transparent_crc(g_428[i][j][k].f1, "g_428[i][j][k].f1", print_hash_value);
+ if (print_hash_value) printf("index = [%d][%d][%d]\n", i, j, k);
+
+ }
+ }
+ }
+ transparent_crc(g_444, "g_444", print_hash_value);
+ transparent_crc(g_479, "g_479", print_hash_value);
+ transparent_crc(g_507, "g_507", print_hash_value);
+ transparent_crc(g_627, "g_627", print_hash_value);
+ transparent_crc(g_706, "g_706", print_hash_value);
+ transparent_crc(g_814.f0, "g_814.f0", print_hash_value);
+ transparent_crc(g_814.f1, "g_814.f1", print_hash_value);
+ transparent_crc(g_814.f2, "g_814.f2", print_hash_value);
+ transparent_crc(g_814.f4, "g_814.f4", print_hash_value);
+ transparent_crc(g_1007, "g_1007", print_hash_value);
+ transparent_crc(g_1178, "g_1178", print_hash_value);
+ for (i = 0; i < 10; i++)
+ {
+ for (j = 0; j < 6; j++)
+ {
+ transparent_crc(g_1198[i][j], "g_1198[i][j]", print_hash_value);
+ if (print_hash_value) printf("index = [%d][%d]\n", i, j);
+
+ }
+ }
+ transparent_crc(g_1232, "g_1232", print_hash_value);
+ for (i = 0; i < 3; i++)
+ {
+ for (j = 0; j < 1; j++)
+ {
+ for (k = 0; k < 5; k++)
+ {
+ transparent_crc(g_1399[i][j][k], "g_1399[i][j][k]", print_hash_value);
+ if (print_hash_value) printf("index = [%d][%d][%d]\n", i, j, k);
+
+ }
+ }
+ }
+ for (i = 0; i < 2; i++)
+ {
+ transparent_crc(g_1574[i].f0, "g_1574[i].f0", print_hash_value);
+ transparent_crc(g_1574[i].f1, "g_1574[i].f1", print_hash_value);
+ if (print_hash_value) printf("index = [%d]\n", i);
+
+ }
+ transparent_crc(g_1582, "g_1582", print_hash_value);
+ transparent_crc(g_1693, "g_1693", print_hash_value);
+ transparent_crc(g_1695, "g_1695", print_hash_value);
+ transparent_crc(g_1743, "g_1743", print_hash_value);
+ transparent_crc(g_1771, "g_1771", print_hash_value);
+ for (i = 0; i < 2; i++)
+ {
+ for (j = 0; j < 4; j++)
+ {
+ for (k = 0; k < 3; k++)
+ {
+ transparent_crc(g_1864[i][j][k], "g_1864[i][j][k]", print_hash_value);
+ if (print_hash_value) printf("index = [%d][%d][%d]\n", i, j, k);
+
+ }
+ }
+ }
+ transparent_crc(g_2120, "g_2120", print_hash_value);
+ platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value);
+ return 0;
+}
+
+/************************ statistics *************************
+XXX max struct depth: 0
+breakdown:
+ depth: 0, occurrence: 713
+XXX total union variables: 42
+
+XXX non-zero bitfields defined in structs: 1
+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: 32
+breakdown:
+ indirect level: 0, occurrence: 20
+ indirect level: 1, occurrence: 6
+ indirect level: 2, occurrence: 3
+ indirect level: 3, occurrence: 3
+XXX full-bitfields structs in the program: 0
+breakdown:
+XXX times a bitfields struct's address is taken: 14
+XXX times a bitfields struct on LHS: 0
+XXX times a bitfields struct on RHS: 30
+XXX times a single bitfield on LHS: 14
+XXX times a single bitfield on RHS: 16
+
+XXX max expression depth: 42
+breakdown:
+ depth: 1, occurrence: 160
+ depth: 2, occurrence: 29
+ depth: 3, occurrence: 2
+ depth: 4, occurrence: 3
+ depth: 5, occurrence: 1
+ depth: 6, occurrence: 2
+ depth: 7, occurrence: 1
+ depth: 9, occurrence: 1
+ depth: 10, occurrence: 2
+ depth: 12, occurrence: 1
+ depth: 14, occurrence: 1
+ depth: 15, occurrence: 1
+ depth: 16, occurrence: 1
+ depth: 17, occurrence: 3
+ depth: 18, occurrence: 2
+ depth: 19, occurrence: 1
+ depth: 20, occurrence: 2
+ depth: 22, occurrence: 1
+ depth: 23, occurrence: 2
+ depth: 24, occurrence: 2
+ depth: 25, occurrence: 1
+ depth: 26, occurrence: 2
+ depth: 27, occurrence: 3
+ depth: 28, occurrence: 1
+ depth: 29, occurrence: 2
+ depth: 30, occurrence: 1
+ depth: 34, occurrence: 1
+ depth: 35, occurrence: 1
+ depth: 36, occurrence: 1
+ depth: 38, occurrence: 1
+ depth: 42, occurrence: 1
+
+XXX total number of pointers: 537
+
+XXX times a variable address is taken: 1354
+XXX times a pointer is dereferenced on RHS: 255
+breakdown:
+ depth: 1, occurrence: 229
+ depth: 2, occurrence: 25
+ depth: 3, occurrence: 1
+XXX times a pointer is dereferenced on LHS: 245
+breakdown:
+ depth: 1, occurrence: 228
+ depth: 2, occurrence: 17
+XXX times a pointer is compared with null: 50
+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: 13484
+
+XXX max dereference level: 5
+breakdown:
+ level: 0, occurrence: 0
+ level: 1, occurrence: 1642
+ level: 2, occurrence: 237
+ level: 3, occurrence: 148
+ level: 4, occurrence: 45
+ level: 5, occurrence: 1
+XXX number of pointers point to pointers: 186
+XXX number of pointers point to scalars: 314
+XXX number of pointers point to structs: 0
+XXX percent of pointers has null in alias set: 31.3
+XXX average alias set size: 1.5
+
+XXX times a non-volatile is read: 1761
+XXX times a non-volatile is write: 847
+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: 10
+
+XXX stmts: 154
+XXX max block depth: 5
+breakdown:
+ depth: 0, occurrence: 24
+ depth: 1, occurrence: 26
+ depth: 2, occurrence: 22
+ depth: 3, occurrence: 27
+ depth: 4, occurrence: 21
+ depth: 5, occurrence: 34
+
+XXX percentage a fresh-made variable is used: 14.7
+XXX percentage an existing variable is used: 85.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/15.c.txt b/tests/fuzz/15.c.txt
new file mode 100644
index 00000000..42eb1e0f
--- /dev/null
+++ b/tests/fuzz/15.c.txt
@@ -0,0 +1 @@
+checksum = B1ED5468
diff --git a/tests/fuzz/19.c b/tests/fuzz/19.c
new file mode 100644
index 00000000..d94318c5
--- /dev/null
+++ b/tests/fuzz/19.c
@@ -0,0 +1,1408 @@
+/*
+ * This is a RANDOMLY GENERATED PROGRAM.
+ *
+ * Generator: csmith 2.2.0
+ * Git version: bf42ffd
+ * Options: --no-volatiles --no-packed-struct --no-math64
+ * Seed: 2524651702
+ */
+
+#include "csmith.h"
+
+
+static long __undefined;
+
+/* --- Struct/Union Declarations --- */
+/* --- GLOBAL VARIABLES --- */
+static uint32_t g_2[5][1] = {{0xF1124F01L},{0x1F2C29A3L},{0xF1124F01L},{0x1F2C29A3L},{0xF1124F01L}};
+static int32_t g_3 = 0x3FA75C19L;
+static uint32_t g_14[6] = {0xD1A4E665L,0xD1A4E665L,0xD1A4E665L,0xD1A4E665L,0xD1A4E665L,0xD1A4E665L};
+static uint32_t g_15 = 18446744073709551615UL;
+static int32_t g_34 = 1L;
+static int8_t g_36 = 0x6DL;
+static uint8_t g_40[7] = {0xEAL,0xEAL,0xEAL,0xEAL,0xEAL,0xEAL,0xEAL};
+static uint8_t g_44 = 0UL;
+static uint8_t *g_43 = &g_44;
+static int32_t g_46 = 0x461302D9L;
+static int32_t g_51[2][8][3] = {{{0x0D357E8FL,0x604C38DBL,0x0D357E8FL},{0x0D357E8FL,0x349DDA4AL,0x1ADF561FL},{0x0D357E8FL,0x2D584125L,(-4L)},{0x0D357E8FL,0x604C38DBL,0x0D357E8FL},{0x0D357E8FL,0x349DDA4AL,0x1ADF561FL},{0x0D357E8FL,0x2D584125L,(-4L)},{0x0D357E8FL,0x604C38DBL,0x0D357E8FL},{0x0D357E8FL,0x349DDA4AL,0x1ADF561FL}},{{0x0D357E8FL,0x2D584125L,(-4L)},{0x0D357E8FL,0x1ADF561FL,(-10L)},{(-10L),0x0D357E8FL,0xCF8610F1L},{(-10L),(-4L),(-9L)},{(-10L),0x1ADF561FL,(-10L)},{(-10L),0x0D357E8FL,0xCF8610F1L},{(-10L),(-4L),(-9L)},{(-10L),0x1ADF561FL,(-10L)}}};
+static uint32_t g_52 = 0x171C63CCL;
+static uint32_t g_56 = 0xFBFBE831L;
+static uint32_t *g_55 = &g_56;
+static const int8_t * const g_132 = &g_36;
+static const int8_t * const *g_131 = &g_132;
+static int32_t g_140 = 0L;
+static int32_t *g_143 = &g_140;
+static uint8_t **g_175 = &g_43;
+static uint8_t **g_176 = &g_43;
+static uint8_t **g_177 = (void*)0;
+static int8_t *g_243[6][2][9] = {{{&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}},{{&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}},{{&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}},{{&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}},{{&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}},{{&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}}};
+static int8_t **g_242 = &g_243[5][1][5];
+static int8_t **g_245 = &g_243[5][1][5];
+static uint16_t g_251 = 0x6187L;
+static int8_t g_255 = 0xFEL;
+static int16_t g_290 = 0xF4DEL;
+static int16_t *g_289 = &g_290;
+static uint32_t g_294[5] = {0xFDB146E2L,0xFDB146E2L,0xFDB146E2L,0xFDB146E2L,0xFDB146E2L};
+static int32_t g_297[2] = {1L,1L};
+static int32_t *g_312[2][1][6] = {{{(void*)0,(void*)0,&g_51[0][3][1],(void*)0,(void*)0,&g_51[0][3][1]}},{{(void*)0,(void*)0,&g_51[0][3][1],(void*)0,(void*)0,&g_51[0][3][1]}}};
+static uint8_t g_320 = 0xD4L;
+static int16_t g_347 = 0x586CL;
+static int16_t g_419 = 0xDAAFL;
+static uint32_t g_477 = 0x661A1A9FL;
+static uint32_t g_705[6] = {1UL,1UL,1UL,1UL,1UL,1UL};
+static uint32_t ** const g_736 = &g_55;
+static uint32_t ** const *g_735 = &g_736;
+static uint8_t ****g_897 = (void*)0;
+static uint8_t ***g_905 = &g_175;
+static uint8_t ****g_904[3][6] = {{&g_905,&g_905,&g_905,&g_905,&g_905,&g_905},{&g_905,&g_905,&g_905,&g_905,&g_905,&g_905},{&g_905,&g_905,&g_905,&g_905,&g_905,&g_905}};
+static int32_t **g_961 = &g_312[1][0][4];
+static int32_t ***g_960 = &g_961;
+static uint16_t g_969 = 5UL;
+static int8_t ***g_1019[7][1][1] = {{{&g_242}},{{&g_242}},{{&g_242}},{{&g_242}},{{&g_242}},{{&g_242}},{{&g_242}}};
+static int8_t ****g_1018 = &g_1019[3][0][0];
+static int32_t g_1055 = (-8L);
+static uint32_t g_1099 = 0xAD3B6902L;
+static int32_t g_1132 = (-9L);
+static int16_t * const *g_1185 = &g_289;
+static int16_t * const * const *g_1184 = &g_1185;
+static int16_t g_1189 = 0L;
+static uint32_t **g_1238 = &g_55;
+static uint32_t ***g_1237[8][4][4] = {{{&g_1238,(void*)0,&g_1238,(void*)0},{&g_1238,(void*)0,&g_1238,&g_1238},{(void*)0,&g_1238,&g_1238,(void*)0},{(void*)0,&g_1238,(void*)0,&g_1238}},{{&g_1238,(void*)0,(void*)0,&g_1238},{&g_1238,&g_1238,&g_1238,(void*)0},{&g_1238,&g_1238,&g_1238,(void*)0},{&g_1238,(void*)0,&g_1238,&g_1238}},{{&g_1238,&g_1238,&g_1238,(void*)0},{&g_1238,&g_1238,&g_1238,&g_1238},{&g_1238,(void*)0,(void*)0,&g_1238},{(void*)0,&g_1238,(void*)0,(void*)0}},{{&g_1238,(void*)0,&g_1238,(void*)0},{&g_1238,&g_1238,(void*)0,(void*)0},{(void*)0,(void*)0,&g_1238,&g_1238},{&g_1238,&g_1238,&g_1238,&g_1238}},{{&g_1238,&g_1238,&g_1238,&g_1238},{&g_1238,&g_1238,&g_1238,&g_1238},{&g_1238,&g_1238,&g_1238,&g_1238},{&g_1238,(void*)0,(void*)0,(void*)0}},{{&g_1238,&g_1238,&g_1238,(void*)0},{&g_1238,(void*)0,&g_1238,(void*)0},{(void*)0,&g_1238,(void*)0,&g_1238},{&g_1238,(void*)0,(void*)0,&g_1238}},{{&g_1238,&g_1238,&g_1238,(void*)0},{&g_1238,&g_1238,&g_1238,&g_1238},{&g_1238,(void*)0,&g_1238,(void*)0},{&g_1238,&g_1238,&g_1238,(void*)0}},{{&g_1238,&g_1238,&g_1238,&g_1238},{(void*)0,(void*)0,&g_1238,&g_1238},{(void*)0,&g_1238,&g_1238,(void*)0},{&g_1238,&g_1238,&g_1238,&g_1238}}};
+static uint32_t ***g_1241 = (void*)0;
+static uint32_t g_1254[8][1][8] = {{{0x441F7909L,0x441F7909L,0UL,0x5B976413L,18446744073709551610UL,0UL,18446744073709551610UL,0x5B976413L}},{{0x0ECD52E7L,0x5B976413L,0x0ECD52E7L,0xD72EFABCL,0x5B976413L,0x6701CBD7L,0x6701CBD7L,0x5B976413L}},{{0x5B976413L,0x6701CBD7L,0x6701CBD7L,0x5B976413L,0xD72EFABCL,0x0ECD52E7L,0x5B976413L,0x0ECD52E7L}},{{0x5B976413L,18446744073709551610UL,0UL,18446744073709551610UL,0x5B976413L,0UL,0x441F7909L,0x441F7909L}},{{0x0ECD52E7L,18446744073709551610UL,0xD72EFABCL,0xD72EFABCL,18446744073709551610UL,0x0ECD52E7L,0x6701CBD7L,18446744073709551610UL}},{{0x441F7909L,0x6701CBD7L,0xD72EFABCL,0x441F7909L,0xD72EFABCL,0x6701CBD7L,0x441F7909L,0x0ECD52E7L}},{{18446744073709551610UL,0x5B976413L,0UL,0x441F7909L,0x441F7909L,0UL,0x5B976413L,18446744073709551610UL}},{{0x0ECD52E7L,0x441F7909L,0x6701CBD7L,0xD72EFABCL,0x441F7909L,0xD72EFABCL,0x6701CBD7L,0x441F7909L}}};
+static int16_t g_1285 = 0L;
+static uint8_t * const **g_1295 = (void*)0;
+static uint8_t g_1298 = 0xB8L;
+static int16_t g_1333 = 0x34D4L;
+static uint32_t g_1334 = 0x1191E655L;
+static int32_t g_1509 = 1L;
+static uint8_t ***g_1548 = &g_176;
+static uint8_t ***g_1549 = (void*)0;
+static uint8_t ***g_1550 = (void*)0;
+static uint8_t ***g_1551[3][5] = {{&g_176,&g_176,&g_176,&g_176,&g_176},{&g_176,&g_176,&g_176,&g_176,&g_176},{&g_176,&g_176,&g_176,&g_176,&g_176}};
+static uint8_t ***g_1552[10][9] = {{&g_175,&g_177,&g_175,(void*)0,&g_175,&g_175,(void*)0,&g_175,&g_177},{(void*)0,&g_175,&g_175,(void*)0,&g_175,&g_177,&g_176,&g_175,&g_175},{&g_175,&g_175,&g_177,(void*)0,&g_177,&g_175,&g_175,&g_177,&g_175},{&g_176,&g_175,&g_176,(void*)0,&g_177,&g_176,&g_176,&g_176,&g_177},{&g_176,&g_177,&g_177,&g_176,&g_175,&g_176,(void*)0,&g_177,&g_176},{&g_175,&g_177,&g_175,(void*)0,&g_175,&g_175,(void*)0,&g_175,&g_177},{(void*)0,&g_175,&g_175,(void*)0,&g_175,&g_177,&g_176,&g_175,&g_175},{&g_175,&g_175,&g_177,(void*)0,&g_177,&g_175,&g_175,&g_177,&g_175},{&g_176,&g_175,&g_176,(void*)0,&g_177,&g_176,&g_176,&g_176,&g_177},{&g_176,&g_177,&g_177,&g_176,&g_175,&g_176,(void*)0,&g_177,&g_176}};
+static uint8_t **** const g_1547[1][6][2] = {{{&g_1551[1][3],&g_1552[7][4]},{&g_1551[1][3],&g_1551[1][3]},{&g_1552[7][4],&g_1551[1][3]},{&g_1551[1][3],&g_1552[7][4]},{&g_1551[1][3],&g_1551[1][3]},{&g_1552[7][4],&g_1551[1][3]}}};
+static uint8_t **** const *g_1546[5] = {&g_1547[0][2][0],&g_1547[0][2][0],&g_1547[0][2][0],&g_1547[0][2][0],&g_1547[0][2][0]};
+static int8_t ***g_1656 = &g_245;
+static uint16_t g_1766 = 0x2A71L;
+static const uint32_t g_1776 = 4294967288UL;
+static const uint32_t g_1782[6][8][5] = {{{9UL,1UL,0xC7DDDB76L,0x6C0C4151L,0x8031E06CL},{4294967288UL,0x67522ABBL,4294967289UL,9UL,0x6B1862C6L},{4294967289UL,0x035D4646L,0x4BD87A52L,0xF04D3E88L,0x02BA768FL},{0x67522ABBL,1UL,0xFBE5C2AFL,0x09838561L,0x6E51EAD8L},{0x67522ABBL,0x8031E06CL,0xFC56E314L,0x5133D18EL,0xF04D3E88L},{4294967289UL,0xFBE5C2AFL,4294967286UL,4294967295UL,4294967295UL},{4294967288UL,4294967289UL,4294967288UL,0xFC56E314L,0x4BD87A52L},{9UL,0x09838561L,4294967295UL,1UL,3UL}},{{0xD3C5907BL,0x6C0C4151L,4294967289UL,0x8031E06CL,0x035D4646L},{0x6B1862C6L,0x6E51EAD8L,4294967295UL,3UL,0x02BA768FL},{4294967294UL,0xD3C5907BL,4294967288UL,0x67522ABBL,4294967289UL},{0x6C0C4151L,0x8031E06CL,4294967286UL,4294967295UL,0xB9EFEB98L},{8UL,4294967291UL,0xFC56E314L,4294967295UL,0x2B8C1A21L},{4294967291UL,0x6B1862C6L,0xFBE5C2AFL,1UL,0x2B8C1A21L},{9UL,0x1C34F8ADL,0x4BD87A52L,4294967288UL,0xB9EFEB98L},{1UL,4294967288UL,4294967289UL,0xB9EFEB98L,4294967289UL}},{{0xE9241C7AL,0xE9241C7AL,0x6E51EAD8L,1UL,0x09838561L},{4294967288UL,3UL,0x8031E06CL,4294967291UL,0x37358859L},{1UL,4294967295UL,0xD83C2DFAL,1UL,4294967286UL},{0x4478B581L,3UL,0x2B8C1A21L,8UL,0x5A8F52F4L},{0xB9EFEB98L,0xE9241C7AL,0xF04D3E88L,0xC7DDDB76L,8UL},{1UL,1UL,0UL,7UL,0x5133D18EL},{0xF04D3E88L,4294967291UL,0x084A6D3FL,4294967286UL,0x02BA768FL},{0x02BA768FL,0xB3D218BBL,4294967289UL,4294967286UL,0x09838561L}},{{0x2BAF5CEFL,9UL,0xFDF9E1B7L,7UL,0xB3D218BBL},{4294967291UL,4294967295UL,0xC7DDDB76L,0xC7DDDB76L,4294967295UL},{0x37358859L,0x9D243B0BL,4294967295UL,8UL,4294967289UL},{0xFDF9E1B7L,0x02BA768FL,0x9D243B0BL,1UL,0x6B1862C6L},{1UL,0xFBE5C2AFL,0x6B1862C6L,4294967291UL,4294967286UL},{0xFDF9E1B7L,0x2BAF5CEFL,0x084A6D3FL,1UL,0x731D77D9L},{0x37358859L,0x084A6D3FL,0x035D4646L,0xFC56E314L,0x09838561L},{4294967291UL,0xB9EFEB98L,9UL,1UL,0x4478B581L}},{{0x2BAF5CEFL,4294967295UL,4294967291UL,4294967295UL,1UL},{0x02BA768FL,0x8031E06CL,4294967291UL,8UL,0UL},{0xF04D3E88L,0x37358859L,9UL,0x2B8C1A21L,0x6E51EAD8L},{1UL,0xD3C5907BL,0x035D4646L,0xD3C5907BL,1UL},{0xB9EFEB98L,4294967288UL,0x084A6D3FL,4294967286UL,0xE9241C7AL},{0x4478B581L,0x731D77D9L,0x6B1862C6L,4294967295UL,0x09838561L},{1UL,0xFDF9E1B7L,0x9D243B0BL,4294967288UL,0xE9241C7AL},{4294967288UL,4294967295UL,4294967295UL,0x4BD87A52L,1UL}},{{0xE9241C7AL,0xF04D3E88L,0xC7DDDB76L,8UL,0x6E51EAD8L},{0x8031E06CL,0x4478B581L,0xFDF9E1B7L,4294967291UL,0UL},{1UL,7UL,4294967289UL,0x2BAF5CEFL,1UL},{9UL,7UL,0x084A6D3FL,0x5133D18EL,0x4478B581L},{0x731D77D9L,0x4478B581L,0UL,1UL,0x09838561L},{0xFBE5C2AFL,0xF04D3E88L,0xF04D3E88L,0xFBE5C2AFL,0x731D77D9L},{7UL,4294967295UL,0x2B8C1A21L,0xD83C2DFAL,4294967286UL},{0xB3D218BBL,0xFDF9E1B7L,0xD83C2DFAL,8UL,0x6B1862C6L}}};
+static const uint32_t *g_1781 = &g_1782[2][3][4];
+static int8_t g_1857 = 0L;
+static const uint8_t *g_1941 = (void*)0;
+static const uint8_t ** const g_1940[7] = {&g_1941,&g_1941,&g_1941,&g_1941,&g_1941,&g_1941,&g_1941};
+static const uint8_t ** const *g_1939 = &g_1940[2];
+static const uint8_t ** const **g_1938 = &g_1939;
+static const uint8_t ** const ***g_1937 = &g_1938;
+static int16_t g_1961 = (-2L);
+static const int8_t g_2067 = (-1L);
+static const uint32_t ***g_2068[3] = {(void*)0,(void*)0,(void*)0};
+static int8_t g_2147[10] = {0x23L,0x23L,0x23L,0x23L,0x23L,0x23L,0x23L,0x23L,0x23L,0x23L};
+static uint16_t g_2148 = 0x794EL;
+static int16_t g_2207 = 0L;
+
+
+/* --- FORWARD DECLARATIONS --- */
+static uint16_t func_1(void);
+static int8_t func_10(uint32_t p_11);
+static int32_t func_16(int8_t p_17, uint32_t * p_18, uint32_t * p_19, uint16_t p_20, uint32_t p_21);
+static uint32_t * func_22(int16_t p_23, uint32_t p_24, uint32_t * p_25);
+static int32_t func_62(int32_t * p_63, uint8_t p_64);
+static int32_t * func_65(int8_t p_66, uint16_t p_67, uint8_t p_68, int32_t * p_69, uint32_t * p_70);
+static uint8_t * func_71(uint32_t p_72, int8_t p_73);
+static int32_t * func_94(uint32_t * p_95, int32_t p_96, const int32_t p_97, int32_t p_98, int8_t p_99);
+static int8_t func_100(int32_t * p_101, uint8_t p_102, uint8_t p_103, uint32_t p_104);
+static int32_t * func_105(uint32_t p_106);
+
+
+/* --- FUNCTIONS --- */
+/* ------------------------------------------ */
+/*
+ * reads : g_2 g_14 g_15 g_36 g_40 g_43 g_3 g_52 g_46 g_51 g_55 g_56 g_44 g_251 g_143 g_140 g_176 g_705 g_289 g_290 g_297 g_255 g_34 g_131 g_132 g_243 g_347 g_320 g_736 g_294 g_175 g_897 g_905 g_735 g_960 g_969 g_961 g_312 g_1334 g_1132 g_1184 g_1185 g_1099 g_1656 g_1238 g_1548 g_1018 g_1019 g_1254 g_1766 g_1776 g_1857 g_477 g_1298 g_1937 g_1961 g_242 g_1781 g_1782 g_419 g_2068 g_245 g_1938 g_2147 g_2148 g_1333 g_2207
+ * writes: g_3 g_14 g_15 g_34 g_36 g_40 g_52 g_51 g_46 g_255 g_297 g_140 g_312 g_294 g_56 g_44 g_347 g_290 g_897 g_904 g_419 g_251 g_969 g_1334 g_1132 g_1298 g_175 g_1099 g_1055 g_477 g_55 g_1766 g_1781 g_960 g_242 g_961 g_705 g_2068 g_2148 g_2207
+ */
+static uint16_t func_1(void)
+{ /* block id: 0 */
+ int32_t l_38 = 0xCA862934L;
+ int32_t l_1612 = 0xB952CD69L;
+ int32_t l_1634 = 0x1D6D5307L;
+ int16_t l_1658[5][6] = {{0x1999L,0L,0x1999L,0x1999L,0L,0x1999L},{0x1999L,0L,0x1999L,0x1999L,0L,0x0361L},{0x0361L,0x1999L,0x0361L,0x0361L,0x1999L,0x0361L},{0x0361L,0x1999L,0x0361L,0x0361L,0x1999L,0x0361L},{0x0361L,0x1999L,0x0361L,0x0361L,0x1999L,0x0361L}};
+ uint8_t * const ***l_1712 = &g_1295;
+ uint8_t * const ****l_1711[9] = {&l_1712,&l_1712,&l_1712,&l_1712,&l_1712,&l_1712,&l_1712,&l_1712,&l_1712};
+ uint8_t **l_1725 = &g_43;
+ int16_t l_1756[10][2] = {{0xB2C0L,(-1L)},{(-1L),0xB2C0L},{(-1L),(-1L)},{0xB2C0L,(-1L)},{(-1L),0xB2C0L},{(-1L),(-1L)},{0xB2C0L,(-1L)},{(-1L),0xB2C0L},{(-1L),(-1L)},{0xB2C0L,(-1L)}};
+ int32_t l_1763 = (-8L);
+ uint32_t *l_1783 = &g_14[1];
+ int32_t ***l_1785 = &g_961;
+ uint32_t *****l_1788 = (void*)0;
+ uint8_t l_1831 = 0x9CL;
+ uint8_t *l_1877 = &g_40[0];
+ uint32_t l_2046 = 18446744073709551609UL;
+ int8_t l_2047 = 1L;
+ uint32_t l_2048 = 2UL;
+ int32_t l_2056 = 1L;
+ int32_t l_2058 = 0L;
+ int32_t l_2072 = 9L;
+ uint32_t l_2099 = 4UL;
+ uint32_t l_2116 = 4UL;
+ uint32_t l_2184 = 0xE4A882E7L;
+ int16_t **l_2189[6][6][7] = {{{&g_289,&g_289,&g_289,&g_289,&g_289,&g_289,&g_289},{(void*)0,&g_289,&g_289,(void*)0,(void*)0,&g_289,&g_289},{&g_289,&g_289,&g_289,&g_289,&g_289,&g_289,&g_289},{(void*)0,&g_289,&g_289,&g_289,(void*)0,&g_289,(void*)0},{&g_289,(void*)0,&g_289,&g_289,&g_289,&g_289,&g_289},{&g_289,(void*)0,&g_289,(void*)0,&g_289,&g_289,&g_289}},{{&g_289,&g_289,&g_289,&g_289,&g_289,&g_289,&g_289},{&g_289,&g_289,&g_289,&g_289,&g_289,&g_289,&g_289},{&g_289,&g_289,&g_289,&g_289,&g_289,&g_289,&g_289},{&g_289,&g_289,&g_289,&g_289,&g_289,&g_289,&g_289},{&g_289,&g_289,&g_289,&g_289,&g_289,&g_289,&g_289},{&g_289,&g_289,&g_289,&g_289,&g_289,(void*)0,(void*)0}},{{&g_289,&g_289,&g_289,&g_289,&g_289,&g_289,&g_289},{(void*)0,(void*)0,&g_289,&g_289,&g_289,&g_289,&g_289},{&g_289,&g_289,&g_289,(void*)0,&g_289,&g_289,&g_289},{(void*)0,&g_289,&g_289,&g_289,&g_289,(void*)0,&g_289},{&g_289,&g_289,&g_289,&g_289,&g_289,&g_289,&g_289},{&g_289,&g_289,&g_289,(void*)0,&g_289,&g_289,(void*)0}},{{&g_289,&g_289,&g_289,&g_289,&g_289,&g_289,&g_289},{&g_289,&g_289,&g_289,&g_289,&g_289,&g_289,&g_289},{&g_289,&g_289,&g_289,&g_289,&g_289,(void*)0,&g_289},{&g_289,(void*)0,(void*)0,(void*)0,(void*)0,&g_289,&g_289},{&g_289,&g_289,&g_289,&g_289,&g_289,(void*)0,&g_289},{&g_289,&g_289,(void*)0,&g_289,(void*)0,&g_289,&g_289}},{{&g_289,&g_289,&g_289,(void*)0,&g_289,&g_289,&g_289},{&g_289,&g_289,&g_289,&g_289,&g_289,&g_289,(void*)0},{&g_289,&g_289,&g_289,&g_289,&g_289,&g_289,&g_289},{&g_289,&g_289,&g_289,&g_289,&g_289,(void*)0,&g_289},{&g_289,&g_289,&g_289,&g_289,&g_289,&g_289,&g_289},{&g_289,(void*)0,(void*)0,&g_289,&g_289,&g_289,&g_289}},{{&g_289,(void*)0,&g_289,&g_289,&g_289,&g_289,&g_289},{&g_289,&g_289,(void*)0,&g_289,&g_289,(void*)0,&g_289},{&g_289,&g_289,&g_289,&g_289,&g_289,&g_289,&g_289},{(void*)0,&g_289,&g_289,(void*)0,(void*)0,&g_289,&g_289},{&g_289,&g_289,&g_289,&g_289,&g_289,&g_289,&g_289},{(void*)0,&g_289,&g_289,&g_289,(void*)0,&g_289,(void*)0}}};
+ int16_t ***l_2188 = &l_2189[0][5][4];
+ int16_t ****l_2187[1];
+ int i, j, k;
+ for (i = 0; i < 1; i++)
+ l_2187[i] = &l_2188;
+lbl_2208:
+ for (g_3 = 0; (g_3 <= 0); g_3 += 1)
+ { /* block id: 3 */
+ uint32_t *l_12 = (void*)0;
+ uint32_t *l_13[2][9][7] = {{{&g_14[4],&g_14[2],&g_14[1],&g_14[1],&g_14[1],(void*)0,&g_14[4]},{(void*)0,&g_14[1],&g_14[3],&g_14[1],&g_14[1],&g_14[3],&g_14[1]},{&g_14[4],&g_14[2],&g_14[1],&g_14[1],&g_14[1],(void*)0,&g_14[4]},{(void*)0,&g_14[1],&g_14[3],&g_14[1],&g_14[1],&g_14[3],&g_14[1]},{&g_14[4],&g_14[2],&g_14[1],&g_14[1],&g_14[1],(void*)0,&g_14[4]},{(void*)0,&g_14[1],&g_14[3],&g_14[1],&g_14[1],&g_14[3],&g_14[1]},{&g_14[4],&g_14[2],&g_14[1],&g_14[1],&g_14[1],(void*)0,&g_14[4]},{(void*)0,&g_14[1],&g_14[3],&g_14[1],&g_14[1],&g_14[3],&g_14[1]},{&g_14[4],&g_14[2],&g_14[1],&g_14[1],&g_14[1],(void*)0,&g_14[4]}},{{(void*)0,&g_14[1],&g_14[3],&g_14[1],&g_14[1],&g_14[3],&g_14[1]},{&g_14[4],&g_14[2],&g_14[1],&g_14[1],&g_14[1],(void*)0,&g_14[4]},{(void*)0,&g_14[1],&g_14[3],&g_14[1],(void*)0,&g_14[1],&g_14[0]},{&g_14[1],&g_14[3],&g_14[1],(void*)0,&g_14[4],&g_14[1],&g_14[1]},{&g_14[1],&g_14[0],&g_14[1],(void*)0,(void*)0,&g_14[1],&g_14[0]},{&g_14[1],&g_14[3],&g_14[1],(void*)0,&g_14[4],&g_14[1],&g_14[1]},{&g_14[1],&g_14[0],&g_14[1],(void*)0,(void*)0,&g_14[1],&g_14[0]},{&g_14[1],&g_14[3],&g_14[1],(void*)0,&g_14[4],&g_14[1],&g_14[1]},{&g_14[1],&g_14[0],&g_14[1],(void*)0,(void*)0,&g_14[1],&g_14[0]}}};
+ int8_t *l_35 = &g_36;
+ int32_t l_37 = 0x129EC6EAL;
+ uint8_t *l_39 = &g_40[1];
+ uint32_t l_1611 = 1UL;
+ const int16_t l_1613 = (-7L);
+ int32_t l_1616 = 0xF7091F80L;
+ int32_t l_1618 = 0x81A177EAL;
+ int32_t l_1623 = (-3L);
+ int8_t ***l_1657 = &g_245;
+ int i, j, k;
+ if ((((((safe_mul_func_int8_t_s_s(((safe_div_func_uint8_t_u_u(((safe_mod_func_int8_t_s_s(func_10((((g_15 &= (g_14[4] ^= g_2[1][0])) == func_16(g_2[2][0], func_22((safe_div_func_int8_t_s_s((safe_mul_func_int16_t_s_s(((safe_div_func_int32_t_s_s((safe_rshift_func_uint8_t_u_s((g_34 = 1UL), ((*l_35) ^= 0x4DL))), l_37)) == (((((*l_39) = l_38) , (--(*l_39))) >= l_37) ^ 0UL)), ((void*)0 == g_43))), g_3)), l_38, l_13[1][1][2]), g_55, l_37, g_56)) >= l_37)), l_38)) == 0x3C9EL), l_38)) , 0xBCL), l_1611)) | l_1612) == 1UL) < l_1613) == 0x39F7L))
+ { /* block id: 771 */
+ int32_t *l_1614 = &g_1055;
+ if (l_1613)
+ break;
+ (**g_960) = l_1614;
+ if (l_1611)
+ continue;
+ }
+ else
+ { /* block id: 775 */
+ int32_t *l_1615 = &g_51[1][6][2];
+ int32_t *l_1617 = &g_297[1];
+ int32_t *l_1619 = &l_1616;
+ int32_t *l_1620 = (void*)0;
+ int32_t *l_1621 = &l_1618;
+ int32_t *l_1622 = &g_297[1];
+ int32_t *l_1624 = &g_51[0][3][1];
+ int32_t *l_1625 = &l_37;
+ int32_t *l_1626 = (void*)0;
+ int32_t *l_1627 = &g_1132;
+ int32_t *l_1628 = &g_297[1];
+ int32_t *l_1629 = &l_1618;
+ int32_t *l_1630[9] = {&g_297[0],&g_297[0],&g_297[0],&g_297[0],&g_297[0],&g_297[0],&g_297[0],&g_297[0],&g_297[0]};
+ uint8_t l_1631 = 6UL;
+ int i;
+ --l_1631;
+ return (*l_1617);
+ }
+ l_1634 |= 0xB346B708L;
+ for (g_1298 = 0; (g_1298 <= 0); g_1298 += 1)
+ { /* block id: 782 */
+ uint32_t l_1635 = 0xEF083A2AL;
+ int32_t l_1644 = 0x4F483357L;
+ (*g_143) ^= l_1635;
+ (*g_143) = (safe_mul_func_uint16_t_u_u(((safe_sub_func_int8_t_s_s(((!(l_38 , l_1611)) != (l_1644 &= (safe_lshift_func_int8_t_s_s((safe_add_func_int8_t_s_s(0x2CL, l_1612)), 4)))), (safe_unary_minus_func_uint32_t_u((safe_div_func_int8_t_s_s(((g_320 <= (((l_38 <= (((safe_add_func_int16_t_s_s((safe_sub_func_uint16_t_u_u((l_1618 & (((safe_div_func_uint16_t_u_u((((((safe_rshift_func_int16_t_s_s(0x3853L, l_1635)) >= l_1612) , g_1656) != l_1657) & l_38), 65531UL)) ^ l_1623) && l_1635)), l_1658[1][1])), 0x80FFL)) == 7UL) == (**g_1238))) > 0x43L) || g_14[5])) , 5L), l_1612)))))) > l_1658[1][1]), 0UL));
+ }
+ for (g_1099 = 0; (g_1099 <= 0); g_1099 += 1)
+ { /* block id: 789 */
+ int16_t l_1661 = 0x12BEL;
+ uint16_t *l_1666[10][9] = {{(void*)0,&g_969,&g_251,&g_969,&g_251,&g_969,&g_969,&g_251,&g_969},{(void*)0,&g_969,(void*)0,(void*)0,(void*)0,&g_969,(void*)0,(void*)0,(void*)0},{&g_969,(void*)0,&g_251,&g_969,&g_251,&g_251,&g_969,&g_251,(void*)0},{&g_969,&g_969,&g_969,(void*)0,&g_969,(void*)0,&g_969,&g_969,&g_969},{&g_251,&g_251,&g_251,&g_969,&g_969,&g_251,&g_251,&g_251,&g_251},{(void*)0,&g_969,(void*)0,&g_969,(void*)0,&g_969,(void*)0,&g_969,(void*)0},{&g_251,(void*)0,&g_251,&g_251,(void*)0,&g_251,&g_251,&g_969,&g_251},{&g_969,&g_969,&g_969,&g_969,&g_969,&g_969,&g_969,&g_969,&g_969},{&g_969,&g_969,&g_969,&g_969,&g_251,&g_969,&g_251,&g_251,(void*)0},{(void*)0,&g_969,(void*)0,&g_969,(void*)0,&g_969,(void*)0,&g_969,(void*)0}};
+ int16_t l_1667 = 0xD2A4L;
+ int32_t l_1680 = 0x06D2A1F8L;
+ int32_t l_1681 = 0xB17E7D5CL;
+ int8_t l_1682 = (-5L);
+ int32_t *l_1683 = &g_1055;
+ int i, j;
+ l_37 ^= ((*l_1683) = ((*g_143) = ((safe_add_func_uint32_t_u_u((--(***g_735)), (safe_mul_func_uint8_t_u_u(((l_1681 = (!((g_969 = (l_1667 &= 1UL)) != ((*g_132) != (((((safe_mul_func_int16_t_s_s(((***g_1548) && (safe_div_func_uint8_t_u_u((((safe_sub_func_int16_t_s_s(((safe_add_func_int32_t_s_s((safe_lshift_func_uint16_t_u_u(g_34, ((*g_1018) != (*g_1018)))), (*g_143))) , (((safe_add_func_uint16_t_u_u((l_1680 = ((((l_1618 = ((***g_1184) | ((((**g_1185) ^ l_1661) && l_1661) , l_1661))) < 1L) || 65533UL) | l_1616)), (-2L))) == l_1658[3][5]) != l_1661)), l_1623)) , 0L) | l_1661), l_1661))), l_1634)) <= (*g_143)) , l_38) || (*g_143)) != (***g_1184)))))) , (*g_43)), (***g_1548))))) <= l_1682)));
+ }
+ }
+ for (l_38 = 2; (l_38 <= (-27)); l_38 = safe_sub_func_int8_t_s_s(l_38, 6))
+ { /* block id: 803 */
+ int32_t l_1692 = 0L;
+ int32_t l_1702 = 0xA1267D64L;
+ uint32_t l_1722 = 8UL;
+ uint8_t * const * const l_1726 = &g_43;
+ uint32_t *l_1737 = &g_1099;
+ int8_t *l_1793 = (void*)0;
+ int32_t *l_1797 = (void*)0;
+ uint32_t l_1859 = 0x82CF6B6FL;
+ int8_t l_1899 = 1L;
+ uint16_t l_1902 = 65534UL;
+ int8_t ***l_1936[8] = {(void*)0,&g_242,&g_242,(void*)0,&g_242,&g_242,(void*)0,&g_242};
+ uint32_t l_1957 = 5UL;
+ int32_t **l_2005 = &g_143;
+ uint32_t l_2007 = 18446744073709551615UL;
+ int32_t l_2050 = (-1L);
+ int32_t l_2051 = 5L;
+ int32_t l_2052[8][1];
+ const int8_t *l_2066 = &g_2067;
+ const int8_t **l_2065[10] = {(void*)0,(void*)0,(void*)0,(void*)0,(void*)0,(void*)0,(void*)0,(void*)0,(void*)0,(void*)0};
+ uint32_t l_2071[3][7][7] = {{{0x30CE76AEL,0UL,18446744073709551615UL,1UL,1UL,1UL,0UL},{0xAD0A2372L,0xEA6E9C20L,0UL,0x324BC3A3L,0xF442972AL,0x911E4A42L,0x911E4A42L},{18446744073709551608UL,18446744073709551610UL,0x1262E29EL,18446744073709551610UL,18446744073709551608UL,0x9477AE01L,0xF442972AL},{1UL,5UL,0x30CE76AEL,18446744073709551611UL,0x99881E2AL,0xDA83510BL,18446744073709551615UL},{0xF442972AL,0x911E4A42L,0xFCFF20AAL,0x23F69BAEL,18446744073709551608UL,0x30CE76AEL,0xAD0A2372L},{0x1262E29EL,0UL,18446744073709551615UL,1UL,0x6F0D46CCL,0x1262E29EL,0x7CF12E04L},{18446744073709551615UL,0xF442972AL,0x5F49E352L,5UL,18446744073709551615UL,0UL,0UL}},{{18446744073709551611UL,18446744073709551615UL,0x23F69BAEL,0x30CE76AEL,0UL,18446744073709551615UL,1UL},{0x250C5BC2L,18446744073709551615UL,6UL,0x30CE76AEL,1UL,1UL,0UL},{18446744073709551615UL,0x6F0D46CCL,1UL,5UL,0x911E4A42L,1UL,0x911E4A42L},{1UL,18446744073709551615UL,18446744073709551615UL,1UL,0x9477AE01L,0x23E5CD91L,0x30CE76AEL},{0x2665B0F5L,0UL,1UL,0x23F69BAEL,0xDA83510BL,0x9D1F30D5L,0UL},{18446744073709551611UL,0x5F49E352L,0x84F3CCEFL,0UL,0x9A4CA65DL,18446744073709551610UL,0x30CE76AEL},{6UL,0UL,0x324BC3A3L,0x5F49E352L,1UL,5UL,0x911E4A42L}},{{1UL,18446744073709551608UL,18446744073709551613UL,0xDC003897L,1UL,0UL,0UL},{1UL,18446744073709551615UL,18446744073709551615UL,0x324BC3A3L,18446744073709551608UL,0xCC0F1D77L,1UL},{0x9D1F30D5L,0x7DDAB611L,18446744073709551615UL,0xFCFF20AAL,0UL,0x9D1F30D5L,0UL},{18446744073709551615UL,18446744073709551615UL,18446744073709551613UL,0x7CF12E04L,0UL,0UL,0x7CF12E04L},{0x324BC3A3L,0UL,0x324BC3A3L,0x30CE76AEL,0x7CF12E04L,6UL,0xAD0A2372L},{0x5F49E352L,18446744073709551615UL,0x84F3CCEFL,18446744073709551615UL,18446744073709551614UL,18446744073709551615UL,0UL},{1UL,0UL,1UL,0x27C4E890L,0x911E4A42L,6UL,18446744073709551615UL}}};
+ uint16_t l_2191 = 0UL;
+ uint32_t l_2194 = 0x1CA07694L;
+ uint8_t *****l_2202 = &g_904[0][3];
+ uint8_t ******l_2201 = &l_2202;
+ uint8_t *l_2205 = &l_1831;
+ int32_t *l_2206[1][2];
+ int i, j, k;
+ for (i = 0; i < 8; i++)
+ {
+ for (j = 0; j < 1; j++)
+ l_2052[i][j] = 1L;
+ }
+ for (i = 0; i < 1; i++)
+ {
+ for (j = 0; j < 2; j++)
+ l_2206[i][j] = &l_2052[2][0];
+ }
+ if (((((0xEC18D826L > 0xC2623D2EL) == (safe_add_func_int32_t_s_s(((void*)0 == (*g_1018)), (*g_143)))) < ((*g_43) |= (((safe_add_func_int8_t_s_s(l_1658[4][2], (**g_131))) == (l_1634 = ((((safe_lshift_func_uint16_t_u_s(g_294[0], 5)) , l_1692) , 0x47L) && 0x07L))) != 0x6DDD7AF3L))) <= l_1692))
+ { /* block id: 806 */
+ int8_t l_1727 = 0x36L;
+ uint16_t l_1730 = 0x5E85L;
+ int32_t l_1758 = 1L;
+ int32_t l_1760 = 0x8ED80A0BL;
+ int32_t l_1762 = 0xC5EE06D0L;
+ int32_t l_1764 = 0x9C30C92FL;
+ uint8_t l_1773 = 0x04L;
+ uint32_t l_1795 = 0x25B5191FL;
+ int32_t *l_1832 = (void*)0;
+ int32_t l_1850 = 3L;
+ uint16_t l_1876 = 0xC3DDL;
+ uint32_t *****l_1891 = (void*)0;
+ uint16_t l_1901 = 65528UL;
+ for (g_419 = 0; (g_419 < 27); ++g_419)
+ { /* block id: 809 */
+ int32_t l_1697[6] = {(-8L),(-8L),(-8L),(-8L),(-8L),(-8L)};
+ uint16_t *l_1698[10][3] = {{&g_251,&g_251,&g_251},{&g_251,&g_251,&g_251},{&g_251,&g_251,&g_251},{&g_251,&g_969,&g_251},{&g_251,&g_251,&g_251},{&g_251,&g_251,&g_251},{&g_969,&g_251,&g_251},{&g_251,&g_251,&g_251},{&g_251,&g_251,&g_251},{&g_251,&g_969,&g_969}};
+ int i, j;
+ (*g_143) ^= ((**g_736) , l_1612);
+ l_1634 = (safe_lshift_func_uint16_t_u_s((g_969 = l_1697[1]), 5));
+ }
+ for (g_255 = 0; (g_255 > 7); g_255 = safe_add_func_int16_t_s_s(g_255, 8))
+ { /* block id: 816 */
+ uint8_t l_1701 = 0xB3L;
+ uint8_t * const ***l_1709 = (void*)0;
+ uint8_t * const ****l_1708 = &l_1709;
+ uint8_t * const *****l_1710[10][10][2] = {{{&l_1708,(void*)0},{&l_1708,&l_1708},{(void*)0,&l_1708},{&l_1708,(void*)0},{&l_1708,&l_1708},{(void*)0,&l_1708},{&l_1708,(void*)0},{&l_1708,&l_1708},{(void*)0,&l_1708},{&l_1708,(void*)0}},{{&l_1708,&l_1708},{(void*)0,&l_1708},{&l_1708,(void*)0},{&l_1708,&l_1708},{(void*)0,&l_1708},{&l_1708,(void*)0},{&l_1708,&l_1708},{(void*)0,&l_1708},{&l_1708,&l_1708},{(void*)0,(void*)0}},{{&l_1708,(void*)0},{(void*)0,&l_1708},{(void*)0,(void*)0},{&l_1708,(void*)0},{(void*)0,&l_1708},{(void*)0,(void*)0},{&l_1708,(void*)0},{(void*)0,&l_1708},{(void*)0,(void*)0},{&l_1708,(void*)0}},{{(void*)0,&l_1708},{(void*)0,(void*)0},{&l_1708,(void*)0},{(void*)0,&l_1708},{(void*)0,(void*)0},{&l_1708,(void*)0},{(void*)0,&l_1708},{(void*)0,(void*)0},{&l_1708,(void*)0},{(void*)0,&l_1708}},{{(void*)0,(void*)0},{&l_1708,(void*)0},{(void*)0,&l_1708},{(void*)0,(void*)0},{&l_1708,(void*)0},{(void*)0,&l_1708},{(void*)0,(void*)0},{&l_1708,(void*)0},{(void*)0,&l_1708},{(void*)0,(void*)0}},{{&l_1708,(void*)0},{(void*)0,&l_1708},{(void*)0,(void*)0},{&l_1708,(void*)0},{(void*)0,&l_1708},{(void*)0,(void*)0},{&l_1708,(void*)0},{(void*)0,&l_1708},{(void*)0,(void*)0},{&l_1708,(void*)0}},{{(void*)0,&l_1708},{(void*)0,(void*)0},{&l_1708,(void*)0},{(void*)0,&l_1708},{(void*)0,(void*)0},{&l_1708,(void*)0},{(void*)0,&l_1708},{(void*)0,(void*)0},{&l_1708,(void*)0},{(void*)0,&l_1708}},{{(void*)0,(void*)0},{&l_1708,(void*)0},{(void*)0,&l_1708},{(void*)0,(void*)0},{&l_1708,(void*)0},{(void*)0,&l_1708},{(void*)0,(void*)0},{&l_1708,(void*)0},{(void*)0,&l_1708},{(void*)0,(void*)0}},{{&l_1708,(void*)0},{(void*)0,&l_1708},{(void*)0,(void*)0},{&l_1708,(void*)0},{(void*)0,&l_1708},{(void*)0,(void*)0},{&l_1708,(void*)0},{(void*)0,&l_1708},{(void*)0,(void*)0},{&l_1708,(void*)0}},{{(void*)0,&l_1708},{(void*)0,(void*)0},{&l_1708,(void*)0},{(void*)0,&l_1708},{(void*)0,(void*)0},{&l_1708,(void*)0},{(void*)0,&l_1708},{(void*)0,(void*)0},{&l_1708,(void*)0},{(void*)0,&l_1708}}};
+ int32_t l_1721 = 1L;
+ uint32_t *l_1728 = &g_477;
+ int32_t *l_1729[5][7] = {{(void*)0,&l_38,&l_38,&l_38,(void*)0,&l_1692,&l_1692},{&g_34,(void*)0,&l_1612,(void*)0,&g_34,&g_1509,&g_1509},{(void*)0,&l_38,&l_38,&l_38,(void*)0,&l_1692,&l_1692},{&g_34,(void*)0,&l_1612,(void*)0,&g_34,&g_1509,&l_1612},{&l_1692,&l_1692,&g_34,&l_1692,&l_1692,&l_38,&l_38}};
+ int8_t *l_1731 = &l_1727;
+ int32_t l_1739 = 0xD1196770L;
+ int32_t l_1759 = 0L;
+ uint16_t *l_1806[2][8] = {{&l_1730,&l_1730,&l_1730,&l_1730,&l_1730,&l_1730,&l_1730,&l_1730},{&l_1730,&l_1730,&l_1730,&l_1730,&l_1730,&l_1730,&l_1730,&l_1730}};
+ int32_t *l_1833 = &g_3;
+ int i, j, k;
+ l_1702 = l_1701;
+ if ((safe_lshift_func_uint8_t_u_u((l_38 , 0xE4L), (((safe_mul_func_int8_t_s_s(((*l_1731) = (((safe_unary_minus_func_int8_t_s((&g_1547[0][2][1] != (l_1711[7] = l_1708)))) == (safe_add_func_int8_t_s_s((((**g_736) = (**g_736)) < (((safe_mod_func_uint16_t_u_u(((l_1634 = (((*l_1728) = (safe_mul_func_uint8_t_u_u((((**l_1726) = (((safe_add_func_uint8_t_u_u((l_1721 = l_1701), (l_1722 != (safe_div_func_int32_t_s_s((((l_1725 == l_1726) , 0x32L) > l_1727), (*g_143)))))) , 0UL) <= 0xB756L)) && 0UL), l_1612))) < 0UL)) , g_1132), (**g_1185))) && 0x6EL) | g_1254[7][0][7])), 0xB8L))) >= l_1730)), l_1730)) > 0xF123L) || (*g_43)))))
+ { /* block id: 825 */
+ uint32_t *l_1738 = &g_56;
+ for (g_477 = (-18); (g_477 >= 4); g_477 = safe_add_func_int32_t_s_s(g_477, 1))
+ { /* block id: 828 */
+ int8_t l_1736 = 0xE8L;
+ (*g_143) |= l_1727;
+ l_1721 = (l_1721 < (l_1739 = ((l_1736 , 0x13L) <= ((l_1738 = l_1737) == ((*g_736) = (*g_736))))));
+ if ((*g_143))
+ break;
+ }
+ }
+ else
+ { /* block id: 836 */
+ int32_t l_1761 = 0x3F63D84DL;
+ int32_t l_1784[6] = {0xC54599E7L,0xC54599E7L,0x4344EDEAL,0xC54599E7L,0xC54599E7L,0x4344EDEAL};
+ int32_t ***l_1794[9] = {(void*)0,(void*)0,(void*)0,(void*)0,(void*)0,(void*)0,(void*)0,(void*)0,(void*)0};
+ int16_t **l_1796[5][2][9] = {{{&g_289,&g_289,(void*)0,&g_289,&g_289,&g_289,(void*)0,(void*)0,&g_289},{(void*)0,&g_289,&g_289,&g_289,&g_289,&g_289,&g_289,&g_289,&g_289}},{{(void*)0,&g_289,&g_289,&g_289,(void*)0,&g_289,(void*)0,&g_289,&g_289},{&g_289,&g_289,(void*)0,&g_289,&g_289,&g_289,&g_289,&g_289,&g_289}},{{&g_289,&g_289,&g_289,&g_289,&g_289,&g_289,(void*)0,&g_289,(void*)0},{&g_289,(void*)0,(void*)0,(void*)0,&g_289,&g_289,&g_289,(void*)0,&g_289}},{{(void*)0,(void*)0,&g_289,&g_289,&g_289,(void*)0,(void*)0,&g_289,&g_289},{&g_289,&g_289,&g_289,&g_289,&g_289,(void*)0,&g_289,&g_289,&g_289}},{{(void*)0,&g_289,&g_289,&g_289,&g_289,&g_289,&g_289,(void*)0,&g_289},{&g_289,(void*)0,(void*)0,&g_289,&g_289,&g_289,&g_289,&g_289,&g_289}}};
+ int i, j, k;
+ for (g_1132 = 0; (g_1132 >= 0); g_1132 -= 1)
+ { /* block id: 839 */
+ int32_t l_1757 = 0x90288987L;
+ int32_t l_1765 = 0x82B8DD8AL;
+ const uint32_t *l_1775 = &g_1776;
+ const uint32_t **l_1774 = &l_1775;
+ const uint32_t *l_1778 = (void*)0;
+ const uint32_t **l_1777 = &l_1778;
+ const uint32_t *l_1780 = &g_1776;
+ const uint32_t **l_1779 = &l_1780;
+ int i, j, k;
+ l_1784[5] = ((safe_sub_func_int32_t_s_s((safe_mul_func_int8_t_s_s((safe_add_func_uint8_t_u_u((++(**l_1725)), ((((l_1761 = ((safe_mod_func_uint32_t_u_u((safe_lshift_func_uint16_t_u_s(0x6591L, g_1254[(g_1132 + 4)][g_1132][(g_1132 + 2)])), (l_1721 & (((safe_add_func_int16_t_s_s(l_1721, (**g_1185))) , &g_1019[3][0][0]) != &g_1019[6][0][0])))) || ((safe_add_func_uint16_t_u_u(((g_1781 = ((*l_1779) = ((*l_1777) = ((*l_1774) = func_22(((((*g_143) = ((++g_1766) < (((((((safe_add_func_int16_t_s_s(((**g_1238) , (safe_rshift_func_uint8_t_u_s(l_1765, 6))), (**g_1185))) , 0xDFL) == l_1721) | (*g_289)) & l_1739) | l_1764) < 0UL))) , l_1761) , l_1773), l_1762, (**g_735)))))) != l_1783), 0x2B14L)) & 0x69A24093L))) > l_1701) >= 1L) == l_1739))), l_1730)), 0xBDA5626EL)) | l_1701);
+ (*g_143) = l_1761;
+ l_1797 = func_105((((g_960 = l_1785) != (((safe_mul_func_uint8_t_u_u((l_1788 != (void*)0), (g_14[2] , ((((+(safe_sub_func_uint8_t_u_u((((***g_905) = (safe_mul_func_int8_t_s_s((**g_131), ((*l_1731) = ((*g_131) != l_1793))))) <= (l_1794[4] != (void*)0)), l_1795))) , (void*)0) == l_1796[1][0][3]) && g_1254[(g_1132 + 4)][g_1132][(g_1132 + 2)])))) >= l_1722) , (void*)0)) < 0xA30C448CL));
+ return l_1727;
+ }
+ (*g_143) ^= ((safe_mul_func_int8_t_s_s(0xA2L, ((safe_div_func_uint8_t_u_u(((**g_1185) < (7L < l_1701)), (*g_43))) && 0x80504E05L))) > 0UL);
+ }
+ (**g_960) = (l_1833 = (l_1832 = ((l_1773 | ((safe_mul_func_uint8_t_u_u(((++g_251) , (((--(**l_1726)) ^ ((safe_mod_func_uint32_t_u_u(0xE9892A02L, 0x6E452460L)) | (0xDA1EL && (!(((safe_div_func_int16_t_s_s((safe_rshift_func_uint16_t_u_u((g_251 = ((((safe_add_func_uint16_t_u_u((safe_mul_func_uint16_t_u_u((g_969++), 0UL)), (g_1334 & (!(((l_1758 ^= (safe_div_func_int32_t_s_s(((+((safe_lshift_func_int8_t_s_s((safe_div_func_int32_t_s_s(0x469EB03BL, ((((safe_mod_func_int32_t_s_s(l_1730, l_1773)) | l_1701) , (**g_1238)) , 4294967295UL))), 7)) != (**g_1185))) ^ 65530UL), 0x7B945D20L))) , l_1721) && l_1758))))) < 0x75L) , l_1773) != 0xD86B841BL)), g_1099)), (**g_1185))) == g_1776) != l_1759))))) , (**g_176))), 0x8EL)) || l_1831)) , (void*)0)));
+ }
+ if ((safe_div_func_uint8_t_u_u((~(safe_mod_func_uint8_t_u_u((safe_div_func_int32_t_s_s(((***g_1548) < (l_1634 |= (safe_add_func_int16_t_s_s((-3L), ((safe_mul_func_int8_t_s_s((((~(safe_mod_func_int8_t_s_s((**g_131), (safe_mul_func_uint8_t_u_u((safe_div_func_int32_t_s_s((l_1702 , ((l_1850 == (safe_rshift_func_uint16_t_u_s(1UL, (0x3DCC7414L | ((0x04DDBC4DL && (((((safe_mul_func_uint8_t_u_u(255UL, l_1760)) > (***g_1184)) >= (**g_736)) >= g_1857) == 0xD4CEL)) >= l_1763))))) > g_477)), (-1L))), (*g_132)))))) , (void*)0) != &g_961), (*g_43))) >= (**g_1185)))))), 0x7424D03BL)), l_1850))), (***g_905))))
+ { /* block id: 868 */
+ uint16_t l_1858 = 0x3EA7L;
+ (*g_143) ^= (l_1858 = 0x9CFAB74FL);
+ }
+ else
+ { /* block id: 871 */
+ int16_t **l_1864 = &g_289;
+ int16_t ***l_1863[5] = {(void*)0,(void*)0,(void*)0,(void*)0,(void*)0};
+ const int8_t *l_1873 = &g_36;
+ const int8_t **l_1872 = &l_1873;
+ const int8_t ***l_1871 = &l_1872;
+ int32_t l_1888 = 0x7ACDB461L;
+ uint32_t ****l_1893 = &g_1241;
+ uint32_t **** const *l_1892[1][10] = {{&l_1893,&l_1893,&l_1893,&l_1893,&l_1893,&l_1893,&l_1893,&l_1893,&l_1893,&l_1893}};
+ uint8_t **l_1898[8] = {&l_1877,&l_1877,&l_1877,&l_1877,&l_1877,&l_1877,&l_1877,&l_1877};
+ int32_t l_1900 = 0x122D3568L;
+ int8_t l_1931 = 0x34L;
+ int i, j;
+ (*g_143) |= l_1859;
+ for (l_1762 = 1; (l_1762 >= 0); l_1762 -= 1)
+ { /* block id: 875 */
+ uint32_t l_1860[3];
+ int16_t **l_1862 = &g_289;
+ int16_t ***l_1861 = &l_1862;
+ const int8_t ***l_1875 = &l_1872;
+ const int8_t ****l_1874 = &l_1875;
+ int i;
+ for (i = 0; i < 3; i++)
+ l_1860[i] = 18446744073709551614UL;
+ (*g_143) |= ((l_1860[0] != (l_1861 == l_1863[2])) & (safe_mul_func_uint8_t_u_u(((safe_mod_func_int32_t_s_s((+((***g_1184) < (safe_div_func_uint8_t_u_u((l_1871 == ((*l_1874) = (void*)0)), l_1876)))), ((*g_55) = ((g_297[l_1762] = (((**g_736) , l_1877) != (*l_1726))) , (**g_736))))) || 0xE5L), l_1860[2])));
+ }
+ (*g_143) = (((safe_lshift_func_uint16_t_u_u(((safe_sub_func_int8_t_s_s((*g_132), (safe_add_func_int16_t_s_s(0x0DE1L, (safe_sub_func_int16_t_s_s((safe_mod_func_uint16_t_u_u(((l_1888 , (*g_55)) && (g_969 < (g_1766 = (((**l_1725) = (((((l_1891 != l_1892[0][2]) , (safe_mul_func_uint8_t_u_u((safe_mul_func_int16_t_s_s(((l_1888 |= ((l_1898[7] != (void*)0) != 0x581BL)) || l_1634), 8UL)), 0x19L))) , (*g_289)) , l_1899) < 0x06L)) <= 0UL)))), l_1900)), (**g_1185))))))) >= 0x94L), l_1901)) != 4294967295UL) , (*g_143));
+ if (l_1902)
+ { /* block id: 885 */
+ int32_t l_1905 = 1L;
+ for (l_1760 = (-2); (l_1760 < (-23)); l_1760 = safe_sub_func_int32_t_s_s(l_1760, 3))
+ { /* block id: 888 */
+ (*g_143) ^= l_1905;
+ if (l_1905)
+ continue;
+ }
+ }
+ else
+ { /* block id: 892 */
+ uint16_t *l_1908[5][4] = {{&g_1766,&g_1766,&g_969,&l_1901},{(void*)0,&g_1766,&g_1766,(void*)0},{&g_1766,(void*)0,&g_1766,&g_969},{&g_1766,&g_1766,&g_1766,&g_969},{(void*)0,&g_969,&g_969,&g_969}};
+ int32_t l_1919 = 0x8D5F8744L;
+ int i, j;
+ (*g_143) = (l_1702 ^= ((((safe_sub_func_uint16_t_u_u((g_1766 = (++g_251)), ((((safe_div_func_int32_t_s_s(((++g_969) | (safe_mul_func_uint8_t_u_u(l_1919, (l_1919 != l_1658[2][1])))), l_1756[4][1])) <= ((safe_sub_func_int16_t_s_s((safe_lshift_func_uint8_t_u_s(l_1888, l_1730)), (((safe_lshift_func_int16_t_s_s((safe_rshift_func_uint16_t_u_s((((!(l_1919 , 0x59L)) ^ (l_1900 < l_1900)) >= l_1900), 4)), 14)) , (void*)0) != (void*)0))) <= 0xD049L)) > 0x779C7159L) , g_255))) ^ l_1900) | 1L) <= (***g_905)));
+ for (g_1298 = (-14); (g_1298 >= 3); g_1298++)
+ { /* block id: 900 */
+ int32_t l_1930 = (-1L);
+ if (l_1930)
+ break;
+ if (l_1931)
+ continue;
+ l_1919 &= 0xDF650B0EL;
+ }
+ for (g_34 = 0; (g_34 <= 3); g_34 += 1)
+ { /* block id: 907 */
+ return g_36;
+ }
+ }
+ }
+ }
+ else
+ { /* block id: 912 */
+ int16_t l_1932 = (-4L);
+ const uint8_t ** const ***l_1943 = &g_1938;
+ int8_t **l_1974 = &l_1793;
+ int32_t l_1990 = (-4L);
+ int32_t *l_2009[3];
+ int16_t **l_2027 = &g_289;
+ int16_t ***l_2026 = &l_2027;
+ const int16_t *l_2030 = &g_1285;
+ const int16_t **l_2029 = &l_2030;
+ const int16_t ***l_2028[3][5][2] = {{{&l_2029,&l_2029},{&l_2029,&l_2029},{&l_2029,&l_2029},{&l_2029,&l_2029},{&l_2029,&l_2029}},{{&l_2029,&l_2029},{&l_2029,&l_2029},{&l_2029,&l_2029},{&l_2029,&l_2029},{&l_2029,&l_2029}},{{&l_2029,&l_2029},{&l_2029,&l_2029},{&l_2029,&l_2029},{&l_2029,&l_2029},{&l_2029,&l_2029}}};
+ int32_t l_2031[7][5] = {{0x7B32F464L,0x31A52CFCL,(-1L),0x1CB357FAL,(-1L)},{(-1L),(-1L),0xFE12D187L,0x1CB357FAL,(-10L)},{0x31A52CFCL,0x7B32F464L,0x7B32F464L,0x31A52CFCL,(-1L)},{0x31A52CFCL,0x1CB357FAL,0L,0L,0x1CB357FAL},{(-1L),0x7B32F464L,0L,0xFE12D187L,0xFE12D187L},{0x7B32F464L,(-1L),0x7B32F464L,0L,0xFE12D187L},{0x1CB357FAL,0x31A52CFCL,0xFE12D187L,0x31A52CFCL,0x1CB357FAL}};
+ int32_t l_2032 = 4L;
+ int i, j, k;
+ for (i = 0; i < 3; i++)
+ l_2009[i] = &g_3;
+ if (l_1932)
+ { /* block id: 913 */
+ uint16_t l_1966 = 0xAA16L;
+ uint8_t l_1967 = 9UL;
+ int32_t l_1989 = 0x49AFD519L;
+ int32_t **l_2003 = &g_312[1][0][5];
+ for (g_347 = 0; (g_347 <= 18); g_347++)
+ { /* block id: 916 */
+ uint8_t l_1935[1][10][2] = {{{4UL,0x9AL},{4UL,0x9AL},{4UL,0x9AL},{4UL,0x9AL},{4UL,0x9AL},{4UL,0x9AL},{4UL,0x9AL},{4UL,0x9AL},{4UL,0x9AL},{4UL,0x9AL}}};
+ int32_t l_1975 = (-9L);
+ uint8_t l_2006 = 0x8EL;
+ int i, j, k;
+ if (l_1935[0][3][1])
+ { /* block id: 917 */
+ const uint8_t ** const ****l_1942[3][1];
+ int i, j;
+ for (i = 0; i < 3; i++)
+ {
+ for (j = 0; j < 1; j++)
+ l_1942[i][j] = &g_1937;
+ }
+ (*g_143) = ((((((void*)0 != l_1936[2]) & (-1L)) , &g_897) != (l_1943 = g_1937)) & (safe_lshift_func_uint16_t_u_s((safe_add_func_int8_t_s_s((*g_132), (0UL <= l_1932))), 4)));
+ }
+ else
+ { /* block id: 920 */
+ int32_t *l_1952 = &l_1612;
+ int32_t l_1960 = 0x13E80650L;
+ uint16_t *l_1968[9] = {&g_1766,&g_251,&g_1766,&g_1766,&g_251,&g_1766,&g_1766,&g_251,&g_1766};
+ int32_t *l_1969 = &g_3;
+ int32_t ***l_2004[4] = {&l_2003,&l_2003,&l_2003,&l_2003};
+ uint32_t *l_2008 = &g_705[2];
+ int i;
+ (*l_1969) ^= ((safe_mul_func_int16_t_s_s((*g_289), (safe_sub_func_uint8_t_u_u(((((*l_1952) = 0x79EFCB11L) , (((0x39L >= ((safe_div_func_int32_t_s_s(((*g_143) = (safe_add_func_int8_t_s_s(l_1957, (g_1857 && (g_251 = (safe_mul_func_uint8_t_u_u((l_1960 | g_1961), ((((safe_mod_func_int32_t_s_s(((safe_lshift_func_uint16_t_u_u(g_1298, l_1960)) == l_1966), l_1967)) && (*g_289)) , (*g_55)) != (*g_55))))))))), l_1960)) && l_1966)) , (***g_1184)) , l_1966)) || (**g_131)), (***g_1548))))) || l_1935[0][6][1]);
+ l_1990 &= (safe_rshift_func_int16_t_s_u((safe_rshift_func_int8_t_s_s((l_1975 = ((g_320 , ((**g_1018) = (**g_1018))) != l_1974)), 7)), ((l_1935[0][3][1] & (safe_add_func_int16_t_s_s((safe_div_func_int16_t_s_s((((((*l_1969) = ((***g_1184) > ((*l_1969) ^ (l_1989 = (safe_add_func_uint8_t_u_u(((safe_unary_minus_func_uint16_t_u(((((((((safe_lshift_func_int8_t_s_u(((safe_rshift_func_uint8_t_u_u(l_1935[0][6][0], l_1902)) > (((g_1766 = ((l_1967 , (*g_143)) & (*g_143))) , &g_1184) != (void*)0)), l_1935[0][3][1])) , l_1966) , 0x5DL) || 0x87L) <= l_1935[0][3][1]) || (*g_1781)) , &l_1692) == &g_1509))) ^ l_1932), 0xE0L)))))) || 251UL) | 0x46L) > l_1967), 0x3894L)), 0UL))) , g_1782[2][3][4])));
+ l_2009[0] = func_105(((*l_2008) |= (safe_mod_func_int8_t_s_s((safe_rshift_func_uint16_t_u_s((g_1766++), ((((**g_1185) || (safe_rshift_func_uint16_t_u_u((((**g_736) = ((((+l_1935[0][3][1]) ^ 0x452888BFL) || ((((+((safe_rshift_func_int16_t_s_u((((l_1763 &= (safe_add_func_uint32_t_u_u((*g_55), ((((((*g_289) = ((*g_143) != ((*l_1969) = (*g_55)))) || 0x3A0FL) , ((((*l_1785) = (*g_960)) != (l_2005 = l_2003)) && l_1989)) , (*l_1969)) < l_1990)))) < 0xC6L) || 0xF854188CL), l_1975)) != l_2006)) <= 6L) , (void*)0) == (void*)0)) , l_2007)) | l_2006), g_251))) || 1L) | 0x7544L))), 4L))));
+ }
+ if (l_1935[0][3][1])
+ continue;
+ }
+ (*g_143) &= 0xCBD7ED2CL;
+ }
+ else
+ { /* block id: 944 */
+ int32_t l_2014 = 0x16460141L;
+ uint8_t l_2033 = 0x2EL;
+ uint16_t *l_2039 = &g_251;
+ int32_t l_2049 = 0L;
+ int16_t l_2053[3];
+ int32_t l_2054 = 0x72FC0805L;
+ int32_t l_2055 = (-4L);
+ int32_t l_2057 = 0x441D13AEL;
+ int32_t l_2059 = 0xB129E460L;
+ uint32_t l_2060[3][6] = {{1UL,1UL,18446744073709551615UL,1UL,1UL,18446744073709551615UL},{1UL,1UL,18446744073709551615UL,1UL,1UL,18446744073709551615UL},{1UL,1UL,18446744073709551615UL,1UL,1UL,18446744073709551615UL}};
+ int i, j;
+ for (i = 0; i < 3; i++)
+ l_2053[i] = (-9L);
+ if (((**l_2005) > ((safe_div_func_uint16_t_u_u(((((**g_736) = (safe_mul_func_int8_t_s_s(0xC9L, l_2014))) & (safe_sub_func_int32_t_s_s((safe_sub_func_uint8_t_u_u((**l_2005), ((safe_mul_func_uint16_t_u_u((((safe_unary_minus_func_int16_t_s(((l_2032 = (l_2014 , (safe_mod_func_int32_t_s_s(0L, (safe_rshift_func_int8_t_s_s(((((((**g_1185) = (l_1658[1][1] == l_2014)) > ((l_2026 = l_2026) == l_2028[1][2][1])) || 1L) < g_1254[4][0][0]) <= g_297[1]), l_2031[3][2])))))) >= 0xFCL))) < (*g_143)) != 65529UL), l_2033)) , l_2014))), 0L))) >= (**l_2005)), (-4L))) || 4L)))
+ { /* block id: 949 */
+ int32_t *l_2036 = (void*)0;
+ for (g_1298 = 3; (g_1298 < 13); g_1298++)
+ { /* block id: 952 */
+ (*g_961) = l_2036;
+ (*g_143) = l_2033;
+ }
+ }
+ else
+ { /* block id: 956 */
+ if ((*g_143))
+ break;
+ }
+ l_2049 ^= ((safe_mod_func_uint16_t_u_u((g_1766 = ((1L ^ (((*l_2039) = ((void*)0 != &g_52)) <= (**g_1185))) , ((((safe_add_func_int16_t_s_s((((((+(safe_mod_func_int32_t_s_s((safe_sub_func_int16_t_s_s(((l_2046 ^ l_2047) >= ((!((l_2048 && (*g_1781)) , (254UL >= 0x4AL))) || 0xC4L)), g_51[0][3][1])), 0xD7857D83L))) , g_419) > g_40[1]) ^ l_2014) | 0x90L), g_1334)) & 0x40A7L) >= 0x889DL) | (**l_2005)))), 0x2C7FL)) != (**g_131));
+ l_2060[2][2]--;
+ l_2059 |= (safe_sub_func_int32_t_s_s(l_2057, (0x662AL ^ (((l_2065[3] = (void*)0) != ((**g_1018) = (**g_1018))) >= ((0x53A4L & ((*l_2039) &= ((&g_736 != (g_2068[0] = g_2068[1])) >= (safe_mul_func_uint8_t_u_u(l_2049, (**g_131)))))) ^ l_2071[1][4][6])))));
+ }
+ }
+ if (((*g_143) = l_2072))
+ { /* block id: 971 */
+ uint8_t l_2089 = 0x87L;
+ int32_t l_2095 = 1L;
+ const uint16_t l_2097 = 0xBF4DL;
+ int32_t l_2102[7][4];
+ int32_t l_2108 = 0x7BAB6EA1L;
+ int8_t l_2128 = 0x3DL;
+ uint32_t *l_2168 = &l_1957;
+ int32_t l_2182 = 0x479FFEDCL;
+ int32_t *l_2190[4];
+ int i, j;
+ for (i = 0; i < 7; i++)
+ {
+ for (j = 0; j < 4; j++)
+ l_2102[i][j] = 0x0A83AFD4L;
+ }
+ for (i = 0; i < 4; i++)
+ l_2190[i] = &g_3;
+ for (l_1692 = 2; (l_1692 >= 0); l_1692 -= 1)
+ { /* block id: 974 */
+ uint32_t l_2085 = 0xB0246361L;
+ int8_t l_2086 = 0xB9L;
+ int32_t l_2094 = (-10L);
+ const uint32_t l_2096[1] = {0xC2A82A10L};
+ uint32_t *l_2098 = &l_2071[1][5][2];
+ int32_t *l_2100 = &l_1634;
+ int32_t *l_2101[4];
+ uint16_t *l_2179 = &g_2148;
+ int i, j;
+ for (i = 0; i < 4; i++)
+ l_2101[i] = &l_2050;
+ if ((l_2102[6][0] |= ((*l_2100) &= (safe_mul_func_int8_t_s_s(((safe_div_func_uint8_t_u_u((g_705[2] , (safe_mod_func_int8_t_s_s((((*l_2098) = (safe_lshift_func_uint8_t_u_u((safe_sub_func_int8_t_s_s((((safe_mul_func_int8_t_s_s((l_2085 < l_2086), (g_1782[3][1][1] >= ((((safe_lshift_func_uint8_t_u_s(l_2089, 2)) == (g_705[2] ^ (((safe_mod_func_int16_t_s_s(((***g_1184) = (((((safe_mod_func_int32_t_s_s(((+(l_2095 = (l_2094 = l_2089))) , ((*g_143) = ((*g_143) > l_2085))), (**g_1238))) < (***g_1184)) == l_2089) || l_2096[0]) , 0x2B74L)), l_2089)) == l_2085) , 0x2251L))) != l_2089) || 65535UL)))) <= l_2089) , (-10L)), l_2089)), l_2097))) , l_2099), 0x69L))), l_2089)) <= (*g_55)), (**g_131))))))
+ { /* block id: 982 */
+ int8_t l_2115 = 1L;
+ int8_t * const *l_2118 = &g_243[5][0][8];
+ int16_t *l_2136 = &l_1658[1][1];
+ int16_t **l_2137 = &l_2136;
+ int32_t l_2146 = 1L;
+ int32_t ***l_2157 = &g_961;
+ int32_t ****l_2167 = &g_960;
+ for (l_1722 = 0; (l_1722 <= 4); l_1722 += 1)
+ { /* block id: 985 */
+ uint16_t *l_2117 = &l_1902;
+ int16_t *l_2127 = &g_347;
+ uint32_t l_2135 = 8UL;
+ int i, j;
+ l_2095 = (l_2102[6][0] = (((safe_unary_minus_func_uint8_t_u(l_1658[l_1722][(l_1692 + 3)])) != (((((*l_2117) &= (l_1658[l_1692][(l_1722 + 1)] >= (safe_mod_func_uint8_t_u_u((((0L < (((void*)0 != (*g_1656)) , (l_2108 > (safe_add_func_int32_t_s_s(((*l_2100) = ((safe_mod_func_uint32_t_u_u(l_2108, ((safe_mul_func_int8_t_s_s(0xACL, (l_2115 , (**g_175)))) & l_2116))) >= 0x6E903ADFL)), l_2115))))) || (**g_131)) ^ 0UL), l_1658[l_1722][(l_1692 + 3)])))) , (void*)0) != l_2118) & (***g_1184))) || 0xFCE3BADFL));
+ (*g_143) = (safe_mod_func_int8_t_s_s(((0xCFL > (safe_rshift_func_uint16_t_u_s((((((*g_1937) == (void*)0) != (*g_143)) && (safe_lshift_func_uint16_t_u_u((((~((*g_289) = (((((safe_lshift_func_uint8_t_u_s(l_2115, 4)) > (-6L)) && ((*l_2127) ^= (*g_289))) , (l_2128 >= (((safe_mod_func_uint16_t_u_u((safe_sub_func_uint8_t_u_u((((*l_2100) = ((safe_add_func_uint8_t_u_u(l_1658[l_1722][(l_1692 + 3)], l_2102[2][1])) ^ l_2135)) < l_2102[0][3]), (**g_175))), l_1658[l_1692][(l_1722 + 1)])) & 3L) , 1L))) >= 1UL))) & l_2108) > 1L), 6))) ^ 0xA1E6L), 14))) <= (*g_132)), (-6L)));
+ }
+ (*l_2100) &= (((*l_2137) = l_2136) == (void*)0);
+ l_2050 &= ((safe_mod_func_int8_t_s_s((l_1634 = (*g_132)), (safe_mod_func_int16_t_s_s((((*g_143) = (*g_143)) > (g_1857 < (l_2058 && (g_2148 |= (((((((void*)0 != &l_2086) == ((***g_735) = (((+(((l_2146 ^= (~(((safe_div_func_int32_t_s_s(0xBFC11C93L, (safe_mod_func_uint32_t_u_u(l_2095, (((*g_289) < 4L) , (*g_1781)))))) ^ 0x95679D65L) >= 0xA1895B12L))) >= (**g_131)) && 4294967293UL)) >= (**g_131)) , g_2147[7]))) , l_2146) <= l_2102[6][0]) , 0xB3BFL) == (-1L)))))), g_705[2])))) == 0x3157L);
+ if ((*g_143))
+ { /* block id: 1003 */
+ int32_t ****l_2158 = (void*)0;
+ int32_t ****l_2159 = &l_2157;
+ uint16_t *l_2160 = &l_1902;
+ l_2102[6][0] = (((safe_rshift_func_int16_t_s_u((0L ^ (safe_rshift_func_int8_t_s_s((((*l_2160) = (safe_div_func_int32_t_s_s((safe_mod_func_uint16_t_u_u((((*l_2159) = l_2157) == (void*)0), g_1333)), (*l_2100)))) > ((safe_add_func_int32_t_s_s(0x43A31542L, (safe_rshift_func_uint8_t_u_s((((*l_2136) = ((*g_289) = 0x48A9L)) <= l_2146), (((((((**g_736)--) , &g_960) == l_2167) & l_2089) <= (*g_1781)) < (**g_131)))))) < (*g_143))), 5))), 5)) ^ 0xDFCAL) & 65532UL);
+ (**g_960) = (***l_2167);
+ }
+ else
+ { /* block id: 1011 */
+ int32_t l_2169 = 0xB5AD6469L;
+ (**g_960) = func_22((*g_289), (*g_1781), l_2168);
+ (*g_143) = l_2169;
+ }
+ }
+ else
+ { /* block id: 1015 */
+ int32_t **l_2170[5];
+ int i;
+ for (i = 0; i < 5; i++)
+ l_2170[i] = &l_1797;
+ l_2100 = ((**l_1785) = (**g_960));
+ }
+ (**g_960) = func_22((safe_div_func_uint16_t_u_u(((((safe_add_func_uint16_t_u_u((l_1692 , g_34), (safe_add_func_uint8_t_u_u(l_2095, 250UL)))) ^ (*g_132)) & ((safe_mod_func_uint32_t_u_u((5UL < (((*l_2179) = ((void*)0 == (**g_1656))) && (safe_mul_func_int16_t_s_s((((l_2182 > 1UL) <= (*g_143)) != (*g_289)), 1UL)))), 0x328F77E6L)) , 1L)) | 1L), g_140)), (***g_735), &l_2048);
+ for (l_2099 = 0; (l_2099 <= 2); l_2099 += 1)
+ { /* block id: 1023 */
+ int32_t l_2183 = 0x7A6C031CL;
+ ++l_2184;
+ l_2102[2][3] = ((*g_143) = (l_2187[0] == &g_1184));
+ }
+ return g_1099;
+ }
+ l_2191++;
+ }
+ else
+ { /* block id: 1031 */
+ return l_2194;
+ }
+ g_2207 |= ((*g_143) = (safe_sub_func_int32_t_s_s(l_2056, (safe_div_func_uint8_t_u_u(((((!(*g_289)) , ((safe_sub_func_int8_t_s_s(((((*l_2201) = &g_904[2][1]) != &g_1547[0][5][0]) & 0x784FL), (safe_sub_func_uint16_t_u_u((l_2205 == (void*)0), g_1132)))) || (0L > (-1L)))) , &g_1019[4][0][0]) != &g_1019[5][0][0]), l_1612)))));
+ if (l_2050)
+ goto lbl_2208;
+ }
+ return l_1658[1][1];
+}
+
+
+/* ------------------------------------------ */
+/*
+ * reads : g_290 g_143 g_905 g_1298
+ * writes: g_290 g_140 g_175 g_1298
+ */
+static int8_t func_10(uint32_t p_11)
+{ /* block id: 756 */
+ uint32_t l_1605 = 3UL;
+ uint8_t **l_1608[3][5] = {{&g_43,&g_43,&g_43,&g_43,&g_43},{&g_43,&g_43,&g_43,&g_43,&g_43},{&g_43,&g_43,&g_43,&g_43,&g_43}};
+ int i, j;
+ for (g_290 = 0; (g_290 >= 1); g_290++)
+ { /* block id: 759 */
+ int32_t l_1603 = (-1L);
+ int32_t *l_1604[10];
+ int i;
+ for (i = 0; i < 10; i++)
+ l_1604[i] = &g_297[1];
+ (*g_143) = (safe_mod_func_int32_t_s_s(l_1603, p_11));
+ l_1605++;
+ if (p_11)
+ break;
+ }
+ (*g_905) = l_1608[2][0];
+ for (g_1298 = (-1); (g_1298 == 37); g_1298 = safe_add_func_uint16_t_u_u(g_1298, 9))
+ { /* block id: 767 */
+ return l_1605;
+ }
+ return l_1605;
+}
+
+
+/* ------------------------------------------ */
+/*
+ * reads : g_52 g_43 g_44 g_51 g_251 g_143 g_140 g_176 g_705 g_289 g_290 g_297 g_255 g_55 g_56 g_36 g_34 g_131 g_132 g_243 g_347 g_320 g_736 g_294 g_175 g_897 g_905 g_735 g_960 g_969 g_961 g_312 g_1334 g_1132 g_1184 g_1185 g_1099 g_1298 g_40
+ * writes: g_46 g_36 g_255 g_297 g_140 g_312 g_294 g_51 g_34 g_56 g_44 g_347 g_290 g_897 g_904 g_419 g_251 g_969 g_1334 g_1132 g_1298 g_175
+ */
+static int32_t func_16(int8_t p_17, uint32_t * p_18, uint32_t * p_19, uint16_t p_20, uint32_t p_21)
+{ /* block id: 16 */
+ uint32_t l_57 = 0xB31DF952L;
+ uint32_t *l_58 = &g_56;
+ int32_t * const l_59[10] = {&g_51[1][4][2],&g_51[1][4][2],&g_51[1][4][2],&g_51[1][4][2],&g_51[1][4][2],&g_51[1][4][2],&g_51[1][4][2],&g_51[1][4][2],&g_51[1][4][2],&g_51[1][4][2]};
+ uint32_t l_74[2][9] = {{0x548DC091L,0x548DC091L,0x548DC091L,0x548DC091L,0x548DC091L,0x548DC091L,0x548DC091L,0x548DC091L,0x548DC091L},{0UL,0x253094EEL,0UL,0x253094EEL,0UL,0x253094EEL,0UL,0x253094EEL,0UL}};
+ uint8_t *l_1340[8][7] = {{&g_40[1],&g_40[5],&g_1298,&g_1298,&g_40[5],&g_40[1],&g_40[1]},{&g_40[5],&g_40[1],(void*)0,&g_1298,&g_1298,(void*)0,&g_40[1]},{&g_40[5],&g_40[1],&g_40[1],&g_40[5],&g_1298,&g_1298,&g_40[5]},{&g_40[1],&g_40[1],&g_40[1],&g_1298,&g_40[1],&g_40[1],&g_40[1]},{&g_40[1],&g_40[5],(void*)0,&g_40[5],&g_40[1],(void*)0,&g_1298},{&g_1298,&g_40[1],&g_1298,&g_1298,&g_1298,&g_40[1],&g_1298},{&g_40[1],&g_1298,&g_40[1],&g_1298,&g_1298,&g_1298,&g_40[1]},{&g_1298,&g_40[1],&g_1298,&g_40[1],&g_1298,&g_1298,&g_1298}};
+ uint8_t *l_1341 = (void*)0;
+ uint8_t l_1385 = 0UL;
+ const int8_t *l_1399 = &g_255;
+ const int8_t ** const l_1398 = &l_1399;
+ const int8_t ** const *l_1397 = &l_1398;
+ int16_t **l_1400 = &g_289;
+ int8_t l_1404 = 0xDEL;
+ int16_t l_1460 = 0x14BCL;
+ uint8_t ** const *l_1553 = &g_175;
+ int32_t *l_1557[2];
+ const uint32_t *l_1564[2];
+ const uint32_t **l_1563[9][8][3] = {{{&l_1564[1],&l_1564[1],&l_1564[1]},{&l_1564[0],(void*)0,(void*)0},{&l_1564[1],&l_1564[0],&l_1564[1]},{(void*)0,&l_1564[1],&l_1564[1]},{&l_1564[0],&l_1564[1],(void*)0},{(void*)0,&l_1564[1],&l_1564[1]},{&l_1564[1],&l_1564[1],&l_1564[1]},{&l_1564[1],&l_1564[1],&l_1564[1]}},{{(void*)0,&l_1564[0],&l_1564[1]},{&l_1564[1],(void*)0,&l_1564[1]},{&l_1564[0],&l_1564[1],&l_1564[1]},{&l_1564[1],&l_1564[0],&l_1564[1]},{&l_1564[1],&l_1564[1],(void*)0},{&l_1564[0],&l_1564[1],&l_1564[1]},{&l_1564[0],&l_1564[1],&l_1564[0]},{&l_1564[0],&l_1564[1],&l_1564[1]}},{{&l_1564[0],&l_1564[1],&l_1564[0]},{&l_1564[0],&l_1564[1],&l_1564[1]},{&l_1564[1],&l_1564[1],&l_1564[1]},{&l_1564[1],&l_1564[1],&l_1564[1]},{&l_1564[0],&l_1564[0],&l_1564[1]},{&l_1564[1],&l_1564[1],&l_1564[1]},{(void*)0,&l_1564[1],&l_1564[0]},{&l_1564[1],&l_1564[1],&l_1564[0]}},{{&l_1564[1],&l_1564[0],&l_1564[0]},{(void*)0,&l_1564[1],&l_1564[0]},{&l_1564[0],&l_1564[1],&l_1564[0]},{(void*)0,&l_1564[1],&l_1564[1]},{&l_1564[1],(void*)0,&l_1564[1]},{&l_1564[0],(void*)0,&l_1564[1]},{&l_1564[1],&l_1564[1],&l_1564[1]},{&l_1564[1],&l_1564[1],&l_1564[1]}},{{&l_1564[1],&l_1564[1],&l_1564[0]},{&l_1564[1],(void*)0,&l_1564[1]},{&l_1564[1],&l_1564[1],&l_1564[0]},{&l_1564[1],(void*)0,&l_1564[1]},{&l_1564[1],&l_1564[1],(void*)0},{&l_1564[1],&l_1564[1],&l_1564[1]},{&l_1564[1],&l_1564[1],&l_1564[1]},{&l_1564[1],(void*)0,&l_1564[1]}},{{&l_1564[1],(void*)0,&l_1564[1]},{&l_1564[0],&l_1564[1],&l_1564[1]},{(void*)0,&l_1564[1],&l_1564[1]},{&l_1564[1],&l_1564[1],&l_1564[1]},{&l_1564[1],&l_1564[0],(void*)0},{&l_1564[1],&l_1564[1],&l_1564[1]},{(void*)0,&l_1564[1],&l_1564[1]},{&l_1564[0],&l_1564[1],(void*)0}},{{&l_1564[1],&l_1564[0],&l_1564[1]},{&l_1564[1],&l_1564[1],(void*)0},{&l_1564[1],&l_1564[1],&l_1564[0]},{&l_1564[1],&l_1564[1],&l_1564[1]},{&l_1564[1],&l_1564[1],&l_1564[1]},{&l_1564[1],&l_1564[1],&l_1564[1]},{&l_1564[1],&l_1564[1],&l_1564[1]},{&l_1564[1],&l_1564[1],&l_1564[1]}},{{&l_1564[1],&l_1564[1],&l_1564[0]},{&l_1564[1],&l_1564[0],(void*)0},{&l_1564[1],&l_1564[1],&l_1564[1]},{&l_1564[0],(void*)0,(void*)0},{&l_1564[1],&l_1564[0],&l_1564[1]},{(void*)0,&l_1564[1],&l_1564[0]},{&l_1564[1],&l_1564[1],&l_1564[1]},{(void*)0,&l_1564[1],&l_1564[0]}},{{&l_1564[1],&l_1564[1],&l_1564[0]},{&l_1564[1],&l_1564[1],&l_1564[1]},{(void*)0,&l_1564[1],&l_1564[1]},{&l_1564[1],&l_1564[1],&l_1564[0]},{(void*)0,&l_1564[1],&l_1564[1]},{&l_1564[1],&l_1564[1],&l_1564[1]},{(void*)0,&l_1564[0],(void*)0},{(void*)0,(void*)0,&l_1564[1]}}};
+ const uint32_t ***l_1562 = &l_1563[2][1][2];
+ const uint32_t ****l_1561 = &l_1562;
+ int32_t l_1574 = (-3L);
+ int32_t l_1577 = (-2L);
+ const uint8_t *l_1594 = &g_320;
+ const uint8_t **l_1593 = &l_1594;
+ int i, j, k;
+ for (i = 0; i < 2; i++)
+ l_1557[i] = &g_1132;
+ for (i = 0; i < 2; i++)
+ l_1564[i] = (void*)0;
+ if (((*g_143) = ((((((*p_18) = l_57) > ((l_58 = &l_57) != ((((l_59[2] != ((safe_rshift_func_int8_t_s_s(g_52, (((void*)0 == p_19) , ((*g_43) , (func_62(func_65((((l_1340[5][0] = func_71(l_74[0][4], p_20)) != l_1341) >= (-1L)), p_17, p_17, p_18, p_19), p_20) & l_1385))))) , (void*)0)) , 5L) == p_21) , (void*)0))) , 1L) | p_21) < p_17)))
+ { /* block id: 667 */
+ int16_t l_1396[4];
+ int32_t l_1421 = 7L;
+ int32_t l_1462 = 0x12662E75L;
+ int32_t l_1465 = 0x863BF099L;
+ int32_t l_1467 = 0L;
+ int32_t l_1470 = 2L;
+ int32_t l_1477 = 0x4CD2A26BL;
+ int32_t l_1490[10][2][5] = {{{0L,1L,8L,0x286E9DC0L,0x5DE9A0F1L},{0L,0x8BAB543FL,0x040A2369L,0x8BAB543FL,0L}},{{0x5DE9A0F1L,0x286E9DC0L,8L,1L,0L},{0L,0xF9205F80L,0x3F2E14FAL,0x8BAB543FL,(-1L)}},{{0L,0x286E9DC0L,(-4L),0x286E9DC0L,0L},{(-1L),0x8BAB543FL,0x3F2E14FAL,0xF9205F80L,0L}},{{0L,1L,8L,0x286E9DC0L,0x5DE9A0F1L},{0L,0x8BAB543FL,0x040A2369L,0x8BAB543FL,0L}},{{0x5DE9A0F1L,0x286E9DC0L,8L,1L,0L},{0L,0xF9205F80L,0x3F2E14FAL,0x8BAB543FL,(-1L)}},{{0L,0x286E9DC0L,(-4L),0x286E9DC0L,0L},{(-1L),0x8BAB543FL,0x3F2E14FAL,0xF9205F80L,0L}},{{0L,1L,8L,0x286E9DC0L,0x5DE9A0F1L},{0L,0x8BAB543FL,0x040A2369L,0x8BAB543FL,0L}},{{0x5DE9A0F1L,0x286E9DC0L,8L,1L,0L},{0L,0xF9205F80L,0x3F2E14FAL,0x8BAB543FL,(-1L)}},{{0L,0x286E9DC0L,(-4L),0x286E9DC0L,0L},{(-1L),0x8BAB543FL,0x3F2E14FAL,0xF9205F80L,0L}},{{0L,1L,8L,0x286E9DC0L,0x5DE9A0F1L},{0L,0x8BAB543FL,0x040A2369L,0x8BAB543FL,0L}}};
+ uint8_t l_1499 = 0xACL;
+ const int32_t l_1539[1][3] = {{0L,0L,0L}};
+ uint32_t ****l_1575 = &g_1237[6][2][0];
+ int32_t **l_1579 = (void*)0;
+ int i, j, k;
+ for (i = 0; i < 4; i++)
+ l_1396[i] = (-1L);
+ for (g_1298 = 1; (g_1298 <= 5); g_1298 += 1)
+ { /* block id: 670 */
+ int16_t **l_1401 = (void*)0;
+ uint16_t *l_1402 = &g_969;
+ int32_t l_1403 = (-1L);
+ uint32_t ***l_1405 = &g_1238;
+ uint32_t **l_1406 = &g_55;
+ uint32_t *l_1422[9];
+ uint16_t l_1431 = 3UL;
+ int32_t l_1432 = 0xD4EEA904L;
+ int16_t ***l_1449 = &l_1401;
+ int32_t l_1464 = (-8L);
+ int32_t l_1468 = (-7L);
+ int32_t l_1469[8][4] = {{0x419228AFL,0xBFCFCC48L,0x419228AFL,2L},{0x3A8515F3L,0xBFCFCC48L,0x213DF6CAL,0xBFCFCC48L},{0x3A8515F3L,2L,0x419228AFL,0xBFCFCC48L},{0x419228AFL,0xBFCFCC48L,0x419228AFL,2L},{0x3A8515F3L,0xBFCFCC48L,0x213DF6CAL,0xBFCFCC48L},{0x3A8515F3L,2L,0x419228AFL,0xBFCFCC48L},{0x419228AFL,0xBFCFCC48L,0x419228AFL,2L},{0x3A8515F3L,0xBFCFCC48L,0x213DF6CAL,0xBFCFCC48L}};
+ int8_t l_1493 = 0L;
+ int32_t **l_1532 = &g_312[0][0][4];
+ int i, j;
+ for (i = 0; i < 9; i++)
+ l_1422[i] = &g_1099;
+ }
+ }
+ else
+ { /* block id: 747 */
+ int16_t l_1580 = (-1L);
+ const uint8_t ***l_1595 = &l_1593;
+ uint8_t *l_1598[2];
+ int i;
+ for (i = 0; i < 2; i++)
+ l_1598[i] = &g_1298;
+ (*g_143) = l_1580;
+ l_1557[1] = ((safe_lshift_func_int8_t_s_s((!(safe_rshift_func_uint8_t_u_s((l_1580 & (((safe_lshift_func_int16_t_s_u((safe_mod_func_uint8_t_u_u((safe_sub_func_uint16_t_u_u((((g_40[1] != g_34) , ((*l_1595) = l_1593)) == ((*g_905) = &l_1340[5][4])), (safe_sub_func_int32_t_s_s((((void*)0 != l_1598[0]) , ((*g_143) |= p_20)), (((l_1580 ^ l_1580) && p_21) , p_20))))), p_17)), p_20)) && p_17) < p_21)), l_1580))), l_1580)) , (*g_961));
+ return l_1580;
+ }
+ return p_21;
+}
+
+
+/* ------------------------------------------ */
+/*
+ * reads : g_52 g_46 g_51
+ * writes: g_52 g_51 g_36 g_40
+ */
+static uint32_t * func_22(int16_t p_23, uint32_t p_24, uint32_t * p_25)
+{ /* block id: 10 */
+ int32_t *l_45 = &g_46;
+ int32_t *l_47 = (void*)0;
+ int32_t *l_48 = &g_46;
+ int32_t *l_49 = &g_46;
+ int32_t *l_50[1];
+ int i;
+ for (i = 0; i < 1; i++)
+ l_50[i] = &g_46;
+ --g_52;
+ g_51[0][3][1] &= (*l_48);
+ for (g_52 = 0; g_52 < 2; g_52 += 1)
+ {
+ for (g_36 = 0; g_36 < 8; g_36 += 1)
+ {
+ for (p_24 = 0; p_24 < 3; p_24 += 1)
+ {
+ g_51[g_52][g_36][p_24] = 0x6F67A21EL;
+ }
+ }
+ }
+ for (p_24 = 0; p_24 < 7; p_24 += 1)
+ {
+ g_40[p_24] = 248UL;
+ }
+ return l_50[0];
+}
+
+
+/* ------------------------------------------ */
+/*
+ * reads : g_143 g_140
+ * writes: g_140
+ */
+static int32_t func_62(int32_t * p_63, uint8_t p_64)
+{ /* block id: 663 */
+ uint32_t l_1384 = 4294967295UL;
+ (*g_143) &= l_1384;
+ return (*g_143);
+}
+
+
+/* ------------------------------------------ */
+/*
+ * reads : g_143 g_140 g_1132 g_735 g_736 g_55 g_289 g_290 g_56 g_176 g_43 g_1184 g_1185 g_1099 g_44 g_297 g_36 g_51 g_705 g_34 g_131 g_132 g_243 g_347 g_320 g_294 g_175 g_255 g_897 g_905 g_251 g_960 g_969 g_961 g_312 g_1334
+ * writes: g_1132 g_44 g_36 g_140 g_312 g_51 g_34 g_56 g_297 g_347 g_290 g_255 g_897 g_904 g_294 g_419 g_251 g_969 g_1334
+ */
+static int32_t * func_65(int8_t p_66, uint16_t p_67, uint8_t p_68, int32_t * p_69, uint32_t * p_70)
+{ /* block id: 647 */
+ int32_t *l_1342 = &g_1132;
+ int8_t *l_1361 = &g_36;
+ uint16_t *l_1362[3][5][2] = {{{&g_969,&g_969},{&g_969,&g_969},{&g_969,&g_969},{&g_969,&g_969},{&g_969,&g_969}},{{&g_969,&g_969},{&g_969,&g_969},{&g_969,&g_969},{&g_969,&g_969},{&g_969,&g_969}},{{&g_969,&g_969},{&g_969,&g_969},{&g_969,(void*)0},{&g_969,&g_969},{&g_251,&g_251}}};
+ int32_t l_1363[2];
+ uint32_t *l_1375[6][5] = {{(void*)0,&g_477,&g_1099,&g_1099,&g_477},{(void*)0,&g_294[0],&g_1099,&g_477,&g_1334},{&g_294[0],&g_1099,&g_1099,(void*)0,&g_1099},{&g_1334,&g_1334,&g_1099,(void*)0,(void*)0},{&g_294[0],(void*)0,(void*)0,(void*)0,(void*)0},{(void*)0,&g_294[2],(void*)0,(void*)0,&g_1334}};
+ int32_t l_1376 = 1L;
+ uint32_t l_1379 = 0xCFCA353CL;
+ const uint32_t **l_1382 = (void*)0;
+ const uint32_t ***l_1381 = &l_1382;
+ const uint32_t ****l_1380[2][1][7] = {{{(void*)0,&l_1381,&l_1381,&l_1381,(void*)0,&l_1381,&l_1381}},{{(void*)0,&l_1381,&l_1381,&l_1381,(void*)0,&l_1381,&l_1381}}};
+ const uint32_t ***l_1383 = &l_1382;
+ int i, j, k;
+ for (i = 0; i < 2; i++)
+ l_1363[i] = 0xABF6ADA9L;
+ (*l_1342) ^= (*g_143);
+ if (g_140)
+ goto lbl_1364;
+ p_69 = func_94((**g_735), (*l_1342), (((((((safe_div_func_int32_t_s_s((safe_mul_func_uint16_t_u_u((safe_rshift_func_int16_t_s_u(p_66, (0xC741L && (((safe_div_func_int8_t_s_s((((safe_mul_func_uint8_t_u_u(0xD3L, (safe_rshift_func_int16_t_s_s((safe_add_func_uint16_t_u_u(((0L > (*g_289)) & (((l_1363[0] = ((p_68 = (safe_mul_func_uint8_t_u_u((((*l_1361) = ((((**g_176) = (safe_mod_func_int16_t_s_s(((((***g_735) , 0x0EL) >= (*l_1342)) || (*g_289)), p_68))) <= 0x01L) < (*l_1342))) , (*l_1342)), p_68))) != 0xDAL)) != p_66) == (*l_1342))), (***g_1184))), 10)))) & 0xF1L) != 249UL), (*l_1342))) != (***g_1184)) > 0x40L)))), (*l_1342))), (*p_70))) , (void*)0) == l_1361) <= g_1099) < (*l_1342)) < (*l_1342)) , (*g_143)), (*l_1342), (*l_1342));
+lbl_1364:
+ (*g_143) = (+(*l_1342));
+ (*g_143) = (1UL == (((safe_rshift_func_int8_t_s_u((safe_lshift_func_int8_t_s_s(((void*)0 != (*g_905)), (3UL != ((safe_rshift_func_int8_t_s_s(((l_1383 = ((((safe_div_func_uint32_t_u_u((p_66 <= (*l_1342)), (l_1376 = (++(*p_70))))) == g_251) && (g_34 <= (p_67 = (((*l_1342) = (safe_sub_func_int16_t_s_s((((((*l_1342) || (-1L)) != (*l_1342)) == l_1379) <= p_67), 0xD1CDL))) & l_1376)))) , (void*)0)) != (void*)0), 0)) != p_68)))), p_66)) ^ 65535UL) || 1UL));
+ return p_69;
+}
+
+
+/* ------------------------------------------ */
+/*
+ * reads : g_51 g_44 g_251 g_143 g_140 g_176 g_43 g_705 g_289 g_290 g_297 g_255 g_55 g_56 g_36 g_34 g_131 g_132 g_243 g_347 g_320 g_736 g_294 g_175 g_897 g_905 g_735 g_960 g_969 g_961 g_312 g_1334
+ * writes: g_36 g_255 g_297 g_140 g_312 g_294 g_51 g_34 g_56 g_44 g_347 g_290 g_897 g_904 g_419 g_251 g_969 g_1334
+ */
+static uint8_t * func_71(uint32_t p_72, int8_t p_73)
+{ /* block id: 19 */
+ int32_t *l_75 = &g_51[0][3][1];
+ int32_t *l_76 = &g_51[0][2][2];
+ int32_t *l_77 = &g_51[0][7][1];
+ int32_t *l_78 = &g_51[0][3][1];
+ int32_t *l_79 = &g_51[0][5][2];
+ int32_t *l_80 = &g_51[0][0][0];
+ int32_t *l_81 = &g_51[1][3][1];
+ int32_t *l_82 = &g_51[1][0][1];
+ int32_t *l_83 = &g_51[0][3][1];
+ int32_t *l_84 = (void*)0;
+ int32_t l_85[9][2][7] = {{{(-4L),(-7L),0x7DDA0CFDL,(-8L),0x77CB2DEBL,0x5D6CB7F0L,0L},{0x9A3785E6L,0x69DBBC94L,(-10L),0x74D9FAD1L,(-10L),0x69DBBC94L,0x9A3785E6L}},{{0x5D6CB7F0L,0x6F9888A1L,1L,0x139E91ECL,0xC7048B0AL,0xFEAE78DFL,0x4ABCDCAFL},{(-10L),(-8L),(-1L),3L,0x74D9FAD1L,4L,0x204C5B33L}},{{0x7DDA0CFDL,4L,1L,7L,0x6F9888A1L,7L,1L},{0xB031E64CL,0xB031E64CL,(-10L),1L,0x2DE0ECACL,0x40782372L,0x501D8DD5L}},{{0x6F9888A1L,0x24FAE1B8L,0x7DDA0CFDL,1L,0x4ABCDCAFL,4L,(-7L)},{(-1L),0xEF1A95A0L,0x40782372L,0x53E6AFD1L,0x2DE0ECACL,1L,0x2DE0ECACL}},{{0L,0x4ABCDCAFL,0x4ABCDCAFL,0L,0x6F9888A1L,(-1L),0xE2E886BEL},{0x53E6AFD1L,0x40782372L,0xEF1A95A0L,(-1L),0x74D9FAD1L,0x204C5B33L,1L}},{{1L,0x7DDA0CFDL,0x24FAE1B8L,0x6F9888A1L,0xC7048B0AL,(-4L),0xE2E886BEL},{1L,(-10L),0xB031E64CL,0xB031E64CL,(-10L),1L,0x2DE0ECACL}},{{7L,1L,4L,0x7DDA0CFDL,0x77CB2DEBL,(-1L),(-7L)},{3L,(-1L),(-8L),(-10L),0x53E6AFD1L,0x9A3785E6L,0x501D8DD5L}},{{0x139E91ECL,1L,0x6F9888A1L,0x5D6CB7F0L,0x5D6CB7F0L,0x6F9888A1L,1L},{0x74D9FAD1L,(-10L),0x69DBBC94L,0x9A3785E6L,0x75422B1FL,(-1L),0x204C5B33L}},{{(-8L),0x7DDA0CFDL,(-7L),(-4L),(-1L),0xA96CD894L,0x4ABCDCAFL},{0x69DBBC94L,0x40782372L,0x204C5B33L,0x9A3785E6L,(-8L),(-8L),0x9A3785E6L}}};
+ int32_t *l_86 = &l_85[0][1][0];
+ int32_t *l_87 = (void*)0;
+ int32_t *l_88 = &l_85[1][1][4];
+ int32_t *l_89 = &g_51[0][3][1];
+ int32_t *l_90[3][9] = {{(void*)0,(void*)0,&g_51[0][5][2],(void*)0,(void*)0,&g_51[0][5][2],(void*)0,(void*)0,&g_51[0][5][2]},{&g_3,&g_3,(void*)0,&g_3,&g_3,(void*)0,&g_51[0][3][1],&g_51[0][3][1],&g_3},{(void*)0,(void*)0,(void*)0,(void*)0,(void*)0,(void*)0,(void*)0,(void*)0,(void*)0}};
+ uint8_t l_91[9][7][4] = {{{0x14L,253UL,255UL,0x88L},{0x51L,0x35L,0x0BL,254UL},{0xC0L,255UL,1UL,0x5BL},{253UL,0x8DL,0x88L,0x2BL},{0xD1L,0x2CL,0UL,0x01L},{0x9AL,0xD1L,0x35L,0x80L},{0x16L,0x3AL,0x9AL,0x39L}},{{6UL,1UL,0xF3L,0UL},{0x51L,1UL,0x4FL,1UL},{1UL,0x01L,0x50L,0xE4L},{0x30L,0x9AL,1UL,0UL},{0x93L,0x2CL,0x2CL,0x93L},{255UL,1UL,0xA9L,255UL},{4UL,2UL,0x4CL,0x88L}},{{0x5BL,254UL,0xF3L,0x88L},{0UL,2UL,1UL,255UL},{0xDFL,1UL,0x24L,0x93L},{0x23L,0x2CL,0x41L,0UL},{0xD1L,0x9AL,4UL,0xE4L},{0x16L,0x01L,0x23L,1UL},{0x2CL,1UL,248UL,0UL}},{{0x5BL,1UL,255UL,0x39L},{1UL,0x3AL,0x50L,0x80L},{0x80L,0xD1L,0x16L,0x01L},{0x5EL,0x2CL,1UL,0x2BL},{0xE4L,0x8DL,0xF0L,0x5BL},{4UL,255UL,0x51L,254UL},{0x4CL,0x35L,248UL,0x88L}},{{6UL,253UL,0UL,255UL},{253UL,0xF9L,0x24L,0x4DL},{248UL,6UL,0UL,0x01L},{0x23L,0x9AL,0x88L,5UL},{4UL,0UL,0x9AL,1UL},{0x2CL,0x14L,0xEBL,248UL},{0x4CL,1UL,0x4CL,0x39L}},{{0x14L,0xFDL,254UL,251UL},{0x30L,0x23L,0x16L,0xFDL},{0x4DL,6UL,0x16L,0x93L},{0x30L,0x8DL,254UL,0x4FL},{0x14L,0x30L,0x4CL,0xB0L},{0x4CL,0xB0L,0xEBL,254UL},{0x2CL,2UL,0x9AL,255UL}},{{4UL,1UL,0x88L,0x16L},{0x23L,0UL,0UL,0xFDL},{248UL,0xD1L,0x24L,0x8DL},{0xA2L,0xC0L,0x24L,2UL},{0x6AL,0x80L,0xDFL,4UL},{0xFDL,255UL,0x2CL,253UL},{0x80L,0xD2L,255UL,0UL}},{{0x8DL,0x88L,0x2BL,0x16L},{0xA5L,0xF0L,0x5EL,0UL},{0x39L,0x30L,0xEBL,0UL},{0x04L,1UL,0UL,1UL},{0UL,1UL,0xDFL,4UL},{0x4DL,0xF0L,1UL,0x41L},{255UL,1UL,1UL,1UL}},{{4UL,0x16L,0x16L,0x16L},{1UL,1UL,1UL,0x39L},{255UL,0x2CL,0x35L,0x30L},{0xF0L,0x80L,250UL,0x35L},{0UL,0x80L,0xFDL,0x30L},{0x80L,0x2CL,1UL,0x39L},{1UL,1UL,0x4DL,0x16L}}};
+ uint32_t *l_115[8] = {&g_56,&g_56,&g_56,&g_56,&g_56,&g_56,&g_56,&g_56};
+ int8_t *l_118 = &g_36;
+ int8_t **l_119 = &l_118;
+ int8_t *l_121 = &g_36;
+ int8_t **l_120 = &l_121;
+ int8_t **l_122 = (void*)0;
+ int8_t *l_124 = &g_36;
+ int8_t **l_123 = &l_124;
+ int8_t *l_126 = &g_36;
+ int8_t **l_125 = &l_126;
+ int8_t *l_127[7][8][4] = {{{&g_36,&g_36,&g_36,&g_36},{(void*)0,&g_36,&g_36,&g_36},{(void*)0,(void*)0,&g_36,&g_36},{(void*)0,(void*)0,(void*)0,(void*)0},{&g_36,&g_36,&g_36,(void*)0},{(void*)0,&g_36,&g_36,(void*)0},{&g_36,&g_36,&g_36,&g_36},{&g_36,&g_36,&g_36,(void*)0}},{{(void*)0,&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,&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,(void*)0,&g_36,&g_36}},{{&g_36,&g_36,&g_36,&g_36},{&g_36,(void*)0,&g_36,&g_36},{&g_36,&g_36,&g_36,(void*)0},{&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,&g_36,&g_36,(void*)0},{&g_36,&g_36,&g_36,&g_36}},{{&g_36,(void*)0,&g_36,(void*)0},{&g_36,&g_36,&g_36,&g_36},{&g_36,(void*)0,&g_36,&g_36},{(void*)0,(void*)0,&g_36,&g_36},{&g_36,&g_36,(void*)0,&g_36},{&g_36,(void*)0,&g_36,&g_36},{&g_36,(void*)0,&g_36,&g_36},{&g_36,&g_36,(void*)0,&g_36}},{{(void*)0,&g_36,&g_36,&g_36},{&g_36,(void*)0,&g_36,&g_36},{&g_36,&g_36,&g_36,&g_36},{(void*)0,&g_36,(void*)0,&g_36},{&g_36,&g_36,&g_36,&g_36},{&g_36,(void*)0,(void*)0,&g_36},{&g_36,(void*)0,(void*)0,(void*)0},{&g_36,&g_36,&g_36,&g_36}},{{&g_36,&g_36,&g_36,&g_36},{(void*)0,&g_36,(void*)0,(void*)0},{&g_36,(void*)0,&g_36,&g_36},{(void*)0,(void*)0,(void*)0,&g_36},{&g_36,&g_36,&g_36,&g_36},{(void*)0,&g_36,(void*)0,&g_36},{(void*)0,&g_36,&g_36,&g_36},{&g_36,(void*)0,(void*)0,&g_36}},{{&g_36,&g_36,(void*)0,&g_36},{&g_36,&g_36,&g_36,&g_36},{(void*)0,(void*)0,&g_36,&g_36},{&g_36,(void*)0,&g_36,&g_36},{&g_36,&g_36,&g_36,&g_36},{&g_36,(void*)0,&g_36,&g_36},{&g_36,&g_36,&g_36,(void*)0},{&g_36,&g_36,&g_36,&g_36}}};
+ int8_t *l_129 = &g_36;
+ int8_t **l_128 = &l_129;
+ int8_t *l_130[4][2] = {{(void*)0,(void*)0},{(void*)0,(void*)0},{(void*)0,(void*)0},{(void*)0,(void*)0}};
+ int32_t l_690 = (-1L);
+ int i, j, k;
+ ++l_91[2][2][0];
+ (*g_961) = func_94(&g_56, ((g_51[1][1][2] >= func_100(func_105(((g_44 ^ ((g_44 , (safe_sub_func_int8_t_s_s((g_36 = (safe_add_func_uint8_t_u_u((safe_sub_func_int8_t_s_s(((*l_86) |= (((~(&g_56 != l_115[6])) , (((((safe_rshift_func_uint16_t_u_u(1UL, 14)) < ((((l_127[6][3][0] = ((*l_125) = ((*l_123) = ((*l_120) = ((*l_119) = l_118))))) == ((*l_128) = &p_73)) ^ 255UL) == p_73)) == 0xCAL) && 8L) ^ 0x2359L)) , p_72)), p_72)), g_51[1][2][0]))), 0xA4L))) == 6UL)) < 0xD5L)), l_690, (*l_79), g_251)) <= 255UL), p_72, (*l_77), p_73);
+ return (**g_905);
+}
+
+
+/* ------------------------------------------ */
+/*
+ * reads : g_36 g_176 g_43 g_44 g_297 g_143 g_140 g_51 g_705 g_34 g_131 g_132 g_55 g_56 g_243 g_289 g_347 g_320 g_736 g_294 g_175 g_255 g_897 g_905 g_290 g_735 g_251 g_960 g_969 g_961 g_312 g_1334
+ * writes: g_36 g_140 g_312 g_51 g_34 g_56 g_297 g_44 g_347 g_290 g_255 g_897 g_904 g_294 g_419 g_251 g_969 g_1334
+ */
+static int32_t * func_94(uint32_t * p_95, int32_t p_96, const int32_t p_97, int32_t p_98, int8_t p_99)
+{ /* block id: 395 */
+ int8_t l_778 = (-5L);
+ int32_t l_868[8] = {0xC949261DL,0xC949261DL,0xC949261DL,0xC949261DL,0xC949261DL,0xC949261DL,0xC949261DL,0xC949261DL};
+ int32_t l_885 = 0L;
+ int32_t l_891 = 0x3573B375L;
+ int16_t * const l_916 = &g_419;
+ uint8_t *** const l_948 = &g_175;
+ int32_t l_982 = (-1L);
+ uint32_t *l_983 = &g_294[4];
+ int32_t l_984 = 1L;
+ int8_t l_998 = 0L;
+ uint8_t ****l_1044[3];
+ uint8_t l_1256 = 3UL;
+ int16_t l_1325[10][7] = {{0x9403L,(-1L),0x5345L,0x2B69L,0x41E0L,0x8199L,0x8199L},{0x640AL,(-1L),0x93F5L,(-1L),0x640AL,0xF19AL,0x93F5L},{(-1L),0x9403L,(-1L),0x5345L,0x2B69L,0x41E0L,0x8199L},{0xD399L,1L,0x6F08L,0xF19AL,0x6F08L,1L,0xD399L},{(-1L),0x5345L,0x8199L,0x2B69L,0x9403L,0x23E0L,(-1L)},{0x640AL,1L,1L,8L,0x640AL,8L,1L},{0x9403L,0x9403L,0x8199L,(-1L),(-1L),0x41E0L,0x5345L},{0x6F08L,(-1L),0x6F08L,8L,0xD399L,(-1L),0xD399L},{0x2B69L,(-1L),(-1L),0x2B69L,(-1L),0x8199L,0x23E0L},{0x640AL,0xF19AL,0x93F5L,0xF19AL,0x640AL,(-1L),0x93F5L}};
+ int32_t *l_1339 = &g_51[1][1][1];
+ int i, j;
+ for (i = 0; i < 3; i++)
+ l_1044[i] = &g_905;
+ for (g_36 = 0; (g_36 <= (-2)); --g_36)
+ { /* block id: 398 */
+ if (l_778)
+ break;
+ }
+ (*g_143) = ((safe_mod_func_int32_t_s_s((safe_sub_func_uint8_t_u_u(l_778, (**g_176))), (safe_div_func_int16_t_s_s((-1L), (safe_add_func_int16_t_s_s(((void*)0 == &p_95), p_99)))))) , (safe_mul_func_int8_t_s_s(((safe_div_func_uint16_t_u_u((((safe_add_func_int32_t_s_s(p_96, 4294967286UL)) >= 0xB233L) && p_99), g_297[1])) & p_96), 0xFEL)));
+ for (g_36 = 1; (g_36 >= 0); g_36 -= 1)
+ { /* block id: 404 */
+ int16_t l_806[2];
+ int32_t l_814 = (-9L);
+ uint8_t *l_846[6][2][10] = {{{&g_40[1],&g_44,&g_320,&g_44,(void*)0,(void*)0,(void*)0,(void*)0,&g_320,(void*)0},{&g_40[0],&g_44,(void*)0,&g_40[1],&g_320,&g_40[5],&g_40[5],&g_320,&g_40[1],(void*)0}},{{(void*)0,(void*)0,&g_320,&g_320,&g_40[0],&g_40[3],(void*)0,&g_40[1],&g_44,&g_320},{&g_320,&g_40[1],&g_44,(void*)0,&g_40[1],&g_44,(void*)0,(void*)0,&g_40[6],&g_40[5]}},{{&g_40[5],(void*)0,&g_40[1],&g_40[1],&g_320,&g_320,&g_40[5],&g_40[5],&g_40[5],&g_40[1]},{(void*)0,&g_44,(void*)0,&g_44,&g_40[2],&g_40[5],(void*)0,&g_44,(void*)0,&g_40[1]}},{{(void*)0,&g_44,&g_40[0],(void*)0,&g_40[1],(void*)0,&g_40[0],&g_44,(void*)0,(void*)0},{&g_40[1],&g_40[1],&g_320,&g_44,&g_40[0],(void*)0,&g_44,(void*)0,&g_44,(void*)0}},{{&g_40[0],&g_320,(void*)0,&g_44,&g_40[6],&g_320,(void*)0,&g_40[3],(void*)0,&g_320},{(void*)0,(void*)0,&g_40[5],(void*)0,&g_40[1],&g_40[6],&g_40[1],&g_320,(void*)0,&g_44}},{{&g_40[2],&g_320,&g_320,&g_44,&g_40[3],&g_320,&g_44,&g_40[5],&g_40[5],&g_44},{(void*)0,(void*)0,&g_40[1],&g_40[1],(void*)0,(void*)0,(void*)0,&g_40[0],&g_40[6],(void*)0}}};
+ int32_t l_870 = 0x0B9A60E1L;
+ int32_t l_872 = (-5L);
+ int32_t l_879 = 0x68AC52C0L;
+ int32_t l_880 = 1L;
+ int32_t l_882 = (-3L);
+ int32_t l_883 = 0x329F4C9FL;
+ int32_t l_884 = (-2L);
+ int32_t l_887 = 0x1D6C2448L;
+ int32_t l_888[9];
+ uint8_t ***l_903 = &g_175;
+ uint8_t ****l_902[5][1] = {{&l_903},{&l_903},{&l_903},{&l_903},{&l_903}};
+ int8_t **l_919 = &g_243[1][0][1];
+ int i, j, k;
+ for (i = 0; i < 2; i++)
+ l_806[i] = 0xDFCAL;
+ for (i = 0; i < 9; i++)
+ l_888[i] = 0xAEB8A862L;
+ for (g_140 = 0; (g_140 <= 1); g_140 += 1)
+ { /* block id: 407 */
+ const uint16_t l_807 = 0UL;
+ int32_t *l_809 = (void*)0;
+ int32_t *l_864 = &g_297[1];
+ int32_t l_867 = 0xB4D5446DL;
+ int32_t l_869 = 1L;
+ int32_t l_871 = 0L;
+ int32_t l_873 = (-1L);
+ int8_t l_874 = 1L;
+ int32_t l_875 = 0x566BCB73L;
+ int32_t l_876 = 0x640B2514L;
+ int32_t l_877 = (-10L);
+ int32_t l_878 = 0L;
+ int32_t l_881[1][2][1];
+ int32_t l_890 = (-10L);
+ int i, j, k;
+ for (i = 0; i < 1; i++)
+ {
+ for (j = 0; j < 2; j++)
+ {
+ for (k = 0; k < 1; k++)
+ l_881[i][j][k] = (-1L);
+ }
+ }
+ for (p_98 = 0; (p_98 <= 1); p_98 += 1)
+ { /* block id: 410 */
+ uint16_t *l_837[7][2][10] = {{{&g_251,(void*)0,&g_251,(void*)0,&g_251,&g_251,&g_251,(void*)0,&g_251,(void*)0},{(void*)0,&g_251,&g_251,&g_251,(void*)0,&g_251,&g_251,&g_251,&g_251,&g_251}},{{&g_251,&g_251,&g_251,(void*)0,&g_251,&g_251,&g_251,(void*)0,&g_251,&g_251},{(void*)0,&g_251,&g_251,(void*)0,&g_251,&g_251,(void*)0,&g_251,&g_251,&g_251}},{{&g_251,&g_251,(void*)0,&g_251,(void*)0,&g_251,&g_251,&g_251,&g_251,(void*)0},{(void*)0,&g_251,&g_251,(void*)0,&g_251,&g_251,&g_251,(void*)0,&g_251,(void*)0}},{{&g_251,&g_251,&g_251,&g_251,(void*)0,(void*)0,&g_251,&g_251,&g_251,(void*)0},{(void*)0,&g_251,(void*)0,&g_251,&g_251,(void*)0,&g_251,(void*)0,(void*)0,&g_251}},{{&g_251,&g_251,&g_251,(void*)0,&g_251,&g_251,&g_251,&g_251,&g_251,&g_251},{(void*)0,&g_251,&g_251,&g_251,&g_251,&g_251,(void*)0,&g_251,(void*)0,&g_251}},{{&g_251,&g_251,&g_251,&g_251,&g_251,&g_251,&g_251,&g_251,(void*)0,&g_251},{&g_251,&g_251,&g_251,&g_251,&g_251,&g_251,(void*)0,&g_251,&g_251,(void*)0}},{{&g_251,&g_251,&g_251,&g_251,&g_251,(void*)0,&g_251,(void*)0,&g_251,&g_251},{&g_251,&g_251,&g_251,&g_251,&g_251,&g_251,&g_251,&g_251,&g_251,&g_251}}};
+ int32_t l_848 = (-7L);
+ uint8_t *l_856 = &g_40[0];
+ int32_t *l_860 = &l_848;
+ int i, j, k;
+ g_312[0][0][5] = (void*)0;
+ g_51[g_36][(p_98 + 1)][g_140] ^= 0x87124F79L;
+ for (g_34 = 0; (g_34 <= 1); g_34 += 1)
+ { /* block id: 415 */
+ uint32_t l_805[5];
+ int32_t *l_808 = &g_297[1];
+ int i, j, k;
+ for (i = 0; i < 5; i++)
+ l_805[i] = 0UL;
+ (*l_808) ^= (((safe_mod_func_int32_t_s_s((!(~((g_51[g_36][g_140][g_36] != (g_705[p_98] && ((*g_55) |= ((g_705[(g_34 + 3)] <= ((safe_add_func_int16_t_s_s(g_705[(g_34 + 3)], (safe_sub_func_int32_t_s_s((2UL != ((safe_sub_func_int8_t_s_s(p_98, p_97)) , (safe_mul_func_int16_t_s_s((safe_add_func_int8_t_s_s((((g_51[0][3][1] < l_778) || l_805[0]) > (*g_143)), (**g_131))), l_806[0])))), l_778)))) > 0x76L)) & g_34)))) | l_807))), p_96)) > l_778) ^ p_99);
+ l_809 = &p_98;
+ }
+ for (p_96 = 0; (p_96 <= 1); p_96 += 1)
+ { /* block id: 422 */
+ uint8_t l_847 = 1UL;
+ int i, j, k;
+ if (g_51[p_98][(g_36 + 5)][g_140])
+ break;
+ l_814 = ((safe_mul_func_uint16_t_u_u(0x9540L, 65535UL)) <= (++(*g_43)));
+ for (g_347 = 4; (g_347 >= 0); g_347 -= 1)
+ { /* block id: 428 */
+ int8_t *l_851 = &g_255;
+ int32_t *l_859 = &g_297[1];
+ int i, j, k;
+ l_848 = (safe_rshift_func_int16_t_s_s((-1L), ((safe_mod_func_uint32_t_u_u(((g_51[g_140][(g_140 + 5)][g_140] = (safe_sub_func_int8_t_s_s((((safe_div_func_uint32_t_u_u(g_51[g_140][(g_36 + 2)][(g_140 + 1)], 2L)) <= (safe_unary_minus_func_uint32_t_u((safe_sub_func_int8_t_s_s((((safe_rshift_func_int8_t_s_s(((safe_add_func_int8_t_s_s((p_98 ^ (safe_add_func_int16_t_s_s((safe_sub_func_int16_t_s_s((safe_mul_func_uint8_t_u_u((((~(safe_unary_minus_func_int8_t_s((((((&g_251 == l_837[2][0][1]) ^ ((-1L) == ((*g_289) = (safe_lshift_func_uint16_t_u_s((l_814 = ((safe_lshift_func_int16_t_s_u(g_51[g_140][(g_36 + 2)][(g_140 + 1)], 13)) >= (safe_sub_func_uint8_t_u_u(((safe_div_func_int8_t_s_s((((g_243[(g_36 + 1)][g_36][(p_96 + 3)] == l_846[0][1][8]) == 0xC75DL) <= g_51[g_140][(g_36 + 2)][(g_140 + 1)]), g_51[p_98][(g_36 + 5)][g_140])) | p_99), 255UL)))), p_98))))) > l_847) , l_778) < 0x4EDBL)))) | g_347) != l_778), (*g_132))), g_51[p_98][(g_36 + 5)][g_140])), 0x4155L))), (*g_43))) <= (-4L)), 4)) < g_320) <= p_97), 0x7DL))))) | 0xE6F3L), p_96))) && (**g_736)), 1UL)) | 0x59L)));
+ if (p_97)
+ break;
+ (*l_859) ^= ((*p_95) && (((safe_div_func_int8_t_s_s(((*l_851) = (g_294[0] >= 0x74B3L)), ((**g_175) = (**g_176)))) , (safe_sub_func_uint8_t_u_u(((!(l_814 = (safe_mod_func_int8_t_s_s(((*l_851) ^= (l_856 == (void*)0)), (p_99 = (safe_lshift_func_int16_t_s_u(g_51[g_140][(g_140 + 5)][g_140], 2))))))) > g_51[g_36][(p_98 + 1)][g_140]), l_778))) , 0UL));
+ l_860 = &l_814;
+ }
+ for (g_56 = 0; (g_56 <= 1); g_56 += 1)
+ { /* block id: 444 */
+ int32_t **l_861 = &l_809;
+ (*l_861) = &g_51[0][3][1];
+ if (p_99)
+ break;
+ }
+ }
+ }
+ (*l_864) = (((l_806[0] , (safe_lshift_func_uint8_t_u_u((p_97 ^ 0UL), 2))) & (~1UL)) == (**g_736));
+ for (p_98 = 1; (p_98 >= 0); p_98 -= 1)
+ { /* block id: 453 */
+ int32_t *l_865 = &l_814;
+ int32_t *l_866[5];
+ int16_t l_886[3];
+ int32_t l_889 = 0xF193AD92L;
+ uint32_t l_892 = 4294967295UL;
+ uint16_t *l_920 = &g_251;
+ uint32_t l_931 = 4UL;
+ const uint8_t *l_951[4];
+ const uint8_t **l_950 = &l_951[3];
+ const uint8_t *** const l_949 = &l_950;
+ int32_t ***l_962[9] = {&g_961,&g_961,&g_961,&g_961,&g_961,&g_961,&g_961,&g_961,&g_961};
+ int i;
+ for (i = 0; i < 5; i++)
+ l_866[i] = (void*)0;
+ for (i = 0; i < 3; i++)
+ l_886[i] = 0x4E3AL;
+ for (i = 0; i < 4; i++)
+ l_951[i] = (void*)0;
+ l_892--;
+ for (l_877 = 4; (l_877 >= 0); l_877 -= 1)
+ { /* block id: 457 */
+ uint8_t *****l_898 = (void*)0;
+ uint8_t *****l_899 = (void*)0;
+ uint8_t *****l_900 = (void*)0;
+ uint8_t *****l_901 = (void*)0;
+ int32_t l_929 = 0x9F81C2E6L;
+ int32_t l_930[6];
+ uint32_t l_954 = 0UL;
+ int i, j, k;
+ for (i = 0; i < 6; i++)
+ l_930[i] = 0xF1E80E14L;
+ if ((safe_rshift_func_uint16_t_u_s((&g_736 == &g_736), (((g_294[g_140] != g_294[p_98]) && (((1UL != (((g_897 = g_897) != (g_904[0][3] = l_902[0][0])) != ((*g_289) = (((g_294[(g_140 + 1)] = ((safe_mod_func_int16_t_s_s(((**g_131) , (((p_97 || l_882) != 0x37DD31F2L) | 0L)), p_97)) || (*g_143))) ^ (*l_865)) , 1L)))) == (***g_905)) , (*g_289))) ^ (-7L)))))
+ { /* block id: 462 */
+ uint16_t l_921 = 1UL;
+ int32_t l_922 = 0xB991C690L;
+ l_922 &= (safe_rshift_func_int8_t_s_u((((safe_div_func_uint8_t_u_u((((l_921 = (((((safe_lshift_func_uint8_t_u_u((1UL != (((safe_rshift_func_uint8_t_u_s((((void*)0 == l_916) == 0xDFCCF46BL), (((((*l_864) | ((p_99 = ((l_920 = (((l_868[1] , l_919) != &g_243[(p_98 + 3)][g_36][(p_98 + 6)]) , (void*)0)) == (void*)0)) <= g_294[(g_140 + 1)])) & 3UL) <= (***g_735)) || (**g_736)))) <= (***g_905)) > g_294[(g_140 + 1)])), p_98)) == (*g_289)) < g_51[0][3][1]) | p_98) , (**g_175))) < 0x64L) < l_814), l_888[1])) , (-4L)) , l_868[6]), 1));
+ }
+ else
+ { /* block id: 467 */
+ uint8_t l_923 = 0xE8L;
+ int32_t l_926 = (-9L);
+ int32_t l_927 = 8L;
+ int32_t l_928 = (-1L);
+ --l_923;
+ if (p_96)
+ continue;
+ l_931++;
+ }
+ (*l_864) = (safe_sub_func_uint8_t_u_u((((*l_865) = (((safe_div_func_uint8_t_u_u(((safe_mod_func_uint16_t_u_u(0xDC88L, (safe_rshift_func_int16_t_s_s(((0UL ^ (-6L)) > p_97), ((safe_add_func_uint16_t_u_u(l_868[6], (safe_add_func_int16_t_s_s((safe_rshift_func_uint8_t_u_s((l_948 == l_949), ((safe_sub_func_int16_t_s_s((l_954 > ((&g_289 != (void*)0) & g_140)), 0x0045L)) > 0UL))), 0xB58DL)))) < (*g_289)))))) < (***g_735)), l_868[6])) != p_98) | p_99)) & (*g_55)), 0x4AL));
+ (*l_864) &= 0xD1CAA0FBL;
+ }
+ for (l_778 = 1; (l_778 >= 0); l_778 -= 1)
+ { /* block id: 478 */
+ int16_t *l_959 = &l_806[1];
+ int32_t l_965 = (-8L);
+ int8_t *l_966 = &g_255;
+ uint16_t *l_967 = &g_251;
+ uint16_t *l_968 = &g_969;
+ int i, j, k;
+ (*l_864) = (p_96 |= l_888[6]);
+ p_96 = (((6UL <= ((safe_mod_func_int8_t_s_s((g_251 , (((*g_289) <= (safe_mod_func_int16_t_s_s(((*l_959) &= ((*l_916) = 0x3137L)), (((g_960 != l_962[4]) , ((*l_968) &= ((*l_967) = ((((safe_add_func_uint16_t_u_u(0xEADCL, ((((((*l_966) &= (l_965 == l_879)) == 0xA5L) , p_96) >= p_96) ^ (*p_95)))) , 5UL) & (*g_143)) , p_99)))) , (*g_289))))) ^ (**g_176))), 3L)) == (*g_55))) && (**g_131)) <= p_97);
+ }
+ }
+ }
+ if (l_868[6])
+ break;
+ }
+ if ((p_98 = (safe_mod_func_int16_t_s_s((*g_289), (safe_add_func_uint32_t_u_u(((l_984 = (0x4C7D768FL <= ((*l_983) ^= (safe_mul_func_int8_t_s_s(((**g_736) || (l_982 &= ((p_98 == (safe_sub_func_uint32_t_u_u((((l_948 == l_948) | (safe_lshift_func_int8_t_s_s((0x454BL <= l_868[3]), 0))) ^ ((safe_lshift_func_uint8_t_u_s((!255UL), 0)) <= l_885)), (*p_95)))) || (*g_55)))), 0x15L))))) & l_778), (*p_95)))))))
+ { /* block id: 496 */
+ uint8_t ***l_993 = &g_175;
+ int16_t l_999 = 0x1B88L;
+ int8_t *** const *l_1034 = &g_1019[1][0][0];
+ int32_t *l_1046 = &l_982;
+ int32_t l_1048[1][2][7] = {{{0xEA46108CL,0xEA46108CL,0xEA46108CL,0xEA46108CL,0xEA46108CL,0xEA46108CL,0xEA46108CL},{(-1L),(-1L),(-1L),(-1L),(-1L),(-1L),(-1L)}}};
+ uint32_t l_1093[3];
+ uint16_t l_1131 = 0xE112L;
+ int16_t **l_1135[6][2][5] = {{{&g_289,&g_289,&g_289,&g_289,(void*)0},{&g_289,&g_289,&g_289,&g_289,&g_289}},{{&g_289,(void*)0,&g_289,(void*)0,&g_289},{&g_289,&g_289,&g_289,(void*)0,(void*)0}},{{&g_289,(void*)0,(void*)0,&g_289,&g_289},{&g_289,(void*)0,(void*)0,&g_289,(void*)0}},{{(void*)0,&g_289,&g_289,&g_289,&g_289},{(void*)0,&g_289,(void*)0,&g_289,&g_289}},{{&g_289,&g_289,&g_289,&g_289,(void*)0},{&g_289,&g_289,&g_289,&g_289,&g_289}},{{&g_289,&g_289,&g_289,(void*)0,(void*)0},{&g_289,(void*)0,(void*)0,(void*)0,(void*)0}}};
+ int32_t l_1180 = 0L;
+ uint8_t l_1276[9];
+ int32_t *l_1294 = &g_1132;
+ int32_t *l_1320 = &g_51[0][3][1];
+ int32_t *l_1321 = &g_140;
+ int32_t *l_1322 = &g_297[1];
+ int32_t *l_1323 = &l_1048[0][1][0];
+ int32_t *l_1324[1];
+ int16_t l_1326 = 0x2195L;
+ int32_t l_1327 = 0x947976B8L;
+ uint16_t l_1328 = 0x24D6L;
+ int i, j, k;
+ for (i = 0; i < 3; i++)
+ l_1093[i] = 1UL;
+ for (i = 0; i < 9; i++)
+ l_1276[i] = 255UL;
+ for (i = 0; i < 1; i++)
+ l_1324[i] = &l_1048[0][0][6];
+ for (g_44 = 0; (g_44 <= 6); g_44 += 1)
+ { /* block id: 499 */
+ uint8_t ***l_994 = &g_175;
+ int8_t l_997 = 0xA6L;
+ int8_t ***l_1017 = &g_245;
+ int8_t ****l_1016 = &l_1017;
+ int32_t l_1050 = 0xF31EAA3DL;
+ int32_t l_1051 = 0x0917F34DL;
+ int32_t l_1056 = 0x36E77B1BL;
+ int32_t l_1057 = 0x4D998F65L;
+ int8_t l_1113 = 0x9DL;
+ uint32_t l_1114[6];
+ int32_t l_1168 = 0xF8E5B00AL;
+ int32_t l_1170 = 0x729BDDB8L;
+ int32_t l_1171 = 1L;
+ int32_t l_1172 = (-1L);
+ int32_t l_1173 = 0L;
+ int32_t l_1176[5][7][6] = {{{0xBDCB05A3L,0L,0xCD8737B6L,0L,0xBDCB05A3L,0xC7DD3347L},{0L,0xBDCB05A3L,0xC7DD3347L,0xC7DD3347L,0xBDCB05A3L,0L},{(-6L),0L,0xF426EDDCL,0xBDCB05A3L,0xF426EDDCL,0L},{0xF426EDDCL,(-6L),0xC7DD3347L,0xCD8737B6L,0xCD8737B6L,0xCD8737B6L},{0xA0CC386BL,0xA0CC386BL,0xF426EDDCL,0xC7DD3347L,0L,0xC7DD3347L},{0xBDCB05A3L,0xA0CC386BL,0xBDCB05A3L,0xCD8737B6L,0xF426EDDCL,0xF426EDDCL},{(-6L),0xBDCB05A3L,0xBDCB05A3L,(-6L),0xA0CC386BL,0xC7DD3347L}},{{0xC7DD3347L,(-6L),0xF426EDDCL,(-6L),0xC7DD3347L,0xCD8737B6L},{(-6L),0xC7DD3347L,0xCD8737B6L,0xCD8737B6L,0xC7DD3347L,(-6L)},{0xBDCB05A3L,(-6L),0xA0CC386BL,0xC7DD3347L,0xA0CC386BL,(-6L)},{0xA0CC386BL,0xBDCB05A3L,0xCD8737B6L,0xF426EDDCL,0xF426EDDCL,0xCD8737B6L},{0xA0CC386BL,0xA0CC386BL,0xF426EDDCL,0xC7DD3347L,0L,0xC7DD3347L},{0xBDCB05A3L,0xA0CC386BL,0xBDCB05A3L,0xCD8737B6L,0xF426EDDCL,0xF426EDDCL},{(-6L),0xBDCB05A3L,0xBDCB05A3L,(-6L),0xA0CC386BL,0xC7DD3347L}},{{0xC7DD3347L,(-6L),0xF426EDDCL,(-6L),0xC7DD3347L,0xCD8737B6L},{(-6L),0xC7DD3347L,0xCD8737B6L,0xCD8737B6L,0xC7DD3347L,(-6L)},{0xBDCB05A3L,(-6L),0xA0CC386BL,0xC7DD3347L,0xA0CC386BL,(-6L)},{0xA0CC386BL,0xBDCB05A3L,0xCD8737B6L,0xF426EDDCL,0xF426EDDCL,0xCD8737B6L},{0xA0CC386BL,0xA0CC386BL,0xF426EDDCL,0xC7DD3347L,0L,0xC7DD3347L},{0xBDCB05A3L,0xA0CC386BL,0xBDCB05A3L,0xCD8737B6L,0xF426EDDCL,0xF426EDDCL},{(-6L),0xBDCB05A3L,0xBDCB05A3L,(-6L),0xA0CC386BL,0xC7DD3347L}},{{0xC7DD3347L,(-6L),0xF426EDDCL,(-6L),0xC7DD3347L,0xCD8737B6L},{(-6L),0xC7DD3347L,0xCD8737B6L,0xCD8737B6L,0xC7DD3347L,(-6L)},{0xBDCB05A3L,(-6L),0xA0CC386BL,0xC7DD3347L,0xA0CC386BL,(-6L)},{0xA0CC386BL,0xBDCB05A3L,0xCD8737B6L,0xF426EDDCL,0xF426EDDCL,0xCD8737B6L},{0xA0CC386BL,0xA0CC386BL,0xF426EDDCL,0xC7DD3347L,0L,0xC7DD3347L},{0xBDCB05A3L,0xA0CC386BL,0xBDCB05A3L,0xCD8737B6L,0xF426EDDCL,0xF426EDDCL},{(-6L),0xBDCB05A3L,0xBDCB05A3L,(-6L),0xA0CC386BL,0xC7DD3347L}},{{0xC7DD3347L,(-6L),0xF426EDDCL,(-6L),0xC7DD3347L,0xCD8737B6L},{(-6L),0xC7DD3347L,0xCD8737B6L,0xCD8737B6L,0xC7DD3347L,(-6L)},{0xBDCB05A3L,(-6L),0xA0CC386BL,0xC7DD3347L,0xA0CC386BL,(-6L)},{0xA0CC386BL,0xBDCB05A3L,0xCD8737B6L,0xF426EDDCL,0xF426EDDCL,0xCD8737B6L},{0xA0CC386BL,0xA0CC386BL,0xF426EDDCL,0xC7DD3347L,0L,0xC7DD3347L},{0xBDCB05A3L,0xA0CC386BL,0xBDCB05A3L,0xCD8737B6L,0xF426EDDCL,0xF426EDDCL},{(-6L),0xBDCB05A3L,0xBDCB05A3L,(-6L),0xA0CC386BL,0xC7DD3347L}}};
+ uint32_t l_1319 = 0x3CC17454L;
+ int i, j, k;
+ for (i = 0; i < 6; i++)
+ l_1114[i] = 1UL;
+ }
+ --l_1328;
+ (*g_143) ^= ((*g_960) == (void*)0);
+ return (**g_960);
+ }
+ else
+ { /* block id: 635 */
+ int32_t *l_1331 = &g_51[0][1][1];
+ int32_t *l_1332[6] = {&g_1055,&g_1055,&g_1055,&g_1055,&g_1055,&g_1055};
+ int i;
+ ++g_1334;
+ for (g_347 = 0; (g_347 == 26); g_347 = safe_add_func_uint16_t_u_u(g_347, 7))
+ { /* block id: 639 */
+ return (*g_961);
+ }
+ }
+ return l_1339;
+}
+
+
+/* ------------------------------------------ */
+/*
+ * reads : g_143 g_140 g_176 g_43 g_44 g_705 g_289 g_290 g_297 g_255 g_55 g_56
+ * writes: g_255 g_297 g_140 g_312 g_294
+ */
+static int8_t func_100(int32_t * p_101, uint8_t p_102, uint8_t p_103, uint32_t p_104)
+{ /* block id: 323 */
+ int8_t ***l_692 = (void*)0;
+ int8_t ****l_691 = &l_692;
+ int32_t l_697 = 0xB23966F9L;
+ int32_t l_704 = 0x17C47AB5L;
+ int32_t l_712 = 0x92F85846L;
+ uint32_t l_724 = 1UL;
+ uint32_t l_754 = 0x40901257L;
+ uint32_t l_755[9][7] = {{0x3F92B650L,0x3F92B650L,0x59DA734BL,0x3F92B650L,0x3F92B650L,0x59DA734BL,0x3F92B650L},{0x1D3867C8L,4294967286UL,4294967295UL,5UL,4294967295UL,4294967286UL,0x1D3867C8L},{0xB66E3024L,0x3F92B650L,0xB66E3024L,0xB66E3024L,0x3F92B650L,0xB66E3024L,0xB66E3024L},{0x1D3867C8L,5UL,0x67201704L,5UL,0x1D3867C8L,4294967295UL,0x1D3867C8L},{0x3F92B650L,0xB66E3024L,0xB66E3024L,0x3F92B650L,0xB66E3024L,0xB66E3024L,0x3F92B650L},{4294967295UL,5UL,4294967295UL,4294967286UL,0x1D3867C8L,4294967286UL,4294967295UL},{0x3F92B650L,0x3F92B650L,0x59DA734BL,0x3F92B650L,0x3F92B650L,0x59DA734BL,0x3F92B650L},{0x1D3867C8L,4294967286UL,4294967295UL,5UL,4294967295UL,4294967286UL,0x1D3867C8L},{0xB66E3024L,0x3F92B650L,0xB66E3024L,0xB66E3024L,0x3F92B650L,0xB66E3024L,0xB66E3024L}};
+ int i, j;
+ if (((l_691 == &l_692) < (safe_mod_func_int16_t_s_s(((safe_mul_func_int16_t_s_s(((l_697 & (0UL != ((l_697 & ((0L ^ 0UL) <= (safe_mod_func_int32_t_s_s((*g_143), (safe_mod_func_uint8_t_u_u((safe_mul_func_uint8_t_u_u(((l_704 = (p_102 > l_697)) & (**g_176)), 0xD2L)), l_697)))))) && (-1L)))) , g_705[2]), (*g_289))) && l_697), (*g_289)))))
+ { /* block id: 325 */
+ int16_t l_715 = (-7L);
+ int8_t *l_716 = &g_255;
+ int8_t **l_717 = (void*)0;
+ (*g_143) ^= (safe_div_func_int8_t_s_s(((((safe_lshift_func_int8_t_s_u(((((0x7466BED0L && ((safe_rshift_func_int8_t_s_s(l_712, ((0x6627434EL > (safe_mod_func_int16_t_s_s(l_715, 0xA37DL))) == ((((~g_297[1]) & p_102) , ((*p_101) = (p_104 < ((*l_716) ^= l_715)))) > (*g_55))))) && p_102)) , l_704) >= 0x8C828013L) , 0x19L), 6)) > l_715) , l_717) == &l_716), 1UL));
+ return p_102;
+ }
+ else
+ { /* block id: 330 */
+ int32_t **l_718 = &g_312[1][0][5];
+ uint32_t *l_766 = &l_755[0][2];
+ (*l_718) = p_101;
+ for (p_103 = 25; (p_103 != 48); ++p_103)
+ { /* block id: 334 */
+ int8_t l_723[9][8][3] = {{{0x6BL,0L,0xCAL},{0xF4L,0xB1L,0x8BL},{0L,0L,0x53L},{0xBFL,0L,0x76L},{0xBFL,0x39L,0x1BL},{0L,1L,0xDFL},{0xF4L,0xBFL,0x1BL},{0x6BL,0x2AL,0x76L}},{{1L,0x2AL,0x53L},{1L,0xBFL,0x8BL},{0xA4L,1L,0xCAL},{1L,0x39L,0x10L},{1L,0L,0x10L},{0x6BL,0L,0xCAL},{0xF4L,0xB1L,0x8BL},{0L,0L,0x53L}},{{0xBFL,0L,0x76L},{0xBFL,0x39L,0x1BL},{0L,1L,0xDFL},{0xF4L,0xBFL,0x1BL},{0x6BL,0x2AL,0x76L},{1L,0x2AL,0x53L},{1L,0xBFL,0x8BL},{0xA4L,1L,0xCAL}},{{1L,0x39L,0x10L},{1L,0L,0x10L},{0x6BL,0L,0xCAL},{0xF4L,0xB1L,0x8BL},{0L,0L,0x53L},{0xBFL,0L,0x76L},{0xBFL,0x39L,0x1BL},{0L,1L,0xDFL}},{{0xF4L,0xBFL,0x1BL},{0x6BL,0x2AL,0x76L},{1L,0x2AL,0x53L},{1L,0xBFL,0x8BL},{0xA4L,1L,0xCAL},{1L,0x39L,0x10L},{1L,0L,0x10L},{0x6BL,0L,0xCAL}},{{0xF4L,0xB1L,0x8BL},{0L,0L,0x53L},{0x6FL,9L,0x6CL},{0x6FL,0xE5L,0L},{(-1L),0L,1L},{(-9L),0x6FL,0L},{0xE9L,1L,0x6CL},{0xC4L,1L,0xBFL}},{{0L,0x6FL,1L},{1L,0L,0xA4L},{0L,0xE5L,0xB1L},{0xC4L,9L,0xB1L},{0xE9L,(-1L),0xA4L},{(-9L),0x19L,1L},{(-1L),(-1L),0xBFL},{0x6FL,9L,0x6CL}},{{0x6FL,0xE5L,0L},{(-1L),0L,1L},{(-9L),0x6FL,0L},{0xE9L,1L,0x6CL},{0xC4L,1L,0xBFL},{0L,0x6FL,1L},{1L,0L,0xA4L},{0L,0xE5L,0xB1L}},{{0xC4L,9L,0xB1L},{0xE9L,(-1L),0xA4L},{(-9L),0x19L,1L},{(-1L),(-1L),0xBFL},{0x6FL,9L,0x6CL},{0x6FL,0xE5L,0L},{(-1L),0L,1L},{(-9L),0x6FL,0L}}};
+ int8_t ***l_761[10] = {&g_245,&g_245,&g_245,&g_245,&g_245,&g_245,&g_245,&g_245,&g_245,&g_245};
+ int i, j, k;
+ }
+ for (l_704 = 0; l_704 < 5; l_704 += 1)
+ {
+ g_294[l_704] = 1UL;
+ }
+ }
+ (*g_143) = (safe_div_func_int32_t_s_s((*g_143), l_704));
+ return l_697;
+}
+
+
+/* ------------------------------------------ */
+/*
+ * reads :
+ * writes:
+ */
+static int32_t * func_105(uint32_t p_106)
+{ /* block id: 29 */
+ int8_t *l_134 = &g_36;
+ int8_t ** const l_133 = &l_134;
+ int32_t l_156 = 0xE85A3F02L;
+ uint32_t l_166 = 0x5E662131L;
+ uint8_t **l_172 = &g_43;
+ uint8_t **l_174[2][7] = {{&g_43,&g_43,&g_43,&g_43,&g_43,&g_43,&g_43},{&g_43,&g_43,&g_43,&g_43,&g_43,&g_43,&g_43}};
+ uint8_t ***l_173[2][9] = {{(void*)0,&l_172,(void*)0,&l_172,(void*)0,&l_172,(void*)0,&l_172,(void*)0},{(void*)0,(void*)0,&l_174[1][0],&l_174[1][0],(void*)0,(void*)0,&l_174[1][0],&l_174[1][0],(void*)0}};
+ int32_t *l_211[6] = {&g_3,&g_3,&g_3,&g_3,&g_3,&g_3};
+ int32_t l_418 = 0xBEDB2E7EL;
+ int32_t l_582 = 8L;
+ int16_t l_587[5][7][2] = {{{0x5323L,1L},{0xDA62L,0xA377L},{0xD174L,0xDA62L},{0x959BL,0x0DAEL},{0x959BL,0xDA62L},{0xD174L,0xA377L},{0xDA62L,1L}},{{0x5323L,(-1L)},{0xA377L,0x9B9BL},{0x9B9BL,0x9B9BL},{0xA377L,(-1L)},{0x5323L,1L},{0xDA62L,0xA377L},{0xD174L,0xDA62L}},{{0x959BL,0x0DAEL},{0x959BL,0xDA62L},{0xD174L,0xA377L},{0xDA62L,1L},{0x5323L,(-1L)},{0xA377L,0x9B9BL},{0x9B9BL,0x9B9BL}},{{0xA377L,(-1L)},{0x5323L,1L},{0xDA62L,0xA377L},{0xD174L,0xDA62L},{0x959BL,0x0DAEL},{(-1L),0x0DAEL},{0x5323L,0x9B9BL}},{{0x0DAEL,0xD174L},{0x959BL,0xA377L},{0x9B9BL,(-7L)},{(-7L),(-7L)},{0x9B9BL,0xA377L},{0x959BL,0xD174L},{0x0DAEL,0x9B9BL}}};
+ uint32_t l_614 = 4294967286UL;
+ int i, j, k;
+ return &g_297[1];
+}
+
+
+
+
+/* ---------------------------------------- */
+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 < 5; i++)
+ {
+ for (j = 0; j < 1; 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);
+
+ }
+ }
+ transparent_crc(g_3, "g_3", print_hash_value);
+ for (i = 0; i < 6; i++)
+ {
+ transparent_crc(g_14[i], "g_14[i]", print_hash_value);
+ if (print_hash_value) printf("index = [%d]\n", i);
+
+ }
+ transparent_crc(g_15, "g_15", print_hash_value);
+ transparent_crc(g_34, "g_34", print_hash_value);
+ transparent_crc(g_36, "g_36", print_hash_value);
+ for (i = 0; i < 7; i++)
+ {
+ transparent_crc(g_40[i], "g_40[i]", print_hash_value);
+ if (print_hash_value) printf("index = [%d]\n", i);
+
+ }
+ transparent_crc(g_44, "g_44", print_hash_value);
+ transparent_crc(g_46, "g_46", print_hash_value);
+ for (i = 0; i < 2; i++)
+ {
+ for (j = 0; j < 8; j++)
+ {
+ for (k = 0; k < 3; k++)
+ {
+ transparent_crc(g_51[i][j][k], "g_51[i][j][k]", print_hash_value);
+ if (print_hash_value) printf("index = [%d][%d][%d]\n", i, j, k);
+
+ }
+ }
+ }
+ transparent_crc(g_52, "g_52", print_hash_value);
+ transparent_crc(g_56, "g_56", print_hash_value);
+ transparent_crc(g_140, "g_140", print_hash_value);
+ transparent_crc(g_251, "g_251", print_hash_value);
+ transparent_crc(g_255, "g_255", print_hash_value);
+ transparent_crc(g_290, "g_290", print_hash_value);
+ for (i = 0; i < 5; i++)
+ {
+ transparent_crc(g_294[i], "g_294[i]", print_hash_value);
+ if (print_hash_value) printf("index = [%d]\n", i);
+
+ }
+ for (i = 0; i < 2; i++)
+ {
+ transparent_crc(g_297[i], "g_297[i]", print_hash_value);
+ if (print_hash_value) printf("index = [%d]\n", i);
+
+ }
+ transparent_crc(g_320, "g_320", print_hash_value);
+ transparent_crc(g_347, "g_347", print_hash_value);
+ transparent_crc(g_419, "g_419", print_hash_value);
+ transparent_crc(g_477, "g_477", print_hash_value);
+ for (i = 0; i < 6; i++)
+ {
+ transparent_crc(g_705[i], "g_705[i]", print_hash_value);
+ if (print_hash_value) printf("index = [%d]\n", i);
+
+ }
+ transparent_crc(g_969, "g_969", print_hash_value);
+ transparent_crc(g_1055, "g_1055", print_hash_value);
+ transparent_crc(g_1099, "g_1099", print_hash_value);
+ transparent_crc(g_1132, "g_1132", print_hash_value);
+ transparent_crc(g_1189, "g_1189", print_hash_value);
+ for (i = 0; i < 8; i++)
+ {
+ for (j = 0; j < 1; j++)
+ {
+ for (k = 0; k < 8; k++)
+ {
+ transparent_crc(g_1254[i][j][k], "g_1254[i][j][k]", print_hash_value);
+ if (print_hash_value) printf("index = [%d][%d][%d]\n", i, j, k);
+
+ }
+ }
+ }
+ transparent_crc(g_1285, "g_1285", print_hash_value);
+ transparent_crc(g_1298, "g_1298", print_hash_value);
+ transparent_crc(g_1333, "g_1333", print_hash_value);
+ transparent_crc(g_1334, "g_1334", print_hash_value);
+ transparent_crc(g_1509, "g_1509", print_hash_value);
+ transparent_crc(g_1766, "g_1766", print_hash_value);
+ transparent_crc(g_1776, "g_1776", print_hash_value);
+ for (i = 0; i < 6; i++)
+ {
+ for (j = 0; j < 8; j++)
+ {
+ for (k = 0; k < 5; k++)
+ {
+ transparent_crc(g_1782[i][j][k], "g_1782[i][j][k]", print_hash_value);
+ if (print_hash_value) printf("index = [%d][%d][%d]\n", i, j, k);
+
+ }
+ }
+ }
+ transparent_crc(g_1857, "g_1857", print_hash_value);
+ transparent_crc(g_1961, "g_1961", print_hash_value);
+ transparent_crc(g_2067, "g_2067", print_hash_value);
+ for (i = 0; i < 10; i++)
+ {
+ transparent_crc(g_2147[i], "g_2147[i]", print_hash_value);
+ if (print_hash_value) printf("index = [%d]\n", i);
+
+ }
+ transparent_crc(g_2148, "g_2148", print_hash_value);
+ transparent_crc(g_2207, "g_2207", print_hash_value);
+ platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value);
+ return 0;
+}
+
+/************************ statistics *************************
+XXX max struct depth: 0
+breakdown:
+ depth: 0, occurrence: 652
+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: 41
+breakdown:
+ depth: 1, occurrence: 169
+ depth: 2, occurrence: 42
+ depth: 3, occurrence: 3
+ depth: 4, occurrence: 2
+ depth: 6, occurrence: 1
+ depth: 7, occurrence: 1
+ depth: 8, occurrence: 1
+ depth: 10, occurrence: 1
+ depth: 13, occurrence: 1
+ depth: 14, occurrence: 1
+ depth: 15, occurrence: 1
+ depth: 16, occurrence: 3
+ depth: 19, occurrence: 1
+ depth: 20, occurrence: 1
+ depth: 21, occurrence: 4
+ depth: 22, occurrence: 2
+ depth: 23, occurrence: 2
+ depth: 24, occurrence: 2
+ depth: 25, occurrence: 1
+ depth: 26, occurrence: 2
+ depth: 27, occurrence: 3
+ depth: 28, occurrence: 4
+ depth: 30, occurrence: 1
+ depth: 31, occurrence: 1
+ depth: 33, occurrence: 1
+ depth: 35, occurrence: 2
+ depth: 36, occurrence: 2
+ depth: 39, occurrence: 4
+ depth: 41, occurrence: 2
+
+XXX total number of pointers: 428
+
+XXX times a variable address is taken: 1238
+XXX times a pointer is dereferenced on RHS: 347
+breakdown:
+ depth: 1, occurrence: 232
+ depth: 2, occurrence: 83
+ depth: 3, occurrence: 32
+XXX times a pointer is dereferenced on LHS: 261
+breakdown:
+ depth: 1, occurrence: 220
+ depth: 2, occurrence: 32
+ depth: 3, occurrence: 9
+XXX times a pointer is compared with null: 37
+XXX times a pointer is compared with address of another variable: 12
+XXX times a pointer is compared with another pointer: 17
+XXX times a pointer is qualified to be dereferenced: 9414
+
+XXX max dereference level: 5
+breakdown:
+ level: 0, occurrence: 0
+ level: 1, occurrence: 1507
+ level: 2, occurrence: 661
+ level: 3, occurrence: 292
+ level: 4, occurrence: 45
+ level: 5, occurrence: 6
+XXX number of pointers point to pointers: 210
+XXX number of pointers point to scalars: 218
+XXX number of pointers point to structs: 0
+XXX percent of pointers has null in alias set: 29.2
+XXX average alias set size: 1.54
+
+XXX times a non-volatile is read: 2082
+XXX times a non-volatile is write: 921
+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: 7
+
+XXX stmts: 175
+XXX max block depth: 5
+breakdown:
+ depth: 0, occurrence: 34
+ depth: 1, occurrence: 30
+ depth: 2, occurrence: 19
+ depth: 3, occurrence: 27
+ depth: 4, occurrence: 30
+ depth: 5, occurrence: 35
+
+XXX percentage a fresh-made variable is used: 16.5
+XXX percentage an existing variable is used: 83.5
+********************* end of statistics **********************/
+
diff --git a/tests/fuzz/19.c.txt b/tests/fuzz/19.c.txt
new file mode 100644
index 00000000..5fac330b
--- /dev/null
+++ b/tests/fuzz/19.c.txt
@@ -0,0 +1 @@
+checksum = 150DAD10
diff --git a/tests/fuzz/csmith_driver.py b/tests/fuzz/csmith_driver.py
index ad5a7021..09f1c249 100755
--- a/tests/fuzz/csmith_driver.py
+++ b/tests/fuzz/csmith_driver.py
@@ -35,7 +35,13 @@ notes = { 'invalid': 0, 'unaligned': 0, 'embug': 0 }
fails = 0
while 1:
- opts = '-O' + str(random.randint(0, 3))
+ if random.random() < 0.666:
+ opts = '-O' + str(random.randint(0, 3))
+ else:
+ if random.random() < 0.5:
+ opts = '-Os'
+ else:
+ opts = '-Oz'
print 'opt level:', opts
print 'Tried %d, notes: %s' % (tried, notes)
@@ -60,13 +66,13 @@ while 1:
print '2) Compile natively'
shared.try_delete(filename)
try:
- shared.check_execute([COMP, opts, fullname, '-o', filename + '1'] + CSMITH_CFLAGS + ['-w']) # + shared.EMSDK_OPTS
+ shared.check_execute([COMP, '-m32', opts, fullname, '-o', filename + '1'] + CSMITH_CFLAGS + ['-w']) # + shared.EMSDK_OPTS
except Exception, e:
print 'Failed to compile natively using clang'
notes['invalid'] += 1
continue
- shared.check_execute([COMP, opts, '-emit-llvm', '-c', '-Xclang', '-triple=i386-pc-linux-gnu', fullname, '-o', filename + '.bc'] + CSMITH_CFLAGS + shared.EMSDK_OPTS)
+ shared.check_execute([COMP, '-m32', opts, '-emit-llvm', '-c', fullname, '-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([COMP, fullname, '-o', filename + '3'] + CSMITH_CFLAGS)
@@ -115,7 +121,7 @@ while 1:
print "EMSCRIPTEN BUG"
notes['embug'] += 1
fails += 1
- shutil.copyfile(fullname, 'newfail%d%s' % (fails, suffix))
+ shutil.copyfile(fullname, 'newfail%d%s%s' % (fails, opts.replace('-', '_'), suffix))
continue
#if not ok:
# try: # finally, try with safe heap. if that is triggered, this is nonportable code almost certainly
@@ -132,7 +138,7 @@ while 1:
# This is ok. Try in secondary JS engine too
if opts != '-O0' and engine2 and normal:
try:
- js2 = shared.run_js(filename + '.js', stderr=PIPE, engine=engine2, full_output=True, check_timeout=True)
+ js2 = shared.run_js(filename + '.js', stderr=PIPE, engine=engine2 + ['-w'], full_output=True, check_timeout=True)
except:
print 'failed to run in secondary', js2
break
diff --git a/tests/fuzz/test.sh b/tests/fuzz/test.sh
index 7e6b8966..90d6b1a4 100755
--- a/tests/fuzz/test.sh
+++ b/tests/fuzz/test.sh
@@ -4,26 +4,26 @@
echo "builds"
rm *.out *.bc *.js
-gcc $@ -I/home/alon/Dev/csmith/runtime -o n1.out &> /dev/null
-/home/alon/Dev/fastcomp/build/Release/bin/clang $@ -I/home/alon/Dev/csmith/runtime -o n2.out &> /dev/null
-/home/alon/Dev/fastcomp/build/Release/bin/clang $@ -I/home/alon/Dev/csmith/runtime -emit-llvm -c -o bc.bc &> o
-~/Dev/emscripten/emcc $@ -I/home/alon/Dev/csmith/runtime -o js.out.js &> /dev/null
-~/Dev/emscripten/emcc $@ -s UNALIGNED_MEMORY=1 -I/home/alon/Dev/csmith/runtime -o ua.out.js &> /dev/null
-~/Dev/emscripten/emcc $@ -s SAFE_HEAP=1 -I/home/alon/Dev/csmith/runtime -o sh.out.js &> /dev/null
-EMCC_FAST_COMPILER=1 ~/Dev/emscripten/emcc $@ -I/home/alon/Dev/csmith/runtime -o fc.out.js &> /dev/null
-EMCC_FAST_COMPILER=1 ~/Dev/emscripten/emcc $@ -s SAFE_HEAP=1 -I/home/alon/Dev/csmith/runtime -o fc-sh.out.js &> /dev/null
+gcc $@ -m32 -I/home/alon/Dev/csmith/runtime -o n1.out &> /dev/null
+/home/alon/Dev/fastcomp/build/Release/bin/clang $@ -m32 -I/home/alon/Dev/csmith/runtime -o n2.out &> /dev/null
+/home/alon/Dev/fastcomp/build/Release/bin/clang $@ -m32 -I/home/alon/Dev/csmith/runtime -emit-llvm -c -o bc.bc &> o
+#EMCC_FAST_COMPILER=0 ~/Dev/emscripten/emcc $@ -I/home/alon/Dev/csmith/runtime -o js.out.js &> /dev/null
+#EMCC_FAST_COMPILER=0~/Dev/emscripten/emcc $@ -s UNALIGNED_MEMORY=1 -I/home/alon/Dev/csmith/runtime -o ua.out.js &> /dev/null
+#EMCC_FAST_COMPILER=0~/Dev/emscripten/emcc $@ -s SAFE_HEAP=1 -I/home/alon/Dev/csmith/runtime -o sh.out.js &> /dev/null
+~/Dev/emscripten/emcc $@ -I/home/alon/Dev/csmith/runtime -o fc.out.js &> /dev/null
+~/Dev/emscripten/emcc $@ -s SAFE_HEAP=1 -I/home/alon/Dev/csmith/runtime -o fc-sh.out.js &> /dev/null
echo "run n1"
./n1.out &> n1
echo "run n2"
./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 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 "run fc-sh"
@@ -32,16 +32,16 @@ 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/fc"
-diff fc js | grep -v warning
-echo "js/fc-sh"
-diff fc-sh js | grep -v warning
+#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/fc"
+#diff fc js | grep -v warning
+#echo "js/fc-sh"
+#diff fc-sh js | grep -v warning
echo "native/fc"
grep -v warning fc > fclean
diff n1 fclean | grep -v warning
diff --git a/tests/fuzz/testpp.sh b/tests/fuzz/testpp.sh
index 8e9f4185..49378645 100755
--- a/tests/fuzz/testpp.sh
+++ b/tests/fuzz/testpp.sh
@@ -4,26 +4,26 @@
echo "builds"
rm *.out *.bc *.js
-g++ $@ -I/home/alon/Dev/csmith/runtime -o n1.out &> /dev/null
-/home/alon/Dev/fastcomp/build/Release/bin/clang++ $@ -I/home/alon/Dev/csmith/runtime -o n2.out &> /dev/null
-/home/alon/Dev/fastcomp/build/Release/bin/clang++ $@ -I/home/alon/Dev/csmith/runtime -emit-llvm -c -o bc.bc &> o
-~/Dev/emscripten/em++ $@ -I/home/alon/Dev/csmith/runtime -o js.out.js &> /dev/null
-~/Dev/emscripten/em++ $@ -s UNALIGNED_MEMORY=1 -I/home/alon/Dev/csmith/runtime -o ua.out.js &> /dev/null
-~/Dev/emscripten/em++ $@ -s SAFE_HEAP=1 -I/home/alon/Dev/csmith/runtime -o sh.out.js &> /dev/null
-EMCC_FAST_COMPILER=1 ~/Dev/emscripten/em++ $@ -I/home/alon/Dev/csmith/runtime -o fc.out.js &> /dev/null
-EMCC_FAST_COMPILER=1 ~/Dev/emscripten/em++ $@ -s SAFE_HEAP=1 -I/home/alon/Dev/csmith/runtime -o fc-sh.out.js &> /dev/null
+g++ $@ -m32 -I/home/alon/Dev/csmith/runtime -o n1.out &> /dev/null
+/home/alon/Dev/fastcomp/build/Release/bin/clang++ $@ -m32 -I/home/alon/Dev/csmith/runtime -o n2.out &> /dev/null
+/home/alon/Dev/fastcomp/build/Release/bin/clang++ $@ -m32 -I/home/alon/Dev/csmith/runtime -emit-llvm -c -o bc.bc &> o
+#EMCC_FAST_COMPILER=0 ~/Dev/emscripten/em++ $@ -I/home/alon/Dev/csmith/runtime -o js.out.js &> /dev/null
+#EMCC_FAST_COMPILER=0~/Dev/emscripten/em++ $@ -s UNALIGNED_MEMORY=1 -I/home/alon/Dev/csmith/runtime -o ua.out.js &> /dev/null
+#EMCC_FAST_COMPILER=0~/Dev/emscripten/em++ $@ -s SAFE_HEAP=1 -I/home/alon/Dev/csmith/runtime -o sh.out.js &> /dev/null
+~/Dev/emscripten/em++ $@ -I/home/alon/Dev/csmith/runtime -o fc.out.js &> /dev/null
+~/Dev/emscripten/em++ $@ -s SAFE_HEAP=1 -I/home/alon/Dev/csmith/runtime -o fc-sh.out.js &> /dev/null
echo "run n1"
./n1.out &> n1
echo "run n2"
./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 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 "run fc-sh"
@@ -32,16 +32,16 @@ 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/fc"
-diff fc js | grep -v warning
-echo "js/fc-sh"
-diff fc-sh js | grep -v warning
+#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/fc"
+#diff fc js | grep -v warning
+#echo "js/fc-sh"
+#diff fc-sh js | grep -v warning
echo "native/fc"
grep -v warning fc > fclean
diff n1 fclean | grep -v warning
diff --git a/tests/gl_matrix_identity.c b/tests/gl_matrix_identity.c
index 9f990a77..8ca7d0cb 100644
--- a/tests/gl_matrix_identity.c
+++ b/tests/gl_matrix_identity.c
@@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR
REDISTRIBUTION OF THIS SOFTWARE.
*/
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
#define USE_GLEW 1
#endif
@@ -38,7 +38,7 @@ void verify() {
for (int x = 0; x < width*height*4; x++) {
if (x % 4 != 3) sum += x * data[x];
}
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
int result = sum;
REPORT_RESULT();
#endif
@@ -120,7 +120,7 @@ int main(int argc, char *argv[])
verify();
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
SDL_Delay(1500);
#endif
diff --git a/tests/gl_ps.c b/tests/gl_ps.c
index 4fa79922..d9f3b079 100644
--- a/tests/gl_ps.c
+++ b/tests/gl_ps.c
@@ -22,7 +22,7 @@ RESULTING FROM THE USE, MODIFICATION, OR
REDISTRIBUTION OF THIS SOFTWARE.
*/
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
#define USE_GLEW 1
#endif
@@ -120,7 +120,7 @@ int main(int argc, char *argv[])
glClearColor( 0, 0, 0, 0 );
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
glEnable( GL_TEXTURE_2D ); // Need this to display a texture XXX unnecessary in OpenGL ES 2.0/WebGL
#endif
@@ -219,7 +219,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
// Wait for 3 seconds to give us a chance to see the image
SDL_Delay(3000);
#endif
diff --git a/tests/gl_ps_packed.c b/tests/gl_ps_packed.c
index 9ab99cb8..be139cd9 100644
--- a/tests/gl_ps_packed.c
+++ b/tests/gl_ps_packed.c
@@ -22,7 +22,7 @@ RESULTING FROM THE USE, MODIFICATION, OR
REDISTRIBUTION OF THIS SOFTWARE.
*/
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
#define USE_GLEW 1
#endif
@@ -104,7 +104,7 @@ int main(int argc, char *argv[])
glClearColor( 0, 0, 0, 0 );
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
glEnable( GL_TEXTURE_2D ); // Need this to display a texture XXX unnecessary in OpenGL ES 2.0/WebGL
#endif
@@ -216,7 +216,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
// Wait for 3 seconds to give us a chance to see the image
SDL_Delay(3000);
#endif
diff --git a/tests/gl_ps_strides.c b/tests/gl_ps_strides.c
index d88f5d0b..1ff28c94 100644
--- a/tests/gl_ps_strides.c
+++ b/tests/gl_ps_strides.c
@@ -22,7 +22,7 @@ RESULTING FROM THE USE, MODIFICATION, OR
REDISTRIBUTION OF THIS SOFTWARE.
*/
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
#define USE_GLEW 1
#endif
@@ -120,7 +120,7 @@ int main(int argc, char *argv[])
glClearColor( 0, 0, 0, 0 );
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
glEnable( GL_TEXTURE_2D ); // Need this to display a texture XXX unnecessary in OpenGL ES 2.0/WebGL
#endif
@@ -227,7 +227,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
// Wait for 3 seconds to give us a chance to see the image
SDL_Delay(3000);
#endif
diff --git a/tests/gl_renderers.c b/tests/gl_renderers.c
index 0a8e6e78..ca6e828e 100644
--- a/tests/gl_renderers.c
+++ b/tests/gl_renderers.c
@@ -22,7 +22,7 @@ RESULTING FROM THE USE, MODIFICATION, OR
REDISTRIBUTION OF THIS SOFTWARE.
*/
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
#define USE_GLEW 0
#endif
@@ -62,7 +62,7 @@ int main(int argc, char *argv[])
glClearColor( 0, 0, 0, 0 );
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
glEnable( GL_TEXTURE_2D ); // Need this to display a texture XXX unnecessary in OpenGL ES 2.0/WebGL
#endif
@@ -180,7 +180,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
// Wait for 3 seconds to give us a chance to see the image
SDL_Delay(3000);
#endif
diff --git a/tests/gl_stride.c b/tests/gl_stride.c
index c254ad5a..d6cf1fd2 100644
--- a/tests/gl_stride.c
+++ b/tests/gl_stride.c
@@ -22,7 +22,7 @@ RESULTING FROM THE USE, MODIFICATION, OR
REDISTRIBUTION OF THIS SOFTWARE.
*/
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
#define USE_GLEW 0
#endif
@@ -62,7 +62,7 @@ int main(int argc, char *argv[])
glClearColor( 0, 0, 0, 0 );
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
glEnable( GL_TEXTURE_2D ); // Need this to display a texture XXX unnecessary in OpenGL ES 2.0/WebGL
#endif
@@ -141,7 +141,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
// Wait for 3 seconds to give us a chance to see the image
SDL_Delay(3000);
#endif
diff --git a/tests/gl_vertex_buffer.c b/tests/gl_vertex_buffer.c
index 6b695462..73c30d48 100644
--- a/tests/gl_vertex_buffer.c
+++ b/tests/gl_vertex_buffer.c
@@ -22,7 +22,7 @@
REDISTRIBUTION OF THIS SOFTWARE.
*/
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
#define USE_GLEW 0
#endif
@@ -62,7 +62,7 @@ int main(int argc, char *argv[])
glClearColor( 0, 0, 0, 0 );
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
glEnable( GL_TEXTURE_2D ); // Need this to display a texture XXX unnecessary in OpenGL ES 2.0/WebGL
#endif
@@ -184,7 +184,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
// Wait for 3 seconds to give us a chance to see the image
SDL_Delay(3000);
#endif
diff --git a/tests/gl_vertex_buffer_pre.c b/tests/gl_vertex_buffer_pre.c
index 84b76569..fb967d11 100644
--- a/tests/gl_vertex_buffer_pre.c
+++ b/tests/gl_vertex_buffer_pre.c
@@ -22,7 +22,7 @@
REDISTRIBUTION OF THIS SOFTWARE.
*/
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
#define USE_GLEW 0
#endif
@@ -62,7 +62,7 @@ int main(int argc, char *argv[])
glClearColor( 0, 0, 0, 0 );
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
glEnable( GL_TEXTURE_2D ); // Need this to display a texture XXX unnecessary in OpenGL ES 2.0/WebGL
#endif
@@ -166,7 +166,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
// Wait for 3 seconds to give us a chance to see the image
SDL_Delay(3000);
#endif
diff --git a/tests/glbegin_points.c b/tests/glbegin_points.c
index 9128a4f5..ae061bb2 100644
--- a/tests/glbegin_points.c
+++ b/tests/glbegin_points.c
@@ -150,7 +150,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#if !defined(__EMSCRIPTEN__)
// Wait for 3 seconds to give us a chance to see the image
SDL_Delay(3000);
#endif
diff --git a/tests/glgettexenv.c b/tests/glgettexenv.c
index a051a690..54bf2af8 100644
--- a/tests/glgettexenv.c
+++ b/tests/glgettexenv.c
@@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR
REDISTRIBUTION OF THIS SOFTWARE.
*/
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
#define USE_GLEW 1
#endif
diff --git a/tests/hello_world.ll b/tests/hello_world.ll
index 19f84851..7090b732 100644
--- a/tests/hello_world.ll
+++ b/tests/hello_world.ll
@@ -1,17 +1,16 @@
; ModuleID = 'tests/hello_world.bc'
-target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
-target triple = "le32-unknown-nacl"
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:128-n32-S128"
+target triple = "asmjs-unknown-emscripten"
-@.str = private unnamed_addr constant [15 x i8] c"hello, world!\0A\00", align 1 ; [#uses=1 type=[15 x i8]*]
+@.str = private unnamed_addr constant [15 x i8] c"hello, world!\0A\00", align 1
-; [#uses=0]
define i32 @main() {
entry:
- %retval = alloca i32, align 4 ; [#uses=1 type=i32*]
+ %retval = alloca i32, align 4
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]
+ %call = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([15 x i8]* @.str, i32 0, i32 0))
ret i32 1
}
-; [#uses=1]
declare i32 @printf(i8*, ...)
+
diff --git a/tests/hello_world_gles.c b/tests/hello_world_gles.c
index 78595a49..f05cf052 100644
--- a/tests/hello_world_gles.c
+++ b/tests/hello_world_gles.c
@@ -547,6 +547,10 @@ gears_draw(void)
draw_gear(gear3, transform, -3.1, 4.2, -2 * angle - 25.0, blue);
glutSwapBuffers();
+
+#ifdef LONGTEST
+ glutPostRedisplay(); // check for issues with not throttling calls
+#endif
}
/**
@@ -621,6 +625,14 @@ gears_idle(void)
fps);
tRate0 = t;
frames = 0;
+#ifdef LONGTEST
+ static runs = 0;
+ runs++;
+ if (runs == 4) {
+ int result = fps;
+ REPORT_RESULT();
+ }
+#endif
}
}
diff --git a/tests/mem_init.cpp b/tests/mem_init.cpp
new file mode 100644
index 00000000..e642bfc9
--- /dev/null
+++ b/tests/mem_init.cpp
@@ -0,0 +1,24 @@
+#include <stdio.h>
+#include <emscripten.h>
+
+extern "C" {
+
+int noted = 0;
+
+void EMSCRIPTEN_KEEPALIVE note(int n) {
+ EM_ASM_({ Module.print([$0, $1]) }, n, noted);
+ noted = noted | n;
+ EM_ASM_({ Module.print(['noted is now', $0]) }, noted);
+ if (noted == 3) {
+ int result = noted;
+ REPORT_RESULT();
+ }
+}
+
+}
+
+int main() {
+ EM_ASM( myJSCallback() ); // calls a global JS func
+ return 0;
+}
+
diff --git a/tests/module/test_stdin.c b/tests/module/test_stdin.c
index 319c686c..2772fcf0 100644
--- a/tests/module/test_stdin.c
+++ b/tests/module/test_stdin.c
@@ -3,7 +3,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
#include <emscripten.h>
#endif
@@ -48,7 +48,7 @@ int main(int argc, char const *argv[])
// should exit out after calling main_loop once.
main_loop();
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
emscripten_set_main_loop(main_loop, 60, 0);
#else
while (1) main_loop(); sleep(1);
diff --git a/tests/nbody-java/native_java_lang_String.c b/tests/nbody-java/native_java_lang_String.c
index 5ccf21df..c55e5412 100644
--- a/tests/nbody-java/native_java_lang_String.c
+++ b/tests/nbody-java/native_java_lang_String.c
@@ -10,7 +10,7 @@
JAVA_INT java_lang_String_toLowerCaseImpl___int(JAVA_OBJECT me, JAVA_INT n1)
{
//XMLVM_BEGIN_NATIVE[java_lang_String_toLowerCaseImpl___int]
-#ifdef EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
return tolower(n1);
#else
return towlower(n1);
@@ -21,7 +21,7 @@ JAVA_INT java_lang_String_toLowerCaseImpl___int(JAVA_OBJECT me, JAVA_INT n1)
JAVA_INT java_lang_String_toUpperCaseImpl___int(JAVA_OBJECT me, JAVA_INT n1)
{
//XMLVM_BEGIN_NATIVE[java_lang_String_toUpperCaseImpl___int]
-#ifdef EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
return toupper(n1);
#else
return towupper(n1);
diff --git a/tests/nbody-java/native_java_lang_System.c b/tests/nbody-java/native_java_lang_System.c
index 861781ca..201f8beb 100644
--- a/tests/nbody-java/native_java_lang_System.c
+++ b/tests/nbody-java/native_java_lang_System.c
@@ -97,7 +97,7 @@ JAVA_OBJECT java_lang_System_getEncoding___int(JAVA_INT n1)
{
//XMLVM_BEGIN_NATIVE[java_lang_System_getEncoding___int]
//Get charset from the OS
-#ifdef EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
return xmlvm_create_java_string("UTF-8");
#else
char charset[CHARSETBUFF];
diff --git a/tests/nbody-java/xmlvm.c b/tests/nbody-java/xmlvm.c
index 35e04d16..dedf1bc6 100644
--- a/tests/nbody-java/xmlvm.c
+++ b/tests/nbody-java/xmlvm.c
@@ -102,7 +102,7 @@ void xmlvm_init()
xmlvm_clear_constant_pool_cache();
#ifndef XMLVM_NO_GC
-#ifndef EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
GC_finalize_on_demand = 1;
GC_java_finalization = 1;
java_lang_Thread* finalizerThread = (java_lang_Thread*) org_xmlvm_runtime_FinalizerNotifier_startFinalizerThread__();
@@ -115,7 +115,7 @@ void xmlvm_init()
void xmlvm_destroy(java_lang_Thread* mainThread)
{
-#ifdef EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
return; // Let the JS engine handle clean up
#endif
diff --git a/tests/nbody-java/xmlvm.h b/tests/nbody-java/xmlvm.h
index 0d931565..04f645db 100644
--- a/tests/nbody-java/xmlvm.h
+++ b/tests/nbody-java/xmlvm.h
@@ -22,7 +22,7 @@
#ifndef __XMLVM_H__
#define __XMLVM_H__
-#ifdef EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
// Workaround definitions for Emscripten
// TODO: Determine if different solution is needed
diff --git a/tests/openal_buffers.c b/tests/openal_buffers.c
index 31104a33..df6d8e3f 100644
--- a/tests/openal_buffers.c
+++ b/tests/openal_buffers.c
@@ -1,7 +1,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
-#ifdef EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
#include <emscripten.h>
#include <AL/al.h>
#include <AL/alc.h>
@@ -68,7 +68,7 @@ void iter() {
// Exit once we've processed the entire clip.
if (offset >= size) {
-#ifdef EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
int result = 0;
REPORT_RESULT();
#endif
@@ -87,7 +87,7 @@ int main(int argc, char* argv[]) {
//
// Read in the audio sample.
//
-#ifdef EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
FILE* fp = fopen("the_entertainer.wav", "rb");
#else
FILE* fp = fopen("sounds/the_entertainer.wav", "rb");
@@ -176,7 +176,7 @@ int main(int argc, char* argv[]) {
//
// Cycle and refill the buffers until we're done.
//
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
emscripten_set_main_loop(iter, 0, 0);
#else
while (1) {
diff --git a/tests/openal_playback.cpp b/tests/openal_playback.cpp
index 6a8dae38..46c4f8a3 100644
--- a/tests/openal_playback.cpp
+++ b/tests/openal_playback.cpp
@@ -5,7 +5,7 @@
#include <assert.h>
#include <stdint.h>
#include <unistd.h>
-#ifdef EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
#include <emscripten.h>
#endif
@@ -25,7 +25,7 @@ void playSource(void* arg)
alGetSourcei(source, AL_SOURCE_STATE, &state);
assert(state == AL_STOPPED);
-#ifdef EMSCRIPTEN
+#ifdef REPORT_RESULT
int result = 1;
REPORT_RESULT();
#endif
@@ -63,7 +63,7 @@ int main() {
alGenBuffers(1, buffers);
-#ifdef EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
FILE* source = fopen("audio.wav", "rb");
#else
FILE* source = fopen("sounds/audio.wav", "rb");
@@ -146,7 +146,7 @@ int main() {
alGetSourcei(sources[0], AL_SOURCE_STATE, &state);
assert(state == AL_PLAYING);
-#ifdef EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
emscripten_async_call(playSource, reinterpret_cast<void*>(sources[0]), 700);
#else
usleep(700000);
diff --git a/tests/perspective.c b/tests/perspective.c
index 72f4c50f..77998557 100644
--- a/tests/perspective.c
+++ b/tests/perspective.c
@@ -8,7 +8,7 @@
#include <SDL/SDL.h>
-#ifdef EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
#include <GL/gl.h>
#include <GL/glu.h>
#include "emscripten.h"
@@ -19,7 +19,7 @@
#include <stdio.h>
#include <stdlib.h>
-#ifdef EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
#define emColor4ubv(x)
#else
#define emColor4ubv(x) glColor4ubv(x)
@@ -392,7 +392,7 @@ int main( int argc, char* argv[] )
*/
one_iter(); // just one for testing purposes
-#ifndef EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
SDL_Delay(2000);
#endif
diff --git a/tests/poppler/utils/pdftoppm.cc b/tests/poppler/utils/pdftoppm.cc
index 4df0f5d8..a6865cc6 100644
--- a/tests/poppler/utils/pdftoppm.cc
+++ b/tests/poppler/utils/pdftoppm.cc
@@ -183,7 +183,7 @@ static void savePageSlice(PDFDoc *doc,
bitmap->writePNMFile(ppmFile);
}
} else {
-#if EMSCRIPTEN // XXX EMSCRIPTEN: avoid writing to stdout, better for benchmarking
+#ifdef __EMSCRIPTEN__ // XXX EMSCRIPTEN: avoid writing to stdout, better for benchmarking
printf("avoiding writing to stdout\n");
#else
diff --git a/tests/python/python.le32.bc b/tests/python/python.asmjs-unknown-emscripten.bc
index 2a6bc77c..fe848c20 100644
--- a/tests/python/python.le32.bc
+++ b/tests/python/python.asmjs-unknown-emscripten.bc
Binary files differ
diff --git a/tests/runner.py b/tests/runner.py
index 501299c7..87f8a036 100755
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -27,6 +27,19 @@ sys.path += [path_from_root(''), path_from_root('third_party/websockify')]
import tools.shared
from tools.shared import *
+# Utils
+
+def nonfastcomp(test):
+ try:
+ old_fastcomp = os.environ.get('EMCC_FAST_COMPILER')
+ os.environ['EMCC_FAST_COMPILER'] = '0'
+ test()
+ finally:
+ if old_fastcomp is None:
+ del os.environ['EMCC_FAST_COMPILER']
+ else:
+ os.environ['EMCC_FAST_COMPILER'] = old_fastcomp
+
# Sanity check for config
try:
@@ -36,10 +49,7 @@ except:
# Core test runner class, shared between normal tests and benchmarks
checked_sanity = False
-if os.environ.get('EMCC_FAST_COMPILER') == '1':
- test_modes = ['default', 'asm1', 'asm2', 'asm3', 'asm2f', 'asm2g']
-else:
- test_modes = ['default', 'o1', 'o2', 'asm1', 'asm2', 'asm3', 'asm2f', 'asm2g', 'asm2x86', 's_0_0', 's_0_1']
+test_modes = ['default', 'asm1', 'asm2', 'asm3', 'asm2f', 'asm2g', 'slow2', 'slow2asm', 's_0_0', 's_0_1']
test_index = 0
class RunnerCore(unittest.TestCase):
@@ -244,7 +254,7 @@ process(sys.argv[1])
if 'uccessfully compiled asm.js code' in err and 'asm.js link error' not in err:
print >> sys.stderr, "[was asm.js'ified]"
elif 'asm.js' in err: # if no asm.js error, then not an odin build
- raise Exception("did NOT asm.js'ify")
+ raise Exception("did NOT asm.js'ify: " + err)
err = '\n'.join(filter(lambda line: 'uccessfully compiled asm.js code' not in line, err.split('\n')))
return err
@@ -342,7 +352,7 @@ process(sys.argv[1])
build_dir = self.get_build_dir()
output_dir = self.get_dir()
- cache_name = name + str(Building.COMPILER_TEST_OPTS) + cache_name_extra + (self.env.get('EMCC_LLVM_TARGET') or '')
+ cache_name = name + str(Building.COMPILER_TEST_OPTS) + cache_name_extra + (self.env.get('EMCC_LLVM_TARGET') or '_') + (self.env.get('EMCC_FAST_COMPILER') or '_')
valid_chars = "_%s%s" % (string.ascii_letters, string.digits)
cache_name = ''.join([(c if c in valid_chars else '_') for c in cache_name])
@@ -573,7 +583,7 @@ class BrowserCore(RunnerCore):
def with_report_result(self, code):
return r'''
- #if EMSCRIPTEN
+ #ifdef __EMSCRIPTEN__
#include <emscripten.h>
#define REPORT_RESULT_INTERNAL(sync) \
char output[1000]; \
@@ -769,23 +779,20 @@ A recommended order is:
(the main test suite)
other - tests separate from the main suite
browser - runs pages in a web browser
+ interactive - runs interactive browser tests that need human verification, and could not be automated
sockets - runs websocket networking tests
benchmark - run before and after each set of changes before pushing to
master, verify no regressions
-There are also commands to run specific subsets of the test suite:
-
- browser.audio - runs audio tests in a web browser (requires human verification)
-
To run one of those parts, do something like
python tests/runner.py sanity
To run a specific set of tests, you can do things like
- python tests/runner.py o1
+ python tests/runner.py asm2
-(that runs the o1 (-O1) tests). You can run individual tests with
+(that runs the asm2 (asm.js, -O2) tests). You can run individual tests with
python tests/runner.py test_hello_world
diff --git a/tests/s3tc.c b/tests/s3tc.c
index 5f7bee83..ca575ffc 100644
--- a/tests/s3tc.c
+++ b/tests/s3tc.c
@@ -143,7 +143,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
// Wait for 3 seconds to give us a chance to see the image
SDL_Delay(1500);
#endif
diff --git a/tests/s3tc_crunch.c b/tests/s3tc_crunch.c
index c2606c8f..ae5e1228 100644
--- a/tests/s3tc_crunch.c
+++ b/tests/s3tc_crunch.c
@@ -195,7 +195,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
// Wait for 3 seconds to give us a chance to see the image
SDL_Delay(1500);
#endif
diff --git a/tests/sdl_alloctext.c b/tests/sdl_alloctext.c
index 173be348..b7e9e6cf 100644
--- a/tests/sdl_alloctext.c
+++ b/tests/sdl_alloctext.c
@@ -25,7 +25,7 @@ int main()
SDL_FreeSurface(text);
}
-#if __EMSCRIPTEN__
+#ifdef __EMSCRIPTEN__
result = 1;
REPORT_RESULT();
#endif
diff --git a/tests/sdl_audio_beep.cpp b/tests/sdl_audio_beep.cpp
index 95a5a7e8..82001e8a 100644
--- a/tests/sdl_audio_beep.cpp
+++ b/tests/sdl_audio_beep.cpp
@@ -9,7 +9,7 @@
#define M_PI 3.14159265358979323846f
#endif
-#ifdef EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
#include "emscripten/emscripten.h"
#endif
@@ -170,7 +170,7 @@ void nextTest(void *unused = 0) {
++s;
if (s >= NUM_ELEMS(sdlAudioFormats)) {
printf("All tests done. Quit.\n");
-#ifdef EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
emscripten_cancel_main_loop();
#ifdef REPORT_RESULT
int result = 1;
@@ -204,7 +204,7 @@ void update() {
if (size == 0 && beep) {
delete beep;
beep = 0;
-#ifdef EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
emscripten_async_call(nextTest, 0, 1500);
#else
SDL_Delay(1500);
@@ -233,7 +233,7 @@ int main(int argc, char** argv) {
nextTest();
-#ifdef EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
emscripten_set_main_loop(update, 60, 0);
#else
while(beep) {
diff --git a/tests/sdl_audio_mix_channels.c b/tests/sdl_audio_mix_channels.c
index dd91d594..73d21963 100644
--- a/tests/sdl_audio_mix_channels.c
+++ b/tests/sdl_audio_mix_channels.c
@@ -42,7 +42,7 @@ int main(int argc, char **argv) {
int lastChannel = loadAndPlay();
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
int result = (lastChannel == -1);
REPORT_RESULT();
#endif
diff --git a/tests/sdl_canvas.c b/tests/sdl_canvas.c
index cab48985..4420d73e 100644
--- a/tests/sdl_canvas.c
+++ b/tests/sdl_canvas.c
@@ -6,7 +6,7 @@
int main(int argc, char **argv) {
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
// include GL stuff, to check that we can compile hybrid 2d/GL apps
extern void glBegin(int mode);
extern void glBindBuffer(int target, int buffer);
diff --git a/tests/sdl_canvas_size.c b/tests/sdl_canvas_size.c
index 923a9014..0d184823 100644
--- a/tests/sdl_canvas_size.c
+++ b/tests/sdl_canvas_size.c
@@ -30,7 +30,7 @@ REDISTRIBUTION OF THIS SOFTWARE.
#include <string.h>
#include <assert.h>
-#ifdef EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
#include <emscripten.h>
#endif
@@ -46,7 +46,7 @@ int main(int argc, char *argv[])
SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1 ); // *new*
-#ifdef EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
// Test 1: Check that initializing video mode with size (0,0) will use the size from the <canvas> element.
screen = SDL_SetVideoMode( 0, 0, 16, SDL_OPENGL ); // *changed*
@@ -177,7 +177,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
// Wait for 3 seconds to give us a chance to see the image
SDL_Delay(3000);
#endif
diff --git a/tests/sdl_canvas_twice.c b/tests/sdl_canvas_twice.c
index 28a7a01c..ba62846b 100644
--- a/tests/sdl_canvas_twice.c
+++ b/tests/sdl_canvas_twice.c
@@ -1,6 +1,6 @@
#include <SDL/SDL.h>
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
#include <emscripten.h>
#endif
diff --git a/tests/sdl_fog_density.c b/tests/sdl_fog_density.c
index cab6a4d2..46d4a8a1 100644
--- a/tests/sdl_fog_density.c
+++ b/tests/sdl_fog_density.c
@@ -165,7 +165,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
// Wait for 3 seconds to give us a chance to see the image
SDL_Delay(30000);
#endif
diff --git a/tests/sdl_fog_exp2.c b/tests/sdl_fog_exp2.c
index dba0c708..f813cede 100644
--- a/tests/sdl_fog_exp2.c
+++ b/tests/sdl_fog_exp2.c
@@ -166,7 +166,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#if !defined(__EMSCRIPTEN__)
// Wait for 3 seconds to give us a chance to see the image
SDL_Delay(30000);
#endif
diff --git a/tests/sdl_fog_linear.c b/tests/sdl_fog_linear.c
index f0805650..d7107914 100644
--- a/tests/sdl_fog_linear.c
+++ b/tests/sdl_fog_linear.c
@@ -167,7 +167,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
// Wait for 3 seconds to give us a chance to see the image
SDL_Delay(30000);
#endif
diff --git a/tests/sdl_fog_negative.c b/tests/sdl_fog_negative.c
index 1ede63a7..f99467bb 100644
--- a/tests/sdl_fog_negative.c
+++ b/tests/sdl_fog_negative.c
@@ -164,7 +164,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
// Wait for 3 seconds to give us a chance to see the image
SDL_Delay(30000);
#endif
diff --git a/tests/sdl_fog_simple.c b/tests/sdl_fog_simple.c
index 6c052bf5..269b7432 100644
--- a/tests/sdl_fog_simple.c
+++ b/tests/sdl_fog_simple.c
@@ -167,7 +167,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
// Wait for 3 seconds to give us a chance to see the image
SDL_Delay(30000);
#endif
diff --git a/tests/sdl_free_screen.cpp b/tests/sdl_free_screen.cpp
new file mode 100644
index 00000000..01a849c5
--- /dev/null
+++ b/tests/sdl_free_screen.cpp
@@ -0,0 +1,29 @@
+#include <stdio.h>
+#include <SDL/SDL.h>
+
+
+extern "C" int main(int argc, char** argv) {
+
+ SDL_Init(SDL_INIT_VIDEO);
+ SDL_Surface *screen = SDL_SetVideoMode(256, 256, 32, SDL_SWSURFACE);
+ printf("freeing screen...\n");
+ SDL_FreeSurface(screen);
+ printf("recreating...\n");
+ screen = SDL_SetVideoMode(256, 256, 32, SDL_SWSURFACE);
+ printf("seems ok!\n");
+
+ if (SDL_MUSTLOCK(screen)) SDL_LockSurface(screen);
+ for (int i = 0; i < 256; i++) {
+ for (int j = 0; j < 256; j++) {
+ // alpha component is actually ignored, since this is to the screen
+ *((Uint32*)screen->pixels + i * 256 + j) = SDL_MapRGBA(screen->format, i, j, 255-i, (i+j) % 255);
+ }
+ }
+ if (SDL_MUSTLOCK(screen)) SDL_UnlockSurface(screen);
+ SDL_Flip(screen);
+
+ SDL_Quit();
+
+ return 0;
+}
+
diff --git a/tests/sdl_gfx_primitives.c b/tests/sdl_gfx_primitives.c
index db0c6181..dbf9849c 100644
--- a/tests/sdl_gfx_primitives.c
+++ b/tests/sdl_gfx_primitives.c
@@ -1,7 +1,7 @@
#include "SDL/SDL.h"
#include "SDL/SDL_gfxPrimitives.h"
-#ifdef EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
#include "emscripten.h"
#endif
@@ -31,7 +31,7 @@ int main(int argc, char **argv) {
SDL_UpdateRect(screen, 0, 0, 0, 0);
-#ifndef EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
SDL_Event evt;
SDL_SaveBMP(screen, "native_output.bmp");
while (1) {
diff --git a/tests/sdl_headless.c b/tests/sdl_headless.c
index 349c5e26..e1836777 100644
--- a/tests/sdl_headless.c
+++ b/tests/sdl_headless.c
@@ -6,7 +6,7 @@
int main(int argc, char **argv) {
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
// include GL stuff, to check that we can compile hybrid 2d/GL apps
extern void glBegin(int mode);
extern void glBindBuffer(int target, int buffer);
@@ -57,9 +57,6 @@ int main(int argc, char **argv) {
printf("done.\n");
- int result = sum > 3000 && sum < 5000; // varies a little on different browsers, font differences?
- REPORT_RESULT();
-
return 0;
}
diff --git a/tests/sdl_ogl.c b/tests/sdl_ogl.c
index e7071dcd..78efd7e0 100644
--- a/tests/sdl_ogl.c
+++ b/tests/sdl_ogl.c
@@ -157,7 +157,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
// Wait for 3 seconds to give us a chance to see the image
SDL_Delay(3000);
#endif
diff --git a/tests/sdl_ogl_defaultMatrixMode.c b/tests/sdl_ogl_defaultMatrixMode.c
index eec2a831..6044f1ab 100644
--- a/tests/sdl_ogl_defaultMatrixMode.c
+++ b/tests/sdl_ogl_defaultMatrixMode.c
@@ -158,7 +158,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
// Wait for 3 seconds to give us a chance to see the image
SDL_Delay(3000);
#endif
diff --git a/tests/sdl_ogl_p.c b/tests/sdl_ogl_p.c
index 1889d926..2607f35c 100644
--- a/tests/sdl_ogl_p.c
+++ b/tests/sdl_ogl_p.c
@@ -150,7 +150,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
// Wait for 3 seconds to give us a chance to see the image
SDL_Delay(3000);
#endif
diff --git a/tests/sdl_ogl_proc_alias.c b/tests/sdl_ogl_proc_alias.c
index c96da81b..4c251f83 100644
--- a/tests/sdl_ogl_proc_alias.c
+++ b/tests/sdl_ogl_proc_alias.c
@@ -166,7 +166,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
// Wait for 3 seconds to give us a chance to see the image
SDL_Delay(3000);
#endif
diff --git a/tests/sdl_rotozoom.c b/tests/sdl_rotozoom.c
index 2c0d35df..cc0ee224 100644
--- a/tests/sdl_rotozoom.c
+++ b/tests/sdl_rotozoom.c
@@ -2,7 +2,7 @@
#include "SDL/SDL_image.h"
#include "SDL/SDL_rotozoom.h"
-#ifdef EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
#include "emscripten.h"
#endif
@@ -45,7 +45,7 @@ int main(int argc, char **argv) {
mainloop();
-#ifndef EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
SDL_Event evt;
SDL_SaveBMP(screen, "native_output.bmp");
while (1) {
diff --git a/tests/sdl_swsurface.c b/tests/sdl_swsurface.c
index 93141857..c859dbc7 100644
--- a/tests/sdl_swsurface.c
+++ b/tests/sdl_swsurface.c
@@ -12,7 +12,7 @@ int main(int argc, char** argv) {
SDL_Quit();
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
int result = 1;
REPORT_RESULT();
#endif
diff --git a/tests/sdl_touch.c b/tests/sdl_touch.c
new file mode 100644
index 00000000..dc315c58
--- /dev/null
+++ b/tests/sdl_touch.c
@@ -0,0 +1,81 @@
+#include <stdio.h>
+#include <SDL/SDL.h>
+#include <SDL/SDL_ttf.h>
+#include <assert.h>
+#include <emscripten.h>
+
+int result = 1;
+
+static char *TouchFingerTypeToString(int type) {
+ if (type == SDL_FINGERMOTION) return "SDL_FINGERMOTION";
+ if (type == SDL_FINGERDOWN) return "SDL_FINGERDOWN";
+ if (type == SDL_FINGERUP) return "SDL_FINGERUP";
+ return "UNKNOWN";
+}
+
+int got_down = 0;
+int got_move = 0;
+int got_up = 0;
+
+void progress() {
+ if (!got_down) printf("Hold down a finger to generate a touch down event.\n");
+ else if (!got_move) printf("Drag a finger to generate a touch move event.\n");
+ else if (!got_up) printf("Release a finger to generate a touch up event.\n");
+ else
+ {
+ int result = 0;
+#ifdef REPORT_RESULT
+ REPORT_RESULT();
+#endif
+ }
+}
+
+void loop() {
+ SDL_Event event;
+ while (SDL_PollEvent(&event)) {
+ switch(event.type) {
+ case SDL_FINGERMOTION:
+ case SDL_FINGERDOWN:
+ case SDL_FINGERUP: {
+ SDL_TouchFingerEvent *t = (SDL_TouchFingerEvent*)&event;
+ printf("type: %s, timestamp: %u, touchId: %llu, fingerId: %llu, x: %f, y: %f, dx: %f, dy: %f, pressure: %f\n",
+ TouchFingerTypeToString(event.type), t->timestamp, t->touchId, t->fingerId, t->x, t->y, t->dx, t->dy, t->pressure);
+
+ if (t->timestamp != 0 && t->x >= 0.f && t->x <= 1.f && t->y >= 0.f && t->y <= 1.f && t->pressure >= 0.f && t->pressure <= 1.f) {
+ if (event.type == SDL_FINGERDOWN) { got_down = 1; progress(); }
+ if (event.type == SDL_FINGERMOTION) { got_move = 1; progress(); }
+ if (event.type == SDL_FINGERDOWN) { got_up = 1; progress(); }
+ }
+ break;
+ }
+ }
+ }
+}
+
+int main() {
+ SDL_Init(SDL_INIT_VIDEO);
+ SDL_Surface *screen = SDL_SetVideoMode(600, 450, 32, SDL_HWSURFACE);
+
+ progress();
+
+#ifdef AUTOMATE_SUCCESS
+ EM_ASM(
+ function sendEvent(type, data) {
+ var event = document.createEvent('Event');
+ event.initEvent(type, true, true);
+ for(var d in data) event[d] = data[d];
+ Module['canvas'].dispatchEvent(event);
+ }
+ // Pass test coordinates in canvas element coordinate frame.
+ var x = Module['canvas'].getBoundingClientRect().left;
+ var y = Module['canvas'].getBoundingClientRect().top;
+ sendEvent('touchstart', { touches: [ { pageX: x+300, pageY: y+225, deviceID: 1, identifier: 1, force: 1 } ] });
+ sendEvent('touchmove', { touches: [ { pageX: x+400, pageY: y+225, deviceID: 1, identifier: 1, force: 1 } ] });
+ sendEvent('touchend', { changedTouches: [ { pageX: x+400, pageY: y+225, deviceID: 1, identifier: 1, force: 1 } ] });
+ );
+#endif
+
+ emscripten_set_main_loop(loop, 0, 0);
+
+ return 0;
+}
diff --git a/tests/sdl_wm_togglefullscreen.c b/tests/sdl_wm_togglefullscreen.c
new file mode 100644
index 00000000..c76ced76
--- /dev/null
+++ b/tests/sdl_wm_togglefullscreen.c
@@ -0,0 +1,78 @@
+#include <stdio.h>
+#include <SDL/SDL.h>
+#include <SDL/SDL_ttf.h>
+#include <assert.h>
+#include <emscripten.h>
+
+int result = 1;
+
+SDL_Surface *screen = 0;
+
+int inFullscreen = 0;
+
+int wasFullscreen = 0;
+
+void render() {
+ int width, height, isfs;
+ emscripten_get_canvas_size(&width, &height, &isfs);
+ SDL_Rect rect = { 0, 0, width, height };
+ SDL_FillRect(screen, &rect, 0xff00ffff);
+}
+
+void mainloop() {
+ render();
+ SDL_Event event;
+ int isInFullscreen = EM_ASM_INT_V(return !!(document.fullscreenElement || document.mozFullScreenElement || document.webkitFullscreenElement || document.msFullscreenElement));
+ if (isInFullscreen && !wasFullscreen) {
+ printf("Successfully transitioned to fullscreen mode!\n");
+ wasFullscreen = isInFullscreen;
+ }
+
+ if (wasFullscreen && !isInFullscreen) {
+ printf("Exited fullscreen. Test succeeded.\n");
+ result = 1;
+#ifdef REPORT_RESULT
+ REPORT_RESULT();
+#endif
+ wasFullscreen = isInFullscreen;
+ emscripten_cancel_main_loop();
+ return;
+ }
+
+ int haveEvent = SDL_PollEvent(&event);
+ if (haveEvent) {
+ switch(event.type) {
+ case SDL_MOUSEBUTTONDOWN: {
+ SDL_WM_ToggleFullScreen(screen);
+ inFullscreen = 1 - inFullscreen;
+ if (inFullscreen == 0) {
+ result = wasFullscreen;
+ if (result) {
+ printf("Exited fullscreen. Test succeeded.\n");
+ } else {
+ printf("Exited fullscreen. Test failed, fullscreen transition did not happen!\n");
+ }
+#ifdef REPORT_RESULT
+ REPORT_RESULT();
+#endif
+ emscripten_cancel_main_loop();
+ return;
+ } else {
+ printf("Entering fullscreen...\n");
+ }
+ break;
+ }
+ }
+ }
+}
+
+int main() {
+ SDL_Init(SDL_INIT_VIDEO);
+ screen = SDL_SetVideoMode(600, 450, 32, SDL_HWSURFACE);
+
+ printf("You should see a yellow canvas.\n");
+ printf("Click on the canvas to enter full screen, and then click on the canvas again to finish the test.\n");
+ printf("When in full screen, you should see the whole screen filled yellow, and after exiting, the yellow canvas should be restored in the window.\n");
+ emscripten_set_main_loop(mainloop, 0, 0);
+ return 0;
+}
diff --git a/tests/sdlglshader.c b/tests/sdlglshader.c
index 9cd80097..d629ca94 100644
--- a/tests/sdlglshader.c
+++ b/tests/sdlglshader.c
@@ -148,7 +148,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
SDL_Delay(3000);
#endif
diff --git a/tests/sockets/p2p/.gitignore b/tests/sockets/p2p/.gitignore
new file mode 100644
index 00000000..065a4ac0
--- /dev/null
+++ b/tests/sockets/p2p/.gitignore
@@ -0,0 +1,2 @@
+node_modules
+ssl
diff --git a/tests/sockets/p2p/broker/p2p-broker.js b/tests/sockets/p2p/broker/p2p-broker.js
new file mode 100644
index 00000000..028eb25b
--- /dev/null
+++ b/tests/sockets/p2p/broker/p2p-broker.js
@@ -0,0 +1,231 @@
+var crypto = require('crypto');
+var fs = require('fs');
+var https = require('https');
+
+var SSL_KEY = 'ssl/ssl.key';
+var SSL_CERT = 'ssl/ssl-unified.crt';
+var PORT = 8080;
+
+var sslSupported = false;
+if(fs.existsSync(SSL_KEY) && fs.existsSync(SSL_CERT) && fs.statSync(SSL_KEY).isFile() && fs.statSync(SSL_CERT).isFile()) {
+ sslSupported = true;
+}
+
+function handler(req, res) {
+ res.writeHead(200);
+ res.end("p2p");
+};
+
+var app, port;
+if(sslSupported) {
+ var sslopts = {
+ key: fs.readFileSync(SSL_KEY),
+ cert: fs.readFileSync(SSL_CERT)
+ };
+ sslopts.agent = new https.Agent(sslopts);
+ app = require('https').createServer(sslopts, handler);
+ port = 8081;
+ console.info('ssl mode enabled');
+} else {
+ app = require('http').createServer(handler);
+ port = 8080;
+ console.info('ssl mode disabled');
+}
+console.info('listening on port', port);
+
+var io = require('socket.io').listen(app, {
+ 'log level': 2
+});
+
+app.listen(port);
+
+var jsMime = {
+ type: 'application/javascript',
+ encoding: 'utf8',
+ gzip: true
+};
+
+io.static.add('/p2p-client.js', {
+ mime: jsMime,
+ file: 'client/p2p-client.js'
+});
+
+/*
+io.static.add('/p2p-client.min.js', {
+ mime: jsMime,
+ file: 'client/p2p-client.min.js'
+});
+*/
+
+function mkguid() {
+ return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
+ var r = Math.random()*16|0, v = c == 'x' ? r : (r&0x3|0x8);
+ return v.toString(16);
+ }).toUpperCase();
+};
+
+var peers = {};
+var hosts = {};
+
+var E = {
+ OK: 'ok'
+ , NOROUTE: 'no such route'
+ , ISNOTHOST: 'peer is not a host'
+};
+
+function Peer(socket) {
+ this.socket = socket;
+ this.host = null;
+};
+
+function Host(options) {
+ this.route = options['route'];
+ this.url = options['url'];
+ this.listed = (undefined !== options['listed']) ? options['listed'] : false;
+ this.metadata = options['metadata'] || {};
+ this.ctime = Date.now();
+ this.mtime = Date.now();
+};
+Host.prototype.update = function update(options) {
+ this.url = options['url'];
+ this.listed = (undefined !== options['listed']) ? options['listed'] : false;
+ this.metadata = options['metadata'] || {};
+ this.mtime = Date.now();
+};
+
+io.of('/peer').on('connection', function(socket) {
+ var route = crypto.createHash('md5').update(socket['id']).digest('hex');
+ socket.emit('route', route);
+
+ socket.on('disconnect', function() {
+ if(hosts[route]) {
+ var host = hosts[route];
+ changeList('remove', host);
+ }
+ delete hosts[route];
+ delete peers[route];
+ });
+
+ socket.on('send', function(message, callback) {
+ var to = message['to'];
+
+ if(!peers.hasOwnProperty(to)) {
+ callback({'error': E.NOROUTE});
+ return;
+ }
+
+ var from = route;
+ var data = message['data'];
+ peers[to].emit('receive', {
+ 'from': from,
+ 'data': data
+ });
+ });
+
+ socket.on('listen', function(options, callback) {
+ options['route'] = route;
+ if(hosts.hasOwnProperty(route)) {
+ hosts[route].update(options);
+ changeList('update', hosts[route]);
+ } else {
+ hosts[route] = new Host(options);
+ changeList('append', hosts[route]);
+ }
+
+ callback();
+ });
+
+ socket.on('ignore', function(message, callback) {
+ if(!hosts.hasOwnProperty(route)) {
+ callback({'error': E.ISNOTHOST});
+ return;
+ }
+
+ var host = hosts[route];
+ delete hosts[route];
+
+ changeList('remove', host);
+
+ callback();
+ });
+
+ peers[route] = socket;
+});
+
+function Filter(socket, options) {
+ this.options = options || {};
+ this.socket = socket;
+};
+Filter.prototype.test = function test(host) {
+ var filter = this.options;
+ var result;
+
+ if(filter['url'] && typeof host['url'] === 'string') {
+ try {
+ result = host['url'].match(filter['url']);
+ if(!result)
+ return true;
+ } catch(e) {
+ return true;
+ }
+ }
+
+ if(filter['metadata'] && host['metadata']) {
+ var metadataFilter = filter['metadata'];
+ var metadataHost = host['metadata'];
+
+ if(metadataFilter['name'] && typeof metadataHost['name'] === 'string') {
+ try {
+ result = metadataHost['name'].match(metadataFilter['name']);
+ if(!result)
+ return true;
+ } catch(e) {
+ return true;
+ }
+ }
+ }
+
+ return false;
+};
+
+var lists = {};
+
+function changeList(operation, host) {
+ var clients = Object.keys(lists);
+ clients.forEach(function(client) {
+ var filter = lists[client];
+ if(!host['listed'])
+ return;
+ if(!filter.test(host)) {
+ var data = operation === 'remove' ? host['route'] : host;
+ filter.socket.emit(operation, data);
+ }
+ });
+};
+
+io.of('/list').on('connection', function(socket) {
+ var id = socket['id'];
+
+ socket.on('disconnect', function() {
+ delete lists[id];
+ });
+
+ socket.on('list', function(options) {
+ var filter = new Filter(socket, options);
+
+ var result = [];
+
+ var hostIds = Object.keys(hosts);
+ hostIds.forEach(function(hostId) {
+ var host = hosts[hostId];
+ if(!host['listed'])
+ return;
+ if(!filter.test(host))
+ result.push(host);
+ });
+
+ lists[id] = filter;
+
+ socket.emit('truncate', result);
+ });
+});
diff --git a/tests/sockets/p2p/client/p2p-client.js b/tests/sockets/p2p/client/p2p-client.js
new file mode 100644
index 00000000..2c660210
--- /dev/null
+++ b/tests/sockets/p2p/client/p2p-client.js
@@ -0,0 +1,4485 @@
+
+;(function(define, global) { 'use strict';
+define(['module'], function(module) {
+
+ /*! Socket.IO.js build:0.9.11, development. Copyright(c) 2011 LearnBoost <dev@learnboost.com> MIT Licensed
+ Modified to work in-line; Removed Flash transport code */
+ var io = ('undefined' === typeof module ? {} : module.exports);
+ (function() {
+
+ /**
+ * socket.io
+ * Copyright(c) 2011 LearnBoost <dev@learnboost.com>
+ * MIT Licensed
+ */
+
+ (function (exports, global) {
+
+ /**
+ * IO namespace.
+ *
+ * @namespace
+ */
+
+ var io = exports;
+
+ /**
+ * Socket.IO version
+ *
+ * @api public
+ */
+
+ io.version = '0.9.11';
+
+ /**
+ * Protocol implemented.
+ *
+ * @api public
+ */
+
+ io.protocol = 1;
+
+ /**
+ * Available transports, these will be populated with the available transports
+ *
+ * @api public
+ */
+
+ io.transports = [];
+
+ /**
+ * Keep track of jsonp callbacks.
+ *
+ * @api private
+ */
+
+ io.j = [];
+
+ /**
+ * Keep track of our io.Sockets
+ *
+ * @api private
+ */
+ io.sockets = {};
+
+
+ /**
+ * Manages connections to hosts.
+ *
+ * @param {String} uri
+ * @Param {Boolean} force creation of new socket (defaults to false)
+ * @api public
+ */
+
+ io.connect = function (host, details) {
+ var uri = io.util.parseUri(host)
+ , uuri
+ , socket;
+
+ if (global && global.location) {
+ uri.protocol = uri.protocol || global.location.protocol.slice(0, -1);
+ uri.host = uri.host || (global.document
+ ? global.document.domain : global.location.hostname);
+ uri.port = uri.port || global.location.port;
+ }
+
+ uuri = io.util.uniqueUri(uri);
+
+ var options = {
+ host: uri.host
+ , secure: 'https' == uri.protocol
+ , port: uri.port || ('https' == uri.protocol ? 443 : 80)
+ , query: uri.query || ''
+ };
+
+ io.util.merge(options, details);
+
+ if (options['force new connection'] || !io.sockets[uuri]) {
+ socket = new io.Socket(options);
+ }
+
+ if (!options['force new connection'] && socket) {
+ io.sockets[uuri] = socket;
+ }
+
+ socket = socket || io.sockets[uuri];
+
+ // if path is different from '' or /
+ return socket.of(uri.path.length > 1 ? uri.path : '');
+ };
+
+ })('object' === typeof module ? module.exports : (io = {}), global);
+ /**
+ * socket.io
+ * Copyright(c) 2011 LearnBoost <dev@learnboost.com>
+ * MIT Licensed
+ */
+
+ (function (exports, global) {
+
+ /**
+ * Utilities namespace.
+ *
+ * @namespace
+ */
+
+ var util = exports.util = {};
+
+ /**
+ * Parses an URI
+ *
+ * @author Steven Levithan <stevenlevithan.com> (MIT license)
+ * @api public
+ */
+
+ var re = /^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/;
+
+ var parts = ['source', 'protocol', 'authority', 'userInfo', 'user', 'password',
+ 'host', 'port', 'relative', 'path', 'directory', 'file', 'query',
+ 'anchor'];
+
+ util.parseUri = function (str) {
+ var m = re.exec(str || '')
+ , uri = {}
+ , i = 14;
+
+ while (i--) {
+ uri[parts[i]] = m[i] || '';
+ }
+
+ return uri;
+ };
+
+ /**
+ * Produces a unique url that identifies a Socket.IO connection.
+ *
+ * @param {Object} uri
+ * @api public
+ */
+
+ util.uniqueUri = function (uri) {
+ var protocol = uri.protocol
+ , host = uri.host
+ , port = uri.port;
+
+ if ('document' in global) {
+ host = host || document.domain;
+ port = port || (protocol == 'https'
+ && document.location.protocol !== 'https:' ? 443 : document.location.port);
+ } else {
+ host = host || 'localhost';
+
+ if (!port && protocol == 'https') {
+ port = 443;
+ }
+ }
+
+ return (protocol || 'http') + '://' + host + ':' + (port || 80);
+ };
+
+ /**
+ * Mergest 2 query strings in to once unique query string
+ *
+ * @param {String} base
+ * @param {String} addition
+ * @api public
+ */
+
+ util.query = function (base, addition) {
+ var query = util.chunkQuery(base || '')
+ , components = [];
+
+ util.merge(query, util.chunkQuery(addition || ''));
+ for (var part in query) {
+ if (query.hasOwnProperty(part)) {
+ components.push(part + '=' + query[part]);
+ }
+ }
+
+ return components.length ? '?' + components.join('&') : '';
+ };
+
+ /**
+ * Transforms a querystring in to an object
+ *
+ * @param {String} qs
+ * @api public
+ */
+
+ util.chunkQuery = function (qs) {
+ var query = {}
+ , params = qs.split('&')
+ , i = 0
+ , l = params.length
+ , kv;
+
+ for (; i < l; ++i) {
+ kv = params[i].split('=');
+ if (kv[0]) {
+ query[kv[0]] = kv[1];
+ }
+ }
+
+ return query;
+ };
+
+ /**
+ * Executes the given function when the page is loaded.
+ *
+ * io.util.load(function () { console.log('page loaded'); });
+ *
+ * @param {Function} fn
+ * @api public
+ */
+
+ var pageLoaded = false;
+
+ util.load = function (fn) {
+ if ('document' in global && document.readyState === 'complete' || pageLoaded) {
+ return fn();
+ }
+
+ util.on(global, 'load', fn, false);
+ };
+
+ /**
+ * Adds an event.
+ *
+ * @api private
+ */
+
+ util.on = function (element, event, fn, capture) {
+ if (element.attachEvent) {
+ element.attachEvent('on' + event, fn);
+ } else if (element.addEventListener) {
+ element.addEventListener(event, fn, capture);
+ }
+ };
+
+ /**
+ * Generates the correct `XMLHttpRequest` for regular and cross domain requests.
+ *
+ * @param {Boolean} [xdomain] Create a request that can be used cross domain.
+ * @returns {XMLHttpRequest|false} If we can create a XMLHttpRequest.
+ * @api private
+ */
+
+ util.request = function (xdomain) {
+
+ if (xdomain && 'undefined' != typeof XDomainRequest && !util.ua.hasCORS) {
+ return new XDomainRequest();
+ }
+
+ if ('undefined' != typeof XMLHttpRequest && (!xdomain || util.ua.hasCORS)) {
+ return new XMLHttpRequest();
+ }
+
+ if (!xdomain) {
+ try {
+ return new window[(['Active'].concat('Object').join('X'))]('Microsoft.XMLHTTP');
+ } catch(e) { }
+ }
+
+ return null;
+ };
+
+ /**
+ * XHR based transport constructor.
+ *
+ * @constructor
+ * @api public
+ */
+
+ /**
+ * Change the internal pageLoaded value.
+ */
+
+ if ('undefined' != typeof window) {
+ util.load(function () {
+ pageLoaded = true;
+ });
+ }
+
+ /**
+ * Defers a function to ensure a spinner is not displayed by the browser
+ *
+ * @param {Function} fn
+ * @api public
+ */
+
+ util.defer = function (fn) {
+ if (!util.ua.webkit || 'undefined' != typeof importScripts) {
+ return fn();
+ }
+
+ util.load(function () {
+ setTimeout(fn, 100);
+ });
+ };
+
+ /**
+ * Merges two objects.
+ *
+ * @api public
+ */
+
+ util.merge = function merge (target, additional, deep, lastseen) {
+ var seen = lastseen || []
+ , depth = typeof deep == 'undefined' ? 2 : deep
+ , prop;
+
+ for (prop in additional) {
+ if (additional.hasOwnProperty(prop) && util.indexOf(seen, prop) < 0) {
+ if (typeof target[prop] !== 'object' || !depth) {
+ target[prop] = additional[prop];
+ seen.push(additional[prop]);
+ } else {
+ util.merge(target[prop], additional[prop], depth - 1, seen);
+ }
+ }
+ }
+
+ return target;
+ };
+
+ /**
+ * Merges prototypes from objects
+ *
+ * @api public
+ */
+
+ util.mixin = function (ctor, ctor2) {
+ util.merge(ctor.prototype, ctor2.prototype);
+ };
+
+ /**
+ * Shortcut for prototypical and static inheritance.
+ *
+ * @api private
+ */
+
+ util.inherit = function (ctor, ctor2) {
+ function f() {};
+ f.prototype = ctor2.prototype;
+ ctor.prototype = new f;
+ };
+
+ /**
+ * Checks if the given object is an Array.
+ *
+ * io.util.isArray([]); // true
+ * io.util.isArray({}); // false
+ *
+ * @param Object obj
+ * @api public
+ */
+
+ util.isArray = Array.isArray || function (obj) {
+ return Object.prototype.toString.call(obj) === '[object Array]';
+ };
+
+ /**
+ * Intersects values of two arrays into a third
+ *
+ * @api public
+ */
+
+ util.intersect = function (arr, arr2) {
+ var ret = []
+ , longest = arr.length > arr2.length ? arr : arr2
+ , shortest = arr.length > arr2.length ? arr2 : arr;
+
+ for (var i = 0, l = shortest.length; i < l; i++) {
+ if (~util.indexOf(longest, shortest[i]))
+ ret.push(shortest[i]);
+ }
+
+ return ret;
+ };
+
+ /**
+ * Array indexOf compatibility.
+ *
+ * @see bit.ly/a5Dxa2
+ * @api public
+ */
+
+ util.indexOf = function (arr, o, i) {
+
+ for (var j = arr.length, i = i < 0 ? i + j < 0 ? 0 : i + j : i || 0;
+ i < j && arr[i] !== o; i++) {}
+
+ return j <= i ? -1 : i;
+ };
+
+ /**
+ * Converts enumerables to array.
+ *
+ * @api public
+ */
+
+ util.toArray = function (enu) {
+ var arr = [];
+
+ for (var i = 0, l = enu.length; i < l; i++)
+ arr.push(enu[i]);
+
+ return arr;
+ };
+
+ /**
+ * UA / engines detection namespace.
+ *
+ * @namespace
+ */
+
+ util.ua = {};
+
+ /**
+ * Whether the UA supports CORS for XHR.
+ *
+ * @api public
+ */
+
+ util.ua.hasCORS = 'undefined' != typeof XMLHttpRequest && (function () {
+ try {
+ var a = new XMLHttpRequest();
+ } catch (e) {
+ return false;
+ }
+
+ return a.withCredentials != undefined;
+ })();
+
+ /**
+ * Detect webkit.
+ *
+ * @api public
+ */
+
+ util.ua.webkit = 'undefined' != typeof navigator
+ && /webkit/i.test(navigator.userAgent);
+
+ /**
+ * Detect iPad/iPhone/iPod.
+ *
+ * @api public
+ */
+
+ util.ua.iDevice = 'undefined' != typeof navigator
+ && /iPad|iPhone|iPod/i.test(navigator.userAgent);
+
+ })('undefined' != typeof io ? io : module.exports, global);
+ /**
+ * socket.io
+ * Copyright(c) 2011 LearnBoost <dev@learnboost.com>
+ * MIT Licensed
+ */
+
+ (function (exports, io) {
+
+ /**
+ * Expose constructor.
+ */
+
+ exports.EventEmitter = EventEmitter;
+
+ /**
+ * Event emitter constructor.
+ *
+ * @api public.
+ */
+
+ function EventEmitter () {};
+
+ /**
+ * Adds a listener
+ *
+ * @api public
+ */
+
+ EventEmitter.prototype.on = function (name, fn) {
+ if (!this.$events) {
+ this.$events = {};
+ }
+
+ if (!this.$events[name]) {
+ this.$events[name] = fn;
+ } else if (io.util.isArray(this.$events[name])) {
+ this.$events[name].push(fn);
+ } else {
+ this.$events[name] = [this.$events[name], fn];
+ }
+
+ return this;
+ };
+
+ EventEmitter.prototype.addListener = EventEmitter.prototype.on;
+
+ /**
+ * Adds a volatile listener.
+ *
+ * @api public
+ */
+
+ EventEmitter.prototype.once = function (name, fn) {
+ var self = this;
+
+ function on () {
+ self.removeListener(name, on);
+ fn.apply(this, arguments);
+ };
+
+ on.listener = fn;
+ this.on(name, on);
+
+ return this;
+ };
+
+ /**
+ * Removes a listener.
+ *
+ * @api public
+ */
+
+ EventEmitter.prototype.removeListener = function (name, fn) {
+ if (this.$events && this.$events[name]) {
+ var list = this.$events[name];
+
+ if (io.util.isArray(list)) {
+ var pos = -1;
+
+ for (var i = 0, l = list.length; i < l; i++) {
+ if (list[i] === fn || (list[i].listener && list[i].listener === fn)) {
+ pos = i;
+ break;
+ }
+ }
+
+ if (pos < 0) {
+ return this;
+ }
+
+ list.splice(pos, 1);
+
+ if (!list.length) {
+ delete this.$events[name];
+ }
+ } else if (list === fn || (list.listener && list.listener === fn)) {
+ delete this.$events[name];
+ }
+ }
+
+ return this;
+ };
+
+ /**
+ * Removes all listeners for an event.
+ *
+ * @api public
+ */
+
+ EventEmitter.prototype.removeAllListeners = function (name) {
+ if (name === undefined) {
+ this.$events = {};
+ return this;
+ }
+
+ if (this.$events && this.$events[name]) {
+ this.$events[name] = null;
+ }
+
+ return this;
+ };
+
+ /**
+ * Gets all listeners for a certain event.
+ *
+ * @api publci
+ */
+
+ EventEmitter.prototype.listeners = function (name) {
+ if (!this.$events) {
+ this.$events = {};
+ }
+
+ if (!this.$events[name]) {
+ this.$events[name] = [];
+ }
+
+ if (!io.util.isArray(this.$events[name])) {
+ this.$events[name] = [this.$events[name]];
+ }
+
+ return this.$events[name];
+ };
+
+ /**
+ * Emits an event.
+ *
+ * @api public
+ */
+
+ EventEmitter.prototype.emit = function (name) {
+ if (!this.$events) {
+ return false;
+ }
+
+ var handler = this.$events[name];
+
+ if (!handler) {
+ return false;
+ }
+
+ var args = Array.prototype.slice.call(arguments, 1);
+
+ if ('function' == typeof handler) {
+ handler.apply(this, args);
+ } else if (io.util.isArray(handler)) {
+ var listeners = handler.slice();
+
+ for (var i = 0, l = listeners.length; i < l; i++) {
+ listeners[i].apply(this, args);
+ }
+ } else {
+ return false;
+ }
+
+ return true;
+ };
+
+ })(
+ 'undefined' != typeof io ? io : module.exports
+ , 'undefined' != typeof io ? io : module.parent.exports
+ );
+
+ /**
+ * socket.io
+ * Copyright(c) 2011 LearnBoost <dev@learnboost.com>
+ * MIT Licensed
+ */
+
+ /**
+ * Based on JSON2 (http://www.JSON.org/js.html).
+ */
+
+ (function (exports, nativeJSON) {
+ "use strict";
+
+ // use native JSON if it's available
+ if (nativeJSON && nativeJSON.parse){
+ return exports.JSON = {
+ parse: nativeJSON.parse
+ , stringify: nativeJSON.stringify
+ };
+ }
+
+ var JSON = exports.JSON = {};
+
+ function f(n) {
+ // Format integers to have at least two digits.
+ return n < 10 ? '0' + n : n;
+ }
+
+ function date(d, key) {
+ return isFinite(d.valueOf()) ?
+ d.getUTCFullYear() + '-' +
+ f(d.getUTCMonth() + 1) + '-' +
+ f(d.getUTCDate()) + 'T' +
+ f(d.getUTCHours()) + ':' +
+ f(d.getUTCMinutes()) + ':' +
+ f(d.getUTCSeconds()) + 'Z' : null;
+ };
+
+ var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
+ escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
+ gap,
+ indent,
+ meta = { // table of character substitutions
+ '\b': '\\b',
+ '\t': '\\t',
+ '\n': '\\n',
+ '\f': '\\f',
+ '\r': '\\r',
+ '"' : '\\"',
+ '\\': '\\\\'
+ },
+ rep;
+
+
+ function quote(string) {
+
+ // If the string contains no control characters, no quote characters, and no
+ // backslash characters, then we can safely slap some quotes around it.
+ // Otherwise we must also replace the offending characters with safe escape
+ // sequences.
+
+ escapable.lastIndex = 0;
+ return escapable.test(string) ? '"' + string.replace(escapable, function (a) {
+ var c = meta[a];
+ return typeof c === 'string' ? c :
+ '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
+ }) + '"' : '"' + string + '"';
+ }
+
+
+ function str(key, holder) {
+
+ // Produce a string from holder[key].
+
+ var i, // The loop counter.
+ k, // The member key.
+ v, // The member value.
+ length,
+ mind = gap,
+ partial,
+ value = holder[key];
+
+ // If the value has a toJSON method, call it to obtain a replacement value.
+
+ if (value instanceof Date) {
+ value = date(key);
+ }
+
+ // If we were called with a replacer function, then call the replacer to
+ // obtain a replacement value.
+
+ if (typeof rep === 'function') {
+ value = rep.call(holder, key, value);
+ }
+
+ // What happens next depends on the value's type.
+
+ switch (typeof value) {
+ case 'string':
+ return quote(value);
+
+ case 'number':
+
+ // JSON numbers must be finite. Encode non-finite numbers as null.
+
+ return isFinite(value) ? String(value) : 'null';
+
+ case 'boolean':
+ case 'null':
+
+ // If the value is a boolean or null, convert it to a string. Note:
+ // typeof null does not produce 'null'. The case is included here in
+ // the remote chance that this gets fixed someday.
+
+ return String(value);
+
+ // If the type is 'object', we might be dealing with an object or an array or
+ // null.
+
+ case 'object':
+
+ // Due to a specification blunder in ECMAScript, typeof null is 'object',
+ // so watch out for that case.
+
+ if (!value) {
+ return 'null';
+ }
+
+ // Make an array to hold the partial results of stringifying this object value.
+
+ gap += indent;
+ partial = [];
+
+ // Is the value an array?
+
+ if (Object.prototype.toString.apply(value) === '[object Array]') {
+
+ // The value is an array. Stringify every element. Use null as a placeholder
+ // for non-JSON values.
+
+ length = value.length;
+ for (i = 0; i < length; i += 1) {
+ partial[i] = str(i, value) || 'null';
+ }
+
+ // Join all of the elements together, separated with commas, and wrap them in
+ // brackets.
+
+ v = partial.length === 0 ? '[]' : gap ?
+ '[\n' + gap + partial.join(',\n' + gap) + '\n' + mind + ']' :
+ '[' + partial.join(',') + ']';
+ gap = mind;
+ return v;
+ }
+
+ // If the replacer is an array, use it to select the members to be stringified.
+
+ if (rep && typeof rep === 'object') {
+ length = rep.length;
+ for (i = 0; i < length; i += 1) {
+ if (typeof rep[i] === 'string') {
+ k = rep[i];
+ v = str(k, value);
+ if (v) {
+ partial.push(quote(k) + (gap ? ': ' : ':') + v);
+ }
+ }
+ }
+ } else {
+
+ // Otherwise, iterate through all of the keys in the object.
+
+ for (k in value) {
+ if (Object.prototype.hasOwnProperty.call(value, k)) {
+ v = str(k, value);
+ if (v) {
+ partial.push(quote(k) + (gap ? ': ' : ':') + v);
+ }
+ }
+ }
+ }
+
+ // Join all of the member texts together, separated with commas,
+ // and wrap them in braces.
+
+ v = partial.length === 0 ? '{}' : gap ?
+ '{\n' + gap + partial.join(',\n' + gap) + '\n' + mind + '}' :
+ '{' + partial.join(',') + '}';
+ gap = mind;
+ return v;
+ }
+ }
+
+ // If the JSON object does not yet have a stringify method, give it one.
+
+ JSON.stringify = function (value, replacer, space) {
+
+ // The stringify method takes a value and an optional replacer, and an optional
+ // space parameter, and returns a JSON text. The replacer can be a function
+ // that can replace values, or an array of strings that will select the keys.
+ // A default replacer method can be provided. Use of the space parameter can
+ // produce text that is more easily readable.
+
+ var i;
+ gap = '';
+ indent = '';
+
+ // If the space parameter is a number, make an indent string containing that
+ // many spaces.
+
+ if (typeof space === 'number') {
+ for (i = 0; i < space; i += 1) {
+ indent += ' ';
+ }
+
+ // If the space parameter is a string, it will be used as the indent string.
+
+ } else if (typeof space === 'string') {
+ indent = space;
+ }
+
+ // If there is a replacer, it must be a function or an array.
+ // Otherwise, throw an error.
+
+ rep = replacer;
+ if (replacer && typeof replacer !== 'function' &&
+ (typeof replacer !== 'object' ||
+ typeof replacer.length !== 'number')) {
+ throw new Error('JSON.stringify');
+ }
+
+ // Make a fake root object containing our value under the key of ''.
+ // Return the result of stringifying the value.
+
+ return str('', {'': value});
+ };
+
+ // If the JSON object does not yet have a parse method, give it one.
+
+ JSON.parse = function (text, reviver) {
+ // The parse method takes a text and an optional reviver function, and returns
+ // a JavaScript value if the text is a valid JSON text.
+
+ var j;
+
+ function walk(holder, key) {
+
+ // The walk method is used to recursively walk the resulting structure so
+ // that modifications can be made.
+
+ var k, v, value = holder[key];
+ if (value && typeof value === 'object') {
+ for (k in value) {
+ if (Object.prototype.hasOwnProperty.call(value, k)) {
+ v = walk(value, k);
+ if (v !== undefined) {
+ value[k] = v;
+ } else {
+ delete value[k];
+ }
+ }
+ }
+ }
+ return reviver.call(holder, key, value);
+ }
+
+
+ // Parsing happens in four stages. In the first stage, we replace certain
+ // Unicode characters with escape sequences. JavaScript handles many characters
+ // incorrectly, either silently deleting them, or treating them as line endings.
+
+ text = String(text);
+ cx.lastIndex = 0;
+ if (cx.test(text)) {
+ text = text.replace(cx, function (a) {
+ return '\\u' +
+ ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
+ });
+ }
+
+ // In the second stage, we run the text against regular expressions that look
+ // for non-JSON patterns. We are especially concerned with '()' and 'new'
+ // because they can cause invocation, and '=' because it can cause mutation.
+ // But just to be safe, we want to reject all unexpected forms.
+
+ // We split the second stage into 4 regexp operations in order to work around
+ // crippling inefficiencies in IE's and Safari's regexp engines. First we
+ // replace the JSON backslash pairs with '@' (a non-JSON character). Second, we
+ // replace all simple value tokens with ']' characters. Third, we delete all
+ // open brackets that follow a colon or comma or that begin the text. Finally,
+ // we look to see that the remaining characters are only whitespace or ']' or
+ // ',' or ':' or '{' or '}'. If that is so, then the text is safe for eval.
+
+ if (/^[\],:{}\s]*$/
+ .test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, '@')
+ .replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']')
+ .replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) {
+
+ // In the third stage we use the eval function to compile the text into a
+ // JavaScript structure. The '{' operator is subject to a syntactic ambiguity
+ // in JavaScript: it can begin a block or an object literal. We wrap the text
+ // in parens to eliminate the ambiguity.
+
+ j = eval('(' + text + ')');
+
+ // In the optional fourth stage, we recursively walk the new structure, passing
+ // each name/value pair to a reviver function for possible transformation.
+
+ return typeof reviver === 'function' ?
+ walk({'': j}, '') : j;
+ }
+
+ // If the text is not JSON parseable, then a SyntaxError is thrown.
+
+ throw new SyntaxError('JSON.parse');
+ };
+
+ })(
+ 'undefined' != typeof io ? io : module.exports
+ , typeof JSON !== 'undefined' ? JSON : undefined
+ );
+
+ /**
+ * socket.io
+ * Copyright(c) 2011 LearnBoost <dev@learnboost.com>
+ * MIT Licensed
+ */
+
+ (function (exports, io) {
+
+ /**
+ * Parser namespace.
+ *
+ * @namespace
+ */
+
+ var parser = exports.parser = {};
+
+ /**
+ * Packet types.
+ */
+
+ var packets = parser.packets = [
+ 'disconnect'
+ , 'connect'
+ , 'heartbeat'
+ , 'message'
+ , 'json'
+ , 'event'
+ , 'ack'
+ , 'error'
+ , 'noop'
+ ];
+
+ /**
+ * Errors reasons.
+ */
+
+ var reasons = parser.reasons = [
+ 'transport not supported'
+ , 'client not handshaken'
+ , 'unauthorized'
+ ];
+
+ /**
+ * Errors advice.
+ */
+
+ var advice = parser.advice = [
+ 'reconnect'
+ ];
+
+ /**
+ * Shortcuts.
+ */
+
+ var JSON = io.JSON
+ , indexOf = io.util.indexOf;
+
+ /**
+ * Encodes a packet.
+ *
+ * @api private
+ */
+
+ parser.encodePacket = function (packet) {
+ var type = indexOf(packets, packet.type)
+ , id = packet.id || ''
+ , endpoint = packet.endpoint || ''
+ , ack = packet.ack
+ , data = null;
+
+ switch (packet.type) {
+ case 'error':
+ var reason = packet.reason ? indexOf(reasons, packet.reason) : ''
+ , adv = packet.advice ? indexOf(advice, packet.advice) : '';
+
+ if (reason !== '' || adv !== '')
+ data = reason + (adv !== '' ? ('+' + adv) : '');
+
+ break;
+
+ case 'message':
+ if (packet.data !== '')
+ data = packet.data;
+ break;
+
+ case 'event':
+ var ev = { name: packet.name };
+
+ if (packet.args && packet.args.length) {
+ ev.args = packet.args;
+ }
+
+ data = JSON.stringify(ev);
+ break;
+
+ case 'json':
+ data = JSON.stringify(packet.data);
+ break;
+
+ case 'connect':
+ if (packet.qs)
+ data = packet.qs;
+ break;
+
+ case 'ack':
+ data = packet.ackId
+ + (packet.args && packet.args.length
+ ? '+' + JSON.stringify(packet.args) : '');
+ break;
+ }
+
+ // construct packet with required fragments
+ var encoded = [
+ type
+ , id + (ack == 'data' ? '+' : '')
+ , endpoint
+ ];
+
+ // data fragment is optional
+ if (data !== null && data !== undefined)
+ encoded.push(data);
+
+ return encoded.join(':');
+ };
+
+ /**
+ * Encodes multiple messages (payload).
+ *
+ * @param {Array} messages
+ * @api private
+ */
+
+ parser.encodePayload = function (packets) {
+ var decoded = '';
+
+ if (packets.length == 1)
+ return packets[0];
+
+ for (var i = 0, l = packets.length; i < l; i++) {
+ var packet = packets[i];
+ decoded += '\ufffd' + packet.length + '\ufffd' + packets[i];
+ }
+
+ return decoded;
+ };
+
+ /**
+ * Decodes a packet
+ *
+ * @api private
+ */
+
+ var regexp = /([^:]+):([0-9]+)?(\+)?:([^:]+)?:?([\s\S]*)?/;
+
+ parser.decodePacket = function (data) {
+ var pieces = data.match(regexp);
+
+ if (!pieces) return {};
+
+ var id = pieces[2] || ''
+ , data = pieces[5] || ''
+ , packet = {
+ type: packets[pieces[1]]
+ , endpoint: pieces[4] || ''
+ };
+
+ // whether we need to acknowledge the packet
+ if (id) {
+ packet.id = id;
+ if (pieces[3])
+ packet.ack = 'data';
+ else
+ packet.ack = true;
+ }
+
+ // handle different packet types
+ switch (packet.type) {
+ case 'error':
+ var pieces = data.split('+');
+ packet.reason = reasons[pieces[0]] || '';
+ packet.advice = advice[pieces[1]] || '';
+ break;
+
+ case 'message':
+ packet.data = data || '';
+ break;
+
+ case 'event':
+ try {
+ var opts = JSON.parse(data);
+ packet.name = opts.name;
+ packet.args = opts.args;
+ } catch (e) { }
+
+ packet.args = packet.args || [];
+ break;
+
+ case 'json':
+ try {
+ packet.data = JSON.parse(data);
+ } catch (e) { }
+ break;
+
+ case 'connect':
+ packet.qs = data || '';
+ break;
+
+ case 'ack':
+ var pieces = data.match(/^([0-9]+)(\+)?(.*)/);
+ if (pieces) {
+ packet.ackId = pieces[1];
+ packet.args = [];
+
+ if (pieces[3]) {
+ try {
+ packet.args = pieces[3] ? JSON.parse(pieces[3]) : [];
+ } catch (e) { }
+ }
+ }
+ break;
+
+ case 'disconnect':
+ case 'heartbeat':
+ break;
+ };
+
+ return packet;
+ };
+
+ /**
+ * Decodes data payload. Detects multiple messages
+ *
+ * @return {Array} messages
+ * @api public
+ */
+
+ parser.decodePayload = function (data) {
+ // IE doesn't like data[i] for unicode chars, charAt works fine
+ if (data.charAt(0) == '\ufffd') {
+ var ret = [];
+
+ for (var i = 1, length = ''; i < data.length; i++) {
+ if (data.charAt(i) == '\ufffd') {
+ ret.push(parser.decodePacket(data.substr(i + 1).substr(0, length)));
+ i += Number(length) + 1;
+ length = '';
+ } else {
+ length += data.charAt(i);
+ }
+ }
+
+ return ret;
+ } else {
+ return [parser.decodePacket(data)];
+ }
+ };
+
+ })(
+ 'undefined' != typeof io ? io : module.exports
+ , 'undefined' != typeof io ? io : module.parent.exports
+ );
+ /**
+ * socket.io
+ * Copyright(c) 2011 LearnBoost <dev@learnboost.com>
+ * MIT Licensed
+ */
+
+ (function (exports, io) {
+
+ /**
+ * Expose constructor.
+ */
+
+ exports.Transport = Transport;
+
+ /**
+ * This is the transport template for all supported transport methods.
+ *
+ * @constructor
+ * @api public
+ */
+
+ function Transport (socket, sessid) {
+ this.socket = socket;
+ this.sessid = sessid;
+ };
+
+ /**
+ * Apply EventEmitter mixin.
+ */
+
+ io.util.mixin(Transport, io.EventEmitter);
+
+
+ /**
+ * Indicates whether heartbeats is enabled for this transport
+ *
+ * @api private
+ */
+
+ Transport.prototype.heartbeats = function () {
+ return true;
+ };
+
+ /**
+ * Handles the response from the server. When a new response is received
+ * it will automatically update the timeout, decode the message and
+ * forwards the response to the onMessage function for further processing.
+ *
+ * @param {String} data Response from the server.
+ * @api private
+ */
+
+ Transport.prototype.onData = function (data) {
+ this.clearCloseTimeout();
+
+ // If the connection in currently open (or in a reopening state) reset the close
+ // timeout since we have just received data. This check is necessary so
+ // that we don't reset the timeout on an explicitly disconnected connection.
+ if (this.socket.connected || this.socket.connecting || this.socket.reconnecting) {
+ this.setCloseTimeout();
+ }
+
+ if (data !== '') {
+ // todo: we should only do decodePayload for xhr transports
+ var msgs = io.parser.decodePayload(data);
+
+ if (msgs && msgs.length) {
+ for (var i = 0, l = msgs.length; i < l; i++) {
+ this.onPacket(msgs[i]);
+ }
+ }
+ }
+
+ return this;
+ };
+
+ /**
+ * Handles packets.
+ *
+ * @api private
+ */
+
+ Transport.prototype.onPacket = function (packet) {
+ this.socket.setHeartbeatTimeout();
+
+ if (packet.type == 'heartbeat') {
+ return this.onHeartbeat();
+ }
+
+ if (packet.type == 'connect' && packet.endpoint == '') {
+ this.onConnect();
+ }
+
+ if (packet.type == 'error' && packet.advice == 'reconnect') {
+ this.isOpen = false;
+ }
+
+ this.socket.onPacket(packet);
+
+ return this;
+ };
+
+ /**
+ * Sets close timeout
+ *
+ * @api private
+ */
+
+ Transport.prototype.setCloseTimeout = function () {
+ if (!this.closeTimeout) {
+ var self = this;
+
+ this.closeTimeout = setTimeout(function () {
+ self.onDisconnect();
+ }, this.socket.closeTimeout);
+ }
+ };
+
+ /**
+ * Called when transport disconnects.
+ *
+ * @api private
+ */
+
+ Transport.prototype.onDisconnect = function () {
+ if (this.isOpen) this.close();
+ this.clearTimeouts();
+ this.socket.onDisconnect();
+ return this;
+ };
+
+ /**
+ * Called when transport connects
+ *
+ * @api private
+ */
+
+ Transport.prototype.onConnect = function () {
+ this.socket.onConnect();
+ return this;
+ };
+
+ /**
+ * Clears close timeout
+ *
+ * @api private
+ */
+
+ Transport.prototype.clearCloseTimeout = function () {
+ if (this.closeTimeout) {
+ clearTimeout(this.closeTimeout);
+ this.closeTimeout = null;
+ }
+ };
+
+ /**
+ * Clear timeouts
+ *
+ * @api private
+ */
+
+ Transport.prototype.clearTimeouts = function () {
+ this.clearCloseTimeout();
+
+ if (this.reopenTimeout) {
+ clearTimeout(this.reopenTimeout);
+ }
+ };
+
+ /**
+ * Sends a packet
+ *
+ * @param {Object} packet object.
+ * @api private
+ */
+
+ Transport.prototype.packet = function (packet) {
+ this.send(io.parser.encodePacket(packet));
+ };
+
+ /**
+ * Send the received heartbeat message back to server. So the server
+ * knows we are still connected.
+ *
+ * @param {String} heartbeat Heartbeat response from the server.
+ * @api private
+ */
+
+ Transport.prototype.onHeartbeat = function (heartbeat) {
+ this.packet({ type: 'heartbeat' });
+ };
+
+ /**
+ * Called when the transport opens.
+ *
+ * @api private
+ */
+
+ Transport.prototype.onOpen = function () {
+ this.isOpen = true;
+ this.clearCloseTimeout();
+ this.socket.onOpen();
+ };
+
+ /**
+ * Notifies the base when the connection with the Socket.IO server
+ * has been disconnected.
+ *
+ * @api private
+ */
+
+ Transport.prototype.onClose = function () {
+ var self = this;
+
+ /* FIXME: reopen delay causing a infinit loop
+ this.reopenTimeout = setTimeout(function () {
+ self.open();
+ }, this.socket.options['reopen delay']);*/
+
+ this.isOpen = false;
+ this.socket.onClose();
+ this.onDisconnect();
+ };
+
+ /**
+ * Generates a connection url based on the Socket.IO URL Protocol.
+ * See <https://github.com/learnboost/socket.io-node/> for more details.
+ *
+ * @returns {String} Connection url
+ * @api private
+ */
+
+ Transport.prototype.prepareUrl = function () {
+ var options = this.socket.options;
+
+ return this.scheme() + '://'
+ + options.host + ':' + options.port + '/'
+ + options.resource + '/' + io.protocol
+ + '/' + this.name + '/' + this.sessid;
+ };
+
+ /**
+ * Checks if the transport is ready to start a connection.
+ *
+ * @param {Socket} socket The socket instance that needs a transport
+ * @param {Function} fn The callback
+ * @api private
+ */
+
+ Transport.prototype.ready = function (socket, fn) {
+ fn.call(this);
+ };
+ })(
+ 'undefined' != typeof io ? io : module.exports
+ , 'undefined' != typeof io ? io : module.parent.exports
+ );
+ /**
+ * socket.io
+ * Copyright(c) 2011 LearnBoost <dev@learnboost.com>
+ * MIT Licensed
+ */
+
+ (function (exports, io, global) {
+
+ /**
+ * Expose constructor.
+ */
+
+ exports.Socket = Socket;
+
+ /**
+ * Create a new `Socket.IO client` which can establish a persistent
+ * connection with a Socket.IO enabled server.
+ *
+ * @api public
+ */
+
+ function Socket (options) {
+ this.options = {
+ port: 80
+ , secure: false
+ , document: 'document' in global ? document : false
+ , resource: 'socket.io'
+ , transports: io.transports
+ , 'connect timeout': 10000
+ , 'try multiple transports': true
+ , 'reconnect': true
+ , 'reconnection delay': 500
+ , 'reconnection limit': Infinity
+ , 'reopen delay': 3000
+ , 'max reconnection attempts': 10
+ , 'sync disconnect on unload': false
+ , 'auto connect': true
+ , 'flash policy port': 10843
+ , 'manualFlush': false
+ };
+
+ io.util.merge(this.options, options);
+
+ this.connected = false;
+ this.open = false;
+ this.connecting = false;
+ this.reconnecting = false;
+ this.namespaces = {};
+ this.buffer = [];
+ this.doBuffer = false;
+
+ if (this.options['sync disconnect on unload'] &&
+ (!this.isXDomain() || io.util.ua.hasCORS)) {
+ var self = this;
+ io.util.on(global, 'beforeunload', function () {
+ self.disconnectSync();
+ }, false);
+ }
+
+ if (this.options['auto connect']) {
+ this.connect();
+ }
+ };
+
+ /**
+ * Apply EventEmitter mixin.
+ */
+
+ io.util.mixin(Socket, io.EventEmitter);
+
+ /**
+ * Returns a namespace listener/emitter for this socket
+ *
+ * @api public
+ */
+
+ Socket.prototype.of = function (name) {
+ if (!this.namespaces[name]) {
+ this.namespaces[name] = new io.SocketNamespace(this, name);
+
+ if (name !== '') {
+ this.namespaces[name].packet({ type: 'connect' });
+ }
+ }
+
+ return this.namespaces[name];
+ };
+
+ /**
+ * Emits the given event to the Socket and all namespaces
+ *
+ * @api private
+ */
+
+ Socket.prototype.publish = function () {
+ this.emit.apply(this, arguments);
+
+ var nsp;
+
+ for (var i in this.namespaces) {
+ if (this.namespaces.hasOwnProperty(i)) {
+ nsp = this.of(i);
+ nsp.$emit.apply(nsp, arguments);
+ }
+ }
+ };
+
+ /**
+ * Performs the handshake
+ *
+ * @api private
+ */
+
+ function empty () { };
+
+ Socket.prototype.handshake = function (fn) {
+ var self = this
+ , options = this.options;
+
+ function complete (data) {
+ if (data instanceof Error) {
+ self.connecting = false;
+ self.onError(data.message);
+ } else {
+ fn.apply(null, data.split(':'));
+ }
+ };
+
+ var url = [
+ 'http' + (options.secure ? 's' : '') + ':/'
+ , options.host + ':' + options.port
+ , options.resource
+ , io.protocol
+ , io.util.query(this.options.query, 't=' + +new Date)
+ ].join('/');
+
+ if (this.isXDomain() && !io.util.ua.hasCORS) {
+ var insertAt = document.getElementsByTagName('script')[0]
+ , script = document.createElement('script');
+
+ script.src = url + '&jsonp=' + io.j.length;
+ insertAt.parentNode.insertBefore(script, insertAt);
+
+ io.j.push(function (data) {
+ complete(data);
+ script.parentNode.removeChild(script);
+ });
+ } else {
+ var xhr = io.util.request();
+
+ xhr.open('GET', url, true);
+ if (this.isXDomain()) {
+ xhr.withCredentials = true;
+ }
+ xhr.onreadystatechange = function () {
+ if (xhr.readyState == 4) {
+ xhr.onreadystatechange = empty;
+
+ if (xhr.status == 200) {
+ complete(xhr.responseText);
+ } else if (xhr.status == 403) {
+ self.onError(xhr.responseText);
+ } else {
+ self.connecting = false;
+ !self.reconnecting && self.onError(xhr.responseText);
+ }
+ }
+ };
+ xhr.send(null);
+ }
+ };
+
+ /**
+ * Find an available transport based on the options supplied in the constructor.
+ *
+ * @api private
+ */
+
+ Socket.prototype.getTransport = function (override) {
+ var transports = override || this.transports, match;
+
+ for (var i = 0, transport; transport = transports[i]; i++) {
+ if (io.Transport[transport]
+ && io.Transport[transport].check(this)
+ && (!this.isXDomain() || io.Transport[transport].xdomainCheck(this))) {
+ return new io.Transport[transport](this, this.sessionid);
+ }
+ }
+
+ return null;
+ };
+
+ /**
+ * Connects to the server.
+ *
+ * @param {Function} [fn] Callback.
+ * @returns {io.Socket}
+ * @api public
+ */
+
+ Socket.prototype.connect = function (fn) {
+ if (this.connecting) {
+ return this;
+ }
+
+ var self = this;
+ self.connecting = true;
+
+ this.handshake(function (sid, heartbeat, close, transports) {
+ self.sessionid = sid;
+ self.closeTimeout = close * 1000;
+ self.heartbeatTimeout = heartbeat * 1000;
+ if(!self.transports)
+ self.transports = self.origTransports = (transports ? io.util.intersect(
+ transports.split(',')
+ , self.options.transports
+ ) : self.options.transports);
+
+ self.setHeartbeatTimeout();
+
+ function connect (transports){
+ if (self.transport) self.transport.clearTimeouts();
+
+ self.transport = self.getTransport(transports);
+ if (!self.transport) return self.publish('connect_failed');
+
+ // once the transport is ready
+ self.transport.ready(self, function () {
+ self.connecting = true;
+ self.publish('connecting', self.transport.name);
+ self.transport.open();
+
+ if (self.options['connect timeout']) {
+ self.connectTimeoutTimer = setTimeout(function () {
+ if (!self.connected) {
+ self.connecting = false;
+
+ if (self.options['try multiple transports']) {
+ var remaining = self.transports;
+
+ while (remaining.length > 0 && remaining.splice(0,1)[0] !=
+ self.transport.name) {}
+
+ if (remaining.length){
+ connect(remaining);
+ } else {
+ self.publish('connect_failed');
+ }
+ }
+ }
+ }, self.options['connect timeout']);
+ }
+ });
+ }
+
+ connect(self.transports);
+
+ self.once('connect', function (){
+ clearTimeout(self.connectTimeoutTimer);
+
+ fn && typeof fn == 'function' && fn();
+ });
+ });
+
+ return this;
+ };
+
+ /**
+ * Clears and sets a new heartbeat timeout using the value given by the
+ * server during the handshake.
+ *
+ * @api private
+ */
+
+ Socket.prototype.setHeartbeatTimeout = function () {
+ clearTimeout(this.heartbeatTimeoutTimer);
+ if(this.transport && !this.transport.heartbeats()) return;
+
+ var self = this;
+ this.heartbeatTimeoutTimer = setTimeout(function () {
+ self.transport.onClose();
+ }, this.heartbeatTimeout);
+ };
+
+ /**
+ * Sends a message.
+ *
+ * @param {Object} data packet.
+ * @returns {io.Socket}
+ * @api public
+ */
+
+ Socket.prototype.packet = function (data) {
+ if (this.connected && !this.doBuffer) {
+ this.transport.packet(data);
+ } else {
+ this.buffer.push(data);
+ }
+
+ return this;
+ };
+
+ /**
+ * Sets buffer state
+ *
+ * @api private
+ */
+
+ Socket.prototype.setBuffer = function (v) {
+ this.doBuffer = v;
+
+ if (!v && this.connected && this.buffer.length) {
+ if (!this.options['manualFlush']) {
+ this.flushBuffer();
+ }
+ }
+ };
+
+ /**
+ * Flushes the buffer data over the wire.
+ * To be invoked manually when 'manualFlush' is set to true.
+ *
+ * @api public
+ */
+
+ Socket.prototype.flushBuffer = function() {
+ this.transport.payload(this.buffer);
+ this.buffer = [];
+ };
+
+
+ /**
+ * Disconnect the established connect.
+ *
+ * @returns {io.Socket}
+ * @api public
+ */
+
+ Socket.prototype.disconnect = function () {
+ if (this.connected || this.connecting) {
+ if (this.open) {
+ this.of('').packet({ type: 'disconnect' });
+ }
+
+ // handle disconnection immediately
+ this.onDisconnect('booted');
+ }
+
+ return this;
+ };
+
+ /**
+ * Disconnects the socket with a sync XHR.
+ *
+ * @api private
+ */
+
+ Socket.prototype.disconnectSync = function () {
+ // ensure disconnection
+ var xhr = io.util.request();
+ var uri = [
+ 'http' + (this.options.secure ? 's' : '') + ':/'
+ , this.options.host + ':' + this.options.port
+ , this.options.resource
+ , io.protocol
+ , ''
+ , this.sessionid
+ ].join('/') + '/?disconnect=1';
+
+ xhr.open('GET', uri, false);
+ xhr.send(null);
+
+ // handle disconnection immediately
+ this.onDisconnect('booted');
+ };
+
+ /**
+ * Check if we need to use cross domain enabled transports. Cross domain would
+ * be a different port or different domain name.
+ *
+ * @returns {Boolean}
+ * @api private
+ */
+
+ Socket.prototype.isXDomain = function () {
+
+ var port = global.location.port ||
+ ('https:' == global.location.protocol ? 443 : 80);
+
+ return this.options.host !== global.location.hostname
+ || this.options.port != port;
+ };
+
+ /**
+ * Called upon handshake.
+ *
+ * @api private
+ */
+
+ Socket.prototype.onConnect = function () {
+ if (!this.connected) {
+ this.connected = true;
+ this.connecting = false;
+ if (!this.doBuffer) {
+ // make sure to flush the buffer
+ this.setBuffer(false);
+ }
+ this.emit('connect');
+ }
+ };
+
+ /**
+ * Called when the transport opens
+ *
+ * @api private
+ */
+
+ Socket.prototype.onOpen = function () {
+ this.open = true;
+ };
+
+ /**
+ * Called when the transport closes.
+ *
+ * @api private
+ */
+
+ Socket.prototype.onClose = function () {
+ this.open = false;
+ clearTimeout(this.heartbeatTimeoutTimer);
+ };
+
+ /**
+ * Called when the transport first opens a connection
+ *
+ * @param text
+ */
+
+ Socket.prototype.onPacket = function (packet) {
+ this.of(packet.endpoint).onPacket(packet);
+ };
+
+ /**
+ * Handles an error.
+ *
+ * @api private
+ */
+
+ Socket.prototype.onError = function (err) {
+ if (err && err.advice) {
+ if (err.advice === 'reconnect' && (this.connected || this.connecting)) {
+ this.disconnect();
+ if (this.options.reconnect) {
+ this.reconnect();
+ }
+ }
+ }
+
+ this.publish('error', err && err.reason ? err.reason : err);
+ };
+
+ /**
+ * Called when the transport disconnects.
+ *
+ * @api private
+ */
+
+ Socket.prototype.onDisconnect = function (reason) {
+ var wasConnected = this.connected
+ , wasConnecting = this.connecting;
+
+ this.connected = false;
+ this.connecting = false;
+ this.open = false;
+
+ if (wasConnected || wasConnecting) {
+ this.transport.close();
+ this.transport.clearTimeouts();
+ if (wasConnected) {
+ this.publish('disconnect', reason);
+
+ if ('booted' != reason && this.options.reconnect && !this.reconnecting) {
+ this.reconnect();
+ }
+ }
+ }
+ };
+
+ /**
+ * Called upon reconnection.
+ *
+ * @api private
+ */
+
+ Socket.prototype.reconnect = function () {
+ this.reconnecting = true;
+ this.reconnectionAttempts = 0;
+ this.reconnectionDelay = this.options['reconnection delay'];
+
+ var self = this
+ , maxAttempts = this.options['max reconnection attempts']
+ , tryMultiple = this.options['try multiple transports']
+ , limit = this.options['reconnection limit'];
+
+ function reset () {
+ if (self.connected) {
+ for (var i in self.namespaces) {
+ if (self.namespaces.hasOwnProperty(i) && '' !== i) {
+ self.namespaces[i].packet({ type: 'connect' });
+ }
+ }
+ self.publish('reconnect', self.transport.name, self.reconnectionAttempts);
+ }
+
+ clearTimeout(self.reconnectionTimer);
+
+ self.removeListener('connect_failed', maybeReconnect);
+ self.removeListener('connect', maybeReconnect);
+
+ self.reconnecting = false;
+
+ delete self.reconnectionAttempts;
+ delete self.reconnectionDelay;
+ delete self.reconnectionTimer;
+ delete self.redoTransports;
+
+ self.options['try multiple transports'] = tryMultiple;
+ };
+
+ function maybeReconnect () {
+ if (!self.reconnecting) {
+ return;
+ }
+
+ if (self.connected) {
+ return reset();
+ };
+
+ if (self.connecting && self.reconnecting) {
+ return self.reconnectionTimer = setTimeout(maybeReconnect, 1000);
+ }
+
+ if (self.reconnectionAttempts++ >= maxAttempts) {
+ if (!self.redoTransports) {
+ self.on('connect_failed', maybeReconnect);
+ self.options['try multiple transports'] = true;
+ self.transports = self.origTransports;
+ self.transport = self.getTransport();
+ self.redoTransports = true;
+ self.connect();
+ } else {
+ self.publish('reconnect_failed');
+ reset();
+ }
+ } else {
+ if (self.reconnectionDelay < limit) {
+ self.reconnectionDelay *= 2; // exponential back off
+ }
+
+ self.connect();
+ self.publish('reconnecting', self.reconnectionDelay, self.reconnectionAttempts);
+ self.reconnectionTimer = setTimeout(maybeReconnect, self.reconnectionDelay);
+ }
+ };
+
+ this.options['try multiple transports'] = false;
+ this.reconnectionTimer = setTimeout(maybeReconnect, this.reconnectionDelay);
+
+ this.on('connect', maybeReconnect);
+ };
+
+ })(
+ 'undefined' != typeof io ? io : module.exports
+ , 'undefined' != typeof io ? io : module.parent.exports
+ , global
+ );
+ /**
+ * socket.io
+ * Copyright(c) 2011 LearnBoost <dev@learnboost.com>
+ * MIT Licensed
+ */
+
+ (function (exports, io) {
+
+ /**
+ * Expose constructor.
+ */
+
+ exports.SocketNamespace = SocketNamespace;
+
+ /**
+ * Socket namespace constructor.
+ *
+ * @constructor
+ * @api public
+ */
+
+ function SocketNamespace (socket, name) {
+ this.socket = socket;
+ this.name = name || '';
+ this.flags = {};
+ this.json = new Flag(this, 'json');
+ this.ackPackets = 0;
+ this.acks = {};
+ };
+
+ /**
+ * Apply EventEmitter mixin.
+ */
+
+ io.util.mixin(SocketNamespace, io.EventEmitter);
+
+ /**
+ * Copies emit since we override it
+ *
+ * @api private
+ */
+
+ SocketNamespace.prototype.$emit = io.EventEmitter.prototype.emit;
+
+ /**
+ * Creates a new namespace, by proxying the request to the socket. This
+ * allows us to use the synax as we do on the server.
+ *
+ * @api public
+ */
+
+ SocketNamespace.prototype.of = function () {
+ return this.socket.of.apply(this.socket, arguments);
+ };
+
+ /**
+ * Sends a packet.
+ *
+ * @api private
+ */
+
+ SocketNamespace.prototype.packet = function (packet) {
+ packet.endpoint = this.name;
+ this.socket.packet(packet);
+ this.flags = {};
+ return this;
+ };
+
+ /**
+ * Sends a message
+ *
+ * @api public
+ */
+
+ SocketNamespace.prototype.send = function (data, fn) {
+ var packet = {
+ type: this.flags.json ? 'json' : 'message'
+ , data: data
+ };
+
+ if ('function' == typeof fn) {
+ packet.id = ++this.ackPackets;
+ packet.ack = true;
+ this.acks[packet.id] = fn;
+ }
+
+ return this.packet(packet);
+ };
+
+ /**
+ * Emits an event
+ *
+ * @api public
+ */
+
+ SocketNamespace.prototype.emit = function (name) {
+ var args = Array.prototype.slice.call(arguments, 1)
+ , lastArg = args[args.length - 1]
+ , packet = {
+ type: 'event'
+ , name: name
+ };
+
+ if ('function' == typeof lastArg) {
+ packet.id = ++this.ackPackets;
+ packet.ack = 'data';
+ this.acks[packet.id] = lastArg;
+ args = args.slice(0, args.length - 1);
+ }
+
+ packet.args = args;
+
+ return this.packet(packet);
+ };
+
+ /**
+ * Disconnects the namespace
+ *
+ * @api private
+ */
+
+ SocketNamespace.prototype.disconnect = function () {
+ if (this.name === '') {
+ this.socket.disconnect();
+ } else {
+ this.packet({ type: 'disconnect' });
+ this.$emit('disconnect');
+ }
+
+ return this;
+ };
+
+ /**
+ * Handles a packet
+ *
+ * @api private
+ */
+
+ SocketNamespace.prototype.onPacket = function (packet) {
+ var self = this;
+
+ function ack () {
+ self.packet({
+ type: 'ack'
+ , args: io.util.toArray(arguments)
+ , ackId: packet.id
+ });
+ };
+
+ switch (packet.type) {
+ case 'connect':
+ this.$emit('connect');
+ break;
+
+ case 'disconnect':
+ if (this.name === '') {
+ this.socket.onDisconnect(packet.reason || 'booted');
+ } else {
+ this.$emit('disconnect', packet.reason);
+ }
+ break;
+
+ case 'message':
+ case 'json':
+ var params = ['message', packet.data];
+
+ if (packet.ack == 'data') {
+ params.push(ack);
+ } else if (packet.ack) {
+ this.packet({ type: 'ack', ackId: packet.id });
+ }
+
+ this.$emit.apply(this, params);
+ break;
+
+ case 'event':
+ var params = [packet.name].concat(packet.args);
+
+ if (packet.ack == 'data')
+ params.push(ack);
+
+ this.$emit.apply(this, params);
+ break;
+
+ case 'ack':
+ if (this.acks[packet.ackId]) {
+ this.acks[packet.ackId].apply(this, packet.args);
+ delete this.acks[packet.ackId];
+ }
+ break;
+
+ case 'error':
+ if (packet.advice){
+ this.socket.onError(packet);
+ } else {
+ if (packet.reason == 'unauthorized') {
+ this.$emit('connect_failed', packet.reason);
+ } else {
+ this.$emit('error', packet.reason);
+ }
+ }
+ break;
+ }
+ };
+
+ /**
+ * Flag interface.
+ *
+ * @api private
+ */
+
+ function Flag (nsp, name) {
+ this.namespace = nsp;
+ this.name = name;
+ };
+
+ /**
+ * Send a message
+ *
+ * @api public
+ */
+
+ Flag.prototype.send = function () {
+ this.namespace.flags[this.name] = true;
+ this.namespace.send.apply(this.namespace, arguments);
+ };
+
+ /**
+ * Emit an event
+ *
+ * @api public
+ */
+
+ Flag.prototype.emit = function () {
+ this.namespace.flags[this.name] = true;
+ this.namespace.emit.apply(this.namespace, arguments);
+ };
+
+ })(
+ 'undefined' != typeof io ? io : module.exports
+ , 'undefined' != typeof io ? io : module.parent.exports
+ );
+
+ /**
+ * socket.io
+ * Copyright(c) 2011 LearnBoost <dev@learnboost.com>
+ * MIT Licensed
+ */
+
+ (function (exports, io, global) {
+
+ /**
+ * Expose constructor.
+ */
+
+ exports.websocket = WS;
+
+ /**
+ * The WebSocket transport uses the HTML5 WebSocket API to establish an
+ * persistent connection with the Socket.IO server. This transport will also
+ * be inherited by the FlashSocket fallback as it provides a API compatible
+ * polyfill for the WebSockets.
+ *
+ * @constructor
+ * @extends {io.Transport}
+ * @api public
+ */
+
+ function WS (socket) {
+ io.Transport.apply(this, arguments);
+ };
+
+ /**
+ * Inherits from Transport.
+ */
+
+ io.util.inherit(WS, io.Transport);
+
+ /**
+ * Transport name
+ *
+ * @api public
+ */
+
+ WS.prototype.name = 'websocket';
+
+ /**
+ * Initializes a new `WebSocket` connection with the Socket.IO server. We attach
+ * all the appropriate listeners to handle the responses from the server.
+ *
+ * @returns {Transport}
+ * @api public
+ */
+
+ WS.prototype.open = function () {
+ var query = io.util.query(this.socket.options.query)
+ , self = this
+ , Socket
+
+
+ if (!Socket) {
+ Socket = global.MozWebSocket || global.WebSocket;
+ }
+
+ this.websocket = new Socket(this.prepareUrl() + query);
+
+ this.websocket.onopen = function () {
+ self.onOpen();
+ self.socket.setBuffer(false);
+ };
+ this.websocket.onmessage = function (ev) {
+ self.onData(ev.data);
+ };
+ this.websocket.onclose = function () {
+ self.onClose();
+ self.socket.setBuffer(true);
+ };
+ this.websocket.onerror = function (e) {
+ self.onError(e);
+ };
+
+ return this;
+ };
+
+ /**
+ * Send a message to the Socket.IO server. The message will automatically be
+ * encoded in the correct message format.
+ *
+ * @returns {Transport}
+ * @api public
+ */
+
+ // Do to a bug in the current IDevices browser, we need to wrap the send in a
+ // setTimeout, when they resume from sleeping the browser will crash if
+ // we don't allow the browser time to detect the socket has been closed
+ if (io.util.ua.iDevice) {
+ WS.prototype.send = function (data) {
+ var self = this;
+ setTimeout(function() {
+ self.websocket.send(data);
+ },0);
+ return this;
+ };
+ } else {
+ WS.prototype.send = function (data) {
+ this.websocket.send(data);
+ return this;
+ };
+ }
+
+ /**
+ * Payload
+ *
+ * @api private
+ */
+
+ WS.prototype.payload = function (arr) {
+ for (var i = 0, l = arr.length; i < l; i++) {
+ this.packet(arr[i]);
+ }
+ return this;
+ };
+
+ /**
+ * Disconnect the established `WebSocket` connection.
+ *
+ * @returns {Transport}
+ * @api public
+ */
+
+ WS.prototype.close = function () {
+ this.websocket.close();
+ return this;
+ };
+
+ /**
+ * Handle the errors that `WebSocket` might be giving when we
+ * are attempting to connect or send messages.
+ *
+ * @param {Error} e The error.
+ * @api private
+ */
+
+ WS.prototype.onError = function (e) {
+ this.socket.onError(e);
+ };
+
+ /**
+ * Returns the appropriate scheme for the URI generation.
+ *
+ * @api private
+ */
+ WS.prototype.scheme = function () {
+ return this.socket.options.secure ? 'wss' : 'ws';
+ };
+
+ /**
+ * Checks if the browser has support for native `WebSockets` and that
+ * it's not the polyfill created for the FlashSocket transport.
+ *
+ * @return {Boolean}
+ * @api public
+ */
+
+ WS.check = function () {
+ return ('WebSocket' in global && !('__addTask' in WebSocket))
+ || 'MozWebSocket' in global;
+ };
+
+ /**
+ * Check if the `WebSocket` transport support cross domain communications.
+ *
+ * @returns {Boolean}
+ * @api public
+ */
+
+ WS.xdomainCheck = function () {
+ return true;
+ };
+
+ /**
+ * Add the transport to your public io.transports array.
+ *
+ * @api private
+ */
+
+ io.transports.push('websocket');
+
+ })(
+ 'undefined' != typeof io ? io.Transport : module.exports
+ , 'undefined' != typeof io ? io : module.parent.exports
+ , global
+ );
+
+ // Copyright: Hiroshi Ichikawa <http://gimite.net/en/>
+ // License: New BSD License
+ // Reference: http://dev.w3.org/html5/websockets/
+ // Reference: http://tools.ietf.org/html/draft-hixie-thewebsocketprotocol
+
+ (function() {
+
+ if ('undefined' == typeof window || window.WebSocket) return;
+
+ var console = window.console;
+ if (!console || !console.log || !console.error) {
+ console = {log: function(){ }, error: function(){ }};
+ }
+
+ if (!swfobject.hasFlashPlayerVersion("10.0.0")) {
+ console.error("Flash Player >= 10.0.0 is required.");
+ return;
+ }
+ if (location.protocol == "file:") {
+ console.error(
+ "WARNING: web-socket-js doesn't work in file:///... URL " +
+ "unless you set Flash Security Settings properly. " +
+ "Open the page via Web server i.e. http://...");
+ }
+
+ /**
+ * This class represents a faux web socket.
+ * @param {string} url
+ * @param {array or string} protocols
+ * @param {string} proxyHost
+ * @param {int} proxyPort
+ * @param {string} headers
+ */
+ WebSocket = function(url, protocols, proxyHost, proxyPort, headers) {
+ var self = this;
+ self.__id = WebSocket.__nextId++;
+ WebSocket.__instances[self.__id] = self;
+ self.readyState = WebSocket.CONNECTING;
+ self.bufferedAmount = 0;
+ self.__events = {};
+ if (!protocols) {
+ protocols = [];
+ } else if (typeof protocols == "string") {
+ protocols = [protocols];
+ }
+ // Uses setTimeout() to make sure __createFlash() runs after the caller sets ws.onopen etc.
+ // Otherwise, when onopen fires immediately, onopen is called before it is set.
+ setTimeout(function() {
+ WebSocket.__addTask(function() {
+ WebSocket.__flash.create(
+ self.__id, url, protocols, proxyHost || null, proxyPort || 0, headers || null);
+ });
+ }, 0);
+ };
+
+ /**
+ * Send data to the web socket.
+ * @param {string} data The data to send to the socket.
+ * @return {boolean} True for success, false for failure.
+ */
+ WebSocket.prototype.send = function(data) {
+ if (this.readyState == WebSocket.CONNECTING) {
+ throw "INVALID_STATE_ERR: Web Socket connection has not been established";
+ }
+ // We use encodeURIComponent() here, because FABridge doesn't work if
+ // the argument includes some characters. We don't use escape() here
+ // because of this:
+ // https://developer.mozilla.org/en/Core_JavaScript_1.5_Guide/Functions#escape_and_unescape_Functions
+ // But it looks decodeURIComponent(encodeURIComponent(s)) doesn't
+ // preserve all Unicode characters either e.g. "\uffff" in Firefox.
+ // Note by wtritch: Hopefully this will not be necessary using ExternalInterface. Will require
+ // additional testing.
+ var result = WebSocket.__flash.send(this.__id, encodeURIComponent(data));
+ if (result < 0) { // success
+ return true;
+ } else {
+ this.bufferedAmount += result;
+ return false;
+ }
+ };
+
+ /**
+ * Close this web socket gracefully.
+ */
+ WebSocket.prototype.close = function() {
+ if (this.readyState == WebSocket.CLOSED || this.readyState == WebSocket.CLOSING) {
+ return;
+ }
+ this.readyState = WebSocket.CLOSING;
+ WebSocket.__flash.close(this.__id);
+ };
+
+ /**
+ * Implementation of {@link <a href="http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-registration">DOM 2 EventTarget Interface</a>}
+ *
+ * @param {string} type
+ * @param {function} listener
+ * @param {boolean} useCapture
+ * @return void
+ */
+ WebSocket.prototype.addEventListener = function(type, listener, useCapture) {
+ if (!(type in this.__events)) {
+ this.__events[type] = [];
+ }
+ this.__events[type].push(listener);
+ };
+
+ /**
+ * Implementation of {@link <a href="http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-registration">DOM 2 EventTarget Interface</a>}
+ *
+ * @param {string} type
+ * @param {function} listener
+ * @param {boolean} useCapture
+ * @return void
+ */
+ WebSocket.prototype.removeEventListener = function(type, listener, useCapture) {
+ if (!(type in this.__events)) return;
+ var events = this.__events[type];
+ for (var i = events.length - 1; i >= 0; --i) {
+ if (events[i] === listener) {
+ events.splice(i, 1);
+ break;
+ }
+ }
+ };
+
+ /**
+ * Implementation of {@link <a href="http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-registration">DOM 2 EventTarget Interface</a>}
+ *
+ * @param {Event} event
+ * @return void
+ */
+ WebSocket.prototype.dispatchEvent = function(event) {
+ var events = this.__events[event.type] || [];
+ for (var i = 0; i < events.length; ++i) {
+ events[i](event);
+ }
+ var handler = this["on" + event.type];
+ if (handler) handler(event);
+ };
+
+ /**
+ * Handles an event from Flash.
+ * @param {Object} flashEvent
+ */
+ WebSocket.prototype.__handleEvent = function(flashEvent) {
+ if ("readyState" in flashEvent) {
+ this.readyState = flashEvent.readyState;
+ }
+ if ("protocol" in flashEvent) {
+ this.protocol = flashEvent.protocol;
+ }
+
+ var jsEvent;
+ if (flashEvent.type == "open" || flashEvent.type == "error") {
+ jsEvent = this.__createSimpleEvent(flashEvent.type);
+ } else if (flashEvent.type == "close") {
+ // TODO implement jsEvent.wasClean
+ jsEvent = this.__createSimpleEvent("close");
+ } else if (flashEvent.type == "message") {
+ var data = decodeURIComponent(flashEvent.message);
+ jsEvent = this.__createMessageEvent("message", data);
+ } else {
+ throw "unknown event type: " + flashEvent.type;
+ }
+
+ this.dispatchEvent(jsEvent);
+ };
+
+ WebSocket.prototype.__createSimpleEvent = function(type) {
+ if (document.createEvent && window.Event) {
+ var event = document.createEvent("Event");
+ event.initEvent(type, false, false);
+ return event;
+ } else {
+ return {type: type, bubbles: false, cancelable: false};
+ }
+ };
+
+ WebSocket.prototype.__createMessageEvent = function(type, data) {
+ if (document.createEvent && window.MessageEvent && !window.opera) {
+ var event = document.createEvent("MessageEvent");
+ event.initMessageEvent("message", false, false, data, null, null, window, null);
+ return event;
+ } else {
+ // IE and Opera, the latter one truncates the data parameter after any 0x00 bytes.
+ return {type: type, data: data, bubbles: false, cancelable: false};
+ }
+ };
+
+ /**
+ * Define the WebSocket readyState enumeration.
+ */
+ WebSocket.CONNECTING = 0;
+ WebSocket.OPEN = 1;
+ WebSocket.CLOSING = 2;
+ WebSocket.CLOSED = 3;
+
+ WebSocket.__flash = null;
+ WebSocket.__instances = {};
+ WebSocket.__tasks = [];
+ WebSocket.__nextId = 0;
+
+ /**
+ * Load a new flash security policy file.
+ * @param {string} url
+ */
+ WebSocket.loadFlashPolicyFile = function(url){
+ WebSocket.__addTask(function() {
+ WebSocket.__flash.loadManualPolicyFile(url);
+ });
+ };
+
+ /**
+ * Loads WebSocketMain.swf and creates WebSocketMain object in Flash.
+ */
+ WebSocket.__initialize = function() {
+ if (WebSocket.__flash) return;
+
+ if (WebSocket.__swfLocation) {
+ // For backword compatibility.
+ window.WEB_SOCKET_SWF_LOCATION = WebSocket.__swfLocation;
+ }
+ if (!window.WEB_SOCKET_SWF_LOCATION) {
+ console.error("[WebSocket] set WEB_SOCKET_SWF_LOCATION to location of WebSocketMain.swf");
+ return;
+ }
+ var container = document.createElement("div");
+ container.id = "webSocketContainer";
+ // Hides Flash box. We cannot use display: none or visibility: hidden because it prevents
+ // Flash from loading at least in IE. So we move it out of the screen at (-100, -100).
+ // But this even doesn't work with Flash Lite (e.g. in Droid Incredible). So with Flash
+ // Lite, we put it at (0, 0). This shows 1x1 box visible at left-top corner but this is
+ // the best we can do as far as we know now.
+ container.style.position = "absolute";
+ if (WebSocket.__isFlashLite()) {
+ container.style.left = "0px";
+ container.style.top = "0px";
+ } else {
+ container.style.left = "-100px";
+ container.style.top = "-100px";
+ }
+ var holder = document.createElement("div");
+ holder.id = "webSocketFlash";
+ container.appendChild(holder);
+ document.body.appendChild(container);
+ // See this article for hasPriority:
+ // http://help.adobe.com/en_US/as3/mobile/WS4bebcd66a74275c36cfb8137124318eebc6-7ffd.html
+ swfobject.embedSWF(
+ WEB_SOCKET_SWF_LOCATION,
+ "webSocketFlash",
+ "1" /* width */,
+ "1" /* height */,
+ "10.0.0" /* SWF version */,
+ null,
+ null,
+ {hasPriority: true, swliveconnect : true, allowScriptAccess: "always"},
+ null,
+ function(e) {
+ if (!e.success) {
+ console.error("[WebSocket] swfobject.embedSWF failed");
+ }
+ });
+ };
+
+ /**
+ * Called by Flash to notify JS that it's fully loaded and ready
+ * for communication.
+ */
+ WebSocket.__onFlashInitialized = function() {
+ // We need to set a timeout here to avoid round-trip calls
+ // to flash during the initialization process.
+ setTimeout(function() {
+ WebSocket.__flash = document.getElementById("webSocketFlash");
+ WebSocket.__flash.setCallerUrl(location.href);
+ WebSocket.__flash.setDebug(!!window.WEB_SOCKET_DEBUG);
+ for (var i = 0; i < WebSocket.__tasks.length; ++i) {
+ WebSocket.__tasks[i]();
+ }
+ WebSocket.__tasks = [];
+ }, 0);
+ };
+
+ /**
+ * Called by Flash to notify WebSockets events are fired.
+ */
+ WebSocket.__onFlashEvent = function() {
+ setTimeout(function() {
+ try {
+ // Gets events using receiveEvents() instead of getting it from event object
+ // of Flash event. This is to make sure to keep message order.
+ // It seems sometimes Flash events don't arrive in the same order as they are sent.
+ var events = WebSocket.__flash.receiveEvents();
+ for (var i = 0; i < events.length; ++i) {
+ WebSocket.__instances[events[i].webSocketId].__handleEvent(events[i]);
+ }
+ } catch (e) {
+ console.error(e);
+ }
+ }, 0);
+ return true;
+ };
+
+ // Called by Flash.
+ WebSocket.__log = function(message) {
+ console.log(decodeURIComponent(message));
+ };
+
+ // Called by Flash.
+ WebSocket.__error = function(message) {
+ console.error(decodeURIComponent(message));
+ };
+
+ WebSocket.__addTask = function(task) {
+ if (WebSocket.__flash) {
+ task();
+ } else {
+ WebSocket.__tasks.push(task);
+ }
+ };
+
+ /**
+ * Test if the browser is running flash lite.
+ * @return {boolean} True if flash lite is running, false otherwise.
+ */
+ WebSocket.__isFlashLite = function() {
+ if (!window.navigator || !window.navigator.mimeTypes) {
+ return false;
+ }
+ var mimeType = window.navigator.mimeTypes["application/x-shockwave-flash"];
+ if (!mimeType || !mimeType.enabledPlugin || !mimeType.enabledPlugin.filename) {
+ return false;
+ }
+ return mimeType.enabledPlugin.filename.match(/flashlite/i) ? true : false;
+ };
+
+ if (!window.WEB_SOCKET_DISABLE_AUTO_INITIALIZATION) {
+ if (window.addEventListener) {
+ window.addEventListener("load", function(){
+ WebSocket.__initialize();
+ }, false);
+ } else {
+ window.attachEvent("onload", function(){
+ WebSocket.__initialize();
+ });
+ }
+ }
+
+ })();
+
+ /**
+ * socket.io
+ * Copyright(c) 2011 LearnBoost <dev@learnboost.com>
+ * MIT Licensed
+ */
+
+ (function (exports, io, global) {
+
+ /**
+ * Expose constructor.
+ *
+ * @api public
+ */
+
+ exports.XHR = XHR;
+
+ /**
+ * XHR constructor
+ *
+ * @costructor
+ * @api public
+ */
+
+ function XHR (socket) {
+ if (!socket) return;
+
+ io.Transport.apply(this, arguments);
+ this.sendBuffer = [];
+ };
+
+ /**
+ * Inherits from Transport.
+ */
+
+ io.util.inherit(XHR, io.Transport);
+
+ /**
+ * Establish a connection
+ *
+ * @returns {Transport}
+ * @api public
+ */
+
+ XHR.prototype.open = function () {
+ this.socket.setBuffer(false);
+ this.onOpen();
+ this.get();
+
+ // we need to make sure the request succeeds since we have no indication
+ // whether the request opened or not until it succeeded.
+ this.setCloseTimeout();
+
+ return this;
+ };
+
+ /**
+ * Check if we need to send data to the Socket.IO server, if we have data in our
+ * buffer we encode it and forward it to the `post` method.
+ *
+ * @api private
+ */
+
+ XHR.prototype.payload = function (payload) {
+ var msgs = [];
+
+ for (var i = 0, l = payload.length; i < l; i++) {
+ msgs.push(io.parser.encodePacket(payload[i]));
+ }
+
+ this.send(io.parser.encodePayload(msgs));
+ };
+
+ /**
+ * Send data to the Socket.IO server.
+ *
+ * @param data The message
+ * @returns {Transport}
+ * @api public
+ */
+
+ XHR.prototype.send = function (data) {
+ this.post(data);
+ return this;
+ };
+
+ /**
+ * Posts a encoded message to the Socket.IO server.
+ *
+ * @param {String} data A encoded message.
+ * @api private
+ */
+
+ function empty () { };
+
+ XHR.prototype.post = function (data) {
+ var self = this;
+ this.socket.setBuffer(true);
+
+ function stateChange () {
+ if (this.readyState == 4) {
+ this.onreadystatechange = empty;
+ self.posting = false;
+
+ if (this.status == 200){
+ self.socket.setBuffer(false);
+ } else {
+ self.onClose();
+ }
+ }
+ }
+
+ function onload () {
+ this.onload = empty;
+ self.socket.setBuffer(false);
+ };
+
+ this.sendXHR = this.request('POST');
+
+ if (global.XDomainRequest && this.sendXHR instanceof XDomainRequest) {
+ this.sendXHR.onload = this.sendXHR.onerror = onload;
+ } else {
+ this.sendXHR.onreadystatechange = stateChange;
+ }
+
+ this.sendXHR.send(data);
+ };
+
+ /**
+ * Disconnects the established `XHR` connection.
+ *
+ * @returns {Transport}
+ * @api public
+ */
+
+ XHR.prototype.close = function () {
+ this.onClose();
+ return this;
+ };
+
+ /**
+ * Generates a configured XHR request
+ *
+ * @param {String} url The url that needs to be requested.
+ * @param {String} method The method the request should use.
+ * @returns {XMLHttpRequest}
+ * @api private
+ */
+
+ XHR.prototype.request = function (method) {
+ var req = io.util.request(this.socket.isXDomain())
+ , query = io.util.query(this.socket.options.query, 't=' + +new Date);
+
+ req.open(method || 'GET', this.prepareUrl() + query, true);
+
+ if (method == 'POST') {
+ try {
+ if (req.setRequestHeader) {
+ req.setRequestHeader('Content-type', 'text/plain;charset=UTF-8');
+ } else {
+ // XDomainRequest
+ req.contentType = 'text/plain';
+ }
+ } catch (e) {}
+ }
+
+ return req;
+ };
+
+ /**
+ * Returns the scheme to use for the transport URLs.
+ *
+ * @api private
+ */
+
+ XHR.prototype.scheme = function () {
+ return this.socket.options.secure ? 'https' : 'http';
+ };
+
+ /**
+ * Check if the XHR transports are supported
+ *
+ * @param {Boolean} xdomain Check if we support cross domain requests.
+ * @returns {Boolean}
+ * @api public
+ */
+
+ XHR.check = function (socket, xdomain) {
+ try {
+ var request = io.util.request(xdomain),
+ usesXDomReq = (global.XDomainRequest && request instanceof XDomainRequest),
+ socketProtocol = (socket && socket.options && socket.options.secure ? 'https:' : 'http:'),
+ isXProtocol = (global.location && socketProtocol != global.location.protocol);
+ if (request && !(usesXDomReq && isXProtocol)) {
+ return true;
+ }
+ } catch(e) {}
+
+ return false;
+ };
+
+ /**
+ * Check if the XHR transport supports cross domain requests.
+ *
+ * @returns {Boolean}
+ * @api public
+ */
+
+ XHR.xdomainCheck = function (socket) {
+ return XHR.check(socket, true);
+ };
+
+ })(
+ 'undefined' != typeof io ? io.Transport : module.exports
+ , 'undefined' != typeof io ? io : module.parent.exports
+ , global
+ );
+ /**
+ * socket.io
+ * Copyright(c) 2011 LearnBoost <dev@learnboost.com>
+ * MIT Licensed
+ */
+
+ (function (exports, io) {
+
+ /**
+ * Expose constructor.
+ */
+
+ exports.htmlfile = HTMLFile;
+
+ /**
+ * The HTMLFile transport creates a `forever iframe` based transport
+ * for Internet Explorer. Regular forever iframe implementations will
+ * continuously trigger the browsers buzy indicators. If the forever iframe
+ * is created inside a `htmlfile` these indicators will not be trigged.
+ *
+ * @constructor
+ * @extends {io.Transport.XHR}
+ * @api public
+ */
+
+ function HTMLFile (socket) {
+ io.Transport.XHR.apply(this, arguments);
+ };
+
+ /**
+ * Inherits from XHR transport.
+ */
+
+ io.util.inherit(HTMLFile, io.Transport.XHR);
+
+ /**
+ * Transport name
+ *
+ * @api public
+ */
+
+ HTMLFile.prototype.name = 'htmlfile';
+
+ /**
+ * Creates a new Ac...eX `htmlfile` with a forever loading iframe
+ * that can be used to listen to messages. Inside the generated
+ * `htmlfile` a reference will be made to the HTMLFile transport.
+ *
+ * @api private
+ */
+
+ HTMLFile.prototype.get = function () {
+ this.doc = new window[(['Active'].concat('Object').join('X'))]('htmlfile');
+ this.doc.open();
+ this.doc.write('<html></html>');
+ this.doc.close();
+ this.doc.parentWindow.s = this;
+
+ var iframeC = this.doc.createElement('div');
+ iframeC.className = 'socketio';
+
+ this.doc.body.appendChild(iframeC);
+ this.iframe = this.doc.createElement('iframe');
+
+ iframeC.appendChild(this.iframe);
+
+ var self = this
+ , query = io.util.query(this.socket.options.query, 't='+ +new Date);
+
+ this.iframe.src = this.prepareUrl() + query;
+
+ io.util.on(window, 'unload', function () {
+ self.destroy();
+ });
+ };
+
+ /**
+ * The Socket.IO server will write script tags inside the forever
+ * iframe, this function will be used as callback for the incoming
+ * information.
+ *
+ * @param {String} data The message
+ * @param {document} doc Reference to the context
+ * @api private
+ */
+
+ HTMLFile.prototype._ = function (data, doc) {
+ this.onData(data);
+ try {
+ var script = doc.getElementsByTagName('script')[0];
+ script.parentNode.removeChild(script);
+ } catch (e) { }
+ };
+
+ /**
+ * Destroy the established connection, iframe and `htmlfile`.
+ * And calls the `CollectGarbage` function of Internet Explorer
+ * to release the memory.
+ *
+ * @api private
+ */
+
+ HTMLFile.prototype.destroy = function () {
+ if (this.iframe){
+ try {
+ this.iframe.src = 'about:blank';
+ } catch(e){}
+
+ this.doc = null;
+ this.iframe.parentNode.removeChild(this.iframe);
+ this.iframe = null;
+
+ CollectGarbage();
+ }
+ };
+
+ /**
+ * Disconnects the established connection.
+ *
+ * @returns {Transport} Chaining.
+ * @api public
+ */
+
+ HTMLFile.prototype.close = function () {
+ this.destroy();
+ return io.Transport.XHR.prototype.close.call(this);
+ };
+
+ /**
+ * Checks if the browser supports this transport. The browser
+ * must have an `Ac...eXObject` implementation.
+ *
+ * @return {Boolean}
+ * @api public
+ */
+
+ HTMLFile.check = function (socket) {
+ if (typeof window != "undefined" && (['Active'].concat('Object').join('X')) in window){
+ try {
+ var a = new window[(['Active'].concat('Object').join('X'))]('htmlfile');
+ return a && io.Transport.XHR.check(socket);
+ } catch(e){}
+ }
+ return false;
+ };
+
+ /**
+ * Check if cross domain requests are supported.
+ *
+ * @returns {Boolean}
+ * @api public
+ */
+
+ HTMLFile.xdomainCheck = function () {
+ // we can probably do handling for sub-domains, we should
+ // test that it's cross domain but a subdomain here
+ return false;
+ };
+
+ /**
+ * Add the transport to your public io.transports array.
+ *
+ * @api private
+ */
+
+ io.transports.push('htmlfile');
+
+ })(
+ 'undefined' != typeof io ? io.Transport : module.exports
+ , 'undefined' != typeof io ? io : module.parent.exports
+ );
+
+ /**
+ * socket.io
+ * Copyright(c) 2011 LearnBoost <dev@learnboost.com>
+ * MIT Licensed
+ */
+
+ (function (exports, io, global) {
+
+ /**
+ * Expose constructor.
+ */
+
+ exports['xhr-polling'] = XHRPolling;
+
+ /**
+ * The XHR-polling transport uses long polling XHR requests to create a
+ * "persistent" connection with the server.
+ *
+ * @constructor
+ * @api public
+ */
+
+ function XHRPolling () {
+ io.Transport.XHR.apply(this, arguments);
+ };
+
+ /**
+ * Inherits from XHR transport.
+ */
+
+ io.util.inherit(XHRPolling, io.Transport.XHR);
+
+ /**
+ * Merge the properties from XHR transport
+ */
+
+ io.util.merge(XHRPolling, io.Transport.XHR);
+
+ /**
+ * Transport name
+ *
+ * @api public
+ */
+
+ XHRPolling.prototype.name = 'xhr-polling';
+
+ /**
+ * Indicates whether heartbeats is enabled for this transport
+ *
+ * @api private
+ */
+
+ XHRPolling.prototype.heartbeats = function () {
+ return false;
+ };
+
+ /**
+ * Establish a connection, for iPhone and Android this will be done once the page
+ * is loaded.
+ *
+ * @returns {Transport} Chaining.
+ * @api public
+ */
+
+ XHRPolling.prototype.open = function () {
+ var self = this;
+
+ io.Transport.XHR.prototype.open.call(self);
+ return false;
+ };
+
+ /**
+ * Starts a XHR request to wait for incoming messages.
+ *
+ * @api private
+ */
+
+ function empty () {};
+
+ XHRPolling.prototype.get = function () {
+ if (!this.isOpen) return;
+
+ var self = this;
+
+ function stateChange () {
+ if (this.readyState == 4) {
+ this.onreadystatechange = empty;
+
+ if (this.status == 200) {
+ self.onData(this.responseText);
+ self.get();
+ } else {
+ self.onClose();
+ }
+ }
+ };
+
+ function onload () {
+ this.onload = empty;
+ this.onerror = empty;
+ self.retryCounter = 1;
+ self.onData(this.responseText);
+ self.get();
+ };
+
+ function onerror () {
+ self.retryCounter ++;
+ if(!self.retryCounter || self.retryCounter > 3) {
+ self.onClose();
+ } else {
+ self.get();
+ }
+ };
+
+ this.xhr = this.request();
+
+ if (global.XDomainRequest && this.xhr instanceof XDomainRequest) {
+ this.xhr.onload = onload;
+ this.xhr.onerror = onerror;
+ } else {
+ this.xhr.onreadystatechange = stateChange;
+ }
+
+ this.xhr.send(null);
+ };
+
+ /**
+ * Handle the unclean close behavior.
+ *
+ * @api private
+ */
+
+ XHRPolling.prototype.onClose = function () {
+ io.Transport.XHR.prototype.onClose.call(this);
+
+ if (this.xhr) {
+ this.xhr.onreadystatechange = this.xhr.onload = this.xhr.onerror = empty;
+ try {
+ this.xhr.abort();
+ } catch(e){}
+ this.xhr = null;
+ }
+ };
+
+ /**
+ * Webkit based browsers show a infinit spinner when you start a XHR request
+ * before the browsers onload event is called so we need to defer opening of
+ * the transport until the onload event is called. Wrapping the cb in our
+ * defer method solve this.
+ *
+ * @param {Socket} socket The socket instance that needs a transport
+ * @param {Function} fn The callback
+ * @api private
+ */
+
+ XHRPolling.prototype.ready = function (socket, fn) {
+ var self = this;
+
+ io.util.defer(function () {
+ fn.call(self);
+ });
+ };
+
+ /**
+ * Add the transport to your public io.transports array.
+ *
+ * @api private
+ */
+
+ io.transports.push('xhr-polling');
+
+ })(
+ 'undefined' != typeof io ? io.Transport : module.exports
+ , 'undefined' != typeof io ? io : module.parent.exports
+ , global
+ );
+
+ /**
+ * socket.io
+ * Copyright(c) 2011 LearnBoost <dev@learnboost.com>
+ * MIT Licensed
+ */
+
+ (function (exports, io, global) {
+ /**
+ * There is a way to hide the loading indicator in Firefox. If you create and
+ * remove a iframe it will stop showing the current loading indicator.
+ * Unfortunately we can't feature detect that and UA sniffing is evil.
+ *
+ * @api private
+ */
+
+ var indicator = global.document && "MozAppearance" in
+ global.document.documentElement.style;
+
+ /**
+ * Expose constructor.
+ */
+
+ exports['jsonp-polling'] = JSONPPolling;
+
+ /**
+ * The JSONP transport creates an persistent connection by dynamically
+ * inserting a script tag in the page. This script tag will receive the
+ * information of the Socket.IO server. When new information is received
+ * it creates a new script tag for the new data stream.
+ *
+ * @constructor
+ * @extends {io.Transport.xhr-polling}
+ * @api public
+ */
+
+ function JSONPPolling (socket) {
+ io.Transport['xhr-polling'].apply(this, arguments);
+
+ this.index = io.j.length;
+
+ var self = this;
+
+ io.j.push(function (msg) {
+ self._(msg);
+ });
+ };
+
+ /**
+ * Inherits from XHR polling transport.
+ */
+
+ io.util.inherit(JSONPPolling, io.Transport['xhr-polling']);
+
+ /**
+ * Transport name
+ *
+ * @api public
+ */
+
+ JSONPPolling.prototype.name = 'jsonp-polling';
+
+ /**
+ * Posts a encoded message to the Socket.IO server using an iframe.
+ * The iframe is used because script tags can create POST based requests.
+ * The iframe is positioned outside of the view so the user does not
+ * notice it's existence.
+ *
+ * @param {String} data A encoded message.
+ * @api private
+ */
+
+ JSONPPolling.prototype.post = function (data) {
+ var self = this
+ , query = io.util.query(
+ this.socket.options.query
+ , 't='+ (+new Date) + '&i=' + this.index
+ );
+
+ if (!this.form) {
+ var form = document.createElement('form')
+ , area = document.createElement('textarea')
+ , id = this.iframeId = 'socketio_iframe_' + this.index
+ , iframe;
+
+ form.className = 'socketio';
+ form.style.position = 'absolute';
+ form.style.top = '0px';
+ form.style.left = '0px';
+ form.style.display = 'none';
+ form.target = id;
+ form.method = 'POST';
+ form.setAttribute('accept-charset', 'utf-8');
+ area.name = 'd';
+ form.appendChild(area);
+ document.body.appendChild(form);
+
+ this.form = form;
+ this.area = area;
+ }
+
+ this.form.action = this.prepareUrl() + query;
+
+ function complete () {
+ initIframe();
+ self.socket.setBuffer(false);
+ };
+
+ function initIframe () {
+ if (self.iframe) {
+ self.form.removeChild(self.iframe);
+ }
+
+ try {
+ // ie6 dynamic iframes with target="" support (thanks Chris Lambacher)
+ iframe = document.createElement('<iframe name="'+ self.iframeId +'">');
+ } catch (e) {
+ iframe = document.createElement('iframe');
+ iframe.name = self.iframeId;
+ }
+
+ iframe.id = self.iframeId;
+
+ self.form.appendChild(iframe);
+ self.iframe = iframe;
+ };
+
+ initIframe();
+
+ // we temporarily stringify until we figure out how to prevent
+ // browsers from turning `\n` into `\r\n` in form inputs
+ this.area.value = io.JSON.stringify(data);
+
+ try {
+ this.form.submit();
+ } catch(e) {}
+
+ if (this.iframe.attachEvent) {
+ iframe.onreadystatechange = function () {
+ if (self.iframe.readyState == 'complete') {
+ complete();
+ }
+ };
+ } else {
+ this.iframe.onload = complete;
+ }
+
+ this.socket.setBuffer(true);
+ };
+
+ /**
+ * Creates a new JSONP poll that can be used to listen
+ * for messages from the Socket.IO server.
+ *
+ * @api private
+ */
+
+ JSONPPolling.prototype.get = function () {
+ var self = this
+ , script = document.createElement('script')
+ , query = io.util.query(
+ this.socket.options.query
+ , 't='+ (+new Date) + '&i=' + this.index
+ );
+
+ if (this.script) {
+ this.script.parentNode.removeChild(this.script);
+ this.script = null;
+ }
+
+ script.async = true;
+ script.src = this.prepareUrl() + query;
+ script.onerror = function () {
+ self.onClose();
+ };
+
+ var insertAt = document.getElementsByTagName('script')[0];
+ insertAt.parentNode.insertBefore(script, insertAt);
+ this.script = script;
+
+ if (indicator) {
+ setTimeout(function () {
+ var iframe = document.createElement('iframe');
+ document.body.appendChild(iframe);
+ document.body.removeChild(iframe);
+ }, 100);
+ }
+ };
+
+ /**
+ * Callback function for the incoming message stream from the Socket.IO server.
+ *
+ * @param {String} data The message
+ * @api private
+ */
+
+ JSONPPolling.prototype._ = function (msg) {
+ this.onData(msg);
+ if (this.isOpen) {
+ this.get();
+ }
+ return this;
+ };
+
+ /**
+ * The indicator hack only works after onload
+ *
+ * @param {Socket} socket The socket instance that needs a transport
+ * @param {Function} fn The callback
+ * @api private
+ */
+
+ JSONPPolling.prototype.ready = function (socket, fn) {
+ var self = this;
+ if (!indicator) return fn.call(this);
+
+ io.util.load(function () {
+ fn.call(self);
+ });
+ };
+
+ /**
+ * Checks if browser supports this transport.
+ *
+ * @return {Boolean}
+ * @api public
+ */
+
+ JSONPPolling.check = function () {
+ return 'document' in global;
+ };
+
+ /**
+ * Check if cross domain requests are supported
+ *
+ * @returns {Boolean}
+ * @api public
+ */
+
+ JSONPPolling.xdomainCheck = function () {
+ return true;
+ };
+
+ /**
+ * Add the transport to your public io.transports array.
+ *
+ * @api private
+ */
+
+ io.transports.push('jsonp-polling');
+
+ })(
+ 'undefined' != typeof io ? io.Transport : module.exports
+ , 'undefined' != typeof io ? io : module.parent.exports
+ , global
+ );
+
+ if (typeof define === "function" && define.amd) {
+ define([], function () { return io; });
+ }
+ })();
+
+ /* Notes
+ *
+ * - Continue using prefixed names for now.
+ *
+ */
+
+ var webrtcSupported = true;
+
+ var RTCPeerConnection;
+ if(window.mozRTCPeerConnection)
+ RTCPeerConnection = window.mozRTCPeerConnection;
+ else if(window.webkitRTCPeerConnection)
+ RTCPeerConnection = window.webkitRTCPeerConnection;
+ else if(window.RTCPeerConnection)
+ RTCPeerConnection = window.RTCPeerConnection
+ else
+ webrtcSupported = false;
+
+ var RTCSessionDescription;
+ if(window.mozRTCSessionDescription)
+ RTCSessionDescription = window.mozRTCSessionDescription;
+ else if(window.webkitRTCSessionDescription)
+ RTCSessionDescription = window.webkitRTCSessionDescription;
+ else if(window.RTCSessionDescription)
+ RTCSessionDescription = window.RTCSessionDescription
+ else
+ webrtcSupported = false;
+
+ var RTCIceCandidate;
+ if(window.mozRTCIceCandidate)
+ RTCIceCandidate = window.mozRTCIceCandidate;
+ else if(window.webkitRTCIceCandidate)
+ RTCIceCandidate = window.webkitRTCIceCandidate;
+ else if(window.RTCIceCandidate)
+ RTCIceCandidate = window.RTCIceCandidate;
+ else
+ webrtcSupported = false;
+
+ var getUserMedia;
+ if(!navigator.getUserMedia) {
+ if(navigator.mozGetUserMedia)
+ getUserMedia = navigator.mozGetUserMedia.bind(navigator);
+ else if(navigator.webkitGetUserMedia)
+ getUserMedia = navigator.webkitGetUserMedia.bind(navigator);
+ else
+ webrtcSupported = false;
+ } else {
+ getUserMedia = navigator.getUserMedia.bind(navigator);
+ }
+
+ // FIXME: browser detection is gross, but I don't see another way to do this
+ var RTCConnectProtocol;
+ if(window.mozRTCPeerConnection) {
+ RTCConnectProtocol = mozRTCConnectProtocol;
+ } else if(window.webkitRTCPeerConnection) {
+ RTCConnectProtocol = webkitRTCConnectProtocol;
+ } else {
+ webrtcSupported = false;
+ }
+
+ function callback(object, method, args) {
+ if(!Array.isArray(args))
+ args = [args];
+ if(method in object && 'function' === typeof object[method]) {
+ object[method].apply(object, args);
+ }
+ };
+
+ function fail(object, method, error) {
+ if (!(error instanceof Error))
+ error = new Error(error);
+ callback(object, method, [error]);
+ };
+
+ function defer(queue, object, method, args) {
+ if(queue) {
+ queue.push([object, method, args]);
+ return true;
+ } else {
+ return false;
+ }
+ };
+
+ function processDeferredQueue(queue) {
+ while(queue.length) {
+ var deferred = queue.shift();
+ callback(deferred[0], deferred[1], deferred[2]);
+ }
+ };
+
+ var ONE_SECOND = 1000; // milliseconds
+ var DEFAULT_CONNECTION_TIMEOUT = 10 * ONE_SECOND;
+ var DEFAULT_PING_TIMEOUT = 1 * ONE_SECOND;
+ var RELIABLE_CHANNEL_OPTIONS = {
+ reliable: false
+ };
+ var UNRELIABLE_CHANNEL_OPTIONS = {
+ outOfOrderAllowed: true,
+ maxRetransmitNum: 0,
+ reliable: false
+ };
+
+ function PendingConnectionAbortError(message) {
+ this.name = "PendingConnectionAbortError";
+ this.message = (message || "");
+ };
+ PendingConnectionAbortError.prototype = Error.prototype;
+
+ function ConnectionFailedError(message) {
+ this.name = "ConnectionFailedError";
+ this.message = (message || "");
+ };
+ ConnectionFailedError.prototype = Error.prototype;
+
+ var E = {
+ PendingConnectionAbortError: PendingConnectionAbortError,
+ ConnectionFailedError: ConnectionFailedError
+ };
+
+ function WebSocketBroker(brokerUrl) {
+ this.brokerUrl = brokerUrl;
+ this.state = WebSocketBroker.OFFLINE;
+
+ this.onstatechange = null;
+ this.onreceive = null;
+ this.onerror = null;
+
+ this.socket = null;
+ this.route = null;
+ };
+
+ // States
+ WebSocketBroker.OFFLINE = 0x01;
+ WebSocketBroker.CONNECTING = 0x02;
+ WebSocketBroker.CONNECTED = 0x04;
+ // Flags
+ WebSocketBroker.ROUTED = 0x10;
+ WebSocketBroker.LISTENING = 0x20;
+
+ WebSocketBroker.prototype.setState = function setState(state, clearFlags) {
+ var clear = clearFlags ? 0x00 : 0xF0;
+ this.state &= clear >>> 0;
+ this.state |= state >>> 0;
+ callback(this, 'onstatechange', [this.state, (state | (clear & 0x0)) >>> 0]);
+ };
+ WebSocketBroker.prototype.setFlag = function setFlag(flag) {
+ this.state = (this.state | flag) >>> 0;
+ callback(this, 'onstatechange', [this.state, flag])
+ };
+ WebSocketBroker.prototype.clearFlag = function clearFlag(flag) {
+ flag = (~flag) >>> 0;
+ this.state = (this.state & flag) >>> 0;
+ callback(this, 'onstatechange', [this.state, flag])
+ };
+ WebSocketBroker.prototype.checkState = function checkState(mask) {
+ return !!(this.state & mask);
+ };
+ WebSocketBroker.prototype.connect = function connect() {
+ var that = this;
+ var socket = io.connect(this.brokerUrl + '/peer', {
+ 'sync disconnect on unload': true // partially fixes 'interrupted while page loading' warning
+ });
+
+ socket.on('connecting', function onconnecting() {
+ that.setState(WebSocketBroker.CONNECTING, true);
+ });
+
+ socket.on('connect', function onconnect() {
+ that.setState(WebSocketBroker.CONNECTED, true);
+ });
+
+ socket.on('connect_failed', function onconnect_failed() {
+ that.setState(WebSocketBroker.OFFLINE, true);
+ });
+
+ socket.on('route', function onroute(route) {
+ that.route = route;
+ that.setFlag(WebSocketBroker.ROUTED);
+ });
+
+ socket.on('disconnect', function ondisconnect() {
+ that.setState(WebSocketBroker.OFFLINE, true);
+ });
+
+ socket.on('error', function onerror(error) {
+ console.error(error);
+ fail(that, 'onerror', error);
+ });
+
+ socket.on('receive', function onreceive(message) {
+ var from = message['from'];
+ var data = message['data'];
+ callback(that, 'onreceive', [from, data]);
+ });
+
+ this.socket = socket;
+ };
+ WebSocketBroker.prototype.disconnect = function disconnect() {
+ if(this.checkState(WebSocketBroker.CONNECTED)) {
+ this.socket.disconnect();
+ this.setState(WebSocketBroker.OFFLINE, true);
+ return true;
+ } else {
+ return false;
+ }
+ };
+ WebSocketBroker.prototype.listen = function listen(options) {
+ var that = this;
+ if(this.checkState(WebSocketBroker.CONNECTED)) {
+ this.socket.emit('listen', options, function onresponse(response) {
+ if(response && response['error']) {
+ var error = new Error(response['error']);
+ fail(that, 'onerror', error);
+ } else {
+ that.setFlag(WebSocketBroker.LISTENING);
+ }
+ });
+ }
+ };
+ WebSocketBroker.prototype.ignore = function ignore() {
+ var that = this;
+ if(this.checkState(WebSocketBroker.CONNECTED)) {
+ this.socket.emit('ignore', null, function onresponse(response) {
+ if(response && response['error']) {
+ var error = new Error(response['error']);
+ fail(that, 'onerror', error)
+ } else {
+ that.clearFlag(WebSocketBroker.LISTENING);
+ }
+ });
+ }
+ };
+ WebSocketBroker.prototype.send = function send(to, message) {
+ var that = this;
+ if(this.checkState(WebSocketBroker.CONNECTED)) {
+ this.socket.emit('send', {'to': to, 'data': message}, function onresponse(response) {
+ if(response && response['error']) {
+ var error = new Error(response['error']);
+ fail(that, 'onerror', error)
+ }
+ });
+ };
+ };
+
+ var dataChannels = {
+ 'reliable': 'RELIABLE',
+ 'unreliable': 'UNRELIABLE',
+ '@control': 'RELIABLE'
+ };
+ var nextDataConnectionPort = 1;
+ function CommonRTCConnectProtocol() {
+ // FIXME: these timeouts should be configurable
+ this.connectionTimeout = 10 * ONE_SECOND;
+ this.pingTimeout = 1 * ONE_SECOND;
+ };
+ CommonRTCConnectProtocol.prototype.process = function process(message) {
+ var that = this;
+
+ var type = message['type'];
+ switch(type) {
+ case 'ice':
+ var candidate = JSON.parse(message['candidate']);
+ if(candidate)
+ this.handleIce(candidate);
+ break;
+
+ case 'offer':
+ that.ports.remote = message['port'];
+ var offer = {
+ 'type': 'offer',
+ 'sdp': message['description']
+ };
+ this.handleOffer(offer);
+ break;
+
+ case 'answer':
+ that.ports.remote = message['port'];
+ var answer = {
+ 'type': 'answer',
+ 'sdp': message['description']
+ };
+ this.handleAnswer(answer);
+ break;
+
+ case 'abort':
+ this.handleAbort();
+ break;
+
+ default:
+ fail(this, 'onerror', 'unknown message');
+ }
+ };
+ CommonRTCConnectProtocol.prototype.handleAbort = function handleAbort() {
+ fail(this, 'onerror', new Error(E.RTCConnectProtocolAbort));
+ };
+ CommonRTCConnectProtocol.prototype.initialize = function initialize(cb) {
+ var that = this;
+
+ if(this.peerConnection)
+ return cb();
+
+ // FIXME: peer connection servers should be configurable
+ this.peerConnection = new RTCPeerConnection(this.connectionServers, this.connectionOptions);
+ this.peerConnection.onicecandidate = function(event) {
+ var message = {
+ 'type': 'ice',
+ 'candidate': JSON.stringify(event.candidate)
+ };
+ callback(that, 'onmessage', message);
+ };
+ this.peerConnection.onaddstream = function(event) {
+ that.streams['remote'] = event.stream;
+ };
+ this.peerConnection.onstatechange = function(event) {
+ console.log(event.target.readyState);
+ };
+
+ function createStream(useFake) {
+ useFake = (!useVideo && !useAudio) ? true : useFake;
+ var useVideo = !!that.options['video'];
+ var useAudio = !!that.options['audio'];
+ var mediaOptions = {
+ video: useVideo,
+ audio: (!useVideo && !useAudio) ? true : useAudio,
+ fake: useFake
+ };
+ getUserMedia(mediaOptions,
+ function(stream) {
+ that.peerConnection.addStream(stream);
+ that.streams['local'] = stream;
+ cb();
+ },
+ function(error) {
+ console.error('!', error);
+ if(!useFake)
+ createStream(true);
+ else
+ fail(that, 'onerror', error);
+ }
+ );
+ }
+
+ createStream();
+ };
+ CommonRTCConnectProtocol.prototype.handleIce = function handleIce(candidate) {
+ var that = this;
+
+ function setIce() {
+ if(!that.peerConnection.remoteDescription) {
+ return
+ }
+ that.peerConnection.addIceCandidate(new RTCIceCandidate(candidate),
+ function(error) {
+ fail(that, 'onerror', error);
+ }
+ );
+ };
+
+ this.initialize(setIce);
+ };
+ CommonRTCConnectProtocol.prototype.initiate = function initiate() {
+ var that = this;
+ this.initiator = true;
+
+ function createDataChannels() {
+ var labels = Object.keys(dataChannels);
+ labels.forEach(function(label) {
+ var channelOptions = that.channelOptions[dataChannels[label]];
+ var channel = that._pending[label] = that.peerConnection.createDataChannel(label, channelOptions);
+ channel.binaryType = that.options['binaryType'];
+ channel.onopen = function() {
+ that.channels[label] = channel;
+ delete that._pending[label];
+ if(Object.keys(that.channels).length === labels.length) {
+ that.complete = true;
+ callback(that, 'oncomplete', []);
+ }
+ };
+ channel.onerror = function(error) {
+ console.error(error);
+ fail(that, 'onerror', error);
+ };
+ });
+ createOffer();
+ };
+
+ function createOffer() {
+ that.peerConnection.createOffer(setLocal,
+ function(error) {
+ fail(that, 'onerror', error);
+ }
+ );
+ };
+
+ function setLocal(description) {
+ that.peerConnection.setLocalDescription(new RTCSessionDescription(description), complete,
+ function(error) {
+ fail(that, 'onerror', error);
+ }
+ );
+
+ function complete() {
+ var message = {
+ 'type': 'offer',
+ 'description': description['sdp'],
+ 'port': that.ports.local
+ };
+ callback(that, 'onmessage', message);
+ };
+ };
+
+ this.initialize(createDataChannels);
+ };
+ CommonRTCConnectProtocol.prototype.handleOffer = function handleOffer(offer) {
+ var that = this;
+
+ function handleDataChannels() {
+ var labels = Object.keys(dataChannels);
+ that.peerConnection.ondatachannel = function(event) {
+ var channel = event.channel;
+ var label = channel.label;
+ that._pending[label] = channel;
+ channel.binaryType = that.options['binaryType'];
+ channel.onopen = function() {
+ that.channels[label] = channel;
+ delete that._pending[label];
+ if(Object.keys(that.channels).length === labels.length) {
+ that.complete = true;
+ callback(that, 'oncomplete', []);
+ }
+ };
+ channel.onerror = function(error) {
+ console.error(error);
+ fail(that, 'onerror', error);
+ };
+ };
+ setRemote();
+ };
+
+ function setRemote() {
+ that.peerConnection.setRemoteDescription(new RTCSessionDescription(offer), createAnswer,
+ function(error) {
+ fail(that, 'onerror', error);
+ }
+ );
+ };
+
+ function createAnswer() {
+ that.peerConnection.createAnswer(setLocal,
+ function(error) {
+ fail(that, 'onerror', error);
+ }
+ );
+ };
+
+ function setLocal(description) {
+ that.peerConnection.setLocalDescription(new RTCSessionDescription(description), complete,
+ function(error) {
+ fail(that, 'onerror', error);
+ }
+ );
+
+ function complete() {
+ var message = {
+ 'type': 'answer',
+ 'description': description['sdp'],
+ 'port': that.ports.local
+ };
+ callback(that, 'onmessage', message);
+ };
+ };
+
+ this.initialize(handleDataChannels);
+ };
+ CommonRTCConnectProtocol.prototype.handleAnswer = function handleAnswer(answer) {
+ var that = this;
+
+ function setRemote() {
+ that.peerConnection.setRemoteDescription(new RTCSessionDescription(answer), complete,
+ function(error) {
+ fail(that, 'onerror', error);
+ }
+ );
+ };
+
+ function complete() {
+ };
+
+ this.initialize(setRemote);
+ };
+
+ function mozRTCConnectProtocol(options) {
+ this.options = options;
+ this.onmessage = null;
+ this.oncomplete = null;
+ this.onerror = null;
+
+ this.complete = false;
+ this.ports = {
+ local: nextDataConnectionPort ++,
+ remote: null
+ };
+ this.streams = {
+ local: null,
+ remote: null
+ };
+ this.initiator = false;
+
+ this.peerConnection = null;
+ this.channels = {};
+ this._pending = {};
+ this.connectionServers = null;
+ this.connectionOptions = null;
+ this.channelOptions = {
+ RELIABLE: {
+ // defaults
+ },
+ UNRELIABLE: {
+ outOfOrderAllowed: true,
+ maxRetransmitNum: 0
+ }
+ };
+ };
+ mozRTCConnectProtocol.prototype = new CommonRTCConnectProtocol();
+ mozRTCConnectProtocol.prototype.constructor = mozRTCConnectProtocol;
+
+ function webkitRTCConnectProtocol(options) {
+ this.options = options;
+ this.onmessage = null;
+ this.oncomplete = null;
+ this.onerror = null;
+
+ this.complete = false;
+ this.ports = {
+ local: nextDataConnectionPort ++,
+ remote: null
+ };
+ this.streams = {
+ local: null,
+ remote: null
+ };
+ this.initiator = false;
+
+ this.peerConnection = null;
+ this.channels = {};
+ this._pending = {};
+ this.connectionServers = {iceServers:[{url:'stun:23.21.150.121'}]};
+ this.connectionOptions = {
+ 'optional': [{ 'RtpDataChannels': true }]
+ };
+ this.channelOptions = {
+ RELIABLE: {
+ // FIXME: reliable channels do not work in chrome yet
+ reliable: false
+ },
+ UNRELIABLE: {
+ reliable: false
+ }
+ };
+ };
+ webkitRTCConnectProtocol.prototype = new CommonRTCConnectProtocol();
+ webkitRTCConnectProtocol.prototype.constructor = webkitRTCConnectProtocol;
+
+ // FIXME: this could use a cleanup
+ var nextConnectionId = 1;
+ function Connection(options, peerConnection, streams, channels) {
+ var that = this;
+ this.id = nextConnectionId ++;
+ this.streams = streams;
+ this.connected = false;
+ this.messageFlag = false;
+
+ this.onmessage = null;
+ this.ondisconnect = null;
+ this.onerror = null;
+
+ this.peerConnection = peerConnection;
+
+ // DataChannels
+ this.channels = channels;
+
+ this.connectionTimer = null;
+ this.pingTimer = null;
+
+ function handleConnectionTimerExpired() {
+ if(!that.connected)
+ return
+ this.connectionTimer = null;
+ if(false === that.messageFlag) {
+ that.channels['@control'].send('ping');
+ this.pingTimer = window.setTimeout(handlePingTimerExpired, options['pingTimeout']);
+ } else {
+ that.messageFlag = false;
+ this.connectionTimer = window.setTimeout(handleConnectionTimerExpired, options['connectionTimeout']);
+ }
+ };
+ function handlePingTimerExpired() {
+ if(!that.connected)
+ return
+ this.pingTimer = null;
+ if(false === that.messageFlag) {
+ that.connected = false;
+ that.close();
+ } else {
+ that.messageFlag = false;
+ this.connectionTimer = window.setTimeout(handleConnectionTimerExpired, options['connectionTimeout']);
+ }
+ };
+
+ Object.keys(this.channels).forEach(function(label) {
+ var channel = that.channels[label];
+ if(label.match('^@')) // check for internal channels
+ return;
+
+ channel.onmessage = function onmessage(message) {
+ that.messageFlag = true;
+ callback(that, 'onmessage', [label, message]);
+ };
+ });
+ this.channels['@control'].onmessage = function onmessage(message) {
+ that.messageFlag = true;
+ if(that.connected) {
+ var data = message.data;
+ if('ping' === data) {
+ that.channels['@control'].send('pong');
+ } else if('pong' === data) {
+ // ok
+ } else if('quit' === data) {
+ that.close();
+ }
+ }
+ };
+
+ this.connected = true;
+ this.connectionTimer = window.setTimeout(handleConnectionTimerExpired, options['connectionTimeout']);
+ };
+ Connection.prototype.close = function close() {
+ console.log('close connection');
+ if(this.connected) {
+ this.channels['@control'].send('quit');
+ }
+ this.connected = false;
+ this.peerConnection.close();
+ if(this.connectionTimer) {
+ window.clearInterval(this.connectionTimer);
+ this.connectionTimer = null;
+ }
+ if(this.pingTimer) {
+ window.clearInterval(this.pingTimer);
+ this.pingTimer = null;
+ }
+ this.peerConnection = null;
+ callback(this, 'ondisconnect', []);
+ };
+ Connection.prototype.send = function send(label, message) {
+ this.channels[label].send(message);
+ };
+
+ function PendingConnection(route, incoming) {
+ this.route = route;
+ this.incoming = incoming;
+ this.proceed = true;
+ };
+ PendingConnection.prototype.accept = function accept() {
+ this.proceed = true;
+ };
+ PendingConnection.prototype.reject = function reject() {
+ this.proceed = false;
+ };
+
+ function Peer(brokerUrl, options) {
+ if(!webrtcSupported)
+ throw new Error("WebRTC not supported");
+
+ var that = this;
+ this.brokerUrl = brokerUrl;
+ this.options = options = options || {};
+ options['binaryType'] = options['binaryType'] || 'arraybuffer';
+ options['connectionTimeout'] = options['connectionTimeout'] || 10 * ONE_SECOND;
+ options['pingTimeout'] = options['pingTimeout'] || 1 * ONE_SECOND;
+
+ this.onconnection = null;
+ this.onpending = null;
+ this.onroute = null;
+ this.onerror = null;
+
+ this.broker = new WebSocketBroker(brokerUrl);
+ this.broker.onerror = function(error) {
+ fail(that, 'onerror', error);
+ };
+ this.pending = {};
+
+ this.queues = {
+ connected: [],
+ listening: []
+ };
+
+ this.broker.onstatechange = function onstatechange(state, mask) {
+ if(that.queues.connected.length && that.broker.checkState(WebSocketBroker.ROUTED)) {
+ processDeferredQueue(that.queues.connected);
+ if(that.queues.listening.length && that.broker.checkState(WebSocketBroker.LISTENING)) {
+ processDeferredQueue(that.queues.listening);
+ }
+ }
+ if(mask & WebSocketBroker.ROUTED) {
+ callback(that, 'onroute', that.broker.route);
+ }
+ };
+
+ this.broker.onreceive = function onreceive(from, message) {
+ var handshake;
+ if(!that.pending.hasOwnProperty(from)) {
+ if(!that.broker.checkState(WebSocketBroker.LISTENING)) {
+ return;
+ }
+
+ var pendingConnection = new PendingConnection(from, /*incoming*/ true);
+ callback(that, 'onpending', [pendingConnection]);
+ if(!pendingConnection['proceed'])
+ return;
+
+ var handshake = that.pending[from] = new RTCConnectProtocol(that.options);
+ handshake.oncomplete = function() {
+ var connection = new Connection(that.options, handshake.peerConnection, handshake.streams, handshake.channels);
+ connection['route'] = from;
+ delete that.pending[from];
+ callback(that, 'onconnection', [connection]);
+ };
+ handshake.onmessage = function(message) {
+ that.broker.send(from, message);
+ };
+ handshake.onerror = function(error) {
+ delete that.pending[from];
+ callback(that, 'onerror', [error]);
+ };
+ } else {
+ handshake = that.pending[from];
+ }
+ handshake.process(message);
+ };
+
+ this.broker.connect();
+ };
+ Peer.prototype.listen = function listen(options) {
+ if(!this.broker.checkState(WebSocketBroker.ROUTED))
+ return defer(this.queues.connected, this, 'listen', [options]);
+
+ options = options || {};
+ options['url'] = options['url'] || window.location.toString();
+ options['listed'] = (undefined !== options['listed']) ? options['listed'] : true;
+ options['metadata'] = options['metadata'] || {};
+
+ this.broker.listen(options);
+ };
+ Peer.prototype.ignore = function ignore() {
+ throw new Error('not implemented');
+ };
+ Peer.prototype.connect = function connect(route) {
+ if(!this.broker.checkState(WebSocketBroker.ROUTED))
+ return defer(this.queues.connected, this, 'connect', [route]);
+
+ var that = this;
+
+ if(this.pending.hasOwnProperty(route))
+ throw new Error('already connecting to this host'); // FIXME: we can handle this better
+
+ var pendingConnection = new PendingConnection(route, /*incoming*/ false);
+ callback(that, 'onpending', [pendingConnection]);
+ if(!pendingConnection['proceed'])
+ return;
+
+ var handshake = this.pending[route] = new RTCConnectProtocol(this.options);
+ handshake.oncomplete = function() {
+ var connection = new Connection(this.options, handshake.peerConnection, handshake.streams, handshake.channels);
+ connection['route'] = route;
+ delete that.pending[route];
+ callback(that, 'onconnection', [connection]);
+ };
+ handshake.onmessage = function(message) {
+ that.broker.send(route, message);
+ };
+ handshake.onerror = function(error) {
+ delete that.pending[route];
+ fail(that, 'onerror', error);
+ };
+
+ handshake.initiate();
+ };
+ Peer.prototype.close = function close() {
+ this.broker.disconnect();
+ };
+ Peer.E = E;
+
+ return Peer;
+
+});
+})(typeof define == 'function' && define.amd
+? define
+: function (deps, factory) { typeof exports === 'object'
+? (module.exports = factory())
+: (this.Peer = factory());
+},
+// Boilerplate for AMD, Node, and browser global
+this
+); \ No newline at end of file
diff --git a/tests/sockets/p2p/package.json b/tests/sockets/p2p/package.json
new file mode 100644
index 00000000..e94eef45
--- /dev/null
+++ b/tests/sockets/p2p/package.json
@@ -0,0 +1,17 @@
+{
+ "name": "p2p",
+ "version": "0.0.1-21",
+ "private": true,
+ "scripts": {
+ "start": "node broker/p2p-broker.js"
+ },
+ "dependencies": {
+ "lodash": "~1.0.1",
+ "socket.io": "~0.9.13"
+ },
+ "engines": {
+ "node": "0.8.x",
+ "npm": "1.1.x"
+ },
+ "subdomain": "wrtcb"
+}
diff --git a/tests/sockets/test_enet_client.c b/tests/sockets/test_enet_client.c
index afcdcae8..b422e70c 100644
--- a/tests/sockets/test_enet_client.c
+++ b/tests/sockets/test_enet_client.c
@@ -1,14 +1,14 @@
#include <stdio.h>
#include <string.h>
#include <enet/enet.h>
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
#include <emscripten.h>
#endif
ENetHost * host;
void main_loop() {
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
static int counter = 0;
counter++;
if (counter == 100) {
@@ -34,7 +34,7 @@ void main_loop() {
event.channelID);
int result = strcmp("packetfoo", event.packet->data);
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
REPORT_RESULT();
#else
exit(EXIT_SUCCESS);
@@ -92,7 +92,7 @@ int main (int argc, char ** argv)
exit (EXIT_FAILURE);
}
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
#if USE_IFRAME
emscripten_run_script("console.log('adding iframe');"
"var iframe = document.createElement('iframe');"
@@ -104,7 +104,7 @@ int main (int argc, char ** argv)
#endif
#endif
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
emscripten_set_main_loop(main_loop, 3, 1);
#else
while (1) main_loop();
diff --git a/tests/sockets/test_enet_server.c b/tests/sockets/test_enet_server.c
index 9a4518ac..30d86a99 100644
--- a/tests/sockets/test_enet_server.c
+++ b/tests/sockets/test_enet_server.c
@@ -4,7 +4,7 @@
#include <string.h>
#include <enet/enet.h>
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
#include <emscripten.h>
#endif
@@ -29,12 +29,12 @@ void send_msg(ENetPeer *peer) {
void main_loop() {
static int counter = 0;
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
counter++;
#endif
if (counter == 100) {
printf("stop!\n");
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
emscripten_cancel_main_loop();
#endif
return;
@@ -101,7 +101,7 @@ int main (int argc, char ** argv)
exit (EXIT_FAILURE);
}
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
emscripten_set_main_loop(main_loop, 3, 1);
#else
while (1) main_loop();
diff --git a/tests/sockets/test_getaddrinfo.c b/tests/sockets/test_getaddrinfo.c
index 1f912c69..85610473 100644
--- a/tests/sockets/test_getaddrinfo.c
+++ b/tests/sockets/test_getaddrinfo.c
@@ -6,7 +6,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
#include <emscripten.h>
#endif
diff --git a/tests/sockets/test_gethostbyname.c b/tests/sockets/test_gethostbyname.c
index 459c6b98..c0e11efb 100644
--- a/tests/sockets/test_gethostbyname.c
+++ b/tests/sockets/test_gethostbyname.c
@@ -7,7 +7,7 @@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
#include <emscripten.h>
#endif
diff --git a/tests/sockets/test_getnameinfo.c b/tests/sockets/test_getnameinfo.c
index c3fec6b4..dd4a0419 100644
--- a/tests/sockets/test_getnameinfo.c
+++ b/tests/sockets/test_getnameinfo.c
@@ -6,7 +6,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
#include <emscripten.h>
#endif
@@ -98,4 +98,4 @@ int main() {
puts("success");
return EXIT_SUCCESS;
-} \ No newline at end of file
+}
diff --git a/tests/sockets/test_sockets_echo_client.c b/tests/sockets/test_sockets_echo_client.c
index 684d767f..58d005c4 100644
--- a/tests/sockets/test_sockets_echo_client.c
+++ b/tests/sockets/test_sockets_echo_client.c
@@ -10,7 +10,7 @@
#include <fcntl.h>
#include <sys/ioctl.h>
#include <assert.h>
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
#include <emscripten.h>
#endif
@@ -42,7 +42,7 @@ void finish(int result) {
close(server.fd);
server.fd = 0;
}
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
REPORT_RESULT();
#endif
exit(result);
@@ -160,7 +160,7 @@ int main() {
finish(EXIT_FAILURE);
}
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
emscripten_set_main_loop(main_loop, 0, 0);
#else
while (1) main_loop();
diff --git a/tests/sockets/test_sockets_echo_server.c b/tests/sockets/test_sockets_echo_server.c
index b24472e8..55898add 100644
--- a/tests/sockets/test_sockets_echo_server.c
+++ b/tests/sockets/test_sockets_echo_server.c
@@ -11,7 +11,7 @@
#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/socket.h>
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
#include <emscripten.h>
#endif
@@ -186,7 +186,7 @@ int main() {
}
#endif
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
emscripten_set_main_loop(main_loop, 60, 0);
#else
while (1) main_loop();
diff --git a/tests/sockets/test_sockets_partial_client.c b/tests/sockets/test_sockets_partial_client.c
index 61084b17..2d930516 100644
--- a/tests/sockets/test_sockets_partial_client.c
+++ b/tests/sockets/test_sockets_partial_client.c
@@ -10,7 +10,7 @@
#include <unistd.h>
#include <sys/ioctl.h>
#include <assert.h>
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
#include <emscripten.h>
#endif
@@ -19,7 +19,7 @@ int sum = 0;
void finish(int result) {
close(sockfd);
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
REPORT_RESULT();
#endif
exit(result);
@@ -108,7 +108,7 @@ int main() {
finish(EXIT_FAILURE);
}
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
emscripten_set_main_loop(iter, 0, 0);
#else
while (1) iter();
diff --git a/tests/sockets/test_sockets_partial_server.c b/tests/sockets/test_sockets_partial_server.c
index f740c307..5c3621a0 100644
--- a/tests/sockets/test_sockets_partial_server.c
+++ b/tests/sockets/test_sockets_partial_server.c
@@ -11,7 +11,7 @@
#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/socket.h>
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
#include <emscripten.h>
#endif
@@ -124,7 +124,7 @@ int main() {
exit(EXIT_FAILURE);
}
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
emscripten_set_main_loop(iter, 60, 0);
#else
while (1) iter();
diff --git a/tests/sockets/test_sockets_select_server_closes_connection_client_rw.c b/tests/sockets/test_sockets_select_server_closes_connection_client_rw.c
index e69c3ac0..28a81cd9 100644
--- a/tests/sockets/test_sockets_select_server_closes_connection_client_rw.c
+++ b/tests/sockets/test_sockets_select_server_closes_connection_client_rw.c
@@ -10,7 +10,7 @@
#include <fcntl.h>
#include <sys/ioctl.h>
#include <assert.h>
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
#include <emscripten.h>
#endif
@@ -24,7 +24,7 @@ msg_t writemsg;
void finish(int result) {
close(sockfd);
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
REPORT_RESULT();
#endif
exit(result);
@@ -216,7 +216,7 @@ int main() {
finish(EXIT_FAILURE);
}
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
emscripten_set_main_loop(main_loop, 0, 0);
#else
while (1) main_loop();
diff --git a/tests/sockets/test_sockets_select_server_down_client.c b/tests/sockets/test_sockets_select_server_down_client.c
index 2765a879..5b050870 100644
--- a/tests/sockets/test_sockets_select_server_down_client.c
+++ b/tests/sockets/test_sockets_select_server_down_client.c
@@ -10,7 +10,7 @@
#include <fcntl.h>
#include <sys/ioctl.h>
#include <assert.h>
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
#include <emscripten.h>
#endif
@@ -20,7 +20,7 @@ int sockfd = -1;
void finish(int result) {
close(sockfd);
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
REPORT_RESULT();
#endif
exit(result);
@@ -87,7 +87,7 @@ int main() {
finish(EXIT_FAILURE);
}
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
emscripten_set_main_loop(iter, 0, 0);
#else
while (1) iter();
diff --git a/tests/sockets/test_sockets_select_server_down_server.c b/tests/sockets/test_sockets_select_server_down_server.c
index 012932cf..07c5c847 100644
--- a/tests/sockets/test_sockets_select_server_down_server.c
+++ b/tests/sockets/test_sockets_select_server_down_server.c
@@ -10,7 +10,7 @@
#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/socket.h>
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
#include <emscripten.h>
#endif
@@ -47,7 +47,7 @@ int main() {
close(serverfd);
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
emscripten_set_main_loop(main_loop, 60, 0);
#else
while (1) main_loop(); sleep(1);
diff --git a/tests/sockets/webrtc_host.c b/tests/sockets/webrtc_host.c
index 866c875c..38adb0f2 100644
--- a/tests/sockets/webrtc_host.c
+++ b/tests/sockets/webrtc_host.c
@@ -9,7 +9,7 @@
#include <unistd.h>
#include <sys/ioctl.h>
#include <assert.h>
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
#include <emscripten.h>
#endif
@@ -22,7 +22,7 @@ char buf[BUFLEN];
char expected[] = "emscripten";
struct sockaddr_in si_host,
si_peer;
-struct iovec iov[1];
+struct iovec iov[1];
struct msghdr hdr;
int done = 0;
@@ -37,8 +37,11 @@ void iter() {
shutdown(sock, SHUT_RDWR);
close(sock);
-#if EMSCRIPTEN
- int result = 1;
+#ifdef __EMSCRIPTEN__
+ if(strlen((char*)hdr.msg_iov[0].iov_base) == strlen(expected) &&
+ 0 == strncmp((char*)hdr.msg_iov[0].iov_base, expected, strlen(expected))) {
+ result = 1;
+ }
REPORT_RESULT();
exit(EXIT_SUCCESS);
emscripten_cancel_main_loop();
@@ -68,10 +71,10 @@ int main(void)
perror("cannot bind host socket");
exit(EXIT_FAILURE);
}
-
+
iov[0].iov_base = buf;
iov[0].iov_len = sizeof(buf);
-
+
memset (&hdr, 0, sizeof (struct msghdr));
hdr.msg_name = &si_peer;
@@ -79,7 +82,7 @@ int main(void)
hdr.msg_iov = iov;
hdr.msg_iovlen = 1;
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
emscripten_set_main_loop(iter, 0, 0);
#else
while (!done) iter();
diff --git a/tests/sockets/webrtc_peer.c b/tests/sockets/webrtc_peer.c
index dd44e93e..7b5f3a8a 100644
--- a/tests/sockets/webrtc_peer.c
+++ b/tests/sockets/webrtc_peer.c
@@ -9,7 +9,7 @@
#include <unistd.h>
#include <sys/ioctl.h>
#include <assert.h>
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
#include <emscripten.h>
#endif
@@ -46,7 +46,7 @@ void iter() {
}
int main(void)
-{
+{
memset(&si_host, 0, sizeof(struct sockaddr_in));
si_host.sin_family = AF_INET;
@@ -63,7 +63,7 @@ int main(void)
iov[0].iov_base = buf;
iov[0].iov_len = sizeof(buf);
-
+
memset (&hdr, 0, sizeof (struct msghdr));
hdr.msg_name = &si_host;
@@ -71,7 +71,7 @@ int main(void)
hdr.msg_iov = iov;
hdr.msg_iovlen = 1;
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
emscripten_set_main_loop(iter, 0, 0);
#else
while (!done) iter();
diff --git a/tests/sqlite/benchmark.c b/tests/sqlite/benchmark.c
index de800742..04dc150a 100644
--- a/tests/sqlite/benchmark.c
+++ b/tests/sqlite/benchmark.c
@@ -1,5 +1,6 @@
#include <time.h>
#include <stdio.h>
+#include <stdlib.h>
#include <sqlite3.h>
#include <emscripten.h>
diff --git a/tests/sqlite/sqlite3.c b/tests/sqlite/sqlite3.c
index bcbb7cdd..2d7c7725 100644
--- a/tests/sqlite/sqlite3.c
+++ b/tests/sqlite/sqlite3.c
@@ -38132,9 +38132,6 @@ static int writeJournalHdr(Pager *pPager){
u32 nHeader = (u32)pPager->pageSize;/* Size of buffer pointed to by zHeader */
u32 nWrite; /* Bytes of header sector written */
int ii; /* Loop counter */
-#ifdef EMSCRIPTEN
- u8 temp[4];
-#endif
assert( isOpen(pPager->jfd) ); /* Journal file must be open. */
@@ -38185,12 +38182,7 @@ static int writeJournalHdr(Pager *pPager){
}
/* The random check-hash initialiser */
-#ifdef EMSCRIPTEN
- sqlite3_randomness(sizeof(pPager->cksumInit), temp);
- pPager->cksumInit = temp[0] + (((u32)temp[1]) << 8) + (((u32)temp[2]) << 16) + (((u32)temp[3]) << 24);
-#else
sqlite3_randomness(sizeof(pPager->cksumInit), &pPager->cksumInit);
-#endif
put32bits(&zHeader[sizeof(aJournalMagic)+4], pPager->cksumInit);
/* The initial database size */
put32bits(&zHeader[sizeof(aJournalMagic)+8], pPager->dbOrigSize);
@@ -52942,12 +52934,7 @@ static void dropCell(MemPage *pPage, int idx, int sz, int *pRC){
endPtr = &data[pPage->cellOffset + 2*pPage->nCell - 2];
assert( (SQLITE_PTR_TO_INT(ptr)&1)==0 ); /* ptr is always 2-byte aligned */
while( ptr<endPtr ){
-#ifdef EMSCRIPTEN
- ptr[0] = ptr[2];
- ptr[1] = ptr[3];
-#else
*(u16*)ptr = *(u16*)&ptr[2];
-#endif
ptr += 2;
}
pPage->nCell--;
@@ -53043,12 +53030,7 @@ static void insertCell(
endPtr = &data[ins];
assert( (SQLITE_PTR_TO_INT(ptr)&1)==0 ); /* ptr is always 2-byte aligned */
while( ptr>endPtr ){
-#ifdef EMSCRIPTEN
- ptr[0] = ptr[-2];
- ptr[1] = ptr[-1];
-#else
*(u16*)ptr = *(u16*)&ptr[-2];
-#endif
ptr -= 2;
}
put2byte(&data[ins], idx);
diff --git a/tests/stat/test_mknod.c b/tests/stat/test_mknod.c
index 361b2315..262c8a5f 100644
--- a/tests/stat/test_mknod.c
+++ b/tests/stat/test_mknod.c
@@ -32,7 +32,7 @@ void test() {
// than a FIFO. so, the tests are disabled when running
// natively as they'd be utterly inconsistent.
//
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
// mknod a folder
err = mknod("mknod-folder", S_IFDIR | 0777, 0);
diff --git a/tests/stat/test_stat.c b/tests/stat/test_stat.c
index f59fb3c3..e14ebdc5 100644
--- a/tests/stat/test_stat.c
+++ b/tests/stat/test_stat.c
@@ -55,7 +55,7 @@ void test() {
assert(s.st_atime == 1200000000);
assert(s.st_mtime == 1200000000);
assert(s.st_ctime);
-#ifdef EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
assert(s.st_blksize == 4096);
assert(s.st_blocks == 1);
#endif
@@ -73,7 +73,7 @@ void test() {
assert(s.st_atime == 1200000000);
assert(s.st_mtime == 1200000000);
assert(s.st_ctime);
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
assert(s.st_blksize == 4096);
assert(s.st_blocks == 1);
#endif
@@ -91,7 +91,7 @@ void test() {
assert(s.st_atime == 1200000000);
assert(s.st_mtime == 1200000000);
assert(s.st_ctime);
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
assert(s.st_blksize == 4096);
assert(s.st_blocks == 1);
#endif
@@ -112,7 +112,7 @@ void test() {
assert(s.st_atime);
assert(s.st_mtime);
assert(s.st_ctime);
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
assert(s.st_blksize == 4096);
assert(s.st_blocks == 0);
#endif
@@ -130,7 +130,7 @@ void test() {
assert(s.st_atime == 1200000000);
assert(s.st_mtime == 1200000000);
assert(s.st_ctime);
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
assert(s.st_blksize == 4096);
assert(s.st_blocks == 1);
#endif
@@ -148,7 +148,7 @@ void test() {
assert(s.st_atime != 1200000000); // should NOT match the utime call we did for dir/file
assert(s.st_mtime != 1200000000);
assert(s.st_ctime);
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
assert(s.st_blksize == 4096);
assert(s.st_blocks == 1);
#endif
diff --git a/tests/test_benchmark.py b/tests/test_benchmark.py
index 023ac1e2..735f0feb 100644
--- a/tests/test_benchmark.py
+++ b/tests/test_benchmark.py
@@ -20,9 +20,10 @@ class Benchmarker:
def __init__(self, name):
self.name = name
- def bench(self, args, output_parser=None):
+ def bench(self, args, output_parser=None, reps=TEST_REPS):
self.times = []
- for i in range(TEST_REPS):
+ self.reps = reps
+ for i in range(reps):
start = time.time()
output = self.run(args)
if not output_parser:
@@ -41,7 +42,7 @@ class Benchmarker:
sorted_times.sort()
median = sum(sorted_times[len(sorted_times)/2 - 1:len(sorted_times)/2 + 1])/2
- print ' %10s: mean: %4.3f (+-%4.3f) secs median: %4.3f range: %4.3f-%4.3f (noise: %4.3f%%) (%d runs)' % (self.name, mean, std, median, min(self.times), max(self.times), 100*std/mean, TEST_REPS),
+ print ' %10s: mean: %4.3f (+-%4.3f) secs median: %4.3f range: %4.3f-%4.3f (noise: %4.3f%%) (%d runs)' % (self.name, mean, std, median, min(self.times), max(self.times), 100*std/mean, self.reps),
if baseline:
mean_baseline = sum(baseline.times)/len(baseline.times)
@@ -110,8 +111,7 @@ process(sys.argv[1])
'-O3', '-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',
- #'-g2',
+ #'-profiling',
'-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
@@ -130,11 +130,11 @@ try:
#NativeBenchmarker('clang-3.4', os.path.join(LLVM_3_4, 'clang'), os.path.join(LLVM_3_4, 'clang++')),
#NativeBenchmarker('gcc', 'gcc', 'g++'),
JSBenchmarker('sm-f32', SPIDERMONKEY_ENGINE, ['-s', 'PRECISE_F32=2']),
+ #JSBenchmarker('sm-f32-si', SPIDERMONKEY_ENGINE, ['-profiling', '-s', 'PRECISE_F32=2', '-s', 'SIMPLIFY_IFS=1']),
#JSBenchmarker('sm-f32-aggro', SPIDERMONKEY_ENGINE, ['-s', 'PRECISE_F32=2', '-s', 'AGGRESSIVE_VARIABLE_ELIMINATION=1']),
#JSBenchmarker('sm-f32-3.2', SPIDERMONKEY_ENGINE, ['-s', 'PRECISE_F32=2'], env={ 'LLVM': LLVM_3_2 }),
#JSBenchmarker('sm-f32-3.3', SPIDERMONKEY_ENGINE, ['-s', 'PRECISE_F32=2'], env={ 'LLVM': LLVM_3_3 }),
#JSBenchmarker('sm-f32-3.4', SPIDERMONKEY_ENGINE, ['-s', 'PRECISE_F32=2'], env={ 'LLVM': LLVM_3_4 }),
- #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)
@@ -193,7 +193,7 @@ class benchmark(RunnerCore):
print
for b in benchmarkers:
b.build(self, filename, args, shared_args, emcc_args, native_args, native_exec, lib_builder)
- b.bench(args, output_parser)
+ b.bench(args, output_parser, reps)
b.display(benchmarkers[0])
def test_primes(self):
@@ -362,6 +362,51 @@ class benchmark(RunnerCore):
'''
self.do_benchmark('copy', src, 'sum:')
+ def test_ifs(self):
+ src = r'''
+ #include <stdio.h>
+ #include <stdlib.h>
+
+ volatile int x = 0;
+
+ __attribute__ ((noinline)) int calc() {
+ return (x++) & 16384;
+ }
+
+ int main(int argc, char *argv[]) {
+ int arg = argc > 1 ? argv[1][0] - '0' : 3;
+ switch(arg) {
+ case 0: return 0; break;
+ case 1: arg = 75; break;
+ case 2: arg = 625; break;
+ case 3: arg = 1250; break;
+ case 4: arg = 5*1250; break;
+ case 5: arg = 10*1250; break;
+ default: printf("error: %d\\n", arg); return -1;
+ }
+
+ int sum = 0;
+
+ for (int j = 0; j < 27000; j++) {
+ for (int i = 0; i < arg; i++) {
+ if (calc() && calc()) {
+ sum += 17;
+ } else {
+ sum += 19;
+ }
+ if (calc() || calc()) {
+ sum += 23;
+ }
+ }
+ }
+
+ printf("ok\n");
+
+ return sum;
+ }
+ '''
+ self.do_benchmark('ifs', src, 'ok', reps=TEST_REPS*5)
+
def test_fannkuch(self):
src = open(path_from_root('tests', 'fannkuch.cpp'), 'r').read().replace(
'int n = argc > 1 ? atoi(argv[1]) : 0;',
diff --git a/tests/test_browser.py b/tests/test_browser.py
index c1d1caab..c06f11ac 100644
--- a/tests/test_browser.py
+++ b/tests/test_browser.py
@@ -1,5 +1,5 @@
import BaseHTTPServer, multiprocessing, os, shutil, subprocess, unittest, zlib, webbrowser, time, shlex
-from runner import BrowserCore, path_from_root
+from runner import BrowserCore, path_from_root, nonfastcomp
from tools.shared import *
# User can specify an environment variable EMSCRIPTEN_BROWSER to force the browser test suite to
@@ -51,23 +51,6 @@ def test_chunked_synchronous_xhr_server(support_byte_ranges, chunkSize, data, ch
httpd.handle_request()
class browser(BrowserCore):
- @staticmethod
- def audio():
- print
- print 'Running the browser audio tests. Make sure to listen to hear the correct results!'
- print
- audio_test_cases = [
- 'test_sdl_audio',
- 'test_sdl_audio_mix_channels',
- 'test_sdl_audio_mix',
- 'test_sdl_audio_quickload',
- 'test_sdl_audio_beeps',
- 'test_openal_playback',
- 'test_openal_buffers',
- 'test_freealut'
- ]
- return unittest.TestSuite(map(browser, audio_test_cases))
-
@classmethod
def setUpClass(self):
super(browser, self).setUpClass()
@@ -120,8 +103,6 @@ If manually bisecting:
'''
def test_emscripten_log(self):
- if os.environ.get('EMCC_FAST_COMPILER') == '1': return self.skip('fastcomp uses asm, where call stacks are sometimes less clear')
-
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()))
@@ -143,191 +124,193 @@ If manually bisecting:
os.chdir(cwd)
def test_split(self):
- if os.environ.get('EMCC_FAST_COMPILER') == '1': return self.skip('no --split in fastcomp, deprecated')
+ def nfc():
+ # test HTML generation.
+ self.reftest(path_from_root('tests', 'htmltest.png'))
+ output = Popen([PYTHON, EMCC, path_from_root('tests', 'hello_world_sdl.cpp'), '-o', 'something.js', '--split', '100', '--pre-js', 'reftest.js']).communicate()
+ assert os.path.exists(os.path.join(self.get_dir(), 'something.js')), 'must be main js file'
+ assert os.path.exists(os.path.join(self.get_dir(), 'something_functions.js')), 'must be functions js file'
+ assert os.path.exists(os.path.join(self.get_dir(), 'something.include.html')), 'must be js include file'
- # test HTML generation.
- self.reftest(path_from_root('tests', 'htmltest.png'))
- output = Popen([PYTHON, EMCC, path_from_root('tests', 'hello_world_sdl.cpp'), '-o', 'something.js', '--split', '100', '--pre-js', 'reftest.js']).communicate()
- assert os.path.exists(os.path.join(self.get_dir(), 'something.js')), 'must be main js file'
- assert os.path.exists(os.path.join(self.get_dir(), 'something_functions.js')), 'must be functions js file'
- assert os.path.exists(os.path.join(self.get_dir(), 'something.include.html')), 'must be js include file'
-
- open(os.path.join(self.get_dir(), 'something.html'), 'w').write('''
-
- <!doctype html>
- <html lang="en-us">
- <head>
- <meta charset="utf-8">
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <title>Emscripten-Generated Code</title>
- <style>
- .emscripten { padding-right: 0; margin-left: auto; margin-right: auto; display: block; }
- canvas.emscripten { border: 1px solid black; }
- textarea.emscripten { font-family: monospace; width: 80%; }
- div.emscripten { text-align: center; }
- </style>
- </head>
- <body>
- <hr/>
- <div class="emscripten" id="status">Downloading...</div>
- <div class="emscripten">
- <progress value="0" max="100" id="progress" hidden=1></progress>
- </div>
- <canvas class="emscripten" id="canvas" oncontextmenu="event.preventDefault()"></canvas>
- <hr/>
- <div class="emscripten"><input type="button" value="fullscreen" onclick="Module.requestFullScreen()"></div>
- <hr/>
- <textarea class="emscripten" id="output" rows="8"></textarea>
- <hr>
- <script type='text/javascript'>
- // connect to canvas
- var Module = {
- preRun: [],
- postRun: [],
- print: (function() {
- var element = document.getElementById('output');
- element.value = ''; // clear browser cache
- return function(text) {
- // These replacements are necessary if you render to raw HTML
- //text = text.replace(/&/g, "&amp;");
- //text = text.replace(/</g, "&lt;");
- //text = text.replace(/>/g, "&gt;");
- //text = text.replace('\\n', '<br>', 'g');
- element.value += text + "\\n";
- element.scrollTop = element.scrollHeight; // focus on bottom
- };
- })(),
- printErr: function(text) {
- if (0) { // XXX disabled for safety typeof dump == 'function') {
- dump(text + '\\n'); // fast, straight to the real console
- } else {
- console.log(text);
- }
- },
- canvas: document.getElementById('canvas'),
- setStatus: function(text) {
- if (Module.setStatus.interval) clearInterval(Module.setStatus.interval);
- var m = text.match(/([^(]+)\((\d+(\.\d+)?)\/(\d+)\)/);
- var statusElement = document.getElementById('status');
- var progressElement = document.getElementById('progress');
- if (m) {
- text = m[1];
- progressElement.value = parseInt(m[2])*100;
- progressElement.max = parseInt(m[4])*100;
- progressElement.hidden = false;
- } else {
- progressElement.value = null;
- progressElement.max = null;
- progressElement.hidden = true;
+ open(os.path.join(self.get_dir(), 'something.html'), 'w').write('''
+
+ <!doctype html>
+ <html lang="en-us">
+ <head>
+ <meta charset="utf-8">
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+ <title>Emscripten-Generated Code</title>
+ <style>
+ .emscripten { padding-right: 0; margin-left: auto; margin-right: auto; display: block; }
+ canvas.emscripten { border: 1px solid black; }
+ textarea.emscripten { font-family: monospace; width: 80%; }
+ div.emscripten { text-align: center; }
+ </style>
+ </head>
+ <body>
+ <hr/>
+ <div class="emscripten" id="status">Downloading...</div>
+ <div class="emscripten">
+ <progress value="0" max="100" id="progress" hidden=1></progress>
+ </div>
+ <canvas class="emscripten" id="canvas" oncontextmenu="event.preventDefault()"></canvas>
+ <hr/>
+ <div class="emscripten"><input type="button" value="fullscreen" onclick="Module.requestFullScreen()"></div>
+ <hr/>
+ <textarea class="emscripten" id="output" rows="8"></textarea>
+ <hr>
+ <script type='text/javascript'>
+ // connect to canvas
+ var Module = {
+ preRun: [],
+ postRun: [],
+ print: (function() {
+ var element = document.getElementById('output');
+ element.value = ''; // clear browser cache
+ return function(text) {
+ // These replacements are necessary if you render to raw HTML
+ //text = text.replace(/&/g, "&amp;");
+ //text = text.replace(/</g, "&lt;");
+ //text = text.replace(/>/g, "&gt;");
+ //text = text.replace('\\n', '<br>', 'g');
+ element.value += text + "\\n";
+ element.scrollTop = element.scrollHeight; // focus on bottom
+ };
+ })(),
+ printErr: function(text) {
+ if (0) { // XXX disabled for safety typeof dump == 'function') {
+ dump(text + '\\n'); // fast, straight to the real console
+ } else {
+ console.log(text);
+ }
+ },
+ canvas: document.getElementById('canvas'),
+ setStatus: function(text) {
+ if (Module.setStatus.interval) clearInterval(Module.setStatus.interval);
+ var m = text.match(/([^(]+)\((\d+(\.\d+)?)\/(\d+)\)/);
+ var statusElement = document.getElementById('status');
+ var progressElement = document.getElementById('progress');
+ if (m) {
+ text = m[1];
+ progressElement.value = parseInt(m[2])*100;
+ progressElement.max = parseInt(m[4])*100;
+ progressElement.hidden = false;
+ } else {
+ progressElement.value = null;
+ progressElement.max = null;
+ progressElement.hidden = true;
+ }
+ statusElement.innerHTML = text;
+ },
+ totalDependencies: 0,
+ monitorRunDependencies: function(left) {
+ this.totalDependencies = Math.max(this.totalDependencies, left);
+ Module.setStatus(left ? 'Preparing... (' + (this.totalDependencies-left) + '/' + this.totalDependencies + ')' : 'All downloads complete.');
}
- statusElement.innerHTML = text;
- },
- totalDependencies: 0,
- monitorRunDependencies: function(left) {
- this.totalDependencies = Math.max(this.totalDependencies, left);
- Module.setStatus(left ? 'Preparing... (' + (this.totalDependencies-left) + '/' + this.totalDependencies + ')' : 'All downloads complete.');
- }
- };
- Module.setStatus('Downloading...');
- </script>''' + open(os.path.join(self.get_dir(), 'something.include.html')).read() + '''
- </body>
- </html>
- ''')
+ };
+ Module.setStatus('Downloading...');
+ </script>''' + open(os.path.join(self.get_dir(), 'something.include.html')).read() + '''
+ </body>
+ </html>
+ ''')
- self.run_browser('something.html', 'You should see "hello, world!" and a colored cube.', '/report_result?0')
+ self.run_browser('something.html', 'You should see "hello, world!" and a colored cube.', '/report_result?0')
+
+ nonfastcomp(nfc)
def test_split_in_source_filenames(self):
- if os.environ.get('EMCC_FAST_COMPILER') == '1': return self.skip('no --split in fastcomp, deprecated')
-
- self.reftest(path_from_root('tests', 'htmltest.png'))
- output = Popen([PYTHON, EMCC, path_from_root('tests', 'hello_world_sdl.cpp'), '-o', 'something.js', '-g', '--split', '100', '--pre-js', 'reftest.js']).communicate()
- assert os.path.exists(os.path.join(self.get_dir(), 'something.js')), 'must be main js file'
- assert os.path.exists(os.path.join(self.get_dir(), 'something', 'hello_world_sdl.cpp.js')), 'must be functions js file'
- assert os.path.exists(os.path.join(self.get_dir(), 'something.include.html')), 'must be js include file'
-
- open(os.path.join(self.get_dir(), 'something.html'), 'w').write('''
-
- <!doctype html>
- <html lang="en-us">
- <head>
- <meta charset="utf-8">
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <title>Emscripten-Generated Code</title>
- <style>
- .emscripten { padding-right: 0; margin-left: auto; margin-right: auto; display: block; }
- canvas.emscripten { border: 1px solid black; }
- textarea.emscripten { font-family: monospace; width: 80%; }
- div.emscripten { text-align: center; }
- </style>
- </head>
- <body>
- <hr/>
- <div class="emscripten" id="status">Downloading...</div>
- <div class="emscripten">
- <progress value="0" max="100" id="progress" hidden=1></progress>
- </div>
- <canvas class="emscripten" id="canvas" oncontextmenu="event.preventDefault()"></canvas>
- <hr/>
- <div class="emscripten"><input type="button" value="fullscreen" onclick="Module.requestFullScreen()"></div>
- <hr/>
- <textarea class="emscripten" id="output" rows="8"></textarea>
- <hr>
- <script type='text/javascript'>
- // connect to canvas
- var Module = {
- preRun: [],
- postRun: [],
- print: (function() {
- var element = document.getElementById('output');
- element.value = ''; // clear browser cache
- return function(text) {
- // These replacements are necessary if you render to raw HTML
- //text = text.replace(/&/g, "&amp;");
- //text = text.replace(/</g, "&lt;");
- //text = text.replace(/>/g, "&gt;");
- //text = text.replace('\\n', '<br>', 'g');
- element.value += text + "\\n";
- element.scrollTop = element.scrollHeight; // focus on bottom
- };
- })(),
- printErr: function(text) {
- if (0) { // XXX disabled for safety typeof dump == 'function') {
- dump(text + '\\n'); // fast, straight to the real console
- } else {
- console.log(text);
- }
- },
- canvas: document.getElementById('canvas'),
- setStatus: function(text) {
- if (Module.setStatus.interval) clearInterval(Module.setStatus.interval);
- var m = text.match(/([^(]+)\((\d+(\.\d+)?)\/(\d+)\)/);
- var statusElement = document.getElementById('status');
- var progressElement = document.getElementById('progress');
- if (m) {
- text = m[1];
- progressElement.value = parseInt(m[2])*100;
- progressElement.max = parseInt(m[4])*100;
- progressElement.hidden = false;
- } else {
- progressElement.value = null;
- progressElement.max = null;
- progressElement.hidden = true;
+ def nfc():
+ self.reftest(path_from_root('tests', 'htmltest.png'))
+ output = Popen([PYTHON, EMCC, path_from_root('tests', 'hello_world_sdl.cpp'), '-o', 'something.js', '-g', '--split', '100', '--pre-js', 'reftest.js']).communicate()
+ assert os.path.exists(os.path.join(self.get_dir(), 'something.js')), 'must be main js file'
+ assert os.path.exists(os.path.join(self.get_dir(), 'something', 'hello_world_sdl.cpp.js')), 'must be functions js file'
+ assert os.path.exists(os.path.join(self.get_dir(), 'something.include.html')), 'must be js include file'
+
+ open(os.path.join(self.get_dir(), 'something.html'), 'w').write('''
+
+ <!doctype html>
+ <html lang="en-us">
+ <head>
+ <meta charset="utf-8">
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+ <title>Emscripten-Generated Code</title>
+ <style>
+ .emscripten { padding-right: 0; margin-left: auto; margin-right: auto; display: block; }
+ canvas.emscripten { border: 1px solid black; }
+ textarea.emscripten { font-family: monospace; width: 80%; }
+ div.emscripten { text-align: center; }
+ </style>
+ </head>
+ <body>
+ <hr/>
+ <div class="emscripten" id="status">Downloading...</div>
+ <div class="emscripten">
+ <progress value="0" max="100" id="progress" hidden=1></progress>
+ </div>
+ <canvas class="emscripten" id="canvas" oncontextmenu="event.preventDefault()"></canvas>
+ <hr/>
+ <div class="emscripten"><input type="button" value="fullscreen" onclick="Module.requestFullScreen()"></div>
+ <hr/>
+ <textarea class="emscripten" id="output" rows="8"></textarea>
+ <hr>
+ <script type='text/javascript'>
+ // connect to canvas
+ var Module = {
+ preRun: [],
+ postRun: [],
+ print: (function() {
+ var element = document.getElementById('output');
+ element.value = ''; // clear browser cache
+ return function(text) {
+ // These replacements are necessary if you render to raw HTML
+ //text = text.replace(/&/g, "&amp;");
+ //text = text.replace(/</g, "&lt;");
+ //text = text.replace(/>/g, "&gt;");
+ //text = text.replace('\\n', '<br>', 'g');
+ element.value += text + "\\n";
+ element.scrollTop = element.scrollHeight; // focus on bottom
+ };
+ })(),
+ printErr: function(text) {
+ if (0) { // XXX disabled for safety typeof dump == 'function') {
+ dump(text + '\\n'); // fast, straight to the real console
+ } else {
+ console.log(text);
+ }
+ },
+ canvas: document.getElementById('canvas'),
+ setStatus: function(text) {
+ if (Module.setStatus.interval) clearInterval(Module.setStatus.interval);
+ var m = text.match(/([^(]+)\((\d+(\.\d+)?)\/(\d+)\)/);
+ var statusElement = document.getElementById('status');
+ var progressElement = document.getElementById('progress');
+ if (m) {
+ text = m[1];
+ progressElement.value = parseInt(m[2])*100;
+ progressElement.max = parseInt(m[4])*100;
+ progressElement.hidden = false;
+ } else {
+ progressElement.value = null;
+ progressElement.max = null;
+ progressElement.hidden = true;
+ }
+ statusElement.innerHTML = text;
+ },
+ totalDependencies: 0,
+ monitorRunDependencies: function(left) {
+ this.totalDependencies = Math.max(this.totalDependencies, left);
+ Module.setStatus(left ? 'Preparing... (' + (this.totalDependencies-left) + '/' + this.totalDependencies + ')' : 'All downloads complete.');
}
- statusElement.innerHTML = text;
- },
- totalDependencies: 0,
- monitorRunDependencies: function(left) {
- this.totalDependencies = Math.max(this.totalDependencies, left);
- Module.setStatus(left ? 'Preparing... (' + (this.totalDependencies-left) + '/' + this.totalDependencies + ')' : 'All downloads complete.');
- }
- };
- Module.setStatus('Downloading...');
- </script>''' + open(os.path.join(self.get_dir(), 'something.include.html')).read() + '''
- </body>
- </html>
- ''')
+ };
+ Module.setStatus('Downloading...');
+ </script>''' + open(os.path.join(self.get_dir(), 'something.include.html')).read() + '''
+ </body>
+ </html>
+ ''')
- self.run_browser('something.html', 'You should see "hello, world!" and a colored cube.', '/report_result?0')
+ self.run_browser('something.html', 'You should see "hello, world!" and a colored cube.', '/report_result?0')
+
+ nonfastcomp(nfc)
def test_compression(self):
open(os.path.join(self.get_dir(), 'main.cpp'), 'w').write(self.with_report_result(r'''
@@ -732,9 +715,9 @@ If manually bisecting:
self.btest('sdl_canvas.c', expected='1', args=['-s', 'LEGACY_GL_EMULATION=1'])
# some extra coverage
self.clear()
- self.btest('sdl_canvas.c', expected='1', args=['-s', 'LEGACY_GL_EMULATION=1', '-s', '-O0', '-s', 'SAFE_HEAP=1'])
+ self.btest('sdl_canvas.c', expected='1', args=['-s', 'LEGACY_GL_EMULATION=1', '-O0', '-s', 'SAFE_HEAP=1'])
self.clear()
- self.btest('sdl_canvas.c', expected='1', args=['-s', 'LEGACY_GL_EMULATION=1', '-s', '-O2', '-s', 'SAFE_HEAP=1'])
+ self.btest('sdl_canvas.c', expected='1', args=['-s', 'LEGACY_GL_EMULATION=1', '-O2', '-s', 'SAFE_HEAP=1'])
def test_sdl_canvas_proxy(self):
def post():
@@ -1130,47 +1113,6 @@ keydown(100);keyup(100); // trigger the end
''')
self.btest('sdl_pumpevents.c', expected='7', args=['--pre-js', 'pre.js'])
- def test_sdl_audio(self):
- shutil.copyfile(path_from_root('tests', 'sounds', 'alarmvictory_1.ogg'), os.path.join(self.get_dir(), 'sound.ogg'))
- shutil.copyfile(path_from_root('tests', 'sounds', 'alarmcreatemiltaryfoot_1.wav'), os.path.join(self.get_dir(), 'sound2.wav'))
- shutil.copyfile(path_from_root('tests', 'sounds', 'noise.ogg'), os.path.join(self.get_dir(), 'noise.ogg'))
- shutil.copyfile(path_from_root('tests', 'sounds', 'the_entertainer.ogg'), os.path.join(self.get_dir(), 'the_entertainer.ogg'))
- open(os.path.join(self.get_dir(), 'bad.ogg'), 'w').write('I claim to be audio, but am lying')
- open(os.path.join(self.get_dir(), 'sdl_audio.c'), 'w').write(self.with_report_result(open(path_from_root('tests', 'sdl_audio.c')).read()))
-
- # use closure to check for a possible bug with closure minifying away newer Audio() attributes
- Popen([PYTHON, EMCC, '-O2', '--closure', '1', '--minify', '0', os.path.join(self.get_dir(), 'sdl_audio.c'), '--preload-file', 'sound.ogg', '--preload-file', 'sound2.wav', '--embed-file', 'the_entertainer.ogg', '--preload-file', 'noise.ogg', '--preload-file', 'bad.ogg', '-o', 'page.html', '-s', 'EXPORTED_FUNCTIONS=["_main", "_play", "_play2"]']).communicate()
- self.run_browser('page.html', '', '/report_result?1')
-
- def test_sdl_audio_mix_channels(self):
- shutil.copyfile(path_from_root('tests', 'sounds', 'noise.ogg'), os.path.join(self.get_dir(), 'sound.ogg'))
- open(os.path.join(self.get_dir(), 'sdl_audio_mix_channels.c'), 'w').write(self.with_report_result(open(path_from_root('tests', 'sdl_audio_mix_channels.c')).read()))
-
- Popen([PYTHON, EMCC, '-O2', '--minify', '0', os.path.join(self.get_dir(), 'sdl_audio_mix_channels.c'), '--preload-file', 'sound.ogg', '-o', 'page.html']).communicate()
- self.run_browser('page.html', '', '/report_result?1')
-
- def test_sdl_audio_mix(self):
- shutil.copyfile(path_from_root('tests', 'sounds', 'pluck.ogg'), os.path.join(self.get_dir(), 'sound.ogg'))
- shutil.copyfile(path_from_root('tests', 'sounds', 'the_entertainer.ogg'), os.path.join(self.get_dir(), 'music.ogg'))
- shutil.copyfile(path_from_root('tests', 'sounds', 'noise.ogg'), os.path.join(self.get_dir(), 'noise.ogg'))
- open(os.path.join(self.get_dir(), 'sdl_audio_mix.c'), 'w').write(self.with_report_result(open(path_from_root('tests', 'sdl_audio_mix.c')).read()))
-
- Popen([PYTHON, EMCC, '-O2', '--minify', '0', os.path.join(self.get_dir(), 'sdl_audio_mix.c'), '--preload-file', 'sound.ogg', '--preload-file', 'music.ogg', '--preload-file', 'noise.ogg', '-o', 'page.html']).communicate()
- self.run_browser('page.html', '', '/report_result?1')
-
- def test_sdl_audio_quickload(self):
- open(os.path.join(self.get_dir(), 'sdl_audio_quickload.c'), 'w').write(self.with_report_result(open(path_from_root('tests', 'sdl_audio_quickload.c')).read()))
-
- Popen([PYTHON, EMCC, '-O2', '--minify', '0', os.path.join(self.get_dir(), 'sdl_audio_quickload.c'), '-o', 'page.html', '-s', 'EXPORTED_FUNCTIONS=["_main", "_play"]']).communicate()
- self.run_browser('page.html', '', '/report_result?1')
-
- def test_sdl_audio_beeps(self):
- open(os.path.join(self.get_dir(), 'sdl_audio_beep.cpp'), 'w').write(self.with_report_result(open(path_from_root('tests', 'sdl_audio_beep.cpp')).read()))
-
- # use closure to check for a possible bug with closure minifying away newer Audio() attributes
- Popen([PYTHON, EMCC, '-O2', '--closure', '1', '--minify', '0', os.path.join(self.get_dir(), 'sdl_audio_beep.cpp'), '-s', 'DISABLE_EXCEPTION_CATCHING=0', '-o', 'page.html']).communicate()
- self.run_browser('page.html', '', '/report_result?1')
-
def test_sdl_canvas_size(self):
self.btest('sdl_canvas_size.c', reference='screenshot-gray-purple.png', reference_slack=1,
args=['-O2', '--minify', '0', '--shell-file', path_from_root('tests', 'sdl_canvas_size.html'), '--preload-file', path_from_root('tests', 'screenshot.png') + '@/', '-s', 'LEGACY_GL_EMULATION=1'],
@@ -1236,17 +1178,6 @@ keydown(100);keyup(100); // trigger the end
args=['--preload-file', 'screenshot.png', '-s', 'LEGACY_GL_EMULATION=1'],
message='You should see an image with fog.')
- def test_openal_playback(self):
- shutil.copyfile(path_from_root('tests', 'sounds', 'audio.wav'), os.path.join(self.get_dir(), 'audio.wav'))
- open(os.path.join(self.get_dir(), 'openal_playback.cpp'), 'w').write(self.with_report_result(open(path_from_root('tests', 'openal_playback.cpp')).read()))
-
- Popen([PYTHON, EMCC, '-O2', os.path.join(self.get_dir(), 'openal_playback.cpp'), '--preload-file', 'audio.wav', '-o', 'page.html']).communicate()
- self.run_browser('page.html', '', '/report_result?1')
-
- def test_openal_buffers(self):
- shutil.copyfile(path_from_root('tests', 'sounds', 'the_entertainer.wav'), os.path.join(self.get_dir(), 'the_entertainer.wav'))
- self.btest('openal_buffers.c', '0', args=['--preload-file', 'the_entertainer.wav'],)
-
def test_glfw(self):
self.btest('glfw.c', '1', args=['-s', 'LEGACY_GL_EMULATION=1'])
@@ -1262,19 +1193,6 @@ keydown(100);keyup(100); // trigger the end
Popen([PYTHON, EMCC, '-O2', os.path.join(self.get_dir(), 'test_egl_width_height.c'), '-o', 'page.html']).communicate()
self.run_browser('page.html', 'Should print "(300, 150)" -- the size of the canvas in pixels', '/report_result?1')
- def get_freealut_library(self):
- if WINDOWS and Building.which('cmake'):
- return self.get_library('freealut', os.path.join('hello_world.bc'), configure=['cmake', '.'], configure_args=['-DBUILD_TESTS=ON'])
- else:
- return self.get_library('freealut', os.path.join('examples', '.libs', 'hello_world.bc'), make_args=['EXEEXT=.bc'])
-
- def test_freealut(self):
- programs = self.get_freealut_library()
- for program in programs:
- assert os.path.exists(program)
- Popen([PYTHON, EMCC, '-O2', program, '-o', 'page.html']).communicate()
- self.run_browser('page.html', 'You should hear "Hello World!"')
-
def test_worker(self):
# Test running in a web worker
open('file.dat', 'w').write('data for worker')
@@ -1386,6 +1304,9 @@ keydown(100);keyup(100); // trigger the end
args=['-DHAVE_BUILTIN_SINCOS'], outfile='something.html',
message='You should see animating gears.')
+ def test_glgears_long(self):
+ self.btest('hello_world_gles.c', expected=map(str, range(30, 1000)), args=['-DHAVE_BUILTIN_SINCOS', '-DLONGTEST'])
+
def test_glgears_animation(self):
es2_suffix = ['', '_full', '_full_944']
for full_es2 in [0, 1, 2]:
@@ -1495,11 +1416,6 @@ keydown(100);keyup(100); // trigger the end
def test_sdl_resize(self):
self.btest('sdl_resize.c', '1')
- def test_gc(self):
- if os.environ.get('EMCC_FAST_COMPILER') == '1': return self.skip('flaky in fastcomp and also non-fastcomp -O1, timing issues')
-
- self.btest('browser_gc.cpp', '1')
-
def test_glshaderinfo(self):
self.btest('glshaderinfo.cpp', '1')
@@ -1671,6 +1587,9 @@ void *getBindBuffer() {
def test_sdl_surface_refcount(self):
self.btest('sdl_surface_refcount.c', expected='1')
+ def test_sdl_free_screen(self):
+ self.btest('sdl_free_screen.cpp', reference='htmltest.png')
+
def test_glbegin_points(self):
shutil.copyfile(path_from_root('tests', 'screenshot.png'), os.path.join(self.get_dir(), 'screenshot.png'))
self.btest('glbegin_points.c', reference='glbegin_points.png', args=['--preload-file', 'screenshot.png', '-s', 'LEGACY_GL_EMULATION=1'])
@@ -1706,7 +1625,7 @@ void *getBindBuffer() {
self.btest('s3tc_crunch.c', reference='s3tc_crunch.png', reference_slack=11, args=['--pre-js', 'asset_a.js', '--pre-js', 'asset_b.js', '-s', 'LEGACY_GL_EMULATION=1'])
def test_aniso(self):
- if SPIDERMONKEY_ENGINE in JS_ENGINES and os.environ.get('EMCC_FAST_COMPILER') != '1':
+ if SPIDERMONKEY_ENGINE in JS_ENGINES:
# asm.js-ification check
Popen([PYTHON, EMCC, path_from_root('tests', 'aniso.c'), '-O2', '-g2', '-s', 'LEGACY_GL_EMULATION=1']).communicate()
Settings.ASM_JS = 1
@@ -1754,6 +1673,23 @@ void *getBindBuffer() {
for mem in [0, 1]:
self.btest('pre_run_deps.cpp', expected='10', args=['--pre-js', 'pre.js', '--memory-init-file', str(mem)])
+ def test_mem_init(self):
+ open(os.path.join(self.get_dir(), 'pre.js'), 'w').write('''
+ function myJSCallback() { // called from main()
+ Module._note(1);
+ }
+ Module.preRun = function() {
+ addOnPreMain(function() {
+ Module._note(2);
+ });
+ };
+ ''')
+ open(os.path.join(self.get_dir(), 'post.js'), 'w').write('''
+ Module._note(4); // this happens too early! and is overwritten when the mem init arrives
+ ''')
+
+ self.btest('mem_init.cpp', expected='3', args=['--pre-js', 'pre.js', '--post-js', 'post.js', '--memory-init-file', '1'])
+
def test_worker_api(self):
Popen([PYTHON, EMCC, path_from_root('tests', 'worker_api_worker.cpp'), '-o', 'worker.js', '-s', 'BUILD_AS_WORKER=1', '-s', 'EXPORTED_FUNCTIONS=["_one"]']).communicate()
self.btest('worker_api_main.cpp', expected='566')
@@ -1762,14 +1698,18 @@ void *getBindBuffer() {
Popen([PYTHON, EMCC, path_from_root('tests', 'worker_api_2_worker.cpp'), '-o', 'worker.js', '-s', 'BUILD_AS_WORKER=1', '-O2', '--minify', '0', '-s', 'EXPORTED_FUNCTIONS=["_one", "_two", "_three", "_four"]']).communicate()
self.btest('worker_api_2_main.cpp', args=['-O2', '--minify', '0'], expected='11')
+ def test_worker_api_3(self):
+ Popen([PYTHON, EMCC, path_from_root('tests', 'worker_api_3_worker.cpp'), '-o', 'worker.js', '-s', 'BUILD_AS_WORKER=1', '-s', 'EXPORTED_FUNCTIONS=["_one"]']).communicate()
+ self.btest('worker_api_3_main.cpp', expected='5')
+
def test_emscripten_async_wget2(self):
self.btest('http.cpp', expected='0', args=['-I' + path_from_root('tests')])
def test_module(self):
- if os.environ.get('EMCC_FAST_COMPILER') == '1': return self.skip('todo in fastcomp')
-
- Popen([PYTHON, EMCC, path_from_root('tests', 'browser_module.cpp'), '-o', 'module.js', '-O2', '-s', 'SIDE_MODULE=1', '-s', 'DLOPEN_SUPPORT=1', '-s', 'EXPORTED_FUNCTIONS=["_one", "_two"]']).communicate()
- self.btest('browser_main.cpp', args=['-O2', '-s', 'MAIN_MODULE=1', '-s', 'DLOPEN_SUPPORT=1'], expected='8')
+ def nfc():
+ Popen([PYTHON, EMCC, path_from_root('tests', 'browser_module.cpp'), '-o', 'module.js', '-O2', '-s', 'SIDE_MODULE=1', '-s', 'DLOPEN_SUPPORT=1', '-s', 'EXPORTED_FUNCTIONS=["_one", "_two"]']).communicate()
+ self.btest('browser_main.cpp', args=['-O2', '-s', 'MAIN_MODULE=1', '-s', 'DLOPEN_SUPPORT=1'], expected='8')
+ nonfastcomp(nfc)
def test_mmap_file(self):
open(self.in_dir('data.dat'), 'w').write('data from the file ' + ('.' * 9000))
@@ -1849,7 +1789,19 @@ Module["preRun"].push(function () {
self.btest('doublestart.c', args=['--pre-js', 'pre.js', '-o', 'test.html'], expected='1')
def test_html5(self):
- self.btest(path_from_root('tests', 'test_html5.c'), expected='0')
+ for opts in [[], ['-O2', '-g1', '--closure', '1']]:
+ print opts
+ self.btest(path_from_root('tests', 'test_html5.c'), args=opts, expected='0')
+
+ def test_sdl_touch(self):
+ for opts in [[], ['-O2', '-g1', '--closure', '1']]:
+ print opts
+ self.btest(path_from_root('tests', 'sdl_touch.c'), args=opts + ['-DAUTOMATE_SUCCESS=1'], expected='0')
+
+ def test_html5_mouse(self):
+ for opts in [[], ['-O2', '-g1', '--closure', '1']]:
+ print opts
+ self.btest(path_from_root('tests', 'test_html5_mouse.c'), args=opts + ['-DAUTOMATE_SUCCESS=1'], expected='0')
def test_codemods(self):
for opt_level in [0, 2]:
diff --git a/tests/test_core.py b/tests/test_core.py
index c4bfcfa3..b5024309 100644
--- a/tests/test_core.py
+++ b/tests/test_core.py
@@ -6,7 +6,7 @@ from tools.shared import *
from runner import RunnerCore, path_from_root, checked_sanity, test_modes, get_bullet_library
class T(RunnerCore): # Short name, to make it more fun to use manually on the commandline
- def is_le32(self):
+ def is_emscripten_abi(self):
return not ('i386-pc-linux-gnu' in COMPILER_OPTS or self.env.get('EMCC_LLVM_TARGET') == 'i386-pc-linux-gnu')
def test_hello_world(self):
@@ -504,41 +504,62 @@ class T(RunnerCore): # Short name, to make it more fun to use manually on the co
self.do_run(open(path_from_root('tests', 'sha1.c')).read(), 'SHA1=15dd99a1991e0b3826fede3deffc1feba42278e6')
+ def test_asmjs_unknown_emscripten(self):
+ if self.emcc_args == None: return self.skip('needs emcc')
+ if not self.is_emscripten_abi(): return self.skip('asmjs-unknown-emscripten needed for asmjs-unknown-emscripten target test')
+ if os.environ.get('EMCC_FAST_COMPILER') == '0': return self.skip('fastcomp needed for asmjs-unknonw-emscripten target')
+ self.do_run(open(path_from_root('tests', 'asmjs-unknown-emscripten.c')).read(), '')
+
def test_cube2md5(self):
if self.emcc_args == None: return self.skip('needs emcc')
- if not self.is_le32(): return self.skip('le32 needed for accurate math')
+ if not self.is_emscripten_abi(): return self.skip('asmjs-unknown-emscripten needed for accurate math')
self.emcc_args += ['--embed-file', 'cube2md5.txt']
shutil.copyfile(path_from_root('tests', 'cube2md5.txt'), os.path.join(self.get_dir(), 'cube2md5.txt'))
self.do_run(open(path_from_root('tests', 'cube2md5.cpp')).read(), open(path_from_root('tests', 'cube2md5.ok')).read())
def test_cube2hash(self):
- try:
- old_chunk_size = os.environ.get('EMSCRIPT_MAX_CHUNK_SIZE') or ''
- os.environ['EMSCRIPT_MAX_CHUNK_SIZE'] = '1' # test splitting out each function to a chunk in emscripten.py (21 functions here)
-
- # A good test of i64 math
- if Settings.USE_TYPED_ARRAYS != 2: return self.skip('requires ta2 C-style memory aliasing')
- self.do_run('', 'Usage: hashstring <seed>',
- libraries=self.get_library('cube2hash', ['cube2hash.bc'], configure=None),
- includes=[path_from_root('tests', 'cube2hash')])
-
- for text, output in [('fleefl', '892BDB6FD3F62E863D63DA55851700FDE3ACF30204798CE9'),
- ('fleefl2', 'AA2CC5F96FC9D540CA24FDAF1F71E2942753DB83E8A81B61'),
- ('64bitisslow', '64D8470573635EC354FEE7B7F87C566FCAF1EFB491041670')]:
- self.do_run('', 'hash value: ' + output, [text], no_build=True)
- finally:
- os.environ['EMSCRIPT_MAX_CHUNK_SIZE'] = old_chunk_size
-
- assert 'asm1' in test_modes
- 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'):]
- main = main[:main.find('\n}')]
- num_vars = 0
- for v in re.findall('var [^;]+;', main):
- num_vars += v.count(',') + 1
- assert num_vars == 10, 'no variable elimination should have been run, but seeing %d' % num_vars
+ # extra testing for various codegen modes
+ for x86 in [0, 1] if self.run_name == 'asm2' else [0]:
+ print 'x86', x86
+ try:
+ old_x86 = os.environ.get('EMCC_LLVM_TARGET') or ''
+ if x86:
+ os.environ['EMCC_LLVM_TARGET'] = "i386-pc-linux-gnu"
+ try:
+ old_fastcomp = os.environ.get('EMCC_FAST_COMPILER') or ''
+ if x86:
+ os.environ['EMCC_FAST_COMPILER'] = "0"
+ try:
+ old_chunk_size = os.environ.get('EMSCRIPT_MAX_CHUNK_SIZE') or ''
+
+ for chunk_size in ['1', old_chunk_size]: # test splitting out each function to a chunk in emscripten.py (21 functions here)
+ print ' chunks', chunk_size
+ os.environ['EMSCRIPT_MAX_CHUNK_SIZE'] = chunk_size
+
+ # A good test of i64 math
+ if Settings.USE_TYPED_ARRAYS != 2: return self.skip('requires ta2 C-style memory aliasing')
+ self.do_run('', 'Usage: hashstring <seed>',
+ libraries=self.get_library('cube2hash', ['cube2hash.bc'], configure=None, cache_name_extra=str(x86)),
+ includes=[path_from_root('tests', 'cube2hash')])
+
+ for text, output in [('fleefl', '892BDB6FD3F62E863D63DA55851700FDE3ACF30204798CE9'),
+ ('fleefl2', 'AA2CC5F96FC9D540CA24FDAF1F71E2942753DB83E8A81B61'),
+ ('64bitisslow', '64D8470573635EC354FEE7B7F87C566FCAF1EFB491041670')]:
+ self.do_run('', 'hash value: ' + output, [text], no_build=True)
+ finally:
+ os.environ['EMSCRIPT_MAX_CHUNK_SIZE'] = old_chunk_size
+ finally:
+ if x86:
+ if old_fastcomp:
+ os.environ['EMCC_FAST_COMPILER'] = old_fastcomp
+ else:
+ del os.environ['EMCC_FAST_COMPILER']
+ finally:
+ if x86:
+ if old_x86:
+ os.environ['EMCC_LLVM_TARGET'] = old_x86
+ else:
+ del os.environ['EMCC_LLVM_TARGET']
def test_unaligned(self):
if Settings.QUANTUM_SIZE == 1: return self.skip('No meaning to unaligned addresses in q1')
@@ -574,7 +595,7 @@ class T(RunnerCore): # Short name, to make it more fun to use manually on the co
# TODO: A version of this with int64s as well
- if self.is_le32():
+ if self.is_emscripten_abi():
return self.skip('LLVM marks the reads of s as fully aligned, making this test invalid')
else:
self.do_run(src, '*12 : 1 : 12\n328157500735811.0,23,416012775903557.0,99\n')
@@ -654,7 +675,7 @@ class T(RunnerCore): # Short name, to make it more fun to use manually on the co
}
'''
- if self.is_le32():
+ if self.is_emscripten_abi():
self.do_run(src, '''16,32
0,8,8,8
16,24,24,24
@@ -836,7 +857,7 @@ class T(RunnerCore): # Short name, to make it more fun to use manually on the co
def test_math_lgamma(self):
if self.emcc_args is None: return self.skip('requires emcc')
- if not self.is_le32(): return self.skip('le32 needed for accurate math')
+ if not self.is_emscripten_abi(): return self.skip('asmjs-unknown-emscripten needed for accurate math')
test_path = path_from_root('tests', 'math', 'lgamma')
src, output = (test_path + s for s in ('.in', '.out'))
@@ -951,7 +972,7 @@ class T(RunnerCore): # Short name, to make it more fun to use manually on the co
for named in (0, 1):
print named
- if os.environ.get('EMCC_FAST_COMPILER') == '1' and named: continue # no named globals in fastcomp
+ if os.environ.get('EMCC_FAST_COMPILER') != '0' and named: continue # no named globals in fastcomp
Settings.NAMED_GLOBALS = named
self.do_run_from_file(src, output, ['wowie', 'too', '74'])
@@ -967,6 +988,7 @@ 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_strndup(self):
+ if self.run_name.startswith('s_'): return self.skip('musl libc strndup() assumes that C strings can be loaded via i16 and i32 loads.')
test_path = path_from_root('tests', 'core', 'test_strndup')
src, output = (test_path + s for s in ('.in', '.out'))
@@ -1138,7 +1160,7 @@ 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_longjmp_repeat(self):
- if os.environ.get('EMCC_FAST_COMPILER') != '1': Settings.MAX_SETJMPS = 1 # todo: do this more strict thing in fastcomp too
+ if os.environ.get('EMCC_FAST_COMPILER') == '0': Settings.MAX_SETJMPS = 1 # todo: do this more strict thing in fastcomp too
test_path = path_from_root('tests', 'core', 'test_longjmp_repeat')
src, output = (test_path + s for s in ('.in', '.out'))
self.do_run_from_file(src, output)
@@ -1162,7 +1184,7 @@ 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_setjmp_many(self):
- if os.environ.get('EMCC_FAST_COMPILER') == '1': return self.skip('todo in fastcomp: make MAX_SETJMPS take effect')
+ if os.environ.get('EMCC_FAST_COMPILER') != '0': return self.skip('todo in fastcomp: make MAX_SETJMPS take effect')
src = r'''
#include <stdio.h>
@@ -1860,7 +1882,7 @@ class T(RunnerCore): # Short name, to make it more fun to use manually on the co
# Compressed memory. Note that sizeof() does give the fat sizes, however!
self.do_run(src, '*0,0,0,1,2,3,4,5*\n*1,0,0*\n*0*\n0:1,1\n1:1,1\n2:1,1\n*12,20,5*')
else:
- if self.is_le32():
+ if self.is_emscripten_abi():
self.do_run(src, '*0,0,0,4,8,16,20,24*\n*1,0,0*\n*0*\n0:1,1\n1:1,1\n2:1,1\n*16,24,24*')
else:
self.do_run(src, '*0,0,0,4,8,12,16,20*\n*1,0,0*\n*0*\n0:1,1\n1:1,1\n2:1,1\n*12,20,20*')
@@ -1917,7 +1939,7 @@ def process(filename):
def test_emscripten_get_now(self):
if Settings.USE_TYPED_ARRAYS != 2: return self.skip('requires ta2')
- if self.run_name == 'o2':
+ if self.run_name == 'slow2asm':
self.emcc_args += ['--closure', '1'] # Use closure here for some additional coverage
self.do_run(open(path_from_root('tests', 'emscripten_get_now.cpp')).read(), 'Timer resolution is good.')
@@ -1929,8 +1951,8 @@ def process(filename):
self.do_run(open(src).read(), open(output).read().replace('waka', EMSCRIPTEN_VERSION))
def test_inlinejs(self):
- if not self.is_le32(): return self.skip('le32 needed for inline js')
- if os.environ.get('EMCC_FAST_COMPILER') == '1': return self.skip('fastcomp only supports EM_ASM')
+ if not self.is_emscripten_abi(): return self.skip('asmjs-unknown-emscripten needed for inline js')
+ if os.environ.get('EMCC_FAST_COMPILER') != '0': return self.skip('fastcomp only supports EM_ASM')
test_path = path_from_root('tests', 'core', 'test_inlinejs')
src, output = (test_path + s for s in ('.in', '.out'))
@@ -1942,8 +1964,8 @@ def process(filename):
for i in range(1, 5): assert ('comment%d' % i) in out
def test_inlinejs2(self):
- if not self.is_le32(): return self.skip('le32 needed for inline js')
- if os.environ.get('EMCC_FAST_COMPILER') == '1': return self.skip('fastcomp only supports EM_ASM')
+ if not self.is_emscripten_abi(): return self.skip('asmjs-unknown-emscripten needed for inline js')
+ if os.environ.get('EMCC_FAST_COMPILER') != '0': return self.skip('fastcomp only supports EM_ASM')
test_path = path_from_root('tests', 'core', 'test_inlinejs2')
src, output = (test_path + s for s in ('.in', '.out'))
@@ -2131,7 +2153,7 @@ def process(filename):
def test_varargs(self):
if Settings.QUANTUM_SIZE == 1: return self.skip('FIXME: Add support for this')
- if not self.is_le32(): return self.skip('we do not support all varargs stuff without le32')
+ if not self.is_emscripten_abi(): return self.skip('we do not support all varargs stuff without asmjs-unknown-emscripten')
test_path = path_from_root('tests', 'core', 'test_varargs')
src, output = (test_path + s for s in ('.in', '.out'))
@@ -2140,7 +2162,7 @@ def process(filename):
def test_varargs_byval(self):
if Settings.USE_TYPED_ARRAYS != 2: return self.skip('FIXME: Add support for this')
- if self.is_le32(): return self.skip('clang cannot compile this code with that target yet')
+ if self.is_emscripten_abi(): return self.skip('clang cannot compile this code with that target yet')
src = r'''
#include <stdio.h>
@@ -2749,7 +2771,7 @@ The current type of b is: 9
self.do_run(main, 'supp: 54,2\nmain: 56\nsupp see: 543\nmain see: 76\nok.')
def can_dlfcn(self):
- if os.environ.get('EMCC_FAST_COMPILER') == '1':
+ if os.environ.get('EMCC_FAST_COMPILER') != '0':
self.skip('todo in fastcomp')
return False
@@ -2764,8 +2786,8 @@ The current type of b is: 9
else:
Settings.NAMED_GLOBALS = 1
- if not self.is_le32():
- self.skip('need le32 for dlfcn support')
+ if not self.is_emscripten_abi():
+ self.skip('need asmjs-unknown-emscripten for dlfcn support')
return False
else:
return True
@@ -2961,7 +2983,7 @@ def process(filename):
output_nicerizer=lambda x, err: x.replace('\n', '*'),
post_build=self.dlfcn_post_build)
- if Settings.ASM_JS and os.path.exists(SPIDERMONKEY_ENGINE[0]):
+ if Settings.ASM_JS and SPIDERMONKEY_ENGINE and os.path.exists(SPIDERMONKEY_ENGINE[0]):
out = run_js('liblib.so', engine=SPIDERMONKEY_ENGINE, full_output=True, stderr=STDOUT)
if 'asm' in out:
self.validate_asmjs(out)
@@ -3171,7 +3193,7 @@ def process(filename):
def test_dlfcn_self(self):
if Settings.USE_TYPED_ARRAYS == 1: return self.skip('Does not work with USE_TYPED_ARRAYS=1')
- if os.environ.get('EMCC_FAST_COMPILER') == '1': return self.skip('todo in fastcomp')
+ if os.environ.get('EMCC_FAST_COMPILER') != '0': return self.skip('todo in fastcomp')
Settings.DLOPEN_SUPPORT = 1
def post(filename):
@@ -3602,7 +3624,7 @@ int main()
def test_strtod(self):
if self.emcc_args is None: return self.skip('needs emcc for libc')
- if not self.is_le32(): return self.skip('le32 needed for accurate math')
+ if not self.is_emscripten_abi(): return self.skip('asmjs-unknown-emscripten needed for accurate math')
src = r'''
#include <stdio.h>
@@ -3745,6 +3767,7 @@ int main()
self.do_run_from_file(src, output)
def test_strstr(self):
+ if self.run_name.startswith('s_'): return self.skip('musl libc strstr() assumes that C strings can be loaded via i16 and i32 loads.')
test_path = path_from_root('tests', 'core', 'test_strstr')
src, output = (test_path + s for s in ('.in', '.out'))
@@ -3758,7 +3781,7 @@ int main()
def test_sscanf(self):
if self.emcc_args is None: return self.skip('needs emcc for libc')
- if not self.is_le32(): return self.skip('le32 needed for accurate math')
+ if not self.is_emscripten_abi(): return self.skip('asmjs-unknown-emscripten needed for accurate math')
test_path = path_from_root('tests', 'core', 'test_sscanf')
src, output = (test_path + s for s in ('.in', '.out'))
@@ -3967,7 +3990,9 @@ def process(filename):
return 0;
}
'''
- self.do_run(src, ('got: 35\ngot: 45\ngot: 25\ngot: 15\nisatty? 0,0,1\n', 'isatty? 0,0,1\ngot: 35\ngot: 45\ngot: 25\ngot: 15\n'), post_build=post)
+ def clean(out, err):
+ return '\n'.join(filter(lambda line: 'warning' not in line, (out + err).split('\n')))
+ self.do_run(src, ('got: 35\ngot: 45\ngot: 25\ngot: 15\nisatty? 0,0,1\n', 'isatty? 0,0,1\ngot: 35\ngot: 45\ngot: 25\ngot: 15\n'), post_build=post, output_nicerizer=clean)
def test_mount(self):
src = open(path_from_root('tests', 'fs', 'test_mount.c'), 'r').read()
@@ -4046,10 +4071,36 @@ def process(filename):
self.emcc_args += ['--embed-file', 'three_numbers.txt']
self.do_run(src, 'match = 3\nx = -1.0, y = 0.1, z = -0.1\n')
+ def test_fileno(self):
+ if self.emcc_args is None: return self.skip('requires emcc')
+ open(os.path.join(self.get_dir(), 'empty.txt'), 'w').write('')
+ src = r'''
+ #include <stdio.h>
+ #include <unistd.h>
+ int main()
+ {
+ FILE* fp = fopen("empty.txt", "r");
+ if (fp) {
+ printf("%d\n", fp);
+ printf("%d\n", fileno(fp));
+ printf("%d\n", fileno((FILE*)42)); // nonexistent stream
+ } else {
+ printf("failed to open empty.txt\n");
+ }
+ return 0;
+ }
+ '''
+ self.emcc_args += ['--embed-file', 'empty.txt']
+ self.do_run(src, '4\n3\n-1\n')
+
def test_readdir(self):
src = open(path_from_root('tests', 'dirent', 'test_readdir.c'), 'r').read()
self.do_run(src, 'success', force_c=True)
+ def test_readdir_empty(self):
+ src = open(path_from_root('tests', 'dirent', 'test_readdir_empty.c'), 'r').read()
+ self.do_run(src, 'success', force_c=True)
+
def test_stat(self):
src = open(path_from_root('tests', 'stat', 'test_stat.c'), 'r').read()
self.do_run(src, 'success', force_c=True)
@@ -4140,7 +4191,7 @@ def process(filename):
def test_utf32(self):
if self.emcc_args is None: return self.skip('need libc for wcslen()')
- if not self.is_le32(): return self.skip('this test uses inline js, which requires le32')
+ if not self.is_emscripten_abi(): return self.skip('this test uses inline js, which requires asmjs-unknown-emscripten')
self.do_run(open(path_from_root('tests', 'utf32.cpp')).read(), 'OK.')
self.do_run(open(path_from_root('tests', 'utf32.cpp')).read(), 'OK.', args=['-fshort-wchar'])
@@ -4197,13 +4248,13 @@ def process(filename):
def test_fs_nodefs_rw(self):
if self.emcc_args is None: return self.skip('requires emcc')
- if not self.is_le32(): return self.skip('le32 needed for inline js')
+ if not self.is_emscripten_abi(): return self.skip('asmjs-unknown-emscripten needed for inline js')
src = open(path_from_root('tests', 'fs', 'test_nodefs_rw.c'), 'r').read()
self.do_run(src, 'success', force_c=True, js_engines=[NODE_JS])
def test_unistd_access(self):
self.clear()
- if not self.is_le32(): return self.skip('le32 needed for inline js')
+ if not self.is_emscripten_abi(): return self.skip('asmjs-unknown-emscripten needed for inline js')
for fs in ['MEMFS', 'NODEFS']:
src = open(path_from_root('tests', 'unistd', 'access.c'), 'r').read()
expected = open(path_from_root('tests', 'unistd', 'access.out'), 'r').read()
@@ -4211,7 +4262,7 @@ def process(filename):
self.do_run(src, expected, js_engines=[NODE_JS])
def test_unistd_curdir(self):
- if not self.is_le32(): return self.skip('le32 needed for inline js')
+ if not self.is_emscripten_abi(): return self.skip('asmjs-unknown-emscripten needed for inline js')
src = open(path_from_root('tests', 'unistd', 'curdir.c'), 'r').read()
expected = open(path_from_root('tests', 'unistd', 'curdir.out'), 'r').read()
self.do_run(src, expected)
@@ -4227,6 +4278,7 @@ def process(filename):
self.do_run(src, expected, extra_emscripten_args=['-H', 'libc/unistd.h'])
def test_unistd_ttyname(self):
+ if self.run_name.startswith('s_'): return self.skip('musl libc strstr() assumes that C strings can be loaded via i16 and i32 loads.')
src = open(path_from_root('tests', 'unistd', 'ttyname.c'), 'r').read()
self.do_run(src, 'success', force_c=True)
@@ -4242,7 +4294,7 @@ def process(filename):
def test_unistd_truncate(self):
self.clear()
- if not self.is_le32(): return self.skip('le32 needed for inline js')
+ if not self.is_emscripten_abi(): return self.skip('asmjs-unknown-emscripten needed for inline js')
for fs in ['MEMFS', 'NODEFS']:
src = open(path_from_root('tests', 'unistd', 'truncate.c'), 'r').read()
expected = open(path_from_root('tests', 'unistd', 'truncate.out'), 'r').read()
@@ -4271,7 +4323,7 @@ def process(filename):
def test_unistd_unlink(self):
self.clear()
if self.emcc_args is None: return self.skip('requires emcc')
- if not self.is_le32(): return self.skip('le32 needed for inline js')
+ if not self.is_emscripten_abi(): return self.skip('asmjs-unknown-emscripten needed for inline js')
for fs in ['MEMFS', 'NODEFS']:
src = open(path_from_root('tests', 'unistd', 'unlink.c'), 'r').read()
Building.COMPILER_TEST_OPTS += ['-D' + fs]
@@ -4279,7 +4331,7 @@ def process(filename):
def test_unistd_links(self):
self.clear()
- if not self.is_le32(): return self.skip('le32 needed for inline js')
+ if not self.is_emscripten_abi(): return self.skip('asmjs-unknown-emscripten needed for inline js')
for fs in ['MEMFS', 'NODEFS']:
if WINDOWS and fs == 'NODEFS':
print >> sys.stderr, 'Skipping NODEFS part of this test for test_unistd_links on Windows, since it would require administrative privileges.'
@@ -4299,7 +4351,7 @@ def process(filename):
def test_unistd_io(self):
self.clear()
- if not self.is_le32(): return self.skip('le32 needed for inline js')
+ if not self.is_emscripten_abi(): return self.skip('asmjs-unknown-emscripten needed for inline js')
if self.run_name == 'o2': return self.skip('non-asm optimized builds can fail with inline js')
if self.emcc_args is None: return self.skip('requires emcc')
for fs in ['MEMFS', 'NODEFS']:
@@ -4310,7 +4362,7 @@ def process(filename):
def test_unistd_misc(self):
if self.emcc_args is None: return self.skip('requires emcc')
- if not self.is_le32(): return self.skip('le32 needed for inline js')
+ if not self.is_emscripten_abi(): return self.skip('asmjs-unknown-emscripten needed for inline js')
for fs in ['MEMFS', 'NODEFS']:
src = open(path_from_root('tests', 'unistd', 'misc.c'), 'r').read()
expected = open(path_from_root('tests', 'unistd', 'misc.out'), 'r').read()
@@ -4368,7 +4420,14 @@ PORT: 3979
def test_atomic(self):
test_path = path_from_root('tests', 'core', 'test_atomic')
src, output = (test_path + s for s in ('.in', '.out'))
+ self.do_run_from_file(src, output)
+ def test_atomic_cxx(self):
+ if self.emcc_args is None: return self.skip('needs emcc')
+ if os.environ.get('EMCC_FAST_COMPILER') == '0': return self.skip('needs fastcomp')
+ test_path = path_from_root('tests', 'core', 'test_atomic_cxx')
+ src, output = (test_path + s for s in ('.cpp', '.txt'))
+ Building.COMPILER_TEST_OPTS += ['-std=c++11']
self.do_run_from_file(src, output)
def test_phiundef(self):
@@ -4497,13 +4556,58 @@ PORT: 3979
'''
self.do_run(src, 'value\narray_item1\narray_item2\narray_item3\n3\n3.00\n2.20\nJansson: Node with ID `0` not found. Context has `10` nodes.\n0\nJansson: No JSON context.\njansson!')
+ def test_constglobalunion(self):
+ if self.emcc_args is None: return self.skip('needs emcc')
+ self.emcc_args += ['-s', 'EXPORT_ALL=1']
+
+ self.do_run(r'''
+#include <stdio.h>
+
+struct one_const {
+ long a;
+};
+
+struct two_consts {
+ long a;
+ long b;
+};
+
+union some_consts {
+ struct one_const one;
+ struct two_consts two;
+};
+
+union some_consts my_consts = {{
+ 1
+}};
+
+struct one_const addr_of_my_consts = {
+ (long)(&my_consts)
+};
+
+int main(void) {
+ printf("%li\n", !!addr_of_my_consts.a);
+ return 0;
+}
+ ''', '1')
+
### 'Medium' tests
def test_fannkuch(self):
+ try:
+ if self.run_name == 'slow2' or self.run_name == 'slow2asm':
+ old_target = os.environ.get('EMCC_LLVM_TARGET') or ''
+ os.environ['EMCC_LLVM_TARGET'] = "asmjs-unknown-emscripten" # testing for asm-emscripten target on non-fastcomp
results = [ (1,0), (2,1), (3,2), (4,4), (5,7), (6,10), (7, 16), (8,22) ]
for i, j in results:
src = open(path_from_root('tests', 'fannkuch.cpp'), 'r').read()
self.do_run(src, 'Pfannkuchen(%d) = %d.' % (i,j), [str(i)], no_build=i>1)
+ finally:
+ if self.run_name == 'slow2' or self.run_name == 'slow2asm':
+ if old_target:
+ os.environ['EMCC_LLVM_TARGET'] = old_target
+ else:
+ del os.environ['EMCC_LLVM_TARGET']
def test_raytrace(self):
if self.emcc_args is None: return self.skip('requires emcc')
@@ -4673,25 +4777,6 @@ return malloc(size);
main = main[:main.find('\n}')]
assert main.count('\n') <= 7, ('must not emit too many postSets: %d' % main.count('\n')) + ' : ' + main
- if os.environ.get('EMCC_FAST_COMPILER') == '1': return self.skip('fastcomp always aliases pointers')
-
- assert 'asm2g' in test_modes
- if self.run_name == 'asm2g':
- results = {}
- original = open('src.cpp.o.js').read()
- results[Settings.ALIASING_FUNCTION_POINTERS] = len(original)
- Settings.ALIASING_FUNCTION_POINTERS = 1 - Settings.ALIASING_FUNCTION_POINTERS
- self.do_run(path_from_root('tests', 'cubescript'), '*\nTemp is 33\n9\n5\nhello, everyone\n*', main_file='command.cpp')
- final = open('src.cpp.o.js').read()
- results[Settings.ALIASING_FUNCTION_POINTERS] = len(final)
- open('original.js', 'w').write(original)
- print results
- assert results[1] < 0.99*results[0]
- assert ' & 3]()' in original, 'small function table exists'
- assert ' & 3]()' not in final, 'small function table does not exist'
- assert ' & 255]()' not in original, 'big function table does not exist'
- assert ' & 255]()' in final, 'big function table exists'
-
def test_simd(self):
if Settings.USE_TYPED_ARRAYS != 2: return self.skip('needs ta2')
if Settings.ASM_JS: Settings.ASM_JS = 2 # does not validate
@@ -4721,7 +4806,7 @@ return malloc(size);
self.do_run_from_file(src, output)
def test_gcc_unmangler(self):
- if os.environ.get('EMCC_FAST_COMPILER') != '1': Settings.NAMED_GLOBALS = 1 # test coverage for this; fastcomp never names globals
+ if os.environ.get('EMCC_FAST_COMPILER') == '0': Settings.NAMED_GLOBALS = 1 # test coverage for this; fastcomp never names globals
Building.COMPILER_TEST_OPTS += ['-I' + path_from_root('third_party'), '-Wno-warn-absolute-paths']
@@ -4820,7 +4905,7 @@ def process(filename):
def test_sqlite(self):
# gcc -O3 -I/home/alon/Dev/emscripten/tests/sqlite -ldl src.c
if self.emcc_args is None: return self.skip('Very slow without ta2, and we would also need to include dlmalloc manually without emcc')
- if not self.is_le32(): return self.skip('fails on x86 due to a legalization issue on llvm 3.3')
+ if not self.is_emscripten_abi(): return self.skip('fails on x86 due to a legalization issue on llvm 3.3')
if Settings.QUANTUM_SIZE == 1: return self.skip('TODO FIXME')
self.banned_js_engines = [NODE_JS] # OOM in older node
@@ -4876,12 +4961,16 @@ def process(filename):
Settings.SAFE_HEAP_LINES = ['btVoronoiSimplexSolver.h:40', 'btVoronoiSimplexSolver.h:41',
'btVoronoiSimplexSolver.h:42', 'btVoronoiSimplexSolver.h:43']
+ asserts = Settings.ASSERTIONS
+
for use_cmake in [False, True]: # If false, use a configure script to configure Bullet build.
print 'cmake', use_cmake
# Windows cannot run configure sh scripts.
if WINDOWS and not use_cmake:
continue
+ Settings.ASSERTIONS = 2 if use_cmake else asserts # extra testing for ASSERTIONS == 2
+
def test():
self.do_run(open(path_from_root('tests', 'bullet', 'Demos', 'HelloWorld', 'HelloWorld.cpp'), 'r').read(),
[open(path_from_root('tests', 'bullet', 'output.txt'), 'r').read(), # different roundings
@@ -4892,7 +4981,7 @@ def process(filename):
test()
assert 'asm2g' in test_modes
- if self.run_name == 'asm2g' and not use_cmake and os.environ.get('EMCC_FAST_COMPILER') != '1':
+ if self.run_name == 'asm2g' and not use_cmake and os.environ.get('EMCC_FAST_COMPILER') == '0':
# Test forced alignment
print >> sys.stderr, 'testing FORCE_ALIGNED_MEMORY'
old = open('src.cpp.o.js').read()
@@ -5087,12 +5176,12 @@ def process(filename):
def test_python(self):
if self.emcc_args is None: return self.skip('requires emcc')
if Settings.QUANTUM_SIZE == 1: return self.skip('TODO: make this work')
- if not self.is_le32(): return self.skip('fails on non-le32') # FIXME
+ if not self.is_emscripten_abi(): return self.skip('fails on not asmjs-unknown-emscripten') # FIXME
#Settings.EXPORTED_FUNCTIONS += ['_PyRun_SimpleStringFlags'] # for the demo
- if self.is_le32():
- bitcode = path_from_root('tests', 'python', 'python.le32.bc')
+ if self.is_emscripten_abi():
+ bitcode = path_from_root('tests', 'python', 'python.asmjs-unknown-emscripten.bc')
else:
bitcode = path_from_root('tests', 'python', 'python.small.bc')
@@ -5125,12 +5214,13 @@ def process(filename):
for name in glob.glob(path_from_root('tests', 'cases', '*.ll')):
shortname = name.replace('.ll', '')
if '' not in shortname: continue
- if os.environ.get('EMCC_FAST_COMPILER') == '1' and os.path.basename(shortname) in [
- 'structparam', 'extendedprecision', 'issue_39', 'emptystruct', 'phinonexist', 'quotedlabel', 'oob_ta2', 'phientryimplicit', 'phiself', 'invokebitcast', 'funcptr', # invalid ir
+ if os.environ.get('EMCC_FAST_COMPILER') != '0' and os.path.basename(shortname) in [
+ 'aliasbitcast', 'structparam', 'extendedprecision', 'issue_39', 'phinonexist', 'oob_ta2', 'phiself', 'invokebitcast', # invalid ir
'structphiparam', 'callwithstructural_ta2', 'callwithstructural64_ta2', 'structinparam', # pnacl limitations in ExpandStructRegs
'2xi40', # pnacl limitations in ExpandGetElementPtr
'quoted', # current fastcomp limitations FIXME
- 'sillyfuncast2', 'sillybitcast', 'atomicrmw_unaligned' # TODO XXX
+ 'atomicrmw_unaligned', # TODO XXX
+ 'emptyasm_aue' # we don't support inline asm
]: continue
if '_ta2' in shortname and not Settings.USE_TYPED_ARRAYS == 2:
print self.skip('case "%s" only relevant for ta2' % shortname)
@@ -5138,10 +5228,10 @@ def process(filename):
if '_noasm' in shortname and Settings.ASM_JS:
print self.skip('case "%s" not relevant for asm.js' % shortname)
continue
- if '_le32' in shortname and not self.is_le32():
- print self.skip('case "%s" not relevant for non-le32 target' % shortname)
+ if '_eua' in shortname and not self.is_emscripten_abi():
+ print self.skip('case "%s" not relevant for not asmjs-unknown-emscripten target' % shortname)
continue
- if '_fastcomp' in shortname and not os.environ.get('EMCC_FAST_COMPILER') == '1':
+ if '_fastcomp' in shortname and not os.environ.get('EMCC_FAST_COMPILER') != '0':
print self.skip('case "%s" not relevant for non-fastcomp' % shortname)
continue
self.emcc_args = emcc_args
@@ -5180,7 +5270,12 @@ def process(filename):
for name in glob.glob(path_from_root('tests', 'fuzz', '*.c')) + glob.glob(path_from_root('tests', 'fuzz', '*.cpp')):
#if os.path.basename(name) != '4.c': continue
if 'newfail' in name: continue
- if os.path.basename(name) == '18.cpp' and not os.environ.get('EMCC_FAST_COMPILER') == '1': continue # works only in fastcomp
+ if os.environ.get('EMCC_FAST_COMPILER') == '0' and os.path.basename(name) in [
+ '18.cpp', '15.c'
+ ]: continue # works only in fastcomp
+ if x == 'lto' and self.run_name == 'default' and os.path.basename(name) in [
+ '19.c'
+ ]: continue # LLVM LTO bug
print name
self.do_run(open(path_from_root('tests', 'fuzz', name)).read(),
@@ -5420,7 +5515,7 @@ def process(filename):
def test_asm_pgo(self):
if not Settings.ASM_JS: return self.skip('this is a test for PGO for asm (NB: not *in* asm)')
- if os.environ.get('EMCC_FAST_COMPILER') == '1': return self.skip('todo in fastcomp')
+ if os.environ.get('EMCC_FAST_COMPILER') != '0': return self.skip('todo in fastcomp')
src = open(path_from_root('tests', 'hello_libcxx.cpp')).read()
output = 'hello, world!'
@@ -5540,7 +5635,7 @@ def process(filename):
def test_embind(self):
if self.emcc_args is None: return self.skip('requires emcc')
- if os.environ.get('EMCC_FAST_COMPILER') == '1': return self.skip('todo in fastcomp')
+ if os.environ.get('EMCC_FAST_COMPILER') != '0': return self.skip('todo in fastcomp')
Building.COMPILER_TEST_OPTS += ['--bind']
src = r'''
@@ -5563,7 +5658,7 @@ def process(filename):
def test_embind_2(self):
if self.emcc_args is None: return self.skip('requires emcc')
- if os.environ.get('EMCC_FAST_COMPILER') == '1': return self.skip('todo in fastcomp')
+ if os.environ.get('EMCC_FAST_COMPILER') != '0': return self.skip('todo in fastcomp')
Building.COMPILER_TEST_OPTS += ['--bind', '--post-js', 'post.js']
open('post.js', 'w').write('''
Module.print('lerp ' + Module.lerp(1, 2, 0.66) + '.');
@@ -5637,8 +5732,6 @@ def process(filename):
# Way 2: use CppHeaderParser
- Settings.RUNTIME_TYPE_INFO = 1
-
header = '''
#include <stdio.h>
@@ -5878,7 +5971,25 @@ def process(filename):
'''
self.do_run(src, '|hello|43|world|41|', post_build=post)
+ def test_webidl(self):
+ if self.emcc_args is None: return self.skip('requires emcc')
+
+ output = Popen([PYTHON, path_from_root('tools', 'webidl_binder.py'),
+ path_from_root('tests', 'webidl', 'test.idl'),
+ 'glue']).communicate()[0]
+ assert os.path.exists('glue.cpp')
+ assert os.path.exists('glue.js')
+
+ self.emcc_args += ['--post-js', 'glue.js',
+ '--post-js', path_from_root('tests', 'webidl', 'post.js')]
+ shutil.copyfile(path_from_root('tests', 'webidl', 'test.h'), self.in_dir('test.h'))
+ shutil.copyfile(path_from_root('tests', 'webidl', 'test.cpp'), self.in_dir('test.cpp'))
+ src = open('test.cpp').read()
+ self.do_run(src, open(path_from_root('tests', 'webidl', 'output.txt')).read())
+
def test_typeinfo(self):
+ if os.environ.get('EMCC_FAST_COMPILER') != '0': return self.skip('fastcomp does not support RUNTIME_TYPE_INFO')
+
if self.emcc_args is not None and self.emcc_args != []: return self.skip('full LLVM opts optimize out all the code that uses the type')
Settings.RUNTIME_TYPE_INFO = 1
@@ -6104,7 +6215,7 @@ def process(filename):
# can do an apples-to-apples comparison by compiling with the same file name
shutil.move(out_filename, no_maps_filename)
with open(no_maps_filename) as f: no_maps_file = f.read()
- no_maps_file = re.sub(' *//@.*$', '', no_maps_file, flags=re.MULTILINE)
+ no_maps_file = re.sub(' *//[@#].*$', '', no_maps_file, flags=re.MULTILINE)
Building.COMPILER_TEST_OPTS.append('-g4')
def build_and_check():
@@ -6117,7 +6228,7 @@ def process(filename):
# this is worth checking because the parser AST swaps strings for token
# objects when generating source maps, so we want to make sure the
# optimizer can deal with both types.
- out_file = re.sub(' *//@.*$', '', out_file, flags=re.MULTILINE)
+ out_file = re.sub(' *//[@#].*$', '', out_file, flags=re.MULTILINE)
def clean(code):
code = re.sub(r'\n+[ \n]*\n+', '\n', code)
code = code.replace('{\n}', '{}')
@@ -6397,7 +6508,7 @@ def process(filename):
def test_minmax(self):
if self.emcc_args == None: return self.skip('needs emcc')
- if os.environ.get('EMCC_FAST_COMPILER') != '1': return self.skip('this test will not pass in the old compiler')
+ if os.environ.get('EMCC_FAST_COMPILER') == '0': return self.skip('this test will not pass in the old compiler')
self.do_run(open(path_from_root('tests', 'test_minmax.c')).read(), 'NAN != NAN\nSuccess!')
def test_locale(self):
@@ -6460,6 +6571,7 @@ def make_run(fullname, name=-1, compiler=-1, embetter=0, quantum_size=0,
return
# TODO: Move much of these to a init() function in shared.py, and reuse that
+ Settings.ASM_JS = 0
Settings.USE_TYPED_ARRAYS = typed_arrays
Settings.INVOKE_RUN = 1
Settings.RELOOP = 0 # we only do them in the "o2" pass
@@ -6487,27 +6599,19 @@ 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=[] 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"])
-
-# Make one run with -O2, but without closure (we enable closure in specific tests, otherwise on everything it is too slow)
-o2 = make_run("o2", compiler=CLANG, emcc_args=["-O2", "-s", "ASM_JS=0", "-s", "JS_CHUNK_SIZE=1024"])
-
-# asm.js
+# Main test modes
+default = make_run("default", compiler=CLANG, emcc_args=[])
asm1 = make_run("asm1", compiler=CLANG, emcc_args=["-O1"])
asm2 = make_run("asm2", compiler=CLANG, emcc_args=["-O2"])
asm3 = make_run("asm3", compiler=CLANG, emcc_args=["-O3"])
asm2f = make_run("asm2f", compiler=CLANG, emcc_args=["-O2", "-s", "PRECISE_F32=1"])
-if os.environ.get('EMCC_FAST_COMPILER') == '1':
- asm2g = make_run("asm2g", compiler=CLANG, emcc_args=["-O2", "-g", "-s", "ASSERTIONS=1", "--memory-init-file", "1", "-s", "SAFE_HEAP=1"])
-else:
- asm2g = make_run("asm2g", compiler=CLANG, emcc_args=["-O2", "-g", "-s", "ASSERTIONS=1", "--memory-init-file", "1", "-s", "CHECK_HEAP_ALIGN=1"])
-asm2x86 = make_run("asm2x86", compiler=CLANG, emcc_args=["-O2", "-g", "-s", "CHECK_HEAP_ALIGN=1"], env={"EMCC_LLVM_TARGET": "i386-pc-linux-gnu"})
+asm2g = make_run("asm2g", compiler=CLANG, emcc_args=["-O2", "-g", "-s", "ASSERTIONS=1", "--memory-init-file", "1", "-s", "SAFE_HEAP=1"])
+
+# Legacy test modes -
+slow2 = make_run("slow2", compiler=CLANG, emcc_args=["-O2", "-s", "ASM_JS=0"], env={"EMCC_FAST_COMPILER": "0"})
+slow2asm = make_run("slow2asm", compiler=CLANG, emcc_args=["-O2"], env={"EMCC_FAST_COMPILER": "0"})
-# Make custom runs with various options
+# Legacy test modes - very old
for compiler, quantum, embetter, typed_arrays in [
(CLANG, 4, 0, 0),
(CLANG, 4, 1, 1),
@@ -6515,6 +6619,6 @@ for compiler, quantum, embetter, typed_arrays in [
fullname = 's_0_%d%s%s' % (
embetter, '' if quantum == 4 else '_q' + str(quantum), '' if typed_arrays in [0, 1] else '_t' + str(typed_arrays)
)
- locals()[fullname] = make_run(fullname, fullname, compiler, embetter, quantum, typed_arrays)
+ locals()[fullname] = make_run(fullname, fullname, compiler, embetter, quantum, typed_arrays, env={"EMCC_FAST_COMPILER": "0"})
del T # T is just a shape for the specific subclasses, we don't test it itself
diff --git a/tests/test_float_literals.cpp b/tests/test_float_literals.cpp
index fdae2764..2920fbd1 100644
--- a/tests/test_float_literals.cpp
+++ b/tests/test_float_literals.cpp
@@ -4,7 +4,7 @@
#include <stdio.h>
#include <stdlib.h>
-#if defined(_MSC_VER) || defined(EMSCRIPTEN)
+#if defined(_MSC_VER) || defined(__EMSCRIPTEN__)
#define FLOAT_NAN ((float)std::numeric_limits<float>::quiet_NaN())
#define FLOAT_INF ((float)std::numeric_limits<float>::infinity())
#else
@@ -12,7 +12,7 @@
#define FLOAT_INF ((float)INFINITY)
#endif
-#if defined(_MSC_VER) || defined(EMSCRIPTEN)
+#if defined(_MSC_VER) || defined(__EMSCRIPTEN__)
#define DOUBLE_NAN ((double)std::numeric_limits<double>::quiet_NaN())
#define DOUBLE_INF ((double)std::numeric_limits<double>::infinity())
#else
diff --git a/tests/test_html5.c b/tests/test_html5.c
index 77ddea98..fec46035 100644
--- a/tests/test_html5.c
+++ b/tests/test_html5.c
@@ -145,8 +145,8 @@ EM_BOOL orientationchange_callback(int eventType, const EmscriptenOrientationCha
EM_BOOL fullscreenchange_callback(int eventType, const EmscriptenFullscreenChangeEvent *e, void *userData)
{
- printf("%s, isFullscreen: %d, fullscreenEnabled: %d, fs element nodeName: \"%s\", fs element id: \"%s\"\n",
- emscripten_event_type_to_string(eventType), e->isFullscreen, e->fullscreenEnabled, e->nodeName, e->id);
+ printf("%s, isFullscreen: %d, fullscreenEnabled: %d, fs element nodeName: \"%s\", fs element id: \"%s\". New size: %dx%d pixels. Screen size: %dx%d pixels.\n",
+ emscripten_event_type_to_string(eventType), e->isFullscreen, e->fullscreenEnabled, e->nodeName, e->id, e->elementWidth, e->elementHeight, e->screenWidth, e->screenHeight);
return 0;
}
diff --git a/tests/test_html5_fullscreen.c b/tests/test_html5_fullscreen.c
new file mode 100644
index 00000000..54b834bd
--- /dev/null
+++ b/tests/test_html5_fullscreen.c
@@ -0,0 +1,126 @@
+#include <stdio.h>
+#include <emscripten.h>
+#include <string.h>
+#include <emscripten/html5.h>
+
+void report_result(int result)
+{
+ if (result == 0) {
+ printf("Test successful!\n");
+ } else {
+ printf("Test failed!\n");
+ }
+#ifdef REPORT_RESULT
+ REPORT_RESULT();
+#endif
+}
+
+static inline const char *emscripten_event_type_to_string(int eventType) {
+ const char *events[] = { "(invalid)", "(none)", "keypress", "keydown", "keyup", "click", "mousedown", "mouseup", "dblclick", "mousemove", "wheel", "resize",
+ "scroll", "blur", "focus", "focusin", "focusout", "deviceorientation", "devicemotion", "orientationchange", "fullscreenchange", "pointerlockchange",
+ "visibilitychange", "touchstart", "touchend", "touchmove", "touchcancel", "gamepadconnected", "gamepaddisconnected", "beforeunload",
+ "batterychargingchange", "batterylevelchange", "webglcontextlost", "webglcontextrestored", "(invalid)" };
+ ++eventType;
+ if (eventType < 0) eventType = 0;
+ if (eventType >= sizeof(events)/sizeof(events[0])) eventType = sizeof(events)/sizeof(events[0])-1;
+ return events[eventType];
+}
+
+const char *emscripten_result_to_string(EMSCRIPTEN_RESULT result) {
+ if (result == EMSCRIPTEN_RESULT_SUCCESS) return "EMSCRIPTEN_RESULT_SUCCESS";
+ if (result == EMSCRIPTEN_RESULT_DEFERRED) return "EMSCRIPTEN_RESULT_DEFERRED";
+ if (result == EMSCRIPTEN_RESULT_NOT_SUPPORTED) return "EMSCRIPTEN_RESULT_NOT_SUPPORTED";
+ if (result == EMSCRIPTEN_RESULT_FAILED_NOT_DEFERRED) return "EMSCRIPTEN_RESULT_FAILED_NOT_DEFERRED";
+ if (result == EMSCRIPTEN_RESULT_INVALID_TARGET) return "EMSCRIPTEN_RESULT_INVALID_TARGET";
+ if (result == EMSCRIPTEN_RESULT_UNKNOWN_TARGET) return "EMSCRIPTEN_RESULT_UNKNOWN_TARGET";
+ if (result == EMSCRIPTEN_RESULT_INVALID_PARAM) return "EMSCRIPTEN_RESULT_INVALID_PARAM";
+ if (result == EMSCRIPTEN_RESULT_FAILED) return "EMSCRIPTEN_RESULT_FAILED";
+ if (result == EMSCRIPTEN_RESULT_NO_DATA) return "EMSCRIPTEN_RESULT_NO_DATA";
+ return "Unknown EMSCRIPTEN_RESULT!";
+}
+
+#define TEST_RESULT(x) if (ret != EMSCRIPTEN_RESULT_SUCCESS) printf("%s returned %s.\n", #x, emscripten_result_to_string(ret));
+
+// The event handler functions can return 1 to suppress the event and disable the default action. That calls event.preventDefault();
+// Returning 0 signals that the event was not consumed by the code, and will allow the event to pass on and bubble up normally.
+EM_BOOL key_callback(int eventType, const EmscriptenKeyboardEvent *e, void *userData)
+{
+ if (eventType == EMSCRIPTEN_EVENT_KEYPRESS && (!strcmp(e->key, "f") || e->which == 102)) {
+ EmscriptenFullscreenChangeEvent fsce;
+ EMSCRIPTEN_RESULT ret = emscripten_get_fullscreen_status(&fsce);
+ TEST_RESULT(emscripten_get_fullscreen_status);
+ if (!fsce.isFullscreen) {
+ printf("Requesting fullscreen..\n");
+ ret = emscripten_request_fullscreen(0, 1);
+ TEST_RESULT(emscripten_request_fullscreen);
+ } else {
+ printf("Exiting fullscreen..\n");
+ ret = emscripten_exit_fullscreen();
+ TEST_RESULT(emscripten_exit_fullscreen);
+ ret = emscripten_get_fullscreen_status(&fsce);
+ TEST_RESULT(emscripten_get_fullscreen_status);
+ if (fsce.isFullscreen) {
+ fprintf(stderr, "Fullscreen exit did not work!\n");
+ }
+ }
+ }
+
+ return 0;
+}
+
+int callCount = 0;
+
+EM_BOOL fullscreenchange_callback(int eventType, const EmscriptenFullscreenChangeEvent *e, void *userData)
+{
+ printf("%s, isFullscreen: %d, fullscreenEnabled: %d, fs element nodeName: \"%s\", fs element id: \"%s\". New size: %dx%d pixels. Screen size: %dx%d pixels.\n",
+ emscripten_event_type_to_string(eventType), e->isFullscreen, e->fullscreenEnabled, e->nodeName, e->id, e->elementWidth, e->elementHeight, e->screenWidth, e->screenHeight);
+
+ ++callCount;
+ if (callCount == 1) { // Transitioned to fullscreen.
+ if (!e->isFullscreen) {
+ report_result(1);
+ }
+ } else if (callCount == 2) { // Transitioned to windowed, we must be back to the default pixel size 300x150.
+ if (e->isFullscreen || e->elementWidth != 300 || e->elementHeight != 150) {
+ report_result(1);
+ } else {
+ report_result(0);
+ }
+ }
+ return 0;
+}
+
+EM_BOOL mouse_callback(int eventType, const EmscriptenMouseEvent *e, void *userData)
+{
+ return 0;
+}
+
+int main()
+{
+ EMSCRIPTEN_RESULT ret = emscripten_set_keypress_callback(0, 0, 1, key_callback);
+ TEST_RESULT(emscripten_set_keypress_callback);
+
+ ret = emscripten_set_fullscreenchange_callback(0, 0, 1, fullscreenchange_callback);
+ TEST_RESULT(emscripten_set_fullscreenchange_callback);
+
+ // For Internet Explorer, fullscreen and pointer lock requests cannot be run
+ // from inside keyboard event handlers. Therefore we must register a callback to
+ // mouse events (any other than mousedown) to activate deferred fullscreen/pointerlock
+ // requests to occur for IE. The callback itself can be a no-op.
+ ret = emscripten_set_click_callback(0, 0, 1, mouse_callback);
+ TEST_RESULT(emscripten_set_click_callback);
+ ret = emscripten_set_mousedown_callback(0, 0, 1, mouse_callback);
+ TEST_RESULT(emscripten_set_mousedown_callback);
+ ret = emscripten_set_mouseup_callback(0, 0, 1, mouse_callback);
+ TEST_RESULT(emscripten_set_mouseup_callback);
+ ret = emscripten_set_dblclick_callback(0, 0, 1, mouse_callback);
+ TEST_RESULT(emscripten_set_dblclick_callback);
+
+ printf("To finish this test, press f to enter fullscreen mode, and then exit it.\n");
+ printf("On IE, press a mouse key over the canvas after pressing f to activate the fullscreen request event.\n");
+
+ /* For the events to function, one must either call emscripten_set_main_loop or enable Module.noExitRuntime by some other means.
+ Otherwise the application will exit after leaving main(), and the atexit handlers will clean up all event hooks (by design). */
+ EM_ASM(Module['noExitRuntime'] = true);
+ return 0;
+}
diff --git a/tests/test_html5_mouse.c b/tests/test_html5_mouse.c
new file mode 100644
index 00000000..f087a62b
--- /dev/null
+++ b/tests/test_html5_mouse.c
@@ -0,0 +1,159 @@
+#include <stdio.h>
+#include <emscripten.h>
+#include <string.h>
+#include <emscripten/html5.h>
+
+void report_result(int result)
+{
+ if (result == 0) {
+ printf("Test successful!\n");
+ } else {
+ printf("Test failed!\n");
+ }
+#ifdef REPORT_RESULT
+ REPORT_RESULT();
+#endif
+}
+
+static inline const char *emscripten_event_type_to_string(int eventType) {
+ const char *events[] = { "(invalid)", "(none)", "keypress", "keydown", "keyup", "click", "mousedown", "mouseup", "dblclick", "mousemove", "wheel", "resize",
+ "scroll", "blur", "focus", "focusin", "focusout", "deviceorientation", "devicemotion", "orientationchange", "fullscreenchange", "pointerlockchange",
+ "visibilitychange", "touchstart", "touchend", "touchmove", "touchcancel", "gamepadconnected", "gamepaddisconnected", "beforeunload",
+ "batterychargingchange", "batterylevelchange", "webglcontextlost", "webglcontextrestored", "(invalid)" };
+ ++eventType;
+ if (eventType < 0) eventType = 0;
+ if (eventType >= sizeof(events)/sizeof(events[0])) eventType = sizeof(events)/sizeof(events[0])-1;
+ return events[eventType];
+}
+
+const char *emscripten_result_to_string(EMSCRIPTEN_RESULT result) {
+ if (result == EMSCRIPTEN_RESULT_SUCCESS) return "EMSCRIPTEN_RESULT_SUCCESS";
+ if (result == EMSCRIPTEN_RESULT_DEFERRED) return "EMSCRIPTEN_RESULT_DEFERRED";
+ if (result == EMSCRIPTEN_RESULT_NOT_SUPPORTED) return "EMSCRIPTEN_RESULT_NOT_SUPPORTED";
+ if (result == EMSCRIPTEN_RESULT_FAILED_NOT_DEFERRED) return "EMSCRIPTEN_RESULT_FAILED_NOT_DEFERRED";
+ if (result == EMSCRIPTEN_RESULT_INVALID_TARGET) return "EMSCRIPTEN_RESULT_INVALID_TARGET";
+ if (result == EMSCRIPTEN_RESULT_UNKNOWN_TARGET) return "EMSCRIPTEN_RESULT_UNKNOWN_TARGET";
+ if (result == EMSCRIPTEN_RESULT_INVALID_PARAM) return "EMSCRIPTEN_RESULT_INVALID_PARAM";
+ if (result == EMSCRIPTEN_RESULT_FAILED) return "EMSCRIPTEN_RESULT_FAILED";
+ if (result == EMSCRIPTEN_RESULT_NO_DATA) return "EMSCRIPTEN_RESULT_NO_DATA";
+ return "Unknown EMSCRIPTEN_RESULT!";
+}
+
+#define TEST_RESULT(x) if (ret != EMSCRIPTEN_RESULT_SUCCESS) printf("%s returned %s.\n", #x, emscripten_result_to_string(ret));
+
+int gotClick = 0;
+int gotMouseDown = 0;
+int gotMouseUp = 0;
+int gotDblClick = 0;
+int gotMouseMove = 0;
+int gotWheel = 0;
+
+void instruction()
+{
+ if (!gotClick) { printf("Please click on the canvas.\n"); return; }
+ if (!gotMouseDown) { printf("Please click on the canvas.\n"); return; }
+ if (!gotMouseUp) { printf("Please click on the canvas.\n"); return; }
+ if (!gotDblClick) { printf("Please double-click on the canvas.\n"); return; }
+ if (!gotMouseMove) { printf("Please move the mouse on the canvas.\n"); return; }
+ if (!gotWheel) { printf("Please scroll the mouse wheel.\n"); return; }
+
+ if (gotClick && gotMouseDown && gotMouseUp && gotDblClick && gotMouseMove && gotWheel) report_result(0);
+}
+
+EM_BOOL mouse_callback(int eventType, const EmscriptenMouseEvent *e, void *userData)
+{
+ printf("%s, screen: (%ld,%ld), client: (%ld,%ld),%s%s%s%s button: %hu, buttons: %hu, movement: (%ld,%ld), canvas: (%ld,%ld)\n",
+ emscripten_event_type_to_string(eventType), e->screenX, e->screenY, e->clientX, e->clientY,
+ e->ctrlKey ? " CTRL" : "", e->shiftKey ? " SHIFT" : "", e->altKey ? " ALT" : "", e->metaKey ? " META" : "",
+ e->button, e->buttons, e->movementX, e->movementY, e->canvasX, e->canvasY);
+
+ if (e->screenX != 0 && e->screenY != 0 && e->clientX != 0 && e->clientY != 0 && e->canvasX != 0 && e->canvasY != 0)
+ {
+ if (e->buttons != 0)
+ {
+ if (eventType == EMSCRIPTEN_EVENT_CLICK) gotClick = 1;
+ if (eventType == EMSCRIPTEN_EVENT_MOUSEDOWN) gotMouseDown = 1;
+ if (eventType == EMSCRIPTEN_EVENT_DBLCLICK) gotDblClick = 1;
+ }
+ if (eventType == EMSCRIPTEN_EVENT_MOUSEUP) gotMouseUp = 1;
+ if (eventType == EMSCRIPTEN_EVENT_MOUSEMOVE && (e->movementX != 0 || e->movementY != 0)) gotMouseMove = 1;
+ }
+
+ if (eventType == EMSCRIPTEN_EVENT_CLICK && e->screenX == -500000)
+ {
+ printf("ERROR! Received an event to a callback that should have been unregistered!\n");
+ gotClick = 0;
+ report_result(1);
+ }
+
+ instruction();
+ return 0;
+}
+
+EM_BOOL wheel_callback(int eventType, const EmscriptenWheelEvent *e, void *userData)
+{
+ printf("%s, screen: (%ld,%ld), client: (%ld,%ld),%s%s%s%s button: %hu, buttons: %hu, canvas: (%ld,%ld), delta:(%g,%g,%g), deltaMode:%lu\n",
+ emscripten_event_type_to_string(eventType), e->mouse.screenX, e->mouse.screenY, e->mouse.clientX, e->mouse.clientY,
+ e->mouse.ctrlKey ? " CTRL" : "", e->mouse.shiftKey ? " SHIFT" : "", e->mouse.altKey ? " ALT" : "", e->mouse.metaKey ? " META" : "",
+ e->mouse.button, e->mouse.buttons, e->mouse.canvasX, e->mouse.canvasY,
+ (float)e->deltaX, (float)e->deltaY, (float)e->deltaZ, e->deltaMode);
+
+ if (e->deltaY > 0.f || e->deltaY < 0.f)
+ gotWheel = 1;
+
+ instruction();
+ return 0;
+}
+
+int main()
+{
+ EMSCRIPTEN_RESULT ret = emscripten_set_click_callback(0, 0, 1, mouse_callback);
+ TEST_RESULT(emscripten_set_click_callback);
+ ret = emscripten_set_mousedown_callback(0, 0, 1, mouse_callback);
+ TEST_RESULT(emscripten_set_mousedown_callback);
+ ret = emscripten_set_mouseup_callback(0, 0, 1, mouse_callback);
+ TEST_RESULT(emscripten_set_mouseup_callback);
+ ret = emscripten_set_dblclick_callback(0, 0, 1, mouse_callback);
+ TEST_RESULT(emscripten_set_dblclick_callback);
+ ret = emscripten_set_mousemove_callback(0, 0, 1, mouse_callback);
+ TEST_RESULT(emscripten_set_mousemove_callback);
+
+ ret = emscripten_set_wheel_callback(0, 0, 1, wheel_callback);
+ TEST_RESULT(emscripten_set_wheel_callback);
+
+#ifdef AUTOMATE_SUCCESS
+ EM_ASM(
+ function sendEvent(type, data) {
+ var event = document.createEvent('Event');
+ event.initEvent(type, true, true);
+ for(var d in data) event[d] = data[d];
+ window.dispatchEvent(event);
+ }
+ sendEvent('click', { screenX: 1, screenY: 1, clientX: 1, clientY: 1, button: 0, buttons: 1 });
+ );
+ // Test that unregistering a callback works. Clicks should no longer be received.
+ ret = emscripten_set_click_callback(0, 0, 1, 0);
+ TEST_RESULT(emscripten_set_click_callback);
+
+ EM_ASM(
+ function sendEvent(type, data) {
+ var event = document.createEvent('Event');
+ event.initEvent(type, true, true);
+ for(var d in data) event[d] = data[d];
+ window.dispatchEvent(event);
+ }
+ sendEvent('click', { screenX: -500000, screenY: -500000, clientX: -500000, clientY: -500000, button: 0, buttons: 1 }); // Send a dummy event that should not be received.
+ sendEvent('mousedown', { screenX: 1, screenY: 1, clientX: 1, clientY: 1, button: 0, buttons: 1 });
+ sendEvent('mouseup', { screenX: 1, screenY: 1, clientX: 1, clientY: 1, button: 0, buttons: 0 });
+ sendEvent('dblclick', { screenX: 1, screenY: 1, clientX: 1, clientY: 1, button: 0, buttons: 1 });
+ sendEvent('mousemove', { screenX: 1, screenY: 1, clientX: 1, clientY: 1, button: 0, buttons: 0, movementX: 1, movementY: 1 });
+ sendEvent('wheel', { screenX: 1, screenY: 1, clientX: 1, clientY: 1, button: 0, buttons: 0, deltaX: 1, deltaY: 1, deltaZ: 1, deltaMode: 1 });
+ sendEvent('mousewheel', { screenX: 1, screenY: 1, clientX: 1, clientY: 1, button: 0, buttons: 0, wheelDeltaX: 1, wheelDeltaY: 1 });
+ );
+#endif
+
+ /* For the events to function, one must either call emscripten_set_main_loop or enable Module.noExitRuntime by some other means.
+ Otherwise the application will exit after leaving main(), and the atexit handlers will clean up all event hooks (by design). */
+ EM_ASM(Module['noExitRuntime'] = true);
+ return 0;
+}
diff --git a/tests/test_interactive.py b/tests/test_interactive.py
new file mode 100644
index 00000000..aa1d96af
--- /dev/null
+++ b/tests/test_interactive.py
@@ -0,0 +1,97 @@
+import BaseHTTPServer, multiprocessing, os, shutil, subprocess, unittest, zlib, webbrowser, time, shlex
+from runner import BrowserCore, path_from_root, nonfastcomp
+from tools.shared import *
+
+# User can specify an environment variable EMSCRIPTEN_BROWSER to force the browser test suite to
+# run using another browser command line than the default system browser.
+emscripten_browser = os.environ.get('EMSCRIPTEN_BROWSER')
+if emscripten_browser:
+ cmd = shlex.split(emscripten_browser)
+ def run_in_other_browser(url):
+ Popen(cmd + [url])
+ webbrowser.open_new = run_in_other_browser
+
+class interactive(BrowserCore):
+ @classmethod
+ def setUpClass(self):
+ super(interactive, self).setUpClass()
+ print
+ print 'Running the browser tests. Make sure the browser allows popups from localhost.'
+ print
+
+ def test_html5_fullscreen(self):
+ self.btest(path_from_root('tests', 'test_html5_fullscreen.c'), expected='0')
+
+ def test_html5_mouse(self):
+ self.btest(path_from_root('tests', 'test_html5_mouse.c'), expected='0')
+
+ def test_sdl_touch(self):
+ self.btest(path_from_root('tests', 'sdl_touch.c'), args=['-O2', '-g1', '--closure', '1'], expected='0')
+
+ def test_sdl_wm_togglefullscreen(self):
+ self.btest('sdl_wm_togglefullscreen.c', expected='1', args=['-s', 'NO_EXIT_RUNTIME=1'])
+
+ def test_sdl_audio(self):
+ shutil.copyfile(path_from_root('tests', 'sounds', 'alarmvictory_1.ogg'), os.path.join(self.get_dir(), 'sound.ogg'))
+ shutil.copyfile(path_from_root('tests', 'sounds', 'alarmcreatemiltaryfoot_1.wav'), os.path.join(self.get_dir(), 'sound2.wav'))
+ shutil.copyfile(path_from_root('tests', 'sounds', 'noise.ogg'), os.path.join(self.get_dir(), 'noise.ogg'))
+ shutil.copyfile(path_from_root('tests', 'sounds', 'the_entertainer.ogg'), os.path.join(self.get_dir(), 'the_entertainer.ogg'))
+ open(os.path.join(self.get_dir(), 'bad.ogg'), 'w').write('I claim to be audio, but am lying')
+ open(os.path.join(self.get_dir(), 'sdl_audio.c'), 'w').write(self.with_report_result(open(path_from_root('tests', 'sdl_audio.c')).read()))
+
+ # use closure to check for a possible bug with closure minifying away newer Audio() attributes
+ Popen([PYTHON, EMCC, '-O2', '--closure', '1', '--minify', '0', os.path.join(self.get_dir(), 'sdl_audio.c'), '--preload-file', 'sound.ogg', '--preload-file', 'sound2.wav', '--embed-file', 'the_entertainer.ogg', '--preload-file', 'noise.ogg', '--preload-file', 'bad.ogg', '-o', 'page.html', '-s', 'EXPORTED_FUNCTIONS=["_main", "_play", "_play2"]']).communicate()
+ self.run_browser('page.html', '', '/report_result?1')
+
+ def test_sdl_audio_mix_channels(self):
+ shutil.copyfile(path_from_root('tests', 'sounds', 'noise.ogg'), os.path.join(self.get_dir(), 'sound.ogg'))
+ open(os.path.join(self.get_dir(), 'sdl_audio_mix_channels.c'), 'w').write(self.with_report_result(open(path_from_root('tests', 'sdl_audio_mix_channels.c')).read()))
+
+ Popen([PYTHON, EMCC, '-O2', '--minify', '0', os.path.join(self.get_dir(), 'sdl_audio_mix_channels.c'), '--preload-file', 'sound.ogg', '-o', 'page.html']).communicate()
+ self.run_browser('page.html', '', '/report_result?1')
+
+ def test_sdl_audio_mix(self):
+ shutil.copyfile(path_from_root('tests', 'sounds', 'pluck.ogg'), os.path.join(self.get_dir(), 'sound.ogg'))
+ shutil.copyfile(path_from_root('tests', 'sounds', 'the_entertainer.ogg'), os.path.join(self.get_dir(), 'music.ogg'))
+ shutil.copyfile(path_from_root('tests', 'sounds', 'noise.ogg'), os.path.join(self.get_dir(), 'noise.ogg'))
+ open(os.path.join(self.get_dir(), 'sdl_audio_mix.c'), 'w').write(self.with_report_result(open(path_from_root('tests', 'sdl_audio_mix.c')).read()))
+
+ Popen([PYTHON, EMCC, '-O2', '--minify', '0', os.path.join(self.get_dir(), 'sdl_audio_mix.c'), '--preload-file', 'sound.ogg', '--preload-file', 'music.ogg', '--preload-file', 'noise.ogg', '-o', 'page.html']).communicate()
+ self.run_browser('page.html', '', '/report_result?1')
+
+ def test_sdl_audio_quickload(self):
+ open(os.path.join(self.get_dir(), 'sdl_audio_quickload.c'), 'w').write(self.with_report_result(open(path_from_root('tests', 'sdl_audio_quickload.c')).read()))
+
+ Popen([PYTHON, EMCC, '-O2', '--minify', '0', os.path.join(self.get_dir(), 'sdl_audio_quickload.c'), '-o', 'page.html', '-s', 'EXPORTED_FUNCTIONS=["_main", "_play"]']).communicate()
+ self.run_browser('page.html', '', '/report_result?1')
+
+ def test_sdl_audio_beeps(self):
+ open(os.path.join(self.get_dir(), 'sdl_audio_beep.cpp'), 'w').write(self.with_report_result(open(path_from_root('tests', 'sdl_audio_beep.cpp')).read()))
+
+ # use closure to check for a possible bug with closure minifying away newer Audio() attributes
+ Popen([PYTHON, EMCC, '-O2', '--closure', '1', '--minify', '0', os.path.join(self.get_dir(), 'sdl_audio_beep.cpp'), '-s', 'DISABLE_EXCEPTION_CATCHING=0', '-o', 'page.html']).communicate()
+ self.run_browser('page.html', '', '/report_result?1')
+
+ def test_openal_playback(self):
+ shutil.copyfile(path_from_root('tests', 'sounds', 'audio.wav'), os.path.join(self.get_dir(), 'audio.wav'))
+ open(os.path.join(self.get_dir(), 'openal_playback.cpp'), 'w').write(self.with_report_result(open(path_from_root('tests', 'openal_playback.cpp')).read()))
+
+ Popen([PYTHON, EMCC, '-O2', os.path.join(self.get_dir(), 'openal_playback.cpp'), '--preload-file', 'audio.wav', '-o', 'page.html']).communicate()
+ self.run_browser('page.html', '', '/report_result?1')
+
+ def test_openal_buffers(self):
+ shutil.copyfile(path_from_root('tests', 'sounds', 'the_entertainer.wav'), os.path.join(self.get_dir(), 'the_entertainer.wav'))
+ self.btest('openal_buffers.c', '0', args=['--preload-file', 'the_entertainer.wav'],)
+
+ def get_freealut_library(self):
+ if WINDOWS and Building.which('cmake'):
+ return self.get_library('freealut', os.path.join('hello_world.bc'), configure=['cmake', '.'], configure_args=['-DBUILD_TESTS=ON'])
+ else:
+ return self.get_library('freealut', os.path.join('examples', '.libs', 'hello_world.bc'), make_args=['EXEEXT=.bc'])
+
+ def test_freealut(self):
+ programs = self.get_freealut_library()
+ for program in programs:
+ assert os.path.exists(program)
+ Popen([PYTHON, EMCC, '-O2', program, '-o', 'page.html']).communicate()
+ self.run_browser('page.html', 'You should hear "Hello World!"')
diff --git a/tests/test_other.py b/tests/test_other.py
index b4abf275..cdea493a 100644
--- a/tests/test_other.py
+++ b/tests/test_other.py
@@ -1,7 +1,7 @@
import multiprocessing, os, re, shutil, subprocess, sys
import tools.shared
from tools.shared import *
-from runner import RunnerCore, path_from_root, get_bullet_library
+from runner import RunnerCore, path_from_root, get_bullet_library, nonfastcomp
class other(RunnerCore):
def get_zlib_library(self):
@@ -19,7 +19,7 @@ class other(RunnerCore):
output = Popen([PYTHON, compiler, '--version'], stdout=PIPE, stderr=PIPE).communicate()
output = output[0].replace('\r', '')
self.assertContained('''emcc (Emscripten GCC-like replacement)''', output)
- self.assertContained('''Copyright (C) 2013 the Emscripten authors (see AUTHORS.txt)
+ self.assertContained('''Copyright (C) 2014 the Emscripten authors (see AUTHORS.txt)
This is free and open source software under the MIT license.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
''', output)
@@ -65,6 +65,7 @@ Options that are modified or new in %s include:
# emcc src.cpp -c and emcc src.cpp -o src.[o|bc] ==> should give a .bc file
# regression check: -o js should create "js", with bitcode content
for args in [['-c'], ['-o', 'src.o'], ['-o', 'src.bc'], ['-o', 'src.so'], ['-o', 'js']]:
+ print '-c stuff', args
target = args[1] if len(args) == 2 else 'hello_world.o'
self.clear()
Popen([PYTHON, compiler, path_from_root('tests', 'hello_world' + suffix)] + args, stdout=PIPE, stderr=PIPE).communicate()
@@ -114,8 +115,6 @@ Options that are modified or new in %s include:
os.chdir(self.get_dir())
self.clear()
- # dlmalloc. dlmalloc is special in that it is the only part of libc that is (1) hard to write well, and
- # very speed-sensitive. So we do not implement it in JS in library.js, instead we compile it from source
for source, has_malloc in [('hello_world' + suffix, False), ('hello_malloc.cpp', True)]:
print source, has_malloc
self.clear()
@@ -193,9 +192,9 @@ Options that are modified or new in %s include:
(['-O2', '-g1'], lambda generated: 'var b = 0' in generated and not 'function _main' in generated, 'compress is cancelled by -g1'),
(['-O2', '-g2'], lambda generated: ('var b = 0' in generated or 'var i1 = 0' in generated) and 'function _main' in generated, 'minify is cancelled by -g2'),
(['-O2', '-g3'], lambda generated: 'var b=0' not in generated and 'var b = 0' not in generated and 'function _main' in generated, 'registerize is cancelled by -g3'),
+ (['-O2', '-profiling'], lambda generated: ('var b = 0' in generated or 'var i1 = 0' in generated) and 'function _main' in generated, 'similar to -g2'),
#(['-O2', '-g4'], lambda generated: 'var b=0' not in generated and 'var b = 0' not in generated and 'function _main' in generated, 'same as -g3 for now'),
(['-s', 'INLINING_LIMIT=0'], lambda generated: 'function _dump' in generated, 'no inlining without opts'),
- (['-Os', '--llvm-lto', '1', '-s', 'ASM_JS=0', '-g2'], lambda generated: 'function _dump' in generated, '-Os disables inlining'),
(['-s', 'USE_TYPED_ARRAYS=0'], lambda generated: 'new Int32Array' not in generated, 'disable typed arrays'),
(['-s', 'USE_TYPED_ARRAYS=1'], lambda generated: 'IHEAPU = ' in generated, 'typed arrays 1 selected'),
([], lambda generated: 'Module["_dump"]' not in generated, 'dump is not exported by default'),
@@ -207,7 +206,7 @@ Options that are modified or new in %s include:
]:
print params, text
self.clear()
- if os.environ.get('EMCC_FAST_COMPILER') == '1' and ['disable typed arrays', 'typed arrays 1 selected']: continue
+ if os.environ.get('EMCC_FAST_COMPILER') != '0' and ['disable typed arrays', 'typed arrays 1 selected']: continue
output = Popen([PYTHON, compiler, path_from_root('tests', 'hello_world_loop.cpp'), '-o', 'a.out.js'] + params, stdout=PIPE, stderr=PIPE).communicate()
assert len(output[0]) == 0, output[0]
assert os.path.exists('a.out.js'), '\n'.join(output)
@@ -277,6 +276,9 @@ f.close()
# TODO: test normal project linking, static and dynamic: get_library should not need to be told what to link!
# TODO: deprecate llvm optimizations, dlmalloc, etc. in emscripten.py.
+ def test_emcc_nonfastcomp(self):
+ nonfastcomp(self.test_emcc)
+
def test_cmake(self):
# Test all supported generators.
if WINDOWS:
@@ -451,48 +453,48 @@ f.close()
self.assertContained('hello, world!', run_js(os.path.join(self.get_dir(), 'a.out.js')))
def test_unaligned_memory(self):
- if os.environ.get('EMCC_FAST_COMPILER') == '1': return self.skip('todo in fastcomp')
-
- open(os.path.join(self.get_dir(), 'test.cpp'), 'w').write(r'''
- #include <stdio.h>
- #include <stdarg.h>
+ def test():
+ open(os.path.join(self.get_dir(), 'test.cpp'), 'w').write(r'''
+ #include <stdio.h>
+ #include <stdarg.h>
- typedef unsigned char Bit8u;
- typedef unsigned short Bit16u;
- typedef unsigned int Bit32u;
+ typedef unsigned char Bit8u;
+ typedef unsigned short Bit16u;
+ typedef unsigned int Bit32u;
- int main()
- {
- va_list argp;
- va_arg(argp, char *); // check for compilation error, #1705
+ int main()
+ {
+ va_list argp;
+ va_arg(argp, char *); // check for compilation error, #1705
- Bit8u data[4] = {0x01,0x23,0x45,0x67};
+ Bit8u data[4] = {0x01,0x23,0x45,0x67};
- printf("data: %x\n", *(Bit32u*)data);
- printf("data[0,1] 16bit: %x\n", *(Bit16u*)data);
- printf("data[1,2] 16bit: %x\n", *(Bit16u*)(data+1));
- }
- ''')
- Popen([PYTHON, EMCC, os.path.join(self.get_dir(), 'test.cpp'), '-s', 'UNALIGNED_MEMORY=1']).communicate()
- self.assertContained('data: 67452301\ndata[0,1] 16bit: 2301\ndata[1,2] 16bit: 4523', run_js(os.path.join(self.get_dir(), 'a.out.js')))
+ printf("data: %x\n", *(Bit32u*)data);
+ printf("data[0,1] 16bit: %x\n", *(Bit16u*)data);
+ printf("data[1,2] 16bit: %x\n", *(Bit16u*)(data+1));
+ }
+ ''')
+ Popen([PYTHON, EMCC, os.path.join(self.get_dir(), 'test.cpp'), '-s', 'UNALIGNED_MEMORY=1']).communicate()
+ self.assertContained('data: 67452301\ndata[0,1] 16bit: 2301\ndata[1,2] 16bit: 4523', run_js(os.path.join(self.get_dir(), 'a.out.js')))
+ nonfastcomp(test)
def test_unaligned_memory_2(self):
- if os.environ.get('EMCC_FAST_COMPILER') == '1': return self.skip('todo in fastcomp')
-
- open(os.path.join(self.get_dir(), 'test.cpp'), 'w').write(r'''
- #include <string>
- #include <stdio.h>
+ def test():
+ open(os.path.join(self.get_dir(), 'test.cpp'), 'w').write(r'''
+ #include <string>
+ #include <stdio.h>
- int main( int argc, char ** argv )
- {
- std::string testString( "Hello, World!" );
+ int main( int argc, char ** argv )
+ {
+ std::string testString( "Hello, World!" );
- printf( "testString = %s\n", testString.c_str() );
- return 0;
- }
- ''')
- Popen([PYTHON, EMCC, os.path.join(self.get_dir(), 'test.cpp'), '-s', 'UNALIGNED_MEMORY=1']).communicate()
- self.assertContained('testString = Hello, World!', run_js(os.path.join(self.get_dir(), 'a.out.js')))
+ printf( "testString = %s\n", testString.c_str() );
+ return 0;
+ }
+ ''')
+ Popen([PYTHON, EMCC, os.path.join(self.get_dir(), 'test.cpp'), '-s', 'UNALIGNED_MEMORY=1']).communicate()
+ self.assertContained('testString = Hello, World!', run_js(os.path.join(self.get_dir(), 'a.out.js')))
+ nonfastcomp(test)
def test_asm_minify(self):
def test(args):
@@ -537,12 +539,13 @@ f.close()
'''
open('src.c', 'w').write(src)
def test(args, expected, err_expected=None):
+ print args, expected, err_expected
out, err = Popen([PYTHON, EMCC, 'src.c'] + args, stderr=PIPE).communicate()
if err_expected: self.assertContained(err_expected, err)
self.assertContained(expected, run_js(self.in_dir('a.out.js'), stderr=PIPE, full_output=True))
return open(self.in_dir('a.out.js')).read()
- if os.environ.get('EMCC_FAST_COMPILER') != '1':
+ if os.environ.get('EMCC_FAST_COMPILER') == '0':
test([], 'my func') # no asm, so casting func works
test(['-O2'], 'abort', ['Casting potentially incompatible function pointer i32 ()* to void (...)*, for my_func',
'Incompatible function pointer casts are very dangerous with ASM_JS=1, you should investigate and correct these']) # asm, so failure
@@ -552,12 +555,12 @@ f.close()
'Incompatible function pointer casts are very dangerous with ASM_JS=1, you should investigate and correct these']) # asm, so failure
else:
# fastcomp. all asm, so it can't just work with wrong sigs. but, ASSERTIONS=2 gives much better info to debug
- test(['-O1'], 'abort') # no useful info
- test(['-O1', '-s', 'ASSERTIONS=1'], '''Invalid function pointer called with signature 'v'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an different type, which will fail?
+ test(['-O1'], 'If this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.') # no useful info, but does mention ASSERTIONS
+ test(['-O1', '-s', 'ASSERTIONS=1'], '''Invalid function pointer called with signature 'v'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)
Build with ASSERTIONS=2 for more info.
''') # some useful text
- test(['-O1', '-s', 'ASSERTIONS=2'], '''Invalid function pointer '1' called with signature 'v'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an different type, which will fail?
-This pointer might make sense in another type signature: i: _my_func
+ test(['-O1', '-s', 'ASSERTIONS=2'], '''Invalid function pointer '0' called with signature 'v'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)
+This pointer might make sense in another type signature: i: 0
''') # actually useful identity of the bad pointer, with comparisons to what it would be in other types/tables
def test_l_link(self):
@@ -590,283 +593,289 @@ This pointer might make sense in another type signature: i: _my_func
assert not os.path.exists('a.out') and not os.path.exists('a.exe'), 'Must not leave unneeded linker stubs'
def test_static_link(self):
- if os.environ.get('EMCC_FAST_COMPILER') == '1': return self.skip('todo in fastcomp')
-
- def test(name, header, main, side, expected, args=[], suffix='cpp', first=True):
- print name
- #t = main ; main = side ; side = t
- original_main = main
- original_side = side
- if header: open(os.path.join(self.get_dir(), 'header.h'), 'w').write(header)
- if type(main) == str:
- open(os.path.join(self.get_dir(), 'main.' + suffix), 'w').write(main)
- main = ['main.' + suffix]
- if type(side) == str:
- open(os.path.join(self.get_dir(), 'side.' + suffix), 'w').write(side)
- side = ['side.' + suffix]
- Popen([PYTHON, EMCC] + side + ['-o', 'side.js', '-s', 'SIDE_MODULE=1', '-O2'] + args).communicate()
- # TODO: test with and without DISABLE_GL_EMULATION, check that file sizes change
- Popen([PYTHON, EMCC] + main + ['-o', 'main.js', '-s', 'MAIN_MODULE=1', '-O2', '-s', 'DISABLE_GL_EMULATION=1'] + args).communicate()
- Popen([PYTHON, EMLINK, 'main.js', 'side.js', 'together.js'], stdout=PIPE).communicate()
- assert os.path.exists('together.js')
- for engine in JS_ENGINES:
- out = run_js('together.js', engine=engine, stderr=PIPE, full_output=True)
- self.assertContained(expected, out)
- if engine == SPIDERMONKEY_ENGINE: self.validate_asmjs(out)
- if first:
- shutil.copyfile('together.js', 'first.js')
- test(name + ' (reverse)', header, original_side, original_main, expected, args, suffix, False) # test reverse order
-
- # test a simple call from one module to another. only one has a string (and constant memory initialization for it)
- test('basics', '', '''
- #include <stdio.h>
- extern int sidey();
- int main() {
- printf("other says %d.", sidey());
- return 0;
- }
- ''', '''
- int sidey() { return 11; }
- ''', 'other says 11.')
-
- # finalization of float variables should pass asm.js validation
- test('floats', '', '''
- #include <stdio.h>
- extern float sidey();
- int main() {
- printf("other says %.2f.", sidey()+1);
- return 0;
- }
- ''', '''
- float sidey() { return 11.5; }
- ''', 'other says 12.50')
-
- # memory initialization in both
- test('multiple memory inits', '', r'''
- #include <stdio.h>
- extern void sidey();
- int main() {
- printf("hello from main\n");
- sidey();
- return 0;
- }
- ''', r'''
- #include <stdio.h>
- void sidey() { printf("hello from side\n"); }
- ''', 'hello from main\nhello from side\n')
+ def nonfc():
+ if os.environ.get('EMCC_FAST_COMPILER') != '0': return self.skip('todo in fastcomp')
+
+ def test(name, header, main, side, expected, args=[], suffix='cpp', first=True):
+ print name
+ #t = main ; main = side ; side = t
+ original_main = main
+ original_side = side
+ if header: open(os.path.join(self.get_dir(), 'header.h'), 'w').write(header)
+ if type(main) == str:
+ open(os.path.join(self.get_dir(), 'main.' + suffix), 'w').write(main)
+ main = ['main.' + suffix]
+ if type(side) == str:
+ open(os.path.join(self.get_dir(), 'side.' + suffix), 'w').write(side)
+ side = ['side.' + suffix]
+ Popen([PYTHON, EMCC] + side + ['-o', 'side.js', '-s', 'SIDE_MODULE=1', '-O2'] + args).communicate()
+ # TODO: test with and without DISABLE_GL_EMULATION, check that file sizes change
+ Popen([PYTHON, EMCC] + main + ['-o', 'main.js', '-s', 'MAIN_MODULE=1', '-O2', '-s', 'DISABLE_GL_EMULATION=1'] + args).communicate()
+ Popen([PYTHON, EMLINK, 'main.js', 'side.js', 'together.js'], stdout=PIPE).communicate()
+ assert os.path.exists('together.js')
+ for engine in JS_ENGINES:
+ out = run_js('together.js', engine=engine, stderr=PIPE, full_output=True)
+ self.assertContained(expected, out)
+ if engine == SPIDERMONKEY_ENGINE: self.validate_asmjs(out)
+ if first:
+ shutil.copyfile('together.js', 'first.js')
+ test(name + ' (reverse)', header, original_side, original_main, expected, args, suffix, False) # test reverse order
+
+ # test a simple call from one module to another. only one has a string (and constant memory initialization for it)
+ test('basics', '', '''
+ #include <stdio.h>
+ extern int sidey();
+ int main() {
+ printf("other says %d.", sidey());
+ return 0;
+ }
+ ''', '''
+ int sidey() { return 11; }
+ ''', 'other says 11.')
- # function pointers
- test('fp1', 'typedef void (*voidfunc)();', r'''
- #include <stdio.h>
- #include "header.h"
- voidfunc sidey(voidfunc f);
- void a() { printf("hello from funcptr\n"); }
- int main() {
- sidey(a)();
- return 0;
- }
- ''', '''
- #include "header.h"
- voidfunc sidey(voidfunc f) { return f; }
- ''', 'hello from funcptr\n')
+ # finalization of float variables should pass asm.js validation
+ test('floats', '', '''
+ #include <stdio.h>
+ extern float sidey();
+ int main() {
+ printf("other says %.2f.", sidey()+1);
+ return 0;
+ }
+ ''', '''
+ float sidey() { return 11.5; }
+ ''', 'other says 12.50')
- # function pointers with 'return' in the name
- test('fp2', 'typedef void (*voidfunc)();', r'''
- #include <stdio.h>
- #include "header.h"
- int sidey(voidfunc f);
- void areturn0() { printf("hello 0\n"); }
- void areturn1() { printf("hello 1\n"); }
- void areturn2() { printf("hello 2\n"); }
- int main(int argc, char **argv) {
- voidfunc table[3] = { areturn0, areturn1, areturn2 };
- table[sidey(NULL)]();
- return 0;
- }
- ''', '''
- #include "header.h"
- int sidey(voidfunc f) { if (f) f(); return 1; }
- ''', 'hello 1\n')
+ # memory initialization in both
+ test('multiple memory inits', '', r'''
+ #include <stdio.h>
+ extern void sidey();
+ int main() {
+ printf("hello from main\n");
+ sidey();
+ return 0;
+ }
+ ''', r'''
+ #include <stdio.h>
+ void sidey() { printf("hello from side\n"); }
+ ''', 'hello from main\nhello from side\n')
- # Global initializer
- test('global init', '', r'''
- #include <stdio.h>
- struct Class {
- Class() { printf("a new Class\n"); }
- };
- static Class c;
- int main() {
- return 0;
- }
- ''', r'''
- void nothing() {}
- ''', 'a new Class\n')
+ # function pointers
+ test('fp1', 'typedef void (*voidfunc)();', r'''
+ #include <stdio.h>
+ #include "header.h"
+ voidfunc sidey(voidfunc f);
+ void a() { printf("hello from funcptr\n"); }
+ int main() {
+ sidey(a)();
+ return 0;
+ }
+ ''', '''
+ #include "header.h"
+ voidfunc sidey(voidfunc f) { return f; }
+ ''', 'hello from funcptr\n')
- # Multiple global initializers (LLVM generates overlapping names for them)
- test('global inits', r'''
- #include <stdio.h>
- struct Class {
- Class(const char *name) { printf("new %s\n", name); }
- };
- ''', r'''
- #include "header.h"
- static Class c("main");
- int main() {
- return 0;
- }
- ''', r'''
- #include "header.h"
- static Class c("side");
- ''', ['new main\nnew side\n', 'new side\nnew main\n'])
+ # function pointers with 'return' in the name
+ test('fp2', 'typedef void (*voidfunc)();', r'''
+ #include <stdio.h>
+ #include "header.h"
+ int sidey(voidfunc f);
+ void areturn0() { printf("hello 0\n"); }
+ void areturn1() { printf("hello 1\n"); }
+ void areturn2() { printf("hello 2\n"); }
+ int main(int argc, char **argv) {
+ voidfunc table[3] = { areturn0, areturn1, areturn2 };
+ table[sidey(NULL)]();
+ return 0;
+ }
+ ''', '''
+ #include "header.h"
+ int sidey(voidfunc f) { if (f) f(); return 1; }
+ ''', 'hello 1\n')
- # Class code used across modules
- test('codecall', r'''
- #include <stdio.h>
- struct Class {
- Class(const char *name);
- };
- ''', r'''
- #include "header.h"
- int main() {
- Class c("main");
- return 0;
- }
- ''', r'''
- #include "header.h"
- Class::Class(const char *name) { printf("new %s\n", name); }
- ''', ['new main\n'])
+ # Global initializer
+ test('global init', '', r'''
+ #include <stdio.h>
+ struct Class {
+ Class() { printf("a new Class\n"); }
+ };
+ static Class c;
+ int main() {
+ return 0;
+ }
+ ''', r'''
+ void nothing() {}
+ ''', 'a new Class\n')
- # malloc usage in both modules
- test('malloc', r'''
- #include <stdlib.h>
- #include <string.h>
- char *side(const char *data);
- ''', r'''
- #include <stdio.h>
- #include "header.h"
- int main() {
- char *temp = side("hello through side\n");
- char *ret = (char*)malloc(strlen(temp)+1);
- strcpy(ret, temp);
- temp[1] = 'x';
- puts(ret);
- return 0;
- }
- ''', r'''
- #include "header.h"
- char *side(const char *data) {
- char *ret = (char*)malloc(strlen(data)+1);
- strcpy(ret, data);
- return ret;
- }
- ''', ['hello through side\n'])
+ # Multiple global initializers (LLVM generates overlapping names for them)
+ test('global inits', r'''
+ #include <stdio.h>
+ struct Class {
+ Class(const char *name) { printf("new %s\n", name); }
+ };
+ ''', r'''
+ #include "header.h"
+ static Class c("main");
+ int main() {
+ return 0;
+ }
+ ''', r'''
+ #include "header.h"
+ static Class c("side");
+ ''', ['new main\nnew side\n', 'new side\nnew main\n'])
- # js library call
- open('lib.js', 'w').write(r'''
- mergeInto(LibraryManager.library, {
- test_lib_func: function(x) {
- return x + 17.2;
+ # Class code used across modules
+ test('codecall', r'''
+ #include <stdio.h>
+ struct Class {
+ Class(const char *name);
+ };
+ ''', r'''
+ #include "header.h"
+ int main() {
+ Class c("main");
+ return 0;
}
- });
- ''')
- test('js-lib', 'extern "C" { extern double test_lib_func(int input); }', r'''
- #include <stdio.h>
- #include "header.h"
- extern double sidey();
- int main2() { return 11; }
- int main() {
- int input = sidey();
- double temp = test_lib_func(input);
- printf("other says %.2f\n", temp);
- printf("more: %.5f, %d\n", temp, input);
- return 0;
- }
- ''', r'''
- #include <stdio.h>
- #include "header.h"
- extern int main2();
- double sidey() {
- int temp = main2();
- printf("main2 sed: %d\n", temp);
- printf("main2 sed: %u, %c\n", temp, temp/2);
- return test_lib_func(temp);
- }
- ''', 'other says 45.2', ['--js-library', 'lib.js'])
+ ''', r'''
+ #include "header.h"
+ Class::Class(const char *name) { printf("new %s\n", name); }
+ ''', ['new main\n'])
- # libc usage in one modules. must force libc inclusion in the main module if that isn't the one using mallinfo()
- try:
- os.environ['EMCC_FORCE_STDLIBS'] = 'libc'
- test('malloc-1', r'''
+ # malloc usage in both modules
+ test('malloc', r'''
+ #include <stdlib.h>
#include <string.h>
- int side();
+ char *side(const char *data);
''', r'''
#include <stdio.h>
#include "header.h"
int main() {
- printf("|%d|\n", side());
+ char *temp = side("hello through side\n");
+ char *ret = (char*)malloc(strlen(temp)+1);
+ strcpy(ret, temp);
+ temp[1] = 'x';
+ puts(ret);
return 0;
}
''', r'''
- #include <stdlib.h>
- #include <malloc.h>
#include "header.h"
- int side() {
- struct mallinfo m = mallinfo();
- return m.arena > 1;
+ char *side(const char *data) {
+ char *ret = (char*)malloc(strlen(data)+1);
+ strcpy(ret, data);
+ return ret;
}
- ''', ['|1|\n'])
- finally:
- del os.environ['EMCC_FORCE_STDLIBS']
-
- # iostream usage in one and std::string in both
- test('iostream', r'''
- #include <iostream>
- #include <string>
- std::string side();
- ''', r'''
- #include "header.h"
- int main() {
- std::cout << "hello from main " << side() << std::endl;
- return 0;
- }
- ''', r'''
- #include "header.h"
- std::string side() { return "and hello from side"; }
- ''', ['hello from main and hello from side\n'])
-
- # followup to iostream test: a second linking
- print 'second linking of a linking output'
- open('moar.cpp', 'w').write(r'''
- #include <iostream>
- struct Moar {
- Moar() { std::cout << "moar!" << std::endl; }
- };
- Moar m;
- ''')
- Popen([PYTHON, EMCC, 'moar.cpp', '-o', 'moar.js', '-s', 'SIDE_MODULE=1', '-O2']).communicate()
- Popen([PYTHON, EMLINK, 'together.js', 'moar.js', 'triple.js'], stdout=PIPE).communicate()
- assert os.path.exists('triple.js')
- for engine in JS_ENGINES:
- out = run_js('triple.js', engine=engine, stderr=PIPE, full_output=True)
- self.assertContained('moar!\nhello from main and hello from side\n', out)
- if engine == SPIDERMONKEY_ENGINE: self.validate_asmjs(out)
-
- # zlib compression library. tests function pointers in initializers and many other things
- test('zlib', '', open(path_from_root('tests', 'zlib', 'example.c'), 'r').read(),
- self.get_zlib_library(),
- open(path_from_root('tests', 'zlib', 'ref.txt'), 'r').read(),
- args=['-I' + path_from_root('tests', 'zlib')], suffix='c')
-
- use_cmake = WINDOWS
- bullet_library = get_bullet_library(self, use_cmake)
-
- # bullet physics engine. tests all the things
- test('bullet', '', open(path_from_root('tests', 'bullet', 'Demos', 'HelloWorld', 'HelloWorld.cpp'), 'r').read(),
- bullet_library,
- [open(path_from_root('tests', 'bullet', 'output.txt'), 'r').read(), # different roundings
- open(path_from_root('tests', 'bullet', 'output2.txt'), 'r').read(),
- open(path_from_root('tests', 'bullet', 'output3.txt'), 'r').read()],
- args=['-I' + path_from_root('tests', 'bullet', 'src')])
+ ''', ['hello through side\n'])
+
+ # js library call
+ open('lib.js', 'w').write(r'''
+ mergeInto(LibraryManager.library, {
+ test_lib_func: function(x) {
+ return x + 17.2;
+ }
+ });
+ ''')
+ test('js-lib', 'extern "C" { extern double test_lib_func(int input); }', r'''
+ #include <stdio.h>
+ #include "header.h"
+ extern double sidey();
+ int main2() { return 11; }
+ int main() {
+ int input = sidey();
+ double temp = test_lib_func(input);
+ printf("other says %.2f\n", temp);
+ printf("more: %.5f, %d\n", temp, input);
+ return 0;
+ }
+ ''', r'''
+ #include <stdio.h>
+ #include "header.h"
+ extern int main2();
+ double sidey() {
+ int temp = main2();
+ printf("main2 sed: %d\n", temp);
+ printf("main2 sed: %u, %c\n", temp, temp/2);
+ return test_lib_func(temp);
+ }
+ ''', 'other says 45.2', ['--js-library', 'lib.js'])
+
+ # libc usage in one modules. must force libc inclusion in the main module if that isn't the one using mallinfo()
+ try:
+ os.environ['EMCC_FORCE_STDLIBS'] = 'libc'
+ test('malloc-1', r'''
+ #include <string.h>
+ int side();
+ ''', r'''
+ #include <stdio.h>
+ #include "header.h"
+ int main() {
+ printf("|%d|\n", side());
+ return 0;
+ }
+ ''', r'''
+ #include <stdlib.h>
+ #include <malloc.h>
+ #include "header.h"
+ int side() {
+ struct mallinfo m = mallinfo();
+ return m.arena > 1;
+ }
+ ''', ['|1|\n'])
+ finally:
+ del os.environ['EMCC_FORCE_STDLIBS']
+
+ # iostream usage in one and std::string in both
+ test('iostream', r'''
+ #include <iostream>
+ #include <string>
+ std::string side();
+ ''', r'''
+ #include "header.h"
+ int main() {
+ std::cout << "hello from main " << side() << std::endl;
+ return 0;
+ }
+ ''', r'''
+ #include "header.h"
+ std::string side() { return "and hello from side"; }
+ ''', ['hello from main and hello from side\n'])
+
+ # followup to iostream test: a second linking
+ print 'second linking of a linking output'
+ open('moar.cpp', 'w').write(r'''
+ #include <iostream>
+ struct Moar {
+ Moar() { std::cout << "moar!" << std::endl; }
+ };
+ Moar m;
+ ''')
+ Popen([PYTHON, EMCC, 'moar.cpp', '-o', 'moar.js', '-s', 'SIDE_MODULE=1', '-O2']).communicate()
+ Popen([PYTHON, EMLINK, 'together.js', 'moar.js', 'triple.js'], stdout=PIPE).communicate()
+ assert os.path.exists('triple.js')
+ for engine in JS_ENGINES:
+ out = run_js('triple.js', engine=engine, stderr=PIPE, full_output=True)
+ self.assertContained('moar!\nhello from main and hello from side\n', out)
+ if engine == SPIDERMONKEY_ENGINE: self.validate_asmjs(out)
+
+ # zlib compression library. tests function pointers in initializers and many other things
+ try:
+ os.environ['EMCC_FORCE_STDLIBS'] = 'libcextra'
+ test('zlib', '', open(path_from_root('tests', 'zlib', 'example.c'), 'r').read(),
+ self.get_zlib_library(),
+ open(path_from_root('tests', 'zlib', 'ref.txt'), 'r').read(),
+ args=['-I' + path_from_root('tests', 'zlib')], suffix='c')
+ finally:
+ del os.environ['EMCC_FORCE_STDLIBS']
+
+ use_cmake = WINDOWS
+ bullet_library = get_bullet_library(self, use_cmake)
+
+ # bullet physics engine. tests all the things
+ test('bullet', '', open(path_from_root('tests', 'bullet', 'Demos', 'HelloWorld', 'HelloWorld.cpp'), 'r').read(),
+ bullet_library,
+ [open(path_from_root('tests', 'bullet', 'output.txt'), 'r').read(), # different roundings
+ open(path_from_root('tests', 'bullet', 'output2.txt'), 'r').read(),
+ open(path_from_root('tests', 'bullet', 'output3.txt'), 'r').read()],
+ args=['-I' + path_from_root('tests', 'bullet', 'src')])
+ nonfastcomp(nonfc)
def test_outline(self):
def test(name, src, libs, expected, expected_ranges, args=[], suffix='cpp'):
@@ -914,11 +923,11 @@ This pointer might make sense in another type signature: i: _my_func
for test_opts, expected_ranges in [
([], {
100: (190, 500),
- 250: (200, 500),
- 500: (250, 500),
+ 250: (200, 600),
+ 500: (200, 700),
1000: (230, 1000),
- 2000: (380, 2000),
- 5000: (800, 5000),
+ 2000: (300, 2000),
+ 5000: (500, 5000),
0: (1500, 5000)
}),
(['-O2'], {
@@ -939,11 +948,12 @@ This pointer might make sense in another type signature: i: _my_func
args=['-I' + path_from_root('tests', 'zlib')], suffix='c')
def test_symlink(self):
+ self.clear()
if os.name == 'nt':
return self.skip('Windows FS does not need to be tested for symlinks support, since it does not have them.')
open(os.path.join(self.get_dir(), 'foobar.xxx'), 'w').write('int main(){ return 0; }')
os.symlink(os.path.join(self.get_dir(), 'foobar.xxx'), os.path.join(self.get_dir(), 'foobar.c'))
- Popen([PYTHON, EMCC, os.path.join(self.get_dir(), 'foobar.c'), '-o', os.path.join(self.get_dir(), 'foobar')], stdout=PIPE, stderr=PIPE).communicate()
+ Popen([PYTHON, EMCC, os.path.join(self.get_dir(), 'foobar.c'), '-o', os.path.join(self.get_dir(), 'foobar')]).communicate()
assert os.path.exists(os.path.join(self.get_dir(), 'foobar'))
try_delete(os.path.join(self.get_dir(), 'foobar'))
try_delete(os.path.join(self.get_dir(), 'foobar.xxx'))
@@ -951,7 +961,7 @@ This pointer might make sense in another type signature: i: _my_func
open(os.path.join(self.get_dir(), 'foobar.c'), 'w').write('int main(){ return 0; }')
os.symlink(os.path.join(self.get_dir(), 'foobar.c'), os.path.join(self.get_dir(), 'foobar.xxx'))
- Popen([PYTHON, EMCC, os.path.join(self.get_dir(), 'foobar.xxx'), '-o', os.path.join(self.get_dir(), 'foobar')], stdout=PIPE, stderr=PIPE).communicate()
+ Popen([PYTHON, EMCC, os.path.join(self.get_dir(), 'foobar.xxx'), '-o', os.path.join(self.get_dir(), 'foobar')]).communicate()
assert os.path.exists(os.path.join(self.get_dir(), 'foobar'))
try_delete(os.path.join(self.get_dir(), 'foobar'))
try_delete(os.path.join(self.get_dir(), 'foobar.xxx'))
@@ -1582,6 +1592,8 @@ This pointer might make sense in another type signature: i: _my_func
def test_warn_undefined(self):
open(os.path.join(self.get_dir(), 'main.cpp'), 'w').write(r'''
#include <stdio.h>
+ #include <SDL.h>
+ #include "SDL/SDL_opengl.h"
extern "C" {
void something();
@@ -1589,6 +1601,7 @@ This pointer might make sense in another type signature: i: _my_func
}
int main() {
+ printf("%p", SDL_GL_GetProcAddress("glGenTextures")); // pull in gl proc stuff, avoid warnings on emulation funcs
something();
elsey();
return 0;
@@ -1608,6 +1621,7 @@ This pointer might make sense in another type signature: i: _my_func
self.assertContained('unresolved symbol: something', output[1])
self.assertContained('unresolved symbol: elsey', output[1])
assert os.path.exists('a.out.js')
+ self.assertNotContained('unresolved symbol: emscripten_', output[1])
elif action == 'ERROR' and value:
self.assertContained('unresolved symbol: something', output[1])
self.assertContained('unresolved symbol: elsey', output[1])
@@ -1764,14 +1778,9 @@ This pointer might make sense in another type signature: i: _my_func
def test_js_optimizer(self):
for input, expected, passes in [
(path_from_root('tools', 'test-js-optimizer.js'), open(path_from_root('tools', 'test-js-optimizer-output.js')).read(),
- ['hoistMultiples', 'loopOptimizer', 'removeAssignsToUndefined', 'simplifyExpressions']),
- (path_from_root('tools', 'test-js-optimizer-t2c.js'), open(path_from_root('tools', 'test-js-optimizer-t2c-output.js')).read(),
- ['simplifyExpressions', 'optimizeShiftsConservative']),
- (path_from_root('tools', 'test-js-optimizer-t2.js'), open(path_from_root('tools', 'test-js-optimizer-t2-output.js')).read(),
- ['simplifyExpressions', 'optimizeShiftsAggressive']),
- # Make sure that optimizeShifts handles functions with shift statements.
- (path_from_root('tools', 'test-js-optimizer-t3.js'), open(path_from_root('tools', 'test-js-optimizer-t3-output.js')).read(),
- ['optimizeShiftsAggressive']),
+ ['hoistMultiples', 'removeAssignsToUndefined', 'simplifyExpressions']),
+ (path_from_root('tools', 'test-js-optimizer-si.js'), open(path_from_root('tools', 'test-js-optimizer-si-output.js')).read(),
+ ['simplifyIfs']),
(path_from_root('tools', 'test-js-optimizer-regs.js'), open(path_from_root('tools', 'test-js-optimizer-regs-output.js')).read(),
['registerize']),
(path_from_root('tools', 'eliminator', 'eliminator-test.js'), open(path_from_root('tools', 'eliminator', 'eliminator-test-output.js')).read(),
@@ -1817,26 +1826,28 @@ This pointer might make sense in another type signature: i: _my_func
assert 'error' not in err, 'Unexpected stderr: ' + err
def test_chunking(self):
- if os.environ.get('EMCC_FAST_COMPILER') == '1': return self.skip('not relevant for fastcomp, only checks js compiler chunking')
- if os.environ.get('EMCC_DEBUG'): return self.skip('cannot run in debug mode')
- if os.environ.get('EMCC_CORES'): return self.skip('cannot run if cores are altered')
- if multiprocessing.cpu_count() < 2: return self.skip('need multiple cores')
- try:
- os.environ['EMCC_DEBUG'] = '1'
- os.environ['EMCC_CORES'] = '2' # standardize over machines
- for asm, linkable, chunks in [
- (0, 0, 2), (0, 1, 2),
- (1, 0, 2), (1, 1, 2)
- ]:
- print asm, linkable, chunks
- output, err = Popen([PYTHON, EMCC, path_from_root('tests', 'hello_libcxx.cpp'), '-O1', '-s', 'LINKABLE=%d' % linkable, '-s', 'ASM_JS=%d' % asm] + (['-O2'] if asm else []), stdout=PIPE, stderr=PIPE).communicate()
- ok = False
- for c in range(chunks, chunks+2):
- ok = ok or ('phase 2 working on %d chunks' % c in err)
- assert ok, err
- finally:
- del os.environ['EMCC_DEBUG']
- del os.environ['EMCC_CORES']
+ def nonfc():
+ if os.environ.get('EMCC_FAST_COMPILER') != '0': return self.skip('not relevant for fastcomp, only checks js compiler chunking')
+ if os.environ.get('EMCC_DEBUG'): return self.skip('cannot run in debug mode')
+ if os.environ.get('EMCC_CORES'): return self.skip('cannot run if cores are altered')
+ if multiprocessing.cpu_count() < 2: return self.skip('need multiple cores')
+ try:
+ os.environ['EMCC_DEBUG'] = '1'
+ os.environ['EMCC_CORES'] = '2' # standardize over machines
+ for asm, linkable, chunks in [
+ (0, 0, 2), (0, 1, 2),
+ (1, 0, 2), (1, 1, 2)
+ ]:
+ print asm, linkable, chunks
+ output, err = Popen([PYTHON, EMCC, path_from_root('tests', 'hello_libcxx.cpp'), '-O1', '-s', 'LINKABLE=%d' % linkable, '-s', 'ASM_JS=%d' % asm] + (['-O2'] if asm else []), stdout=PIPE, stderr=PIPE).communicate()
+ ok = False
+ for c in range(chunks, chunks+2):
+ ok = ok or ('phase 2 working on %d chunks' % c in err)
+ assert ok, err
+ finally:
+ del os.environ['EMCC_DEBUG']
+ del os.environ['EMCC_CORES']
+ nonfastcomp(nonfc)
def test_debuginfo(self):
if os.environ.get('EMCC_DEBUG'): return self.skip('cannot run in debug mode')
@@ -1868,23 +1879,25 @@ This pointer might make sense in another type signature: i: _my_func
assert 'If you see this - the world is all right!' in output
def test_embind(self):
- if os.environ.get('EMCC_FAST_COMPILER') == '1': return self.skip('todo in fastcomp')
- for args, fail in [
- ([], True), # without --bind, we fail
- (['--bind'], False),
- (['--bind', '-O1'], False),
- (['--bind', '-O2'], False),
- (['--bind', '-O1', '-s', 'ASM_JS=0'], False),
- (['--bind', '-O2', '-s', 'ASM_JS=0'], False)
- ]:
- print args, fail
- self.clear()
- try_delete(self.in_dir('a.out.js'))
- Popen([PYTHON, EMCC, path_from_root('tests', 'embind', 'embind_test.cpp'), '--post-js', path_from_root('tests', 'embind', 'underscore-1.4.2.js'), '--post-js', path_from_root('tests', 'embind', 'imvu_test_adapter.js'), '--post-js', path_from_root('tests', 'embind', 'embind.test.js')] + args, stderr=PIPE if fail else None).communicate()
- assert os.path.exists(self.in_dir('a.out.js')) == (not fail)
- if not fail:
- output = run_js(self.in_dir('a.out.js'), stdout=PIPE, stderr=PIPE, full_output=True)
- assert "FAIL" not in output, output
+ def nonfc():
+ if os.environ.get('EMCC_FAST_COMPILER') != '0': return self.skip('todo in fastcomp')
+ for args, fail in [
+ ([], True), # without --bind, we fail
+ (['--bind'], False),
+ (['--bind', '-O1'], False),
+ (['--bind', '-O2'], False),
+ (['--bind', '-O1', '-s', 'ASM_JS=0'], False),
+ (['--bind', '-O2', '-s', 'ASM_JS=0'], False)
+ ]:
+ print args, fail
+ self.clear()
+ try_delete(self.in_dir('a.out.js'))
+ Popen([PYTHON, EMCC, path_from_root('tests', 'embind', 'embind_test.cpp'), '--post-js', path_from_root('tests', 'embind', 'underscore-1.4.2.js'), '--post-js', path_from_root('tests', 'embind', 'imvu_test_adapter.js'), '--post-js', path_from_root('tests', 'embind', 'embind.test.js')] + args, stderr=PIPE if fail else None).communicate()
+ assert os.path.exists(self.in_dir('a.out.js')) == (not fail)
+ if not fail:
+ output = run_js(self.in_dir('a.out.js'), stdout=PIPE, stderr=PIPE, full_output=True)
+ assert "FAIL" not in output, output
+ nonfastcomp(nonfc)
def test_llvm_nativizer(self):
try:
@@ -1964,23 +1977,6 @@ seeked= file.
code = open('a.out.js').read()
assert 'SAFE_HEAP' in code, 'valid -s option had an effect'
- def test_jcache_printf(self):
- open(self.in_dir('src.cpp'), 'w').write(r'''
- #include <stdio.h>
- #include <stdint.h>
- #include <emscripten.h>
- int main() {
- emscripten_jcache_printf("hello world\n");
- emscripten_jcache_printf("hello %d world\n", 5);
- emscripten_jcache_printf("hello %.3f world\n", 123.456789123);
- emscripten_jcache_printf("hello %llx world\n", 0x1234567811223344ULL);
- return 0;
- }
- ''')
- Popen([PYTHON, EMCC, self.in_dir('src.cpp')]).communicate()
- output = run_js('a.out.js')
- self.assertIdentical('hello world\nhello 5 world\nhello 123.457 world\nhello 1234567811223300 world\n', output)
-
def test_conftest_s_flag_passing(self):
open(os.path.join(self.get_dir(), 'conftest.c'), 'w').write(r'''
int main() {
@@ -2097,6 +2093,7 @@ done.
EM_ASM(Module.print(demangle('__Z5multiwahtjmxyz')));
EM_ASM(Module.print(demangle('__Z1aA32_iPA5_c')));
EM_ASM(Module.print(demangle('__ZN21FWakaGLXFleeflsMarfooC2EjjjPKvbjj')));
+ EM_ASM(Module.print(demangle('__ZN5wakaw2Cm10RasterBaseINS_6watwat9PolocatorEE8merbine1INS4_2OREEEvPKjj'))); // we get this wrong, but at least emit a '?'
one(17);
return 0;
}
@@ -2120,6 +2117,7 @@ parseword(char*&, int, int&)
multi(wchar_t, signed char, unsigned char, unsigned short, unsigned int, unsigned long, long long, unsigned long long, ...)
a(int [32], char [5]*)
FWakaGLXFleeflsMarfoo::FWakaGLXFleeflsMarfoo(unsigned int, unsigned int, unsigned int, void*, bool, unsigned int, unsigned int)
+void wakaw::Cm::RasterBase<wakaw::watwat::Polocator?>(unsigned int*, unsigned int)
''', output)
# test for multiple functions in one stack trace
assert 'one(int)' in output
@@ -2257,6 +2255,23 @@ int main()
assert 'test.o' in head, 'Invalid dependency target'
assert 'test.cpp' in tail and 'test.hpp' in tail, 'Invalid dependencies generated'
+ def test_dependency_file_2(self):
+ self.clear()
+ shutil.copyfile(path_from_root('tests', 'hello_world.c'), 'a.c')
+ Popen([PYTHON, EMCC, 'a.c', '-MMD', '-MF', 'test.d', '-c']).communicate()
+ self.assertContained(open('test.d').read(), 'a.o: a.c\n')
+
+ self.clear()
+ shutil.copyfile(path_from_root('tests', 'hello_world.c'), 'a.c')
+ Popen([PYTHON, EMCC, 'a.c', '-MMD', '-MF', 'test.d', '-c', '-o', 'test.o']).communicate()
+ self.assertContained(open('test.d').read(), 'test.o: a.c\n')
+
+ self.clear()
+ shutil.copyfile(path_from_root('tests', 'hello_world.c'), 'a.c')
+ os.mkdir('obj')
+ Popen([PYTHON, EMCC, 'a.c', '-MMD', '-MF', 'test.d', '-c', '-o', 'obj/test.o']).communicate()
+ self.assertContained(open('test.d').read(), 'obj/test.o: a.c\n')
+
def test_quoted_js_lib_key(self):
open('lib.js', 'w').write(r'''
mergeInto(LibraryManager.library, {
@@ -2278,11 +2293,16 @@ mergeInto(LibraryManager.library, {
def test_default_obj_ext(self):
outdir = os.path.join(self.get_dir(), 'out_dir') + '/'
+
+ self.clear()
os.mkdir(outdir)
- process = Popen([PYTHON, EMCC, '-c', path_from_root('tests', 'hello_world.c'), '-o', outdir], stdout=PIPE, stderr=PIPE)
+ process = Popen([PYTHON, EMCC, '-c', path_from_root('tests', 'hello_world.c'), '-o', outdir])
process.communicate()
assert(os.path.isfile(outdir + 'hello_world.o'))
- process = Popen([PYTHON, EMCC, '-c', path_from_root('tests', 'hello_world.c'), '-o', outdir, '--default-obj-ext', 'obj'], stdout=PIPE, stderr=PIPE)
+
+ self.clear()
+ os.mkdir(outdir)
+ process = Popen([PYTHON, EMCC, '-c', path_from_root('tests', 'hello_world.c'), '-o', outdir, '--default-obj-ext', 'obj'])
process.communicate()
assert(os.path.isfile(outdir + 'hello_world.obj'))
@@ -2362,7 +2382,7 @@ int main() {
assert '*** PCH/Modules Loaded:\nModule: header.h.gch' not in err[1], err[1]
def test_warn_unaligned(self):
- if os.environ.get('EMCC_FAST_COMPILER') != '1': return self.skip('need fastcomp')
+ if os.environ.get('EMCC_FAST_COMPILER') == '0': return self.skip('need fastcomp')
open('src.cpp', 'w').write(r'''
#include <stdio.h>
static const double grid[4][2] = {{-3 / 3., -1 / 3.},
@@ -2382,3 +2402,311 @@ int main() {
assert 'emcc: warning: unaligned store' in output[1]
assert '@line 9 "src.cpp"' in output[1]
+ def test_no_exit_runtime(self):
+ open('code.cpp', 'w').write(r'''
+#include <stdio.h>
+
+template<int x>
+struct Waste {
+ Waste() {
+ printf("coming around %d\n", x);
+ }
+ ~Waste() {
+ printf("going away %d\n", x);
+ }
+};
+
+Waste<1> w1;
+Waste<2> w2;
+Waste<3> w3;
+Waste<4> w4;
+Waste<5> w5;
+
+int main(int argc, char **argv) {
+ return 0;
+}
+''')
+
+ for no_exit in [0, 1]:
+ for opts in [[], ['-O1'], ['-O2', '-g2'], ['-O2', '-g2', '--llvm-lto', '1']]:
+ print no_exit, opts
+ Popen([PYTHON, EMCC] + opts + ['code.cpp', '-s', 'NO_EXIT_RUNTIME=' + str(no_exit)]).communicate()
+ output = run_js(os.path.join(self.get_dir(), 'a.out.js'), stderr=PIPE, full_output=True, engine=NODE_JS)
+ src = open('a.out.js').read()
+ exit = 1-no_exit
+ assert 'coming around' in output
+ assert ('going away' in output) == exit, 'destructors should not run if no exit'
+ assert ('_ZN5WasteILi2EED1Ev' in src) == exit, 'destructors should not appear if no exit'
+ assert ('atexit(' in src) == exit, 'atexit should not appear or be called'
+
+ def test_os_oz(self):
+ if os.environ.get('EMCC_DEBUG'): return self.skip('cannot run in debug mode')
+ try:
+ os.environ['EMCC_DEBUG'] = '1'
+ for args, expect in [
+ (['-O1'], 'LLVM opts: -O1'),
+ (['-O2'], 'LLVM opts: -O3'),
+ (['-Os'], 'LLVM opts: -Os'),
+ (['-Oz'], 'LLVM opts: -Oz'),
+ (['-O3'], 'LLVM opts: -O3'),
+ ]:
+ print args, expect
+ output, err = Popen([PYTHON, EMCC, path_from_root('tests', 'hello_world.cpp')] + args, stdout=PIPE, stderr=PIPE).communicate()
+ self.assertContained(expect, err)
+ self.assertContained('hello, world!', run_js('a.out.js'))
+ finally:
+ del os.environ['EMCC_DEBUG']
+
+ def test_global_inits(self):
+ open('inc.h', 'w').write(r'''
+#include <stdio.h>
+
+template<int x>
+struct Waste {
+ int state;
+ Waste() : state(10) {}
+ void test(int a) {
+ printf("%d\n", a + state);
+ }
+ ~Waste() {
+ printf("going away %d\n", x);
+ }
+};
+
+Waste<3> *getMore();
+
+''')
+ open('main.cpp', 'w').write(r'''
+#include "inc.h"
+
+Waste<1> mw1;
+Waste<2> mw2;
+
+int main(int argc, char **argv) {
+ printf("argc: %d\n", argc);
+ mw1.state += argc;
+ mw2.state += argc;
+ mw1.test(5);
+ mw2.test(6);
+ getMore()->test(0);
+ return 0;
+}
+''')
+
+ open('side.cpp', 'w').write(r'''
+#include "inc.h"
+
+Waste<3> sw3;
+
+Waste<3> *getMore() {
+ return &sw3;
+}
+''')
+
+ for opts, has_global in [
+ (['-O2', '-g'], True),
+ (['-O2', '-g', '-s', 'NO_EXIT_RUNTIME=1'], False), # no-exit-runtime removes the atexits, and then globalgce can work it's magic to remove the global initializer entirely
+ (['-Os', '-g'], True),
+ (['-Os', '-g', '-s', 'NO_EXIT_RUNTIME=1'], False),
+ (['-O2', '-g', '--llvm-lto', '1'], True),
+ (['-O2', '-g', '-s', 'NO_EXIT_RUNTIME=1', '--llvm-lto', '1'], False),
+ ]:
+ print opts, has_global
+ Popen([PYTHON, EMCC, 'main.cpp', '-c'] + opts).communicate()
+ Popen([PYTHON, EMCC, 'side.cpp', '-c'] + opts).communicate()
+ Popen([PYTHON, EMCC, 'main.o', 'side.o'] + opts).communicate()
+ output = run_js(os.path.join(self.get_dir(), 'a.out.js'), stderr=PIPE, full_output=True, engine=NODE_JS)
+ src = open('a.out.js').read()
+ self.assertContained('argc: 1\n16\n17\n10\n', run_js('a.out.js'))
+ assert ('_GLOBAL_' in src) == has_global
+
+ def test_implicit_func(self):
+ open('src.c', 'w').write(r'''
+#include <stdio.h>
+int main()
+{
+ printf("hello %d\n", strnlen("waka", 2)); // Implicit declaration, no header, for strnlen
+ int (*my_strnlen)(char*, ...) = strnlen;
+ printf("hello %d\n", my_strnlen("shaka", 2));
+ return 0;
+}
+''')
+
+ IMPLICIT_WARNING = '''warning: implicit declaration of function 'strnlen' is invalid in C99'''
+ IMPLICIT_ERROR = '''error: implicit declaration of function 'strnlen' is invalid in C99'''
+
+ for opts, expected, compile_expected in [
+ ([], None, [IMPLICIT_ERROR]),
+ (['-Wno-error=implicit-function-declaration'], ['hello '], [IMPLICIT_WARNING]), # turn error into warning
+ (['-Wno-implicit-function-declaration'], ['hello '], []), # turn error into nothing at all (runtime output is incorrect)
+ ]:
+ print opts, expected
+ try_delete('a.out.js')
+ stdout, stderr = Popen([PYTHON, EMCC, 'src.c'] + opts, stderr=PIPE).communicate()
+ for ce in compile_expected + ['''warning: incompatible pointer types''']:
+ self.assertContained(ce, stderr)
+ if expected is None:
+ assert not os.path.exists('a.out.js')
+ else:
+ output = run_js(os.path.join(self.get_dir(), 'a.out.js'), stderr=PIPE, full_output=True)
+ for e in expected:
+ self.assertContained(e, output)
+
+ def test_incorrect_static_call(self):
+ for opts in [0, 1]:
+ for asserts in [0, 1]:
+ extra = []
+ if opts != 1-asserts: extra = ['-s', 'ASSERTIONS=' + str(asserts)]
+ cmd = [PYTHON, EMCC, path_from_root('tests', 'cases', 'sillyfuncast2_noasm.ll'), '-O' + str(opts)] + extra
+ print cmd
+ stdout, stderr = Popen(cmd, stderr=PIPE).communicate()
+ assert ('''unexpected number of arguments 3 in call to 'doit', should be 2''' in stderr) == asserts, stderr
+ assert ('''unexpected return type i32 in call to 'doit', should be void''' in stderr) == asserts, stderr
+ assert ('''unexpected argument type float at index 1 in call to 'doit', should be i32''' in stderr) == asserts, stderr
+
+ def test_llvm_lit(self):
+ llvm_src = LLVM_ROOT
+ while not os.path.exists(os.path.join(llvm_src, 'emscripten-version.txt')): llvm_src = os.path.dirname(llvm_src)
+ cmd = [os.path.join(LLVM_ROOT, 'llvm-lit'), '-v', os.path.join(llvm_src, 'test', 'CodeGen', 'JS')]
+ print cmd
+ p = Popen(cmd)
+ p.communicate()
+ assert p.returncode == 0, 'LLVM tests must pass with exit code 0'
+
+ def test_odin_validation(self):
+ if not SPIDERMONKEY_ENGINE or SPIDERMONKEY_ENGINE not in JS_ENGINES: return self.skip('this test tests asm.js validation in SpiderMonkey')
+ Popen([PYTHON, EMCC, path_from_root('tests', 'hello_world.c'), '-O1'], stdout=PIPE, stderr=PIPE).communicate()
+ output = run_js('a.out.js', stderr=PIPE, full_output=True, engine=SPIDERMONKEY_ENGINE)
+ assert 'asm.js' in output, 'spidermonkey should mention asm.js compilation: ' + output
+
+ def test_bad_triple(self):
+ Popen([CLANG, path_from_root('tests', 'hello_world.c'), '-c', '-emit-llvm', '-o', 'a.bc'] + get_clang_native_args(), stdout=PIPE, stderr=PIPE).communicate()
+ out, err = Popen([PYTHON, EMCC, 'a.bc'], stdout=PIPE, stderr=PIPE).communicate()
+ assert 'warning' in err, err
+ assert 'incorrect target triple' in err, err
+
+ def test_valid_abspath(self):
+ # Test whether abspath warning appears
+ abs_include_path = path_from_root('tests')
+ process = Popen([PYTHON, EMCC, '-I%s' % abs_include_path, path_from_root('tests', 'hello_world.c')], stdout=PIPE, stderr=PIPE)
+ out, err = process.communicate()
+ warning = '-I or -L of an absolute path "-I%s" encountered. If this is to a local system header/library, it may cause problems (local system files make sense for compiling natively on your system, but not necessarily to JavaScript). Pass \'-Wno-warn-absolute-paths\' to emcc to hide this warning.' % abs_include_path
+ assert(warning in err)
+
+ # Hide warning for this include path
+ process = Popen([PYTHON, EMCC, '--valid-abspath', abs_include_path,'-I%s' % abs_include_path, path_from_root('tests', 'hello_world.c')], stdout=PIPE, stderr=PIPE)
+ out, err = process.communicate()
+ assert(warning not in err)
+
+ def test_simplify_ifs(self):
+ def test(src, nums):
+ open('src.c', 'w').write(src)
+ for opts, ifs in [
+ [['-g2'], nums[0]],
+ [['-profiling'], nums[1]],
+ [['-profiling', '-g2'], nums[2]]
+ ]:
+ print opts, ifs
+ try_delete('a.out.js')
+ Popen([PYTHON, EMCC, 'src.c', '-O2'] + opts, stdout=PIPE).communicate()
+ src = open('a.out.js').read()
+ main = src[src.find('function _main'):src.find('\n}', src.find('function _main'))]
+ actual_ifs = main.count('if (')
+ assert ifs == actual_ifs, main + ' : ' + str([ifs, actual_ifs])
+ #print main
+
+ test(r'''
+ #include <stdio.h>
+ #include <string.h>
+ int main(int argc, char **argv) {
+ if (argc > 5 && strlen(argv[0]) > 1 && strlen(argv[1]) > 2) printf("halp");
+ return 0;
+ }
+ ''', [3, 1, 1])
+
+ test(r'''
+ #include <stdio.h>
+ #include <string.h>
+ int main(int argc, char **argv) {
+ while (argc % 3 == 0) {
+ if (argc > 5 && strlen(argv[0]) > 1 && strlen(argv[1]) > 2) {
+ printf("halp");
+ argc++;
+ } else {
+ while (argc > 0) {
+ printf("%d\n", argc--);
+ }
+ }
+ }
+ return 0;
+ }
+ ''', [8, 5, 5])
+
+ test(r'''
+ #include <stdio.h>
+ #include <string.h>
+ int main(int argc, char **argv) {
+ while (argc % 17 == 0) argc *= 2;
+ if (argc > 5 && strlen(argv[0]) > 10 && strlen(argv[1]) > 20) {
+ printf("halp");
+ argc++;
+ } else {
+ printf("%d\n", argc--);
+ }
+ while (argc % 17 == 0) argc *= 2;
+ return argc;
+ }
+ ''', [6, 3, 3])
+
+ test(r'''
+ #include <stdio.h>
+ #include <stdlib.h>
+
+ int main(int argc, char *argv[]) {
+ if (getenv("A") && getenv("B")) {
+ printf("hello world\n");
+ } else {
+ printf("goodnight moon\n");
+ }
+ printf("and that's that\n");
+ return 0;
+ }
+ ''', [3, 1, 1])
+
+ test(r'''
+ #include <stdio.h>
+ #include <stdlib.h>
+
+ int main(int argc, char *argv[]) {
+ if (getenv("A") || getenv("B")) {
+ printf("hello world\n");
+ }
+ printf("and that's that\n");
+ return 0;
+ }
+ ''', [3, 1, 1])
+
+ def test_symbol_map(self):
+ for m in [0, 1]:
+ self.clear()
+ cmd = [PYTHON, EMCC, path_from_root('tests', 'hello_world.c'), '-O2']
+ if m: cmd += ['--emit-symbol-map']
+ print cmd
+ stdout, stderr = Popen(cmd, stderr=PIPE).communicate()
+ assert ('''wrote symbol map file''' in stderr) == m, stderr
+ assert (os.path.exists('a.out.js.symbols') == m), stderr
+ if m:
+ symbols = open('a.out.js.symbols').read()
+ assert ':_main' in symbols
+
+ def test_bc_to_bc(self):
+ # emcc should 'process' bitcode to bitcode. build systems can request this if
+ # e.g. they assume our 'executable' extension is bc, and compile an .o to a .bc
+ # (the user would then need to build bc to js of course, but we need to actually
+ # emit the bc)
+ cmd = Popen([PYTHON, EMCC, '-c', path_from_root('tests', 'hello_world.c')]).communicate()
+ assert os.path.exists('hello_world.o')
+ cmd = Popen([PYTHON, EMCC, 'hello_world.o', '-o', 'hello_world.bc']).communicate()
+ assert os.path.exists('hello_world.o')
+ assert os.path.exists('hello_world.bc')
+
diff --git a/tests/test_sanity.py b/tests/test_sanity.py
index 894f2192..3d3da523 100644
--- a/tests/test_sanity.py
+++ b/tests/test_sanity.py
@@ -15,6 +15,8 @@ def wipe():
def mtime(filename):
return os.stat(filename).st_mtime
+SANITY_MESSAGE = 'Emscripten: Running sanity checks'
+
class sanity(RunnerCore):
@classmethod
def setUpClass(self):
@@ -196,9 +198,10 @@ class sanity(RunnerCore):
del os.environ['EM_IGNORE_SANITY']
def test_llvm_fastcomp(self):
- if os.environ.get('EMCC_FAST_COMPILER') != '1': return self.skip('not using fastcomp')
+ assert os.environ.get('EMCC_FAST_COMPILER') != '0', 'must be using fastcomp to test fastcomp'
WARNING = 'fastcomp in use, but LLVM has not been built with the JavaScript backend as a target'
+ WARNING2 = 'you can fall back to the older (pre-fastcomp) compiler core, although that is not recommended, see https://github.com/kripken/emscripten/wiki/LLVM-Backend'
restore()
@@ -206,22 +209,64 @@ class sanity(RunnerCore):
assert check_fastcomp()
output = self.check_working(EMCC)
assert WARNING not in output, output
+ assert WARNING2 not in output, output
# Fake incorrect llc output, no mention of js backend
restore()
f = open(CONFIG_FILE, 'a')
- f.write('LLVM_ROOT = "' + path_from_root('tests', 'fake') + '"')
+ f.write('LLVM_ROOT = "' + path_from_root('tests', 'fake', 'bin') + '"')
f.close()
+ #print '1', open(CONFIG_FILE).read()
- if not os.path.exists(path_from_root('tests', 'fake')):
- os.makedirs(path_from_root('tests', 'fake'))
+ try_delete(path_from_root('tests', 'fake'))
+ os.makedirs(path_from_root('tests', 'fake', 'bin'))
- f = open(path_from_root('tests', 'fake', 'llc'), 'w')
+ f = open(path_from_root('tests', 'fake', 'bin', 'llc'), 'w')
f.write('#!/bin/sh\n')
f.write('echo "llc fake output\nRegistered Targets:\nno j-s backend for you!"')
f.close()
- os.chmod(path_from_root('tests', 'fake', 'llc'), stat.S_IREAD | stat.S_IWRITE | stat.S_IEXEC)
+ os.chmod(path_from_root('tests', 'fake', 'bin', 'llc'), stat.S_IREAD | stat.S_IWRITE | stat.S_IEXEC)
output = self.check_working(EMCC, WARNING)
+ output = self.check_working(EMCC, WARNING2)
+
+ # fake some more
+ for fake in ['llvm-link', 'clang', 'clang++', 'llvm-ar', 'opt', 'llvm-as', 'llvm-dis', 'llvm-nm', 'lli']:
+ open(path_from_root('tests', 'fake', 'bin', fake), 'w').write('.')
+ try_delete(SANITY_FILE)
+ output = self.check_working(EMCC, WARNING)
+ # make sure sanity checks notice there is no source dir with version #
+ open(path_from_root('tests', 'fake', 'bin', 'llc'), 'w').write('#!/bin/sh\necho "Registered Targets: there IZ a js backend: JavaScript (asm.js, emscripten) backend"')
+ open(path_from_root('tests', 'fake', 'bin', 'clang++'), 'w').write('#!/bin/sh\necho "clang version %s (blah blah)" >&2\necho "..." >&2\n' % '.'.join(map(str, EXPECTED_LLVM_VERSION)))
+ os.chmod(path_from_root('tests', 'fake', 'bin', 'llc'), stat.S_IREAD | stat.S_IWRITE | stat.S_IEXEC)
+ os.chmod(path_from_root('tests', 'fake', 'bin', 'clang++'), stat.S_IREAD | stat.S_IWRITE | stat.S_IEXEC)
+ try_delete(SANITY_FILE)
+ output = self.check_working(EMCC, 'did not see a source tree above LLVM_DIR, could not verify version numbers match')
+
+ VERSION_WARNING = 'Emscripten, llvm and clang versions do not match, this is dangerous'
+
+ # add version number
+ open(path_from_root('tests', 'fake', 'emscripten-version.txt'), 'w').write('waka')
+ try_delete(SANITY_FILE)
+ output = self.check_working(EMCC, VERSION_WARNING)
+
+ os.makedirs(path_from_root('tests', 'fake', 'tools', 'clang'))
+
+ open(path_from_root('tests', 'fake', 'tools', 'clang', 'emscripten-version.txt'), 'w').write(EMSCRIPTEN_VERSION)
+ try_delete(SANITY_FILE)
+ output = self.check_working(EMCC, VERSION_WARNING)
+
+ open(path_from_root('tests', 'fake', 'emscripten-version.txt'), 'w').write(EMSCRIPTEN_VERSION)
+ try_delete(SANITY_FILE)
+ output = self.check_working(EMCC)
+ assert VERSION_WARNING not in output
+
+ open(path_from_root('tests', 'fake', 'tools', 'clang', 'emscripten-version.txt'), 'w').write('waka')
+ try_delete(SANITY_FILE)
+ output = self.check_working(EMCC, VERSION_WARNING)
+
+ restore()
+
+ self.check_working([EMCC, 'tests/hello_world.cpp', '-s', 'INIT_HEAP=1'], '''Compiler settings are incompatible with fastcomp. You can fall back to the older compiler core, although that is not recommended, see https://github.com/kripken/emscripten/wiki/LLVM-Backend''')
def test_node(self):
NODE_WARNING = 'node version appears too old'
@@ -272,7 +317,6 @@ fi
del os.environ['EM_IGNORE_SANITY']
def test_emcc(self):
- SANITY_MESSAGE = 'Emscripten: Running sanity checks'
SANITY_FAIL_MESSAGE = 'sanity check failed to run'
# emcc should check sanity if no ${EM_CONFIG}_sanity
@@ -311,6 +355,10 @@ fi
output = self.check_working(EMCC)
self.assertNotContained(SANITY_MESSAGE, output)
+ # also with -v, with or without inputs
+ output = self.check_working([EMCC, '-v'], SANITY_MESSAGE)
+ output = self.check_working([EMCC, '-v', path_from_root('tests', 'hello_world.c')], SANITY_MESSAGE)
+
# Make sure the test runner didn't do anything to the setup
output = self.check_working(EMCC)
self.assertNotContained(SANITY_MESSAGE, output)
@@ -429,6 +477,7 @@ fi
output = self.do([PYTHON, EMCC, '--clear-cache'])
assert ERASING_MESSAGE in output
assert not os.path.exists(EMCC_CACHE)
+ assert SANITY_MESSAGE in output
# Changing LLVM_ROOT, even without altering .emscripten, clears the cache
ensure_cache()
@@ -446,111 +495,34 @@ fi
try_delete(CANONICAL_TEMP_DIR)
def test_relooper(self):
- RELOOPER = Cache.get_path('relooper.js')
-
- restore()
- for phase in range(2): # 0: we wipe the relooper dir. 1: we have it, so should just update
- if phase == 0: Cache.erase()
- try_delete(RELOOPER)
-
- for i in range(4):
- print >> sys.stderr, phase, i
- opt = min(i, 2)
- try_delete('a.out.js')
- output = Popen([PYTHON, EMCC, path_from_root('tests', 'hello_world_loop.cpp'), '-O' + str(opt), '-g'],
- stdout=PIPE, stderr=PIPE).communicate()
- self.assertContained('hello, world!', run_js('a.out.js'))
- output = '\n'.join(output)
- assert ('bootstrapping relooper succeeded' in output) == (i == 1), 'only bootstrap on first O2: ' + output
- assert os.path.exists(RELOOPER) == (i >= 1), 'have relooper on O2: ' + output
- src = open('a.out.js').read()
- main = src.split('function _main()')[1].split('\n}\n')[0]
- assert ('while (1) {' in main or 'while(1){' in main or 'while(1) {' in main or '} while ($' in main or '}while($' in main) == (i >= 1), 'reloop code on O2: ' + main
- assert ('switch' not in main) == (i >= 1), 'reloop code on O2: ' + main
-
- def test_jcache(self):
- PRE_LOAD_MSG = 'loading pre from jcache'
- PRE_SAVE_MSG = 'saving pre to jcache'
- FUNC_CHUNKS_LOAD_MSG = ' funcchunks from jcache'
- FUNC_CHUNKS_SAVE_MSG = ' funcchunks to jcache'
- JSFUNC_CHUNKS_LOAD_MSG = 'jsfuncchunks from jcache'
- JSFUNC_CHUNKS_SAVE_MSG = 'jsfuncchunks to jcache'
-
- restore()
- Cache.erase()
+ assert os.environ.get('EMCC_FAST_COMPILER') is None
try:
- os.environ['EMCC_DEBUG'] = '1'
- os.environ['EMCC_JSOPT_MIN_CHUNK_SIZE'] = str(1024*512)
-
- self.working_dir = os.path.join(TEMP_DIR, 'emscripten_temp')
- if not os.path.exists(self.working_dir): os.makedirs(self.working_dir)
-
- assert not os.path.exists(JCache.get_cachename('emscript_files'))
-
- srcs = {}
- used_jcache = False
-
- for args, input_file, expect_pre_save, expect_pre_load, expect_funcs_save, expect_funcs_load, expect_jsfuncs_save, expect_jsfuncs_load, expected in [
- ([], 'hello_world_loop.cpp', False, False, False, False, False, False, []),
- (['--jcache'], 'hello_world_loop.cpp', True, False, True, False, True, False, []),
- (['--jcache'], 'hello_world_loop.cpp', False, True, False, True, False, True, []),
- ([], 'hello_world_loop.cpp', False, False, False, False, False, False, []),
- # new
- ([], 'hello_world.cpp', False, False, False, False, False, False, []),
- (['--jcache'], 'hello_world.cpp', True, False, True, False, True, False, []),
- (['--jcache'], 'hello_world.cpp', False, True, False, True, False, True, []),
- ([], 'hello_world.cpp', False, False, False, False, False, False, []),
- # go back to old file, experience caching
- (['--jcache'], 'hello_world_loop.cpp', False, True, False, True, False, True, []),
- # new, large file
- ([], 'hello_malloc.cpp', False, False, False, False, False, False, []),
- (['--jcache'], 'hello_malloc.cpp', True, False, True, False, True, False, []),
- (['--jcache'], 'hello_malloc.cpp', False, True, False, True, False, True, []),
- ([], 'hello_malloc.cpp', False, False, False, False, False, False, []),
- # new, huge file
- ([], 'hello_libcxx.cpp', False, False, False, False, False, False, ('4 chunks',)),
- (['--jcache'], 'hello_libcxx.cpp', True, False, True, False, True, False, []),
- (['--jcache'], 'hello_libcxx.cpp', False, True, False, True, False, True, []),
- ([], 'hello_libcxx.cpp', False, False, False, False, False, False, []),
- # finally, build a file close to the previous, to see that some chunks are found in the cache and some not
- (['--jcache'], 'hello_libcxx_mod1.cpp', False, True, True, True, True, True, []), # win on pre, mix on funcs, mix on jsfuncs
- (['--jcache'], 'hello_libcxx_mod1.cpp', False, True, False, True, False, True, []),
- (None, None, None, None, None, None, None, None, None), # clear
- (['--jcache'], 'hello_libcxx_mod2.cpp', True, False, True, False, True, False, []), # load into cache
- (['--jcache'], 'hello_libcxx_mod2a.cpp', False, True, True, True, True, True, []) # add a printf, do not lose everything
- ]:
- self.clear()
- if args is None:
- Cache.erase()
- continue
-
- print >> sys.stderr, args, input_file, expect_pre_save, expect_pre_load, expect_funcs_save, expect_funcs_load, expect_jsfuncs_save, expect_jsfuncs_load, expected
-
- out, err = Popen([PYTHON, EMCC, '-O2', '-g', path_from_root('tests', input_file)] + args, stdout=PIPE, stderr=PIPE).communicate()
- errtail = err.split('emcc invocation')[-1]
- self.assertContained('hello, world!', run_js('a.out.js'), errtail)
- assert (PRE_SAVE_MSG in err) == expect_pre_save, errtail
- assert (PRE_LOAD_MSG in err) == expect_pre_load, errtail
- assert (FUNC_CHUNKS_SAVE_MSG in err) == expect_funcs_save, errtail
- assert (FUNC_CHUNKS_LOAD_MSG in err) == expect_funcs_load, errtail
- assert (JSFUNC_CHUNKS_SAVE_MSG in err) == expect_jsfuncs_save, errtail
- assert (JSFUNC_CHUNKS_LOAD_MSG in err) == expect_jsfuncs_load, errtail
- for expect in expected: assert expect in err, expect + ' ? ' + errtail
- curr = open('a.out.js').read()
- if input_file not in srcs:
- srcs[input_file] = curr
- else:
- #open('/home/alon/Dev/emscripten/a', 'w').write(srcs[input_file])
- #open('/home/alon/Dev/emscripten/b', 'w').write(curr)
- assert abs(len(curr)/float(len(srcs[input_file]))-1)<0.01, 'contents may shift in order, but must remain the same size %d vs %d' % (len(curr), len(srcs[input_file])) + '\n' + errtail
- used_jcache = used_jcache or ('--jcache' in args)
- assert used_jcache == os.path.exists(JCache.get_cachename('emscript_files'))
- #print >> sys.stderr, errtail
+ os.environ['EMCC_FAST_COMPILER'] = '0'
+ RELOOPER = Cache.get_path('relooper.js')
+
+ restore()
+ for phase in range(2): # 0: we wipe the relooper dir. 1: we have it, so should just update
+ if phase == 0: Cache.erase()
+ try_delete(RELOOPER)
+
+ for i in range(4):
+ print >> sys.stderr, phase, i
+ opt = min(i, 2)
+ try_delete('a.out.js')
+ output = Popen([PYTHON, EMCC, path_from_root('tests', 'hello_world_loop.cpp'), '-O' + str(opt), '-g'],
+ stdout=PIPE, stderr=PIPE).communicate()
+ self.assertContained('hello, world!', run_js('a.out.js'))
+ output = '\n'.join(output)
+ assert ('bootstrapping relooper succeeded' in output) == (i == 1), 'only bootstrap on first O2: ' + output
+ assert os.path.exists(RELOOPER) == (i >= 1), 'have relooper on O2: ' + output
+ src = open('a.out.js').read()
+ main = src.split('function _main()')[1].split('\n}\n')[0]
+ assert ('while (1) {' in main or 'while(1){' in main or 'while(1) {' in main or '} while ($' in main or '}while($' in main) == (i >= 1), 'reloop code on O2: ' + main
+ assert ('switch' not in main) == (i >= 1), 'reloop code on O2: ' + main
finally:
- del os.environ['EMCC_DEBUG']
- del os.environ['EMCC_JSOPT_MIN_CHUNK_SIZE']
+ del os.environ['EMCC_FAST_COMPILER']
def test_nostdincxx(self):
restore()
@@ -559,7 +531,7 @@ fi
try:
old = os.environ.get('EMCC_LLVM_TARGET') or ''
for compiler in [EMCC, EMXX]:
- for target in ['i386-pc-linux-gnu', 'le32-unknown-nacl']:
+ for target in ['i386-pc-linux-gnu', 'asmjs-unknown-emscripten']:
print compiler, target
os.environ['EMCC_LLVM_TARGET'] = target
out, err = Popen([PYTHON, EMCC, path_from_root('tests', 'hello_world.cpp'), '-v'], stdout=PIPE, stderr=PIPE).communicate()
diff --git a/tests/test_sockets.py b/tests/test_sockets.py
index 3a5555ed..8c2889df 100644
--- a/tests/test_sockets.py
+++ b/tests/test_sockets.py
@@ -345,12 +345,12 @@ class sockets(BrowserCore):
host_outfile = 'host.html'
peer_outfile = 'peer.html'
- host_filepath = path_from_root('tests', 'sockets', host_src)
+ host_filepath = path_from_root('tests', 'sockets', host_src)
temp_host_filepath = os.path.join(self.get_dir(), os.path.basename(host_src))
with open(host_filepath) as f: host_src = f.read()
with open(temp_host_filepath, 'w') as f: f.write(self.with_report_result(host_src))
- peer_filepath = path_from_root('tests', 'sockets', peer_src)
+ peer_filepath = path_from_root('tests', 'sockets', peer_src)
temp_peer_filepath = os.path.join(self.get_dir(), os.path.basename(peer_src))
with open(peer_filepath) as f: peer_src = f.read()
with open(temp_peer_filepath, 'w') as f: f.write(self.with_report_result(peer_src))
@@ -358,7 +358,7 @@ class sockets(BrowserCore):
open(os.path.join(self.get_dir(), 'host_pre.js'), 'w').write('''
var Module = {
webrtc: {
- broker: 'https://mdsw.ch:8080',
+ broker: 'http://localhost:8080',
session: undefined,
onpeer: function(peer, route) {
window.open('http://localhost:8888/peer.html?' + route);
@@ -382,7 +382,7 @@ class sockets(BrowserCore):
open(os.path.join(self.get_dir(), 'peer_pre.js'), 'w').write('''
var Module = {
webrtc: {
- broker: 'https://mdsw.ch:8080',
+ broker: 'http://localhost:8080',
session: window.location.toString().split('?')[1],
onpeer: function(peer, route) {
peer.connect(Module['webrtc']['session']);
@@ -403,9 +403,15 @@ class sockets(BrowserCore):
Popen([PYTHON, EMCC, temp_host_filepath, '-o', host_outfile] + ['-s', 'GL_TESTING=1', '--pre-js', 'host_pre.js', '-s', 'SOCKET_WEBRTC=1', '-s', 'SOCKET_DEBUG=1']).communicate()
Popen([PYTHON, EMCC, temp_peer_filepath, '-o', peer_outfile] + ['-s', 'GL_TESTING=1', '--pre-js', 'peer_pre.js', '-s', 'SOCKET_WEBRTC=1', '-s', 'SOCKET_DEBUG=1']).communicate()
+ # note: you may need to run this manually yourself, if npm is not in the path, or if you need a version that is not in the path
+ Popen(['npm', 'install', path_from_root('tests', 'sockets', 'p2p')]).communicate()
+ broker = Popen(listify(NODE_JS) + [path_from_root('tests', 'sockets', 'p2p', 'broker', 'p2p-broker.js')])
+
expected = '1'
self.run_browser(host_outfile, '.', ['/report_result?' + e for e in expected])
+ broker.kill();
+
def test_nodejs_sockets_echo(self):
# This test checks that sockets work when the client code is run in Node.js
# Run with ./runner.py sockets.test_nodejs_sockets_echo
@@ -414,21 +420,54 @@ class sockets(BrowserCore):
sockets_include = '-I'+path_from_root('tests', 'sockets')
- # Websockify-proxied servers can't run dgram tests
harnesses = [
- # Websockify doesn't seem to like ws.WebSocket clients TODO check if this is a ws issue or Websockify issue
- #(WebsockifyServerHarness(os.path.join('sockets', 'test_sockets_echo_server.c'), [sockets_include], 49160), 0),
- (CompiledServerHarness(os.path.join('sockets', 'test_sockets_echo_server.c'), [sockets_include, '-DTEST_DGRAM=0'], 49161), 0),
- (CompiledServerHarness(os.path.join('sockets', 'test_sockets_echo_server.c'), [sockets_include, '-DTEST_DGRAM=1'], 49162), 1)
+ (WebsockifyServerHarness(os.path.join('sockets', 'test_sockets_echo_server.c'), [sockets_include], 59160), 0),
+ (CompiledServerHarness(os.path.join('sockets', 'test_sockets_echo_server.c'), [sockets_include, '-DTEST_DGRAM=0'], 59162), 0),
+ (CompiledServerHarness(os.path.join('sockets', 'test_sockets_echo_server.c'), [sockets_include, '-DTEST_DGRAM=1'], 59164), 1)
]
+ # Basic test of node client against both a Websockified and compiled echo server.
for harness, datagram in harnesses:
with harness:
- Popen([PYTHON, EMCC, path_from_root('tests', 'sockets', 'test_sockets_echo_client.c'), '-o', path_from_root('tests', 'sockets', 'client.js'), '-DSOCKK=%d' % harness.listen_port, '-DREPORT_RESULT=int dummy'], stdout=PIPE, stderr=PIPE).communicate()
+ Popen([PYTHON, EMCC, path_from_root('tests', 'sockets', 'test_sockets_echo_client.c'), '-o', 'client.js', '-DSOCKK=%d' % harness.listen_port, '-DTEST_DGRAM=%d' % datagram, '-DREPORT_RESULT=int dummy'], stdout=PIPE, stderr=PIPE).communicate()
+
+ out = run_js('client.js', engine=NODE_JS, full_output=True)
+ self.assertContained('do_msg_read: read 14 bytes', out)
+
+ # Test against a Websockified server with compile time configured WebSocket subprotocol. We use a Websockified
+ # server because as long as the subprotocol list contains binary it will configure itself to accept binary
+ # This test also checks that the connect url contains the correct subprotocols.
+ print "\nTesting compile time WebSocket configuration.\n"
+ for harness in [
+ WebsockifyServerHarness(os.path.join('sockets', 'test_sockets_echo_server.c'), [sockets_include], 59166)
+ ]:
+ with harness:
+ Popen([PYTHON, EMCC, path_from_root('tests', 'sockets', 'test_sockets_echo_client.c'), '-o', 'client.js', '-s', 'SOCKET_DEBUG=1', '-s', 'WEBSOCKET_SUBPROTOCOL="base64, binary"', '-DSOCKK=59166', '-DREPORT_RESULT=int dummy'], stdout=PIPE, stderr=PIPE).communicate()
+
+ out = run_js('client.js', engine=NODE_JS, full_output=True)
+ self.assertContained('do_msg_read: read 14 bytes', out)
+ self.assertContained('connect: ws://127.0.0.1:59166, base64,binary', out)
+
+ # Test against a Websockified server with runtime WebSocket configuration. We specify both url and subprotocol.
+ # In this test we have *deliberately* used the wrong port '-DSOCKK=12345' to configure the echo_client.c, so
+ # the connection would fail without us specifying a valid WebSocket URL in the configuration.
+ print "\nTesting runtime WebSocket configuration.\n"
+ for harness in [
+ WebsockifyServerHarness(os.path.join('sockets', 'test_sockets_echo_server.c'), [sockets_include], 59168)
+ ]:
+ with harness:
+ open(os.path.join(self.get_dir(), 'websocket_pre.js'), 'w').write('''
+ var Module = {
+ websocket: {
+ url: 'ws://localhost:59168/testA/testB',
+ subprotocol: 'text, base64, binary',
+ }
+ };
+ ''')
- self.assertContained('do_msg_read: read 14 bytes', run_js(path_from_root('tests', 'sockets', 'client.js'), engine=NODE_JS))
+ Popen([PYTHON, EMCC, path_from_root('tests', 'sockets', 'test_sockets_echo_client.c'), '-o', 'client.js', '--pre-js', 'websocket_pre.js', '-s', 'SOCKET_DEBUG=1', '-DSOCKK=12345', '-DREPORT_RESULT=int dummy'], stdout=PIPE, stderr=PIPE).communicate()
- # Tidy up files that might have been created by this test.
- try_delete(path_from_root('tests', 'sockets', 'client.js'))
- try_delete(path_from_root('tests', 'sockets', 'client.js.map'))
+ out = run_js('client.js', engine=NODE_JS, full_output=True)
+ self.assertContained('do_msg_read: read 14 bytes', out)
+ self.assertContained('connect: ws://localhost:59168/testA/testB, text,base64,binary', out)
diff --git a/tests/tex_nonbyte.c b/tests/tex_nonbyte.c
index 960d0efb..ffeb9f24 100644
--- a/tests/tex_nonbyte.c
+++ b/tests/tex_nonbyte.c
@@ -22,7 +22,7 @@ RESULTING FROM THE USE, MODIFICATION, OR
REDISTRIBUTION OF THIS SOFTWARE.
*/
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
#define USE_GLEW 1
#endif
@@ -118,7 +118,7 @@ int main(int argc, char *argv[])
glClearColor( 0, 0, 0, 0 );
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
glEnable( GL_TEXTURE_2D ); // Need this to display a texture XXX unnecessary in OpenGL ES 2.0/WebGL
#endif
@@ -192,7 +192,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
// Wait for 3 seconds to give us a chance to see the image
SDL_Delay(3000);
#endif
diff --git a/tests/unistd/unlink.c b/tests/unistd/unlink.c
index 9f532325..a15baab8 100644
--- a/tests/unistd/unlink.c
+++ b/tests/unistd/unlink.c
@@ -7,7 +7,7 @@
#include <string.h>
#include <unistd.h>
#include <sys/stat.h>
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
#include <emscripten.h>
#endif
@@ -23,7 +23,7 @@ static void create_file(const char *path, const char *buffer, int mode) {
void setup() {
mkdir("working", 0777);
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
EM_ASM(
#if NODEFS
FS.mount(NODEFS, { root: '.' }, 'working');
diff --git a/tests/uuid/test.c b/tests/uuid/test.c
index dc2c6589..f5f84011 100644
--- a/tests/uuid/test.c
+++ b/tests/uuid/test.c
@@ -59,7 +59,7 @@ int main() {
// The following lets the browser test exit cleanly.
int result = 1;
- #if EMSCRIPTEN
+ #if defined(__EMSCRIPTEN__)
#ifdef REPORT_RESULT
REPORT_RESULT();
#endif
diff --git a/tests/webidl/output.txt b/tests/webidl/output.txt
new file mode 100644
index 00000000..b874d928
--- /dev/null
+++ b/tests/webidl/output.txt
@@ -0,0 +1,56 @@
+Parent:42
+*
+84
+c1
+Parent:7
+Child1:7
+7
+14
+196
+588
+14
+28
+c1 v2
+Parent:16
+Child1:15
+15
+30
+900
+2700
+c2
+Parent:9
+Child2:9
+9
+18
+5832
+0
+0
+1
+*static*
+*virtualf*
+*virtualf*
+*virtualf2*
+Parent:9
+Child2:9
+*js virtualf replacement*
+*js virtualf replacement*
+*js virtualf2 replacement*
+*js virtualf3 replacement 123*
+caught: a JSImplementation must implement all functions, you forgot Child2JS::virtualFunc4.
+*virtualf*
+*virtualf*
+*virtualf2*
+*ok*
+|hello|43|world|41|
+12.35
+10
+object
+10
+11
+object
+10
+11
+21.12
+198
+
+done.
diff --git a/tests/webidl/post.js b/tests/webidl/post.js
new file mode 100644
index 00000000..444efcd1
--- /dev/null
+++ b/tests/webidl/post.js
@@ -0,0 +1,117 @@
+
+// Part 1
+
+var sme = new Module.Parent(42);
+sme.mulVal(2);
+Module.print('*')
+Module.print(sme.getVal());
+
+Module.print('c1');
+
+var c1 = new Module.Child1();
+Module.print(c1.getVal());
+c1.mulVal(2);
+Module.print(c1.getVal());
+Module.print(c1.getValSqr());
+Module.print(c1.getValSqr(3));
+Module.print(c1.getValTimes()); // default argument should be 1
+Module.print(c1.getValTimes(2));
+
+Module.print('c1 v2');
+
+c1 = new Module.Child1(8); // now with a parameter, we should handle the overloading automatically and properly and use constructor #2
+Module.print(c1.getVal());
+c1.mulVal(2);
+Module.print(c1.getVal());
+Module.print(c1.getValSqr());
+Module.print(c1.getValSqr(3));
+
+Module.print('c2')
+
+var c2 = new Module.Child2();
+Module.print(c2.getVal());
+c2.mulVal(2);
+Module.print(c2.getVal());
+Module.print(c2.getValCube());
+var succeeded;
+try {
+ succeeded = 0;
+ Module.print(c2.doSomethingSecret()); // should fail since private
+ succeeded = 1;
+} catch(e) {}
+Module.print(succeeded);
+try {
+ succeeded = 0;
+ Module.print(c2.getValSqr()); // function from the other class
+ succeeded = 1;
+} catch(e) {}
+Module.print(succeeded);
+try {
+ succeeded = 0;
+ c2.getValCube(); // sanity
+ succeeded = 1;
+} catch(e) {}
+Module.print(succeeded);
+
+Module.Child2.prototype.printStatic(); // static calls go through the prototype
+
+// virtual function
+c2.virtualFunc();
+Module.Child2.prototype.runVirtualFunc(c2);
+c2.virtualFunc2();
+
+// extend a class from JS
+var c3 = new Module.Child2JS;
+
+c3.virtualFunc = function() {
+ Module.print('*js virtualf replacement*');
+};
+c3.virtualFunc2 = function() {
+ Module.print('*js virtualf2 replacement*');
+};
+c3.virtualFunc3 = function(x) {
+ Module.print('*js virtualf3 replacement ' + x + '*');
+};
+
+c3.virtualFunc();
+Module.Child2.prototype.runVirtualFunc(c3);
+c3.virtualFunc2();
+c3.virtualFunc3(123); // this one is not replaced!
+try {
+ c3.virtualFunc4(123);
+} catch(e) {
+ Module.print('caught: ' + e);
+}
+
+c2.virtualFunc(); // original should remain the same
+Module.Child2.prototype.runVirtualFunc(c2);
+c2.virtualFunc2();
+Module.print('*ok*');
+
+// Part 2
+
+var suser = new Module.StringUser("hello", 43);
+suser.Print(41, "world");
+suser.PrintFloat(12.3456);
+
+var bv = new Module.RefUser(10);
+var bv2 = new Module.RefUser(11);
+Module.print(bv2.getValue(bv));
+
+Module.print(typeof bv2.getMe());
+Module.print(bv2.getMe().getValue(bv));
+Module.print(bv2.getMe().getValue(bv2));
+
+Module.print(typeof bv2.getCopy());
+Module.print(bv2.getCopy().getValue(bv));
+Module.print(bv2.getCopy().getValue(bv2));
+
+bv2.getAnother().PrintFloat(21.12);
+
+Module.print(new Module.Inner().get());
+new Module.Inner().mul(2);
+
+//
+
+Module.print('\ndone.')
+
diff --git a/tests/webidl/test.cpp b/tests/webidl/test.cpp
new file mode 100644
index 00000000..8a2b5c72
--- /dev/null
+++ b/tests/webidl/test.cpp
@@ -0,0 +1,8 @@
+#include "test.h"
+
+Parent::Parent(int val) : value(val) { printf("Parent:%d\n", val); }
+Parent::Parent(Parent *p, Parent *q) : value(p->value + q->value) { printf("Parent:%d\n", value); }
+void Parent::mulVal(int mul) { value *= mul; }
+
+#include "glue.cpp"
+
diff --git a/tests/webidl/test.h b/tests/webidl/test.h
new file mode 100644
index 00000000..903f8f78
--- /dev/null
+++ b/tests/webidl/test.h
@@ -0,0 +1,72 @@
+#include <stdio.h>
+
+// Part 1
+
+class Parent {
+protected:
+ int value;
+public:
+ Parent(int val);
+ Parent(Parent *p, Parent *q); // overload constructor
+ int getVal() { return value; }; // inline should work just fine here, unlike Way 1 before
+ void mulVal(int mul);
+};
+
+class Child1 : public Parent {
+public:
+ Child1() : Parent(7) { printf("Child1:%d\n", value); };
+ Child1(int val) : Parent(val*2) { value -= 1; printf("Child1:%d\n", value); };
+ int getValSqr() { return value*value; }
+ int getValSqr(int more) { return value*value*more; }
+ int getValTimes(int times=1) { return value*times; }
+};
+
+// Child2 has vtable, parent does not. Checks we cast child->parent properly - (Parent*)child is not a no-op, must offset
+class Child2 : public Parent {
+public:
+ Child2() : Parent(9) { printf("Child2:%d\n", value); };
+ int getValCube() { return value*value*value; }
+ static void printStatic() { printf("*static*\n"); }
+
+ virtual void virtualFunc() { printf("*virtualf*\n"); }
+ virtual void virtualFunc2() { printf("*virtualf2*\n"); }
+ static void runVirtualFunc(Child2 *self) { self->virtualFunc(); };
+ virtual void virtualFunc3(int x) { printf("*virtualf3: %d*\n", x); }
+ virtual void virtualFunc4(int x) { printf("*virtualf4: %d*\n", x); }
+
+private:
+ void doSomethingSecret() { printf("security breached!\n"); }; // we should not be able to do this
+};
+
+// Part 2
+
+#include <string.h>
+
+class StringUser {
+ char *s;
+ int i;
+public:
+ StringUser(char *string="NO", int integer=99) : s(strdup(string)), i(integer) {}
+ void Print(int anotherInteger, char *anotherString) {
+ printf("|%s|%d|%s|%d|\n", s, i, anotherString, anotherInteger);
+ }
+ void PrintFloat(float f) { printf("%.2f\n", f); }
+};
+
+struct RefUser {
+ int value;
+ RefUser(int x = 77) : value(x) {}
+ int getValue(RefUser b) { return b.value; }
+ RefUser &getMe() { return *this; }
+ RefUser getCopy() { return RefUser(value*2); }
+ StringUser getAnother() { return StringUser("another", 5); }
+};
+
+namespace Space {
+ struct Inner {
+ Inner() {}
+ int get() { return 198; }
+ Inner& operator*=(float x) { return *this; }
+ };
+}
+
diff --git a/tests/webidl/test.idl b/tests/webidl/test.idl
new file mode 100644
index 00000000..98ab5070
--- /dev/null
+++ b/tests/webidl/test.idl
@@ -0,0 +1,64 @@
+
+// Part 1
+
+interface Parent {
+ void Parent(long val);
+ long getVal();
+ void mulVal(long mul);
+};
+
+interface Child1 {
+ void Child1(optional long val);
+ long getValSqr(optional long more);
+ long getValTimes(optional long times=1);
+};
+
+Child1 implements Parent;
+
+interface Child2 {
+ void Child2();
+ long getValCube();
+ static void printStatic();
+ void virtualFunc();
+ void virtualFunc2();
+ void virtualFunc3(long x);
+ void virtualFunc4(long x);
+ static void runVirtualFunc(Child2 self);
+};
+
+Child2 implements Parent;
+
+[JSImplementation="Child2"]
+interface Child2JS {
+ void Child2JS();
+ void virtualFunc();
+ void virtualFunc2();
+ void virtualFunc3(long x);
+ void virtualFunc4(long x);
+};
+
+// Part 2
+
+interface StringUser {
+ void StringUser();
+ void StringUser(DOMString str, long i);
+ void Print(long anotherInteger, DOMString anotherString);
+ void PrintFloat(float f);
+};
+
+interface RefUser {
+ void RefUser();
+ void RefUser(long value);
+ long getValue([Ref] RefUser b);
+ [Ref] RefUser getMe();
+ [Value] RefUser getCopy(); // must have zero-arg constructor
+ [Value] StringUser getAnother();
+};
+
+[Prefix="Space::"]
+interface Inner {
+ void Inner();
+ long get();
+ [Operator="*=", Ref] Inner mul(float x);
+};
+
diff --git a/tests/worker_api_3_main.cpp b/tests/worker_api_3_main.cpp
new file mode 100644
index 00000000..595f99b9
--- /dev/null
+++ b/tests/worker_api_3_main.cpp
@@ -0,0 +1,44 @@
+#include <stdio.h>
+#include <assert.h>
+#include <emscripten.h>
+
+int w1;
+
+bool sawCalls[] = { false, false, false, false };
+
+void c1(char *data, int size, void *arg) {
+ assert((int)arg == 97);
+ assert(size >= sizeof(int));
+
+ int *x = (int*)data;
+ printf("c1: %d\n", x[0]);
+
+ if (*x >= 0 && *x < 4) {
+ // Calls should have happened in order.
+ sawCalls[*x] = true; // Note the call with current param was made
+ for (int i = 0; i < *x - 1; ++i) {
+ if (!sawCalls[i]) {
+ // If we were called out of order, fail this and all following calls.
+ sawCalls[*x] = false;
+ break;
+ }
+ }
+ } else {
+ assert(*x == 4);
+ // This is the last call. All prior calls should have occurred.
+ int result = 1; // Final call occurred.
+ for (int i = 0; i < 4; ++i)
+ if (sawCalls[i]) result++;
+ REPORT_RESULT();
+ }
+}
+
+int main() {
+ w1 = emscripten_create_worker("worker.js");
+
+ int x[1] = { 0 };
+ emscripten_call_worker(w1, "one", (char*)x, sizeof(x), c1, (void*)97);
+
+ return 0;
+}
+
diff --git a/tests/worker_api_3_worker.cpp b/tests/worker_api_3_worker.cpp
new file mode 100644
index 00000000..db14377a
--- /dev/null
+++ b/tests/worker_api_3_worker.cpp
@@ -0,0 +1,25 @@
+#include <assert.h>
+#include <emscripten.h>
+
+extern "C" {
+
+// Respond with 0, 1, 2, 3 each with finalResponse=false, and 4 with
+// finalResponse=true.
+void one(char *data, int size) {
+ int *x = (int*)data;
+
+ if (*x == 0) {
+ // Respond 0, 1, 2, 3
+ for (int i = 0; i < 4; ++i) {
+ *x = i;
+ emscripten_worker_respond_provisionally(data, size);
+ }
+ }
+
+ // Respond 4
+ *x = 4;
+ emscripten_worker_respond(data, size);
+}
+
+}
+
diff --git a/third_party/WebIDL.py b/third_party/WebIDL.py
new file mode 100644
index 00000000..867a7cbc
--- /dev/null
+++ b/third_party/WebIDL.py
@@ -0,0 +1,5030 @@
+# from http://mxr.mozilla.org/mozilla-central/source/dom/bindings/parser/WebIDL.py
+# rev 501baeb3a034
+
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+""" A WebIDL parser. """
+
+from ply import lex, yacc
+import re
+import os
+import traceback
+import math
+
+# Machinery
+
+def parseInt(literal):
+ string = literal
+ sign = 0
+ base = 0
+
+ if string[0] == '-':
+ sign = -1
+ string = string[1:]
+ else:
+ sign = 1
+
+ if string[0] == '0' and len(string) > 1:
+ if string[1] == 'x' or string[1] == 'X':
+ base = 16
+ string = string[2:]
+ else:
+ base = 8
+ string = string[1:]
+ else:
+ base = 10
+
+ value = int(string, base)
+ return value * sign
+
+# Magic for creating enums
+def M_add_class_attribs(attribs, start):
+ def foo(name, bases, dict_):
+ for v, k in enumerate(attribs):
+ dict_[k] = start + v
+ assert 'length' not in dict_
+ dict_['length'] = start + len(attribs)
+ return type(name, bases, dict_)
+ return foo
+
+def enum(*names, **kw):
+ if len(kw) == 1:
+ base = kw['base'].__class__
+ start = base.length
+ else:
+ assert len(kw) == 0
+ base = object
+ start = 0
+ class Foo(base):
+ __metaclass__ = M_add_class_attribs(names, start)
+ def __setattr__(self, name, value): # this makes it read-only
+ raise NotImplementedError
+ return Foo()
+
+class WebIDLError(Exception):
+ def __init__(self, message, locations, warning=False):
+ self.message = message
+ self.locations = [str(loc) for loc in locations]
+ self.warning = warning
+
+ def __str__(self):
+ return "%s: %s%s%s" % (self.warning and 'warning' or 'error',
+ self.message,
+ ", " if len(self.locations) != 0 else "",
+ "\n".join(self.locations))
+
+class Location(object):
+ def __init__(self, lexer, lineno, lexpos, filename):
+ self._line = None
+ self._lineno = lineno
+ self._lexpos = lexpos
+ self._lexdata = lexer.lexdata
+ self._file = filename if filename else "<unknown>"
+
+ def __eq__(self, other):
+ return self._lexpos == other._lexpos and \
+ self._file == other._file
+
+ def filename(self):
+ return self._file
+
+ def resolve(self):
+ if self._line:
+ return
+
+ startofline = self._lexdata.rfind('\n', 0, self._lexpos) + 1
+ endofline = self._lexdata.find('\n', self._lexpos, self._lexpos + 80)
+ if endofline != -1:
+ self._line = self._lexdata[startofline:endofline]
+ else:
+ self._line = self._lexdata[startofline:]
+ self._colno = self._lexpos - startofline
+
+ # Our line number seems to point to the start of self._lexdata
+ self._lineno += self._lexdata.count('\n', 0, startofline)
+
+ def get(self):
+ self.resolve()
+ return "%s line %s:%s" % (self._file, self._lineno, self._colno)
+
+ def _pointerline(self):
+ return " " * self._colno + "^"
+
+ def __str__(self):
+ self.resolve()
+ return "%s line %s:%s\n%s\n%s" % (self._file, self._lineno, self._colno,
+ self._line, self._pointerline())
+
+class BuiltinLocation(object):
+ def __init__(self, text):
+ self.msg = text + "\n"
+
+ def __eq__(self, other):
+ return isinstance(other, BuiltinLocation) and \
+ self.msg == other.msg
+
+ def filename(self):
+ return '<builtin>'
+
+ def resolve(self):
+ pass
+
+ def get(self):
+ return self.msg
+
+ def __str__(self):
+ return self.get()
+
+
+# Data Model
+
+class IDLObject(object):
+ def __init__(self, location):
+ self.location = location
+ self.userData = dict()
+
+ def filename(self):
+ return self.location.filename()
+
+ def isInterface(self):
+ return False
+
+ def isEnum(self):
+ return False
+
+ def isCallback(self):
+ return False
+
+ def isType(self):
+ return False
+
+ def isDictionary(self):
+ return False;
+
+ def isUnion(self):
+ return False
+
+ def getUserData(self, key, default):
+ return self.userData.get(key, default)
+
+ def setUserData(self, key, value):
+ self.userData[key] = value
+
+ def addExtendedAttributes(self, attrs):
+ assert False # Override me!
+
+ def handleExtendedAttribute(self, attr):
+ assert False # Override me!
+
+ def _getDependentObjects(self):
+ assert False # Override me!
+
+ def getDeps(self, visited=None):
+ """ Return a set of files that this object depends on. If any of
+ these files are changed the parser needs to be rerun to regenerate
+ a new IDLObject.
+
+ The visited argument is a set of all the objects already visited.
+ We must test to see if we are in it, and if so, do nothing. This
+ prevents infinite recursion."""
+
+ # NB: We can't use visited=set() above because the default value is
+ # evaluated when the def statement is evaluated, not when the function
+ # is executed, so there would be one set for all invocations.
+ if visited == None:
+ visited = set()
+
+ if self in visited:
+ return set()
+
+ visited.add(self)
+
+ deps = set()
+ if self.filename() != "<builtin>":
+ deps.add(self.filename())
+
+ for d in self._getDependentObjects():
+ deps = deps.union(d.getDeps(visited))
+
+ return deps
+
+class IDLScope(IDLObject):
+ def __init__(self, location, parentScope, identifier):
+ IDLObject.__init__(self, location)
+
+ self.parentScope = parentScope
+ if identifier:
+ assert isinstance(identifier, IDLIdentifier)
+ self._name = identifier
+ else:
+ self._name = None
+
+ self._dict = {}
+
+ def __str__(self):
+ return self.QName()
+
+ def QName(self):
+ if self._name:
+ return self._name.QName() + "::"
+ return "::"
+
+ def ensureUnique(self, identifier, object):
+ """
+ Ensure that there is at most one 'identifier' in scope ('self').
+ Note that object can be None. This occurs if we end up here for an
+ interface type we haven't seen yet.
+ """
+ assert isinstance(identifier, IDLUnresolvedIdentifier)
+ assert not object or isinstance(object, IDLObjectWithIdentifier)
+ assert not object or object.identifier == identifier
+
+ if identifier.name in self._dict:
+ if not object:
+ return
+
+ # ensureUnique twice with the same object is not allowed
+ assert id(object) != id(self._dict[identifier.name])
+
+ replacement = self.resolveIdentifierConflict(self, identifier,
+ self._dict[identifier.name],
+ object)
+ self._dict[identifier.name] = replacement
+ return
+
+ assert object
+
+ self._dict[identifier.name] = object
+
+ def resolveIdentifierConflict(self, scope, identifier, originalObject, newObject):
+ if isinstance(originalObject, IDLExternalInterface) and \
+ isinstance(newObject, IDLExternalInterface) and \
+ originalObject.identifier.name == newObject.identifier.name:
+ return originalObject
+
+ if (isinstance(originalObject, IDLExternalInterface) or
+ isinstance(newObject, IDLExternalInterface)):
+ raise WebIDLError(
+ "Name collision between "
+ "interface declarations for identifier '%s' at '%s' and '%s'"
+ % (identifier.name,
+ originalObject.location, newObject.location), [])
+
+ # We do the merging of overloads here as opposed to in IDLInterface
+ # because we need to merge overloads of NamedConstructors and we need to
+ # detect conflicts in those across interfaces. See also the comment in
+ # IDLInterface.addExtendedAttributes for "NamedConstructor".
+ if originalObject.tag == IDLInterfaceMember.Tags.Method and \
+ newObject.tag == IDLInterfaceMember.Tags.Method:
+ return originalObject.addOverload(newObject)
+
+ # Default to throwing, derived classes can override.
+ conflictdesc = "\n\t%s at %s\n\t%s at %s" % \
+ (originalObject, originalObject.location, newObject, newObject.location)
+
+ raise WebIDLError(
+ "Multiple unresolvable definitions of identifier '%s' in scope '%s%s"
+ % (identifier.name, str(self), conflictdesc), [])
+
+ def _lookupIdentifier(self, identifier):
+ return self._dict[identifier.name]
+
+ def lookupIdentifier(self, identifier):
+ assert isinstance(identifier, IDLIdentifier)
+ assert identifier.scope == self
+ return self._lookupIdentifier(identifier)
+
+class IDLIdentifier(IDLObject):
+ def __init__(self, location, scope, name):
+ IDLObject.__init__(self, location)
+
+ self.name = name
+ assert isinstance(scope, IDLScope)
+ self.scope = scope
+
+ def __str__(self):
+ return self.QName()
+
+ def QName(self):
+ return self.scope.QName() + self.name
+
+ def __hash__(self):
+ return self.QName().__hash__()
+
+ def __eq__(self, other):
+ return self.QName() == other.QName()
+
+ def object(self):
+ return self.scope.lookupIdentifier(self)
+
+class IDLUnresolvedIdentifier(IDLObject):
+ def __init__(self, location, name, allowDoubleUnderscore = False,
+ allowForbidden = False):
+ IDLObject.__init__(self, location)
+
+ assert len(name) > 0
+
+ if name[:2] == "__" and name != "__content" and name != "___noSuchMethod__" and not allowDoubleUnderscore:
+ raise WebIDLError("Identifiers beginning with __ are reserved",
+ [location])
+ if name[0] == '_' and not allowDoubleUnderscore:
+ name = name[1:]
+ # TODO: Bug 872377, Restore "toJSON" to below list.
+ # We sometimes need custom serialization, so allow toJSON for now.
+ if (name in ["constructor", "toString"] and
+ not allowForbidden):
+ raise WebIDLError("Cannot use reserved identifier '%s'" % (name),
+ [location])
+
+ self.name = name
+
+ def __str__(self):
+ return self.QName()
+
+ def QName(self):
+ return "<unresolved scope>::" + self.name
+
+ def resolve(self, scope, object):
+ assert isinstance(scope, IDLScope)
+ assert not object or isinstance(object, IDLObjectWithIdentifier)
+ assert not object or object.identifier == self
+
+ scope.ensureUnique(self, object)
+
+ identifier = IDLIdentifier(self.location, scope, self.name)
+ if object:
+ object.identifier = identifier
+ return identifier
+
+ def finish(self):
+ assert False # Should replace with a resolved identifier first.
+
+class IDLObjectWithIdentifier(IDLObject):
+ def __init__(self, location, parentScope, identifier):
+ IDLObject.__init__(self, location)
+
+ assert isinstance(identifier, IDLUnresolvedIdentifier)
+
+ self.identifier = identifier
+
+ if parentScope:
+ self.resolve(parentScope)
+
+ self.treatNullAs = "Default"
+
+ def resolve(self, parentScope):
+ assert isinstance(parentScope, IDLScope)
+ assert isinstance(self.identifier, IDLUnresolvedIdentifier)
+ self.identifier.resolve(parentScope, self)
+
+ def checkForStringHandlingExtendedAttributes(self, attrs,
+ isDictionaryMember=False,
+ isOptional=False):
+ """
+ A helper function to deal with TreatNullAs. Returns the list
+ of attrs it didn't handle itself.
+ """
+ assert isinstance(self, IDLArgument) or isinstance(self, IDLAttribute)
+ unhandledAttrs = list()
+ for attr in attrs:
+ if not attr.hasValue():
+ unhandledAttrs.append(attr)
+ continue
+
+ identifier = attr.identifier()
+ value = attr.value()
+ if identifier == "TreatNullAs":
+ if not self.type.isDOMString() or self.type.nullable():
+ raise WebIDLError("[TreatNullAs] is only allowed on "
+ "arguments or attributes whose type is "
+ "DOMString",
+ [self.location])
+ if isDictionaryMember:
+ raise WebIDLError("[TreatNullAs] is not allowed for "
+ "dictionary members", [self.location])
+ if value != 'EmptyString':
+ raise WebIDLError("[TreatNullAs] must take the identifier "
+ "'EmptyString', not '%s'" % value,
+ [self.location])
+ self.treatNullAs = value
+ else:
+ unhandledAttrs.append(attr)
+
+ return unhandledAttrs
+
+class IDLObjectWithScope(IDLObjectWithIdentifier, IDLScope):
+ def __init__(self, location, parentScope, identifier):
+ assert isinstance(identifier, IDLUnresolvedIdentifier)
+
+ IDLObjectWithIdentifier.__init__(self, location, parentScope, identifier)
+ IDLScope.__init__(self, location, parentScope, self.identifier)
+
+class IDLIdentifierPlaceholder(IDLObjectWithIdentifier):
+ def __init__(self, location, identifier):
+ assert isinstance(identifier, IDLUnresolvedIdentifier)
+ IDLObjectWithIdentifier.__init__(self, location, None, identifier)
+
+ def finish(self, scope):
+ try:
+ scope._lookupIdentifier(self.identifier)
+ except:
+ raise WebIDLError("Unresolved type '%s'." % self.identifier,
+ [self.location])
+
+ obj = self.identifier.resolve(scope, None)
+ return scope.lookupIdentifier(obj)
+
+class IDLExternalInterface(IDLObjectWithIdentifier):
+ def __init__(self, location, parentScope, identifier):
+ assert isinstance(identifier, IDLUnresolvedIdentifier)
+ assert isinstance(parentScope, IDLScope)
+ self.parent = None
+ IDLObjectWithIdentifier.__init__(self, location, parentScope, identifier)
+ IDLObjectWithIdentifier.resolve(self, parentScope)
+
+ def finish(self, scope):
+ pass
+
+ def validate(self):
+ pass
+
+ def isExternal(self):
+ return True
+
+ def isInterface(self):
+ return True
+
+ def isConsequential(self):
+ return False
+
+ def addExtendedAttributes(self, attrs):
+ assert len(attrs) == 0
+
+ def resolve(self, parentScope):
+ pass
+
+ def getJSImplementation(self):
+ return None
+
+ def isJSImplemented(self):
+ return False
+
+ def getNavigatorProperty(self):
+ return None
+
+ def _getDependentObjects(self):
+ return set()
+
+class IDLInterface(IDLObjectWithScope):
+ def __init__(self, location, parentScope, name, parent, members,
+ isPartial):
+ assert isinstance(parentScope, IDLScope)
+ assert isinstance(name, IDLUnresolvedIdentifier)
+ assert not isPartial or not parent
+
+ self.parent = None
+ self._callback = False
+ self._finished = False
+ self.members = []
+ # namedConstructors needs deterministic ordering because bindings code
+ # outputs the constructs in the order that namedConstructors enumerates
+ # them.
+ self.namedConstructors = list()
+ self.implementedInterfaces = set()
+ self._consequential = False
+ self._isPartial = True
+ # self.interfacesBasedOnSelf is the set of interfaces that inherit from
+ # self or have self as a consequential interface, including self itself.
+ # Used for distinguishability checking.
+ self.interfacesBasedOnSelf = set([self])
+ # self.interfacesImplementingSelf is the set of interfaces that directly
+ # have self as a consequential interface
+ self.interfacesImplementingSelf = set()
+ self._hasChildInterfaces = False
+ self._isOnGlobalProtoChain = False
+ # Tracking of the number of reserved slots we need for our
+ # members and those of ancestor interfaces.
+ self.totalMembersInSlots = 0
+ # Tracking of the number of own own members we have in slots
+ self._ownMembersInSlots = 0
+
+ IDLObjectWithScope.__init__(self, location, parentScope, name)
+
+ if not isPartial:
+ self.setNonPartial(location, parent, members)
+ else:
+ # Just remember our members for now
+ self.members = members
+
+ def __str__(self):
+ return "Interface '%s'" % self.identifier.name
+
+ def ctor(self):
+ identifier = IDLUnresolvedIdentifier(self.location, "constructor",
+ allowForbidden=True)
+ try:
+ return self._lookupIdentifier(identifier)
+ except:
+ return None
+
+ def resolveIdentifierConflict(self, scope, identifier, originalObject, newObject):
+ assert isinstance(scope, IDLScope)
+ assert isinstance(originalObject, IDLInterfaceMember)
+ assert isinstance(newObject, IDLInterfaceMember)
+
+ retval = IDLScope.resolveIdentifierConflict(self, scope, identifier,
+ originalObject, newObject)
+
+ # Might be a ctor, which isn't in self.members
+ if newObject in self.members:
+ self.members.remove(newObject)
+ return retval
+
+ def finish(self, scope):
+ if self._finished:
+ return
+
+ self._finished = True
+
+ if self._isPartial:
+ raise WebIDLError("Interface %s does not have a non-partial "
+ "declaration" % self.identifier.name,
+ [self.location])
+
+ assert not self.parent or isinstance(self.parent, IDLIdentifierPlaceholder)
+ parent = self.parent.finish(scope) if self.parent else None
+ if parent and isinstance(parent, IDLExternalInterface):
+ raise WebIDLError("%s inherits from %s which does not have "
+ "a definition" %
+ (self.identifier.name,
+ self.parent.identifier.name),
+ [self.location])
+ assert not parent or isinstance(parent, IDLInterface)
+
+ self.parent = parent
+
+ assert iter(self.members)
+
+ if self.parent:
+ self.parent.finish(scope)
+
+ self.parent._hasChildInterfaces = True
+
+ self.totalMembersInSlots = self.parent.totalMembersInSlots
+
+ # Interfaces with [Global] must not have anything inherit from them
+ if self.parent.getExtendedAttribute("Global"):
+ # Note: This is not a self.parent.isOnGlobalProtoChain() check
+ # because ancestors of a [Global] interface can have other
+ # descendants.
+ raise WebIDLError("[Global] interface has another interface "
+ "inheriting from it",
+ [self.location, self.parent.location])
+
+ # Callbacks must not inherit from non-callbacks or inherit from
+ # anything that has consequential interfaces.
+ # XXXbz Can non-callbacks inherit from callbacks? Spec issue pending.
+ # XXXbz Can callbacks have consequential interfaces? Spec issue pending
+ if self.isCallback():
+ if not self.parent.isCallback():
+ raise WebIDLError("Callback interface %s inheriting from "
+ "non-callback interface %s" %
+ (self.identifier.name,
+ self.parent.identifier.name),
+ [self.location, self.parent.location])
+ elif self.parent.isCallback():
+ raise WebIDLError("Non-callback interface %s inheriting from "
+ "callback interface %s" %
+ (self.identifier.name,
+ self.parent.identifier.name),
+ [self.location, self.parent.location])
+
+ for iface in self.implementedInterfaces:
+ iface.finish(scope)
+
+ cycleInGraph = self.findInterfaceLoopPoint(self)
+ if cycleInGraph:
+ raise WebIDLError("Interface %s has itself as ancestor or "
+ "implemented interface" % self.identifier.name,
+ [self.location, cycleInGraph.location])
+
+ if self.isCallback():
+ # "implements" should have made sure we have no
+ # consequential interfaces.
+ assert len(self.getConsequentialInterfaces()) == 0
+ # And that we're not consequential.
+ assert not self.isConsequential()
+
+ # Now resolve() and finish() our members before importing the
+ # ones from our implemented interfaces.
+
+ # resolve() will modify self.members, so we need to iterate
+ # over a copy of the member list here.
+ for member in list(self.members):
+ member.resolve(self)
+
+ for member in self.members:
+ member.finish(scope)
+
+ ctor = self.ctor()
+ if ctor is not None:
+ ctor.finish(scope)
+
+ for ctor in self.namedConstructors:
+ ctor.finish(scope)
+
+ # Make a copy of our member list, so things that implement us
+ # can get those without all the stuff we implement ourselves
+ # admixed.
+ self.originalMembers = list(self.members)
+
+ # Import everything from our consequential interfaces into
+ # self.members. Sort our consequential interfaces by name
+ # just so we have a consistent order.
+ for iface in sorted(self.getConsequentialInterfaces(),
+ cmp=cmp,
+ key=lambda x: x.identifier.name):
+ # Flag the interface as being someone's consequential interface
+ iface.setIsConsequentialInterfaceOf(self)
+ additionalMembers = iface.originalMembers;
+ for additionalMember in additionalMembers:
+ for member in self.members:
+ if additionalMember.identifier.name == member.identifier.name:
+ raise WebIDLError(
+ "Multiple definitions of %s on %s coming from 'implements' statements" %
+ (member.identifier.name, self),
+ [additionalMember.location, member.location])
+ self.members.extend(additionalMembers)
+ iface.interfacesImplementingSelf.add(self)
+
+ for ancestor in self.getInheritedInterfaces():
+ ancestor.interfacesBasedOnSelf.add(self)
+ for ancestorConsequential in ancestor.getConsequentialInterfaces():
+ ancestorConsequential.interfacesBasedOnSelf.add(self)
+
+ for member in self.members:
+ if (member.isAttr() and member.isUnforgeable() and
+ not hasattr(member, "originatingInterface")):
+ member.originatingInterface = self
+
+ # Compute slot indices for our members before we pull in
+ # unforgeable members from our parent.
+ for member in self.members:
+ if (member.isAttr() and
+ (member.getExtendedAttribute("StoreInSlot") or
+ member.getExtendedAttribute("Cached"))):
+ member.slotIndex = self.totalMembersInSlots
+ self.totalMembersInSlots += 1
+ if member.getExtendedAttribute("StoreInSlot"):
+ self._ownMembersInSlots += 1
+
+ if self.parent:
+ # Make sure we don't shadow any of the [Unforgeable] attributes on
+ # our ancestor interfaces. We don't have to worry about
+ # consequential interfaces here, because those have already been
+ # imported into the relevant .members lists. And we don't have to
+ # worry about anything other than our parent, because it has already
+ # imported its ancestors unforgeable attributes into its member
+ # list.
+ for unforgeableAttr in (attr for attr in self.parent.members if
+ attr.isAttr() and not attr.isStatic() and
+ attr.isUnforgeable()):
+ shadows = [ m for m in self.members if
+ (m.isAttr() or m.isMethod()) and
+ not m.isStatic() and
+ m.identifier.name == unforgeableAttr.identifier.name ]
+ if len(shadows) != 0:
+ locs = [unforgeableAttr.location] + [ s.location for s
+ in shadows ]
+ raise WebIDLError("Interface %s shadows [Unforgeable] "
+ "members of %s" %
+ (self.identifier.name,
+ ancestor.identifier.name),
+ locs)
+ # And now just stick it in our members, since we won't be
+ # inheriting this down the proto chain. If we really cared we
+ # could try to do something where we set up the unforgeable
+ # attributes of ancestor interfaces, with their corresponding
+ # getters, on our interface, but that gets pretty complicated
+ # and seems unnecessary.
+ self.members.append(unforgeableAttr)
+
+ # Ensure that there's at most one of each {named,indexed}
+ # {getter,setter,creator,deleter}, at most one stringifier,
+ # and at most one legacycaller. Note that this last is not
+ # quite per spec, but in practice no one overloads
+ # legacycallers.
+ specialMembersSeen = {}
+ for member in self.members:
+ if not member.isMethod():
+ continue
+
+ if member.isGetter():
+ memberType = "getters"
+ elif member.isSetter():
+ memberType = "setters"
+ elif member.isCreator():
+ memberType = "creators"
+ elif member.isDeleter():
+ memberType = "deleters"
+ elif member.isStringifier():
+ memberType = "stringifiers"
+ elif member.isJsonifier():
+ memberType = "jsonifiers"
+ elif member.isLegacycaller():
+ memberType = "legacycallers"
+ else:
+ continue
+
+ if (memberType != "stringifiers" and memberType != "legacycallers" and
+ memberType != "jsonifiers"):
+ if member.isNamed():
+ memberType = "named " + memberType
+ else:
+ assert member.isIndexed()
+ memberType = "indexed " + memberType
+
+ if memberType in specialMembersSeen:
+ raise WebIDLError("Multiple " + memberType + " on %s" % (self),
+ [self.location,
+ specialMembersSeen[memberType].location,
+ member.location])
+
+ specialMembersSeen[memberType] = member
+
+ if self._isOnGlobalProtoChain:
+ # Make sure we have no named setters, creators, or deleters
+ for memberType in ["setter", "creator", "deleter"]:
+ memberId = "named " + memberType + "s"
+ if memberId in specialMembersSeen:
+ raise WebIDLError("Interface with [Global] has a named %s" %
+ memberType,
+ [self.location,
+ specialMembersSeen[memberId].location])
+ # Make sure we're not [OverrideBuiltins]
+ if self.getExtendedAttribute("OverrideBuiltins"):
+ raise WebIDLError("Interface with [Global] also has "
+ "[OverrideBuiltins]",
+ [self.location])
+ # Mark all of our ancestors as being on the global's proto chain too
+ parent = self.parent
+ while parent:
+ # Must not inherit from an interface with [OverrideBuiltins]
+ if parent.getExtendedAttribute("OverrideBuiltins"):
+ raise WebIDLError("Interface with [Global] inherits from "
+ "interface with [OverrideBuiltins]",
+ [self.location, parent.location])
+ parent._isOnGlobalProtoChain = True
+ parent = parent.parent
+
+ def validate(self):
+ for member in self.members:
+ member.validate()
+
+ # Check that PutForwards refers to another attribute and that no
+ # cycles exist in forwarded assignments.
+ if member.isAttr():
+ iface = self
+ attr = member
+ putForwards = attr.getExtendedAttribute("PutForwards")
+ if putForwards and self.isCallback():
+ raise WebIDLError("[PutForwards] used on an attribute "
+ "on interface %s which is a callback "
+ "interface" % self.identifier.name,
+ [self.location, member.location])
+
+ while putForwards is not None:
+ forwardIface = attr.type.unroll().inner
+ fowardAttr = None
+
+ for forwardedMember in forwardIface.members:
+ if (not forwardedMember.isAttr() or
+ forwardedMember.identifier.name != putForwards[0]):
+ continue
+ if forwardedMember == member:
+ raise WebIDLError("Cycle detected in forwarded "
+ "assignments for attribute %s on "
+ "%s" %
+ (member.identifier.name, self),
+ [member.location])
+ fowardAttr = forwardedMember
+ break
+
+ if fowardAttr is None:
+ raise WebIDLError("Attribute %s on %s forwards to "
+ "missing attribute %s" %
+ (attr.identifier.name, iface, putForwards),
+ [attr.location])
+
+ iface = forwardIface
+ attr = fowardAttr
+ putForwards = attr.getExtendedAttribute("PutForwards")
+
+
+ def isInterface(self):
+ return True
+
+ def isExternal(self):
+ return False
+
+ def setIsConsequentialInterfaceOf(self, other):
+ self._consequential = True
+ self.interfacesBasedOnSelf.add(other)
+
+ def isConsequential(self):
+ return self._consequential
+
+ def setCallback(self, value):
+ self._callback = value
+
+ def isCallback(self):
+ return self._callback
+
+ def isSingleOperationInterface(self):
+ assert self.isCallback() or self.isJSImplemented()
+ return (
+ # JS-implemented things should never need the
+ # this-handling weirdness of single-operation interfaces.
+ not self.isJSImplemented() and
+ # Not inheriting from another interface
+ not self.parent and
+ # No consequential interfaces
+ len(self.getConsequentialInterfaces()) == 0 and
+ # No attributes of any kinds
+ not any(m.isAttr() for m in self.members) and
+ # There is at least one regular operation, and all regular
+ # operations have the same identifier
+ len(set(m.identifier.name for m in self.members if
+ m.isMethod() and not m.isStatic())) == 1)
+
+ def inheritanceDepth(self):
+ depth = 0
+ parent = self.parent
+ while parent:
+ depth = depth + 1
+ parent = parent.parent
+ return depth
+
+ def hasConstants(self):
+ return any(m.isConst() for m in self.members)
+
+ def hasInterfaceObject(self):
+ if self.isCallback():
+ return self.hasConstants()
+ return not hasattr(self, "_noInterfaceObject")
+
+ def hasInterfacePrototypeObject(self):
+ return not self.isCallback() and self.getUserData('hasConcreteDescendant', False)
+
+ def addExtendedAttributes(self, attrs):
+ self._extendedAttrDict = {}
+ for attr in attrs:
+ identifier = attr.identifier()
+
+ # Special cased attrs
+ if identifier == "TreatNonCallableAsNull":
+ raise WebIDLError("TreatNonCallableAsNull cannot be specified on interfaces",
+ [attr.location, self.location])
+ if identifier == "TreatNonObjectAsNull":
+ raise WebIDLError("TreatNonObjectAsNull cannot be specified on interfaces",
+ [attr.location, self.location])
+ elif identifier == "NoInterfaceObject":
+ if not attr.noArguments():
+ raise WebIDLError("[NoInterfaceObject] must take no arguments",
+ [attr.location])
+
+ if self.ctor():
+ raise WebIDLError("Constructor and NoInterfaceObject are incompatible",
+ [self.location])
+
+ self._noInterfaceObject = True
+ elif identifier == "Constructor" or identifier == "NamedConstructor" or identifier == "ChromeConstructor":
+ if identifier == "Constructor" and not self.hasInterfaceObject():
+ raise WebIDLError(str(identifier) + " and NoInterfaceObject are incompatible",
+ [self.location])
+
+ if identifier == "NamedConstructor" and not attr.hasValue():
+ raise WebIDLError("NamedConstructor must either take an identifier or take a named argument list",
+ [attr.location])
+
+ if identifier == "ChromeConstructor" and not self.hasInterfaceObject():
+ raise WebIDLError(str(identifier) + " and NoInterfaceObject are incompatible",
+ [self.location])
+
+ args = attr.args() if attr.hasArgs() else []
+
+ retType = IDLWrapperType(self.location, self)
+
+ if identifier == "Constructor" or identifier == "ChromeConstructor":
+ name = "constructor"
+ allowForbidden = True
+ else:
+ name = attr.value()
+ allowForbidden = False
+
+ methodIdentifier = IDLUnresolvedIdentifier(self.location, name,
+ allowForbidden=allowForbidden)
+
+ method = IDLMethod(self.location, methodIdentifier, retType,
+ args, static=True)
+ # Constructors are always NewObject and are always
+ # assumed to be able to throw (since there's no way to
+ # indicate otherwise) and never have any other
+ # extended attributes.
+ method.addExtendedAttributes(
+ [IDLExtendedAttribute(self.location, ("NewObject",)),
+ IDLExtendedAttribute(self.location, ("Throws",))])
+ if identifier == "ChromeConstructor":
+ method.addExtendedAttributes(
+ [IDLExtendedAttribute(self.location, ("ChromeOnly",))])
+
+ if identifier == "Constructor" or identifier == "ChromeConstructor":
+ method.resolve(self)
+ else:
+ # We need to detect conflicts for NamedConstructors across
+ # interfaces. We first call resolve on the parentScope,
+ # which will merge all NamedConstructors with the same
+ # identifier accross interfaces as overloads.
+ method.resolve(self.parentScope)
+
+ # Then we look up the identifier on the parentScope. If the
+ # result is the same as the method we're adding then it
+ # hasn't been added as an overload and it's the first time
+ # we've encountered a NamedConstructor with that identifier.
+ # If the result is not the same as the method we're adding
+ # then it has been added as an overload and we need to check
+ # whether the result is actually one of our existing
+ # NamedConstructors.
+ newMethod = self.parentScope.lookupIdentifier(method.identifier)
+ if newMethod == method:
+ self.namedConstructors.append(method)
+ elif not newMethod in self.namedConstructors:
+ raise WebIDLError("NamedConstructor conflicts with a NamedConstructor of a different interface",
+ [method.location, newMethod.location])
+ elif (identifier == "ArrayClass"):
+ if not attr.noArguments():
+ raise WebIDLError("[ArrayClass] must take no arguments",
+ [attr.location])
+ if self.parent:
+ raise WebIDLError("[ArrayClass] must not be specified on "
+ "an interface with inherited interfaces",
+ [attr.location, self.location])
+ elif identifier == "Global":
+ if not attr.noArguments():
+ raise WebIDLError("[Global] must take no arguments",
+ [attr.location])
+ self._isOnGlobalProtoChain = True
+ elif (identifier == "NeedNewResolve" or
+ identifier == "OverrideBuiltins" or
+ identifier == "NoDelete" or
+ identifier == "ChromeOnly"):
+ # Known extended attributes that do not take values
+ if not attr.noArguments():
+ raise WebIDLError("[%s] must take no arguments" % identifier,
+ [attr.location])
+ elif (identifier == "Pref" or
+ identifier == "JSImplementation" or
+ identifier == "HeaderFile" or
+ identifier == "NavigatorProperty" or
+ identifier == "AvailableIn" or
+ identifier == "Prefix" or
+ identifier == "Func"):
+ # Known extended attributes that take a string value
+ if not attr.hasValue():
+ raise WebIDLError("[%s] must have a value" % identifier,
+ [attr.location])
+ else:
+ raise WebIDLError("Unknown extended attribute %s on interface" % identifier,
+ [attr.location])
+
+ attrlist = attr.listValue()
+ self._extendedAttrDict[identifier] = attrlist if len(attrlist) else True
+
+ def addImplementedInterface(self, implementedInterface):
+ assert(isinstance(implementedInterface, IDLInterface))
+ self.implementedInterfaces.add(implementedInterface)
+
+ def getInheritedInterfaces(self):
+ """
+ Returns a list of the interfaces this interface inherits from
+ (not including this interface itself). The list is in order
+ from most derived to least derived.
+ """
+ assert(self._finished)
+ if not self.parent:
+ return []
+ parentInterfaces = self.parent.getInheritedInterfaces()
+ parentInterfaces.insert(0, self.parent)
+ return parentInterfaces
+
+ def getConsequentialInterfaces(self):
+ assert(self._finished)
+ # The interfaces we implement directly
+ consequentialInterfaces = set(self.implementedInterfaces)
+
+ # And their inherited interfaces
+ for iface in self.implementedInterfaces:
+ consequentialInterfaces |= set(iface.getInheritedInterfaces())
+
+ # And now collect up the consequential interfaces of all of those
+ temp = set()
+ for iface in consequentialInterfaces:
+ temp |= iface.getConsequentialInterfaces()
+
+ return consequentialInterfaces | temp
+
+ def findInterfaceLoopPoint(self, otherInterface):
+ """
+ Finds an interface, amongst our ancestors and consequential interfaces,
+ that inherits from otherInterface or implements otherInterface
+ directly. If there is no such interface, returns None.
+ """
+ if self.parent:
+ if self.parent == otherInterface:
+ return self
+ loopPoint = self.parent.findInterfaceLoopPoint(otherInterface)
+ if loopPoint:
+ return loopPoint
+ if otherInterface in self.implementedInterfaces:
+ return self
+ for iface in self.implementedInterfaces:
+ loopPoint = iface.findInterfaceLoopPoint(otherInterface)
+ if loopPoint:
+ return loopPoint
+ return None
+
+ def getExtendedAttribute(self, name):
+ return self._extendedAttrDict.get(name, None)
+
+ def setNonPartial(self, location, parent, members):
+ assert not parent or isinstance(parent, IDLIdentifierPlaceholder)
+ if not self._isPartial:
+ raise WebIDLError("Two non-partial definitions for the "
+ "same interface",
+ [location, self.location])
+ self._isPartial = False
+ # Now make it look like we were parsed at this new location, since
+ # that's the place where the interface is "really" defined
+ self.location = location
+ assert not self.parent
+ self.parent = parent
+ # Put the new members at the beginning
+ self.members = members + self.members
+
+ def getJSImplementation(self):
+ classId = self.getExtendedAttribute("JSImplementation")
+ if not classId:
+ return classId
+ assert isinstance(classId, list)
+ assert len(classId) == 1
+ return classId[0]
+
+ def isJSImplemented(self):
+ return bool(self.getJSImplementation())
+
+ def getNavigatorProperty(self):
+ naviProp = self.getExtendedAttribute("NavigatorProperty")
+ if not naviProp:
+ return None
+ assert len(naviProp) == 1
+ assert isinstance(naviProp, list)
+ assert len(naviProp[0]) != 0
+ return naviProp[0]
+
+ def hasChildInterfaces(self):
+ return self._hasChildInterfaces
+
+ def isOnGlobalProtoChain(self):
+ return self._isOnGlobalProtoChain
+
+ def _getDependentObjects(self):
+ deps = set(self.members)
+ deps.union(self.implementedInterfaces)
+ if self.parent:
+ deps.add(self.parent)
+ return deps
+
+ def hasMembersInSlots(self):
+ return self._ownMembersInSlots != 0
+
+class IDLDictionary(IDLObjectWithScope):
+ def __init__(self, location, parentScope, name, parent, members):
+ assert isinstance(parentScope, IDLScope)
+ assert isinstance(name, IDLUnresolvedIdentifier)
+ assert not parent or isinstance(parent, IDLIdentifierPlaceholder)
+
+ self.parent = parent
+ self._finished = False
+ self.members = list(members)
+
+ IDLObjectWithScope.__init__(self, location, parentScope, name)
+
+ def __str__(self):
+ return "Dictionary '%s'" % self.identifier.name
+
+ def isDictionary(self):
+ return True;
+
+ def finish(self, scope):
+ if self._finished:
+ return
+
+ self._finished = True
+
+ if self.parent:
+ assert isinstance(self.parent, IDLIdentifierPlaceholder)
+ oldParent = self.parent
+ self.parent = self.parent.finish(scope)
+ if not isinstance(self.parent, IDLDictionary):
+ raise WebIDLError("Dictionary %s has parent that is not a dictionary" %
+ self.identifier.name,
+ [oldParent.location, self.parent.location])
+
+ # Make sure the parent resolves all its members before we start
+ # looking at them.
+ self.parent.finish(scope)
+
+ for member in self.members:
+ member.resolve(self)
+ if not member.isComplete():
+ member.complete(scope)
+ assert member.type.isComplete()
+
+ # Members of a dictionary are sorted in lexicographic order
+ self.members.sort(cmp=cmp, key=lambda x: x.identifier.name)
+
+ inheritedMembers = []
+ ancestor = self.parent
+ while ancestor:
+ if ancestor == self:
+ raise WebIDLError("Dictionary %s has itself as an ancestor" %
+ self.identifier.name,
+ [self.identifier.location])
+ inheritedMembers.extend(ancestor.members)
+ ancestor = ancestor.parent
+
+ # Catch name duplication
+ for inheritedMember in inheritedMembers:
+ for member in self.members:
+ if member.identifier.name == inheritedMember.identifier.name:
+ raise WebIDLError("Dictionary %s has two members with name %s" %
+ (self.identifier.name, member.identifier.name),
+ [member.location, inheritedMember.location])
+
+ def validate(self):
+ def typeContainsDictionary(memberType, dictionary):
+ """
+ Returns a tuple whose:
+
+ - First element is a Boolean value indicating whether
+ memberType contains dictionary.
+
+ - Second element is:
+ A list of locations that leads from the type that was passed in
+ the memberType argument, to the dictionary being validated,
+ if the boolean value in the first element is True.
+
+ None, if the boolean value in the first element is False.
+ """
+
+ if memberType.nullable() or \
+ memberType.isArray() or \
+ memberType.isSequence():
+ return typeContainsDictionary(memberType.inner, dictionary)
+
+ if memberType.isDictionary():
+ if memberType.inner == dictionary:
+ return (True, [memberType.location])
+
+ (contains, locations) = dictionaryContainsDictionary(memberType.inner, \
+ dictionary)
+ if contains:
+ return (True, [memberType.location] + locations)
+
+ if memberType.isUnion():
+ for member in memberType.flatMemberTypes:
+ (contains, locations) = typeContainsDictionary(member, dictionary)
+ if contains:
+ return (True, locations)
+
+ return (False, None)
+
+ def dictionaryContainsDictionary(dictMember, dictionary):
+ for member in dictMember.members:
+ (contains, locations) = typeContainsDictionary(member.type, dictionary)
+ if contains:
+ return (True, [member.location] + locations)
+
+ if dictMember.parent:
+ if dictMember.parent == dictionary:
+ return (True, [dictMember.location])
+ else:
+ (contains, locations) = dictionaryContainsDictionary(dictMember.parent, dictionary)
+ if contains:
+ return (True, [dictMember.location] + locations)
+
+ return (False, None)
+
+ for member in self.members:
+ if member.type.isDictionary() and member.type.nullable():
+ raise WebIDLError("Dictionary %s has member with nullable "
+ "dictionary type" % self.identifier.name,
+ [member.location])
+ (contains, locations) = typeContainsDictionary(member.type, self)
+ if contains:
+ raise WebIDLError("Dictionary %s has member with itself as type." %
+ self.identifier.name,
+ [member.location] + locations)
+
+ def addExtendedAttributes(self, attrs):
+ assert len(attrs) == 0
+
+ def _getDependentObjects(self):
+ deps = set(self.members)
+ if (self.parent):
+ deps.add(self.parent)
+ return deps
+
+class IDLEnum(IDLObjectWithIdentifier):
+ def __init__(self, location, parentScope, name, values):
+ assert isinstance(parentScope, IDLScope)
+ assert isinstance(name, IDLUnresolvedIdentifier)
+
+ if len(values) != len(set(values)):
+ raise WebIDLError("Enum %s has multiple identical strings" % name.name,
+ [location])
+
+ IDLObjectWithIdentifier.__init__(self, location, parentScope, name)
+ self._values = values
+
+ def values(self):
+ return self._values
+
+ def finish(self, scope):
+ pass
+
+ def validate(self):
+ pass
+
+ def isEnum(self):
+ return True
+
+ def addExtendedAttributes(self, attrs):
+ assert len(attrs) == 0
+
+ def _getDependentObjects(self):
+ return set()
+
+class IDLType(IDLObject):
+ Tags = enum(
+ # The integer types
+ 'int8',
+ 'uint8',
+ 'int16',
+ 'uint16',
+ 'int32',
+ 'uint32',
+ 'int64',
+ 'uint64',
+ # Additional primitive types
+ 'bool',
+ 'unrestricted_float',
+ 'float',
+ 'unrestricted_double',
+ # "double" last primitive type to match IDLBuiltinType
+ 'double',
+ # Other types
+ 'any',
+ 'domstring',
+ 'bytestring',
+ 'object',
+ 'date',
+ 'void',
+ # Funny stuff
+ 'interface',
+ 'dictionary',
+ 'enum',
+ 'callback',
+ 'union',
+ 'sequence',
+ 'array'
+ )
+
+ def __init__(self, location, name):
+ IDLObject.__init__(self, location)
+ self.name = name
+ self.builtin = False
+
+ def __eq__(self, other):
+ return other and self.builtin == other.builtin and self.name == other.name
+
+ def __ne__(self, other):
+ return not self == other
+
+ def __str__(self):
+ return str(self.name)
+
+ def isType(self):
+ return True
+
+ def nullable(self):
+ return False
+
+ def isPrimitive(self):
+ return False
+
+ def isBoolean(self):
+ return False
+
+ def isNumeric(self):
+ return False
+
+ def isString(self):
+ return False
+
+ def isByteString(self):
+ return False
+
+ def isDOMString(self):
+ return False
+
+ def isVoid(self):
+ return self.name == "Void"
+
+ def isSequence(self):
+ return False
+
+ def isArray(self):
+ return False
+
+ def isArrayBuffer(self):
+ return False
+
+ def isArrayBufferView(self):
+ return False
+
+ def isTypedArray(self):
+ return False
+
+ def isCallbackInterface(self):
+ return False
+
+ def isNonCallbackInterface(self):
+ return False
+
+ def isGeckoInterface(self):
+ """ Returns a boolean indicating whether this type is an 'interface'
+ type that is implemented in Gecko. At the moment, this returns
+ true for all interface types that are not types from the TypedArray
+ spec."""
+ return self.isInterface() and not self.isSpiderMonkeyInterface()
+
+ def isSpiderMonkeyInterface(self):
+ """ Returns a boolean indicating whether this type is an 'interface'
+ type that is implemented in Spidermonkey. At the moment, this
+ only returns true for the types from the TypedArray spec. """
+ return self.isInterface() and (self.isArrayBuffer() or \
+ self.isArrayBufferView() or \
+ self.isTypedArray())
+
+ def isDictionary(self):
+ return False
+
+ def isInterface(self):
+ return False
+
+ def isAny(self):
+ return self.tag() == IDLType.Tags.any
+
+ def isDate(self):
+ return self.tag() == IDLType.Tags.date
+
+ def isObject(self):
+ return self.tag() == IDLType.Tags.object
+
+ def isPromise(self):
+ return False
+
+ def isComplete(self):
+ return True
+
+ def includesRestrictedFloat(self):
+ return False
+
+ def isFloat(self):
+ return False
+
+ def isUnrestricted(self):
+ # Should only call this on float types
+ assert self.isFloat()
+
+ def isSerializable(self):
+ return False
+
+ def tag(self):
+ assert False # Override me!
+
+ def treatNonCallableAsNull(self):
+ assert self.tag() == IDLType.Tags.callback
+ return self.nullable() and self.inner._treatNonCallableAsNull
+
+ def treatNonObjectAsNull(self):
+ assert self.tag() == IDLType.Tags.callback
+ return self.nullable() and self.inner._treatNonObjectAsNull
+
+ def addExtendedAttributes(self, attrs):
+ assert len(attrs) == 0
+
+ def resolveType(self, parentScope):
+ pass
+
+ def unroll(self):
+ return self
+
+ def isDistinguishableFrom(self, other):
+ raise TypeError("Can't tell whether a generic type is or is not "
+ "distinguishable from other things")
+
+class IDLUnresolvedType(IDLType):
+ """
+ Unresolved types are interface types
+ """
+
+ def __init__(self, location, name):
+ IDLType.__init__(self, location, name)
+
+ def isComplete(self):
+ return False
+
+ def complete(self, scope):
+ obj = None
+ try:
+ obj = scope._lookupIdentifier(self.name)
+ except:
+ raise WebIDLError("Unresolved type '%s'." % self.name,
+ [self.location])
+
+ assert obj
+ if obj.isType():
+ # obj itself might not be complete; deal with that.
+ assert obj != self
+ if not obj.isComplete():
+ obj = obj.complete(scope)
+ return obj
+
+ name = self.name.resolve(scope, None)
+ return IDLWrapperType(self.location, obj)
+
+ def isDistinguishableFrom(self, other):
+ raise TypeError("Can't tell whether an unresolved type is or is not "
+ "distinguishable from other things")
+
+class IDLNullableType(IDLType):
+ def __init__(self, location, innerType):
+ assert not innerType.isVoid()
+ assert not innerType == BuiltinTypes[IDLBuiltinType.Types.any]
+
+ IDLType.__init__(self, location, innerType.name)
+ self.inner = innerType
+ self.builtin = False
+
+ def __eq__(self, other):
+ return isinstance(other, IDLNullableType) and self.inner == other.inner
+
+ def __str__(self):
+ return self.inner.__str__() + "OrNull"
+
+ def nullable(self):
+ return True
+
+ def isCallback(self):
+ return self.inner.isCallback()
+
+ def isPrimitive(self):
+ return self.inner.isPrimitive()
+
+ def isBoolean(self):
+ return self.inner.isBoolean()
+
+ def isNumeric(self):
+ return self.inner.isNumeric()
+
+ def isString(self):
+ return self.inner.isString()
+
+ def isByteString(self):
+ return self.inner.isByteString()
+
+ def isDOMString(self):
+ return self.inner.isDOMString()
+
+ def isFloat(self):
+ return self.inner.isFloat()
+
+ def isUnrestricted(self):
+ return self.inner.isUnrestricted()
+
+ def includesRestrictedFloat(self):
+ return self.inner.includesRestrictedFloat()
+
+ def isInteger(self):
+ return self.inner.isInteger()
+
+ def isVoid(self):
+ return False
+
+ def isSequence(self):
+ return self.inner.isSequence()
+
+ def isArray(self):
+ return self.inner.isArray()
+
+ def isArrayBuffer(self):
+ return self.inner.isArrayBuffer()
+
+ def isArrayBufferView(self):
+ return self.inner.isArrayBufferView()
+
+ def isTypedArray(self):
+ return self.inner.isTypedArray()
+
+ def isDictionary(self):
+ return self.inner.isDictionary()
+
+ def isInterface(self):
+ return self.inner.isInterface()
+
+ def isCallbackInterface(self):
+ return self.inner.isCallbackInterface()
+
+ def isNonCallbackInterface(self):
+ return self.inner.isNonCallbackInterface()
+
+ def isEnum(self):
+ return self.inner.isEnum()
+
+ def isUnion(self):
+ return self.inner.isUnion()
+
+ def isSerializable(self):
+ return self.inner.isSerializable()
+
+ def tag(self):
+ return self.inner.tag()
+
+ def resolveType(self, parentScope):
+ assert isinstance(parentScope, IDLScope)
+ self.inner.resolveType(parentScope)
+
+ def isComplete(self):
+ return self.inner.isComplete()
+
+ def complete(self, scope):
+ self.inner = self.inner.complete(scope)
+ if self.inner.nullable():
+ raise WebIDLError("The inner type of a nullable type must not be "
+ "a nullable type",
+ [self.location, self.inner.location])
+ if self.inner.isUnion():
+ if self.inner.hasNullableType:
+ raise WebIDLError("The inner type of a nullable type must not "
+ "be a union type that itself has a nullable "
+ "type as a member type", [self.location])
+
+ self.name = self.inner.name
+ return self
+
+ def unroll(self):
+ return self.inner.unroll()
+
+ def isDistinguishableFrom(self, other):
+ if (other.nullable() or (other.isUnion() and other.hasNullableType) or
+ other.isDictionary()):
+ # Can't tell which type null should become
+ return False
+ return self.inner.isDistinguishableFrom(other)
+
+ def _getDependentObjects(self):
+ return self.inner._getDependentObjects()
+
+class IDLSequenceType(IDLType):
+ def __init__(self, location, parameterType):
+ assert not parameterType.isVoid()
+
+ IDLType.__init__(self, location, parameterType.name)
+ self.inner = parameterType
+ self.builtin = False
+
+ def __eq__(self, other):
+ return isinstance(other, IDLSequenceType) and self.inner == other.inner
+
+ def __str__(self):
+ return self.inner.__str__() + "Sequence"
+
+ def nullable(self):
+ return False
+
+ def isPrimitive(self):
+ return False;
+
+ def isString(self):
+ return False;
+
+ def isByteString(self):
+ return False
+
+ def isDOMString(self):
+ return False
+
+ def isVoid(self):
+ return False
+
+ def isSequence(self):
+ return True
+
+ def isArray(self):
+ return False
+
+ def isDictionary(self):
+ return False
+
+ def isInterface(self):
+ return False
+
+ def isEnum(self):
+ return False
+
+ def isSerializable(self):
+ return self.inner.isSerializable()
+
+ def includesRestrictedFloat(self):
+ return self.inner.includesRestrictedFloat()
+
+ def tag(self):
+ return IDLType.Tags.sequence
+
+ def resolveType(self, parentScope):
+ assert isinstance(parentScope, IDLScope)
+ self.inner.resolveType(parentScope)
+
+ def isComplete(self):
+ return self.inner.isComplete()
+
+ def complete(self, scope):
+ self.inner = self.inner.complete(scope)
+ self.name = self.inner.name
+ return self
+
+ def unroll(self):
+ return self.inner.unroll()
+
+ def isDistinguishableFrom(self, other):
+ if other.isUnion():
+ # Just forward to the union; it'll deal
+ return other.isDistinguishableFrom(self)
+ return (other.isPrimitive() or other.isString() or other.isEnum() or
+ other.isDate() or other.isNonCallbackInterface())
+
+ def _getDependentObjects(self):
+ return self.inner._getDependentObjects()
+
+class IDLUnionType(IDLType):
+ def __init__(self, location, memberTypes):
+ IDLType.__init__(self, location, "")
+ self.memberTypes = memberTypes
+ self.hasNullableType = False
+ self.hasDictionaryType = False
+ self.flatMemberTypes = None
+ self.builtin = False
+
+ def __eq__(self, other):
+ return isinstance(other, IDLUnionType) and self.memberTypes == other.memberTypes
+
+ def isVoid(self):
+ return False
+
+ def isUnion(self):
+ return True
+
+ def isSerializable(self):
+ return all(m.isSerializable() for m in self.memberTypes)
+
+ def includesRestrictedFloat(self):
+ return any(t.includesRestrictedFloat() for t in self.memberTypes)
+
+ def tag(self):
+ return IDLType.Tags.union
+
+ def resolveType(self, parentScope):
+ assert isinstance(parentScope, IDLScope)
+ for t in self.memberTypes:
+ t.resolveType(parentScope)
+
+ def isComplete(self):
+ return self.flatMemberTypes is not None
+
+ def complete(self, scope):
+ def typeName(type):
+ if isinstance(type, IDLNullableType):
+ return typeName(type.inner) + "OrNull"
+ if isinstance(type, IDLWrapperType):
+ return typeName(type._identifier.object())
+ if isinstance(type, IDLObjectWithIdentifier):
+ return typeName(type.identifier)
+ if isinstance(type, IDLType) and (type.isArray() or type.isSequence()):
+ return str(type)
+ return type.name
+
+ for (i, type) in enumerate(self.memberTypes):
+ if not type.isComplete():
+ self.memberTypes[i] = type.complete(scope)
+
+ self.name = "Or".join(typeName(type) for type in self.memberTypes)
+ self.flatMemberTypes = list(self.memberTypes)
+ i = 0
+ while i < len(self.flatMemberTypes):
+ if self.flatMemberTypes[i].nullable():
+ if self.hasNullableType:
+ raise WebIDLError("Can't have more than one nullable types in a union",
+ [nullableType.location, self.flatMemberTypes[i].location])
+ if self.hasDictionaryType:
+ raise WebIDLError("Can't have a nullable type and a "
+ "dictionary type in a union",
+ [dictionaryType.location,
+ self.flatMemberTypes[i].location])
+ self.hasNullableType = True
+ nullableType = self.flatMemberTypes[i]
+ self.flatMemberTypes[i] = self.flatMemberTypes[i].inner
+ continue
+ if self.flatMemberTypes[i].isDictionary():
+ if self.hasNullableType:
+ raise WebIDLError("Can't have a nullable type and a "
+ "dictionary type in a union",
+ [nullableType.location,
+ self.flatMemberTypes[i].location])
+ self.hasDictionaryType = True
+ dictionaryType = self.flatMemberTypes[i]
+ elif self.flatMemberTypes[i].isUnion():
+ self.flatMemberTypes[i:i + 1] = self.flatMemberTypes[i].memberTypes
+ continue
+ i += 1
+
+ for (i, t) in enumerate(self.flatMemberTypes[:-1]):
+ for u in self.flatMemberTypes[i + 1:]:
+ if not t.isDistinguishableFrom(u):
+ raise WebIDLError("Flat member types of a union should be "
+ "distinguishable, " + str(t) + " is not "
+ "distinguishable from " + str(u),
+ [self.location, t.location, u.location])
+
+ return self
+
+ def isDistinguishableFrom(self, other):
+ if self.hasNullableType and other.nullable():
+ # Can't tell which type null should become
+ return False
+ if other.isUnion():
+ otherTypes = other.unroll().memberTypes
+ else:
+ otherTypes = [other]
+ # For every type in otherTypes, check that it's distinguishable from
+ # every type in our types
+ for u in otherTypes:
+ if any(not t.isDistinguishableFrom(u) for t in self.memberTypes):
+ return False
+ return True
+
+ def _getDependentObjects(self):
+ return set(self.memberTypes)
+
+class IDLArrayType(IDLType):
+ def __init__(self, location, parameterType):
+ assert not parameterType.isVoid()
+ if parameterType.isSequence():
+ raise WebIDLError("Array type cannot parameterize over a sequence type",
+ [location])
+ if parameterType.isDictionary():
+ raise WebIDLError("Array type cannot parameterize over a dictionary type",
+ [location])
+
+ IDLType.__init__(self, location, parameterType.name)
+ self.inner = parameterType
+ self.builtin = False
+
+ def __eq__(self, other):
+ return isinstance(other, IDLArrayType) and self.inner == other.inner
+
+ def __str__(self):
+ return self.inner.__str__() + "Array"
+
+ def nullable(self):
+ return False
+
+ def isPrimitive(self):
+ return False
+
+ def isString(self):
+ return False
+
+ def isByteString(self):
+ return False
+
+ def isDOMString(self):
+ return False
+
+ def isVoid(self):
+ return False
+
+ def isSequence(self):
+ assert not self.inner.isSequence()
+ return False
+
+ def isArray(self):
+ return True
+
+ def isDictionary(self):
+ assert not self.inner.isDictionary()
+ return False
+
+ def isInterface(self):
+ return False
+
+ def isEnum(self):
+ return False
+
+ def tag(self):
+ return IDLType.Tags.array
+
+ def resolveType(self, parentScope):
+ assert isinstance(parentScope, IDLScope)
+ self.inner.resolveType(parentScope)
+
+ def isComplete(self):
+ return self.inner.isComplete()
+
+ def complete(self, scope):
+ self.inner = self.inner.complete(scope)
+ self.name = self.inner.name
+
+ if self.inner.isDictionary():
+ raise WebIDLError("Array type must not contain "
+ "dictionary as element type.",
+ [self.inner.location])
+
+ assert not self.inner.isSequence()
+
+ return self
+
+ def unroll(self):
+ return self.inner.unroll()
+
+ def isDistinguishableFrom(self, other):
+ if other.isUnion():
+ # Just forward to the union; it'll deal
+ return other.isDistinguishableFrom(self)
+ return (other.isPrimitive() or other.isString() or other.isEnum() or
+ other.isDate() or other.isNonCallbackInterface())
+
+ def _getDependentObjects(self):
+ return self.inner._getDependentObjects()
+
+class IDLTypedefType(IDLType, IDLObjectWithIdentifier):
+ def __init__(self, location, innerType, name):
+ IDLType.__init__(self, location, innerType.name)
+
+ identifier = IDLUnresolvedIdentifier(location, name)
+
+ IDLObjectWithIdentifier.__init__(self, location, None, identifier)
+
+ self.inner = innerType
+ self.name = name
+ self.builtin = False
+
+ def __eq__(self, other):
+ return isinstance(other, IDLTypedefType) and self.inner == other.inner
+
+ def __str__(self):
+ return self.identifier.name
+
+ def nullable(self):
+ return self.inner.nullable()
+
+ def isPrimitive(self):
+ return self.inner.isPrimitive()
+
+ def isBoolean(self):
+ return self.inner.isBoolean()
+
+ def isNumeric(self):
+ return self.inner.isNumeric()
+
+ def isString(self):
+ return self.inner.isString()
+
+ def isByteString(self):
+ return self.inner.isByteString()
+
+ def isDOMString(self):
+ return self.inner.isDOMString()
+
+ def isVoid(self):
+ return self.inner.isVoid()
+
+ def isSequence(self):
+ return self.inner.isSequence()
+
+ def isArray(self):
+ return self.inner.isArray()
+
+ def isDictionary(self):
+ return self.inner.isDictionary()
+
+ def isArrayBuffer(self):
+ return self.inner.isArrayBuffer()
+
+ def isArrayBufferView(self):
+ return self.inner.isArrayBufferView()
+
+ def isTypedArray(self):
+ return self.inner.isTypedArray()
+
+ def isInterface(self):
+ return self.inner.isInterface()
+
+ def isCallbackInterface(self):
+ return self.inner.isCallbackInterface()
+
+ def isNonCallbackInterface(self):
+ return self.inner.isNonCallbackInterface()
+
+ def isComplete(self):
+ return False
+
+ def complete(self, parentScope):
+ if not self.inner.isComplete():
+ self.inner = self.inner.complete(parentScope)
+ assert self.inner.isComplete()
+ return self.inner
+
+ def finish(self, parentScope):
+ # Maybe the IDLObjectWithIdentifier for the typedef should be
+ # a separate thing from the type? If that happens, we can
+ # remove some hackery around avoiding isInterface() in
+ # Configuration.py.
+ self.complete(parentScope)
+
+ def validate(self):
+ pass
+
+ # Do we need a resolveType impl? I don't think it's particularly useful....
+
+ def tag(self):
+ return self.inner.tag()
+
+ def unroll(self):
+ return self.inner.unroll()
+
+ def isDistinguishableFrom(self, other):
+ return self.inner.isDistinguishableFrom(other)
+
+ def _getDependentObjects(self):
+ return self.inner._getDependentObjects()
+
+class IDLWrapperType(IDLType):
+ def __init__(self, location, inner):
+ IDLType.__init__(self, location, inner.identifier.name)
+ self.inner = inner
+ self._identifier = inner.identifier
+ self.builtin = False
+
+ def __eq__(self, other):
+ return isinstance(other, IDLWrapperType) and \
+ self._identifier == other._identifier and \
+ self.builtin == other.builtin
+
+ def __str__(self):
+ return str(self.name) + " (Wrapper)"
+
+ def nullable(self):
+ return False
+
+ def isPrimitive(self):
+ return False
+
+ def isString(self):
+ return False
+
+ def isByteString(self):
+ return False
+
+ def isDOMString(self):
+ return False
+
+ def isVoid(self):
+ return False
+
+ def isSequence(self):
+ return False
+
+ def isArray(self):
+ return False
+
+ def isDictionary(self):
+ return isinstance(self.inner, IDLDictionary)
+
+ def isInterface(self):
+ return isinstance(self.inner, IDLInterface) or \
+ isinstance(self.inner, IDLExternalInterface)
+
+ def isCallbackInterface(self):
+ return self.isInterface() and self.inner.isCallback()
+
+ def isNonCallbackInterface(self):
+ return self.isInterface() and not self.inner.isCallback()
+
+ def isEnum(self):
+ return isinstance(self.inner, IDLEnum)
+
+ def isPromise(self):
+ return isinstance(self.inner, IDLInterface) and \
+ self.inner.identifier.name == "Promise"
+
+ def isSerializable(self):
+ if self.isInterface():
+ if self.inner.isExternal():
+ return False
+ return any(m.isMethod() and m.isJsonifier() for m in self.inner.members)
+ elif self.isEnum():
+ return True
+ elif self.isDictionary():
+ return all(m.type.isSerializable() for m in self.inner.members)
+ else:
+ raise WebIDLError("IDLWrapperType wraps type %s that we don't know if "
+ "is serializable" % type(self.inner), [self.location])
+
+ def resolveType(self, parentScope):
+ assert isinstance(parentScope, IDLScope)
+ self.inner.resolve(parentScope)
+
+ def isComplete(self):
+ return True
+
+ def tag(self):
+ if self.isInterface():
+ return IDLType.Tags.interface
+ elif self.isEnum():
+ return IDLType.Tags.enum
+ elif self.isDictionary():
+ return IDLType.Tags.dictionary
+ else:
+ assert False
+
+ def isDistinguishableFrom(self, other):
+ if other.isUnion():
+ # Just forward to the union; it'll deal
+ return other.isDistinguishableFrom(self)
+ assert self.isInterface() or self.isEnum() or self.isDictionary()
+ if self.isEnum():
+ return (other.isPrimitive() or other.isInterface() or other.isObject() or
+ other.isCallback() or other.isDictionary() or
+ other.isSequence() or other.isArray() or
+ other.isDate())
+ if self.isDictionary() and other.nullable():
+ return False
+ if other.isPrimitive() or other.isString() or other.isEnum() or other.isDate():
+ return True
+ if self.isDictionary():
+ return other.isNonCallbackInterface()
+
+ assert self.isInterface()
+ if other.isInterface():
+ if other.isSpiderMonkeyInterface():
+ # Just let |other| handle things
+ return other.isDistinguishableFrom(self)
+ assert self.isGeckoInterface() and other.isGeckoInterface()
+ if self.inner.isExternal() or other.unroll().inner.isExternal():
+ return self != other
+ return (len(self.inner.interfacesBasedOnSelf &
+ other.unroll().inner.interfacesBasedOnSelf) == 0 and
+ (self.isNonCallbackInterface() or
+ other.isNonCallbackInterface()))
+ if (other.isDictionary() or other.isCallback() or
+ other.isSequence() or other.isArray()):
+ return self.isNonCallbackInterface()
+
+ # Not much else |other| can be
+ assert other.isObject()
+ return False
+
+ def _getDependentObjects(self):
+ # NB: The codegen for an interface type depends on
+ # a) That the identifier is in fact an interface (as opposed to
+ # a dictionary or something else).
+ # b) The native type of the interface.
+ # If we depend on the interface object we will also depend on
+ # anything the interface depends on which is undesirable. We
+ # considered implementing a dependency just on the interface type
+ # file, but then every modification to an interface would cause this
+ # to be regenerated which is still undesirable. We decided not to
+ # depend on anything, reasoning that:
+ # 1) Changing the concrete type of the interface requires modifying
+ # Bindings.conf, which is still a global dependency.
+ # 2) Changing an interface to a dictionary (or vice versa) with the
+ # same identifier should be incredibly rare.
+ return set()
+
+class IDLBuiltinType(IDLType):
+
+ Types = enum(
+ # The integer types
+ 'byte',
+ 'octet',
+ 'short',
+ 'unsigned_short',
+ 'long',
+ 'unsigned_long',
+ 'long_long',
+ 'unsigned_long_long',
+ # Additional primitive types
+ 'boolean',
+ 'unrestricted_float',
+ 'float',
+ 'unrestricted_double',
+ # IMPORTANT: "double" must be the last primitive type listed
+ 'double',
+ # Other types
+ 'any',
+ 'domstring',
+ 'bytestring',
+ 'object',
+ 'date',
+ 'void',
+ # Funny stuff
+ 'ArrayBuffer',
+ 'ArrayBufferView',
+ 'Int8Array',
+ 'Uint8Array',
+ 'Uint8ClampedArray',
+ 'Int16Array',
+ 'Uint16Array',
+ 'Int32Array',
+ 'Uint32Array',
+ 'Float32Array',
+ 'Float64Array'
+ )
+
+ TagLookup = {
+ Types.byte: IDLType.Tags.int8,
+ Types.octet: IDLType.Tags.uint8,
+ Types.short: IDLType.Tags.int16,
+ Types.unsigned_short: IDLType.Tags.uint16,
+ Types.long: IDLType.Tags.int32,
+ Types.unsigned_long: IDLType.Tags.uint32,
+ Types.long_long: IDLType.Tags.int64,
+ Types.unsigned_long_long: IDLType.Tags.uint64,
+ Types.boolean: IDLType.Tags.bool,
+ Types.unrestricted_float: IDLType.Tags.unrestricted_float,
+ Types.float: IDLType.Tags.float,
+ Types.unrestricted_double: IDLType.Tags.unrestricted_double,
+ Types.double: IDLType.Tags.double,
+ Types.any: IDLType.Tags.any,
+ Types.domstring: IDLType.Tags.domstring,
+ Types.bytestring: IDLType.Tags.bytestring,
+ Types.object: IDLType.Tags.object,
+ Types.date: IDLType.Tags.date,
+ Types.void: IDLType.Tags.void,
+ Types.ArrayBuffer: IDLType.Tags.interface,
+ Types.ArrayBufferView: IDLType.Tags.interface,
+ Types.Int8Array: IDLType.Tags.interface,
+ Types.Uint8Array: IDLType.Tags.interface,
+ Types.Uint8ClampedArray: IDLType.Tags.interface,
+ Types.Int16Array: IDLType.Tags.interface,
+ Types.Uint16Array: IDLType.Tags.interface,
+ Types.Int32Array: IDLType.Tags.interface,
+ Types.Uint32Array: IDLType.Tags.interface,
+ Types.Float32Array: IDLType.Tags.interface,
+ Types.Float64Array: IDLType.Tags.interface
+ }
+
+ def __init__(self, location, name, type):
+ IDLType.__init__(self, location, name)
+ self.builtin = True
+ self._typeTag = type
+
+ def isPrimitive(self):
+ return self._typeTag <= IDLBuiltinType.Types.double
+
+ def isBoolean(self):
+ return self._typeTag == IDLBuiltinType.Types.boolean
+
+ def isNumeric(self):
+ return self.isPrimitive() and not self.isBoolean()
+
+ def isString(self):
+ return self._typeTag == IDLBuiltinType.Types.domstring or \
+ self._typeTag == IDLBuiltinType.Types.bytestring
+
+ def isByteString(self):
+ return self._typeTag == IDLBuiltinType.Types.bytestring
+
+ def isDOMString(self):
+ return self._typeTag == IDLBuiltinType.Types.domstring
+
+ def isInteger(self):
+ return self._typeTag <= IDLBuiltinType.Types.unsigned_long_long
+
+ def isArrayBuffer(self):
+ return self._typeTag == IDLBuiltinType.Types.ArrayBuffer
+
+ def isArrayBufferView(self):
+ return self._typeTag == IDLBuiltinType.Types.ArrayBufferView
+
+ def isTypedArray(self):
+ return self._typeTag >= IDLBuiltinType.Types.Int8Array and \
+ self._typeTag <= IDLBuiltinType.Types.Float64Array
+
+ def isInterface(self):
+ # TypedArray things are interface types per the TypedArray spec,
+ # but we handle them as builtins because SpiderMonkey implements
+ # all of it internally.
+ return self.isArrayBuffer() or \
+ self.isArrayBufferView() or \
+ self.isTypedArray()
+
+ def isNonCallbackInterface(self):
+ # All the interfaces we can be are non-callback
+ return self.isInterface()
+
+ def isFloat(self):
+ return self._typeTag == IDLBuiltinType.Types.float or \
+ self._typeTag == IDLBuiltinType.Types.double or \
+ self._typeTag == IDLBuiltinType.Types.unrestricted_float or \
+ self._typeTag == IDLBuiltinType.Types.unrestricted_double
+
+ def isUnrestricted(self):
+ assert self.isFloat()
+ return self._typeTag == IDLBuiltinType.Types.unrestricted_float or \
+ self._typeTag == IDLBuiltinType.Types.unrestricted_double
+
+ def isSerializable(self):
+ return self.isPrimitive() or self.isDOMString() or self.isDate()
+
+ def includesRestrictedFloat(self):
+ return self.isFloat() and not self.isUnrestricted()
+
+ def tag(self):
+ return IDLBuiltinType.TagLookup[self._typeTag]
+
+ def isDistinguishableFrom(self, other):
+ if other.isUnion():
+ # Just forward to the union; it'll deal
+ return other.isDistinguishableFrom(self)
+ if self.isBoolean():
+ return (other.isNumeric() or other.isString() or other.isEnum() or
+ other.isInterface() or other.isObject() or
+ other.isCallback() or other.isDictionary() or
+ other.isSequence() or other.isArray() or
+ other.isDate())
+ if self.isNumeric():
+ return (other.isBoolean() or other.isString() or other.isEnum() or
+ other.isInterface() or other.isObject() or
+ other.isCallback() or other.isDictionary() or
+ other.isSequence() or other.isArray() or
+ other.isDate())
+ if self.isString():
+ return (other.isPrimitive() or other.isInterface() or
+ other.isObject() or
+ other.isCallback() or other.isDictionary() or
+ other.isSequence() or other.isArray() or
+ other.isDate())
+ if self.isAny():
+ # Can't tell "any" apart from anything
+ return False
+ if self.isObject():
+ return other.isPrimitive() or other.isString() or other.isEnum()
+ if self.isDate():
+ return (other.isPrimitive() or other.isString() or other.isEnum() or
+ other.isInterface() or other.isCallback() or
+ other.isDictionary() or other.isSequence() or
+ other.isArray())
+ if self.isVoid():
+ return not other.isVoid()
+ # Not much else we could be!
+ assert self.isSpiderMonkeyInterface()
+ # Like interfaces, but we know we're not a callback
+ return (other.isPrimitive() or other.isString() or other.isEnum() or
+ other.isCallback() or other.isDictionary() or
+ other.isSequence() or other.isArray() or other.isDate() or
+ (other.isInterface() and (
+ # ArrayBuffer is distinguishable from everything
+ # that's not an ArrayBuffer or a callback interface
+ (self.isArrayBuffer() and not other.isArrayBuffer()) or
+ # ArrayBufferView is distinguishable from everything
+ # that's not an ArrayBufferView or typed array.
+ (self.isArrayBufferView() and not other.isArrayBufferView() and
+ not other.isTypedArray()) or
+ # Typed arrays are distinguishable from everything
+ # except ArrayBufferView and the same type of typed
+ # array
+ (self.isTypedArray() and not other.isArrayBufferView() and not
+ (other.isTypedArray() and other.name == self.name)))))
+
+ def _getDependentObjects(self):
+ return set()
+
+BuiltinTypes = {
+ IDLBuiltinType.Types.byte:
+ IDLBuiltinType(BuiltinLocation("<builtin type>"), "Byte",
+ IDLBuiltinType.Types.byte),
+ IDLBuiltinType.Types.octet:
+ IDLBuiltinType(BuiltinLocation("<builtin type>"), "Octet",
+ IDLBuiltinType.Types.octet),
+ IDLBuiltinType.Types.short:
+ IDLBuiltinType(BuiltinLocation("<builtin type>"), "Short",
+ IDLBuiltinType.Types.short),
+ IDLBuiltinType.Types.unsigned_short:
+ IDLBuiltinType(BuiltinLocation("<builtin type>"), "UnsignedShort",
+ IDLBuiltinType.Types.unsigned_short),
+ IDLBuiltinType.Types.long:
+ IDLBuiltinType(BuiltinLocation("<builtin type>"), "Long",
+ IDLBuiltinType.Types.long),
+ IDLBuiltinType.Types.unsigned_long:
+ IDLBuiltinType(BuiltinLocation("<builtin type>"), "UnsignedLong",
+ IDLBuiltinType.Types.unsigned_long),
+ IDLBuiltinType.Types.long_long:
+ IDLBuiltinType(BuiltinLocation("<builtin type>"), "LongLong",
+ IDLBuiltinType.Types.long_long),
+ IDLBuiltinType.Types.unsigned_long_long:
+ IDLBuiltinType(BuiltinLocation("<builtin type>"), "UnsignedLongLong",
+ IDLBuiltinType.Types.unsigned_long_long),
+ IDLBuiltinType.Types.boolean:
+ IDLBuiltinType(BuiltinLocation("<builtin type>"), "Boolean",
+ IDLBuiltinType.Types.boolean),
+ IDLBuiltinType.Types.float:
+ IDLBuiltinType(BuiltinLocation("<builtin type>"), "Float",
+ IDLBuiltinType.Types.float),
+ IDLBuiltinType.Types.unrestricted_float:
+ IDLBuiltinType(BuiltinLocation("<builtin type>"), "UnrestrictedFloat",
+ IDLBuiltinType.Types.unrestricted_float),
+ IDLBuiltinType.Types.double:
+ IDLBuiltinType(BuiltinLocation("<builtin type>"), "Double",
+ IDLBuiltinType.Types.double),
+ IDLBuiltinType.Types.unrestricted_double:
+ IDLBuiltinType(BuiltinLocation("<builtin type>"), "UnrestrictedDouble",
+ IDLBuiltinType.Types.unrestricted_double),
+ IDLBuiltinType.Types.any:
+ IDLBuiltinType(BuiltinLocation("<builtin type>"), "Any",
+ IDLBuiltinType.Types.any),
+ IDLBuiltinType.Types.domstring:
+ IDLBuiltinType(BuiltinLocation("<builtin type>"), "String",
+ IDLBuiltinType.Types.domstring),
+ IDLBuiltinType.Types.bytestring:
+ IDLBuiltinType(BuiltinLocation("<builtin type>"), "ByteString",
+ IDLBuiltinType.Types.bytestring),
+ IDLBuiltinType.Types.object:
+ IDLBuiltinType(BuiltinLocation("<builtin type>"), "Object",
+ IDLBuiltinType.Types.object),
+ IDLBuiltinType.Types.date:
+ IDLBuiltinType(BuiltinLocation("<builtin type>"), "Date",
+ IDLBuiltinType.Types.date),
+ IDLBuiltinType.Types.void:
+ IDLBuiltinType(BuiltinLocation("<builtin type>"), "Void",
+ IDLBuiltinType.Types.void),
+ IDLBuiltinType.Types.ArrayBuffer:
+ IDLBuiltinType(BuiltinLocation("<builtin type>"), "ArrayBuffer",
+ IDLBuiltinType.Types.ArrayBuffer),
+ IDLBuiltinType.Types.ArrayBufferView:
+ IDLBuiltinType(BuiltinLocation("<builtin type>"), "ArrayBufferView",
+ IDLBuiltinType.Types.ArrayBufferView),
+ IDLBuiltinType.Types.Int8Array:
+ IDLBuiltinType(BuiltinLocation("<builtin type>"), "Int8Array",
+ IDLBuiltinType.Types.Int8Array),
+ IDLBuiltinType.Types.Uint8Array:
+ IDLBuiltinType(BuiltinLocation("<builtin type>"), "Uint8Array",
+ IDLBuiltinType.Types.Uint8Array),
+ IDLBuiltinType.Types.Uint8ClampedArray:
+ IDLBuiltinType(BuiltinLocation("<builtin type>"), "Uint8ClampedArray",
+ IDLBuiltinType.Types.Uint8ClampedArray),
+ IDLBuiltinType.Types.Int16Array:
+ IDLBuiltinType(BuiltinLocation("<builtin type>"), "Int16Array",
+ IDLBuiltinType.Types.Int16Array),
+ IDLBuiltinType.Types.Uint16Array:
+ IDLBuiltinType(BuiltinLocation("<builtin type>"), "Uint16Array",
+ IDLBuiltinType.Types.Uint16Array),
+ IDLBuiltinType.Types.Int32Array:
+ IDLBuiltinType(BuiltinLocation("<builtin type>"), "Int32Array",
+ IDLBuiltinType.Types.Int32Array),
+ IDLBuiltinType.Types.Uint32Array:
+ IDLBuiltinType(BuiltinLocation("<builtin type>"), "Uint32Array",
+ IDLBuiltinType.Types.Uint32Array),
+ IDLBuiltinType.Types.Float32Array:
+ IDLBuiltinType(BuiltinLocation("<builtin type>"), "Float32Array",
+ IDLBuiltinType.Types.Float32Array),
+ IDLBuiltinType.Types.Float64Array:
+ IDLBuiltinType(BuiltinLocation("<builtin type>"), "Float64Array",
+ IDLBuiltinType.Types.Float64Array)
+ }
+
+
+integerTypeSizes = {
+ IDLBuiltinType.Types.byte: (-128, 127),
+ IDLBuiltinType.Types.octet: (0, 255),
+ IDLBuiltinType.Types.short: (-32768, 32767),
+ IDLBuiltinType.Types.unsigned_short: (0, 65535),
+ IDLBuiltinType.Types.long: (-2147483648, 2147483647),
+ IDLBuiltinType.Types.unsigned_long: (0, 4294967295),
+ IDLBuiltinType.Types.long_long: (-9223372036854775808,
+ 9223372036854775807),
+ IDLBuiltinType.Types.unsigned_long_long: (0, 18446744073709551615)
+ }
+
+def matchIntegerValueToType(value):
+ for type, extremes in integerTypeSizes.items():
+ (min, max) = extremes
+ if value <= max and value >= min:
+ return BuiltinTypes[type]
+
+ return None
+
+class IDLValue(IDLObject):
+ def __init__(self, location, type, value):
+ IDLObject.__init__(self, location)
+ self.type = type
+ assert isinstance(type, IDLType)
+
+ self.value = value
+
+ def coerceToType(self, type, location):
+ if type == self.type:
+ return self # Nothing to do
+
+ # We first check for unions to ensure that even if the union is nullable
+ # we end up with the right flat member type, not the union's type.
+ if type.isUnion():
+ # We use the flat member types here, because if we have a nullable
+ # member type, or a nested union, we want the type the value
+ # actually coerces to, not the nullable or nested union type.
+ for subtype in type.unroll().flatMemberTypes:
+ try:
+ coercedValue = self.coerceToType(subtype, location)
+ # Create a new IDLValue to make sure that we have the
+ # correct float/double type. This is necessary because we
+ # use the value's type when it is a default value of a
+ # union, and the union cares about the exact float type.
+ return IDLValue(self.location, subtype, coercedValue.value)
+ except:
+ pass
+ # If the type allows null, rerun this matching on the inner type, except
+ # nullable enums. We handle those specially, because we want our
+ # default string values to stay strings even when assigned to a nullable
+ # enum.
+ elif type.nullable() and not type.isEnum():
+ innerValue = self.coerceToType(type.inner, location)
+ return IDLValue(self.location, type, innerValue.value)
+
+ elif self.type.isInteger() and type.isInteger():
+ # We're both integer types. See if we fit.
+
+ (min, max) = integerTypeSizes[type._typeTag]
+ if self.value <= max and self.value >= min:
+ # Promote
+ return IDLValue(self.location, type, self.value)
+ else:
+ raise WebIDLError("Value %s is out of range for type %s." %
+ (self.value, type), [location])
+ elif self.type.isInteger() and type.isFloat():
+ # Convert an integer literal into float
+ if -2**24 <= self.value <= 2**24:
+ floatType = BuiltinTypes[IDLBuiltinType.Types.float]
+ return IDLValue(self.location, floatType, float(self.value))
+ else:
+ raise WebIDLError("Converting value %s to %s will lose precision." %
+ (self.value, type), [location])
+ elif self.type.isString() and type.isEnum():
+ # Just keep our string, but make sure it's a valid value for this enum
+ enum = type.unroll().inner
+ if self.value not in enum.values():
+ raise WebIDLError("'%s' is not a valid default value for enum %s"
+ % (self.value, enum.identifier.name),
+ [location, enum.location])
+ return self
+ elif self.type.isFloat() and type.isFloat():
+ if (not type.isUnrestricted() and
+ (self.value == float("inf") or self.value == float("-inf") or
+ math.isnan(self.value))):
+ raise WebIDLError("Trying to convert unrestricted value %s to non-unrestricted"
+ % self.value, [location]);
+ return self
+ raise WebIDLError("Cannot coerce type %s to type %s." %
+ (self.type, type), [location])
+
+ def _getDependentObjects(self):
+ return set()
+
+class IDLNullValue(IDLObject):
+ def __init__(self, location):
+ IDLObject.__init__(self, location)
+ self.type = None
+ self.value = None
+
+ def coerceToType(self, type, location):
+ if (not isinstance(type, IDLNullableType) and
+ not (type.isUnion() and type.hasNullableType) and
+ not (type.isUnion() and type.hasDictionaryType) and
+ not type.isDictionary() and
+ not type.isAny()):
+ raise WebIDLError("Cannot coerce null value to type %s." % type,
+ [location])
+
+ nullValue = IDLNullValue(self.location)
+ if type.isUnion() and not type.nullable() and type.hasDictionaryType:
+ # We're actually a default value for the union's dictionary member.
+ # Use its type.
+ for t in type.flatMemberTypes:
+ if t.isDictionary():
+ nullValue.type = t
+ return nullValue
+ nullValue.type = type
+ return nullValue
+
+ def _getDependentObjects(self):
+ return set()
+
+class IDLUndefinedValue(IDLObject):
+ def __init__(self, location):
+ IDLObject.__init__(self, location)
+ self.type = None
+ self.value = None
+
+ def coerceToType(self, type, location):
+ if not type.isAny():
+ raise WebIDLError("Cannot coerce undefined value to type %s." % type,
+ [location])
+
+ undefinedValue = IDLUndefinedValue(self.location)
+ undefinedValue.type = type
+ return undefinedValue
+
+ def _getDependentObjects(self):
+ return set()
+
+class IDLInterfaceMember(IDLObjectWithIdentifier):
+
+ Tags = enum(
+ 'Const',
+ 'Attr',
+ 'Method'
+ )
+
+ Special = enum(
+ 'Static',
+ 'Stringifier'
+ )
+
+ def __init__(self, location, identifier, tag):
+ IDLObjectWithIdentifier.__init__(self, location, None, identifier)
+ self.tag = tag
+ self._extendedAttrDict = {}
+
+ def isMethod(self):
+ return self.tag == IDLInterfaceMember.Tags.Method
+
+ def isAttr(self):
+ return self.tag == IDLInterfaceMember.Tags.Attr
+
+ def isConst(self):
+ return self.tag == IDLInterfaceMember.Tags.Const
+
+ def addExtendedAttributes(self, attrs):
+ for attr in attrs:
+ self.handleExtendedAttribute(attr)
+ attrlist = attr.listValue()
+ self._extendedAttrDict[attr.identifier()] = attrlist if len(attrlist) else True
+
+ def handleExtendedAttribute(self, attr):
+ pass
+
+ def getExtendedAttribute(self, name):
+ return self._extendedAttrDict.get(name, None)
+
+class IDLConst(IDLInterfaceMember):
+ def __init__(self, location, identifier, type, value):
+ IDLInterfaceMember.__init__(self, location, identifier,
+ IDLInterfaceMember.Tags.Const)
+
+ assert isinstance(type, IDLType)
+ if type.isDictionary():
+ raise WebIDLError("A constant cannot be of a dictionary type",
+ [self.location])
+ self.type = type
+ self.value = value
+
+ if identifier.name == "prototype":
+ raise WebIDLError("The identifier of a constant must not be 'prototype'",
+ [location])
+
+ def __str__(self):
+ return "'%s' const '%s'" % (self.type, self.identifier)
+
+ def finish(self, scope):
+ if not self.type.isComplete():
+ type = self.type.complete(scope)
+ if not type.isPrimitive() and not type.isString():
+ locations = [self.type.location, type.location]
+ try:
+ locations.append(type.inner.location)
+ except:
+ pass
+ raise WebIDLError("Incorrect type for constant", locations)
+ self.type = type
+
+ # The value might not match the type
+ coercedValue = self.value.coerceToType(self.type, self.location)
+ assert coercedValue
+
+ self.value = coercedValue
+
+ def validate(self):
+ pass
+
+ def _getDependentObjects(self):
+ return set([self.type, self.value])
+
+class IDLAttribute(IDLInterfaceMember):
+ def __init__(self, location, identifier, type, readonly, inherit=False,
+ static=False, stringifier=False):
+ IDLInterfaceMember.__init__(self, location, identifier,
+ IDLInterfaceMember.Tags.Attr)
+
+ assert isinstance(type, IDLType)
+ self.type = type
+ self.readonly = readonly
+ self.inherit = inherit
+ self.static = static
+ self.lenientThis = False
+ self._unforgeable = False
+ self.stringifier = stringifier
+ self.enforceRange = False
+ self.clamp = False
+ self.slotIndex = None
+
+ if static and identifier.name == "prototype":
+ raise WebIDLError("The identifier of a static attribute must not be 'prototype'",
+ [location])
+
+ if readonly and inherit:
+ raise WebIDLError("An attribute cannot be both 'readonly' and 'inherit'",
+ [self.location])
+
+ def isStatic(self):
+ return self.static
+
+ def __str__(self):
+ return "'%s' attribute '%s'" % (self.type, self.identifier)
+
+ def finish(self, scope):
+ if not self.type.isComplete():
+ t = self.type.complete(scope)
+
+ assert not isinstance(t, IDLUnresolvedType)
+ assert not isinstance(t, IDLTypedefType)
+ assert not isinstance(t.name, IDLUnresolvedIdentifier)
+ self.type = t
+
+ if self.type.isDictionary() and not self.getExtendedAttribute("Cached"):
+ raise WebIDLError("An attribute cannot be of a dictionary type",
+ [self.location])
+ if self.type.isSequence() and not self.getExtendedAttribute("Cached"):
+ raise WebIDLError("A non-cached attribute cannot be of a sequence "
+ "type", [self.location])
+ if self.type.isUnion():
+ for f in self.type.unroll().flatMemberTypes:
+ if f.isDictionary():
+ raise WebIDLError("An attribute cannot be of a union "
+ "type if one of its member types (or "
+ "one of its member types's member "
+ "types, and so on) is a dictionary "
+ "type", [self.location, f.location])
+ if f.isSequence():
+ raise WebIDLError("An attribute cannot be of a union "
+ "type if one of its member types (or "
+ "one of its member types's member "
+ "types, and so on) is a sequence "
+ "type", [self.location, f.location])
+ if not self.type.isInterface() and self.getExtendedAttribute("PutForwards"):
+ raise WebIDLError("An attribute with [PutForwards] must have an "
+ "interface type as its type", [self.location])
+
+ if not self.type.isInterface() and self.getExtendedAttribute("SameObject"):
+ raise WebIDLError("An attribute with [SameObject] must have an "
+ "interface type as its type", [self.location])
+
+ def validate(self):
+ if ((self.getExtendedAttribute("Cached") or
+ self.getExtendedAttribute("StoreInSlot")) and
+ not self.getExtendedAttribute("Constant") and
+ not self.getExtendedAttribute("Pure")):
+ raise WebIDLError("Cached attributes and attributes stored in "
+ "slots must be constant or pure, since the "
+ "getter won't always be called.",
+ [self.location])
+ if self.getExtendedAttribute("Frozen"):
+ if not self.type.isSequence() and not self.type.isDictionary():
+ raise WebIDLError("[Frozen] is only allowed on sequence-valued "
+ "and dictionary-valued attributes",
+ [self.location])
+
+ def handleExtendedAttribute(self, attr):
+ identifier = attr.identifier()
+ if identifier == "SetterThrows" and self.readonly:
+ raise WebIDLError("Readonly attributes must not be flagged as "
+ "[SetterThrows]",
+ [self.location])
+ elif (((identifier == "Throws" or identifier == "GetterThrows") and
+ self.getExtendedAttribute("StoreInSlot")) or
+ (identifier == "StoreInSlot" and
+ (self.getExtendedAttribute("Throws") or
+ self.getExtendedAttribute("GetterThrows")))):
+ raise WebIDLError("Throwing things can't be [Pure] or [Constant] "
+ "or [SameObject] or [StoreInSlot]",
+ [attr.location])
+ elif identifier == "LenientThis":
+ if not attr.noArguments():
+ raise WebIDLError("[LenientThis] must take no arguments",
+ [attr.location])
+ if self.isStatic():
+ raise WebIDLError("[LenientThis] is only allowed on non-static "
+ "attributes", [attr.location, self.location])
+ if self.getExtendedAttribute("CrossOriginReadable"):
+ raise WebIDLError("[LenientThis] is not allowed in combination "
+ "with [CrossOriginReadable]",
+ [attr.location, self.location])
+ if self.getExtendedAttribute("CrossOriginWritable"):
+ raise WebIDLError("[LenientThis] is not allowed in combination "
+ "with [CrossOriginWritable]",
+ [attr.location, self.location])
+ self.lenientThis = True
+ elif identifier == "Unforgeable":
+ if not self.readonly:
+ raise WebIDLError("[Unforgeable] is only allowed on readonly "
+ "attributes", [attr.location, self.location])
+ if self.isStatic():
+ raise WebIDLError("[Unforgeable] is only allowed on non-static "
+ "attributes", [attr.location, self.location])
+ self._unforgeable = True
+ elif identifier == "SameObject" and not self.readonly:
+ raise WebIDLError("[SameObject] only allowed on readonly attributes",
+ [attr.location, self.location])
+ elif identifier == "Constant" and not self.readonly:
+ raise WebIDLError("[Constant] only allowed on readonly attributes",
+ [attr.location, self.location])
+ elif identifier == "PutForwards":
+ if not self.readonly:
+ raise WebIDLError("[PutForwards] is only allowed on readonly "
+ "attributes", [attr.location, self.location])
+ if self.isStatic():
+ raise WebIDLError("[PutForwards] is only allowed on non-static "
+ "attributes", [attr.location, self.location])
+ if self.getExtendedAttribute("Replaceable") is not None:
+ raise WebIDLError("[PutForwards] and [Replaceable] can't both "
+ "appear on the same attribute",
+ [attr.location, self.location])
+ if not attr.hasValue():
+ raise WebIDLError("[PutForwards] takes an identifier",
+ [attr.location, self.location])
+ elif identifier == "Replaceable":
+ if self.getExtendedAttribute("PutForwards") is not None:
+ raise WebIDLError("[PutForwards] and [Replaceable] can't both "
+ "appear on the same attribute",
+ [attr.location, self.location])
+ elif identifier == "LenientFloat":
+ if self.readonly:
+ raise WebIDLError("[LenientFloat] used on a readonly attribute",
+ [attr.location, self.location])
+ if not self.type.includesRestrictedFloat():
+ raise WebIDLError("[LenientFloat] used on an attribute with a "
+ "non-restricted-float type",
+ [attr.location, self.location])
+ elif identifier == "EnforceRange":
+ if self.readonly:
+ raise WebIDLError("[EnforceRange] used on a readonly attribute",
+ [attr.location, self.location])
+ self.enforceRange = True
+ elif identifier == "Clamp":
+ if self.readonly:
+ raise WebIDLError("[Clamp] used on a readonly attribute",
+ [attr.location, self.location])
+ self.clamp = True
+ elif identifier == "StoreInSlot":
+ if self.getExtendedAttribute("Cached"):
+ raise WebIDLError("[StoreInSlot] and [Cached] must not be "
+ "specified on the same attribute",
+ [attr.location, self.location])
+ elif identifier == "Cached":
+ if self.getExtendedAttribute("StoreInSlot"):
+ raise WebIDLError("[Cached] and [StoreInSlot] must not be "
+ "specified on the same attribute",
+ [attr.location, self.location])
+ elif (identifier == "CrossOriginReadable" or
+ identifier == "CrossOriginWritable"):
+ if not attr.noArguments():
+ raise WebIDLError("[%s] must take no arguments" % identifier,
+ [attr.location])
+ if self.isStatic():
+ raise WebIDLError("[%s] is only allowed on non-static "
+ "attributes" % identifier,
+ [attr.location, self.location])
+ if self.getExtendedAttribute("LenientThis"):
+ raise WebIDLError("[LenientThis] is not allowed in combination "
+ "with [%s]" % identifier,
+ [attr.location, self.location])
+ elif (identifier == "Pref" or
+ identifier == "SetterThrows" or
+ identifier == "Pure" or
+ identifier == "Throws" or
+ identifier == "GetterThrows" or
+ identifier == "ChromeOnly" or
+ identifier == "SameObject" or
+ identifier == "Constant" or
+ identifier == "Func" or
+ identifier == "Frozen" or
+ identifier == "AvailableIn" or
+ identifier == "Const" or
+ identifier == "Value" or
+ identifier == "NewObject"):
+ # Known attributes that we don't need to do anything with here
+ pass
+ else:
+ raise WebIDLError("Unknown extended attribute %s on attribute" % identifier,
+ [attr.location])
+ IDLInterfaceMember.handleExtendedAttribute(self, attr)
+
+ def resolve(self, parentScope):
+ assert isinstance(parentScope, IDLScope)
+ self.type.resolveType(parentScope)
+ IDLObjectWithIdentifier.resolve(self, parentScope)
+
+ def addExtendedAttributes(self, attrs):
+ attrs = self.checkForStringHandlingExtendedAttributes(attrs)
+ IDLInterfaceMember.addExtendedAttributes(self, attrs)
+
+ def hasLenientThis(self):
+ return self.lenientThis
+
+ def isUnforgeable(self):
+ return self._unforgeable
+
+ def _getDependentObjects(self):
+ return set([self.type])
+
+class IDLArgument(IDLObjectWithIdentifier):
+ def __init__(self, location, identifier, type, optional=False, defaultValue=None, variadic=False, dictionaryMember=False):
+ IDLObjectWithIdentifier.__init__(self, location, None, identifier)
+
+ assert isinstance(type, IDLType)
+ self.type = type
+
+ self.optional = optional
+ self.defaultValue = defaultValue
+ self.variadic = variadic
+ self.dictionaryMember = dictionaryMember
+ self._isComplete = False
+ self.enforceRange = False
+ self.clamp = False
+ self._allowTreatNonCallableAsNull = False
+
+ self._extraAttributes = {}
+
+ assert not variadic or optional
+
+ def getExtendedAttribute(self, name):
+ return self._extraAttributes.get(name)
+
+ def addExtendedAttributes(self, attrs):
+ attrs = self.checkForStringHandlingExtendedAttributes(
+ attrs,
+ isDictionaryMember=self.dictionaryMember,
+ isOptional=self.optional)
+ for attribute in attrs:
+ identifier = attribute.identifier()
+ if identifier == "Clamp":
+ if not attribute.noArguments():
+ raise WebIDLError("[Clamp] must take no arguments",
+ [attribute.location])
+ if self.enforceRange:
+ raise WebIDLError("[EnforceRange] and [Clamp] are mutually exclusive",
+ [self.location]);
+ self.clamp = True
+ elif identifier == "EnforceRange":
+ if not attribute.noArguments():
+ raise WebIDLError("[EnforceRange] must take no arguments",
+ [attribute.location])
+ if self.clamp:
+ raise WebIDLError("[EnforceRange] and [Clamp] are mutually exclusive",
+ [self.location]);
+ self.enforceRange = True
+ elif identifier == "TreatNonCallableAsNull":
+ self._allowTreatNonCallableAsNull = True
+ elif identifier in ['Ref', 'Const']:
+ # ok in emscripten
+ self._extraAttributes[identifier] = True
+ else:
+ raise WebIDLError("Unhandled extended attribute on an argument",
+ [attribute.location])
+
+ def isComplete(self):
+ return self._isComplete
+
+ def complete(self, scope):
+ if self._isComplete:
+ return
+
+ self._isComplete = True
+
+ if not self.type.isComplete():
+ type = self.type.complete(scope)
+ assert not isinstance(type, IDLUnresolvedType)
+ assert not isinstance(type, IDLTypedefType)
+ assert not isinstance(type.name, IDLUnresolvedIdentifier)
+ self.type = type
+
+ if ((self.type.isDictionary() or
+ self.type.isUnion() and self.type.unroll().hasDictionaryType) and
+ self.optional and not self.defaultValue):
+ # Default optional dictionaries to null, for simplicity,
+ # so the codegen doesn't have to special-case this.
+ self.defaultValue = IDLNullValue(self.location)
+ elif self.type.isAny():
+ assert (self.defaultValue is None or
+ isinstance(self.defaultValue, IDLNullValue))
+ # optional 'any' values always have a default value
+ if self.optional and not self.defaultValue and not self.variadic:
+ # Set the default value to undefined, for simplicity, so the
+ # codegen doesn't have to special-case this.
+ self.defaultValue = IDLUndefinedValue(self.location)
+
+ # Now do the coercing thing; this needs to happen after the
+ # above creation of a default value.
+ if self.defaultValue:
+ self.defaultValue = self.defaultValue.coerceToType(self.type,
+ self.location)
+ assert self.defaultValue
+
+ def allowTreatNonCallableAsNull(self):
+ return self._allowTreatNonCallableAsNull
+
+ def _getDependentObjects(self):
+ deps = set([self.type])
+ if self.defaultValue:
+ deps.add(self.defaultValue)
+ return deps
+
+class IDLCallbackType(IDLType, IDLObjectWithScope):
+ def __init__(self, location, parentScope, identifier, returnType, arguments):
+ assert isinstance(returnType, IDLType)
+
+ IDLType.__init__(self, location, identifier.name)
+
+ self._returnType = returnType
+ # Clone the list
+ self._arguments = list(arguments)
+
+ IDLObjectWithScope.__init__(self, location, parentScope, identifier)
+
+ for (returnType, arguments) in self.signatures():
+ for argument in arguments:
+ argument.resolve(self)
+
+ self._treatNonCallableAsNull = False
+ self._treatNonObjectAsNull = False
+
+ def isCallback(self):
+ return True
+
+ def signatures(self):
+ return [(self._returnType, self._arguments)]
+
+ def tag(self):
+ return IDLType.Tags.callback
+
+ def finish(self, scope):
+ if not self._returnType.isComplete():
+ type = self._returnType.complete(scope)
+
+ assert not isinstance(type, IDLUnresolvedType)
+ assert not isinstance(type, IDLTypedefType)
+ assert not isinstance(type.name, IDLUnresolvedIdentifier)
+ self._returnType = type
+
+ for argument in self._arguments:
+ if argument.type.isComplete():
+ continue
+
+ type = argument.type.complete(scope)
+
+ assert not isinstance(type, IDLUnresolvedType)
+ assert not isinstance(type, IDLTypedefType)
+ assert not isinstance(type.name, IDLUnresolvedIdentifier)
+ argument.type = type
+
+ def validate(self):
+ pass
+
+ def isDistinguishableFrom(self, other):
+ if other.isUnion():
+ # Just forward to the union; it'll deal
+ return other.isDistinguishableFrom(self)
+ return (other.isPrimitive() or other.isString() or other.isEnum() or
+ other.isNonCallbackInterface() or other.isDate())
+
+ def addExtendedAttributes(self, attrs):
+ unhandledAttrs = []
+ for attr in attrs:
+ if attr.identifier() == "TreatNonCallableAsNull":
+ self._treatNonCallableAsNull = True
+ elif attr.identifier() == "TreatNonObjectAsNull":
+ self._treatNonObjectAsNull = True
+ else:
+ unhandledAttrs.append(attr)
+ if self._treatNonCallableAsNull and self._treatNonObjectAsNull:
+ raise WebIDLError("Cannot specify both [TreatNonCallableAsNull] "
+ "and [TreatNonObjectAsNull]", [self.location])
+ if len(unhandledAttrs) != 0:
+ IDLType.addExtendedAttributes(self, unhandledAttrs)
+
+ def _getDependentObjects(self):
+ return set([self._returnType] + self._arguments)
+
+class IDLMethodOverload:
+ """
+ A class that represents a single overload of a WebIDL method. This is not
+ quite the same as an element of the "effective overload set" in the spec,
+ because separate IDLMethodOverloads are not created based on arguments being
+ optional. Rather, when multiple methods have the same name, there is an
+ IDLMethodOverload for each one, all hanging off an IDLMethod representing
+ the full set of overloads.
+ """
+ def __init__(self, returnType, arguments, location):
+ self.returnType = returnType
+ # Clone the list of arguments, just in case
+ self.arguments = list(arguments)
+ self.location = location
+
+ def _getDependentObjects(self):
+ deps = set(self.arguments)
+ deps.add(self.returnType)
+ return deps
+
+class IDLMethod(IDLInterfaceMember, IDLScope):
+
+ Special = enum(
+ 'Getter',
+ 'Setter',
+ 'Creator',
+ 'Deleter',
+ 'LegacyCaller',
+ base=IDLInterfaceMember.Special
+ )
+
+ TypeSuffixModifier = enum(
+ 'None',
+ 'QMark',
+ 'Brackets'
+ )
+
+ NamedOrIndexed = enum(
+ 'Neither',
+ 'Named',
+ 'Indexed'
+ )
+
+ def __init__(self, location, identifier, returnType, arguments,
+ static=False, getter=False, setter=False, creator=False,
+ deleter=False, specialType=NamedOrIndexed.Neither,
+ legacycaller=False, stringifier=False, jsonifier=False):
+ # REVIEW: specialType is NamedOrIndexed -- wow, this is messed up.
+ IDLInterfaceMember.__init__(self, location, identifier,
+ IDLInterfaceMember.Tags.Method)
+
+ self._hasOverloads = False
+
+ assert isinstance(returnType, IDLType)
+
+ # self._overloads is a list of IDLMethodOverloads
+ self._overloads = [IDLMethodOverload(returnType, arguments, location)]
+
+ assert isinstance(static, bool)
+ self._static = static
+ assert isinstance(getter, bool)
+ self._getter = getter
+ assert isinstance(setter, bool)
+ self._setter = setter
+ assert isinstance(creator, bool)
+ self._creator = creator
+ assert isinstance(deleter, bool)
+ self._deleter = deleter
+ assert isinstance(legacycaller, bool)
+ self._legacycaller = legacycaller
+ assert isinstance(stringifier, bool)
+ self._stringifier = stringifier
+ assert isinstance(jsonifier, bool)
+ self._jsonifier = jsonifier
+ self._specialType = specialType
+
+ if static and identifier.name == "prototype":
+ raise WebIDLError("The identifier of a static operation must not be 'prototype'",
+ [location])
+
+ self.assertSignatureConstraints()
+
+ def __str__(self):
+ return "Method '%s'" % self.identifier
+
+ def assertSignatureConstraints(self):
+ if self._getter or self._deleter:
+ assert len(self._overloads) == 1
+ overload = self._overloads[0]
+ arguments = overload.arguments
+ assert len(arguments) == 1
+ assert arguments[0].type == BuiltinTypes[IDLBuiltinType.Types.domstring] or \
+ arguments[0].type == BuiltinTypes[IDLBuiltinType.Types.unsigned_long]
+ assert not arguments[0].optional and not arguments[0].variadic
+ assert not self._getter or not overload.returnType.isVoid()
+
+ if self._setter or self._creator:
+ assert len(self._overloads) == 1
+ arguments = self._overloads[0].arguments
+ assert len(arguments) == 2
+ assert arguments[0].type == BuiltinTypes[IDLBuiltinType.Types.domstring] or \
+ arguments[0].type == BuiltinTypes[IDLBuiltinType.Types.unsigned_long]
+ assert not arguments[0].optional and not arguments[0].variadic
+ assert not arguments[1].optional and not arguments[1].variadic
+
+ if self._stringifier:
+ assert len(self._overloads) == 1
+ overload = self._overloads[0]
+ assert len(overload.arguments) == 0
+ assert overload.returnType == BuiltinTypes[IDLBuiltinType.Types.domstring]
+
+ if self._jsonifier:
+ assert len(self._overloads) == 1
+ overload = self._overloads[0]
+ assert len(overload.arguments) == 0
+ assert overload.returnType == BuiltinTypes[IDLBuiltinType.Types.object]
+
+ def isStatic(self):
+ return self._static
+
+ def isGetter(self):
+ return self._getter
+
+ def isSetter(self):
+ return self._setter
+
+ def isCreator(self):
+ return self._creator
+
+ def isDeleter(self):
+ return self._deleter
+
+ def isNamed(self):
+ assert self._specialType == IDLMethod.NamedOrIndexed.Named or \
+ self._specialType == IDLMethod.NamedOrIndexed.Indexed
+ return self._specialType == IDLMethod.NamedOrIndexed.Named
+
+ def isIndexed(self):
+ assert self._specialType == IDLMethod.NamedOrIndexed.Named or \
+ self._specialType == IDLMethod.NamedOrIndexed.Indexed
+ return self._specialType == IDLMethod.NamedOrIndexed.Indexed
+
+ def isLegacycaller(self):
+ return self._legacycaller
+
+ def isStringifier(self):
+ return self._stringifier
+
+ def isJsonifier(self):
+ return self._jsonifier
+
+ def hasOverloads(self):
+ return self._hasOverloads
+
+ def isIdentifierLess(self):
+ return self.identifier.name[:2] == "__" and self.identifier.name != "__noSuchMethod__"
+
+ def resolve(self, parentScope):
+ assert isinstance(parentScope, IDLScope)
+ IDLObjectWithIdentifier.resolve(self, parentScope)
+ IDLScope.__init__(self, self.location, parentScope, self.identifier)
+ for (returnType, arguments) in self.signatures():
+ for argument in arguments:
+ argument.resolve(self)
+
+ def addOverload(self, method):
+ assert len(method._overloads) == 1
+
+ if self._extendedAttrDict != method ._extendedAttrDict:
+ raise WebIDLError("Extended attributes differ on different "
+ "overloads of %s" % method.identifier,
+ [self.location, method.location])
+
+ self._overloads.extend(method._overloads)
+
+ self._hasOverloads = True
+
+ if self.isStatic() != method.isStatic():
+ raise WebIDLError("Overloaded identifier %s appears with different values of the 'static' attribute" % method.identifier,
+ [method.location])
+
+ if self.isLegacycaller() != method.isLegacycaller():
+ raise WebIDLError("Overloaded identifier %s appears with different values of the 'legacycaller' attribute" % method.identifier,
+ [method.location])
+
+ # Can't overload special things!
+ assert not self.isGetter()
+ assert not method.isGetter()
+ assert not self.isSetter()
+ assert not method.isSetter()
+ assert not self.isCreator()
+ assert not method.isCreator()
+ assert not self.isDeleter()
+ assert not method.isDeleter()
+ assert not self.isStringifier()
+ assert not method.isStringifier()
+ assert not self.isJsonifier()
+ assert not method.isJsonifier()
+
+ return self
+
+ def signatures(self):
+ return [(overload.returnType, overload.arguments) for overload in
+ self._overloads]
+
+ def finish(self, scope):
+ overloadWithPromiseReturnType = None
+ overloadWithoutPromiseReturnType = None
+ for overload in self._overloads:
+ variadicArgument = None
+
+ arguments = overload.arguments
+ for (idx, argument) in enumerate(arguments):
+ if not argument.isComplete():
+ argument.complete(scope)
+ assert argument.type.isComplete()
+
+ if (argument.type.isDictionary() or
+ (argument.type.isUnion() and
+ argument.type.unroll().hasDictionaryType)):
+ # Dictionaries and unions containing dictionaries at the
+ # end of the list or followed by optional arguments must be
+ # optional.
+ if (not argument.optional and
+ all(arg.optional for arg in arguments[idx+1:])):
+ raise WebIDLError("Dictionary argument or union "
+ "argument containing a dictionary "
+ "not followed by a required argument "
+ "must be optional",
+ [argument.location])
+
+ # An argument cannot be a Nullable Dictionary
+ if argument.type.nullable():
+ raise WebIDLError("An argument cannot be a nullable "
+ "dictionary or nullable union "
+ "containing a dictionary",
+ [argument.location])
+
+ # Only the last argument can be variadic
+ if variadicArgument:
+ raise WebIDLError("Variadic argument is not last argument",
+ [variadicArgument.location])
+ if argument.variadic:
+ variadicArgument = argument
+
+ returnType = overload.returnType
+ if not returnType.isComplete():
+ returnType = returnType.complete(scope)
+ assert not isinstance(returnType, IDLUnresolvedType)
+ assert not isinstance(returnType, IDLTypedefType)
+ assert not isinstance(returnType.name, IDLUnresolvedIdentifier)
+ overload.returnType = returnType
+
+ if returnType.isPromise():
+ overloadWithPromiseReturnType = overload
+ else:
+ overloadWithoutPromiseReturnType = overload
+
+ # Make sure either all our overloads return Promises or none do
+ if overloadWithPromiseReturnType and overloadWithoutPromiseReturnType:
+ raise WebIDLError("We have overloads with both Promise and "
+ "non-Promise return types",
+ [overloadWithPromiseReturnType.location,
+ overloadWithoutPromiseReturnType.location])
+
+ if overloadWithPromiseReturnType and self._legacycaller:
+ raise WebIDLError("May not have a Promise return type for a "
+ "legacycaller.",
+ [overloadWithPromiseReturnType.location])
+
+ # Now compute various information that will be used by the
+ # WebIDL overload resolution algorithm.
+ self.maxArgCount = max(len(s[1]) for s in self.signatures())
+ self.allowedArgCounts = [ i for i in range(self.maxArgCount+1)
+ if len(self.signaturesForArgCount(i)) != 0 ]
+
+ def validate(self):
+ # Make sure our overloads are properly distinguishable and don't have
+ # different argument types before the distinguishing args.
+ for argCount in self.allowedArgCounts:
+ possibleOverloads = self.overloadsForArgCount(argCount)
+ if len(possibleOverloads) == 1:
+ continue
+ distinguishingIndex = self.distinguishingIndexForArgCount(argCount)
+ for idx in range(distinguishingIndex):
+ firstSigType = possibleOverloads[0].arguments[idx].type
+ for overload in possibleOverloads[1:]:
+ if overload.arguments[idx].type != firstSigType:
+ raise WebIDLError(
+ "Signatures for method '%s' with %d arguments have "
+ "different types of arguments at index %d, which "
+ "is before distinguishing index %d" %
+ (self.identifier.name, argCount, idx,
+ distinguishingIndex),
+ [self.location, overload.location])
+
+ def overloadsForArgCount(self, argc):
+ return [overload for overload in self._overloads if
+ len(overload.arguments) == argc or
+ (len(overload.arguments) > argc and
+ all(arg.optional for arg in overload.arguments[argc:])) or
+ (len(overload.arguments) < argc and
+ len(overload.arguments) > 0 and
+ overload.arguments[-1].variadic)]
+
+ def signaturesForArgCount(self, argc):
+ return [(overload.returnType, overload.arguments) for overload
+ in self.overloadsForArgCount(argc)]
+
+ def locationsForArgCount(self, argc):
+ return [overload.location for overload in self.overloadsForArgCount(argc)]
+
+ def distinguishingIndexForArgCount(self, argc):
+ def isValidDistinguishingIndex(idx, signatures):
+ for (firstSigIndex, (firstRetval, firstArgs)) in enumerate(signatures[:-1]):
+ for (secondRetval, secondArgs) in signatures[firstSigIndex+1:]:
+ if idx < len(firstArgs):
+ firstType = firstArgs[idx].type
+ else:
+ assert(firstArgs[-1].variadic)
+ firstType = firstArgs[-1].type
+ if idx < len(secondArgs):
+ secondType = secondArgs[idx].type
+ else:
+ assert(secondArgs[-1].variadic)
+ secondType = secondArgs[-1].type
+ if not firstType.isDistinguishableFrom(secondType):
+ return False
+ return True
+ signatures = self.signaturesForArgCount(argc)
+ for idx in range(argc):
+ if isValidDistinguishingIndex(idx, signatures):
+ return idx
+ # No valid distinguishing index. Time to throw
+ locations = self.locationsForArgCount(argc)
+ raise WebIDLError("Signatures with %d arguments for method '%s' are not "
+ "distinguishable" % (argc, self.identifier.name),
+ locations)
+
+ def handleExtendedAttribute(self, attr):
+ identifier = attr.identifier()
+ if identifier == "GetterThrows":
+ raise WebIDLError("Methods must not be flagged as "
+ "[GetterThrows]",
+ [attr.location, self.location])
+ elif identifier == "SetterThrows":
+ raise WebIDLError("Methods must not be flagged as "
+ "[SetterThrows]",
+ [attr.location, self.location])
+ elif identifier == "Unforgeable":
+ raise WebIDLError("Methods must not be flagged as "
+ "[Unforgeable]",
+ [attr.location, self.location])
+ elif identifier == "SameObject":
+ raise WebIDLError("Methods must not be flagged as [SameObject]",
+ [attr.location, self.location]);
+ elif identifier == "Constant":
+ raise WebIDLError("Methods must not be flagged as [Constant]",
+ [attr.location, self.location]);
+ elif identifier == "PutForwards":
+ raise WebIDLError("Only attributes support [PutForwards]",
+ [attr.location, self.location])
+ elif identifier == "LenientFloat":
+ # This is called before we've done overload resolution
+ assert len(self.signatures()) == 1
+ sig = self.signatures()[0]
+ if not sig[0].isVoid():
+ raise WebIDLError("[LenientFloat] used on a non-void method",
+ [attr.location, self.location])
+ if not any(arg.type.includesRestrictedFloat() for arg in sig[1]):
+ raise WebIDLError("[LenientFloat] used on an operation with no "
+ "restricted float type arguments",
+ [attr.location, self.location])
+ elif (identifier == "Throws" or
+ identifier == "NewObject" or
+ identifier == "ChromeOnly" or
+ identifier == "Pref" or
+ identifier == "Func" or
+ identifier == "AvailableIn" or
+ identifier == "Pure" or
+ identifier == "CrossOriginCallable" or
+ identifier == "Ref" or
+ identifier == "Value" or
+ identifier == "Operator" or
+ identifier == "WebGLHandlesContextLoss"):
+ # Known attributes that we don't need to do anything with here
+ pass
+ else:
+ raise WebIDLError("Unknown extended attribute %s on method" % identifier,
+ [attr.location])
+ IDLInterfaceMember.handleExtendedAttribute(self, attr)
+
+ def returnsPromise(self):
+ return self._overloads[0].returnType.isPromise()
+
+ def _getDependentObjects(self):
+ deps = set()
+ for overload in self._overloads:
+ deps.union(overload._getDependentObjects())
+ return deps
+
+class IDLImplementsStatement(IDLObject):
+ def __init__(self, location, implementor, implementee):
+ IDLObject.__init__(self, location)
+ self.implementor = implementor;
+ self.implementee = implementee
+
+ def finish(self, scope):
+ assert(isinstance(self.implementor, IDLIdentifierPlaceholder))
+ assert(isinstance(self.implementee, IDLIdentifierPlaceholder))
+ implementor = self.implementor.finish(scope)
+ implementee = self.implementee.finish(scope)
+ # NOTE: we depend on not setting self.implementor and
+ # self.implementee here to keep track of the original
+ # locations.
+ if not isinstance(implementor, IDLInterface):
+ raise WebIDLError("Left-hand side of 'implements' is not an "
+ "interface",
+ [self.implementor.location])
+ if implementor.isCallback():
+ raise WebIDLError("Left-hand side of 'implements' is a callback "
+ "interface",
+ [self.implementor.location])
+ if not isinstance(implementee, IDLInterface):
+ raise WebIDLError("Right-hand side of 'implements' is not an "
+ "interface",
+ [self.implementee.location])
+ if implementee.isCallback():
+ raise WebIDLError("Right-hand side of 'implements' is a callback "
+ "interface",
+ [self.implementee.location])
+ implementor.addImplementedInterface(implementee)
+
+ def validate(self):
+ pass
+
+ def addExtendedAttributes(self, attrs):
+ assert len(attrs) == 0
+
+class IDLExtendedAttribute(IDLObject):
+ """
+ A class to represent IDL extended attributes so we can give them locations
+ """
+ def __init__(self, location, tuple):
+ IDLObject.__init__(self, location)
+ self._tuple = tuple
+
+ def identifier(self):
+ return self._tuple[0]
+
+ def noArguments(self):
+ return len(self._tuple) == 1
+
+ def hasValue(self):
+ return len(self._tuple) >= 2 and isinstance(self._tuple[1], str)
+
+ def value(self):
+ assert(self.hasValue())
+ return self._tuple[1]
+
+ def hasArgs(self):
+ return (len(self._tuple) == 2 and isinstance(self._tuple[1], list) or
+ len(self._tuple) == 3)
+
+ def args(self):
+ assert(self.hasArgs())
+ # Our args are our last element
+ return self._tuple[-1]
+
+ def listValue(self):
+ """
+ Backdoor for storing random data in _extendedAttrDict
+ """
+ return list(self._tuple)[1:]
+
+# Parser
+
+class Tokenizer(object):
+ tokens = [
+ "INTEGER",
+ "FLOATLITERAL",
+ "IDENTIFIER",
+ "STRING",
+ "WHITESPACE",
+ "OTHER"
+ ]
+
+ def t_FLOATLITERAL(self, t):
+ r'(-?(([0-9]+\.[0-9]*|[0-9]*\.[0-9]+)([Ee][+-]?[0-9]+)?|[0-9]+[Ee][+-]?[0-9]+|Infinity))|NaN'
+ t.value = float(t.value)
+ return t
+
+ def t_INTEGER(self, t):
+ r'-?(0([0-7]+|[Xx][0-9A-Fa-f]+)?|[1-9][0-9]*)'
+ try:
+ # Can't use int(), because that doesn't handle octal properly.
+ t.value = parseInt(t.value)
+ except:
+ raise WebIDLError("Invalid integer literal",
+ [Location(lexer=self.lexer,
+ lineno=self.lexer.lineno,
+ lexpos=self.lexer.lexpos,
+ filename=self._filename)])
+ return t
+
+ def t_IDENTIFIER(self, t):
+ r'[A-Z_a-z][0-9A-Z_a-z]*'
+ t.type = self.keywords.get(t.value, 'IDENTIFIER')
+ return t
+
+ def t_STRING(self, t):
+ r'"[^"]*"'
+ t.value = t.value[1:-1]
+ return t
+
+ def t_WHITESPACE(self, t):
+ r'[\t\n\r ]+|[\t\n\r ]*((//[^\n]*|/\*.*?\*/)[\t\n\r ]*)+'
+ pass
+
+ def t_ELLIPSIS(self, t):
+ r'\.\.\.'
+ t.type = self.keywords.get(t.value)
+ return t
+
+ def t_OTHER(self, t):
+ r'[^\t\n\r 0-9A-Z_a-z]'
+ t.type = self.keywords.get(t.value, 'OTHER')
+ return t
+
+ keywords = {
+ "module": "MODULE",
+ "interface": "INTERFACE",
+ "partial": "PARTIAL",
+ "dictionary": "DICTIONARY",
+ "exception": "EXCEPTION",
+ "enum": "ENUM",
+ "callback": "CALLBACK",
+ "typedef": "TYPEDEF",
+ "implements": "IMPLEMENTS",
+ "const": "CONST",
+ "null": "NULL",
+ "true": "TRUE",
+ "false": "FALSE",
+ "serializer": "SERIALIZER",
+ "stringifier": "STRINGIFIER",
+ "jsonifier": "JSONIFIER",
+ "unrestricted": "UNRESTRICTED",
+ "attribute": "ATTRIBUTE",
+ "readonly": "READONLY",
+ "inherit": "INHERIT",
+ "static": "STATIC",
+ "getter": "GETTER",
+ "setter": "SETTER",
+ "creator": "CREATOR",
+ "deleter": "DELETER",
+ "legacycaller": "LEGACYCALLER",
+ "optional": "OPTIONAL",
+ "...": "ELLIPSIS",
+ "::": "SCOPE",
+ "Date": "DATE",
+ "DOMString": "DOMSTRING",
+ "ByteString": "BYTESTRING",
+ "any": "ANY",
+ "boolean": "BOOLEAN",
+ "byte": "BYTE",
+ "double": "DOUBLE",
+ "float": "FLOAT",
+ "long": "LONG",
+ "object": "OBJECT",
+ "octet": "OCTET",
+ "optional": "OPTIONAL",
+ "sequence": "SEQUENCE",
+ "short": "SHORT",
+ "unsigned": "UNSIGNED",
+ "void": "VOID",
+ ":": "COLON",
+ ";": "SEMICOLON",
+ "{": "LBRACE",
+ "}": "RBRACE",
+ "(": "LPAREN",
+ ")": "RPAREN",
+ "[": "LBRACKET",
+ "]": "RBRACKET",
+ "?": "QUESTIONMARK",
+ ",": "COMMA",
+ "=": "EQUALS",
+ "<": "LT",
+ ">": "GT",
+ "ArrayBuffer": "ARRAYBUFFER",
+ "or": "OR"
+ }
+
+ tokens.extend(keywords.values())
+
+ def t_error(self, t):
+ raise WebIDLError("Unrecognized Input",
+ [Location(lexer=self.lexer,
+ lineno=self.lexer.lineno,
+ lexpos=self.lexer.lexpos,
+ filename = self.filename)])
+
+ def __init__(self, outputdir, lexer=None):
+ if lexer:
+ self.lexer = lexer
+ else:
+ self.lexer = lex.lex(object=self,
+ outputdir=outputdir,
+ lextab='webidllex',
+ reflags=re.DOTALL)
+
+class Parser(Tokenizer):
+ def getLocation(self, p, i):
+ return Location(self.lexer, p.lineno(i), p.lexpos(i), self._filename)
+
+ def globalScope(self):
+ return self._globalScope
+
+ # The p_Foo functions here must match the WebIDL spec's grammar.
+ # It's acceptable to split things at '|' boundaries.
+ def p_Definitions(self, p):
+ """
+ Definitions : ExtendedAttributeList Definition Definitions
+ """
+ if p[2]:
+ p[0] = [p[2]]
+ p[2].addExtendedAttributes(p[1])
+ else:
+ assert not p[1]
+ p[0] = []
+
+ p[0].extend(p[3])
+
+ def p_DefinitionsEmpty(self, p):
+ """
+ Definitions :
+ """
+ p[0] = []
+
+ def p_Definition(self, p):
+ """
+ Definition : CallbackOrInterface
+ | PartialInterface
+ | Dictionary
+ | Exception
+ | Enum
+ | Typedef
+ | ImplementsStatement
+ """
+ p[0] = p[1]
+ assert p[1] # We might not have implemented something ...
+
+ def p_CallbackOrInterfaceCallback(self, p):
+ """
+ CallbackOrInterface : CALLBACK CallbackRestOrInterface
+ """
+ if p[2].isInterface():
+ assert isinstance(p[2], IDLInterface)
+ p[2].setCallback(True)
+
+ p[0] = p[2]
+
+ def p_CallbackOrInterfaceInterface(self, p):
+ """
+ CallbackOrInterface : Interface
+ """
+ p[0] = p[1]
+
+ def p_CallbackRestOrInterface(self, p):
+ """
+ CallbackRestOrInterface : CallbackRest
+ | Interface
+ """
+ assert p[1]
+ p[0] = p[1]
+
+ def p_Interface(self, p):
+ """
+ Interface : INTERFACE IDENTIFIER Inheritance LBRACE InterfaceMembers RBRACE SEMICOLON
+ """
+ location = self.getLocation(p, 1)
+ identifier = IDLUnresolvedIdentifier(self.getLocation(p, 2), p[2])
+ members = p[5]
+ parent = p[3]
+
+ try:
+ if self.globalScope()._lookupIdentifier(identifier):
+ p[0] = self.globalScope()._lookupIdentifier(identifier)
+ if not isinstance(p[0], IDLInterface):
+ raise WebIDLError("Partial interface has the same name as "
+ "non-interface object",
+ [location, p[0].location])
+ p[0].setNonPartial(location, parent, members)
+ return
+ except Exception, ex:
+ if isinstance(ex, WebIDLError):
+ raise ex
+ pass
+
+ p[0] = IDLInterface(location, self.globalScope(), identifier, parent,
+ members, isPartial=False)
+
+ def p_InterfaceForwardDecl(self, p):
+ """
+ Interface : INTERFACE IDENTIFIER SEMICOLON
+ """
+ location = self.getLocation(p, 1)
+ identifier = IDLUnresolvedIdentifier(self.getLocation(p, 2), p[2])
+
+ try:
+ if self.globalScope()._lookupIdentifier(identifier):
+ p[0] = self.globalScope()._lookupIdentifier(identifier)
+ if not isinstance(p[0], IDLExternalInterface):
+ raise WebIDLError("Name collision between external "
+ "interface declaration for identifier "
+ "%s and %s" % (identifier.name, p[0]),
+ [location, p[0].location])
+ return
+ except Exception, ex:
+ if isinstance(ex, WebIDLError):
+ raise ex
+ pass
+
+ p[0] = IDLExternalInterface(location, self.globalScope(), identifier)
+
+ def p_PartialInterface(self, p):
+ """
+ PartialInterface : PARTIAL INTERFACE IDENTIFIER LBRACE InterfaceMembers RBRACE SEMICOLON
+ """
+ location = self.getLocation(p, 2)
+ identifier = IDLUnresolvedIdentifier(self.getLocation(p, 3), p[3])
+ members = p[5]
+
+ try:
+ if self.globalScope()._lookupIdentifier(identifier):
+ p[0] = self.globalScope()._lookupIdentifier(identifier)
+ if not isinstance(p[0], IDLInterface):
+ raise WebIDLError("Partial interface has the same name as "
+ "non-interface object",
+ [location, p[0].location])
+ # Just throw our members into the existing IDLInterface. If we
+ # have extended attributes, those will get added to it
+ # automatically.
+ p[0].members.extend(members)
+ return
+ except Exception, ex:
+ if isinstance(ex, WebIDLError):
+ raise ex
+ pass
+
+ p[0] = IDLInterface(location, self.globalScope(), identifier, None,
+ members, isPartial=True)
+ pass
+
+ def p_Inheritance(self, p):
+ """
+ Inheritance : COLON ScopedName
+ """
+ p[0] = IDLIdentifierPlaceholder(self.getLocation(p, 2), p[2])
+
+ def p_InheritanceEmpty(self, p):
+ """
+ Inheritance :
+ """
+ pass
+
+ def p_InterfaceMembers(self, p):
+ """
+ InterfaceMembers : ExtendedAttributeList InterfaceMember InterfaceMembers
+ """
+ p[0] = [p[2]] if p[2] else []
+
+ assert not p[1] or p[2]
+ p[2].addExtendedAttributes(p[1])
+
+ p[0].extend(p[3])
+
+ def p_InterfaceMembersEmpty(self, p):
+ """
+ InterfaceMembers :
+ """
+ p[0] = []
+
+ def p_InterfaceMember(self, p):
+ """
+ InterfaceMember : Const
+ | AttributeOrOperation
+ """
+ p[0] = p[1]
+
+ def p_Dictionary(self, p):
+ """
+ Dictionary : DICTIONARY IDENTIFIER Inheritance LBRACE DictionaryMembers RBRACE SEMICOLON
+ """
+ location = self.getLocation(p, 1)
+ identifier = IDLUnresolvedIdentifier(self.getLocation(p, 2), p[2])
+ members = p[5]
+ p[0] = IDLDictionary(location, self.globalScope(), identifier, p[3], members)
+
+ def p_DictionaryMembers(self, p):
+ """
+ DictionaryMembers : ExtendedAttributeList DictionaryMember DictionaryMembers
+ |
+ """
+ if len(p) == 1:
+ # We're at the end of the list
+ p[0] = []
+ return
+ # Add our extended attributes
+ p[2].addExtendedAttributes(p[1])
+ p[0] = [p[2]]
+ p[0].extend(p[3])
+
+ def p_DictionaryMember(self, p):
+ """
+ DictionaryMember : Type IDENTIFIER DefaultValue SEMICOLON
+ """
+ # These quack a lot like optional arguments, so just treat them that way.
+ t = p[1]
+ assert isinstance(t, IDLType)
+ identifier = IDLUnresolvedIdentifier(self.getLocation(p, 2), p[2])
+ defaultValue = p[3]
+
+ p[0] = IDLArgument(self.getLocation(p, 2), identifier, t, optional=True,
+ defaultValue=defaultValue, variadic=False,
+ dictionaryMember=True)
+
+ def p_DefaultValue(self, p):
+ """
+ DefaultValue : EQUALS ConstValue
+ |
+ """
+ if len(p) > 1:
+ p[0] = p[2]
+ else:
+ p[0] = None
+
+ def p_Exception(self, p):
+ """
+ Exception : EXCEPTION IDENTIFIER Inheritance LBRACE ExceptionMembers RBRACE SEMICOLON
+ """
+ pass
+
+ def p_Enum(self, p):
+ """
+ Enum : ENUM IDENTIFIER LBRACE EnumValueList RBRACE SEMICOLON
+ """
+ location = self.getLocation(p, 1)
+ identifier = IDLUnresolvedIdentifier(self.getLocation(p, 2), p[2])
+
+ values = p[4]
+ assert values
+ p[0] = IDLEnum(location, self.globalScope(), identifier, values)
+
+ def p_EnumValueList(self, p):
+ """
+ EnumValueList : STRING EnumValueListComma
+ """
+ p[0] = [p[1]]
+ p[0].extend(p[2])
+
+ def p_EnumValueListComma(self, p):
+ """
+ EnumValueListComma : COMMA EnumValueListString
+ """
+ p[0] = p[2]
+
+ def p_EnumValueListCommaEmpty(self, p):
+ """
+ EnumValueListComma :
+ """
+ p[0] = []
+
+ def p_EnumValueListString(self, p):
+ """
+ EnumValueListString : STRING EnumValueListComma
+ """
+ p[0] = [p[1]]
+ p[0].extend(p[2])
+
+ def p_EnumValueListStringEmpty(self, p):
+ """
+ EnumValueListString :
+ """
+ p[0] = []
+
+ def p_CallbackRest(self, p):
+ """
+ CallbackRest : IDENTIFIER EQUALS ReturnType LPAREN ArgumentList RPAREN SEMICOLON
+ """
+ identifier = IDLUnresolvedIdentifier(self.getLocation(p, 1), p[1])
+ p[0] = IDLCallbackType(self.getLocation(p, 1), self.globalScope(),
+ identifier, p[3], p[5])
+
+ def p_ExceptionMembers(self, p):
+ """
+ ExceptionMembers : ExtendedAttributeList ExceptionMember ExceptionMembers
+ |
+ """
+ pass
+
+ def p_Typedef(self, p):
+ """
+ Typedef : TYPEDEF Type IDENTIFIER SEMICOLON
+ """
+ typedef = IDLTypedefType(self.getLocation(p, 1), p[2], p[3])
+ typedef.resolve(self.globalScope())
+ p[0] = typedef
+
+ def p_ImplementsStatement(self, p):
+ """
+ ImplementsStatement : ScopedName IMPLEMENTS ScopedName SEMICOLON
+ """
+ assert(p[2] == "implements")
+ implementor = IDLIdentifierPlaceholder(self.getLocation(p, 1), p[1])
+ implementee = IDLIdentifierPlaceholder(self.getLocation(p, 3), p[3])
+ p[0] = IDLImplementsStatement(self.getLocation(p, 1), implementor,
+ implementee)
+
+ def p_Const(self, p):
+ """
+ Const : CONST ConstType IDENTIFIER EQUALS ConstValue SEMICOLON
+ """
+ location = self.getLocation(p, 1)
+ type = p[2]
+ identifier = IDLUnresolvedIdentifier(self.getLocation(p, 3), p[3])
+ value = p[5]
+ p[0] = IDLConst(location, identifier, type, value)
+
+ def p_ConstValueBoolean(self, p):
+ """
+ ConstValue : BooleanLiteral
+ """
+ location = self.getLocation(p, 1)
+ booleanType = BuiltinTypes[IDLBuiltinType.Types.boolean]
+ p[0] = IDLValue(location, booleanType, p[1])
+
+ def p_ConstValueInteger(self, p):
+ """
+ ConstValue : INTEGER
+ """
+ location = self.getLocation(p, 1)
+
+ # We don't know ahead of time what type the integer literal is.
+ # Determine the smallest type it could possibly fit in and use that.
+ integerType = matchIntegerValueToType(p[1])
+ if integerType == None:
+ raise WebIDLError("Integer literal out of range", [location])
+
+ p[0] = IDLValue(location, integerType, p[1])
+
+ def p_ConstValueFloat(self, p):
+ """
+ ConstValue : FLOATLITERAL
+ """
+ location = self.getLocation(p, 1)
+ p[0] = IDLValue(location, BuiltinTypes[IDLBuiltinType.Types.unrestricted_float], p[1])
+
+ def p_ConstValueString(self, p):
+ """
+ ConstValue : STRING
+ """
+ location = self.getLocation(p, 1)
+ stringType = BuiltinTypes[IDLBuiltinType.Types.domstring]
+ p[0] = IDLValue(location, stringType, p[1])
+
+ def p_ConstValueNull(self, p):
+ """
+ ConstValue : NULL
+ """
+ p[0] = IDLNullValue(self.getLocation(p, 1))
+
+ def p_BooleanLiteralTrue(self, p):
+ """
+ BooleanLiteral : TRUE
+ """
+ p[0] = True
+
+ def p_BooleanLiteralFalse(self, p):
+ """
+ BooleanLiteral : FALSE
+ """
+ p[0] = False
+
+ def p_AttributeOrOperation(self, p):
+ """
+ AttributeOrOperation : Attribute
+ | Operation
+ """
+ p[0] = p[1]
+
+ def p_AttributeWithQualifier(self, p):
+ """
+ Attribute : Qualifier AttributeRest
+ """
+ static = IDLInterfaceMember.Special.Static in p[1]
+ stringifier = IDLInterfaceMember.Special.Stringifier in p[1]
+ (location, identifier, type, readonly) = p[2]
+ p[0] = IDLAttribute(location, identifier, type, readonly, static=static,
+ stringifier=stringifier)
+
+ def p_Attribute(self, p):
+ """
+ Attribute : Inherit AttributeRest
+ """
+ (location, identifier, type, readonly) = p[2]
+ p[0] = IDLAttribute(location, identifier, type, readonly, inherit=p[1])
+
+ def p_AttributeRest(self, p):
+ """
+ AttributeRest : ReadOnly ATTRIBUTE Type IDENTIFIER SEMICOLON
+ """
+ location = self.getLocation(p, 2)
+ readonly = p[1]
+ t = p[3]
+ identifier = IDLUnresolvedIdentifier(self.getLocation(p, 4), p[4])
+ p[0] = (location, identifier, t, readonly)
+
+ def p_ReadOnly(self, p):
+ """
+ ReadOnly : READONLY
+ """
+ p[0] = True
+
+ def p_ReadOnlyEmpty(self, p):
+ """
+ ReadOnly :
+ """
+ p[0] = False
+
+ def p_Inherit(self, p):
+ """
+ Inherit : INHERIT
+ """
+ p[0] = True
+
+ def p_InheritEmpty(self, p):
+ """
+ Inherit :
+ """
+ p[0] = False
+
+ def p_Operation(self, p):
+ """
+ Operation : Qualifiers OperationRest
+ """
+ qualifiers = p[1]
+
+ # Disallow duplicates in the qualifier set
+ if not len(set(qualifiers)) == len(qualifiers):
+ raise WebIDLError("Duplicate qualifiers are not allowed",
+ [self.getLocation(p, 1)])
+
+ static = IDLInterfaceMember.Special.Static in p[1]
+ # If static is there that's all that's allowed. This is disallowed
+ # by the parser, so we can assert here.
+ assert not static or len(qualifiers) == 1
+
+ stringifier = IDLInterfaceMember.Special.Stringifier in p[1]
+ # If stringifier is there that's all that's allowed. This is disallowed
+ # by the parser, so we can assert here.
+ assert not stringifier or len(qualifiers) == 1
+
+ getter = True if IDLMethod.Special.Getter in p[1] else False
+ setter = True if IDLMethod.Special.Setter in p[1] else False
+ creator = True if IDLMethod.Special.Creator in p[1] else False
+ deleter = True if IDLMethod.Special.Deleter in p[1] else False
+ legacycaller = True if IDLMethod.Special.LegacyCaller in p[1] else False
+
+ if getter or deleter:
+ if setter or creator:
+ raise WebIDLError("getter and deleter are incompatible with setter and creator",
+ [self.getLocation(p, 1)])
+
+ (returnType, identifier, arguments) = p[2]
+
+ assert isinstance(returnType, IDLType)
+
+ specialType = IDLMethod.NamedOrIndexed.Neither
+
+ if getter or deleter:
+ if len(arguments) != 1:
+ raise WebIDLError("%s has wrong number of arguments" %
+ ("getter" if getter else "deleter"),
+ [self.getLocation(p, 2)])
+ argType = arguments[0].type
+ if argType == BuiltinTypes[IDLBuiltinType.Types.domstring]:
+ specialType = IDLMethod.NamedOrIndexed.Named
+ elif argType == BuiltinTypes[IDLBuiltinType.Types.unsigned_long]:
+ specialType = IDLMethod.NamedOrIndexed.Indexed
+ else:
+ raise WebIDLError("%s has wrong argument type (must be DOMString or UnsignedLong)" %
+ ("getter" if getter else "deleter"),
+ [arguments[0].location])
+ if arguments[0].optional or arguments[0].variadic:
+ raise WebIDLError("%s cannot have %s argument" %
+ ("getter" if getter else "deleter",
+ "optional" if arguments[0].optional else "variadic"),
+ [arguments[0].location])
+ if getter:
+ if returnType.isVoid():
+ raise WebIDLError("getter cannot have void return type",
+ [self.getLocation(p, 2)])
+ if setter or creator:
+ if len(arguments) != 2:
+ raise WebIDLError("%s has wrong number of arguments" %
+ ("setter" if setter else "creator"),
+ [self.getLocation(p, 2)])
+ argType = arguments[0].type
+ if argType == BuiltinTypes[IDLBuiltinType.Types.domstring]:
+ specialType = IDLMethod.NamedOrIndexed.Named
+ elif argType == BuiltinTypes[IDLBuiltinType.Types.unsigned_long]:
+ specialType = IDLMethod.NamedOrIndexed.Indexed
+ else:
+ raise WebIDLError("%s has wrong argument type (must be DOMString or UnsignedLong)" %
+ ("setter" if setter else "creator"),
+ [arguments[0].location])
+ if arguments[0].optional or arguments[0].variadic:
+ raise WebIDLError("%s cannot have %s argument" %
+ ("setter" if setter else "creator",
+ "optional" if arguments[0].optional else "variadic"),
+ [arguments[0].location])
+ if arguments[1].optional or arguments[1].variadic:
+ raise WebIDLError("%s cannot have %s argument" %
+ ("setter" if setter else "creator",
+ "optional" if arguments[1].optional else "variadic"),
+ [arguments[1].location])
+
+ if stringifier:
+ if len(arguments) != 0:
+ raise WebIDLError("stringifier has wrong number of arguments",
+ [self.getLocation(p, 2)])
+ if not returnType.isDOMString():
+ raise WebIDLError("stringifier must have DOMString return type",
+ [self.getLocation(p, 2)])
+
+ # identifier might be None. This is only permitted for special methods.
+ if not identifier:
+ if not getter and not setter and not creator and \
+ not deleter and not legacycaller and not stringifier:
+ raise WebIDLError("Identifier required for non-special methods",
+ [self.getLocation(p, 2)])
+
+ location = BuiltinLocation("<auto-generated-identifier>")
+ identifier = IDLUnresolvedIdentifier(location, "__%s%s%s%s%s%s%s" %
+ ("named" if specialType == IDLMethod.NamedOrIndexed.Named else \
+ "indexed" if specialType == IDLMethod.NamedOrIndexed.Indexed else "",
+ "getter" if getter else "",
+ "setter" if setter else "",
+ "deleter" if deleter else "",
+ "creator" if creator else "",
+ "legacycaller" if legacycaller else "",
+ "stringifier" if stringifier else ""), allowDoubleUnderscore=True)
+
+ method = IDLMethod(self.getLocation(p, 2), identifier, returnType, arguments,
+ static=static, getter=getter, setter=setter, creator=creator,
+ deleter=deleter, specialType=specialType,
+ legacycaller=legacycaller, stringifier=stringifier)
+ p[0] = method
+
+ def p_Stringifier(self, p):
+ """
+ Operation : STRINGIFIER SEMICOLON
+ """
+ identifier = IDLUnresolvedIdentifier(BuiltinLocation("<auto-generated-identifier>"),
+ "__stringifier",
+ allowDoubleUnderscore=True)
+ method = IDLMethod(self.getLocation(p, 1),
+ identifier,
+ returnType=BuiltinTypes[IDLBuiltinType.Types.domstring],
+ arguments=[],
+ stringifier=True)
+ p[0] = method
+
+ def p_Jsonifier(self, p):
+ """
+ Operation : JSONIFIER SEMICOLON
+ """
+ identifier = IDLUnresolvedIdentifier(BuiltinLocation("<auto-generated-identifier>"),
+ "__jsonifier", allowDoubleUnderscore=True)
+ method = IDLMethod(self.getLocation(p, 1),
+ identifier,
+ returnType=BuiltinTypes[IDLBuiltinType.Types.object],
+ arguments=[],
+ jsonifier=True)
+ p[0] = method
+
+ def p_QualifierStatic(self, p):
+ """
+ Qualifier : STATIC
+ """
+ p[0] = [IDLInterfaceMember.Special.Static]
+
+ def p_QualifierStringifier(self, p):
+ """
+ Qualifier : STRINGIFIER
+ """
+ p[0] = [IDLInterfaceMember.Special.Stringifier]
+
+ def p_Qualifiers(self, p):
+ """
+ Qualifiers : Qualifier
+ | Specials
+ """
+ p[0] = p[1]
+
+ def p_Specials(self, p):
+ """
+ Specials : Special Specials
+ """
+ p[0] = [p[1]]
+ p[0].extend(p[2])
+
+ def p_SpecialsEmpty(self, p):
+ """
+ Specials :
+ """
+ p[0] = []
+
+ def p_SpecialGetter(self, p):
+ """
+ Special : GETTER
+ """
+ p[0] = IDLMethod.Special.Getter
+
+ def p_SpecialSetter(self, p):
+ """
+ Special : SETTER
+ """
+ p[0] = IDLMethod.Special.Setter
+
+ def p_SpecialCreator(self, p):
+ """
+ Special : CREATOR
+ """
+ p[0] = IDLMethod.Special.Creator
+
+ def p_SpecialDeleter(self, p):
+ """
+ Special : DELETER
+ """
+ p[0] = IDLMethod.Special.Deleter
+
+ def p_SpecialLegacyCaller(self, p):
+ """
+ Special : LEGACYCALLER
+ """
+ p[0] = IDLMethod.Special.LegacyCaller
+
+ def p_OperationRest(self, p):
+ """
+ OperationRest : ReturnType OptionalIdentifier LPAREN ArgumentList RPAREN SEMICOLON
+ """
+ p[0] = (p[1], p[2], p[4])
+
+ def p_OptionalIdentifier(self, p):
+ """
+ OptionalIdentifier : IDENTIFIER
+ """
+ p[0] = IDLUnresolvedIdentifier(self.getLocation(p, 1), p[1])
+
+ def p_OptionalIdentifierEmpty(self, p):
+ """
+ OptionalIdentifier :
+ """
+ pass
+
+ def p_ArgumentList(self, p):
+ """
+ ArgumentList : Argument Arguments
+ """
+ p[0] = [p[1]] if p[1] else []
+ p[0].extend(p[2])
+
+ def p_ArgumentListEmpty(self, p):
+ """
+ ArgumentList :
+ """
+ p[0] = []
+
+ def p_Arguments(self, p):
+ """
+ Arguments : COMMA Argument Arguments
+ """
+ p[0] = [p[2]] if p[2] else []
+ p[0].extend(p[3])
+
+ def p_ArgumentsEmpty(self, p):
+ """
+ Arguments :
+ """
+ p[0] = []
+
+ def p_Argument(self, p):
+ """
+ Argument : ExtendedAttributeList Optional Type Ellipsis ArgumentName DefaultValue
+ """
+ t = p[3]
+ assert isinstance(t, IDLType)
+ identifier = IDLUnresolvedIdentifier(self.getLocation(p, 5), p[5])
+
+ optional = p[2]
+ variadic = p[4]
+ defaultValue = p[6]
+
+ if not optional and defaultValue:
+ raise WebIDLError("Mandatory arguments can't have a default value.",
+ [self.getLocation(p, 6)])
+
+ # We can't test t.isAny() here and give it a default value as needed,
+ # since at this point t is not a fully resolved type yet (e.g. it might
+ # be a typedef). We'll handle the 'any' case in IDLArgument.complete.
+
+ if variadic:
+ if optional:
+ raise WebIDLError("Variadic arguments should not be marked optional.",
+ [self.getLocation(p, 2)])
+ optional = variadic
+
+ p[0] = IDLArgument(self.getLocation(p, 5), identifier, t, optional, defaultValue, variadic)
+ p[0].addExtendedAttributes(p[1])
+
+ def p_ArgumentName(self, p):
+ """
+ ArgumentName : IDENTIFIER
+ | ATTRIBUTE
+ | CALLBACK
+ | CONST
+ | CREATOR
+ | DELETER
+ | DICTIONARY
+ | ENUM
+ | EXCEPTION
+ | GETTER
+ | IMPLEMENTS
+ | INHERIT
+ | INTERFACE
+ | LEGACYCALLER
+ | PARTIAL
+ | SERIALIZER
+ | SETTER
+ | STATIC
+ | STRINGIFIER
+ | JSONIFIER
+ | TYPEDEF
+ | UNRESTRICTED
+ """
+ p[0] = p[1]
+
+ def p_Optional(self, p):
+ """
+ Optional : OPTIONAL
+ """
+ p[0] = True
+
+ def p_OptionalEmpty(self, p):
+ """
+ Optional :
+ """
+ p[0] = False
+
+ def p_Ellipsis(self, p):
+ """
+ Ellipsis : ELLIPSIS
+ """
+ p[0] = True
+
+ def p_EllipsisEmpty(self, p):
+ """
+ Ellipsis :
+ """
+ p[0] = False
+
+ def p_ExceptionMember(self, p):
+ """
+ ExceptionMember : Const
+ | ExceptionField
+ """
+ pass
+
+ def p_ExceptionField(self, p):
+ """
+ ExceptionField : Type IDENTIFIER SEMICOLON
+ """
+ pass
+
+ def p_ExtendedAttributeList(self, p):
+ """
+ ExtendedAttributeList : LBRACKET ExtendedAttribute ExtendedAttributes RBRACKET
+ """
+ p[0] = [p[2]]
+ if p[3]:
+ p[0].extend(p[3])
+
+ def p_ExtendedAttributeListEmpty(self, p):
+ """
+ ExtendedAttributeList :
+ """
+ p[0] = []
+
+ def p_ExtendedAttribute(self, p):
+ """
+ ExtendedAttribute : ExtendedAttributeNoArgs
+ | ExtendedAttributeArgList
+ | ExtendedAttributeIdent
+ | ExtendedAttributeNamedArgList
+ """
+ p[0] = IDLExtendedAttribute(self.getLocation(p, 1), p[1])
+
+ def p_ExtendedAttributeEmpty(self, p):
+ """
+ ExtendedAttribute :
+ """
+ pass
+
+ def p_ExtendedAttributes(self, p):
+ """
+ ExtendedAttributes : COMMA ExtendedAttribute ExtendedAttributes
+ """
+ p[0] = [p[2]] if p[2] else []
+ p[0].extend(p[3])
+
+ def p_ExtendedAttributesEmpty(self, p):
+ """
+ ExtendedAttributes :
+ """
+ p[0] = []
+
+ def p_Other(self, p):
+ """
+ Other : INTEGER
+ | FLOATLITERAL
+ | IDENTIFIER
+ | STRING
+ | OTHER
+ | ELLIPSIS
+ | COLON
+ | SCOPE
+ | SEMICOLON
+ | LT
+ | EQUALS
+ | GT
+ | QUESTIONMARK
+ | DATE
+ | DOMSTRING
+ | BYTESTRING
+ | ANY
+ | ATTRIBUTE
+ | BOOLEAN
+ | BYTE
+ | LEGACYCALLER
+ | CONST
+ | CREATOR
+ | DELETER
+ | DOUBLE
+ | EXCEPTION
+ | FALSE
+ | FLOAT
+ | GETTER
+ | IMPLEMENTS
+ | INHERIT
+ | INTERFACE
+ | LONG
+ | MODULE
+ | NULL
+ | OBJECT
+ | OCTET
+ | OPTIONAL
+ | SEQUENCE
+ | SETTER
+ | SHORT
+ | STATIC
+ | STRINGIFIER
+ | JSONIFIER
+ | TRUE
+ | TYPEDEF
+ | UNSIGNED
+ | VOID
+ """
+ pass
+
+ def p_OtherOrComma(self, p):
+ """
+ OtherOrComma : Other
+ | COMMA
+ """
+ pass
+
+ def p_TypeSingleType(self, p):
+ """
+ Type : SingleType
+ """
+ p[0] = p[1]
+
+ def p_TypeUnionType(self, p):
+ """
+ Type : UnionType TypeSuffix
+ """
+ p[0] = self.handleModifiers(p[1], p[2])
+
+ def p_SingleTypeNonAnyType(self, p):
+ """
+ SingleType : NonAnyType
+ """
+ p[0] = p[1]
+
+ def p_SingleTypeAnyType(self, p):
+ """
+ SingleType : ANY TypeSuffixStartingWithArray
+ """
+ p[0] = self.handleModifiers(BuiltinTypes[IDLBuiltinType.Types.any], p[2])
+
+ def p_UnionType(self, p):
+ """
+ UnionType : LPAREN UnionMemberType OR UnionMemberType UnionMemberTypes RPAREN
+ """
+ types = [p[2], p[4]]
+ types.extend(p[5])
+ p[0] = IDLUnionType(self.getLocation(p, 1), types)
+
+ def p_UnionMemberTypeNonAnyType(self, p):
+ """
+ UnionMemberType : NonAnyType
+ """
+ p[0] = p[1]
+
+ def p_UnionMemberTypeArrayOfAny(self, p):
+ """
+ UnionMemberTypeArrayOfAny : ANY LBRACKET RBRACKET
+ """
+ p[0] = IDLArrayType(self.getLocation(p, 2),
+ BuiltinTypes[IDLBuiltinType.Types.any])
+
+ def p_UnionMemberType(self, p):
+ """
+ UnionMemberType : UnionType TypeSuffix
+ | UnionMemberTypeArrayOfAny TypeSuffix
+ """
+ p[0] = self.handleModifiers(p[1], p[2])
+
+ def p_UnionMemberTypes(self, p):
+ """
+ UnionMemberTypes : OR UnionMemberType UnionMemberTypes
+ """
+ p[0] = [p[2]]
+ p[0].extend(p[3])
+
+ def p_UnionMemberTypesEmpty(self, p):
+ """
+ UnionMemberTypes :
+ """
+ p[0] = []
+
+ def p_NonAnyType(self, p):
+ """
+ NonAnyType : PrimitiveOrStringType TypeSuffix
+ | ARRAYBUFFER TypeSuffix
+ | OBJECT TypeSuffix
+ """
+ if p[1] == "object":
+ type = BuiltinTypes[IDLBuiltinType.Types.object]
+ elif p[1] == "ArrayBuffer":
+ type = BuiltinTypes[IDLBuiltinType.Types.ArrayBuffer]
+ else:
+ type = BuiltinTypes[p[1]]
+
+ p[0] = self.handleModifiers(type, p[2])
+
+ def p_NonAnyTypeSequenceType(self, p):
+ """
+ NonAnyType : SEQUENCE LT Type GT Null
+ """
+ innerType = p[3]
+ type = IDLSequenceType(self.getLocation(p, 1), innerType)
+ if p[5]:
+ type = IDLNullableType(self.getLocation(p, 5), type)
+ p[0] = type
+
+ def p_NonAnyTypeScopedName(self, p):
+ """
+ NonAnyType : ScopedName TypeSuffix
+ """
+ assert isinstance(p[1], IDLUnresolvedIdentifier)
+
+ type = None
+
+ try:
+ if self.globalScope()._lookupIdentifier(p[1]):
+ obj = self.globalScope()._lookupIdentifier(p[1])
+ if obj.isType():
+ type = obj
+ else:
+ type = IDLWrapperType(self.getLocation(p, 1), p[1])
+ p[0] = self.handleModifiers(type, p[2])
+ return
+ except:
+ pass
+
+ type = IDLUnresolvedType(self.getLocation(p, 1), p[1])
+ p[0] = self.handleModifiers(type, p[2])
+
+ def p_NonAnyTypeDate(self, p):
+ """
+ NonAnyType : DATE TypeSuffix
+ """
+ p[0] = self.handleModifiers(BuiltinTypes[IDLBuiltinType.Types.date],
+ p[2])
+
+ def p_ConstType(self, p):
+ """
+ ConstType : PrimitiveOrStringType Null
+ """
+ type = BuiltinTypes[p[1]]
+ if p[2]:
+ type = IDLNullableType(self.getLocation(p, 1), type)
+ p[0] = type
+
+ def p_ConstTypeIdentifier(self, p):
+ """
+ ConstType : IDENTIFIER Null
+ """
+ identifier = IDLUnresolvedIdentifier(self.getLocation(p, 1), p[1])
+
+ type = IDLUnresolvedType(self.getLocation(p, 1), identifier)
+ if p[2]:
+ type = IDLNullableType(self.getLocation(p, 1), type)
+ p[0] = type
+
+ def p_PrimitiveOrStringTypeUint(self, p):
+ """
+ PrimitiveOrStringType : UnsignedIntegerType
+ """
+ p[0] = p[1]
+
+ def p_PrimitiveOrStringTypeBoolean(self, p):
+ """
+ PrimitiveOrStringType : BOOLEAN
+ """
+ p[0] = IDLBuiltinType.Types.boolean
+
+ def p_PrimitiveOrStringTypeByte(self, p):
+ """
+ PrimitiveOrStringType : BYTE
+ """
+ p[0] = IDLBuiltinType.Types.byte
+
+ def p_PrimitiveOrStringTypeOctet(self, p):
+ """
+ PrimitiveOrStringType : OCTET
+ """
+ p[0] = IDLBuiltinType.Types.octet
+
+ def p_PrimitiveOrStringTypeFloat(self, p):
+ """
+ PrimitiveOrStringType : FLOAT
+ """
+ p[0] = IDLBuiltinType.Types.float
+
+ def p_PrimitiveOrStringTypeUnrestictedFloat(self, p):
+ """
+ PrimitiveOrStringType : UNRESTRICTED FLOAT
+ """
+ p[0] = IDLBuiltinType.Types.unrestricted_float
+
+ def p_PrimitiveOrStringTypeDouble(self, p):
+ """
+ PrimitiveOrStringType : DOUBLE
+ """
+ p[0] = IDLBuiltinType.Types.double
+
+ def p_PrimitiveOrStringTypeUnrestictedDouble(self, p):
+ """
+ PrimitiveOrStringType : UNRESTRICTED DOUBLE
+ """
+ p[0] = IDLBuiltinType.Types.unrestricted_double
+
+ def p_PrimitiveOrStringTypeDOMString(self, p):
+ """
+ PrimitiveOrStringType : DOMSTRING
+ """
+ p[0] = IDLBuiltinType.Types.domstring
+
+ def p_PrimitiveOrStringTypeBytestring(self, p):
+ """
+ PrimitiveOrStringType : BYTESTRING
+ """
+ p[0] = IDLBuiltinType.Types.bytestring
+
+ def p_UnsignedIntegerTypeUnsigned(self, p):
+ """
+ UnsignedIntegerType : UNSIGNED IntegerType
+ """
+ p[0] = p[2] + 1 # Adding one to a given signed integer type
+ # gets you the unsigned type.
+
+ def p_UnsignedIntegerType(self, p):
+ """
+ UnsignedIntegerType : IntegerType
+ """
+ p[0] = p[1]
+
+ def p_IntegerTypeShort(self, p):
+ """
+ IntegerType : SHORT
+ """
+ p[0] = IDLBuiltinType.Types.short
+
+ def p_IntegerTypeLong(self, p):
+ """
+ IntegerType : LONG OptionalLong
+ """
+ if p[2]:
+ p[0] = IDLBuiltinType.Types.long_long
+ else:
+ p[0] = IDLBuiltinType.Types.long
+
+ def p_OptionalLong(self, p):
+ """
+ OptionalLong : LONG
+ """
+ p[0] = True
+
+ def p_OptionalLongEmpty(self, p):
+ """
+ OptionalLong :
+ """
+ p[0] = False
+
+ def p_TypeSuffixBrackets(self, p):
+ """
+ TypeSuffix : LBRACKET RBRACKET TypeSuffix
+ """
+ p[0] = [(IDLMethod.TypeSuffixModifier.Brackets, self.getLocation(p, 1))]
+ p[0].extend(p[3])
+
+ def p_TypeSuffixQMark(self, p):
+ """
+ TypeSuffix : QUESTIONMARK TypeSuffixStartingWithArray
+ """
+ p[0] = [(IDLMethod.TypeSuffixModifier.QMark, self.getLocation(p, 1))]
+ p[0].extend(p[2])
+
+ def p_TypeSuffixEmpty(self, p):
+ """
+ TypeSuffix :
+ """
+ p[0] = []
+
+ def p_TypeSuffixStartingWithArray(self, p):
+ """
+ TypeSuffixStartingWithArray : LBRACKET RBRACKET TypeSuffix
+ """
+ p[0] = [(IDLMethod.TypeSuffixModifier.Brackets, self.getLocation(p, 1))]
+ p[0].extend(p[3])
+
+ def p_TypeSuffixStartingWithArrayEmpty(self, p):
+ """
+ TypeSuffixStartingWithArray :
+ """
+ p[0] = []
+
+ def p_Null(self, p):
+ """
+ Null : QUESTIONMARK
+ |
+ """
+ if len(p) > 1:
+ p[0] = True
+ else:
+ p[0] = False
+
+ def p_ReturnTypeType(self, p):
+ """
+ ReturnType : Type
+ """
+ p[0] = p[1]
+
+ def p_ReturnTypeVoid(self, p):
+ """
+ ReturnType : VOID
+ """
+ p[0] = BuiltinTypes[IDLBuiltinType.Types.void]
+
+ def p_ScopedName(self, p):
+ """
+ ScopedName : AbsoluteScopedName
+ | RelativeScopedName
+ """
+ p[0] = p[1]
+
+ def p_AbsoluteScopedName(self, p):
+ """
+ AbsoluteScopedName : SCOPE IDENTIFIER ScopedNameParts
+ """
+ assert False
+ pass
+
+ def p_RelativeScopedName(self, p):
+ """
+ RelativeScopedName : IDENTIFIER ScopedNameParts
+ """
+ assert not p[2] # Not implemented!
+
+ p[0] = IDLUnresolvedIdentifier(self.getLocation(p, 1), p[1])
+
+ def p_ScopedNameParts(self, p):
+ """
+ ScopedNameParts : SCOPE IDENTIFIER ScopedNameParts
+ """
+ assert False
+ pass
+
+ def p_ScopedNamePartsEmpty(self, p):
+ """
+ ScopedNameParts :
+ """
+ p[0] = None
+
+ def p_ExtendedAttributeNoArgs(self, p):
+ """
+ ExtendedAttributeNoArgs : IDENTIFIER
+ """
+ p[0] = (p[1],)
+
+ def p_ExtendedAttributeArgList(self, p):
+ """
+ ExtendedAttributeArgList : IDENTIFIER LPAREN ArgumentList RPAREN
+ """
+ p[0] = (p[1], p[3])
+
+ def p_ExtendedAttributeIdent(self, p):
+ """
+ ExtendedAttributeIdent : IDENTIFIER EQUALS STRING
+ | IDENTIFIER EQUALS IDENTIFIER
+ """
+ p[0] = (p[1], p[3])
+
+ def p_ExtendedAttributeNamedArgList(self, p):
+ """
+ ExtendedAttributeNamedArgList : IDENTIFIER EQUALS IDENTIFIER LPAREN ArgumentList RPAREN
+ """
+ p[0] = (p[1], p[3], p[5])
+
+ def p_error(self, p):
+ if not p:
+ raise WebIDLError("Syntax Error at end of file. Possibly due to missing semicolon(;), braces(}) or both",
+ [self._filename])
+ else:
+ raise WebIDLError("invalid syntax", [Location(self.lexer, p.lineno, p.lexpos, self._filename)])
+
+ def __init__(self, outputdir='', lexer=None):
+ Tokenizer.__init__(self, outputdir, lexer)
+ self.parser = yacc.yacc(module=self,
+ outputdir=outputdir,
+ tabmodule='webidlyacc',
+ errorlog=yacc.NullLogger(),
+ picklefile='WebIDLGrammar.pkl')
+ self._globalScope = IDLScope(BuiltinLocation("<Global Scope>"), None, None)
+ self._installBuiltins(self._globalScope)
+ self._productions = []
+
+ self._filename = "<builtin>"
+ self.lexer.input(Parser._builtins)
+ self._filename = None
+
+ self.parser.parse(lexer=self.lexer,tracking=True)
+
+ def _installBuiltins(self, scope):
+ assert isinstance(scope, IDLScope)
+
+ # xrange omits the last value.
+ for x in xrange(IDLBuiltinType.Types.ArrayBuffer, IDLBuiltinType.Types.Float64Array + 1):
+ builtin = BuiltinTypes[x]
+ name = builtin.name
+
+ typedef = IDLTypedefType(BuiltinLocation("<builtin type>"), builtin, name)
+ typedef.resolve(scope)
+
+ @ staticmethod
+ def handleModifiers(type, modifiers):
+ for (modifier, modifierLocation) in modifiers:
+ assert modifier == IDLMethod.TypeSuffixModifier.QMark or \
+ modifier == IDLMethod.TypeSuffixModifier.Brackets
+
+ if modifier == IDLMethod.TypeSuffixModifier.QMark:
+ type = IDLNullableType(modifierLocation, type)
+ elif modifier == IDLMethod.TypeSuffixModifier.Brackets:
+ type = IDLArrayType(modifierLocation, type)
+
+ return type
+
+ def parse(self, t, filename=None):
+ self.lexer.input(t)
+
+ #for tok in iter(self.lexer.token, None):
+ # print tok
+
+ self._filename = filename
+ self._productions.extend(self.parser.parse(lexer=self.lexer,tracking=True))
+ self._filename = None
+
+ def finish(self):
+ # First, finish all the IDLImplementsStatements. In particular, we
+ # have to make sure we do those before we do the IDLInterfaces.
+ # XXX khuey hates this bit and wants to nuke it from orbit.
+ implementsStatements = [ p for p in self._productions if
+ isinstance(p, IDLImplementsStatement)]
+ otherStatements = [ p for p in self._productions if
+ not isinstance(p, IDLImplementsStatement)]
+ for production in implementsStatements:
+ production.finish(self.globalScope())
+ for production in otherStatements:
+ production.finish(self.globalScope())
+
+ # Do any post-finish validation we need to do
+ for production in self._productions:
+ production.validate()
+
+ # De-duplicate self._productions, without modifying its order.
+ seen = set()
+ result = []
+ for p in self._productions:
+ if p not in seen:
+ seen.add(p)
+ result.append(p)
+ return result
+
+ def reset(self):
+ return Parser(lexer=self.lexer)
+
+ # Builtin IDL defined by WebIDL
+ _builtins = """
+ typedef unsigned long long DOMTimeStamp;
+ """
+
+def main():
+ # Parse arguments.
+ from optparse import OptionParser
+ usageString = "usage: %prog [options] files"
+ o = OptionParser(usage=usageString)
+ o.add_option("--cachedir", dest='cachedir', default=None,
+ help="Directory in which to cache lex/parse tables.")
+ o.add_option("--verbose-errors", action='store_true', default=False,
+ help="When an error happens, display the Python traceback.")
+ (options, args) = o.parse_args()
+
+ if len(args) < 1:
+ o.error(usageString)
+
+ fileList = args
+ baseDir = os.getcwd()
+
+ # Parse the WebIDL.
+ parser = Parser(options.cachedir)
+ try:
+ for filename in fileList:
+ fullPath = os.path.normpath(os.path.join(baseDir, filename))
+ f = open(fullPath, 'rb')
+ lines = f.readlines()
+ f.close()
+ print fullPath
+ parser.parse(''.join(lines), fullPath)
+ parser.finish()
+ except WebIDLError, e:
+ if options.verbose_errors:
+ traceback.print_exc()
+ else:
+ print e
+
+if __name__ == '__main__':
+ main()
+
diff --git a/third_party/__init__.py b/third_party/__init__.py
new file mode 100644
index 00000000..8fa2136f
--- /dev/null
+++ b/third_party/__init__.py
@@ -0,0 +1,2 @@
+#
+
diff --git a/tools/eliminator/asm-eliminator-test-output.js b/tools/eliminator/asm-eliminator-test-output.js
index 7a8baef2..1a5dca55 100644
--- a/tools/eliminator/asm-eliminator-test-output.js
+++ b/tools/eliminator/asm-eliminator-test-output.js
@@ -147,27 +147,25 @@ function looop3() {
}
}
function looop4() {
- var i = 0, helper = 0;
+ var i = 0, i$looptemp = 0;
while (1) {
do_it();
- helper = i + 1 | 0;
- f(i, helper);
- if (condition()) {
- i = helper;
- } else {
+ i$looptemp = i;
+ i = i + 1 | 0;
+ f(i$looptemp, i);
+ if (!condition()) {
break;
}
}
}
function looop4b() {
- var i = 0, helper = 0;
+ var i = 0, i$looptemp = 0;
while (1) {
do_it();
- helper = i + 1 | 0;
- g(helper);
- if (condition(i)) {
- i = helper;
- } else {
+ i$looptemp = i;
+ i = i + 1 | 0;
+ g(i);
+ if (!condition(i$looptemp)) {
break;
}
}
@@ -251,24 +249,22 @@ function multiloop($n_0, $35) {
function multiloop2($n_0, $35) {
$n_0 = $n_0 | 0;
$35 = $35 | 0;
- var $p_0 = 0, $39 = 0, $41 = 0, $46 = 0;
+ var $p_0 = 0, $41 = 0, $p_0$looptemp = 0;
$n_0 = $35;
$p_0 = (HEAP32[$15 >> 2] | 0) + ($35 << 1) | 0;
while (1) {
- $39 = $p_0 - 2 | 0;
- $41 = HEAPU16[$39 >> 1] | 0;
+ $p_0$looptemp = $p_0;
+ $p_0 = $p_0 - 2 | 0;
+ $41 = HEAPU16[$p_0 >> 1] | 0;
if ($41 >>> 0 < $2 >>> 0) {
$_off0 = 0;
} else {
$_off0 = $41 - $2 & 65535;
}
- HEAP16[$39 >> 1] = $p_0;
- $46 = $n_0 - 1 | 0;
- if (($46 | 0) == 0) {
+ HEAP16[$p_0 >> 1] = $p_0$looptemp;
+ $n_0 = $n_0 - 1 | 0;
+ if (($n_0 | 0) == 0) {
break;
- } else {
- $n_0 = $46;
- $p_0 = $39;
}
}
}
@@ -810,4 +806,109 @@ function cute($this, $outImage) {
}
return 0;
}
+function selfAssign() {
+ var i1 = 0;
+ i1 = HEAP32[2] | 0;
+ HEAP32[2] = i1 + 1;
+ if (waka) {
+ return 0;
+ }
+ return i1 & 16384 | 0;
+}
+function elimOneLoopVar($argc, $argv) {
+ $argc = $argc | 0;
+ $argv = $argv | 0;
+ var $arg$0 = 0, $call10 = Math_fround(0), $curri$012 = 0, $inc = 0, $j$010 = 0, $ok$0 = 0, $primes$011 = 0, $retval$0 = 0, $vararg_buffer1 = 0;
+ $curri$012 = 2;
+ $primes$011 = 0;
+ while (1) {
+ $call10 = Math_fround(Math_sqrt(Math_fround(Math_fround($curri$012 | 0))));
+ L15 : do {
+ if ($call10 > Math_fround(+2)) {
+ $j$010 = 2;
+ while (1) {
+ $inc = $j$010 + 1 | 0;
+ if ((($curri$012 | 0) % ($j$010 | 0) & -1 | 0) == 0) {
+ $ok$0 = 0;
+ break L15;
+ }
+ if (Math_fround($inc | 0) < $call10) {
+ $j$010 = $inc;
+ } else {
+ $ok$0 = 1;
+ break;
+ }
+ }
+ } else {
+ $ok$0 = 1;
+ }
+ } while (0);
+ $primes$011 = $ok$0 + $primes$011 | 0;
+ if (($primes$011 | 0) >= ($arg$0 | 0)) {
+ break;
+ } else {
+ $curri$012 = $curri$012 + 1 | 0;
+ }
+ }
+ HEAP32[$vararg_buffer1 >> 2] = $curri$012;
+ return $retval$0 | 0;
+}
+function elimOneLoopVar2() {
+ var $storemerge3$neg9 = 0, $18 = 0, $25 = 0, $26 = 0, $30 = 0, $jp = 0;
+ $storemerge3$neg9 = -1;
+ while (1) {
+ $25 = $jp + ($26 << 2) | 0;
+ HEAP32[$25 >> 2] = ($18 + $storemerge3$neg9 | 0) + (HEAP32[$25 >> 2] | 0) | 0;
+ $30 = $26 + 1 | 0;
+ if (($30 | 0) == 63) {
+ break;
+ } else {
+ $storemerge3$neg9 = $26 ^ -1;
+ $26 = $30;
+ }
+ }
+}
+function elimOneLoopVar3() {
+ var $storemerge3$neg9 = 0, $18 = 0, $25 = 0, $26 = 0, $30 = 0, $jp = 0;
+ $storemerge3$neg9 = -1;
+ while (1) {
+ $25 = $jp + ($26 << 2) | 0;
+ HEAP32[$25 >> 2] = ($18 + $storemerge3$neg9 | 0) + (HEAP32[$25 >> 2] | 0) | 0;
+ $30 = $26 + 1 | 0;
+ if (($30 | 0) == 63) {
+ break;
+ } else {
+ $storemerge3$neg9 = $30 ^ -1;
+ $26 = $30;
+ }
+ }
+}
+function elimOneLoopVar4() {
+ var $storemerge3$neg9 = 0, $18 = 0, $25 = 0, $26 = 0, $jp = 0;
+ $storemerge3$neg9 = -1;
+ while (1) {
+ $25 = $jp + ($26 << 2) | 0;
+ HEAP32[$25 >> 2] = ($18 + $storemerge3$neg9 | 0) + (HEAP32[$25 >> 2] | 0) | 0;
+ $26 = $26 + 1 | 0;
+ if (($26 | 0) == 63) {
+ break;
+ } else {
+ $storemerge3$neg9 = $18 ^ -1;
+ }
+ }
+}
+function elimOneLoopVarStillUsed() {
+ var $call10 = Math_fround(0), $curri$012 = 0, $j$010 = 0, $retval$0 = 0, $j$010$looptemp = 0;
+ while (1) {
+ $j$010$looptemp = $j$010;
+ $j$010 = $j$010 + 1 | 0;
+ if ((($curri$012 | 0) % ($j$010$looptemp | 0) & -1 | 0) == 0) {
+ break;
+ }
+ if (!(Math_fround($j$010 | 0) < $call10)) {
+ break;
+ }
+ }
+ return $retval$0 | 0;
+}
diff --git a/tools/eliminator/asm-eliminator-test.js b/tools/eliminator/asm-eliminator-test.js
index ad1ed05e..d5bbd8d5 100644
--- a/tools/eliminator/asm-eliminator-test.js
+++ b/tools/eliminator/asm-eliminator-test.js
@@ -1027,5 +1027,130 @@ function cute($this, $outImage) {
}
return 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", "binary", "cute"]
+function selfAssign() {
+ var i1 = 0;
+ i1 = HEAP32[2] | 0;
+ HEAP32[2] = i1 + 1;
+ if (waka) {
+ return (STACKTOP = STACKTOP, 0);
+ }
+ STACKTOP = STACKTOP;
+ return i1 & 16384 | 0;
+}
+function elimOneLoopVar($argc, $argv) {
+ $argc = $argc | 0;
+ $argv = $argv | 0;
+ var $0 = 0, $1 = 0, $arg$0 = 0, $arrayidx = 0, $call10 = Math_fround(0), $cmp = 0, $cmp11 = 0, $cmp119 = 0, $cmp12 = 0, $cmp7 = 0, $conv = 0, $conv8 = Math_fround(0), $conv9 = Math_fround(0), $curri$012 = 0, $inc = 0, $inc14$primes$0 = 0, $inc16 = 0, $j$010 = 0, $j$010$phi = 0, $ok$0 = 0;
+ var $primes$011 = 0, $rem = 0, $retval$0 = 0, $sub = 0, $vararg_buffer1 = 0, label = 0, sp = 0;
+ $curri$012 = 2;
+ $primes$011 = 0;
+ while (1) {
+ $conv9 = Math_fround($curri$012 | 0);
+ $call10 = Math_fround(Math_sqrt(Math_fround($conv9)));
+ $cmp119 = $call10 > Math_fround(+2);
+ L15 : do {
+ if ($cmp119) {
+ $j$010 = 2;
+ while (1) {
+ $rem = ($curri$012 | 0) % ($j$010 | 0) & -1;
+ $cmp12 = ($rem | 0) == 0;
+ $inc = $j$010 + 1 | 0;
+ if ($cmp12) {
+ $ok$0 = 0;
+ break L15;
+ }
+ $conv8 = Math_fround($inc | 0);
+ $cmp11 = $conv8 < $call10;
+ if ($cmp11) {
+ $j$010$phi = $inc;
+ $j$010 = $j$010$phi;
+ } else {
+ $ok$0 = 1;
+ break;
+ }
+ }
+ } else {
+ $ok$0 = 1;
+ }
+ } while (0);
+ $inc14$primes$0 = $ok$0 + $primes$011 | 0;
+ $inc16 = $curri$012 + 1 | 0;
+ $cmp7 = ($inc14$primes$0 | 0) < ($arg$0 | 0);
+ if ($cmp7) {
+ $curri$012 = $inc16;
+ $primes$011 = $inc14$primes$0;
+ } else {
+ break;
+ }
+ }
+ HEAP32[$vararg_buffer1 >> 2] = $curri$012;
+ return $retval$0 | 0;
+}
+function elimOneLoopVar2() {
+ var $storemerge3$neg9 = 0, $18 = 0, $25 = 0, $26 = 0, $30 = 0, $jp = 0;
+ $storemerge3$neg9 = -1;
+ while (1) {
+ $25 = $jp + ($26 << 2) | 0;
+ HEAP32[$25 >> 2] = ($18 + $storemerge3$neg9 | 0) + (HEAP32[$25 >> 2] | 0) | 0;
+ $30 = $26 + 1 | 0;
+ if (($30 | 0) == 63) {
+ break;
+ } else {
+ $storemerge3$neg9 = $26 ^ -1; // $26 is a loopvar, use here is dangerous
+ $26 = $30;
+ }
+ }
+}
+function elimOneLoopVar3() {
+ var $storemerge3$neg9 = 0, $18 = 0, $25 = 0, $26 = 0, $30 = 0, $jp = 0;
+ $storemerge3$neg9 = -1;
+ while (1) {
+ $25 = $jp + ($26 << 2) | 0;
+ HEAP32[$25 >> 2] = ($18 + $storemerge3$neg9 | 0) + (HEAP32[$25 >> 2] | 0) | 0;
+ $30 = $26 + 1 | 0;
+ if (($30 | 0) == 63) {
+ break;
+ } else {
+ $storemerge3$neg9 = $30 ^ -1; // $26 is a helper, use here is dangerous
+ $26 = $30;
+ }
+ }
+}
+function elimOneLoopVar4() {
+ var $storemerge3$neg9 = 0, $18 = 0, $25 = 0, $26 = 0, $30 = 0, $jp = 0;
+ $storemerge3$neg9 = -1;
+ while (1) {
+ $25 = $jp + ($26 << 2) | 0;
+ HEAP32[$25 >> 2] = ($18 + $storemerge3$neg9 | 0) + (HEAP32[$25 >> 2] | 0) | 0;
+ $30 = $26 + 1 | 0;
+ if (($30 | 0) == 63) {
+ break;
+ } else {
+ $storemerge3$neg9 = $18 ^ -1;
+ $26 = $30;
+ }
+ }
+}
+function elimOneLoopVarStillUsed() {
+ var $0 = 0, $1 = 0, $arg$0 = 0, $arrayidx = 0, $call10 = Math_fround(0), $cmp = 0, $cmp11 = 0, $cmp119 = 0, $cmp12 = 0, $cmp7 = 0, $conv = 0, $conv8 = Math_fround(0), $conv9 = Math_fround(0), $curri$012 = 0, $inc = 0, $inc14$primes$0 = 0, $inc16 = 0, $j$010 = 0, $ok$0 = 0;
+ var $primes$011 = 0, $rem = 0, $retval$0 = 0, $sub = 0, $vararg_buffer1 = 0, label = 0, sp = 0;
+ while (1) {
+ $rem = ($curri$012 | 0) % ($j$010 | 0) & -1;
+ $cmp12 = ($rem | 0) == 0;
+ $inc = $j$010 + 1 | 0;
+ if ($cmp12) {
+ $ok$0 = 0;
+ break;
+ }
+ $conv8 = Math_fround($inc | 0);
+ $cmp11 = $conv8 < $call10;
+ if ($cmp11) {
+ $j$010 = $inc;
+ } else {
+ break;
+ }
+ }
+ 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", "binary", "cute", "selfAssign", "elimOneLoopVar", "elimOneLoopVar2", "elimOneLoopVar3", "elimOneLoopVar4", "elimOneLoopVarStillUsed"]
diff --git a/tools/file_packager.py b/tools/file_packager.py
index 12cc5475..0ab68511 100644
--- a/tools/file_packager.py
+++ b/tools/file_packager.py
@@ -113,7 +113,7 @@ for arg in sys.argv[2:]:
try:
from shared import CRUNCH
except Exception, e:
- print >> sys.stderr, 'count not import CRUNCH (make sure it is defined properly in ~/.emscripten)'
+ print >> sys.stderr, 'could not import CRUNCH (make sure it is defined properly in ~/.emscripten)'
raise e
crunch = arg.split('=')[1] if '=' in arg else '128'
leading = ''
@@ -123,12 +123,13 @@ for arg in sys.argv[2:]:
leading = ''
elif leading == 'preload' or leading == 'embed':
mode = leading
- if '@' in arg:
+ uses_at_notation = '@' in arg
+ if uses_at_notation:
srcpath, dstpath = arg.split('@') # User is specifying destination filename explicitly.
else:
srcpath = dstpath = arg # Use source path as destination path.
if os.path.isfile(srcpath) or os.path.isdir(srcpath):
- data_files.append({ 'srcpath': srcpath, 'dstpath': dstpath, 'mode': mode })
+ data_files.append({ 'srcpath': srcpath, 'dstpath': dstpath, 'mode': mode, 'explicit_dst_path': uses_at_notation })
else:
print >> sys.stderr, 'Warning: ' + arg + ' does not exist, ignoring.'
elif leading == 'exclude':
@@ -206,7 +207,7 @@ def add(arg, dirname, names):
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.
- new_data_files.append({ 'srcpath': fullname, 'dstpath': dstpath, 'mode': mode })
+ new_data_files.append({ 'srcpath': fullname, 'dstpath': dstpath, 'mode': mode, 'explicit_dst_path': True })
del names[:]
names.extend(new_names)
@@ -223,13 +224,14 @@ if len(data_files) == 0:
sys.exit(1)
# Absolutize paths, and check that they make sense
-curr_abspath = os.path.abspath(os.getcwd())
+curr_abspath = os.path.abspath(os.getcwd()) # os.getcwd() always returns the hard path with any symbolic links resolved, even if we cd'd into a symbolic link.
+
for file_ in data_files:
- if file_['srcpath'] == file_['dstpath']:
+ if not file_['explicit_dst_path']:
# This file was not defined with src@dst, so we inferred the destination from the source. In that case,
# we require that the destination not be under the current location
path = file_['dstpath']
- abspath = os.path.abspath(path)
+ abspath = os.path.realpath(os.path.abspath(path)) # Use os.path.realpath to resolve any symbolic links to hard paths, to match the structure in curr_abspath.
if DEBUG: print >> sys.stderr, path, abspath, curr_abspath
if not abspath.startswith(curr_abspath):
print >> sys.stderr, 'Error: Embedding "%s" which is below the current directory "%s". This is invalid since the current directory becomes the root that the generated code will see' % (path, curr_abspath)
diff --git a/tools/js-optimizer.js b/tools/js-optimizer.js
index fc195e03..32c26c51 100644
--- a/tools/js-optimizer.js
+++ b/tools/js-optimizer.js
@@ -140,6 +140,8 @@ var ALTER_FLOW = set('break', 'continue', 'return');
var BREAK_CAPTURERS = set('do', 'while', 'for', 'switch');
var CONTINUE_CAPTURERS = LOOP;
+var COMMABLE = set('assign', 'binary', 'unary-prefix', 'unary-postfix', 'name', 'num', 'call', 'seq', 'conditional', 'sub');
+
var FUNCTIONS_THAT_ALWAYS_THROW = set('abort', '___resumeException', '___cxa_throw', '___cxa_rethrow');
var NULL_NODE = ['name', 'null'];
@@ -167,11 +169,11 @@ function astToSrc(ast, minifyWhitespace) {
// Traverses the children of a node. If the traverse function returns an object,
// replaces the child. If it returns true, stop the traversal and return true.
-function traverseChildren(node, traverse, pre, post, stack) {
+function traverseChildren(node, traverse, pre, post) {
for (var i = 0; i < node.length; i++) {
var subnode = node[i];
if (Array.isArray(subnode)) {
- var subresult = traverse(subnode, pre, post, stack);
+ var subresult = traverse(subnode, pre, post);
if (subresult === true) return true;
if (subresult !== null && typeof subresult === 'object') node[i] = subresult;
}
@@ -187,30 +189,24 @@ function traverseChildren(node, traverse, pre, post, stack) {
// it replaces the passed node in the tree. If null is returned, we stop
// traversing the subelements (but continue otherwise).
// @arg post: A callback to call after traversing all children.
-// @arg stack: If true, a stack will be implemented: If pre does not push on
-// the stack, we push a 0. We pop when we leave the node. The
-// stack is passed as a third parameter to the callbacks.
// @returns: If the root node was replaced, the new root node. If the traversal
// was stopped, true. Otherwise undefined.
-function traverse(node, pre, post, stack) {
+function traverse(node, pre, post) {
var type = node[0], result, len;
var relevant = typeof type === 'string';
if (relevant) {
- if (stack) len = stack.length;
- var result = pre(node, type, stack);
+ var result = pre(node, type);
if (result === true) return true;
if (result && result !== null) node = result; // Continue processing on this node
- if (stack && len === stack.length) stack.push(0);
}
if (result !== null) {
- if (traverseChildren(node, traverse, pre, post, stack) === true) return true;
+ if (traverseChildren(node, traverse, pre, post) === true) return true;
}
if (relevant) {
if (post) {
- var postResult = post(node, type, stack);
+ var postResult = post(node, type);
result = result || postResult;
}
- if (stack) stack.pop();
}
return result;
}
@@ -229,38 +225,12 @@ function traverseGeneratedFunctions(ast, callback) {
}
}
-function traverseGenerated(ast, pre, post, stack) {
+function traverseGenerated(ast, pre, post) {
traverseGeneratedFunctions(ast, function(func) {
- traverse(func, pre, post, stack);
+ traverse(func, pre, post);
});
}
-// Walk the ast in a simple way, with an understanding of which JS variables are defined)
-function traverseWithVariables(ast, callback) {
- traverse(ast, function(node, type, stack) {
- if (type in FUNCTION) {
- stack.push({ type: 'function', vars: node[2] });
- } else if (type === 'var') {
- // Find our function, add our vars
- var func = stack[stack.length-1];
- if (func) {
- func.vars = func.vars.concat(node[1].map(function(varItem) { return varItem[0] }));
- }
- }
- }, function(node, type, stack) {
- if (type === 'toplevel' || type in FUNCTION) {
- // We know all of the variables that are seen here, proceed to do relevant replacements
- var allVars = stack.map(function(item) { return item ? item.vars : [] }).reduce(concatenator, []); // FIXME dictionary for speed?
- traverse(node, function(node2, type2, stack2) {
- // Be careful not to look into our inner functions. They have already been processed.
- if (sum(stack2) > 1 || (type === 'toplevel' && sum(stack2) === 1)) return;
- if (type2 in FUNCTION) stack2.push(1);
- return callback(node2, type2, allVars);
- }, null, []);
- }
- }, []);
-}
-
function emptyNode() { // XXX do we need to create new nodes here? can't we reuse?
return ['toplevel', []]
}
@@ -279,6 +249,40 @@ function clearEmptyNodes(list) {
}
}
+function filterEmptyNodes(list) { // creates a copy and returns it
+ return list.filter(function(node) {
+ return !(isEmptyNode(node) || (node[0] === 'stat' && isEmptyNode(node[1])));
+ });
+}
+
+function removeEmptySubNodes(node) {
+ if (node[0] === 'defun') {
+ node[3] = filterEmptyNodes(node[3]);
+ } else if (node[0] === 'block' && node[1]) {
+ node[1] = filterEmptyNodes(node[1]);
+ } else if (node[0] === 'seq' && isEmptyNode(node[1])) {
+ return node[2];
+ }
+/*
+ var stats = getStatements(node);
+ if (stats) clearEmptyNodes(stats);
+*/
+}
+
+function removeAllEmptySubNodes(ast) {
+ traverse(ast, removeEmptySubNodes);
+}
+
+function astCompare(x, y) {
+ if (!Array.isArray(x)) return x === y;
+ if (!Array.isArray(y)) return false;
+ if (x.length !== y.length) return false;
+ for (var i = 0; i < x.length; i++) {
+ if (!astCompare(x[i], y[i])) return false;
+ }
+ return true;
+}
+
// Passes
// Dump the AST. Useful for debugging. For example,
@@ -291,58 +295,6 @@ function dumpSrc(ast) {
printErr(astToSrc(ast));
}
-// Undos closure's creation of global variables with values true, false,
-// undefined, null. These cut down on size, but do not affect gzip size
-// and make JS engine's lives slightly harder (?)
-function unGlobalize(ast) {
-
- throw 'this is deprecated!'; // and does not work with parallel compilation
-
- assert(ast[0] === 'toplevel');
- var values = {};
- // Find global renamings of the relevant values
- ast[1].forEach(function(node, i) {
- if (node[0] != 'var') return;
- node[1] = node[1].filter(function(varItem, j) {
- var ident = varItem[0];
- var value = varItem[1];
- if (!value) return true;
- var possible = false;
- if (jsonCompare(value, NULL_NODE) ||
- jsonCompare(value, UNDEFINED_NODE) ||
- jsonCompare(value, TRUE_NODE) ||
- jsonCompare(value, FALSE_NODE)) {
- possible = true;
- }
- if (!possible) return true;
- // Make sure there are no assignments to this variable. (This isn't fast, we traverse many times..)
- ast[1][i][1][j] = emptyNode();
- var assigned = false;
- traverseWithVariables(ast, function(node, type, allVars) {
- if (type === 'assign' && node[2][0] === 'name' && node[2][1] === ident) assigned = true;
- });
- ast[1][i][1][j] = [ident, value];
- if (!assigned) {
- values[ident] = value;
- return false;
- }
- return true;
- });
-
- if (node[1].length === 0) {
- ast[1][i] = emptyNode();
- }
- });
- traverseWithVariables(ast, function(node, type, allVars) {
- if (type === 'name') {
- var ident = node[1];
- if (ident in values && allVars.indexOf(ident) < 0) {
- return copy(values[ident]);
- }
- }
- });
-}
-
// Closure compiler, when inlining, will insert assignments to
// undefined for the shared variables. However, in compiled code
// - and in library/shell code too! - we should never rely on
@@ -414,7 +366,7 @@ function removeUnneededLabelSettings(ast) {
});
}
-// Various expression simplifications. Pre run before closure (where we still have metadata), Post run after.
+// Various expression simplifications. Happens after elimination, which opens up many of these simplification opportunities.
var USEFUL_BINARY_OPS = set('<<', '>>', '|', '&', '^');
var COMPARE_OPS = set('<', '<=', '>', '>=', '==', '===', '!=', '!==');
@@ -469,10 +421,12 @@ function simplifyExpressions(ast) {
var rerun = true;
while (rerun) {
rerun = false;
- traverse(ast, function process(node, type, stack) {
+ var stack = [];
+ traverse(ast, function process(node, type) {
if (type === 'binary' && node[1] === '|') {
if (node[2][0] === 'num' && node[3][0] === 'num') {
node[2][1] |= node[3][1];
+ stack.push(0);
return node[2];
}
var go = false;
@@ -505,7 +459,7 @@ function simplifyExpressions(ast) {
node[j] = result[j];
}
rerun = true;
- return process(result, result[0], stack);
+ return process(result, result[0]);
} else if (stack[i] === -1) {
break; // Too bad, we can't
}
@@ -521,7 +475,9 @@ function simplifyExpressions(ast) {
} else {
stack.push(-1); // This node is dangerous! Give up if you see this before you see '1'
}
- }, null, []);
+ }, function() {
+ stack.pop();
+ });
}
}
@@ -797,344 +753,165 @@ function simplifyExpressions(ast) {
simplifyIntegerConversions(func);
simplifyBitops(func);
joinAdditions(func);
- // simplifyZeroComp(func); TODO: investigate performance
simplifyNotComps(func);
+ // simplifyZeroComp(func); TODO: investigate performance
});
}
-// In typed arrays mode 2, we can have
-// HEAP[x >> 2]
-// very often. We can in some cases do the shift on the variable itself when it is set,
-// to greatly reduce the number of shift operations.
-// XXX this optimization is deprecated and currently invalid: does not handle overflows
-// or non-aligned (round numbers, x >> 2 is a multiple of 4). Both are ok to assume
-// for pointers (undefined behavior otherwise), but invalid in general, and we do
-// no sufficiently-well distinguish the cases.
-function optimizeShiftsInternal(ast, conservative) {
- var MAX_SHIFTS = 3;
- traverseGeneratedFunctions(ast, function(fun) {
- var funMore = true;
- var funFinished = {};
- while (funMore) {
- funMore = false;
- // Recognize variables and parameters
- var vars = {};
- function newVar(name, param, addUse) {
- if (!vars[name]) {
- vars[name] = {
- param: param,
- defs: addUse ? 1 : 0,
- uses: 0,
- timesShifted: [0, 0, 0, 0], // zero shifts of size 0, 1, 2, 3
- benefit: 0,
- primaryShift: -1
- };
- }
- }
- // params
- if (fun[2]) {
- fun[2].forEach(function(arg) {
- newVar(arg, true, true);
- });
- }
- // vars
- // XXX if var has >>=, ignore it here? That means a previous pass already optimized it
- var hasSwitch = traverse(fun, function(node, type) {
- if (type === 'var') {
- node[1].forEach(function(arg) {
- newVar(arg[0], false, arg[1]);
- });
- } else if (type === 'switch') {
- // The relooper can't always optimize functions, and we currently don't work with
- // switch statements when optimizing shifts. Bail.
- return true;
- }
- });
- if (hasSwitch) {
- break;
- }
- // uses and defs TODO: weight uses by being inside a loop (powers). without that, we
- // optimize for code size, not speed.
- traverse(fun, function(node, type, stack) {
- stack.push(node);
- if (type === 'name' && vars[node[1]] && stack[stack.length-2][0] != 'assign') {
- vars[node[1]].uses++;
- } else if (type === 'assign' && node[2][0] === 'name' && vars[node[2][1]]) {
- vars[node[2][1]].defs++;
- }
- }, null, []);
- // First, break up elements inside a shift. This lets us see clearly what to do next.
- traverse(fun, function(node, type) {
- if (type === 'binary' && node[1] === '>>' && node[3][0] === 'num') {
- var shifts = node[3][1];
- if (shifts <= MAX_SHIFTS) {
- // Push the >> inside the value elements
- function addShift(subNode) {
- if (subNode[0] === 'binary' && subNode[1] === '+') {
- subNode[2] = addShift(subNode[2]);
- subNode[3] = addShift(subNode[3]);
- return subNode;
- }
- if (subNode[0] === 'name' && !subNode[2]) { // names are returned with a shift, but we also note their being shifted
- var name = subNode[1];
- if (vars[name]) {
- vars[name].timesShifted[shifts]++;
- subNode[2] = true;
- }
- }
- return ['binary', '>>', subNode, ['num', shifts]];
- }
- return addShift(node[2]);
+
+function simplifyIfs(ast) {
+ traverseGeneratedFunctions(ast, function(func) {
+ var simplifiedAnElse = false;
+
+ traverse(func, function(node, type) {
+ // simplify if (x) { if (y) { .. } } to if (x ? y : 0) { .. }
+ if (type === 'if') {
+ var body = node[2];
+ // recurse to handle chains
+ while (body[0] === 'block') {
+ var stats = body[1];
+ if (stats.length === 0) break;
+ var other = stats[stats.length-1];
+ if (other[0] !== 'if') {
+ // our if block does not end with an if. perhaps if have an else we can flip
+ if (node[3] && node[3][0] === 'block') {
+ var stats = node[3][1];
+ if (stats.length === 0) break;
+ var other = stats[stats.length-1];
+ if (other[0] === 'if') {
+ // flip node
+ node[1] = flipCondition(node[1]);
+ node[2] = node[3];
+ node[3] = body;
+ body = node[2];
+ } else break;
+ } else break;
}
- }
- });
- traverse(fun, function(node, type) {
- if (node[0] === 'name' && node[2]) {
- return node.slice(0, 2); // clean up our notes
- }
- });
- // At this point, shifted expressions are split up, and we know who the vars are and their info, so we can decide
- // TODO: vars that depend on other vars
- for (var name in vars) {
- var data = vars[name];
- var totalTimesShifted = sum(data.timesShifted);
- if (totalTimesShifted === 0) {
- continue;
- }
- if (totalTimesShifted != Math.max.apply(null, data.timesShifted)) {
- // TODO: Handle multiple different shifts
- continue;
- }
- if (funFinished[name]) continue;
- // We have one shift size (and possible unshifted uses). Consider replacing this variable with a shifted clone. If
- // the estimated benefit is >0, we will do it
- if (data.defs === 1) {
- data.benefit = totalTimesShifted - 2*(data.defs + (data.param ? 1 : 0));
- }
- if (conservative) data.benefit = 0;
- if (data.benefit > 0) {
- funMore = true; // We will reprocess this function
- for (var i = 0; i < 4; i++) {
- if (data.timesShifted[i]) {
- data.primaryShift = i;
+ // we can handle elses, but must be fully identical
+ if (node[3] || other[3]) {
+ if (!node[3]) break;
+ if (!astCompare(node[3], other[3])) {
+ // the elses are different, but perhaps if we flipped a condition we can do better
+ if (astCompare(node[3], other[2])) {
+ // flip other. note that other may not have had an else! add one if so; we will eliminate such things later
+ if (!other[3]) other[3] = ['block', []];
+ other[1] = flipCondition(other[1]);
+ var temp = other[2];
+ other[2] = other[3];
+ other[3] = temp;
+ } else break;
}
}
- }
- }
- //printErr(JSON.stringify(vars));
- function cleanNotes() { // We need to mark 'name' nodes as 'processed' in some passes here; this cleans the notes up
- traverse(fun, function(node, type) {
- if (node[0] === 'name' && node[2]) {
- return node.slice(0, 2);
- }
- });
- }
- cleanNotes();
- // Apply changes
- function needsShift(name) {
- return vars[name] && vars[name].primaryShift >= 0;
- }
- for (var name in vars) { // add shifts for params and var's for all new variables
- var data = vars[name];
- if (needsShift(name)) {
- if (data.param) {
- fun[3].unshift(['var', [[name + '$s' + data.primaryShift, ['binary', '>>', ['name', name], ['num', data.primaryShift]]]]]);
- } else {
- fun[3].unshift(['var', [[name + '$s' + data.primaryShift]]]);
- }
- }
- }
- traverse(fun, function(node, type, stack) { // add shift to assignments
- stack.push(node);
- if (node[0] === 'assign' && node[1] === true && node[2][0] === 'name' && needsShift(node[2][1]) && !node[2][2]) {
- var name = node[2][1];
- var data = vars[name];
- var parent = stack[stack.length-3];
- var statements = getStatements(parent);
- assert(statements, 'Invalid parent for assign-shift: ' + dump(parent));
- var i = statements.indexOf(stack[stack.length-2]);
- statements.splice(i+1, 0, ['stat', ['assign', true, ['name', name + '$s' + data.primaryShift], ['binary', '>>', ['name', name, true], ['num', data.primaryShift]]]]);
- } else if (node[0] === 'var') {
- var args = node[1];
- for (var i = 0; i < args.length; i++) {
- var arg = args[i];
- var name = arg[0];
- var data = vars[name];
- if (arg[1] && needsShift(name)) {
- args.splice(i+1, 0, [name + '$s' + data.primaryShift, ['binary', '>>', ['name', name, true], ['num', data.primaryShift]]]);
+ if (stats.length > 1) {
+ // try to commaify - turn everything between the ifs into a comma operator inside the second if
+ var ok = true;
+ for (var i = 0; i < stats.length-1; i++) {
+ var curr = stats[i];
+ if (curr[0] === 'stat') curr = curr[1];
+ if (!(curr[0] in COMMABLE)) ok = false;
}
+ if (!ok) break;
+ for (var i = stats.length-2; i >= 0; i--) {
+ var curr = stats[i];
+ if (curr[0] === 'stat') curr = curr[1];
+ other[1] = ['seq', curr, other[1]];
+ }
+ stats = body[1] = [other];
}
- return node;
- }
- }, null, []);
- cleanNotes();
- traverse(fun, function(node, type, stack) { // replace shifted name with new variable
- stack.push(node);
- if (node[0] === 'binary' && node[1] === '>>' && node[2][0] === 'name' && needsShift(node[2][1]) && node[3][0] === 'num') {
- var name = node[2][1];
- var data = vars[name];
- var parent = stack[stack.length-2];
- // Don't modify in |x$sN = x >> 2|, in normal assigns and in var assigns
- if (parent[0] === 'assign' && parent[2][0] === 'name' && parent[2][1] === name + '$s' + data.primaryShift) return;
- if (parent[0] === name + '$s' + data.primaryShift) return;
- if (node[3][1] === data.primaryShift) {
- return ['name', name + '$s' + data.primaryShift];
- }
+ if (stats.length !== 1) break;
+ if (node[3]) simplifiedAnElse = true;
+ node[1] = ['conditional', node[1], other[1], ['num', 0]];
+ body = node[2] = other[2];
}
- }, null, []);
- cleanNotes();
- var SIMPLE_SHIFTS = set('<<', '>>');
- var more = true;
- while (more) { // combine shifts in the same direction as an optimization
- more = false;
- traverse(fun, function(node, type) {
- if (node[0] === 'binary' && node[1] in SIMPLE_SHIFTS && node[2][0] === 'binary' && node[2][1] === node[1] &&
- node[3][0] === 'num' && node[2][3][0] === 'num') { // do not turn a << b << c into a << b + c; while logically identical, it is slower
- more = true;
- return ['binary', node[1], node[2][2], ['num', node[3][1] + node[2][3][1]]];
- }
- });
}
- // Before recombining, do some additional optimizations
- traverse(fun, function(node, type) {
- // Apply constant shifts onto constants
- if (type === 'binary' && node[1] === '>>' && node[2][0] === 'num' && node[3][0] === 'num' && node[3][1] <= MAX_SHIFTS) {
- var subNode = node[2];
- var shifts = node[3][1];
- var result = subNode[1] / Math.pow(2, shifts);
- if (result % 1 === 0) {
- subNode[1] = result;
- return subNode;
+ });
+
+ if (simplifiedAnElse) {
+ // there may be fusing opportunities
+
+ // we can only fuse if we remove all uses of the label. if there are
+ // other ones - if the label check can be reached from elsewhere -
+ // we must leave it
+ var abort = false;
+
+ var labelAssigns = {};
+ traverse(func, function(node, type) {
+ if (type === 'assign' && node[2][0] === 'name' && node[2][1] === 'label') {
+ if (node[3][0] === 'num') {
+ var value = node[3][1];
+ labelAssigns[value] = (labelAssigns[value] || 0) + 1;
+ } else {
+ // label is assigned a dynamic value (like from indirectbr), we cannot do anything
+ abort = true;
}
}
- // Optimize the case of ($a*80)>>2 into ($a*20)|0
- if (type === 'binary' && node[1] in SIMPLE_SHIFTS &&
- node[2][0] === 'binary' && node[2][1] === '*') {
- var mulNode = node[2];
- if (mulNode[2][0] === 'num') {
- var temp = mulNode[2];
- mulNode[2] = mulNode[3];
- mulNode[3] = temp;
- }
- if (mulNode[3][0] === 'num') {
- if (node[1] === '<<') {
- mulNode[3][1] *= Math.pow(2, node[3][1]);
- node[1] = '|';
- node[3][1] = 0;
- return node;
- } else {
- if (mulNode[3][1] % Math.pow(2, node[3][1]) === 0) {
- mulNode[3][1] /= Math.pow(2, node[3][1]);
- node[1] = '|';
- node[3][1] = 0;
- return node;
- }
- }
+ });
+ if (abort) return;
+
+ var labelChecks = {};
+ traverse(func, function(node, type) {
+ if (type === 'binary' && node[1] === '==' && node[2][0] === 'binary' && node[2][1] === '|' &&
+ node[2][2][0] === 'name' && node[2][2][1] === 'label') {
+ if (node[3][0] === 'num') {
+ var value = node[3][1];
+ labelChecks[value] = (labelChecks[value] || 0) + 1;
+ } else {
+ // label is checked vs a dynamic value (like from indirectbr), we cannot do anything
+ abort = true;
}
}
- /* XXX - theoretically useful optimization(s), but commented out as not helpful in practice
- // Transform (x << 2) >> 2 into x & mask or something even simpler
- if (type === 'binary' && node[1] === '>>' && node[3][0] === 'num' &&
- node[2][0] === 'binary' && node[2][1] === '<<' && node[2][3][0] === 'num' && node[3][1] === node[2][3][1]) {
- var subNode = node[2];
- var shifts = node[3][1];
- var mask = ((0xffffffff << shifts) >>> shifts) | 0;
- return ['binary', '&', subNode[2], ['num', mask]];
- //return ['binary', '|', subNode[2], ['num', 0]];
- //return subNode[2];
- }
- */
});
- // Re-combine remaining shifts, to undo the breaking up we did before. may require reordering inside +'s
- traverse(fun, function(node, type, stack) {
- stack.push(node);
- if (type === 'binary' && node[1] === '+' && (stack[stack.length-2][0] != 'binary' || stack[stack.length-2][1] !== '+')) {
- // 'Flatten' added items
- var addedItems = [];
- function flatten(node) {
- if (node[0] === 'binary' && node[1] === '+') {
- flatten(node[2]);
- flatten(node[3]);
- } else {
- addedItems.push(node);
- }
- }
- flatten(node);
- var originalOrder = addedItems.slice();
- function key(node) { // a unique value for all relevant shifts for recombining, non-unique for stuff we don't need to bother with
- function originalOrderKey(item) {
- return -originalOrder.indexOf(item);
- }
- if (node[0] === 'binary' && node[1] in SIMPLE_SHIFTS) {
- if (node[3][0] === 'num' && node[3][1] <= MAX_SHIFTS) return 2*node[3][1] + (node[1] === '>>' ? 100 : 0); // 0-106
- return (node[1] === '>>' ? 20000 : 10000) + originalOrderKey(node);
- }
- if (node[0] === 'num') return -20000 + node[1];
- return -10000 + originalOrderKey(node); // Don't modify the original order if we don't modify anything
- }
- for (var i = 0; i < addedItems.length; i++) {
- if (addedItems[i][0] === 'string') return; // this node is not relevant for us
- }
- addedItems.sort(function(node1, node2) {
- return key(node1) - key(node2);
- });
- // Regenerate items, now sorted
- var i = 0;
- while (i < addedItems.length-1) { // re-combine inside addedItems
- var k = key(addedItems[i]), k1 = key(addedItems[i+1]);
- if (k === k1 && k >= 0 && k1 <= 106) {
- addedItems[i] = ['binary', addedItems[i][1], ['binary', '+', addedItems[i][2], addedItems[i+1][2]], addedItems[i][3]];
- addedItems.splice(i+1, 1);
- } else {
- i++;
- }
- }
- var num = 0;
- for (i = 0; i < addedItems.length; i++) { // combine all numbers into one
- if (addedItems[i][0] === 'num') {
- num += addedItems[i][1];
- addedItems.splice(i, 1);
- i--;
- }
- }
- if (num != 0) { // add the numbers into an existing shift, we
- // prefer (x+5)>>7 over (x>>7)+5 , since >>'s result is known to be 32-bit and is more easily optimized.
- // Also, in the former we can avoid the parentheses, which saves a little space (the number will be bigger,
- // so it might take more space, but normally at most one more digit).
- var added = false;
- for (i = 0; i < addedItems.length; i++) {
- if (addedItems[i][0] === 'binary' && addedItems[i][1] === '>>' && addedItems[i][3][0] === 'num' && addedItems[i][3][1] <= MAX_SHIFTS) {
- addedItems[i] = ['binary', '>>', ['binary', '+', addedItems[i][2], ['num', num << addedItems[i][3][1]]], addedItems[i][3]];
- added = true;
+ if (abort) return;
+
+ var inLoop = 0; // when in a loop, we do not emit label = 0; in the relooper as there is no need
+ traverse(func, function(node, type) {
+ if (type === 'while') inLoop++;
+ var stats = getStatements(node);
+ if (stats) {
+ for (var i = 0; i < stats.length-1; i++) {
+ var pre = stats[i];
+ var post = stats[i+1];
+ if (pre[0] === 'if' && pre[3] && post[0] === 'if' && !post[3]) {
+ var postCond = post[1];
+ if (postCond[0] === 'binary' && postCond[1] === '==' &&
+ postCond[2][0] === 'binary' && postCond[2][1] === '|' &&
+ postCond[2][2][0] === 'name' && postCond[2][2][1] === 'label' &&
+ postCond[2][3][0] === 'num' && postCond[2][3][1] === 0 &&
+ postCond[3][0] === 'num') {
+ var postValue = postCond[3][1];
+ var preElse = pre[3];
+ if (labelAssigns[postValue] === 1 && labelChecks[postValue] === 1 && preElse[0] === 'block' && preElse[1] && preElse[1].length === 1) {
+ var preStat = preElse[1][0];
+ if (preStat[0] === 'stat' && preStat[1][0] === 'assign' &&
+ preStat[1][1] === true && preStat[1][2][0] === 'name' && preStat[1][2][1] === 'label' &&
+ preStat[1][3][0] === 'num' && preStat[1][3][1] === postValue) {
+ // Conditions match, just need to make sure the post clears label
+ if (post[2][0] === 'block' && post[2][1] && post[2][1].length > 0) {
+ var postStat = post[2][1][0];
+ var haveClear =
+ postStat[0] === 'stat' && postStat[1][0] === 'assign' &&
+ postStat[1][1] === true && postStat[1][2][0] === 'name' && postStat[1][2][1] === 'label' &&
+ postStat[1][3][0] === 'num' && postStat[1][3][1] === 0;
+ if (!inLoop || haveClear) {
+ // Everything lines up, do it
+ pre[3] = post[2];
+ if (haveClear) pre[3][1].splice(0, 1); // remove the label clearing
+ stats.splice(i+1, 1); // remove the post entirely
+ }
+ }
+ }
+ }
}
}
- if (!added) {
- addedItems.unshift(['num', num]);
- }
- }
- var ret = addedItems.pop();
- while (addedItems.length > 0) { // re-create AST from addedItems
- ret = ['binary', '+', ret, addedItems.pop()];
}
- return ret;
}
- }, null, []);
- // Note finished variables
- for (var name in vars) {
- funFinished[name] = true;
- }
+ }, function(node, type) {
+ if (type === 'while') inLoop--;
+ });
}
});
}
-function optimizeShiftsConservative(ast) {
- optimizeShiftsInternal(ast, true);
-}
-
-function optimizeShiftsAggressive(ast) {
- optimizeShiftsInternal(ast, false);
-}
-
// We often have branchings that are simplified so one end vanishes, and
// we then get
// if (!(x < 5))
@@ -1161,6 +938,10 @@ function simplifyNotCompsDirect(node) {
if (!simplifyNotCompsPass) return node;
}
+function flipCondition(cond) {
+ return simplifyNotCompsDirect(['unary-prefix', '!', cond]);
+}
+
var simplifyNotCompsPass = false;
function simplifyNotComps(ast) {
@@ -1281,6 +1062,7 @@ function vacuum(ast) {
traverseGeneratedFunctions(ast, function(node) {
vacuumInternal(node);
simplifyNotComps(node);
+ removeEmptySubNodes(node);
});
}
@@ -1426,7 +1208,7 @@ function hoistMultiples(ast) {
var temp = node[3];
node[3] = node[2];
node[2] = temp;
- node[1] = simplifyNotCompsDirect(['unary-prefix', '!', node[1]]);
+ node[1] = flipCondition(node[1]);
stat1 = node[2][1];
stat2 = node[3][1];
}
@@ -1687,6 +1469,11 @@ function denormalizeAsm(func, data) {
if (!isEmptyNode(stats[i])) break;
}
}
+ // calculate variable definitions
+ var varDefs = [];
+ for (var v in data.vars) {
+ varDefs.push(makeAsmVarDef(v, data.vars[v]));
+ }
// each param needs a line; reuse emptyNodes as much as we can
var numParams = 0;
for (var i in data.params) numParams++;
@@ -1695,26 +1482,21 @@ function denormalizeAsm(func, data) {
if (!isEmptyNode(stats[emptyNodes])) break;
emptyNodes++;
}
- var neededEmptyNodes = numParams + 1; // params plus one big var
+ var neededEmptyNodes = numParams + (varDefs.length ? 1 : 0); // params plus one big var if there are vars
if (neededEmptyNodes > emptyNodes) {
var args = [0, 0];
for (var i = 0; i < neededEmptyNodes - emptyNodes; i++) args[i+2] = 0;
stats.splice.apply(stats, args);
+ } else if (neededEmptyNodes < emptyNodes) {
+ stats.splice(0, emptyNodes - neededEmptyNodes);
}
// add param coercions
var next = 0;
func[2].forEach(function(param) {
stats[next++] = ['stat', ['assign', true, ['name', param], makeAsmCoercion(['name', param], data.params[param])]];
});
- // add variable definitions
- var varDefs = [];
- for (var v in data.vars) {
- varDefs.push(makeAsmVarDef(v, data.vars[v]));
- }
if (varDefs.length) {
stats[next] = ['var', varDefs];
- } else {
- stats[next] = emptyNode();
}
if (data.inlines.length > 0) {
var i = 0;
@@ -3718,6 +3500,9 @@ function eliminate(ast, memSafe) {
node[0] = 'toplevel';
node[1] = [];
}
+ } else if (type === 'assign' && node[1] === true && node[2][0] === 'name' && node[3][0] === 'name' && node[2][1] === node[3][1]) {
+ // elimination led to X = X, which we can just remove
+ return emptyNode();
}
}, function(node, type) {
// post
@@ -3734,12 +3519,15 @@ function eliminate(ast, memSafe) {
seenUses[name]++;
}
} else if (type === 'while') {
+ if (!asm) return;
// try to remove loop helper variables specifically
var stats = node[2][1];
var last = stats[stats.length-1];
if (last && last[0] === 'if' && last[2][0] === 'block' && last[3] && last[3][0] === 'block') {
var ifTrue = last[2];
var ifFalse = last[3];
+ clearEmptyNodes(ifTrue[1]);
+ clearEmptyNodes(ifFalse[1]);
var flip = false;
if (ifFalse[1][0] && ifFalse[1][0][0] === 'break') { // canonicalize break in the if
var temp = ifFalse;
@@ -3765,7 +3553,26 @@ function eliminate(ast, memSafe) {
}
}
}
- if (loopers.length < assigns.length) return; // TODO: handle the case where can can just eliminate one. (we can't optimize the break, but we can remove the var at least)
+ // remove loop vars that are used in the rest of the else
+ for (var i = 0; i < assigns.length; i++) {
+ if (assigns[i][0] === 'stat' && assigns[i][1][0] === 'assign') {
+ var assign = assigns[i][1];
+ if (!(assign[1] === true && assign[2][0] === 'name' && assign[3][0] === 'name') || loopers.indexOf(assign[2][1]) < 0) {
+ // this is not one of the loop assigns
+ traverse(assign, function(node, type) {
+ if (type === 'name') {
+ var index = loopers.indexOf(node[1]);
+ if (index < 0) index = helpers.indexOf(node[1]);
+ if (index >= 0) {
+ loopers.splice(index, 1);
+ helpers.splice(index, 1);
+ }
+ }
+ });
+ }
+ }
+ }
+ if (loopers.length === 0) return;
for (var l = 0; l < loopers.length; l++) {
var looper = loopers[l];
var helper = helpers[l];
@@ -3785,17 +3592,25 @@ function eliminate(ast, memSafe) {
}
}
if (found < 0) return;
+ // if a loop variable is used after we assigned to the helper, we must save its value and use that.
+ // (note that this can happen due to elimination, if we eliminate an expression containing the
+ // loop var far down, past the assignment!)
+ var temp = looper + '$looptemp';
var looperUsed = false;
- for (var i = found+1; i < stats.length && !looperUsed; i++) {
+ assert(!(temp in asmData.vars));
+ for (var i = found+1; i < stats.length; i++) {
var curr = i < stats.length-1 ? stats[i] : last[1]; // on the last line, just look in the condition
traverse(curr, function(node, type) {
if (type === 'name' && node[1] === looper) {
+ node[1] = temp;
looperUsed = true;
- return true;
}
});
}
- if (looperUsed) return;
+ if (looperUsed) {
+ asmData.vars[temp] = asmData.vars[looper];
+ stats.splice(found, 0, ['stat', ['assign', true, ['name', temp], ['name', looper]]]);
+ }
}
for (var l = 0; l < helpers.length; l++) {
for (var k = 0; k < helpers.length; k++) {
@@ -3817,9 +3632,24 @@ function eliminate(ast, memSafe) {
// simplify the if. we remove the if branch, leaving only the else
if (flip) {
last[1] = simplifyNotCompsDirect(['unary-prefix', '!', last[1]]);
+ var temp = last[2];
last[2] = last[3];
+ last[3] = temp;
+ }
+ if (loopers.length === assigns.length) {
+ last.pop();
+ } else {
+ var elseStats = getStatements(last[3]);
+ for (var i = 0; i < elseStats.length; i++) {
+ var stat = elseStats[i];
+ if (stat[0] === 'stat') stat = stat[1];
+ if (stat[0] === 'assign' && stat[2][0] === 'name') {
+ if (loopers.indexOf(stat[2][1]) >= 0) {
+ elseStats[i] = emptyNode();
+ }
+ }
+ }
}
- last.pop();
}
}
}
@@ -3877,6 +3707,8 @@ function eliminate(ast, memSafe) {
}
new ExpressionOptimizer(ast).run();
}
+
+ removeAllEmptySubNodes(ast);
}
function eliminateMemSafe(ast) {
@@ -4247,6 +4079,8 @@ function aggressiveVariableEliminationInternal(func, asmData) {
}
}
});
+
+ removeAllEmptySubNodes(func);
}
function aggressiveVariableElimination(ast) {
@@ -4525,10 +4359,10 @@ function outline(ast) {
var size = measureSize(func);
if (size <= extraInfo.sizeToOutline) {
sizeToOutline = Infinity;
- printErr(' no point in trying to reduce the size of ' + func[1] + ' which is ' + size + ' <= ' + extraInfo.sizeToOutline);
+ //printErr(' no point in trying to reduce the size of ' + func[1] + ' which is ' + size + ' <= ' + extraInfo.sizeToOutline);
} else {
sizeToOutline = Math.round(size/Math.max(2, asmData.intendedPieces--));
- printErr('trying to reduce the size of ' + func[1] + ' which is ' + size + ' (>=? ' + extraInfo.sizeToOutline + '), aim for ' + sizeToOutline);
+ //printErr('trying to reduce the size of ' + func[1] + ' which is ' + size + ' (>=? ' + extraInfo.sizeToOutline + '), aim for ' + sizeToOutline);
}
}
@@ -4668,7 +4502,7 @@ function outline(ast) {
for (var returnType in codeInfo.hasReturnType) {
reps.push(makeIf(
makeComparison(makeAsmCoercion(['name', 'tempValue'], ASM_INT), '==', ['num', controlFromAsmType(returnType)]),
- [['stat', ['return', makeAsmCoercion(['name', 'tempInt'], returnType | 0)]]]
+ [['stat', ['return', makeAsmCoercion(['name', returnType == ASM_INT ? 'tempInt' : 'tempDouble'], returnType | 0)]]]
));
}
if (codeInfo.hasBreak) {
@@ -4753,7 +4587,7 @@ function outline(ast) {
}
}
outliningParents[newIdent] = func[1];
- printErr('performed outline ' + [func[1], newIdent, 'pre size', originalCodeSize, 'resulting size', measureSize(code), 'overhead (w/r):', setSize(setSub(codeInfo.writes, owned)), setSize(setSub(codeInfo.reads, owned)), ' owned: ', setSize(owned), ' left: ', setSize(asmData.vars), setSize(asmData.params), ' loopsDepth: ', loops]);
+ //printErr('performed outline ' + [func[1], newIdent, 'pre size', originalCodeSize, 'resulting size', measureSize(code), 'overhead (w/r):', setSize(setSub(codeInfo.writes, owned)), setSize(setSub(codeInfo.reads, owned)), ' owned: ', setSize(owned), ' left: ', setSize(asmData.vars), setSize(asmData.params), ' loopsDepth: ', loops]);
calculateThreshold(func, asmData);
return [newFunc];
}
@@ -4775,7 +4609,16 @@ function outline(ast) {
for (var i = minIndex; i < stats.length; i++) {
var stat = stats[i];
if (stat[0] == 'stat') stat = stat[1];
- if (stat[0] == 'assign' && stat[2][0] == 'name' && stat[2][1] == 'sp') minIndex = i+1; // cannot outline |sp = |
+ if (stat[0] == 'assign' && stat[2][0] == 'name' && stat[2][1] == 'sp') {
+ // cannot outline |sp = |
+ minIndex = i+1;
+ // When followed by a STACKTOP bump, preserve that too (we may need to replace it later)
+ stat = stats[i+1];
+ if (stat[0] == 'stat') stat = stat[1];
+ if (stat && stat[0] == 'assign' && stat[2][0] == 'name' && stat[2][1] == 'STACKTOP') {
+ minIndex = i+2;
+ }
+ }
}
}
}
@@ -4899,7 +4742,7 @@ function outline(ast) {
var maxTotalFunctions = Infinity; // debugging tool
- printErr('\n');
+ //printErr('\n');
var more = true;
while (more) {
@@ -4926,7 +4769,27 @@ function outline(ast) {
if ('sp' in asmData.vars) {
// find stack bump (STACKTOP = STACKTOP + X | 0) and add the extra space
var stackBumpNode = getStackBumpNode(stats);
- if (stackBumpNode) stackBumpNode[3][2][3][1] = asmData.totalStackSize;
+ if (stackBumpNode) {
+ stackBumpNode[3][2][3][1] = asmData.totalStackSize;
+ } else {
+ // sp exists, but no stack bump, so we need to add it
+ var found = false;
+ for (var i = 0; i < stats.length; i++) {
+ var stat = stats[i];
+ if (stat[0] === 'stat') stat = stat[1];
+ if (stat[0] === 'assign' && stat[2][0] === 'name' && stat[2][1] === 'sp') {
+ var newNode = ['stat', makeAssign(['name', 'STACKTOP'], ['binary', '|', ['binary', '+', ['name', 'STACKTOP'], ['num', asmData.totalStackSize]], ['num', 0]])];
+ if (i+1 < stats.length) {
+ stats.splice(i+1, 0, newNode);
+ } else {
+ stats.push(newNode);
+ }
+ found = true;
+ break;
+ }
+ }
+ assert(found);
+ }
} else if (!('sp' in asmData.params)) { // if sp is a param, then we are an outlined function, no need to add stack support for us
// add sp variable and stack bump
var index = getFirstIndexInNormalized(func, asmData);
@@ -4961,7 +4824,7 @@ function outline(ast) {
}
if (ret) {
ret.push(func);
- printErr('... resulting sizes of ' + func[1] + ' is ' + ret.map(measureSize) + '\n');
+ //printErr('... resulting sizes of ' + func[1] + ' is ' + ret.map(measureSize) + '\n');
}
}
denormalizeAsm(func, asmData);
@@ -5202,12 +5065,10 @@ var passes = {
// passes
dumpAst: dumpAst,
dumpSrc: dumpSrc,
- unGlobalize: unGlobalize,
removeAssignsToUndefined: removeAssignsToUndefined,
//removeUnneededLabelSettings: removeUnneededLabelSettings,
simplifyExpressions: simplifyExpressions,
- optimizeShiftsConservative: optimizeShiftsConservative,
- optimizeShiftsAggressive: optimizeShiftsAggressive,
+ simplifyIfs: simplifyIfs,
hoistMultiples: hoistMultiples,
loopOptimizer: loopOptimizer,
registerize: registerize,
@@ -5252,7 +5113,15 @@ if (extraInfoStart > 0) extraInfo = JSON.parse(src.substr(extraInfoStart + 14));
arguments_.slice(1).forEach(function(arg) {
+ //traverse(ast, function(node) {
+ // if (node[0] === 'defun' && node[1] === 'copyTempFloat') printErr('pre ' + JSON.stringify(node, null, ' '));
+ //});
passes[arg](ast);
+ //var func;
+ //traverse(ast, function(node) {
+ // if (node[0] === 'defun') func = node;
+ // if (isEmptyNode(node)) throw 'empty node after ' + arg + ', in ' + func[1];
+ //});
});
if (asm && last) {
asmLastOpts(ast); // TODO: move out of last, to make last faster when done later (as in side modules)
diff --git a/tools/js_optimizer.py b/tools/js_optimizer.py
index 9ba6643b..d0284528 100644
--- a/tools/js_optimizer.py
+++ b/tools/js_optimizer.py
@@ -13,7 +13,7 @@ JS_OPTIMIZER = path_from_root('tools', 'js-optimizer.js')
NUM_CHUNKS_PER_CORE = 3
MIN_CHUNK_SIZE = int(os.environ.get('EMCC_JSOPT_MIN_CHUNK_SIZE') or 512*1024) # configuring this is just for debugging purposes
-MAX_CHUNK_SIZE = 5*1024*1024
+MAX_CHUNK_SIZE = int(os.environ.get('EMCC_JSOPT_MAX_CHUNK_SIZE') or 5*1024*1024)
WINDOWS = sys.platform.startswith('win')
@@ -32,6 +32,7 @@ class Minifier:
def __init__(self, js, js_engine):
self.js = js
self.js_engine = js_engine
+ self.symbols_file = None
def minify_shell(self, shell, minify_whitespace, source_map=False):
# Run through js-optimizer.js to find and minify the global symbols
@@ -61,6 +62,14 @@ class Minifier:
#print >> sys.stderr, "minified SHELL 3333333333333333", output, "\n44444444444444444444"
code, metadata = output.split('// EXTRA_INFO:')
self.globs = json.loads(metadata)
+
+ if self.symbols_file:
+ mapfile = open(self.symbols_file, 'w')
+ for key, value in self.globs.iteritems():
+ mapfile.write(value + ':' + key + '\n')
+ mapfile.close()
+ print >> sys.stderr, 'wrote symbol map file to', self.symbols_file
+
return code.replace('13371337', '0.0')
@@ -162,6 +171,12 @@ EMSCRIPTEN_FUNCS();
# we assume there is a maximum of one new name per line
minifier = Minifier(js, js_engine)
+ def check_symbol_mapping(p):
+ if p.startswith('symbolMap='):
+ minifier.symbols_file = p.split('=')[1]
+ return False
+ return True
+ passes = filter(check_symbol_mapping, passes)
asm_shell_pre, asm_shell_post = minifier.minify_shell(asm_shell, 'minifyWhitespace' in passes, source_map).split('EMSCRIPTEN_FUNCS();');
asm_shell_post = asm_shell_post.replace('});', '})');
pre += asm_shell_pre + '\n' + start_funcs_marker
@@ -212,6 +227,7 @@ EMSCRIPTEN_FUNCS();
chunk_size = min(MAX_CHUNK_SIZE, max(MIN_CHUNK_SIZE, total_size / intended_num_chunks))
chunks = shared.chunkify(funcs, chunk_size, jcache.get_cachename('jsopt') if jcache else None)
+ if DEBUG and len(chunks) > 0: print >> sys.stderr, 'chunkification: intended size:', chunk_size, 'num funcs:', len(funcs), 'actual num chunks:', len(chunks), 'chunk size range:', max(map(len, chunks)), '-', min(map(len, chunks))
funcs = None
if jcache:
diff --git a/tools/nativize_llvm.py b/tools/nativize_llvm.py
index b327bdfc..52dfdea1 100755
--- a/tools/nativize_llvm.py
+++ b/tools/nativize_llvm.py
@@ -25,9 +25,11 @@ Popen([LLVM_OPT, filename, '-strip-debug', '-o', filename + '.clean.bc']).commun
print 'bc => s'
for params in [['-march=x86'], ['-march=x86-64']]: # try x86, then x86-64 FIXME
print 'params', params
- Popen([LLVM_COMPILER] + params + [filename + '.clean.bc', '-o', filename + '.s']).communicate()[0]
- print 's => o'
- Popen(['as', filename + '.s', '-o', filename + '.o']).communicate()[0]
+ for triple in [['-mtriple=i386-pc-linux-gnu'], []]:
+ Popen([LLVM_COMPILER] + params + triple + [filename + '.clean.bc', '-o', filename + '.s']).communicate()[0]
+ print 's => o'
+ Popen(['as', filename + '.s', '-o', filename + '.o']).communicate()[0]
+ if os.path.exists(filename + '.o'): break
if os.path.exists(filename + '.o'): break
print 'o => runnable'
Popen(['g++', path_from_root('system', 'lib', 'debugging.cpp'), filename + '.o', '-o', filename + '.run'] + ['-l' + lib for lib in libs]).communicate()[0]
diff --git a/tools/profile_stripper.py b/tools/profile_stripper.py
new file mode 100644
index 00000000..3e538ef3
--- /dev/null
+++ b/tools/profile_stripper.py
@@ -0,0 +1,43 @@
+# See profile_used.py
+#
+# profile file, js file
+
+import sys, json
+
+used = json.loads(open(sys.argv[1]).read())
+
+show = True
+in_table = False
+
+for orig in open(sys.argv[2]).readlines():
+ line = orig.strip()
+
+ if orig.startswith('function _') and line.endswith(('){', ') {')):
+ name = line.split(' ')[1].split('(')[0]
+ if name.startswith('_') and not used.get(name):
+ #print >> sys.stderr, 'remove', name
+ show = False
+
+ if line.startswith('var FUNCTION_TABLE'):
+ in_table = True
+
+ if in_table:
+ start = 0
+ if 'var ' in line:
+ start = line.index('[')+1
+ end = len(line)
+ if ']' in line:
+ end = line.index(']')
+ contents = line[start:end]
+ fixed = map(lambda name: '"' + name + '"' if not used.get(name) else name, contents.split(','))
+ print (line[:start] + ','.join(fixed) + line[end:]).replace('""', '')
+ else:
+ if show:
+ print orig,
+
+ if orig.startswith('}'):
+ show = True
+
+ if in_table and line.endswith(';'):
+ in_table = False
+
diff --git a/tools/profile_used.py b/tools/profile_used.py
new file mode 100644
index 00000000..45420e0f
--- /dev/null
+++ b/tools/profile_used.py
@@ -0,0 +1,17 @@
+# Run, then execute
+'''
+dump(JSON.stringify(usedFunctions))
+'''
+# then strip with profile_strip.py
+
+import sys
+
+print 'var usedFunctions = {};'
+
+for line in open(sys.argv[1]).readlines():
+ line = line.strip()
+ print line
+ if line.startswith('function _') and line.endswith(('){', ') {')):
+ name = line.split(' ')[1].split('(')[0]
+ print 'usedFunctions["%s"] = 1;' % name
+
diff --git a/tools/shared.py b/tools/shared.py
index c4b01518..82bdd98b 100644
--- a/tools/shared.py
+++ b/tools/shared.py
@@ -270,7 +270,7 @@ if EM_POPEN_WORKAROUND and os.name == 'nt':
# Expectations
-EXPECTED_LLVM_VERSION = (3,2)
+EXPECTED_LLVM_VERSION = (3,3)
actual_clang_version = None
@@ -303,10 +303,33 @@ def check_fastcomp():
print >> sys.stderr, '==========================================================================='
print >> sys.stderr, llc_version_info,
print >> sys.stderr, '==========================================================================='
+ logging.critical('you can fall back to the older (pre-fastcomp) compiler core, although that is not recommended, see https://github.com/kripken/emscripten/wiki/LLVM-Backend')
return False
+
+ # look for a source tree under the llvm binary directory. if there is one, look for emscripten-version.txt files
+ seen = False
+ d = os.path.dirname(LLVM_COMPILER)
+ while d != os.path.dirname(d):
+ # look for version file in llvm repo, making sure not to mistake the emscripten repo for it
+ if os.path.exists(os.path.join(d, 'emscripten-version.txt')) and not os.path.abspath(d) == os.path.abspath(path_from_root()):
+ seen = True
+ llvm_version = open(os.path.join(d, 'emscripten-version.txt')).read().strip()
+ if os.path.exists(os.path.join(d, 'tools', 'clang', 'emscripten-version.txt')):
+ clang_version = open(os.path.join(d, 'tools', 'clang', 'emscripten-version.txt')).read().strip()
+ elif os.path.exists(os.path.join(d, 'tools', 'clang')):
+ clang_version = '?' # Looks like the LLVM compiler tree has an old checkout from the time before it contained a version.txt: Should update!
+ else:
+ clang_version = llvm_version # This LLVM compiler tree does not have a tools/clang, so it's probably an out-of-source build directory. No need for separate versioning.
+ if EMSCRIPTEN_VERSION != llvm_version or EMSCRIPTEN_VERSION != clang_version:
+ logging.error('Emscripten, llvm and clang versions do not match, this is dangerous (%s, %s, %s)', EMSCRIPTEN_VERSION, llvm_version, clang_version)
+ logging.error('Make sure to use the same branch in each repo, and to be up-to-date on each. See https://github.com/kripken/emscripten/wiki/LLVM-Backend')
+ break
+ d = os.path.dirname(d)
+ if not seen:
+ logging.warning('did not see a source tree above LLVM_DIR, could not verify version numbers match')
return True
except Exception, e:
- logging.warning('cound not check fastcomp: %s' % str(e))
+ logging.warning('could not check fastcomp: %s' % str(e))
return True
EXPECTED_NODE_VERSION = (0,8,0)
@@ -345,7 +368,11 @@ def find_temp_directory():
# we re-check sanity when the settings are changed)
# We also re-check sanity and clear the cache when the version changes
-EMSCRIPTEN_VERSION = '1.12.0'
+try:
+ EMSCRIPTEN_VERSION = open(path_from_root('emscripten-version.txt')).read().strip()
+except Exception, e:
+ logging.error('cannot find emscripten version ' + str(e))
+ EMSCRIPTEN_VERSION = 'unknown'
def generate_sanity():
return EMSCRIPTEN_VERSION + '|' + get_llvm_target() + '|' + LLVM_ROOT + '|' + get_clang_version()
@@ -379,7 +406,7 @@ def check_sanity(force=False):
# some warning, mostly not fatal checks - do them even if EM_IGNORE_SANITY is on
check_llvm_version()
check_node_version()
- if os.environ.get('EMCC_FAST_COMPILER') == '1':
+ if os.environ.get('EMCC_FAST_COMPILER') != '0':
fastcomp_ok = check_fastcomp()
if os.environ.get('EM_IGNORE_SANITY'):
@@ -402,7 +429,7 @@ def check_sanity(force=False):
logging.critical('Cannot find %s, check the paths in %s' % (cmd, EM_CONFIG))
sys.exit(1)
- if os.environ.get('EMCC_FAST_COMPILER') == '1':
+ if os.environ.get('EMCC_FAST_COMPILER') != '0':
if not fastcomp_ok:
logging.critical('failing sanity checks due to previous fastcomp failure')
sys.exit(1)
@@ -468,6 +495,30 @@ def build_clang_tool_path(tool):
else:
return os.path.join(LLVM_ROOT, tool)
+# Whenever building a native executable for OSX, we must provide the OSX SDK version we want to target.
+def osx_find_native_sdk_path():
+ try:
+ sdk_root = '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs'
+ sdks = os.walk(sdk_root).next()[1]
+ sdk_path = os.path.join(sdk_root, sdks[0]) # Just pick first one found, we don't care which one we found.
+ logging.debug('Targeting OSX SDK found at ' + sdk_path)
+ return sdk_path
+ except:
+ logging.warning('Could not find native OSX SDK path to target!')
+ return None
+
+# These extra args need to be passed to Clang when targeting a native host system executable
+CACHED_CLANG_NATIVE_ARGS=None
+def get_clang_native_args():
+ global CACHED_CLANG_NATIVE_ARGS
+ if CACHED_CLANG_NATIVE_ARGS is not None: return CACHED_CLANG_NATIVE_ARGS
+ CACHED_CLANG_NATIVE_ARGS = []
+ if sys.platform == 'darwin':
+ sdk_path = osx_find_native_sdk_path()
+ if sdk_path:
+ CACHED_CLANG_NATIVE_ARGS = ['-isysroot', osx_find_native_sdk_path()]
+ return CACHED_CLANG_NATIVE_ARGS
+
CLANG_CC=os.path.expanduser(build_clang_tool_path('clang'))
CLANG_CPP=os.path.expanduser(build_clang_tool_path('clang++'))
CLANG=CLANG_CPP
@@ -602,7 +653,11 @@ except:
# Target choice. Must be synced with src/settings.js (TARGET_*)
def get_llvm_target():
- return os.environ.get('EMCC_LLVM_TARGET') or 'le32-unknown-nacl' # 'i386-pc-linux-gnu'
+ if os.environ.get('EMCC_FAST_COMPILER') == '0':
+ if not os.environ.get('EMCC_LLVM_TARGET'):
+ os.environ['EMCC_LLVM_TARGET'] = 'le32-unknown-nacl'
+ return os.environ.get('EMCC_LLVM_TARGET')
+ return os.environ.get('EMCC_LLVM_TARGET') or 'asmjs-unknown-emscripten'
LLVM_TARGET = get_llvm_target()
# COMPILER_OPTS: options passed to clang when generating bitcode for us
@@ -610,40 +665,73 @@ try:
COMPILER_OPTS # Can be set in EM_CONFIG, optionally
except:
COMPILER_OPTS = []
-COMPILER_OPTS = COMPILER_OPTS + ['-m32', '-DEMSCRIPTEN', '-D__EMSCRIPTEN__',
- '-fno-math-errno',
- #'-fno-threadsafe-statics', # disabled due to issue 1289
+COMPILER_OPTS = COMPILER_OPTS + [#'-fno-threadsafe-statics', # disabled due to issue 1289
'-target', LLVM_TARGET]
-if LLVM_TARGET == 'le32-unknown-nacl':
- COMPILER_OPTS = filter(lambda opt: opt != '-m32', COMPILER_OPTS) # le32 target is 32-bit anyhow, no need for -m32
- COMPILER_OPTS += ['-U__native_client__', '-U__pnacl__', '-U__ELF__'] # The nacl target is originally used for Google Native Client. Emscripten is not NaCl, so remove the platform #define, when using their triple.
-
-# Remove various platform specific defines, and set little endian
-COMPILER_STANDARDIZATION_OPTS = ['-U__i386__', '-U__i386', '-Ui386', '-U__STRICT_ANSI__', '-D__IEEE_LITTLE_ENDIAN',
- '-U__SSE__', '-U__SSE_MATH__', '-U__SSE2__', '-U__SSE2_MATH__', '-U__MMX__',
- '-U__APPLE__', '-U__linux__']
+# COMPILER_STANDARDIZATION_OPTS: Options to correct various predefined macro options.
+COMPILER_STANDARDIZATION_OPTS = []
+
+# When we're not using an appropriate target triple, use -m32 to get i386, which we
+# can mostly make work.
+if LLVM_TARGET != 'asmjs-unknown-emscripten' and LLVM_TARGET != 'le32-unknown-nacl':
+ COMPILER_OPTS += ['-m32']
+ COMPILER_STANDARDIZATION_OPTS += ['-U__i386__', '-U__i386', '-Ui386',
+ '-U__SSE__', '-U__SSE_MATH__', '-U__SSE2__', '-U__SSE2_MATH__', '-U__MMX__',
+ '-U__APPLE__', '-U__linux__']
+
+# With the asmjs-unknown-emscripten target triple, clang sets up language modes
+# and predefined macros properly. When using the other targets, we have to set things
+# up manually.
+if LLVM_TARGET != 'asmjs-unknown-emscripten':
+ COMPILER_OPTS += ['-fno-math-errno']
+ COMPILER_STANDARDIZATION_OPTS += ['-D__IEEE_LITTLE_ENDIAN']
+ COMPILER_OPTS += ['-DEMSCRIPTEN', '-D__EMSCRIPTEN__', '-fno-math-errno',
+ '-U__native_client__', '-U__pnacl__', '-U__ELF__']
+
+# Changes to default clang behavior
+if LLVM_TARGET == 'asmjs-unknown-emscripten' or LLVM_TARGET == 'le32-unknown-nacl':
+ # Implicit functions can cause horribly confusing asm.js function pointer type errors, see #2175
+ # If your codebase really needs them - very unrecommended! - you can disable the error with
+ # -Wno-error=implicit-function-declaration
+ # or disable even a warning about it with
+ # -Wno-implicit-function-declaration
+ COMPILER_OPTS += ['-Werror=implicit-function-declaration']
USE_EMSDK = not os.environ.get('EMMAKEN_NO_SDK')
if USE_EMSDK:
# Disable system C and C++ include directories, and add our own (using -idirafter so they are last, like system dirs, which
# allows projects to override them)
- EMSDK_OPTS = ['-nostdinc', '-Xclang', '-nobuiltininc', '-Xclang', '-nostdsysteminc',
- '-Xclang', '-isystem' + path_from_root('system', 'local', 'include'),
- '-Xclang', '-isystem' + path_from_root('system', 'include', 'compat'),
- '-Xclang', '-isystem' + path_from_root('system', 'include', 'libcxx'),
- '-Xclang', '-isystem' + path_from_root('system', 'include'),
- '-Xclang', '-isystem' + path_from_root('system', 'include', 'emscripten'),
- '-Xclang', '-isystem' + path_from_root('system', 'include', 'bsd'), # posix stuff
- '-Xclang', '-isystem' + path_from_root('system', 'include', 'libc'),
- '-Xclang', '-isystem' + path_from_root('system', 'include', 'gfx'),
- '-Xclang', '-isystem' + path_from_root('system', 'include', 'net'),
- '-Xclang', '-isystem' + path_from_root('system', 'include', 'SDL'),
+ C_INCLUDE_PATHS = [path_from_root('system', 'local', 'include'),
+ path_from_root('system', 'include', 'compat'),
+ path_from_root('system', 'include'),
+ path_from_root('system', 'include', 'emscripten'),
+ path_from_root('system', 'include', 'bsd'), # posix stuff
+ path_from_root('system', 'include', 'libc'),
+ path_from_root('system', 'include', 'gfx'),
+ path_from_root('system', 'include', 'net'),
+ path_from_root('system', 'include', 'SDL'),
+ ]
+
+ CXX_INCLUDE_PATHS = [path_from_root('system', 'include', 'libcxx')
+ ]
+
+ C_OPTS = ['-nostdinc', '-Xclang', '-nobuiltininc', '-Xclang', '-nostdsysteminc',
]
+
+ def include_directive(paths):
+ result = []
+ for path in paths:
+ result += ['-Xclang', '-isystem' + path]
+ return result
+
+ EMSDK_OPTS = C_OPTS + include_directive(C_INCLUDE_PATHS) + include_directive(CXX_INCLUDE_PATHS)
+
EMSDK_OPTS += COMPILER_STANDARDIZATION_OPTS
- if LLVM_TARGET != 'le32-unknown-nacl':
- EMSDK_CXX_OPTS = ['-nostdinc++'] # le32 target does not need -nostdinc++
+ # For temporary compatibility, treat 'le32-unknown-nacl' as 'asmjs-unknown-emscripten'.
+ if LLVM_TARGET != 'asmjs-unknown-emscripten' and \
+ LLVM_TARGET != 'le32-unknown-pnacl':
+ EMSDK_CXX_OPTS = ['-nostdinc++'] # asmjs-unknown-emscripten target does not need -nostdinc++
else:
EMSDK_CXX_OPTS = []
COMPILER_OPTS += EMSDK_OPTS
@@ -658,10 +746,14 @@ else:
# Engine tweaks
try:
- if 'gcparam' not in str(SPIDERMONKEY_ENGINE):
- if type(SPIDERMONKEY_ENGINE) is str:
- SPIDERMONKEY_ENGINE = [SPIDERMONKEY_ENGINE]
- SPIDERMONKEY_ENGINE += ['-e', "gcparam('maxBytes', 1024*1024*1024);"] # Our very large files need lots of gc heap
+ if SPIDERMONKEY_ENGINE:
+ new_spidermonkey = listify(SPIDERMONKEY_ENGINE)
+ if 'gcparam' not in str(new_spidermonkey):
+ new_spidermonkey += ['-e', "gcparam('maxBytes', 1024*1024*1024);"] # Our very large files need lots of gc heap
+ if '-w' not in str(new_spidermonkey):
+ new_spidermonkey += ['-w']
+ JS_ENGINES = map(lambda x: new_spidermonkey if x == SPIDERMONKEY_ENGINE else x, JS_ENGINES)
+ SPIDERMONKEY_ENGINE = new_spidermonkey
except NameError:
pass
@@ -803,6 +895,8 @@ class Settings2(type):
@classmethod
def apply_opt_level(self, opt_level, noisy=False):
+ if opt_level == 0 and os.environ.get('EMCC_FAST_COMPILER') == '0':
+ self.attrs['ASM_JS'] = 0 # non-fastcomp has asm off in -O1
if opt_level >= 1:
self.attrs['ASM_JS'] = 1
self.attrs['ASSERTIONS'] = 0
@@ -1467,7 +1561,7 @@ class Building:
@staticmethod
def ensure_relooper(relooper):
if os.path.exists(relooper): return
- if os.environ.get('EMCC_FAST_COMPILER') == '1':
+ if os.environ.get('EMCC_FAST_COMPILER') != '0':
logging.debug('not building relooper to js, using it in c++ backend')
return
@@ -1528,34 +1622,6 @@ class Building:
import gen_struct_info
gen_struct_info.main(['-qo', info_path, path_from_root('src/struct_info.json')])
- @staticmethod
- def preprocess(infile, outfile):
- '''
- Preprocess source C/C++ in some special ways that emscripten needs. Returns
- a filename (potentially the same one if nothing was changed).
-
- Currently this only does emscripten_jcache_printf(..) rewriting.
- '''
- src = open(infile).read() # stack warning on jcacheprintf! in docs # add jcache printf test separatrely, for content of printf
- if 'emscripten_jcache_printf' not in src: return infile
- def fix(m):
- text = m.groups(0)[0]
- assert text.count('(') == 1 and text.count(')') == 1, 'must have simple expressions in emscripten_jcache_printf calls, no parens'
- assert text.count('"') == 2, 'must have simple expressions in emscripten_jcache_printf calls, no strings as varargs parameters'
- if os.environ.get('EMCC_FAST_COMPILER') == '1': # fake it in fastcomp
- return text.replace('emscripten_jcache_printf', 'printf')
- start = text.index('(')
- end = text.rindex(')')
- args = text[start+1:end].split(',')
- args = map(lambda x: x.strip(), args)
- if args[0][0] == '"':
- # flatten out
- args = map(lambda x: str(ord(x)), args[0][1:len(args[0])-1]) + ['0'] + args[1:]
- return 'emscripten_jcache_printf_(' + ','.join(args) + ')'
- src = re.sub(r'(emscripten_jcache_printf\([^)]+\))', lambda m: fix(m), src)
- open(outfile, 'w').write(src)
- return outfile
-
# compatibility with existing emcc, etc. scripts
Cache = cache.Cache(debug=DEBUG_CACHE)
JCache = cache.JCache(Cache)
@@ -1764,5 +1830,10 @@ def unsuffixed(name):
def unsuffixed_basename(name):
return os.path.basename(unsuffixed(name))
+def safe_move(src, dst):
+ if os.path.abspath(src) == os.path.abspath(dst):
+ return
+ shutil.move(src, dst)
+
import js_optimizer
diff --git a/tools/source-maps/sourcemapper.js b/tools/source-maps/sourcemapper.js
index 06c9a227..5193b3a8 100755
--- a/tools/source-maps/sourcemapper.js
+++ b/tools/source-maps/sourcemapper.js
@@ -153,7 +153,7 @@ function generateMap(mappings, sourceRoot, mapFileBaseName, generatedLineOffset)
function appendMappingURL(fileName, source, mapFileName) {
var lastLine = source.slice(source.lastIndexOf('\n'));
if (!/sourceMappingURL/.test(lastLine))
- fs.appendFileSync(fileName, '//@ sourceMappingURL=' + path.basename(mapFileName));
+ fs.appendFileSync(fileName, '//# sourceMappingURL=' + path.basename(mapFileName));
}
function parseArgs(args) {
diff --git a/tools/system_libs.py b/tools/system_libs.py
index 3723a5c3..50910a8a 100644
--- a/tools/system_libs.py
+++ b/tools/system_libs.py
@@ -28,10 +28,10 @@ def calculate(temp_files, in_temp, stdout, stderr):
o_s = []
prev_cxx = os.environ.get('EMMAKEN_CXX')
if prev_cxx: os.environ['EMMAKEN_CXX'] = ''
- musl_internal_includes = shared.path_from_root('system', 'lib', 'libc', 'musl', 'src', 'internal')
+ musl_internal_includes = ['-I', shared.path_from_root('system', 'lib', 'libc', 'musl', 'src', 'internal'), '-I', shared.path_from_root('system', 'lib', 'libc', 'musl', 'arch', 'js')]
for src in files:
o = in_temp(os.path.basename(src) + '.o')
- execute([shared.PYTHON, shared.EMCC, shared.path_from_root('system', 'lib', src), '-o', o, '-I', musl_internal_includes] + lib_opts, stdout=stdout, stderr=stderr)
+ execute([shared.PYTHON, shared.EMCC, shared.path_from_root('system', 'lib', src), '-o', o] + musl_internal_includes + lib_opts, stdout=stdout, stderr=stderr)
o_s.append(o)
if prev_cxx: os.environ['EMMAKEN_CXX'] = prev_cxx
shared.Building.link(o_s, in_temp(lib_filename))
@@ -71,6 +71,8 @@ def calculate(temp_files, in_temp, stdout, stderr):
]],
['stdlib', [
'atof.c',
+ 'atoi.c',
+ 'atol.c',
'strtod.c',
]],
['string', [
@@ -221,22 +223,44 @@ def calculate(temp_files, in_temp, stdout, stderr):
'fputws.c',
]],
['stdlib', [
+ 'atoll.c',
+ 'bsearch.c',
'ecvt.c',
'fcvt.c',
'gcvt.c',
+ 'qsort.c',
'wcstod.c',
'wcstol.c',
]],
['string', [
+ 'bcmp.c',
+ 'bcopy.c',
+ 'bzero.c',
+ 'index.c',
'memccpy.c',
'memmem.c',
'mempcpy.c',
+ 'memchr.c',
'memrchr.c',
+ 'rindex.c',
+ 'stpcpy.c',
'strcasestr.c',
+ 'strchr.c',
'strchrnul.c',
+ 'strcspn.c',
+ 'strdup.c',
'strlcat.c',
'strlcpy.c',
+ 'strncat.c',
+ 'strndup.c',
+ 'strnlen.c',
+ 'strpbrk.c',
+ 'strrchr.c',
'strsep.c',
+ 'strspn.c',
+ 'strstr.c',
+ 'strtok.c',
+ 'strtok_r.c',
'strverscmp.c',
'wcpcpy.c',
'wcpncpy.c',
@@ -335,8 +359,10 @@ def calculate(temp_files, in_temp, stdout, stderr):
# Settings this in the environment will avoid checking dependencies and make building big projects a little faster
# 1 means include everything; otherwise it can be the name of a lib (libcxx, etc.)
+ # You can provide 1 to include everything, or a comma-separated list with the ones you want
force = os.environ.get('EMCC_FORCE_STDLIBS')
force_all = force == '1'
+ force = set((force or '').split(','))
# Scan symbols
symbolses = map(lambda temp_file: shared.Building.llvm_nm(temp_file), temp_files)
@@ -364,15 +390,14 @@ def calculate(temp_files, in_temp, stdout, stderr):
all_needed.difference_update(symbols.defs)
# Go over libraries to figure out which we must include
- # If we have libcxx, we must force inclusion of libc, since libcxx uses new internally. Note: this is kind of hacky.
ret = []
has = need = None
- for name, create, apply_, library_symbols in [('libcxx', create_libcxx, apply_libcxx, libcxx_symbols),
- ('libcextra', create_libcextra, lambda x: True, libcextra_symbols),
- ('libcxxabi', create_libcxxabi, apply_libcxxabi, libcxxabi_symbols),
- ('gl', create_gl, lambda x: True, gl_symbols),
- ('libc', create_libc, apply_libc, libc_symbols)]:
- force_this = force_all or force == name
+ for name, create, apply_, library_symbols, deps in [('libcxx', create_libcxx, apply_libcxx, libcxx_symbols, ['libcextra', 'libcxxabi']),
+ ('libcextra', create_libcextra, lambda x: True, libcextra_symbols, ['libc']),
+ ('libcxxabi', create_libcxxabi, apply_libcxxabi, libcxxabi_symbols, ['libc']),
+ ('gl', create_gl, lambda x: True, gl_symbols, ['libc']),
+ ('libc', create_libc, apply_libc, libc_symbols, [])]:
+ force_this = force_all or name in force
if not force_this:
need = set()
has = set()
@@ -387,11 +412,11 @@ def calculate(temp_files, in_temp, stdout, stderr):
need.remove(haz)
if shared.Settings.VERBOSE: logging.debug('considering %s: we need %s and have %s' % (name, str(need), str(has)))
if force_this or len(need) > 0:
- force_all = True
if apply_(need):
# We need to build and link the library in
logging.debug('including %s' % name)
libfile = shared.Cache.get(name, create)
ret.append(libfile)
+ force = force.union(deps)
return ret
diff --git a/tools/test-js-optimizer-asm-outline1-output.js b/tools/test-js-optimizer-asm-outline1-output.js
index 27f93d8a..10fc3714 100644
--- a/tools/test-js-optimizer-asm-outline1-output.js
+++ b/tools/test-js-optimizer-asm-outline1-output.js
@@ -176,11 +176,12 @@ function vars(x, y) {
y = +y;
var sp = 0;
sp = STACKTOP;
- STACKTOP = STACKTOP + 152 | 0;
+ STACKTOP = STACKTOP + 136 | 0;
c(1 + (x + y));
c(2 + y * x);
c(3 + (x + y));
c(4 + y * x);
+ c(5 + (x + y));
HEAP32[sp + 8 >> 2] = x;
HEAPF32[sp + 16 >> 2] = y;
HEAP32[sp + 24 >> 2] = 0;
@@ -213,7 +214,7 @@ function vars3(x, y) {
y = +y;
var a = 0, sp = 0;
sp = STACKTOP;
- STACKTOP = STACKTOP + 160 | 0;
+ STACKTOP = STACKTOP + 144 | 0;
a = x + y;
a = c(1 + a);
a = c(2 + y * x);
@@ -256,15 +257,11 @@ function vars_w_stack(x, y) {
var a = 0, b = +0, sp = 0;
sp = STACKTOP;
STACKTOP = STACKTOP + 208 | 0;
- HEAP32[sp + 24 >> 2] = x;
- HEAPF32[sp + 32 >> 2] = y;
- HEAP32[sp + 40 >> 2] = a;
- HEAPF32[sp + 48 >> 2] = b;
- HEAP32[sp + 72 >> 2] = 0;
- HEAP32[sp + 76 >> 2] = 0;
- vars_w_stack$1(sp);
- a = HEAP32[sp + 40 >> 2] | 0;
- b = +HEAPF32[sp + 48 >> 2];
+ a = x + y;
+ b = y * x;
+ a = c(1 + a);
+ a = c(2 + a);
+ a = c(3 + a);
HEAP32[sp + 40 >> 2] = a;
HEAPF32[sp + 48 >> 2] = b;
HEAP32[sp + 64 >> 2] = 0;
@@ -423,6 +420,58 @@ function switchh2() {
}
STACKTOP = sp;
}
+function stackSet(x1, x2, x3, x4, x5) {
+ x1 = x1 | 0;
+ x2 = x2 | 0;
+ x3 = x3 | 0;
+ x4 = x4 | 0;
+ x5 = x5 | 0;
+ var sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 282 | 0;
+ c(1);
+ c(2);
+ c(3);
+ c(4);
+ c(5);
+ c(6);
+ c(7);
+ c(8);
+ c(9);
+ c(10);
+ HEAP32[sp + 66 >> 2] = 0;
+ HEAP32[sp + 70 >> 2] = 0;
+ stackSet$1(sp);
+ HEAP32[sp + 58 >> 2] = 0;
+ HEAP32[sp + 62 >> 2] = 0;
+ stackSet$0(sp);
+}
+function linf(d) {
+ d = +d;
+ var sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 160 | 0;
+ while (1) {
+ HEAP32[sp + 24 >> 2] = 0;
+ HEAP32[sp + 28 >> 2] = 0;
+ linf$1(sp);
+ HEAPF32[sp + 8 >> 2] = d;
+ HEAP32[sp + 16 >> 2] = 0;
+ HEAP32[sp + 20 >> 2] = 0;
+ linf$0(sp);
+ tempValue = HEAP32[sp + 16 >> 2] | 0;
+ tempInt = HEAP32[sp + 20 >> 2] | 0;
+ tempDouble = +HEAPF32[sp + 20 >> 2];
+ HEAP32[sp + 16 >> 2] = 0;
+ HEAP32[sp + 20 >> 2] = 0;
+ if ((tempValue | 0) == 7) {
+ STACKTOP = sp;
+ return +tempDouble;
+ }
+ }
+ STACKTOP = sp;
+ return +d;
+}
function lin$0(sp) {
sp = sp | 0;
c(14);
@@ -559,10 +608,9 @@ function mix$1(sp) {
}
function vars$0(sp) {
sp = sp | 0;
- var x = 0, y = +0;
+ var y = +0, x = 0;
x = HEAP32[sp + 8 >> 2] | 0;
y = +HEAPF32[sp + 16 >> 2];
- c(5 + (x + y));
c(6 + y * x);
c(7 + (x + y));
c(8 + y * x);
@@ -606,6 +654,7 @@ function vars_w_stack$0(sp) {
var a = 0, b = +0;
a = HEAP32[sp + 40 >> 2] | 0;
b = +HEAPF32[sp + 48 >> 2];
+ a = c(4 + a);
a = c(5 + a);
a = c(6 + a);
b = c(7 + a);
@@ -613,22 +662,6 @@ function vars_w_stack$0(sp) {
HEAP32[sp + 40 >> 2] = a;
HEAPF32[sp + 48 >> 2] = b;
}
-function vars_w_stack$1(sp) {
- sp = sp | 0;
- var a = 0, x = 0, y = +0, b = +0;
- x = HEAP32[sp + 24 >> 2] | 0;
- y = +HEAPF32[sp + 32 >> 2];
- a = HEAP32[sp + 40 >> 2] | 0;
- b = +HEAPF32[sp + 48 >> 2];
- a = x + y;
- b = y * x;
- a = c(1 + a);
- a = c(2 + a);
- a = c(3 + a);
- a = c(4 + a);
- HEAP32[sp + 40 >> 2] = a;
- HEAPF32[sp + 48 >> 2] = b;
-}
function chain$0(sp) {
sp = sp | 0;
var helper$0 = 0;
@@ -926,4 +959,59 @@ function switchh2$2(sp) {
} while (0);
HEAP32[sp + 8 >> 2] = helper$0;
}
+function stackSet$0(sp) {
+ sp = sp | 0;
+ c(7);
+ c(8);
+ c(9);
+ c(10);
+ c(11);
+ c(12);
+ c(13);
+}
+function stackSet$1(sp) {
+ sp = sp | 0;
+ c(11);
+ c(12);
+ c(13);
+ c(1);
+ c(2);
+ c(3);
+ c(4);
+ c(5);
+ c(6);
+}
+function linf$0(sp) {
+ sp = sp | 0;
+ var d = +0;
+ d = +HEAPF32[sp + 8 >> 2];
+ OL : do {
+ c(16);
+ c(17);
+ c(18);
+ c(19);
+ c(20);
+ HEAP32[sp + 16 >> 2] = 7;
+ HEAPF32[sp + 20 >> 2] = +d;
+ break OL;
+ } while (0);
+}
+function linf$1(sp) {
+ sp = sp | 0;
+ c(1);
+ c(2);
+ c(3);
+ c(4);
+ c(5);
+ c(6);
+ c(7);
+ c(8);
+ c(9);
+ c(10);
+ c(11);
+ c(12);
+ c(13);
+ c(14);
+ c(15);
+}
diff --git a/tools/test-js-optimizer-asm-outline1.js b/tools/test-js-optimizer-asm-outline1.js
index b7ec9011..8dfb1afb 100644
--- a/tools/test-js-optimizer-asm-outline1.js
+++ b/tools/test-js-optimizer-asm-outline1.js
@@ -347,5 +347,69 @@ function switchh2() {
print(9);
}
}
+function stackSet(x1, x2, x3, x4, x5) {
+ x1 = x1 | 0;
+ x2 = x2 | 0;
+ x3 = x3 | 0;
+ x4 = x4 | 0;
+ x5 = x5 | 0;
+ var sp = 0, a = 0, b = 0, cc = 0, d = 0, e = 0, f = 0, g = 0;
+ var sp1 = 0, a1 = 0, b1 = 0, c1 = 0, d1 = 0, e1 = 0, f1 = 0, g1 = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 10 | 0;
+ c(1);
+ c(2);
+ c(3);
+ c(4);
+ c(5);
+ c(6);
+ c(7);
+ c(8);
+ c(9);
+ c(10);
+ c(11);
+ c(12);
+ c(13);
+ c(1);
+ c(2);
+ c(3);
+ c(4);
+ c(5);
+ c(6);
+ c(7);
+ c(8);
+ c(9);
+ c(10);
+ c(11);
+ c(12);
+ c(13);
+}
+function linf(d) {
+ d = +d;
+ while (1) {
+ c(1);
+ c(2);
+ c(3);
+ c(4);
+ c(5);
+ c(6);
+ c(7);
+ c(8);
+ c(9);
+ c(10);
+ c(11);
+ c(12);
+ c(13);
+ c(14);
+ c(15);
+ c(16);
+ c(17);
+ c(18);
+ c(19);
+ c(20);
+ return +d;
+ }
+ return +d;
+}
// EMSCRIPTEN_GENERATED_FUNCTIONS
// EXTRA_INFO: { "sizeToOutline": 30, "allowCostlyOutlines": 1 }
diff --git a/tools/test-js-optimizer-asm-outline2-output.js b/tools/test-js-optimizer-asm-outline2-output.js
index 2658fda0..923cd7df 100644
--- a/tools/test-js-optimizer-asm-outline2-output.js
+++ b/tools/test-js-optimizer-asm-outline2-output.js
@@ -25,6 +25,7 @@ function _free($mem) {
$mem = $mem | 0;
var $5 = 0, $10 = 0, $16 = 0, $21 = 0, $25 = 0, $26 = 0, $psize_0 = 0, $p_0 = 0, $189 = 0, $194 = 0, sp = 0, helper$0 = 0;
sp = STACKTOP;
+ STACKTOP = STACKTOP + 864 | 0;
if (($mem | 0) == 0) {
STACKTOP = sp;
return;
diff --git a/tools/test-js-optimizer-output.js b/tools/test-js-optimizer-output.js
index 5e5ff29a..41f79f76 100644
--- a/tools/test-js-optimizer-output.js
+++ b/tools/test-js-optimizer-output.js
@@ -4,25 +4,25 @@ function expr() {
function loopy() {
$while_body$2 : while (1) {
$ok = 1;
- while (1) {
- if ($ok) break;
+ $for_cond$4 : while (1) {
+ if ($ok) break $for_cond$4;
var $inc = $ok + 1;
if ($inc == 9999) break $while_body$2;
}
- continue;
+ continue $while_body$2;
}
next();
- while (1) {
+ b$while_body$2 : while (1) {
$ok = 1;
- while (1) {
- if ($ok) break;
+ b$for_cond$4 : while (1) {
+ if ($ok) break b$for_cond$4;
var $inc = $ok + 1;
}
- continue;
+ continue b$while_body$2;
}
next();
- do {
- if (!$ok) break;
+ $once : do {
+ if (!$ok) break $once;
something();
} while (0);
next();
@@ -33,7 +33,9 @@ function loopy() {
something();
} while (0);
next();
- something();
+ c$once : do {
+ something();
+ } while (0);
}
function bits() {
print(($s & 65535) + ((($f & 65535) << 16 >> 16) * (($f & 65535) << 16 >> 16) | 0) % 256 & 65535);
@@ -68,9 +70,9 @@ function hoisting() {
}
} while (0);
pause(2);
- do {
+ cheez : do {
if ($i < $N) {
- if (callOther()) break;
+ if (callOther()) break cheez;
}
} while (0);
pause(3);
@@ -97,7 +99,7 @@ function hoisting() {
somethingElse();
}
pause(7);
- while (1) {
+ free : while (1) {
if ($i >= $N) {
label = 3;
break;
@@ -110,24 +112,26 @@ function hoisting() {
}
pause(8);
var $cmp95 = $69 == -1;
- do {
+ $if_then96$$if_end110thread_pre_split$48 : do {
if ($cmp95) {
if (!$cmp103) {
label = 38;
- break;
+ break $if_then96$$if_end110thread_pre_split$48;
}
if (!$cmp106) {
label = 38;
- break;
+ break $if_then96$$if_end110thread_pre_split$48;
}
label = 39;
- break;
+ break $if_then96$$if_end110thread_pre_split$48;
}
label = 38;
} while (0);
- if (label == 38) {
- var $79 = $_pr6;
- }
+ $if_end110$$if_end110thread_pre_split$52 : do {
+ if (label == 38) {
+ var $79 = $_pr6;
+ }
+ } while (0);
pause(9);
var $cmp70 = ($call69 | 0) != 0;
pause(10);
@@ -191,24 +195,26 @@ function sleep() {
return 0;
}
function demangle($cmp) {
- do {
+ $if_then$$lor_lhs_false$2 : do {
if (!$cmp) {
if (something()) {
label = 3;
- break;
+ break $if_then$$lor_lhs_false$2;
}
more();
- break;
+ break $if_then$$lor_lhs_false$2;
}
label = 3;
} while (0);
- if (label == 3) {
- final();
- }
+ $if_then$$return$6 : do {
+ if (label == 3) {
+ final();
+ }
+ } while (0);
}
function lua() {
- while (1) {
- do {
+ $5$98 : while (1) {
+ $15$$16$101 : do {
if (!$14) {
var $17 = $i;
var $18 = $3;
@@ -217,7 +223,7 @@ function lua() {
var $21 = $20 + 1 | 0;
var $22 = HEAP8[$21];
var $23 = $22 << 24 >> 24;
- break;
+ break $15$$16$101;
}
} while (0);
}
@@ -236,14 +242,16 @@ function lua() {
}
}
function moreLabels() {
- while (1) {
+ $for_cond$2 : while (1) {
if (!$cmp) {
- break;
+ break $for_cond$2;
}
- if ($cmp1) {
- break;
- }
- inc();
+ $if_then$$for_inc$5 : do {
+ if ($cmp1) {
+ break $for_cond$2;
+ }
+ inc();
+ } while (0);
}
pause(999);
$while_body$$while_end$31 : do {
diff --git a/tools/test-js-optimizer-si-output.js b/tools/test-js-optimizer-si-output.js
new file mode 100644
index 00000000..9ef5171c
--- /dev/null
+++ b/tools/test-js-optimizer-si-output.js
@@ -0,0 +1,197 @@
+function a() {
+ if (x ? y : 0) {
+ g();
+ }
+ if (x) {
+ if (y) {
+ g();
+ } else {
+ h();
+ }
+ }
+ if (x) {
+ if (y) {
+ g();
+ }
+ h();
+ }
+ if (x) {
+ if (y) {
+ g();
+ }
+ } else {
+ h();
+ }
+ if (x) {
+ return;
+ if (y) {
+ g();
+ }
+ }
+ if ((x ? y : 0) ? z : 0) {
+ g();
+ }
+ if (x) {
+ return;
+ if (y ? z : 0) {
+ g();
+ }
+ }
+ if (x ? y : 0) {
+ return;
+ if (z) {
+ g();
+ }
+ }
+ if (x ? y : 0) {
+ if (z) {
+ g();
+ }
+ f();
+ }
+ if (x) {
+ if (y ? z : 0) {
+ g();
+ }
+ f();
+ }
+ if (x ? (f(), x = x + 2 | 0, y) : 0) {
+ g();
+ }
+ if (x) {
+ f();
+ x = x + 2 | 0;
+ return;
+ if (y) {
+ g();
+ }
+ }
+ andNowForElses();
+ if (x ? y : 0) {
+ f();
+ } else {
+ label = 5;
+ }
+ if (x) {
+ if (y) {
+ f();
+ } else {
+ label = 5;
+ }
+ } else {
+ label = 6;
+ }
+ if (x) {
+ if (y) {
+ f();
+ } else {
+ label = 5;
+ }
+ }
+ if (x) {
+ if (y) {
+ f();
+ }
+ } else {
+ label = 5;
+ }
+ if (x) {
+ a = 5;
+ if (y) {
+ f();
+ }
+ } else {
+ label = 5;
+ }
+ fuseElses();
+ if (x ? y : 0) {
+ f();
+ } else {
+ a();
+ }
+ if (x ? y : 0) {
+ f();
+ } else {
+ label = 52;
+ }
+ if ((label | 0) == 62) {
+ label = 0;
+ a();
+ }
+ if (x ? y : 0) {
+ f();
+ } else {
+ a();
+ }
+ while (1) {
+ if (x ? y : 0) {
+ f();
+ } else {
+ label = 953;
+ }
+ if ((label | 0) == 953) {
+ a();
+ }
+ }
+ if (x ? y : 0) {
+ label = 54;
+ } else {
+ label = 54;
+ }
+ if ((label | 0) == 54) {
+ label = 0;
+ a();
+ }
+}
+function b() {
+ if (x) {
+ a();
+ } else {
+ label = 5;
+ }
+ if ((label | 0) == 5) {
+ label = 0;
+ a();
+ }
+}
+function c() {
+ label = x;
+ if (x ? y : 0) {
+ f();
+ } else {
+ label = 151;
+ }
+ if ((label | 0) == 151) {
+ label = 0;
+ a();
+ }
+}
+function d() {
+ if (x ? y : 0) {
+ f();
+ } else {
+ label = 251;
+ }
+ if ((label | 0) == 251) {
+ label = 0;
+ a();
+ }
+ if ((label | 0) == 251) {
+ a();
+ }
+}
+function e() {
+ if (x ? y : 0) {
+ f();
+ } else {
+ label = 351;
+ }
+ if ((label | 0) == 351) {
+ label = 0;
+ a();
+ }
+ if ((label | 0) == x) {
+ a();
+ }
+}
+
diff --git a/tools/test-js-optimizer-si.js b/tools/test-js-optimizer-si.js
new file mode 100644
index 00000000..04ceec4a
--- /dev/null
+++ b/tools/test-js-optimizer-si.js
@@ -0,0 +1,258 @@
+function a() {
+ if (x) {
+ if (y) {
+ g();
+ }
+ }
+ if (x) {
+ if (y) {
+ g();
+ } else {
+ h();
+ }
+ }
+ if (x) {
+ if (y) {
+ g();
+ }
+ h();
+ }
+ if (x) {
+ if (y) {
+ g();
+ }
+ } else {
+ h();
+ }
+ if (x) {
+ return;
+ if (y) {
+ g();
+ }
+ }
+ if (x) {
+ if (y) {
+ if (z) {
+ g();
+ }
+ }
+ }
+ if (x) {
+ return;
+ if (y) {
+ if (z) {
+ g();
+ }
+ }
+ }
+ if (x) {
+ if (y) {
+ return;
+ if (z) {
+ g();
+ }
+ }
+ }
+ if (x) {
+ if (y) {
+ if (z) {
+ g();
+ }
+ f();
+ }
+ }
+ if (x) {
+ if (y) {
+ if (z) {
+ g();
+ }
+ }
+ f();
+ }
+ if (x) {
+ f();
+ x = x + 2 | 0;
+ if (y) {
+ g();
+ }
+ }
+ if (x) {
+ f();
+ x = x + 2 | 0;
+ return;
+ if (y) {
+ g();
+ }
+ }
+ andNowForElses();
+ if (x) {
+ if (y) {
+ f();
+ } else {
+ label = 5;
+ }
+ } else {
+ label = 5;
+ }
+ if (x) {
+ if (y) {
+ f();
+ } else {
+ label = 5;
+ }
+ } else {
+ label = 6;
+ }
+ if (x) {
+ if (y) {
+ f();
+ } else {
+ label = 5;
+ }
+ }
+ if (x) {
+ if (y) {
+ f();
+ }
+ } else {
+ label = 5;
+ }
+ if (x) {
+ a = 5; // do not commify me
+ if (y) {
+ f();
+ }
+ } else {
+ label = 5;
+ }
+ fuseElses();
+ if (x) {
+ if (y) {
+ f();
+ } else {
+ label = 51;
+ }
+ } else {
+ label = 51;
+ }
+ if ((label|0) == 51) {
+ label = 0;
+ a();
+ }
+ if (x) {
+ if (y) {
+ f();
+ } else {
+ label = 52;
+ }
+ } else {
+ label = 52;
+ }
+ if ((label|0) == 62) {
+ label = 0;
+ a();
+ }
+ if (x) {
+ if (y) {
+ f();
+ } else {
+ label = 53;
+ }
+ } else {
+ label = 53;
+ }
+ if ((label|0) == 53) {
+ a();
+ }
+ while (1) {
+ if (x) {
+ if (y) {
+ f();
+ } else {
+ label = 953;
+ }
+ } else {
+ label = 953;
+ }
+ if ((label|0) == 953) {
+ a();
+ }
+ }
+ if (x) {
+ if (y) {
+ label = 54; // extra label setting, cannot fuse here
+ } else {
+ label = 54;
+ }
+ } else {
+ label = 54;
+ }
+ if ((label|0) == 54) {
+ label = 0;
+ a();
+ }
+}
+function b() {
+ if (x) { // will not be fused, since we did not eliminate with elses
+ a();
+ } else {
+ label = 5;
+ }
+ if ((label|0) == 5) {
+ label = 0;
+ a();
+ }
+}
+function c() {
+ label = x; // dynamic assign to label, suppresses label removal
+ if (x) {
+ if (y) {
+ f();
+ } else {
+ label = 151;
+ }
+ } else {
+ label = 151;
+ }
+ if ((label|0) == 151) {
+ label = 0;
+ a();
+ }
+}
+function d() {
+ if (x) {
+ if (y) {
+ f();
+ } else {
+ label = 251;
+ }
+ } else {
+ label = 251;
+ }
+ if ((label|0) == 251) {
+ label = 0;
+ a();
+ }
+ if ((label|0) == 251) { // extra check of label, suppresses label removal
+ a();
+ }
+}
+function e() {
+ if (x) {
+ if (y) {
+ f();
+ } else {
+ label = 351;
+ }
+ } else {
+ label = 351;
+ }
+ if ((label|0) == 351) {
+ label = 0;
+ a();
+ }
+ if ((label|0) == x) { // dynamic check of label, suppresses label removal
+ a();
+ }
+}
+// EMSCRIPTEN_GENERATED_FUNCTIONS: ["a", "b", "c", "d"]
diff --git a/tools/test-js-optimizer-t2-output.js b/tools/test-js-optimizer-t2-output.js
deleted file mode 100644
index 334d7999..00000000
--- a/tools/test-js-optimizer-t2-output.js
+++ /dev/null
@@ -1,91 +0,0 @@
-function shifty($id2) {
- var $tp$s2;
- var $parameters_addr$s2;
- var $wavelet38$s2;
- var _dwt_norms_real$s2;
- var $a_addr$s2;
- var _idents$s2;
- var $id3$s3;
- var $id2$s1 = $id2 >> 1;
- q(HEAP32[$id >> 2]);
- q(HEAP32[$id + 40 >> 2]);
- q(HEAP32[$id + 80 >> 2]);
- q(HEAP32[unknown1 + unknown2 + $id >> 2]);
- q(HEAP32[unknown1 + $id + unknown2 >> 2]);
- var localUnchanged1 = get(1), localUnchanged2 = get(1);
- q(HEAP32[localUnchanged1 + $id + localUnchanged2 >> 2]);
- q($id >> _something_);
- $id = q("..");
- q($id << _somethingElse_);
- pause(-1);
- q(HEAP32[$id2$s1]);
- q(HEAP32[$id2$s1]);
- q(HEAP32[$id2$s1]);
- q(HEAP32[$id2$s1]);
- q(HEAP32[$id2$s1 + 20]);
- q(HEAP32[$id2$s1 + 40]);
- var $id3 = get(74), $id3$s3 = $id3 >> 3;
- q(HEAP32[$id3$s3]);
- q(HEAP32[$id3$s3 + 5]);
- q(HEAP32[$id3$s3 + 10]);
- q($id3);
- pause(0);
- var _idents = get("abc"), _idents$s2 = _idents >> 2;
- q(HEAP32[HEAP32[_idents$s2] + 8 >> 2]);
- q(HEAP32[HEAP32[_idents$s2] + 8 >> 2]);
- q(HEAP32[HEAP32[_idents$s2] + 8 >> 2]);
- pause(1);
- var $sn_addr = get(12), $a_addr = get(999), $a_addr$s2 = $a_addr >> 2;
- var $i = get(112233);
- q(HEAP32[(($sn_addr - 1 << 1) + 1 << 2 >> 2) + $a_addr$s2]);
- q(HEAP32[(($i - 1 << 1) + 1 << 2 >> 2) + $a_addr$s2]);
- q(HEAP32[($i << 3 >> 2) + $a_addr$s2]);
- q(HEAP32[($i << 2 >> 2) + $a_addr$s2]);
- q($a_addr$s2, z($a_addr$s2));
- pause(2);
- var $level = HEAP[get(322) >> 2];
- var _dwt_norms_real = get("a"), _dwt_norms_real$s2 = _dwt_norms_real >> 2, $orient = get("cheez");
- q(HEAP32[($level << 3 >> 2) + _dwt_norms_real$s2 + ($orient * 20 | 0)]);
- q(HEAP32[(($level << 3) + 4 >> 2) + _dwt_norms_real$s2 + ($orient * 20 | 0)]);
- q(HEAP32[(($level << 3) + 8 >> 2) + _dwt_norms_real$s2 + ($orient * 20 | 0)]);
- pause(3);
- var $wavelet38 = get(38), $wavelet38$s2 = $wavelet38 >> 2;
- $k = $a_addr;
- q(HEAPF32[HEAP32[$wavelet38$s2] + ($k << 4) + 8 >> 2]);
- q(HEAPF32[HEAP32[$wavelet38$s2] + ($k << 4) + 12 >> 2]);
- q(HEAPF32[HEAP32[$wavelet38$s2] + ($k << 4) + 400 >> 2]);
- pause(4);
- var $p = $k, $parameters_addr = get("burger"), $parameters_addr$s2 = $parameters_addr >> 2;
- q(HEAP32[(($p << 2) + 5624 >> 2) + $parameters_addr$s2]);
- q(HEAP32[(($p << 2) + 5644 >> 2) + $parameters_addr$s2]);
- q(HEAP32[(($p << 2) + 5664 >> 2) + $parameters_addr$s2]);
- pause(5);
- var $res_spec242 = get($real), $cp = get("b"), $tileno = arguments[2];
- q(HEAP32[(($res_spec242 - 1 << 2) + 5624 >> 2) + $parameters_addr$s2]);
- q(HEAP32[(HEAP32[$cp + 108 >> 2] + 420 >> 2) + ($tileno * 1397 | 0)]);
- pause(6);
- q($idx << 3);
- q(1 << $idx << 1);
- print(INDENT + "Entering: _main" + "hi");
- pause(7);
- var $tp = get("tp"), $tp$s2 = $tp >> 2;
- q($tp$s2);
- q($tp$s2);
- q($tp$s2);
- HEAP32[$H400] = $tp;
- HEAP32[$tp] = 5;
- HEAP32[$tp$s2] = 5;
- HEAP32[HEAP[$tp$s2]] = 5;
- HEAP32[HEAP[$tp$s2] >> 2] = 5;
- pause(7);
- q(go() >> 1 << 1);
- q(go() << 1 >> 1);
- q(go() >> 2);
- q(go() << 2);
- q(go() >> 8 << 8);
- q(go() << 8 >> 8);
- q(go() >> 16);
- q(go() << 16);
- q(go() + 2 >> 2);
-}
-
diff --git a/tools/test-js-optimizer-t2.js b/tools/test-js-optimizer-t2.js
deleted file mode 100644
index 8dd82485..00000000
--- a/tools/test-js-optimizer-t2.js
+++ /dev/null
@@ -1,92 +0,0 @@
-// TODO also with >> 1 and >> 3
-// also HEAP*U*, and HEAP8, 16
-function shifty($id2) {
- // $id is a non-ssa, $id2 is a param. both should be replaced with a shifted version
- q(HEAP32[$id >> 2]);
- q(HEAP32[($id + 40) >> 2]);
- q(HEAP32[($id + 80 | 0) >> 2]);
- q(HEAP32[(unknown1 + unknown2 + $id) >> 2]);
- q(HEAP32[(unknown1 + $id + unknown2) >> 2]); // unknowns should be shifted together
- var localUnchanged1 = get(1), localUnchanged2 = get(1);
- q(HEAP32[(localUnchanged1 + $id + localUnchanged2) >> 2]); // unknowns should be shifted together
- q($id >> _something_); // non-fixed shift
- $id = q('..');
- q($id << _somethingElse_); // non-fixed shift
- pause(-1);
- q(HEAP32[$id2 >> 1]);
- q(HEAP32[$id2 >> 1]);
- q(HEAP32[$id2 >> 1]);
- q(HEAP32[$id2 >> 1]);
- q(HEAP32[($id2 + 40) >> 1]);
- q(HEAP32[($id2 + 80 | 0) >> 1]);
- var $id3 = get(74);
- q(HEAP32[$id3 >> 3]);
- q(HEAP32[($id3 + 40) >> 3]);
- q(HEAP32[($id3 + 80 | 0) >> 3]);
- q($id3);
- pause(0);
- // similar, but inside another HEAP
- var _idents = get('abc');
- q(HEAP32[(HEAP32[_idents >> 2] + 8 | 0) >> 2]);
- q(HEAP32[(HEAP32[_idents >> 2] + 8 | 0) >> 2]);
- q(HEAP32[(HEAP32[_idents >> 2] + 8 | 0) >> 2]);
- pause(1);
- // $i's shifts should consolidate (the last should be 0..?
- // since we may have had |0 in the middle!)
- var $sn_addr = get(12), $a_addr = get(999);
- var $i = get(112233);
- q(HEAP32[($a_addr + ((($sn_addr - 1 << 1) + 1 | 0) << 2) | 0) >> 2]);
- q(HEAP32[($a_addr + ((($i - 1 << 1) + 1 | 0) << 2) | 0) >> 2]);
- q(HEAP32[($a_addr + (($i << 1 | 0) << 2) | 0) >> 2]);
- q(HEAP32[($a_addr + ($i << 2)) >> 2]);
- q($a_addr >> 2, z($a_addr >> 2));
- pause(2);
- var $level = HEAP[get(322) >> 2]; // ignore this
- var _dwt_norms_real = get('a'), $orient = get('cheez');
- q(HEAP32[(_dwt_norms_real + $orient * 80 + ($level << 3) | 0) >> 2]);
- q(HEAP32[(_dwt_norms_real + $orient * 80 + ($level << 3) + 4 | 0) >> 2]);
- q(HEAP32[(_dwt_norms_real + $orient * 80 + ($level << 3) + 8 | 0) >> 2]);
- pause(3);
- // reuse $a_addr here
- var $wavelet38 = get(38);
- $k = $a_addr;
- q(HEAPF32[(HEAP32[$wavelet38 >> 2] + ($k << 4) + 8 | 0) >> 2]);
- q(HEAPF32[(HEAP32[$wavelet38 >> 2] + ($k << 4) + 12 | 0) >> 2]);
- q(HEAPF32[(HEAP32[$wavelet38 >> 2] + ($k << 4) + 400 | 0) >> 2]);
- pause(4);
- // reuse $k, which already reuses $a_addr
- var $p = $k, $parameters_addr = get('burger')
- q(HEAP32[($parameters_addr + 5624 + ($p << 2) | 0) >> 2]);
- q(HEAP32[($parameters_addr + 5644 + ($p << 2) | 0) >> 2]);
- q(HEAP32[($parameters_addr + 5664 + ($p << 2) | 0) >> 2]);
- pause(5);
- // loops count as more uses!
- var $res_spec242 = get($real), $cp = get('b'), $tileno = arguments[2];
- q(HEAP32[($parameters_addr + 5624 + (($res_spec242 - 1 | 0) << 2) | 0) >> 2]);
- q(HEAP32[(HEAP32[($cp + 108 | 0) >> 2] + $tileno * 5588 + 420 | 0) >> 2]);
- pause(6);
- q($idx << 1 << 2);
- q(1 << $idx << 1); // Do not turn this into the slower 1 << $idx + 1 (which is identical though)
- print(INDENT + "Entering: _main" + "hi"); // this order should not be modified
- pause(7);
- var $tp = get('tp');
- q($tp >> 2);
- q($tp >> 2);
- q($tp >> 2);
- HEAP32[$H400] = $tp;
- HEAP32[$tp] = 5;
- HEAP32[$tp >> 2] = 5;
- HEAP32[HEAP[$tp >> 2]] = 5;
- HEAP32[HEAP[$tp >> 2] >> 2] = 5;
- pause(7);
- q(go() >> 1 << 1);
- q(go() << 1 >> 1);
- q(go() >> 1 >> 1);
- q(go() << 1 << 1);
- q(go() >> 8 << 8);
- q(go() << 8 >> 8);
- q(go() >> 8 >> 8);
- q(go() << 8 << 8);
- q((go() + 2) >> 2); // the 2 >> 2 can't be simplified
-}
-// EMSCRIPTEN_GENERATED_FUNCTIONS: ["shifty"]
diff --git a/tools/test-js-optimizer-t2c-output.js b/tools/test-js-optimizer-t2c-output.js
deleted file mode 100644
index 43cdf889..00000000
--- a/tools/test-js-optimizer-t2c-output.js
+++ /dev/null
@@ -1,17 +0,0 @@
-function shifty() {
- $pPage = HEAP32[$pCur_addr + ($26 << 16 >> 16 << 2) + 116 >> 2];
- var $ead_192394 = HEAP32[$pCur_addr + ($26 << 16 >> 16 << 2) + 116 >> 2];
- $pPage2 = HEAP32[($26 << 16 >> 16 << 2) + $pCur_addr + 116];
- var $ead_192394b = HEAP32[($26 << 16 >> 16 << 2) + $pCur_addr + 116];
- $pPage2 = HEAP32[($26 << 16 >> 16) + $pCur_addr + 116];
- var $ead_192394b = HEAP32[($26 << 16 >> 16) + $pCur_addr + 116];
- q(4);
- q($13 + 8 >> 2);
- q($13 + 28 >> 2);
- q($13 + 60 >> 2);
- q($13 + $15 + 12 >> 2);
- q(HEAPF32[$output + ($j37 << 4) + 4 >> 2]);
- q($13 + 13 << 2);
- q(h() >> 2 << 2);
-}
-
diff --git a/tools/test-js-optimizer-t2c.js b/tools/test-js-optimizer-t2c.js
deleted file mode 100644
index 85292ba5..00000000
--- a/tools/test-js-optimizer-t2c.js
+++ /dev/null
@@ -1,18 +0,0 @@
-function shifty() {
- $pPage = HEAP32[$pCur_addr + 116 + ($26 << 16 >> 16 << 2) >> 2];
- var $ead_192394 = HEAP32[$pCur_addr + 116 + ($26 << 16 >> 16 << 2) >> 2];
- $pPage2 = HEAP32[$pCur_addr + 116 + ($26 << 16 >> 16 << 2)];
- var $ead_192394b = HEAP32[$pCur_addr + 116 + ($26 << 16 >> 16 << 2)];
- $pPage2 = HEAP32[$pCur_addr + 116 + ($26 << 16 >> 16)];
- var $ead_192394b = HEAP32[$pCur_addr + 116 + ($26 << 16 >> 16)];
- // We prefer to do additions then shifts, so the shift happens last, because the shift output is known to be 32-bit. So these should not change
- q(16 >> 2);
- q($13 + 8 >> 2);
- q(28 + $13 >> 2);
- q(48 + $13 + 12 >> 2);
- q($13 + $15 + 12 >> 2);
- q(HEAPF32[$output + ($j37 << 4) + 4 >> 2]);
- q(5 + $13 + 8 << 2);
- q(((h() | 0) >> 2) << 2); // removing the shifts is dangerous
-}
-// EMSCRIPTEN_GENERATED_FUNCTIONS: ["shifty"]
diff --git a/tools/test-js-optimizer-t3-output.js b/tools/test-js-optimizer-t3-output.js
deleted file mode 100644
index 9a16c2ac..00000000
--- a/tools/test-js-optimizer-t3-output.js
+++ /dev/null
@@ -1,49 +0,0 @@
-function _png_create_write_struct_2($user_png_ver, $error_ptr, $error_fn, $warn_fn, $mem_ptr, $malloc_fn, $free_fn) {
- var $png_ptr$s2;
- var label;
- label = 2;
- var setjmpTable = {
- "2": (function(value) {
- label = 5;
- $call1 = value;
- }),
- dummy: 0
- };
- while (1) try {
- switch (label) {
- case 2:
- var $png_ptr;
- var $call = _png_create_struct(1);
- $png_ptr = $call;
- var $call1 = (HEAP32[$png_ptr >> 2] = label, 0);
- label = 5;
- break;
- case 5:
- var $2 = $png_ptr;
- if (($call1 | 0) == 0) {
- label = 4;
- break;
- } else {
- label = 3;
- break;
- }
- case 3:
- var $4 = HEAP32[($png_ptr >> 2) + (148 >> 2)];
- _png_free($2, $4);
- HEAP32[($png_ptr >> 2) + (148 >> 2)] = 0;
- _png_destroy_struct($png_ptr);
- var $retval_0 = 0;
- label = 4;
- break;
- case 4:
- var $retval_0;
- return $retval_0;
- default:
- assert(0, "bad label: " + label);
- }
- } catch (e) {
- if (!e.longjmp) throw e;
- setjmpTable[e.label](e.value);
- }
-}
-
diff --git a/tools/test-js-optimizer-t3.js b/tools/test-js-optimizer-t3.js
deleted file mode 100644
index 0e02f72b..00000000
--- a/tools/test-js-optimizer-t3.js
+++ /dev/null
@@ -1,50 +0,0 @@
-function _png_create_write_struct_2($user_png_ver, $error_ptr, $error_fn, $warn_fn, $mem_ptr, $malloc_fn, $free_fn) {
- var $png_ptr$s2;
- var label;
- label = 2;
- var setjmpTable = {
- "2": (function(value) {
- label = 5;
- $call1 = value;
- }),
- dummy: 0
- };
- while (1) try {
- switch (label) {
- case 2:
- var $png_ptr;
- var $call = _png_create_struct(1);
- $png_ptr = $call;
- var $call1 = (HEAP32[$png_ptr >> 2] = label, 0);
- label = 5;
- break;
- case 5:
- var $2 = $png_ptr;
- if (($call1 | 0) == 0) {
- label = 4;
- break;
- } else {
- label = 3;
- break;
- }
- case 3:
- var $4 = HEAP32[($png_ptr >> 2) + (148 >> 2)];
- _png_free($2, $4);
- HEAP32[($png_ptr >> 2) + (148 >> 2)] = 0;
- _png_destroy_struct($png_ptr);
- var $retval_0 = 0;
- label = 4;
- break;
- case 4:
- var $retval_0;
- return $retval_0;
- default:
- assert(0, "bad label: " + label);
- }
- } catch (e) {
- if (!e.longjmp) throw e;
- setjmpTable[e.label](e.value);
- }
-}
-// EMSCRIPTEN_GENERATED_FUNCTIONS: ["_png_create_write_struct_2"]
-
diff --git a/tools/traverse.py b/tools/traverse.py
new file mode 100755
index 00000000..05f14597
--- /dev/null
+++ b/tools/traverse.py
@@ -0,0 +1,50 @@
+#!/usr/bin/env python2
+
+'''
+simple tool to run emcc and clang on C testcases each in a separate subdir of the current dir
+'''
+
+import os, sys
+
+__rootpath__ = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
+def path_from_root(*pathelems):
+ return os.path.join(__rootpath__, *pathelems)
+sys.path += [path_from_root('')]
+import tools.shared
+from tools.shared import *
+
+curr = os.getcwd()
+
+for d in os.listdir(curr):
+ print '(' + d + ') ',
+ os.chdir(curr)
+ if os.path.isdir(d):
+ os.chdir(d)
+ for c in os.listdir('.'):
+ if c.endswith('.c'):
+ execute([EMCC, c, '-O2', '--embed-file', 'input.txt'])
+ js = jsrun.run_js('a.out.js', filter(lambda x: x != '-w', SPIDERMONKEY_ENGINE), stdout=PIPE)
+
+ execute([CLANG_CC, '-m32', c])
+ n1 = execute(['./a.out'], stdout=PIPE)[0]
+
+ execute([CLANG_CC, '-m32', c, '-O2'])
+ n2 = execute(['./a.out'], stdout=PIPE)[0]
+
+ execute(['gcc', c, '-m32'])
+ n3 = execute(['./a.out'], stdout=PIPE)[0]
+
+ if js == n1:
+ print 'ok'
+ elif js == n2:
+ print 'emcc and clang -O2 both equally wrong'
+ elif js == n3:
+ print 'emcc agrees with gcc, so probably ok'
+ else:
+ print
+ print 'js ', js,
+ print 'c0 ', n1,
+ print 'c2 ', n2,
+ print 'g ', n3,
+ print 'fail!!!', d
+
diff --git a/tools/validate_asmjs.py b/tools/validate_asmjs.py
index ea909fbd..4136af93 100644
--- a/tools/validate_asmjs.py
+++ b/tools/validate_asmjs.py
@@ -59,6 +59,11 @@ def validate_asmjs(filename, muteOutput):
if not valid_asmjs:
return False
if numAsmJsBlocks == 0:
+ # Test a .js file with the same basename - emcc convention
+ # is to generate files with same basename but different suffix.
+ js_file = filename.replace('.html', '.js')
+ if os.path.isfile(js_file):
+ return validate_asmjs(js_file, muteOutput)
if not muteOutput:
print >> sys.stderr, 'Error: the file does not contain any "use asm" modules.'
return False
diff --git a/tools/webidl_binder.py b/tools/webidl_binder.py
new file mode 100644
index 00000000..0507cc78
--- /dev/null
+++ b/tools/webidl_binder.py
@@ -0,0 +1,432 @@
+
+'''
+WebIDL binder
+
+https://github.com/kripken/emscripten/wiki/WebIDL-Binder
+'''
+
+import os, sys
+
+import shared
+
+sys.path.append(shared.path_from_root('third_party'))
+sys.path.append(shared.path_from_root('third_party', 'ply'))
+
+import WebIDL
+
+class Dummy:
+ def __init__(self, init):
+ for k, v in init.iteritems():
+ self.__dict__[k] = v
+
+ def getExtendedAttribute(self, name):
+ return None
+
+input_file = sys.argv[1]
+output_base = sys.argv[2]
+
+shared.try_delete(output_base + '.cpp')
+shared.try_delete(output_base + '.js')
+
+p = WebIDL.Parser()
+p.parse(open(input_file).read())
+data = p.finish()
+
+interfaces = {}
+implements = {}
+
+for thing in data:
+ if isinstance(thing, WebIDL.IDLInterface):
+ interfaces[thing.identifier.name] = thing
+ elif isinstance(thing, WebIDL.IDLImplementsStatement):
+ implements.setdefault(thing.implementor.identifier.name, []).append(thing.implementee.identifier.name)
+
+#print interfaces
+#print implements
+
+pre_c = []
+mid_c = []
+mid_js = []
+
+pre_c += [r'''
+#include <emscripten.h>
+''']
+
+mid_c += [r'''
+extern "C" {
+''']
+
+def emit_constructor(name):
+ global mid_js
+ mid_js += [r'''%s.prototype = %s;
+%s.prototype.constructor = %s;
+%s.prototype.__class__ = %s;
+%s.__cache__ = {};
+Module['%s'] = %s;
+''' % (name, 'Object.create(%s.prototype)' % (implements[name][0] if implements.get(name) else 'WrapperObject'), name, name, name, name, name, name, name)]
+
+
+mid_js += ['''
+// Bindings utilities
+
+function WrapperObject() {
+}
+''']
+
+emit_constructor('WrapperObject')
+
+mid_js += ['''
+function getCache(__class__) {
+ return (__class__ || WrapperObject).__cache__;
+}
+Module['getCache'] = getCache;
+
+function wrapPointer(ptr, __class__) {
+ var cache = getCache(__class__);
+ var ret = cache[ptr];
+ if (ret) return ret;
+ ret = Object.create((__class__ || WrapperObject).prototype);
+ ret.ptr = ptr;
+ return cache[ptr] = ret;
+}
+Module['wrapPointer'] = wrapPointer;
+
+function castObject(obj, __class__) {
+ return wrapPointer(obj.ptr, __class__);
+}
+Module['castObject'] = castObject;
+
+Module['NULL'] = wrapPointer(0);
+
+function destroy(obj) {
+ if (!obj['__destroy__']) throw 'Error: Cannot destroy object. (Did you create it yourself?)';
+ obj['__destroy__']();
+ // Remove from cache, so the object can be GC'd and refs added onto it released
+ delete getCache(obj.__class__)[obj.ptr];
+}
+Module['destroy'] = destroy;
+
+function compare(obj1, obj2) {
+ return obj1.ptr === obj2.ptr;
+}
+Module['compare'] = compare;
+
+function getPointer(obj) {
+ return obj.ptr;
+}
+Module['getPointer'] = getPointer;
+
+function getClass(obj) {
+ return obj.__class__;
+}
+Module['getClass'] = getClass;
+
+// Converts a value into a C-style string.
+function ensureString(value) {
+ if (typeof value == 'string') return allocate(intArrayFromString(value), 'i8', ALLOC_STACK);
+ return value;
+}
+
+''']
+
+C_FLOATS = ['float', 'double']
+
+def type_to_c(t, non_pointing=False):
+ #print 'to c ', t
+ t = t.replace(' (Wrapper)', '')
+ if t == 'Long':
+ return 'int'
+ elif t == 'Short':
+ return 'short'
+ elif t == 'Void':
+ return 'void'
+ elif t == 'String':
+ return 'char*'
+ elif t == 'Float':
+ return 'float'
+ elif t == 'Double':
+ return 'double'
+ elif t == 'Boolean':
+ return 'bool'
+ elif t in interfaces:
+ return (interfaces[t].getExtendedAttribute('Prefix') or [''])[0] + t + ('' if non_pointing else '*')
+ else:
+ return t
+
+def take_addr_if_nonpointer(m):
+ if m.getExtendedAttribute('Ref') or m.getExtendedAttribute('Value'):
+ return '&'
+ return ''
+
+def deref_if_nonpointer(m):
+ if m.getExtendedAttribute('Ref') or m.getExtendedAttribute('Value'):
+ return '*'
+ return ''
+
+def type_to_cdec(raw):
+ name = ret = type_to_c(raw.type.name, non_pointing=True)
+ if raw.getExtendedAttribute('Const'): ret = 'const ' + ret
+ if name not in interfaces: return ret
+ if raw.getExtendedAttribute('Ref'):
+ return ret + '&'
+ if raw.getExtendedAttribute('Value'):
+ return ret
+ return ret + '*'
+
+def render_function(class_name, func_name, sigs, return_type, non_pointer, copy, operator, constructor, func_scope, call_content=None, const=False):
+ global mid_c, mid_js, js_impl_methods
+
+ #print 'renderfunc', class_name, func_name, sigs, return_type, constructor
+
+ bindings_name = class_name + '_' + func_name
+ min_args = min(sigs.keys())
+ max_args = max(sigs.keys())
+
+ c_names = {}
+
+ # JS
+
+ cache = ('getCache(%s)[this.ptr] = this;' % class_name) if constructor else ''
+ call_prefix = '' if not constructor else 'this.ptr = '
+ call_postfix = ''
+ if return_type != 'Void' and not constructor: call_prefix = 'return '
+ if not constructor:
+ if return_type in interfaces:
+ call_prefix += 'wrapPointer('
+ call_postfix += ', ' + return_type + ')'
+
+ args = ['arg%d' % i for i in range(max_args)]
+ if not constructor:
+ body = ' var self = this.ptr;\n'
+ pre_arg = ['self']
+ else:
+ body = ''
+ pre_arg = []
+
+ for i in range(max_args):
+ # note: null has typeof object, but is ok to leave as is, since we are calling into asm code where null|0 = 0
+ body += " if (arg%d && typeof arg%d === 'object') arg%d = arg%d.ptr;\n" % (i, i, i, i)
+ body += " else arg%d = ensureString(arg%d);\n" % (i, i)
+
+ for i in range(min_args, max_args):
+ c_names[i] = 'emscripten_bind_%s_%d' % (bindings_name, i)
+ body += ' if (arg%d === undefined) { %s%s(%s)%s%s }\n' % (i, call_prefix, '_' + c_names[i], ', '.join(pre_arg + args[:i]), call_postfix, '' if 'return ' in call_prefix else '; ' + (cache or ' ') + 'return')
+ c_names[max_args] = 'emscripten_bind_%s_%d' % (bindings_name, max_args)
+ body += ' %s%s(%s)%s;\n' % (call_prefix, '_' + c_names[max_args], ', '.join(pre_arg + args), call_postfix)
+ if cache:
+ body += ' ' + cache + '\n'
+ mid_js += [r'''function%s(%s) {
+%s
+}''' % ((' ' + func_name) if constructor else '', ', '.join(args), body[:-1])]
+
+ # C
+
+ for i in range(min_args, max_args+1):
+ raw = sigs.get(i)
+ if raw is None: continue
+ sig = [arg.type.name for arg in raw]
+
+ c_arg_types = map(type_to_c, sig)
+
+ normal_args = ', '.join(['%s arg%d' % (c_arg_types[j], j) for j in range(i)])
+ if constructor:
+ full_args = normal_args
+ else:
+ full_args = type_to_c(class_name, non_pointing=True) + '* self' + ('' if not normal_args else ', ' + normal_args)
+ call_args = ', '.join(['%sarg%d' % ('*' if raw[j].getExtendedAttribute('Ref') else '', j) for j in range(i)])
+ if constructor:
+ call = 'new ' + type_to_c(class_name, non_pointing=True)
+ call += '(' + call_args + ')'
+ elif call_content is not None:
+ call = call_content
+ else:
+ call = 'self->' + func_name
+ call += '(' + call_args + ')'
+
+ if operator:
+ assert '=' in operator, 'can only do += *= etc. for now, all with "="'
+ cast_self = 'self'
+ if class_name != func_scope:
+ # this function comes from an ancestor class; for operators, we must cast it
+ cast_self = 'dynamic_cast<' + type_to_c(func_scope) + '>(' + cast_self + ')'
+ call = '(*%s %s %sarg0)' % (cast_self, operator, '*' if sig[0] in interfaces else '')
+
+ pre = ''
+
+ basic_return = 'return ' if constructor or return_type is not 'Void' else ''
+ return_prefix = basic_return
+ return_postfix = ''
+ if non_pointer:
+ return_prefix += '&';
+ if copy:
+ pre += ' static %s temp;\n' % type_to_c(return_type, non_pointing=True)
+ return_prefix += '(temp = '
+ return_postfix += ', &temp)'
+
+ c_return_type = type_to_c(return_type)
+ mid_c += [r'''
+%s%s EMSCRIPTEN_KEEPALIVE %s(%s) {
+%s %s%s%s;
+}
+''' % ('const ' if const else '', type_to_c(class_name) if constructor else c_return_type, c_names[i], full_args, pre, return_prefix, call, return_postfix)]
+
+ if not constructor:
+ if i == max_args:
+ dec_args = ', '.join(map(lambda j: type_to_cdec(raw[j]) + ' arg' + str(j), range(i)))
+ js_call_args = ', '.join(['%sarg%d' % (('(int)' if sig[j] in interfaces else '') + ('&' if raw[j].getExtendedAttribute('Ref') or raw[j].getExtendedAttribute('Value') else ''), j) for j in range(i)])
+
+ js_impl_methods += [r''' %s %s(%s) {
+ %sEM_ASM_%s({
+ var self = Module['getCache'](Module['%s'])[$0];
+ if (!self.hasOwnProperty('%s')) throw 'a JSImplementation must implement all functions, you forgot %s::%s.';
+ %sself.%s(%s)%s;
+ }, (int)this%s);
+ }''' % (c_return_type, func_name, dec_args,
+ basic_return, 'INT' if c_return_type not in C_FLOATS else 'DOUBLE',
+ class_name,
+ func_name, class_name, func_name,
+ return_prefix,
+ func_name,
+ ','.join(['$%d' % i for i in range(1, max_args)]),
+ return_postfix,
+ (', ' if js_call_args else '') + js_call_args)]
+
+
+for name, interface in interfaces.iteritems():
+ js_impl = interface.getExtendedAttribute('JSImplementation')
+ if not js_impl: continue
+ implements[name] = [js_impl[0]]
+
+names = interfaces.keys()
+names.sort(lambda x, y: 1 if implements.get(x) and implements[x][0] == y else (-1 if implements.get(y) and implements[y][0] == x else 0))
+
+for name in names:
+ interface = interfaces[name]
+
+ mid_js += ['\n// ' + name + '\n']
+ mid_c += ['\n// ' + name + '\n']
+
+ global js_impl_methods
+ js_impl_methods = []
+
+ cons = interface.getExtendedAttribute('Constructor')
+ if type(cons) == list: raise Exception('do not use "Constructor", instead create methods with the name of the interface')
+
+ js_impl = interface.getExtendedAttribute('JSImplementation')
+ if js_impl:
+ js_impl = js_impl[0]
+
+ # Methods
+
+ seen_constructor = False # ensure a constructor, even for abstract base classes
+ for m in interface.members:
+ if m.identifier.name == name:
+ seen_constructor = True
+ break
+ if not seen_constructor:
+ mid_js += ['function %s() { throw "cannot construct a %s, no constructor in IDL" }\n' % (name, name)]
+ emit_constructor(name)
+
+ for m in interface.members:
+ if not m.isMethod(): continue
+ constructor = m.identifier.name == name
+ if not constructor:
+ parent_constructor = False
+ temp = m.parentScope
+ while temp.parentScope:
+ if temp.identifier.name == m.identifier.name:
+ parent_constructor = True
+ temp = temp.parentScope
+ if parent_constructor:
+ continue
+ if not constructor:
+ mid_js += [r'''
+%s.prototype.%s = ''' % (name, m.identifier.name)]
+ sigs = {}
+ return_type = None
+ for ret, args in m.signatures():
+ if return_type is None:
+ return_type = ret.name
+ else:
+ assert return_type == ret.name, 'overloads must have the same return type'
+ for i in range(len(args)+1):
+ if i == len(args) or args[i].optional:
+ assert i not in sigs, 'overloading must differentiate by # of arguments (cannot have two signatures that differ by types but not by length)'
+ sigs[i] = args[:i]
+ render_function(name,
+ m.identifier.name, sigs, return_type,
+ m.getExtendedAttribute('Ref'),
+ m.getExtendedAttribute('Value'),
+ (m.getExtendedAttribute('Operator') or [None])[0],
+ constructor,
+ func_scope=m.parentScope.identifier.name)
+ mid_js += [';\n']
+ if constructor:
+ emit_constructor(name)
+
+ for m in interface.members:
+ if not m.isAttr(): continue
+ attr = m.identifier.name
+
+ get_name = 'get_' + attr
+ mid_js += [r'''
+ %s.prototype.%s= ''' % (name, get_name)]
+ render_function(name,
+ get_name, { 0: [] }, m.type.name,
+ None,
+ None,
+ None,
+ False,
+ func_scope=interface,
+ call_content=take_addr_if_nonpointer(m) + 'self->' + attr,
+ const=m.getExtendedAttribute('Const'))
+
+ set_name = 'set_' + attr
+ mid_js += [r'''
+ %s.prototype.%s= ''' % (name, set_name)]
+ render_function(name,
+ set_name, { 1: [Dummy({ 'type': m.type })] }, 'Void',
+ None,
+ None,
+ None,
+ False,
+ func_scope=interface,
+ call_content='self->' + attr + ' = ' + deref_if_nonpointer(m) + 'arg0',
+ const=m.getExtendedAttribute('Const'))
+
+ if not interface.getExtendedAttribute('NoDelete'):
+ mid_js += [r'''
+ %s.prototype.__destroy__ = ''' % name]
+ render_function(name,
+ '__destroy__', { 0: [] }, 'Void',
+ None,
+ None,
+ None,
+ False,
+ func_scope=interface,
+ call_content='delete self')
+
+ # Emit C++ class implementation that calls into JS implementation
+
+ if js_impl:
+ pre_c += [r'''
+class %s : public %s {
+public:
+%s
+};
+''' % (name, type_to_c(js_impl, non_pointing=True), '\n'.join(js_impl_methods))]
+
+mid_c += ['\n}\n\n']
+mid_js += ['\n']
+
+# Write
+
+c = open(output_base + '.cpp', 'w')
+for x in pre_c: c.write(x)
+for x in mid_c: c.write(x)
+c.close()
+
+js = open(output_base + '.js', 'w')
+for x in mid_js: js.write(x)
+js.close()
+